comparison libpurple/ft.h @ 29820:0fe92a64771d

propagate from branch 'im.pidgin.pidgin' (head a9876c2b74baddb4b0fd99eede7daef1d346604b) to branch 'im.pidgin.cpw.malu.ft_thumbnails' (head d743e98354f375947f68cf4e770a48bb0593b0b5)
author Marcus Lundblad <ml@update.uu.se>
date Wed, 10 Mar 2010 05:40:47 +0000
parents b0f1698c52f8
children 25a53c299713
comparison
equal deleted inserted replaced
29574:eb300dde8113 29820:0fe92a64771d
118 * 118 *
119 * @since 2.6.0 119 * @since 2.6.0
120 */ 120 */
121 void (*data_not_sent)(PurpleXfer *xfer, const guchar *buffer, gsize size); 121 void (*data_not_sent)(PurpleXfer *xfer, const guchar *buffer, gsize size);
122 122
123 void (*_purple_reserved1)(void); 123 /**
124 * Op to create a thumbnail image for a file transfer
125 *
126 * @param xfer The file transfer structure
127 */
128 void (*add_thumbnail)(PurpleXfer *xfer);
124 } PurpleXferUiOps; 129 } PurpleXferUiOps;
125 130
126 /** 131 /**
127 * A core representation of a file transfer. 132 * A core representation of a file transfer.
128 */ 133 */
179 184
180 PurpleXferUiOps *ui_ops; /**< UI-specific operations. */ 185 PurpleXferUiOps *ui_ops; /**< UI-specific operations. */
181 void *ui_data; /**< UI-specific data. */ 186 void *ui_data; /**< UI-specific data. */
182 187
183 void *data; /**< prpl-specific data. */ 188 void *data; /**< prpl-specific data. */
189
190 gpointer thumbnail_data; /**< thumbnail image */
191 gsize thumbnail_size;
184 }; 192 };
185 193
186 #ifdef __cplusplus 194 #ifdef __cplusplus
187 extern "C" { 195 extern "C" {
188 #endif 196 #endif
685 * 693 *
686 * @since 2.6.0 694 * @since 2.6.0
687 */ 695 */
688 void purple_xfer_prpl_ready(PurpleXfer *xfer); 696 void purple_xfer_prpl_ready(PurpleXfer *xfer);
689 697
698 /**
699 * Gets the thumbnail data for a transfer
700 *
701 * @param xfer The file transfer to get the thumbnail for
702 * @return The thumbnail data, or NULL if there is no thumbnail
703 */
704 const void *purple_xfer_get_thumbnail_data(const PurpleXfer *xfer);
705
706 /**
707 * Gets the thumbnail size for a transfer
708 *
709 * @param xfer The file transfer to get the thumbnail size for
710 * @return The size, in bytes of the file transfer's thumbnail
711 */
712 gsize purple_xfer_get_thumbnail_size(const PurpleXfer *xfer);
713
714
715 /**
716 * Sets the thumbnail data for a transfer
717 *
718 * @param xfer The file transfer to set the data for
719 * @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
721 */
722 void purple_xfer_set_thumbnail(PurpleXfer *xfer, gconstpointer thumbnail,
723 gsize size);
724
725 /**
726 * 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
728 *
729 * @param xfer The file transfer to create a thumbnail for
730 */
731 void purple_xfer_prepare_thumbnail(PurpleXfer *xfer);
732
733
690 /*@}*/ 734 /*@}*/
691 735
692 /**************************************************************************/ 736 /**************************************************************************/
693 /** @name UI Registration Functions */ 737 /** @name UI Registration Functions */
694 /**************************************************************************/ 738 /**************************************************************************/