changeset 30149:b983db2b01f5

Add getter and setter for account->perm_deny. Patch by Stephen Whitmore. Fixes #11656
author Mark Doliner <mark@kingant.net>
date Fri, 16 Apr 2010 07:35:11 +0000
parents 787d82881a3e
children 4e5cfb6ad471
files COPYRIGHT ChangeLog.API libpurple/account.c libpurple/account.h
diffstat 4 files changed, 36 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Fri Apr 16 01:59:16 2010 +0000
+++ b/COPYRIGHT	Fri Apr 16 07:35:11 2010 +0000
@@ -530,6 +530,7 @@
 Zac West
 Daniel Westermann-Clark
 Andrew Whewell
+Stephen Whitmore
 Simon Wilkinson
 Dan Willemsen
 Justin Williams (Jaywalker)
--- a/ChangeLog.API	Fri Apr 16 01:59:16 2010 +0000
+++ b/ChangeLog.API	Fri Apr 16 07:35:11 2010 +0000
@@ -8,6 +8,8 @@
 		   * account-signed-off
 		   * account-connection-error
 		* purple_account_get_name_for_display
+		* purple_account_get_privacy_type
+		* purple_account_set_privacy_type
 		* purple_buddy_get_media_caps
 		* purple_buddy_set_media_caps
 		* purple_contact_get_group
--- a/libpurple/account.c	Fri Apr 16 01:59:16 2010 +0000
+++ b/libpurple/account.c	Fri Apr 16 07:35:11 2010 +0000
@@ -1709,6 +1709,14 @@
 }
 
 void
+purple_account_set_privacy_type(PurpleAccount *account, PurplePrivacyType privacy_type)
+{
+	g_return_if_fail(account != NULL);
+
+	account->perm_deny = privacy_type;
+}
+
+void
 purple_account_set_status_types(PurpleAccount *account, GList *status_types)
 {
 	g_return_if_fail(account != NULL);
@@ -2105,6 +2113,14 @@
 	return account->proxy_info;
 }
 
+PurplePrivacyType
+purple_account_get_privacy_type(const PurpleAccount *account)
+{
+	g_return_val_if_fail(account != NULL, PURPLE_PRIVACY_ALLOW_ALL);
+
+	return account->perm_deny;
+}
+
 PurpleStatus *
 purple_account_get_active_status(const PurpleAccount *account)
 {
--- a/libpurple/account.h	Fri Apr 16 01:59:16 2010 +0000
+++ b/libpurple/account.h	Fri Apr 16 07:35:11 2010 +0000
@@ -414,6 +414,14 @@
 void purple_account_set_proxy_info(PurpleAccount *account, PurpleProxyInfo *info);
 
 /**
+ * Sets the account's privacy type.
+ *
+ * @param account      The account.
+ * @param privacy_type The privacy type.
+ */
+void purple_account_set_privacy_type(PurpleAccount *account, PurplePrivacyType privacy_type);
+
+/**
  * Sets the account's status types.
  *
  * @param account      The account.
@@ -683,6 +691,15 @@
 PurpleProxyInfo *purple_account_get_proxy_info(const PurpleAccount *account);
 
 /**
+ * Returns the account's privacy type.
+ *
+ * @param account   The account.
+ *
+ * @return The privacy type.
+ */
+PurplePrivacyType purple_account_get_privacy_type(const PurpleAccount *account);
+
+/**
  * Returns the active status for this account.  This looks through
  * the PurplePresence associated with this account and returns the
  * PurpleStatus that has its active flag set to "TRUE."  There can be