changeset 32252:a34977b4d858

Add accessors for _PurpleAccount.ui_data
author Kevin Stange <kevin@simguy.net>
date Sat, 01 Oct 2011 23:41:15 +0000
parents c774000690b4
children 9173ec5a45cf
files ChangeLog.API libpurple/account.c libpurple/account.h
diffstat 3 files changed, 39 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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)
 {
--- 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.