Mercurial > pidgin
comparison src/conversation.c @ 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 | 1a97d5e88d12 |
children | 4829abdc5c35 |
comparison
equal
deleted
inserted
replaced
10525:ddea15f4cbc2 | 10526:55e7d72fc09a |
---|---|
1753 g_return_if_fail(message != NULL); | 1753 g_return_if_fail(message != NULL); |
1754 | 1754 |
1755 common_send(gaim_conv_im_get_conversation(im), message); | 1755 common_send(gaim_conv_im_get_conversation(im), message); |
1756 } | 1756 } |
1757 | 1757 |
1758 gboolean | |
1759 gaim_conv_custom_smiley_add(GaimConversation *conv, const char *smile, | |
1760 const char *cksum_type, const char *chksum) | |
1761 { | |
1762 if (conv == NULL || smile == NULL || !*smile) { | |
1763 return FALSE; | |
1764 } | |
1765 | |
1766 /* TODO: check if the icon is in the cache and return false if so */ | |
1767 /* TODO: add an icon cache (that doesn't suck) */ | |
1768 if (conv->ui_ops != NULL && conv->ui_ops->custom_smiley_add !=NULL) { | |
1769 return conv->ui_ops->custom_smiley_add(conv, smile); | |
1770 } else { | |
1771 gaim_debug_info("conversation", "Could not find add custom smiley function"); | |
1772 return FALSE; | |
1773 } | |
1774 | |
1775 } | |
1776 | |
1777 void | |
1778 gaim_conv_custom_smiley_write(GaimConversation *conv, const char *smile, | |
1779 const char * data, gint64 size) | |
1780 { | |
1781 g_return_if_fail(conv != NULL); | |
1782 g_return_if_fail(smile != NULL && *smile); | |
1783 | |
1784 if (conv->ui_ops != NULL && conv->ui_ops->custom_smiley_write != NULL) | |
1785 conv->ui_ops->custom_smiley_write(conv, smile, data, size); | |
1786 else | |
1787 gaim_debug_info("conversation", "Could not find the smiley write function"); | |
1788 } | |
1789 | |
1790 void | |
1791 gaim_conv_custom_smiley_close(GaimConversation *conv, const char *smile) | |
1792 { | |
1793 g_return_if_fail(conv != NULL); | |
1794 g_return_if_fail(smile != NULL && *smile); | |
1795 | |
1796 if (conv->ui_ops != NULL && conv->ui_ops->custom_smiley_close != NULL) | |
1797 conv->ui_ops->custom_smiley_close(conv, smile); | |
1798 else | |
1799 gaim_debug_info("conversation", "Could not find custom smiley close function"); | |
1800 } | |
1801 | |
1802 | |
1758 /************************************************************************** | 1803 /************************************************************************** |
1759 * Chat Conversation API | 1804 * Chat Conversation API |
1760 **************************************************************************/ | 1805 **************************************************************************/ |
1761 | 1806 |
1762 GaimConversation * | 1807 GaimConversation * |