changeset 29742:933c8251e036

merge of '5bc899d1d49d1b8701e547f4e4d76519e471d339' and 'a778777f714204be832f9a284e141896f41bbdb7'
author Paul Aurich <paul@darkrain42.org>
date Sat, 17 Apr 2010 01:27:58 +0000
parents 35a1cf247168 (current diff) 4e5cfb6ad471 (diff)
children bb615a2542d6
files ChangeLog.API libpurple/util.c
diffstat 5 files changed, 37 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Sat Apr 17 01:27:04 2010 +0000
+++ b/COPYRIGHT	Sat Apr 17 01:27:58 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	Sat Apr 17 01:27:04 2010 +0000
+++ b/ChangeLog.API	Sat Apr 17 01:27:58 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	Sat Apr 17 01:27:04 2010 +0000
+++ b/libpurple/account.c	Sat Apr 17 01:27:58 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	Sat Apr 17 01:27:04 2010 +0000
+++ b/libpurple/account.h	Sat Apr 17 01:27:58 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
--- a/libpurple/util.c	Sat Apr 17 01:27:04 2010 +0000
+++ b/libpurple/util.c	Sat Apr 17 01:27:58 2010 +0000
@@ -586,6 +586,7 @@
 	{
 		purple_debug_error("util", "Format conversion failed in purple_utf8_strftime(): %s\n", err->message);
 		g_error_free(err);
+		err = NULL;
 		locale = g_strdup(format);
 	}