Mercurial > pidgin.yaz
diff src/conversation.h @ 10526:55e7d72fc09a
[gaim-migrate @ 11843]
maquina writes:
This patch implements a custom smiley API, and it also
implements custom smileys for the msn protocol. As it
stands, it is not able to cache custom smileys, and is
not able to redefine a custom smiley without opening a
new conversation.
I modified it quite a bit, and didn't test it at all, so it probably
doesn't work anymore. I'm not quite done with it yet either.
Also, this is just receiving custom smileys.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Tue, 18 Jan 2005 18:31:32 +0000 |
parents | bbf738a0ce7b |
children | c3a964f4fc61 |
line wrap: on
line diff
--- a/src/conversation.h Tue Jan 18 15:36:39 2005 +0000 +++ b/src/conversation.h Tue Jan 18 18:31:32 2005 +0000 @@ -199,6 +199,14 @@ gboolean (*has_focus)(GaimConversation *conv); + /* Custom Smileys */ + gboolean (*custom_smiley_add)(GaimConversation *conv, const char *smile); + void (*custom_smiley_write)(GaimConversation *conv, const char *smile, + const char * data, gint64 size); + void (*custom_smiley_close)(GaimConversation *conv, const char *smile); + + + /* Events */ void (*updated)(GaimConversation *conv, GaimConvUpdateType type); @@ -1033,6 +1041,47 @@ */ void gaim_conv_im_send(GaimConvIm *im, const char *message); +/** + * Adds a smiley to the conversation's smiley tree. + * + * @param conv The conversation to associate the smiley with. + * @param smile The text associated with the smiley + * @param cksum_type The type of checksum. + * @param chksum The checksum, as a NUL terminated base64 string. + * @return @c TRUE if an icon is excepted, else FALSE. Note that + * it is an error to never call gaim_conv_custom_smiley_close if + * this function returns @c TRUE, but an error to call it if + * @c FALSE is returned. + */ + +gboolean gaim_conv_custom_smiley_add(GaimConversation *conv, const char *smile, + const char *cksum_type, const char *chksum); + + +/** + * Updates the image associated with the current smiley. + * + * @param conv The conversation associated with the smiley. + * @param smile The text associated with the smiley. + * @param data The actual image data. + * @param size The length of the data. + */ + +void gaim_conv_custom_smiley_write(GaimConversation *conv, + const char *smile, const char * data, + gint64 size); + +/** + * Close the custom smiley, all data has been written with + * gaim_conv_custom_smiley_write, and it is no longer valid + * to call that function on that smiley. + * + * @param conv The gaim conversation associated with the smiley. + * @param smile The text associated with the smiley + */ + +void gaim_conv_custom_smiley_close(GaimConversation *conv, const char *smile); + /*@}*/