Mercurial > pidgin
changeset 31972:c0a423e7fea4
Add accessor functions purple_conversation_get_ui_data() and purple_conversation_set_ui_data().
author | andrew.victor@mxit.com |
---|---|
date | Fri, 26 Aug 2011 20:51:39 +0000 |
parents | ecfbb3ba0135 |
children | 49a33bd1baf1 |
files | ChangeLog.API libpurple/conversation.c libpurple/conversation.h |
diffstat | 3 files changed, 36 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog.API Fri Aug 26 20:29:23 2011 +0000 +++ b/ChangeLog.API Fri Aug 26 20:51:39 2011 +0000 @@ -19,6 +19,8 @@ * purple_xfer_set_protocol_data * purple_xfer_get_ui_data * purple_xfer_set_ui_data + * purple_conversation_get_ui_data + * purple_conversation_set_ui_data Changed: * purple_connection_error now takes a PurpleConnectionError
--- a/libpurple/conversation.c Fri Aug 26 20:29:23 2011 +0000 +++ b/libpurple/conversation.c Fri Aug 26 20:51:39 2011 +0000 @@ -2323,6 +2323,21 @@ return msg->when; } +void purple_conversation_set_ui_data(PurpleConversation *conv, gpointer ui_data) +{ + g_return_if_fail(conv != NULL); + + conv->ui_data = ui_data; +} + +gpointer purple_conversation_get_ui_data(PurpleConversation *conv) +{ + g_return_val_if_fail(conv != NULL, NULL); + + return conv->ui_data; +} + + gboolean purple_conversation_do_command(PurpleConversation *conv, const gchar *cmdline, const gchar *markup, gchar **error)
--- a/libpurple/conversation.h Fri Aug 26 20:29:23 2011 +0000 +++ b/libpurple/conversation.h Fri Aug 26 20:51:39 2011 +0000 @@ -802,6 +802,25 @@ */ time_t purple_conversation_message_get_timestamp(PurpleConvMessage *msg); +/** + * Set the UI data associated with this conversation. + * + * @param conv The conversation. + * @param ui_data A pointer to associate with this conversation. + */ +void purple_conversation_set_ui_data(PurpleConversation *conv, gpointer ui_data); + +/** + * Get the UI data associated with this conversation. + * + * @param conv The conversation. + * + * @return The UI data associated with this conversation. This is a + * convenience field provided to the UIs--it is not + * used by the libpurple core. + */ +gpointer purple_conversation_get_ui_data(PurpleConversation *conv); + /*@}*/