diff libpurple/prpl.h @ 29822:25a53c299713

Allow PRPLs to specify the image formats acceptable for thumbnails (in preferred order).
author Marcus Lundblad <ml@update.uu.se>
date Mon, 15 Mar 2010 21:49:02 +0000
parents 9f6a657af957
children 79bb2804a19e
line wrap: on
line diff
--- a/libpurple/prpl.h	Sun Mar 14 21:20:14 2010 +0000
+++ b/libpurple/prpl.h	Mon Mar 15 21:49:02 2010 +0000
@@ -52,6 +52,13 @@
 typedef struct _PurpleBuddyIconSpec PurpleBuddyIconSpec;
 
 /**
+ * A description of a file transfer thumbnail specification.
+ * This tells the UI if and what image formats the prpl support for file
+ * transfer thumbnails.
+ */
+typedef struct _PurpleThumbnailSpec PurpleThumbnailSpec;
+
+/**
  * This \#define exists just to make it easier to fill out the buddy icon
  * field in the prpl info struct for protocols that couldn't care less.
  */
@@ -91,6 +98,14 @@
 	PurpleIconScaleRules scale_rules;  /**< How to stretch this icon */
 };
 
+/** @copydoc PurpleThumbnailSpec */
+struct _PurpleThumbnailSpec {
+	/** This is a comma-delimited list of image formats or @c NULL if the
+	 *  prpl does not support file transfer thumbnails
+	 */
+	char *format;
+};
+	
 /** Represents an entry containing information that must be supplied by the
  *  user when joining a chat.
  */
@@ -575,6 +590,11 @@
 	 * "mood" set to @c NULL.
 	 */
 	PurpleMood *(*get_moods)(PurpleAccount *account);
+
+	/**
+	 * File transfer thumbnail spec
+	 */
+	PurpleThumbnailSpec thumbnail_spec;
 };
 
 #define PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl, member) \