Mercurial > pidgin.yaz
comparison libpurple/ft.h @ 30197:3882d419e628
Added a skeleton for functions to set and get a thumbnail image associated
with a file transfer and provision for a UI op to let a UI "manufacture"
a thumbnail.
Refs #9476
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Tue, 23 Jun 2009 21:33:10 +0000 |
parents | b99d6d21cd79 |
children | 52cb819c6668 |
comparison
equal
deleted
inserted
replaced
27229:ef9e68020265 | 30197:3882d419e628 |
---|---|
74 void (*destroy)(PurpleXfer *xfer); | 74 void (*destroy)(PurpleXfer *xfer); |
75 void (*add_xfer)(PurpleXfer *xfer); | 75 void (*add_xfer)(PurpleXfer *xfer); |
76 void (*update_progress)(PurpleXfer *xfer, double percent); | 76 void (*update_progress)(PurpleXfer *xfer, double percent); |
77 void (*cancel_local)(PurpleXfer *xfer); | 77 void (*cancel_local)(PurpleXfer *xfer); |
78 void (*cancel_remote)(PurpleXfer *xfer); | 78 void (*cancel_remote)(PurpleXfer *xfer); |
79 void (*add_thumbnail)(PurpleXfer *xfer); | |
79 | 80 |
80 void (*_purple_reserved1)(void); | 81 void (*_purple_reserved1)(void); |
81 void (*_purple_reserved2)(void); | 82 void (*_purple_reserved2)(void); |
82 void (*_purple_reserved3)(void); | 83 void (*_purple_reserved3)(void); |
83 void (*_purple_reserved4)(void); | |
84 } PurpleXferUiOps; | 84 } PurpleXferUiOps; |
85 | 85 |
86 /** | 86 /** |
87 * A core representation of a file transfer. | 87 * A core representation of a file transfer. |
88 */ | 88 */ |
137 | 137 |
138 PurpleXferUiOps *ui_ops; /**< UI-specific operations. */ | 138 PurpleXferUiOps *ui_ops; /**< UI-specific operations. */ |
139 void *ui_data; /**< UI-specific data. */ | 139 void *ui_data; /**< UI-specific data. */ |
140 | 140 |
141 void *data; /**< prpl-specific data. */ | 141 void *data; /**< prpl-specific data. */ |
142 | |
143 gpointer thumbnail_data; /**< thumbnail image */ | |
144 gsize thumbnail_size; | |
142 }; | 145 }; |
143 | 146 |
144 #ifdef __cplusplus | 147 #ifdef __cplusplus |
145 extern "C" { | 148 extern "C" { |
146 #endif | 149 #endif |
615 * @param message The message to display. | 618 * @param message The message to display. |
616 * @param is_error Is this an error message?. | 619 * @param is_error Is this an error message?. |
617 */ | 620 */ |
618 void purple_xfer_conversation_write(PurpleXfer *xfer, char *message, gboolean is_error); | 621 void purple_xfer_conversation_write(PurpleXfer *xfer, char *message, gboolean is_error); |
619 | 622 |
623 /** | |
624 * Gets the thumbnail data for a transfer | |
625 * | |
626 * @param xfer The file transfer to get the thumbnail for | |
627 * @return The thumbnail data, or NULL if there is no thumbnail | |
628 */ | |
629 const void *purple_xfer_get_thumbnail_data(const PurpleXfer *xfer); | |
630 | |
631 /** | |
632 * Gets the thumbnail size for a transfer | |
633 * | |
634 * @param xfer The file transfer to get the thumbnail size for | |
635 * @return The size, in bytes of the file transfer's thumbnail | |
636 */ | |
637 gsize purple_xfer_get_thumbnail_size(const PurpleXfer *xfer); | |
638 | |
639 | |
640 /** | |
641 * Sets the thumbnail data for a transfer | |
642 * | |
643 * @param xfer The file transfer to set the data for | |
644 * @param thumbnail A pointer to the thumbnail data, this will be copied | |
645 * @param size The size in bytes of the passed in thumbnail data | |
646 */ | |
647 void purple_xfer_set_thumbnail(PurpleXfer *xfer, gconstpointer thumbnail, | |
648 gsize size); | |
649 | |
650 /** | |
651 * Prepare a thumbnail for a transfer (if the UI supports it) | |
652 * will be no-op in case the UI doesn't implement thumbnail creation | |
653 * | |
654 * @param xfer The file transfer to create a thumbnail for | |
655 */ | |
656 void purple_xfer_prepare_thumbnail(PurpleXfer *xfer); | |
657 | |
620 /*@}*/ | 658 /*@}*/ |
621 | 659 |
622 /**************************************************************************/ | 660 /**************************************************************************/ |
623 /** @name UI Registration Functions */ | 661 /** @name UI Registration Functions */ |
624 /**************************************************************************/ | 662 /**************************************************************************/ |