# HG changeset patch # User Mark Doliner # Date 1271403311 0 # Node ID b983db2b01f5c0494cfb5bc3898fedb390af3bcb # Parent 787d82881a3ed8d263402da5eda79e487ad66570 Add getter and setter for account->perm_deny. Patch by Stephen Whitmore. Fixes #11656 diff -r 787d82881a3e -r b983db2b01f5 COPYRIGHT --- 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) diff -r 787d82881a3e -r b983db2b01f5 ChangeLog.API --- 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 diff -r 787d82881a3e -r b983db2b01f5 libpurple/account.c --- 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) { diff -r 787d82881a3e -r b983db2b01f5 libpurple/account.h --- 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