Mercurial > pidgin.yaz
comparison libpurple/protocols/yahoo/libymsg.c @ 32707:f75041cb3fec
Convert libpurple and protocol prpl's to use the purple_account_* accessor functions.
author | andrew.victor@mxit.com |
---|---|
date | Sat, 01 Oct 2011 18:21:43 +0000 |
parents | 1f68af4afe67 |
children | 10e5000326a5 |
comparison
equal
deleted
inserted
replaced
32706:6e27091869eb | 32707:f75041cb3fec |
---|---|
571 f->p2p_packet_sent = 0; | 571 f->p2p_packet_sent = 0; |
572 } else | 572 } else |
573 yahoo_friend_set_p2p_status(f, YAHOO_P2PSTATUS_DO_NOT_CONNECT); | 573 yahoo_friend_set_p2p_status(f, YAHOO_P2PSTATUS_DO_NOT_CONNECT); |
574 } else { | 574 } else { |
575 /* This buddy is on the ignore list (and therefore in no group) */ | 575 /* This buddy is on the ignore list (and therefore in no group) */ |
576 purple_debug_info("yahoo", "%s adding %s to the deny list because of the ignore list / no group was found\n",account->username, norm_bud); | 576 purple_debug_info("yahoo", "%s adding %s to the deny list because of the ignore list / no group was found\n", purple_account_get_username(account), norm_bud); |
577 purple_privacy_deny_add(account, norm_bud, 1); | 577 purple_privacy_deny_add(account, norm_bud, 1); |
578 } | 578 } |
579 | 579 |
580 g_free(norm_bud); | 580 g_free(norm_bud); |
581 norm_bud=NULL; | 581 norm_bud=NULL; |
746 g_string_free(yd->tmp_serv_ilist, TRUE); | 746 g_string_free(yd->tmp_serv_ilist, TRUE); |
747 yd->tmp_serv_ilist = NULL; | 747 yd->tmp_serv_ilist = NULL; |
748 } | 748 } |
749 | 749 |
750 if (got_serv_list && | 750 if (got_serv_list && |
751 ((account->perm_deny != PURPLE_PRIVACY_ALLOW_BUDDYLIST) && | 751 ((purple_account_get_privacy_type(account) != PURPLE_PRIVACY_ALLOW_BUDDYLIST) && |
752 (account->perm_deny != PURPLE_PRIVACY_DENY_ALL) && | 752 (purple_account_get_privacy_type(account) != PURPLE_PRIVACY_DENY_ALL) && |
753 (account->perm_deny != PURPLE_PRIVACY_ALLOW_USERS))) | 753 (purple_account_get_privacy_type(account) != PURPLE_PRIVACY_ALLOW_USERS))) |
754 { | 754 { |
755 account->perm_deny = PURPLE_PRIVACY_DENY_USERS; | 755 purple_account_set_privacy_type(account, PURPLE_PRIVACY_DENY_USERS); |
756 purple_debug_info("yahoo", "%s privacy defaulting to PURPLE_PRIVACY_DENY_USERS.\n", | 756 purple_debug_info("yahoo", "%s privacy defaulting to PURPLE_PRIVACY_DENY_USERS.\n", |
757 account->username); | 757 purple_account_get_username(account)); |
758 } | 758 } |
759 | 759 |
760 if (yd->tmp_serv_plist) { | 760 if (yd->tmp_serv_plist) { |
761 buddies = g_strsplit(yd->tmp_serv_plist->str, ",", -1); | 761 buddies = g_strsplit(yd->tmp_serv_plist->str, ",", -1); |
762 for (bud = buddies; bud && *bud; bud++) { | 762 for (bud = buddies; bud && *bud; bud++) { |
763 f = yahoo_friend_find(gc, *bud); | 763 f = yahoo_friend_find(gc, *bud); |
764 if (f) { | 764 if (f) { |
765 purple_debug_info("yahoo", "%s setting presence for %s to PERM_OFFLINE\n", | 765 purple_debug_info("yahoo", "%s setting presence for %s to PERM_OFFLINE\n", |
766 account->username, *bud); | 766 purple_account_get_username(account), *bud); |
767 f->presence = YAHOO_PRESENCE_PERM_OFFLINE; | 767 f->presence = YAHOO_PRESENCE_PERM_OFFLINE; |
768 } | 768 } |
769 } | 769 } |
770 g_strfreev(buddies); | 770 g_strfreev(buddies); |
771 g_string_free(yd->tmp_serv_plist, TRUE); | 771 g_string_free(yd->tmp_serv_plist, TRUE); |
4474 "Content-Length: %" G_GSIZE_FORMAT "\r\n" | 4474 "Content-Length: %" G_GSIZE_FORMAT "\r\n" |
4475 "Cache-Control: no-cache\r\n\r\n%s", | 4475 "Cache-Control: no-cache\r\n\r\n%s", |
4476 YAHOO_CLIENT_VERSION, yd->cookie_t, yd->cookie_y, strlen(validate_request_str), validate_request_str); | 4476 YAHOO_CLIENT_VERSION, yd->cookie_t, yd->cookie_y, strlen(validate_request_str), validate_request_str); |
4477 | 4477 |
4478 /* use whole URL if using HTTP Proxy */ | 4478 /* use whole URL if using HTTP Proxy */ |
4479 if ((gc->account->proxy_info) && (purple_proxy_info_get_type(gc->account->proxy_info) == PURPLE_PROXY_HTTP)) | 4479 if ((purple_account_get_proxy_info(gc->account)) && (purple_proxy_info_get_type(purple_account_get_proxy_info(gc->account)) == PURPLE_PROXY_HTTP)) |
4480 use_whole_url = TRUE; | 4480 use_whole_url = TRUE; |
4481 | 4481 |
4482 url_data = purple_util_fetch_url_request( | 4482 url_data = purple_util_fetch_url_request( |
4483 purple_connection_get_account(gc), YAHOO_SMS_CARRIER_URL, use_whole_url, | 4483 purple_connection_get_account(gc), YAHOO_SMS_CARRIER_URL, use_whole_url, |
4484 YAHOO_CLIENT_USERAGENT, TRUE, request, FALSE, -1, | 4484 YAHOO_CLIENT_USERAGENT, TRUE, request, FALSE, -1, |
5115 PurpleAccount *account; | 5115 PurpleAccount *account; |
5116 GSList *deny; | 5116 GSList *deny; |
5117 | 5117 |
5118 account = purple_connection_get_account(gc); | 5118 account = purple_connection_get_account(gc); |
5119 | 5119 |
5120 switch (account->perm_deny) | 5120 switch (purple_account_get_privacy_type(account)) |
5121 { | 5121 { |
5122 case PURPLE_PRIVACY_ALLOW_ALL: | 5122 case PURPLE_PRIVACY_ALLOW_ALL: |
5123 for (deny = account->deny; deny; deny = deny->next) | 5123 for (deny = account->deny; deny; deny = deny->next) |
5124 yahoo_rem_deny(gc, deny->data); | 5124 yahoo_rem_deny(gc, deny->data); |
5125 break; | 5125 break; |