Mercurial > pidgin
comparison src/blist.h @ 6846:8ab95f4c9800
[gaim-migrate @ 7391]
Added new buddy icon caching code. Each GaimBuddy has its own icon, and the
complete list of all icons is now stored in a set of hashtables for quick
retrieval. Buddy icons now live much happier in the core, with the magma
and tooth fairies (that's where they really live).
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Mon, 15 Sep 2003 07:35:49 +0000 |
parents | 549a0bbbf73d |
children | dd0eecfbe413 |
comparison
equal
deleted
inserted
replaced
6845:5de4d9a4e0e2 | 6846:8ab95f4c9800 |
---|---|
34 typedef struct _GaimGroup GaimGroup; | 34 typedef struct _GaimGroup GaimGroup; |
35 typedef struct _GaimContact GaimContact; | 35 typedef struct _GaimContact GaimContact; |
36 typedef struct _GaimBuddy GaimBuddy; | 36 typedef struct _GaimBuddy GaimBuddy; |
37 | 37 |
38 #include "account.h" | 38 #include "account.h" |
39 #include "buddyicon.h" | |
39 | 40 |
40 /**************************************************************************/ | 41 /**************************************************************************/ |
41 /* Enumerations */ | 42 /* Enumerations */ |
42 /**************************************************************************/ | 43 /**************************************************************************/ |
43 enum gaim_blist_node_type { | 44 enum gaim_blist_node_type { |
94 int evil; /**< The warning level */ | 95 int evil; /**< The warning level */ |
95 time_t signon; /**< The time the buddy signed on. */ | 96 time_t signon; /**< The time the buddy signed on. */ |
96 int idle; /**< The time the buddy has been idle in minutes. */ | 97 int idle; /**< The time the buddy has been idle in minutes. */ |
97 int uc; /**< This is a cryptic bitmask that makes sense only to the prpl. This will get changed */ | 98 int uc; /**< This is a cryptic bitmask that makes sense only to the prpl. This will get changed */ |
98 void *proto_data; /**< This allows the prpl to associate whatever data it wants with a buddy */ | 99 void *proto_data; /**< This allows the prpl to associate whatever data it wants with a buddy */ |
100 GaimBuddyIcon *icon; /**< The buddy icon. */ | |
99 GaimAccount *account; /**< the account this buddy belongs to */ | 101 GaimAccount *account; /**< the account this buddy belongs to */ |
100 GHashTable *settings; /**< per-buddy settings from the XML buddy list, set by plugins and the likes. */ | 102 GHashTable *settings; /**< per-buddy settings from the XML buddy list, set by plugins and the likes. */ |
101 guint timer; /**< The timer handle. */ | 103 guint timer; /**< The timer handle. */ |
102 }; | 104 }; |
103 | 105 |
260 * | 262 * |
261 * @param buddy The buddy whose buddy icon has changed | 263 * @param buddy The buddy whose buddy icon has changed |
262 */ | 264 */ |
263 void gaim_blist_update_buddy_icon(GaimBuddy *buddy); | 265 void gaim_blist_update_buddy_icon(GaimBuddy *buddy); |
264 | 266 |
265 | |
266 | |
267 /** | 267 /** |
268 * Renames a buddy in the buddy list. | 268 * Renames a buddy in the buddy list. |
269 * | 269 * |
270 * @param buddy The buddy whose name will be changed. | 270 * @param buddy The buddy whose name will be changed. |
271 * @param name The new name of the buddy. | 271 * @param name The new name of the buddy. |
345 * @return A newly allocated buddy | 345 * @return A newly allocated buddy |
346 */ | 346 */ |
347 GaimBuddy *gaim_buddy_new(GaimAccount *account, const char *screenname, const char *alias); | 347 GaimBuddy *gaim_buddy_new(GaimAccount *account, const char *screenname, const char *alias); |
348 | 348 |
349 /** | 349 /** |
350 * Sets a buddy's icon. | |
351 * | |
352 * This should only be called from within Gaim. You probably want to | |
353 * call gaim_buddy_icon_set_data(). | |
354 * | |
355 * @param buddy The buddy. | |
356 * @param icon The buddy icon. | |
357 * | |
358 * @see gaim_buddy_icon_set_data() | |
359 */ | |
360 void gaim_buddy_set_icon(GaimBuddy *buddy, GaimBuddyIcon *icon); | |
361 | |
362 /** | |
363 * Returns a buddy's icon. | |
364 * | |
365 * @param buddy The buddy. | |
366 * | |
367 * @return The buddy icon. | |
368 */ | |
369 GaimBuddyIcon *gaim_buddy_get_icon(const GaimBuddy *buddy); | |
370 | |
371 /** | |
350 * Adds a new buddy to the buddy list. | 372 * Adds a new buddy to the buddy list. |
351 * | 373 * |
352 * The buddy will be inserted right after node or prepended to the | 374 * The buddy will be inserted right after node or prepended to the |
353 * group if node is NULL. If both are NULL, the buddy will be added to | 375 * group if node is NULL. If both are NULL, the buddy will be added to |
354 * the "Buddies" group. | 376 * the "Buddies" group. |