/soc/2013/ankitkv/gobjectification: cd4e77521c9c: Added purple_a...

Ankit Vani a at nevitus.org
Mon Jun 17 12:29:43 EDT 2013


Changeset: cd4e77521c9ca13be3f2036909bc39005b19b20a
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-06-17 21:59 +0530
Branch:	 soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/cd4e77521c9c

Description:

Added purple_account_privacy_get_[permitted,denied] functions to return the permit and deny lists

diffstat:

 libpurple/account.c |  18 ++++++++++++++++++
 libpurple/account.h |  16 ++++++++++++++--
 2 files changed, 32 insertions(+), 2 deletions(-)

diffs (55 lines):

diff --git a/libpurple/account.c b/libpurple/account.c
--- a/libpurple/account.c
+++ b/libpurple/account.c
@@ -2772,6 +2772,24 @@ purple_account_privacy_deny(PurpleAccoun
 		serv_set_permit_deny(purple_account_get_connection(account));
 }
 
+GSList *
+purple_account_privacy_get_permitted(PurpleAccount *account)
+{
+	PurpleAccountPrivate *priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
+	g_return_if_fail(priv != NULL);
+
+	return priv->permit;
+}
+
+GSList *
+purple_account_privacy_get_denied(PurpleAccount *account)
+{
+	PurpleAccountPrivate *priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
+	g_return_if_fail(priv != NULL);
+
+	return priv->deny;
+}
+
 gboolean
 purple_account_privacy_check(PurpleAccount *account, const char *who)
 {
diff --git a/libpurple/account.h b/libpurple/account.h
--- a/libpurple/account.h
+++ b/libpurple/account.h
@@ -858,9 +858,21 @@ void purple_account_privacy_allow(Purple
  */
 void purple_account_privacy_deny(PurpleAccount *account, const char *who);
 
-gboolean purple_account_privacy_permitted();
-gboolean purple_account_privacy_denied();
+/**
+ * Returns the account's permit list.
+ *
+ * @param account	The account.
+ * @return          A GSList of the permitted users
+ */
+GSList *purple_account_privacy_get_permitted(PurpleAccount *account);
 
+/**
+ * Returns the account's deny list.
+ *
+ * @param account	The account.
+ * @return          A GSList of the denied users
+ */
+GSList *purple_account_privacy_get_denied(PurpleAccount *account);
 
 /**
  * Check the privacy-setting for a user.



More information about the Commits mailing list