Mercurial > pidgin.yaz
diff libpurple/protocols/novell/novell.c @ 32767:2ec94166be43
On the way to hiding the PurpleConnection struct.
* Added purple_connection_get_flags() and purple_connection_set_flags()
* Use purple_connection_ accessor functions.
author | andrew.victor@mxit.com |
---|---|
date | Tue, 18 Oct 2011 18:47:48 +0000 |
parents | f75041cb3fec |
children |
line wrap: on
line diff
--- a/libpurple/protocols/novell/novell.c Tue Oct 18 04:47:58 2011 +0000 +++ b/libpurple/protocols/novell/novell.c Tue Oct 18 18:47:48 2011 +0000 @@ -131,8 +131,8 @@ /* Don't attempt to auto-reconnect if our * password was invalid. */ - if (!purple_account_get_remember_password(gc->account)) - purple_account_set_password(gc->account, NULL); + if (!purple_account_get_remember_password(purple_connection_get_account(gc))) + purple_account_set_password(purple_connection_get_account(gc), NULL); reason = PURPLE_CONNECTION_ERROR_AUTHENTICATION_FAILED; break; default: @@ -741,16 +741,16 @@ if (allowed) { - if (!g_slist_find_custom(gc->account->permit, + if (!g_slist_find_custom(purple_connection_get_account(gc)->permit, display_id, (GCompareFunc)purple_utf8_strcasecmp)) { - purple_privacy_permit_add(gc->account, display_id, TRUE); + purple_privacy_permit_add(purple_connection_get_account(gc), display_id, TRUE); } } else { - if (!g_slist_find_custom(gc->account->permit, + if (!g_slist_find_custom(purple_connection_get_account(gc)->permit, display_id, (GCompareFunc)purple_utf8_strcasecmp)) { - purple_privacy_deny_add(gc->account, display_id, TRUE); + purple_privacy_deny_add(purple_connection_get_account(gc), display_id, TRUE); } } @@ -789,10 +789,10 @@ if (display_id) { - if (!g_slist_find_custom(gc->account->deny, + if (!g_slist_find_custom(purple_connection_get_account(gc)->deny, display_id, (GCompareFunc)purple_utf8_strcasecmp)) { - purple_privacy_deny_add(gc->account, display_id, TRUE); + purple_privacy_deny_add(purple_connection_get_account(gc), display_id, TRUE); } } else { @@ -840,11 +840,11 @@ if (display_id) { - if (!g_slist_find_custom(gc->account->permit, + if (!g_slist_find_custom(purple_connection_get_account(gc)->permit, display_id, (GCompareFunc)purple_utf8_strcasecmp)) { - purple_privacy_permit_add(gc->account, display_id, TRUE); + purple_privacy_permit_add(purple_connection_get_account(gc), display_id, TRUE); } } else { @@ -1404,15 +1404,15 @@ /* Set the Purple privacy setting */ if (user->default_deny) { if (user->allow_list == NULL) { - purple_account_set_privacy_type(gc->account, PURPLE_PRIVACY_DENY_ALL); + purple_account_set_privacy_type(purple_connection_get_account(gc), PURPLE_PRIVACY_DENY_ALL); } else { - purple_account_set_privacy_type(gc->account, PURPLE_PRIVACY_ALLOW_USERS); + purple_account_set_privacy_type(purple_connection_get_account(gc), PURPLE_PRIVACY_ALLOW_USERS); } } else { if (user->deny_list == NULL) { - purple_account_set_privacy_type(gc->account, PURPLE_PRIVACY_ALLOW_ALL); + purple_account_set_privacy_type(purple_connection_get_account(gc), PURPLE_PRIVACY_ALLOW_ALL); } else { - purple_account_set_privacy_type(gc->account, PURPLE_PRIVACY_DENY_USERS); + purple_account_set_privacy_type(purple_connection_get_account(gc), PURPLE_PRIVACY_DENY_USERS); } } @@ -1424,9 +1424,9 @@ else name =(char *)node->data; - if (!g_slist_find_custom(gc->account->permit, + if (!g_slist_find_custom(purple_connection_get_account(gc)->permit, name, (GCompareFunc)purple_utf8_strcasecmp)) { - purple_privacy_permit_add(gc->account, name , TRUE); + purple_privacy_permit_add(purple_connection_get_account(gc), name , TRUE); } } @@ -1437,15 +1437,15 @@ else name =(char *)node->data; - if (!g_slist_find_custom(gc->account->deny, + if (!g_slist_find_custom(purple_connection_get_account(gc)->deny, name, (GCompareFunc)purple_utf8_strcasecmp)) { - purple_privacy_deny_add(gc->account, name, TRUE); + purple_privacy_deny_add(purple_connection_get_account(gc), name, TRUE); } } /* Remove stuff */ - for (node = gc->account->permit; node; node = node->next) { + for (node = purple_connection_get_account(gc)->permit; node; node = node->next) { dn = nm_lookup_dn(user, (char *)node->data); if (dn != NULL && !g_slist_find_custom(user->allow_list, @@ -1456,13 +1456,13 @@ if (rem_list) { for (node = rem_list; node; node = node->next) { - purple_privacy_permit_remove(gc->account, (char *)node->data, TRUE); + purple_privacy_permit_remove(purple_connection_get_account(gc), (char *)node->data, TRUE); } g_slist_free(rem_list); rem_list = NULL; } - for (node = gc->account->deny; node; node = node->next) { + for (node = purple_connection_get_account(gc)->deny; node; node = node->next) { dn = nm_lookup_dn(user, (char *)node->data); if (dn != NULL && !g_slist_find_custom(user->deny_list, @@ -1473,7 +1473,7 @@ if (rem_list) { for (node = rem_list; node; node = node->next) { - purple_privacy_deny_remove(gc->account, (char *)node->data, TRUE); + purple_privacy_deny_remove(purple_connection_get_account(gc), (char *)node->data, TRUE); } g_slist_free(rem_list); } @@ -3091,7 +3091,7 @@ /* Remove first -- we will add it back in when we get * the okay from the server */ - purple_privacy_permit_remove(gc->account, who, TRUE); + purple_privacy_permit_remove(purple_connection_get_account(gc), who, TRUE); if (nm_user_is_privacy_locked(user)) { _show_privacy_locked_error(gc, user); @@ -3135,7 +3135,7 @@ /* Remove first -- we will add it back in when we get * the okay from the server */ - purple_privacy_deny_remove(gc->account, who, TRUE); + purple_privacy_deny_remove(purple_connection_get_account(gc), who, TRUE); if (nm_user_is_privacy_locked(user)) { _show_privacy_locked_error(gc, user); @@ -3253,7 +3253,7 @@ return; } - switch (purple_account_get_privacy_type(gc->account)) { + switch (purple_account_get_privacy_type(purple_connection_get_account(gc))) { case PURPLE_PRIVACY_ALLOW_ALL: rc = nm_send_set_privacy_default(user, FALSE, @@ -3309,14 +3309,14 @@ if (user_record) { name = nm_user_record_get_display_id(user_record); - if (!g_slist_find_custom(gc->account->permit, + if (!g_slist_find_custom(purple_connection_get_account(gc)->permit, name, (GCompareFunc)purple_utf8_strcasecmp)) { - purple_privacy_permit_add(gc->account, name , TRUE); + purple_privacy_permit_add(purple_connection_get_account(gc), name , TRUE); } } } - for (node = gc->account->permit; node; node = node->next) { + for (node = purple_connection_get_account(gc)->permit; node; node = node->next) { name = NULL; dn = nm_lookup_dn(user, (char *)node->data); if (dn) { @@ -3330,7 +3330,7 @@ g_strdup(dn)); } } else { - purple_privacy_permit_remove(gc->account, (char *)node->data, TRUE); + purple_privacy_permit_remove(purple_connection_get_account(gc), (char *)node->data, TRUE); } } } @@ -3351,14 +3351,14 @@ if (user_record) { name = nm_user_record_get_display_id(user_record); - if (!g_slist_find_custom(gc->account->deny, + if (!g_slist_find_custom(purple_connection_get_account(gc)->deny, name, (GCompareFunc)purple_utf8_strcasecmp)) { - purple_privacy_deny_add(gc->account, name , TRUE); + purple_privacy_deny_add(purple_connection_get_account(gc), name , TRUE); } } } - for (node = gc->account->deny; node; node = node->next) { + for (node = purple_connection_get_account(gc)->deny; node; node = node->next) { name = NULL; dn = nm_lookup_dn(user, (char *)node->data); @@ -3373,7 +3373,7 @@ g_strdup(name)); } } else { - purple_privacy_deny_remove(gc->account, (char *)node->data, TRUE); + purple_privacy_deny_remove(purple_connection_get_account(gc), (char *)node->data, TRUE); } }