buddyicon.h
Go to the documentation of this file.
1 
6 /* purple
7  *
8  * Purple is the legal property of its developers, whose names are too numerous
9  * to list here. Please refer to the COPYRIGHT file distributed with this
10  * source distribution.
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License as published by
14  * the Free Software Foundation; either version 2 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * You should have received a copy of the GNU General Public License
23  * along with this program; if not, write to the Free Software
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
25  */
26 #ifndef _PURPLE_BUDDYICON_H_
27 #define _PURPLE_BUDDYICON_H_
28 
34 typedef struct _PurpleBuddyIcon PurpleBuddyIcon;
35 
36 #include "account.h"
37 #include "blist.h"
38 #include "imgstore.h"
39 #include "prpl.h"
40 #include "util.h"
41 
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 
46 
47 /**************************************************************************/
49 /**************************************************************************/
66 PurpleBuddyIcon *purple_buddy_icon_new(PurpleAccount *account, const char *username,
67  void *icon_data, size_t icon_len,
68  const char *checksum);
69 
78 
89 
96 
106 void
107 purple_buddy_icon_set_data(PurpleBuddyIcon *icon, guchar *data,
108  size_t len, const char *checksum);
109 
118 
126 const char *purple_buddy_icon_get_username(const PurpleBuddyIcon *icon);
127 
137 const char *purple_buddy_icon_get_checksum(const PurpleBuddyIcon *icon);
138 
148 gconstpointer purple_buddy_icon_get_data(const PurpleBuddyIcon *icon, size_t *len);
149 
158 const char *purple_buddy_icon_get_extension(const PurpleBuddyIcon *icon);
159 
175 
178 /**************************************************************************/
180 /**************************************************************************/
193 void
194 purple_buddy_icons_set_for_user(PurpleAccount *account, const char *username,
195  void *icon_data, size_t icon_len,
196  const char *checksum);
197 
208 const char *
210 
221 purple_buddy_icons_find(PurpleAccount *account, const char *username);
222 
239 
257  guchar *icon_data, size_t icon_len);
258 
269 time_t
271 
280 gboolean
282 
300 
318  guchar *icon_data, size_t icon_len);
319 
336  const gchar *filename);
337 
338 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_BUDDYICON_C_)
339 
346 gboolean
348 
358 
368  guchar *icon_data, size_t icon_len);
369 #endif
370 
377 void purple_buddy_icons_set_caching(gboolean caching);
378 
387 gboolean purple_buddy_icons_is_caching(void);
388 
394 void purple_buddy_icons_set_cache_dir(const char *cache_dir);
395 
404 const char *purple_buddy_icons_get_cache_dir(void);
405 
412 
416 void purple_buddy_icons_init(void);
417 
421 void purple_buddy_icons_uninit(void);
422 
425 /**************************************************************************/
427 /**************************************************************************/
433 void purple_buddy_icon_get_scale_size(PurpleBuddyIconSpec *spec, int *width, int *height);
434 
437 #ifdef __cplusplus
438 }
439 #endif
440 
441 #endif /* _PURPLE_BUDDYICON_H_ */
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!