diff 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
line wrap: on
line diff
--- a/src/blist.h	Mon Sep 15 02:23:58 2003 +0000
+++ b/src/blist.h	Mon Sep 15 07:35:49 2003 +0000
@@ -36,6 +36,7 @@
 typedef struct _GaimBuddy GaimBuddy;
 
 #include "account.h"
+#include "buddyicon.h"
 
 /**************************************************************************/
 /* Enumerations                                                           */
@@ -96,6 +97,7 @@
 	int idle;                               /**< The time the buddy has been idle in minutes. */
 	int uc;                                 /**< This is a cryptic bitmask that makes sense only to the prpl.  This will get changed */
 	void *proto_data;                       /**< This allows the prpl to associate whatever data it wants with a buddy */
+	GaimBuddyIcon *icon;                    /**< The buddy icon. */
 	GaimAccount *account;           /**< the account this buddy belongs to */
 	GHashTable *settings;                   /**< per-buddy settings from the XML buddy list, set by plugins and the likes. */
 	guint timer;							/**< The timer handle. */
@@ -262,8 +264,6 @@
  */
 void gaim_blist_update_buddy_icon(GaimBuddy *buddy);
 
-
-
 /**
  * Renames a buddy in the buddy list.
  *
@@ -347,6 +347,28 @@
 GaimBuddy *gaim_buddy_new(GaimAccount *account, const char *screenname, const char *alias);
 
 /**
+ * Sets a buddy's icon.
+ *
+ * This should only be called from within Gaim. You probably want to
+ * call gaim_buddy_icon_set_data().
+ *
+ * @param buddy The buddy.
+ * @param icon  The buddy icon.
+ *
+ * @see gaim_buddy_icon_set_data()
+ */
+void gaim_buddy_set_icon(GaimBuddy *buddy, GaimBuddyIcon *icon);
+
+/**
+ * Returns a buddy's icon.
+ *
+ * @param buddy The buddy.
+ *
+ * @return The buddy icon.
+ */
+GaimBuddyIcon *gaim_buddy_get_icon(const GaimBuddy *buddy);
+
+/**
  * Adds a new buddy to the buddy list.
  *
  * The buddy will be inserted right after node or prepended to the