comparison libpurple/ft.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 b0f1698c52f8
children 79bb2804a19e
comparison
equal deleted inserted replaced
29821:bf0cbb79d629 29822:25a53c299713
187 187
188 void *data; /**< prpl-specific data. */ 188 void *data; /**< prpl-specific data. */
189 189
190 gpointer thumbnail_data; /**< thumbnail image */ 190 gpointer thumbnail_data; /**< thumbnail image */
191 gsize thumbnail_size; 191 gsize thumbnail_size;
192 gchar *thumbnail_mimetype;
192 }; 193 };
193 194
194 #ifdef __cplusplus 195 #ifdef __cplusplus
195 extern "C" { 196 extern "C" {
196 #endif 197 #endif
709 * @param xfer The file transfer to get the thumbnail size for 710 * @param xfer The file transfer to get the thumbnail size for
710 * @return The size, in bytes of the file transfer's thumbnail 711 * @return The size, in bytes of the file transfer's thumbnail
711 */ 712 */
712 gsize purple_xfer_get_thumbnail_size(const PurpleXfer *xfer); 713 gsize purple_xfer_get_thumbnail_size(const PurpleXfer *xfer);
713 714
714 715 /**
716 * Gets the mimetype of the thumbnail preview for a transfer
717 *
718 * @param xfer The file transfer to get the mimetype for
719 * @return The mimetype of the thumbnail, or @c NULL if not thumbnail is set
720 */
721 const gchar *purple_xfer_get_thumbnail_mimetype(const PurpleXfer *xfer);
722
723
715 /** 724 /**
716 * Sets the thumbnail data for a transfer 725 * Sets the thumbnail data for a transfer
717 * 726 *
718 * @param xfer The file transfer to set the data for 727 * @param xfer The file transfer to set the data for
719 * @param thumbnail A pointer to the thumbnail data, this will be copied 728 * @param thumbnail A pointer to the thumbnail data, this will be copied
720 * @param size The size in bytes of the passed in thumbnail data 729 * @param size The size in bytes of the passed in thumbnail data
730 * @param mimetype The mimetype of the generated thumbnail
721 */ 731 */
722 void purple_xfer_set_thumbnail(PurpleXfer *xfer, gconstpointer thumbnail, 732 void purple_xfer_set_thumbnail(PurpleXfer *xfer, gconstpointer thumbnail,
723 gsize size); 733 gsize size, const gchar *mimetype);
724 734
725 /** 735 /**
726 * Prepare a thumbnail for a transfer (if the UI supports it) 736 * Prepare a thumbnail for a transfer (if the UI supports it)
727 * will be no-op in case the UI doesn't implement thumbnail creation 737 * will be no-op in case the UI doesn't implement thumbnail creation
728 * 738 *