libpurple/buddyicon.h

Sat, 08 Sep 2007 03:09:35 +0000

author
John Bailey <rekkanoryo@rekkanoryo.org>
date
Sat, 08 Sep 2007 03:09:35 +0000
changeset 19859
71d37b57eff2
parent 18101
3ce21b5a182c
child 20147
66f05a854eee
permissions
-rw-r--r--

The FSF changed its address a while ago; our files were out of date.
This is a quick update done with a for loop, find, and sed.

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
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
5 * purple
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
6 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
7 * 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
8 * 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
9 * source distribution.
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 *
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 * This program is free software; you can redistribute it and/or modify
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * 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
13 * the Free Software Foundation; either version 2 of the License, or
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * (at your option) any later version.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 *
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 * This program is distributed in the hope that it will be useful,
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 * GNU General Public License for more details.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 *
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 * You should have received a copy of the GNU General Public License
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 * 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
23 * 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
24 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
25 #ifndef _PURPLE_BUDDYICON_H_
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
26 #define _PURPLE_BUDDYICON_H_
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
27
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
28 typedef struct _PurpleBuddyIcon PurpleBuddyIcon;
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
29
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
30 #include "account.h"
9718
aeee69c6c784 [gaim-migrate @ 10579]
Mark Doliner <markdoliner@pidgin.im>
parents: 9713
diff changeset
31 #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
32 #include "imgstore.h"
10483
e7b09a8b1f52 [gaim-migrate @ 11773]
Nathan Walp <nwalp@pidgin.im>
parents: 9718
diff changeset
33 #include "prpl.h"
18101
3ce21b5a182c A patch from David Grohmann (dave1g) to log embedded images.
Richard Laager <rlaager@pidgin.im>
parents: 16900
diff changeset
34 #include "util.h"
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
35
14030
23144f1dc950 [gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents: 12323
diff changeset
36 #ifdef __cplusplus
23144f1dc950 [gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents: 12323
diff changeset
37 extern "C" {
23144f1dc950 [gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents: 12323
diff changeset
38 #endif
23144f1dc950 [gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents: 12323
diff changeset
39
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
40
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
41 /**************************************************************************/
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
42 /** @name Buddy Icon API */
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
43 /**************************************************************************/
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
44 /*@{*/
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
45
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
46 /**
16437
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
47 * Creates a new buddy icon structure and populate 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
48 *
f9218e1c4703 The buddy icon code as it stands, with lots of bugs and design flaws.
Richard Laager <rlaager@pidgin.im>
parents: 15997
diff changeset
49 * 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
50 * which will have been updated with the data supplied.
6846
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 * @param account The account the user is on.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
53 * @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
54 * @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
55 * @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
56 * @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
57 *
16900
e9f12eb06c5b Rework purple_buddy_icons_find() to return a reference for the caller, which
Richard Laager <rlaager@pidgin.im>
parents: 16677
diff changeset
58 * @return The buddy icon structure, with a reference for the caller.
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
59 */
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 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
61 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
62 const char *checksum);
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
63
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
64 /**
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
65 * Increments the reference count on a buddy icon.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
66 *
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
67 * @param icon The buddy icon.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
68 *
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
69 * @return @a icon.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
70 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
71 PurpleBuddyIcon *purple_buddy_icon_ref(PurpleBuddyIcon *icon);
6846
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 /**
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
74 * Decrements the reference count on a buddy icon.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
75 *
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
76 * If the reference count reaches 0, the icon will be destroyed.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
77 *
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
78 * @param icon The buddy icon.
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 * @return @a icon, or @c NULL if the reference count reached 0.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
81 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
82 PurpleBuddyIcon *purple_buddy_icon_unref(PurpleBuddyIcon *icon);
6846
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 /**
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
85 * Updates every instance of this icon.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
86 *
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
87 * @param icon The buddy icon.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
88 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
89 void purple_buddy_icon_update(PurpleBuddyIcon *icon);
6846
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 /**
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
92 * Sets the buddy icon's data.
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
93 *
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
94 * @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
95 * @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
96 * 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
97 * @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
98 * @param checksum A protocol checksum from the prpl or @c NULL.
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
99 */
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
100 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
101 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
102 size_t len, const char *checksum);
15132
672c39839af1 [gaim-migrate @ 17854]
Mark Huetsch <markhuetsch@users.sourceforge.net>
parents: 14254
diff changeset
103
672c39839af1 [gaim-migrate @ 17854]
Mark Huetsch <markhuetsch@users.sourceforge.net>
parents: 14254
diff changeset
104 /**
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
105 * Returns the buddy icon's account.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
106 *
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
107 * @param icon The buddy icon.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
108 *
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
109 * @return The account.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
110 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
111 PurpleAccount *purple_buddy_icon_get_account(const PurpleBuddyIcon *icon);
6846
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 /**
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
114 * Returns the buddy icon's username.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
115 *
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
116 * @param icon The buddy icon.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
117 *
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
118 * @return The username.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
119 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
120 const char *purple_buddy_icon_get_username(const PurpleBuddyIcon *icon);
6846
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 /**
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
123 * 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
124 *
2ab9e23f99d9 Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@pidgin.im>
parents: 16437
diff changeset
125 * 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
126 *
2ab9e23f99d9 Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@pidgin.im>
parents: 16437
diff changeset
127 * @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
128 *
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 * @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
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 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
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 /**
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
134 * Returns the buddy icon's data.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
135 *
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
136 * @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
137 * @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
138 * set in the location pointed to by this.
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
139 *
16437
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
140 * @return A pointer to the icon data.
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
141 */
16437
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
142 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
143
10953
e5987ea70985 [gaim-migrate @ 12753]
Richard Laager <rlaager@pidgin.im>
parents: 10483
diff changeset
144 /**
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
145 * 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
146 *
15132
672c39839af1 [gaim-migrate @ 17854]
Mark Huetsch <markhuetsch@users.sourceforge.net>
parents: 14254
diff changeset
147 * @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
148 *
16437
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
149 * @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
150 * the image data has disappeared.
10953
e5987ea70985 [gaim-migrate @ 12753]
Richard Laager <rlaager@pidgin.im>
parents: 10483
diff changeset
151 */
16437
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
152 const char *purple_buddy_icon_get_extension(const PurpleBuddyIcon *icon);
10953
e5987ea70985 [gaim-migrate @ 12753]
Richard Laager <rlaager@pidgin.im>
parents: 10483
diff changeset
153
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
154 /**
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
155 * 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
156 *
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
157 * 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
158 * 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
159 *
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 * 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
161 * 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
162 * 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
163 *
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 * @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
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 * @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
167 */
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 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
169
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
170 /*@}*/
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
171
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
172 /**************************************************************************/
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
173 /** @name Buddy Icon Subsystem API */
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
174 /**************************************************************************/
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
175 /*@{*/
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 * Sets a buddy icon for a user.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
179 *
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
180 * @param account The account the user is on.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
181 * @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
182 * @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
183 * takes ownership of and will free.
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
184 * @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
185 * @param checksum A protocol checksum from the prpl or @c NULL.
15132
672c39839af1 [gaim-migrate @ 17854]
Mark Huetsch <markhuetsch@users.sourceforge.net>
parents: 14254
diff changeset
186 *
672c39839af1 [gaim-migrate @ 17854]
Mark Huetsch <markhuetsch@users.sourceforge.net>
parents: 14254
diff changeset
187 * @return The buddy icon set, or NULL if no icon was set.
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
188 */
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
189 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
190 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
191 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
192 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
193
2ab9e23f99d9 Move the prpl icon checksum code into the core, so we can delete the
Richard Laager <rlaager@pidgin.im>
parents: 16437
diff changeset
194 /**
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 * 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
196 *
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 * 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
198 * 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
199 *
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 * @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
201 *
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 * @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
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 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
205 purple_buddy_icons_get_checksum_for_user(PurpleBuddy *buddy);
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
206
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
207 /**
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
208 * Returns the buddy icon information for a user.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
209 *
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
210 * @param account The account the user is on.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
211 * @param username The username of the user.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
212 *
16900
e9f12eb06c5b Rework purple_buddy_icons_find() to return a reference for the caller, which
Richard Laager <rlaager@pidgin.im>
parents: 16677
diff changeset
213 * @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
214 * not found.
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
215 */
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
216 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
217 purple_buddy_icons_find(PurpleAccount *account, const char *username);
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
218
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
219 /**
16437
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
220 * Returns a boolean indicating if a given contact has a custom buddy icon.
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
221 *
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
222 * @param contact The contact
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
223 *
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
224 * @return A boolean indicating if @a contact has a custom buddy icon.
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
225 */
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
226 gboolean
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
227 purple_buddy_icons_has_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
228
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
229 /**
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
230 * 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
231 *
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 * 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
233 * 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
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 * 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
236 * 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
237 * 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
238 *
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 * @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
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 * @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
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 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
244 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
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 /**
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 * 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
248 *
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 * 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
250 * 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
251 *
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 * @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
253 * @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
254 * 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
255 * @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
256 *
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 * @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
258 * 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
259 * 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
260 */
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
261 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
262 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
263 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
264
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
265 /**
16677
7cd57586cdbf The OSCAR timestamp stuff.
Richard Laager <rlaager@pidgin.im>
parents: 16539
diff changeset
266 * Returns the timestamp of when the icon was set.
7cd57586cdbf The OSCAR timestamp stuff.
Richard Laager <rlaager@pidgin.im>
parents: 16539
diff changeset
267 *
7cd57586cdbf The OSCAR timestamp stuff.
Richard Laager <rlaager@pidgin.im>
parents: 16539
diff changeset
268 * 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
269 * buddy icon update reasons.
7cd57586cdbf The OSCAR timestamp stuff.
Richard Laager <rlaager@pidgin.im>
parents: 16539
diff changeset
270 *
7cd57586cdbf The OSCAR timestamp stuff.
Richard Laager <rlaager@pidgin.im>
parents: 16539
diff changeset
271 * @param account The account
7cd57586cdbf The OSCAR timestamp stuff.
Richard Laager <rlaager@pidgin.im>
parents: 16539
diff changeset
272 *
7cd57586cdbf The OSCAR timestamp stuff.
Richard Laager <rlaager@pidgin.im>
parents: 16539
diff changeset
273 * @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
274 */
7cd57586cdbf The OSCAR timestamp stuff.
Richard Laager <rlaager@pidgin.im>
parents: 16539
diff changeset
275 time_t
7cd57586cdbf The OSCAR timestamp stuff.
Richard Laager <rlaager@pidgin.im>
parents: 16539
diff changeset
276 purple_buddy_icons_get_account_icon_timestamp(PurpleAccount *account);
7cd57586cdbf The OSCAR timestamp stuff.
Richard Laager <rlaager@pidgin.im>
parents: 16539
diff changeset
277
7cd57586cdbf The OSCAR timestamp stuff.
Richard Laager <rlaager@pidgin.im>
parents: 16539
diff changeset
278 /**
16437
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
279 * Returns the custom buddy icon image for a contact.
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
280 *
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
281 * 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
282 * 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
283 *
16437
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
284 * 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
285 * 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
286 * 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
287 *
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
288 * @param contact The contact
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
289 *
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
290 * @return The custom buddy icon image.
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
291 */
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
292 PurpleStoredImage *
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
293 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
294
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
295 /**
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
296 * Sets a custom buddy icon for a user.
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
297 *
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
298 * This function will deal with saving a record of the icon,
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
299 * caching the data, etc.
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
300 *
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
301 * @param contact The contact for which to set a 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
302 * @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
303 * buddy icon code will free.
16437
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
304 * @param icon_len The length of the data in @a icon_data.
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
305 *
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
306 * @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
307 * 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
308 * if it wants one.
16437
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
309 */
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
310 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
311 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
312 guchar *icon_data, size_t icon_len);
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
313
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16421
diff changeset
314 /**
6886
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
315 * Sets whether or not buddy icon caching is enabled.
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
316 *
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
317 * @param caching TRUE of buddy icon caching should be enabled, or
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
318 * FALSE otherwise.
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
319 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
320 void purple_buddy_icons_set_caching(gboolean caching);
6886
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
321
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
322 /**
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
323 * Returns whether or not buddy icon caching should be enabled.
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
324 *
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
325 * 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
326 * purple_buddy_icons_set_caching().
6886
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
327 *
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
328 * @return TRUE if buddy icon caching is enabled, or FALSE otherwise.
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
329 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
330 gboolean purple_buddy_icons_is_caching(void);
6886
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
331
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
332 /**
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
333 * Sets the directory used to store buddy icon cache files.
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
334 *
7114
6e5e4e674496 [gaim-migrate @ 7681]
Christian Hammond <chipx86@chipx86.com>
parents: 6886
diff changeset
335 * @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
336 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
337 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
338
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
339 /**
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
340 * Returns the directory used to store buddy icon cache files.
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
341 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
342 * 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
343 * by purple_buddy_icons_set_cache_dir().
6886
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
344 *
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
345 * @return The directory to store buddy icon cache files to.
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
346 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
347 const char *purple_buddy_icons_get_cache_dir(void);
6886
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
348
97734a57c0f5 [gaim-migrate @ 7432]
Christian Hammond <chipx86@chipx86.com>
parents: 6869
diff changeset
349 /**
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
350 * Returns the buddy icon subsystem handle.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
351 *
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
352 * @return The subsystem handle.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
353 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
354 void *purple_buddy_icons_get_handle(void);
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
355
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
356 /**
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
357 * Initializes the buddy icon subsystem.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
358 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
359 void purple_buddy_icons_init(void);
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
360
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
361 /**
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
362 * Uninitializes the buddy icon subsystem.
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
363 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
364 void purple_buddy_icons_uninit(void);
6846
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
365
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
366 /*@}*/
f814f02dca87 [gaim-migrate @ 7391]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
367
10483
e7b09a8b1f52 [gaim-migrate @ 11773]
Nathan Walp <nwalp@pidgin.im>
parents: 9718
diff changeset
368 /**************************************************************************/
e7b09a8b1f52 [gaim-migrate @ 11773]
Nathan Walp <nwalp@pidgin.im>
parents: 9718
diff changeset
369 /** @name Buddy Icon Helper API */
e7b09a8b1f52 [gaim-migrate @ 11773]
Nathan Walp <nwalp@pidgin.im>
parents: 9718
diff changeset
370 /**************************************************************************/
e7b09a8b1f52 [gaim-migrate @ 11773]
Nathan Walp <nwalp@pidgin.im>
parents: 9718
diff changeset
371 /*@{*/
e7b09a8b1f52 [gaim-migrate @ 11773]
Nathan Walp <nwalp@pidgin.im>
parents: 9718
diff changeset
372
e7b09a8b1f52 [gaim-migrate @ 11773]
Nathan Walp <nwalp@pidgin.im>
parents: 9718
diff changeset
373 /**
e7b09a8b1f52 [gaim-migrate @ 11773]
Nathan Walp <nwalp@pidgin.im>
parents: 9718
diff changeset
374 * Gets display size for a buddy icon
e7b09a8b1f52 [gaim-migrate @ 11773]
Nathan Walp <nwalp@pidgin.im>
parents: 9718
diff changeset
375 */
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
376 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
377
e7b09a8b1f52 [gaim-migrate @ 11773]
Nathan Walp <nwalp@pidgin.im>
parents: 9718
diff changeset
378 /*@}*/
e7b09a8b1f52 [gaim-migrate @ 11773]
Nathan Walp <nwalp@pidgin.im>
parents: 9718
diff changeset
379
14030
23144f1dc950 [gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents: 12323
diff changeset
380 #ifdef __cplusplus
23144f1dc950 [gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents: 12323
diff changeset
381 }
23144f1dc950 [gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents: 12323
diff changeset
382 #endif
23144f1dc950 [gaim-migrate @ 16525]
Mark Doliner <markdoliner@pidgin.im>
parents: 12323
diff changeset
383
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15435
diff changeset
384 #endif /* _PURPLE_BUDDYICON_H_ */

mercurial