annotate libpurple/buddyicon.h @ 23120:4044655e5615

Add a purple_buddy_icons_node_set_custom_icon_from_file convenience function.
author Etan Reisner <pidgin@unreliablesource.net>
date Thu, 15 May 2008 02:35:53 +0000
parents 944059cb7807
children d3fb9d9b57e2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
1 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
2 * @file buddyicon.h Buddy Icon API
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
3 * @ingroup core
20074
6bf32c9e15a7 remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents: 19680
diff changeset
4 */
6bf32c9e15a7 remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents: 19680
diff changeset
5
6bf32c9e15a7 remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents: 19680
diff changeset
6 /* purple
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
7 *
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
8 * Purple is the legal property of its developers, whose names are too numerous
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
9 * to list here. Please refer to the COPYRIGHT file distributed with this
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
10 * source distribution.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
11 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
12 * This program is free software; you can redistribute it and/or modify
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
13 * it under the terms of the GNU General Public License as published by
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
14 * the Free Software Foundation; either version 2 of the License, or
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
15 * (at your option) any later version.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
16 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
17 * This program is distributed in the hope that it will be useful,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
20 * GNU General Public License for more details.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
21 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
22 * You should have received a copy of the GNU General Public License
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
23 * along with this program; if not, write to the Free Software
19680
44b4e8bd759b The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 18039
diff changeset
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
25 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
26 #ifndef _PURPLE_BUDDYICON_H_
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
27 #define _PURPLE_BUDDYICON_H_
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
28
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
29 typedef struct _PurpleBuddyIcon PurpleBuddyIcon;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
30
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
31 #include "account.h"
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
32 #include "blist.h"
16375
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
33 #include "imgstore.h"
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
34 #include "prpl.h"
18039
c588a4a9d287 A patch from David Grohmann (dave1g) to log embedded images.
Richard Laager <rlaager@wiktel.com>
parents: 16828
diff changeset
35 #include "util.h"
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
36
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
37 #ifdef __cplusplus
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
38 extern "C" {
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
39 #endif
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
40
16373
c9b4ff420140 The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@wiktel.com>
parents: 15936
diff changeset
41
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
42 /**************************************************************************/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
43 /** @name Buddy Icon API */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
44 /**************************************************************************/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
45 /*@{*/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
46
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
47 /**
22606
76af23621e19 Better documentation.
Mark Doliner <mark@kingant.net>
parents: 20074
diff changeset
48 * Creates a new buddy icon structure and populates it.
16373
c9b4ff420140 The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@wiktel.com>
parents: 15936
diff changeset
49 *
c9b4ff420140 The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@wiktel.com>
parents: 15936
diff changeset
50 * If the buddy icon already exists, you'll get a reference to that structure,
c9b4ff420140 The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@wiktel.com>
parents: 15936
diff changeset
51 * which will have been updated with the data supplied.
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
52 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
53 * @param account The account the user is on.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
54 * @param username The username the icon belongs to.
16375
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
55 * @param icon_data The buddy icon data.
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
56 * @param icon_len The buddy icon length.
16386
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
57 * @param checksum A protocol checksum from the prpl or @c NULL.
16375
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
58 *
16828
56823a55581a Rework purple_buddy_icons_find() to return a reference for the caller, which
Richard Laager <rlaager@wiktel.com>
parents: 16621
diff changeset
59 * @return The buddy icon structure, with a reference for the caller.
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
60 */
16375
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
61 PurpleBuddyIcon *purple_buddy_icon_new(PurpleAccount *account, const char *username,
16386
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
62 void *icon_data, size_t icon_len,
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
63 const char *checksum);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
64
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
65 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
66 * Increments the reference count on a buddy icon.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
67 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
68 * @param icon The buddy icon.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
69 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
70 * @return @a icon.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
71 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
72 PurpleBuddyIcon *purple_buddy_icon_ref(PurpleBuddyIcon *icon);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
73
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
74 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
75 * Decrements the reference count on a buddy icon.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
76 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
77 * If the reference count reaches 0, the icon will be destroyed.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
78 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
79 * @param icon The buddy icon.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
80 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
81 * @return @a icon, or @c NULL if the reference count reached 0.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
82 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
83 PurpleBuddyIcon *purple_buddy_icon_unref(PurpleBuddyIcon *icon);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
84
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
85 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
86 * Updates every instance of this icon.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
87 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
88 * @param icon The buddy icon.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
89 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
90 void purple_buddy_icon_update(PurpleBuddyIcon *icon);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
91
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
92 /**
16391
24bbd7e46bfe Change the imgstore and by extension, then the buddy icon code to take over
Richard Laager <rlaager@wiktel.com>
parents: 16390
diff changeset
93 * Sets the buddy icon's data.
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
94 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
95 * @param icon The buddy icon.
16391
24bbd7e46bfe Change the imgstore and by extension, then the buddy icon code to take over
Richard Laager <rlaager@wiktel.com>
parents: 16390
diff changeset
96 * @param data The buddy icon data, which the buddy icon code
24bbd7e46bfe Change the imgstore and by extension, then the buddy icon code to take over
Richard Laager <rlaager@wiktel.com>
parents: 16390
diff changeset
97 * takes ownership of and will free.
16373
c9b4ff420140 The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@wiktel.com>
parents: 15936
diff changeset
98 * @param len The length of the data in @a data.
16386
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
99 * @param checksum A protocol checksum from the prpl or @c NULL.
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
100 */
16386
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
101 void
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
102 purple_buddy_icon_set_data(PurpleBuddyIcon *icon, guchar *data,
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
103 size_t len, const char *checksum);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
104
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
105 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
106 * Returns the buddy icon's account.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
107 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
108 * @param icon The buddy icon.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
109 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
110 * @return The account.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
111 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
112 PurpleAccount *purple_buddy_icon_get_account(const PurpleBuddyIcon *icon);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
113
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
114 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
115 * Returns the buddy icon's username.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
116 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
117 * @param icon The buddy icon.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
118 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
119 * @return The username.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
120 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
121 const char *purple_buddy_icon_get_username(const PurpleBuddyIcon *icon);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
122
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
123 /**
16386
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
124 * Returns the buddy icon's checksum.
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
125 *
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
126 * This function is really only for prpl use.
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
127 *
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
128 * @param icon The buddy icon.
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
129 *
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
130 * @return The checksum.
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
131 */
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
132 const char *purple_buddy_icon_get_checksum(const PurpleBuddyIcon *icon);
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
133
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
134 /**
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
135 * Returns the buddy icon's data.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
136 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
137 * @param icon The buddy icon.
16373
c9b4ff420140 The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@wiktel.com>
parents: 15936
diff changeset
138 * @param len If not @c NULL, the length of the icon data returned will be
c9b4ff420140 The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@wiktel.com>
parents: 15936
diff changeset
139 * set in the location pointed to by this.
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
140 *
16375
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
141 * @return A pointer to the icon data.
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
142 */
16375
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
143 gconstpointer purple_buddy_icon_get_data(const PurpleBuddyIcon *icon, size_t *len);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
144
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
145 /**
16373
c9b4ff420140 The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@wiktel.com>
parents: 15936
diff changeset
146 * Returns an extension corresponding to the buddy icon's file type.
c9b4ff420140 The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@wiktel.com>
parents: 15936
diff changeset
147 *
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
148 * @param icon The buddy icon.
15936
b449dc6b8a20 A little doxygen love and some tiny gaim->purpleisms
Mark Doliner <mark@kingant.net>
parents: 15823
diff changeset
149 *
16375
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
150 * @return The icon's extension, "icon" if unknown, or @c NULL if
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
151 * the image data has disappeared.
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
152 */
16375
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
153 const char *purple_buddy_icon_get_extension(const PurpleBuddyIcon *icon);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
154
16390
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
155 /**
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
156 * Returns a full path to an icon.
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
157 *
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
158 * If the icon has data and the file exists in the cache, this will return
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
159 * a full path to the cache file.
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
160 *
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
161 * In general, it is not appropriate to be poking in the icon cache
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
162 * directly. If you find yourself wanting to use this function, think
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
163 * very long and hard about it, and then don't.
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
164 *
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
165 * @param icon The buddy icon
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
166 *
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
167 * @return A full path to the file, or @c NULL under various conditions.
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
168 */
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
169 char *purple_buddy_icon_get_full_path(PurpleBuddyIcon *icon);
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
170
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
171 /*@}*/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
172
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
173 /**************************************************************************/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
174 /** @name Buddy Icon Subsystem API */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
175 /**************************************************************************/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
176 /*@{*/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
177
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
178 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
179 * Sets a buddy icon for a user.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
180 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
181 * @param account The account the user is on.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
182 * @param username The username of the user.
16391
24bbd7e46bfe Change the imgstore and by extension, then the buddy icon code to take over
Richard Laager <rlaager@wiktel.com>
parents: 16390
diff changeset
183 * @param icon_data The buddy icon data, which the buddy icon code
24bbd7e46bfe Change the imgstore and by extension, then the buddy icon code to take over
Richard Laager <rlaager@wiktel.com>
parents: 16390
diff changeset
184 * takes ownership of and will free.
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
185 * @param icon_len The length of the icon data.
16386
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
186 * @param checksum A protocol checksum from the prpl or @c NULL.
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
187 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
188 * @return The buddy icon set, or NULL if no icon was set.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
189 */
16373
c9b4ff420140 The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@wiktel.com>
parents: 15936
diff changeset
190 void
c9b4ff420140 The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@wiktel.com>
parents: 15936
diff changeset
191 purple_buddy_icons_set_for_user(PurpleAccount *account, const char *username,
16386
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
192 void *icon_data, size_t icon_len,
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
193 const char *checksum);
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
194
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
195 /**
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
196 * Returns the checksum for the buddy icon of a specified buddy.
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
197 *
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
198 * This avoids loading the icon image data from the cache if it's
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
199 * not already loaded for some other reason.
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
200 *
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
201 * @param buddy The buddy
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
202 *
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
203 * @return The checksum.
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
204 */
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
205 const char *
e0c9a46b459f Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@wiktel.com>
parents: 16375
diff changeset
206 purple_buddy_icons_get_checksum_for_user(PurpleBuddy *buddy);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
207
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
208 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
209 * Returns the buddy icon information for a user.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
210 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
211 * @param account The account the user is on.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
212 * @param username The username of the user.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
213 *
16828
56823a55581a Rework purple_buddy_icons_find() to return a reference for the caller, which
Richard Laager <rlaager@wiktel.com>
parents: 16621
diff changeset
214 * @return The icon (with a reference for the caller) if found, or @c NULL if
56823a55581a Rework purple_buddy_icons_find() to return a reference for the caller, which
Richard Laager <rlaager@wiktel.com>
parents: 16621
diff changeset
215 * not found.
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
216 */
16373
c9b4ff420140 The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@wiktel.com>
parents: 15936
diff changeset
217 PurpleBuddyIcon *
c9b4ff420140 The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@wiktel.com>
parents: 15936
diff changeset
218 purple_buddy_icons_find(PurpleAccount *account, const char *username);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
219
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
220 /**
16390
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
221 * Returns the buddy icon image for an account.
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
222 *
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
223 * The caller owns a reference to the image in the store, and must dereference
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
224 * the image with purple_imgstore_unref() for it to be freed.
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
225 *
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
226 * This function deals with loading the icon from the cache, if
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
227 * needed, so it should be called in any case where you want the
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
228 * appropriate icon.
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
229 *
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
230 * @param account The account
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
231 *
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
232 * @return The account's buddy icon image.
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
233 */
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
234 PurpleStoredImage *
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
235 purple_buddy_icons_find_account_icon(PurpleAccount *account);
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
236
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
237 /**
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
238 * Sets a buddy icon for an account.
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
239 *
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
240 * This function will deal with saving a record of the icon,
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
241 * caching the data, etc.
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
242 *
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
243 * @param account The account for which to set a custom icon.
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
244 * @param icon_data The image data of the icon, which the
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
245 * buddy icon code will free.
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
246 * @param icon_len The length of the data in @a icon_data.
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
247 *
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
248 * @return The icon that was set. The caller does NOT own
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
249 * a reference to this, and must call purple_imgstore_ref()
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
250 * if it wants one.
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
251 */
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
252 PurpleStoredImage *
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
253 purple_buddy_icons_set_account_icon(PurpleAccount *account,
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
254 guchar *icon_data, size_t icon_len);
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
255
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
256 /**
16621
dbd0a01a9a81 The OSCAR timestamp stuff.
Richard Laager <rlaager@wiktel.com>
parents: 16391
diff changeset
257 * Returns the timestamp of when the icon was set.
dbd0a01a9a81 The OSCAR timestamp stuff.
Richard Laager <rlaager@wiktel.com>
parents: 16391
diff changeset
258 *
dbd0a01a9a81 The OSCAR timestamp stuff.
Richard Laager <rlaager@wiktel.com>
parents: 16391
diff changeset
259 * This is intended for use in protocols that require a timestamp for
dbd0a01a9a81 The OSCAR timestamp stuff.
Richard Laager <rlaager@wiktel.com>
parents: 16391
diff changeset
260 * buddy icon update reasons.
dbd0a01a9a81 The OSCAR timestamp stuff.
Richard Laager <rlaager@wiktel.com>
parents: 16391
diff changeset
261 *
dbd0a01a9a81 The OSCAR timestamp stuff.
Richard Laager <rlaager@wiktel.com>
parents: 16391
diff changeset
262 * @param account The account
dbd0a01a9a81 The OSCAR timestamp stuff.
Richard Laager <rlaager@wiktel.com>
parents: 16391
diff changeset
263 *
dbd0a01a9a81 The OSCAR timestamp stuff.
Richard Laager <rlaager@wiktel.com>
parents: 16391
diff changeset
264 * @return The time the icon was set, or 0 if an error occurred.
dbd0a01a9a81 The OSCAR timestamp stuff.
Richard Laager <rlaager@wiktel.com>
parents: 16391
diff changeset
265 */
dbd0a01a9a81 The OSCAR timestamp stuff.
Richard Laager <rlaager@wiktel.com>
parents: 16391
diff changeset
266 time_t
dbd0a01a9a81 The OSCAR timestamp stuff.
Richard Laager <rlaager@wiktel.com>
parents: 16391
diff changeset
267 purple_buddy_icons_get_account_icon_timestamp(PurpleAccount *account);
dbd0a01a9a81 The OSCAR timestamp stuff.
Richard Laager <rlaager@wiktel.com>
parents: 16391
diff changeset
268
dbd0a01a9a81 The OSCAR timestamp stuff.
Richard Laager <rlaager@wiktel.com>
parents: 16391
diff changeset
269 /**
23118
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
270 * Returns a boolean indicating if a given blist node has a custom buddy icon.
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
271 *
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
272 * @param node The blist node.
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
273 *
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
274 * @return A boolean indicating if @a node has a custom buddy icon.
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
275 * @since 2.5.0
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
276 */
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
277 gboolean
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
278 purple_buddy_icons_node_has_custom_icon(PurpleBlistNode *node);
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
279
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
280 /**
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
281 * Returns the custom buddy icon image for a blist node.
16375
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
282 *
16390
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
283 * The caller owns a reference to the image in the store, and must dereference
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
284 * the image with purple_imgstore_unref() for it to be freed.
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
285 *
16375
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
286 * This function deals with loading the icon from the cache, if
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
287 * needed, so it should be called in any case where you want the
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
288 * appropriate icon.
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
289 *
23118
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
290 * @param node The node.
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
291 *
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
292 * @return The custom buddy icon.
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
293 * @since 2.5.0
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
294 */
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
295 PurpleStoredImage *
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
296 purple_buddy_icons_node_find_custom_icon(PurpleBlistNode *node);
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
297
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
298 /**
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
299 * Sets a custom buddy icon for a blist node.
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
300 *
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
301 * This function will deal with saving a record of the icon, caching the data,
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
302 * etc.
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
303 *
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
304 * @param node The blist node for which to set a custom icon.
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
305 * @param icon_data The image data of the icon, which the buddy icon code will
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
306 * free.
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
307 * @param icon_len The length of the data in @a icon_data.
16375
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
308 *
23118
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
309 * @return The icon that was set. The caller does NOT own a reference to this,
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
310 * and must call purple_imgstore_ref() if it wants one.
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
311 * @since 2.5.0
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
312 */
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
313 PurpleStoredImage *
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
314 purple_buddy_icons_node_set_custom_icon(PurpleBlistNode *node,
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
315 guchar *icon_data, size_t icon_len);
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
316
23120
4044655e5615 Add a purple_buddy_icons_node_set_custom_icon_from_file convenience function.
Etan Reisner <pidgin@unreliablesource.net>
parents: 23118
diff changeset
317 /**
4044655e5615 Add a purple_buddy_icons_node_set_custom_icon_from_file convenience function.
Etan Reisner <pidgin@unreliablesource.net>
parents: 23118
diff changeset
318 * Sets a custom buddy icon for a blist node.
4044655e5615 Add a purple_buddy_icons_node_set_custom_icon_from_file convenience function.
Etan Reisner <pidgin@unreliablesource.net>
parents: 23118
diff changeset
319 *
4044655e5615 Add a purple_buddy_icons_node_set_custom_icon_from_file convenience function.
Etan Reisner <pidgin@unreliablesource.net>
parents: 23118
diff changeset
320 * Convenience wrapper around purple_buddy_icons_node_set_custom_icon.
4044655e5615 Add a purple_buddy_icons_node_set_custom_icon_from_file convenience function.
Etan Reisner <pidgin@unreliablesource.net>
parents: 23118
diff changeset
321 * @see purple_buddy_icons_node_set_custom_icon()
4044655e5615 Add a purple_buddy_icons_node_set_custom_icon_from_file convenience function.
Etan Reisner <pidgin@unreliablesource.net>
parents: 23118
diff changeset
322 *
4044655e5615 Add a purple_buddy_icons_node_set_custom_icon_from_file convenience function.
Etan Reisner <pidgin@unreliablesource.net>
parents: 23118
diff changeset
323 * @param node The blist node for which to set a custom icon.
4044655e5615 Add a purple_buddy_icons_node_set_custom_icon_from_file convenience function.
Etan Reisner <pidgin@unreliablesource.net>
parents: 23118
diff changeset
324 * @param filename The path to the icon to set for the blist node.
4044655e5615 Add a purple_buddy_icons_node_set_custom_icon_from_file convenience function.
Etan Reisner <pidgin@unreliablesource.net>
parents: 23118
diff changeset
325 *
4044655e5615 Add a purple_buddy_icons_node_set_custom_icon_from_file convenience function.
Etan Reisner <pidgin@unreliablesource.net>
parents: 23118
diff changeset
326 * @return The icon that was set. The caller does NOT own a reference to this,
4044655e5615 Add a purple_buddy_icons_node_set_custom_icon_from_file convenience function.
Etan Reisner <pidgin@unreliablesource.net>
parents: 23118
diff changeset
327 * and must call purple_imgstore_ref() if it wants one.
4044655e5615 Add a purple_buddy_icons_node_set_custom_icon_from_file convenience function.
Etan Reisner <pidgin@unreliablesource.net>
parents: 23118
diff changeset
328 * @since 2.5.0
4044655e5615 Add a purple_buddy_icons_node_set_custom_icon_from_file convenience function.
Etan Reisner <pidgin@unreliablesource.net>
parents: 23118
diff changeset
329 */
4044655e5615 Add a purple_buddy_icons_node_set_custom_icon_from_file convenience function.
Etan Reisner <pidgin@unreliablesource.net>
parents: 23118
diff changeset
330 PurpleStoredImage *
4044655e5615 Add a purple_buddy_icons_node_set_custom_icon_from_file convenience function.
Etan Reisner <pidgin@unreliablesource.net>
parents: 23118
diff changeset
331 purple_buddy_icons_node_set_custom_icon_from_file(PurpleBlistNode *node,
4044655e5615 Add a purple_buddy_icons_node_set_custom_icon_from_file convenience function.
Etan Reisner <pidgin@unreliablesource.net>
parents: 23118
diff changeset
332 const gchar *filename);
4044655e5615 Add a purple_buddy_icons_node_set_custom_icon_from_file convenience function.
Etan Reisner <pidgin@unreliablesource.net>
parents: 23118
diff changeset
333
23118
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
334 #ifndef PURPLE_DISABLE_DEPRECATED
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
335 /**
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
336 * PurpleContact version of purple_buddy_icons_node_has_custom_icon.
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
337 *
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
338 * @copydoc purple_buddy_icons_node_has_custom_icon()
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
339 *
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
340 * @deprecated Use purple_buddy_icons_node_has_custom_icon instead.
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
341 */
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
342 gboolean
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
343 purple_buddy_icons_has_custom_icon(PurpleContact *contact);
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
344
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
345 /**
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
346 * PurpleContact version of purple_buddy_icons_node_find_custom_icon.
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
347 *
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
348 * @copydoc purple_buddy_icons_node_find_custom_icon()
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
349 *
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
350 * @deprecated Use purple_buddy_icons_node_find_custom_icon instead.
16375
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
351 */
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
352 PurpleStoredImage *
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
353 purple_buddy_icons_find_custom_icon(PurpleContact *contact);
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
354
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
355 /**
23118
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
356 * PurpleContact version of purple_buddy_icons_node_set_custom_icon.
16375
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
357 *
23118
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
358 * @copydoc purple_buddy_icons_node_set_custom_icon()
16390
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
359 *
23118
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
360 * @deprecated Use purple_buddy_icons_node_set_custom_icon instead.
16375
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
361 */
16390
4fc51a87ce42 Updates for the account buddy icon stuff. This doesn't yet work fully (and maybe not even partly), but it compiles.
Richard Laager <rlaager@wiktel.com>
parents: 16386
diff changeset
362 PurpleStoredImage *
16375
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
363 purple_buddy_icons_set_custom_icon(PurpleContact *contact,
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
364 guchar *icon_data, size_t icon_len);
23118
944059cb7807 Add the purple_buddy_icons_node_has_custom_icon,
Etan Reisner <pidgin@unreliablesource.net>
parents: 22606
diff changeset
365 #endif
16375
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
366
391a79778f89 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@wiktel.com>
parents: 16373
diff changeset
367 /**
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
368 * Sets whether or not buddy icon caching is enabled.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
369 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
370 * @param caching TRUE of buddy icon caching should be enabled, or
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
371 * FALSE otherwise.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
372 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
373 void purple_buddy_icons_set_caching(gboolean caching);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
375 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
376 * Returns whether or not buddy icon caching should be enabled.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
377 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
378 * The default is TRUE, unless otherwise specified by
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
379 * purple_buddy_icons_set_caching().
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
380 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
381 * @return TRUE if buddy icon caching is enabled, or FALSE otherwise.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
382 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
383 gboolean purple_buddy_icons_is_caching(void);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
384
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
385 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
386 * Sets the directory used to store buddy icon cache files.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
387 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
388 * @param cache_dir The directory to store buddy icon cache files to.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
389 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
390 void purple_buddy_icons_set_cache_dir(const char *cache_dir);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
391
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
392 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
393 * Returns the directory used to store buddy icon cache files.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
394 *
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
395 * The default directory is PURPLEDIR/icons, unless otherwise specified
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
396 * by purple_buddy_icons_set_cache_dir().
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
397 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
398 * @return The directory to store buddy icon cache files to.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
399 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
400 const char *purple_buddy_icons_get_cache_dir(void);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
401
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
402 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
403 * Returns the buddy icon subsystem handle.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
404 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
405 * @return The subsystem handle.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
406 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
407 void *purple_buddy_icons_get_handle(void);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
408
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
409 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
410 * Initializes the buddy icon subsystem.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
411 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
412 void purple_buddy_icons_init(void);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
413
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
414 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
415 * Uninitializes the buddy icon subsystem.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
416 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
417 void purple_buddy_icons_uninit(void);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
418
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
419 /*@}*/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
420
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
421 /**************************************************************************/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
422 /** @name Buddy Icon Helper API */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
423 /**************************************************************************/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
424 /*@{*/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
425
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
426 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
427 * Gets display size for a buddy icon
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
428 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
429 void purple_buddy_icon_get_scale_size(PurpleBuddyIconSpec *spec, int *width, int *height);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
430
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
431 /*@}*/
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
432
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
433 #ifdef __cplusplus
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
434 }
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
435 #endif
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
436
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15374
diff changeset
437 #endif /* _PURPLE_BUDDYICON_H_ */