libpurple/buddyicon.h

Mon, 07 Sep 2009 19:33:39 +0000

author
Marcus Lundblad <malu@pidgin.im>
date
Mon, 07 Sep 2009 19:33:39 +0000
changeset 28526
c1076c05206b
parent 27577
d7f7de10c6c2
child 32305
a25406fdaaf5
permissions
-rw-r--r--

merge of '6942d82d575944b6f6c28653bde5673c80f15bb5'
and '71cb694c7b56ef35b47abdd013200f7127c36198'

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

mercurial