diff src/conversation.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 41120df7ed94
children 083d1e4a9c78
line wrap: on
line diff
--- a/src/conversation.h	Mon Sep 15 02:23:58 2003 +0000
+++ b/src/conversation.h	Mon Sep 15 07:35:49 2003 +0000
@@ -82,7 +82,8 @@
 	 */
 	GAIM_CONV_ACCOUNT_ONLINE,  /**< One of the user's accounts went online.  */
 	GAIM_CONV_ACCOUNT_OFFLINE, /**< One of the user's accounts went offline. */
-	GAIM_CONV_UPDATE_AWAY      /**< The other user went away.                */
+	GAIM_CONV_UPDATE_AWAY,     /**< The other user went away.                */
+	GAIM_CONV_UPDATE_ICON      /**< The other user's buddy icon changed.     */
 
 } GaimConvUpdateType;
 
@@ -110,9 +111,11 @@
 	GAIM_MESSAGE_NICK      = 0x0020, /**< Contains your nick.   */
 	GAIM_MESSAGE_NO_LOG    = 0x0040, /**< Do not log.           */
 	GAIM_MESSAGE_WHISPER   = 0x0080  /**< Whispered message.    */
+
 } GaimMessageFlags;
 
 #include "account.h"
+#include "buddyicon.h"
 #include "server.h"
 
 /**
@@ -198,6 +201,8 @@
 	guint  type_again_timeout;         /**< The type again timer handle. */
 
 	GSList *images;                    /**< A list of images in the IM.  */
+
+	GaimBuddyIcon *icon;               /**< The buddy icon.              */
 };
 
 /**
@@ -804,6 +809,28 @@
 GaimConversation *gaim_im_get_conversation(const GaimIm *im);
 
 /**
+ * Sets the IM's buddy icon.
+ *
+ * This should only be called from within Gaim. You probably want to
+ * call gaim_buddy_icon_set_data().
+ *
+ * @param im   The IM.
+ * @param icon The buddy icon.
+ *
+ * @see gaim_buddy_icon_set_data()
+ */
+void gaim_im_set_icon(GaimIm *im, GaimBuddyIcon *icon);
+
+/**
+ * Returns the IM's buddy icon.
+ *
+ * @param im The IM.
+ *
+ * @return The buddy icon.
+ */
+GaimBuddyIcon *gaim_im_get_icon(const GaimIm *im);
+
+/**
  * Sets the IM's typing state.
  *
  * @param im    The IM.