# HG changeset patch # User Kevin Stange # Date 1317512475 0 # Node ID a34977b4d858668cf84e55c49dc94ca6841fafb7 # Parent c774000690b41fa6e32f43864a43c110cf6883e3 Add accessors for _PurpleAccount.ui_data diff -r c774000690b4 -r a34977b4d858 ChangeLog.API --- a/ChangeLog.API Sat Oct 01 23:24:50 2011 +0000 +++ b/ChangeLog.API Sat Oct 01 23:41:15 2011 +0000 @@ -4,6 +4,8 @@ libpurple: Added: * pidgin_create_webview + * purple_account_get_ui_data + * purple_account_set_ui_data * purple_conv_chat_cb_get_alias * purple_conv_chat_cb_get_flags * purple_conv_chat_cb_is_buddy diff -r c774000690b4 -r a34977b4d858 libpurple/account.c --- a/libpurple/account.c Sat Oct 01 23:24:50 2011 +0000 +++ b/libpurple/account.c Sat Oct 01 23:41:15 2011 +0000 @@ -2471,6 +2471,24 @@ return setting->value.boolean; } +gpointer +purple_account_get_ui_data(const PurpleAccount *account) +{ + g_return_val_if_fail(account != NULL, NULL); + + return account->ui_data; +} + +void +purple_request_field_set_ui_data(PurpleAccount *account, + gpointer ui_data) +{ + g_return_if_fail(acount != NULL); + + account->ui_data = ui_data; +} + + PurpleLog * purple_account_get_log(PurpleAccount *account, gboolean create) { diff -r c774000690b4 -r a34977b4d858 libpurple/account.h --- a/libpurple/account.h Sat Oct 01 23:24:50 2011 +0000 +++ b/libpurple/account.h Sat Oct 01 23:41:15 2011 +0000 @@ -603,6 +603,25 @@ const char *name, gboolean value); /** + * Returns the UI data associated with this account. + * + * @param account The account. + * + * @return The UI data associated with this object. This is a + * convenience field provided to the UIs--it is not + * used by the libuprple core. + */ +gpointer purple_account_get_ui_data(const PurpleAccount *account); + +/** + * Set the UI data associated with this account. + * + * @param account The account. + * @param ui_data A pointer to associate with this object. + */ +void purple_account_set_ui_data(PurpleAccount *account, gpointer ui_data); + +/** * Returns whether or not the account is connected. * * @param account The account.