comparison libpurple/protocols/yahoo/yahoo_profile.c @ 32459:fcf841ffd620

Convert yahoo prpl to use accessor functions purple_connection_get_protocol_data() and purple_connection_set_protocol_data()
author andrew.victor@mxit.com
date Tue, 30 Aug 2011 20:03:11 +0000
parents 99ca503ea087
children 904686722499
comparison
equal deleted inserted replaced
32458:1a3723704543 32459:fcf841ffd620
787 const char *title; 787 const char *title;
788 profile_state_t profile_state = PROFILE_STATE_DEFAULT; 788 profile_state_t profile_state = PROFILE_STATE_DEFAULT;
789 789
790 purple_debug_info("yahoo", "In yahoo_got_info\n"); 790 purple_debug_info("yahoo", "In yahoo_got_info\n");
791 791
792 yd = info_data->gc->proto_data; 792 yd = purple_connection_get_protocol_data(info_data->gc);
793 yd->url_datas = g_slist_remove(yd->url_datas, url_data); 793 yd->url_datas = g_slist_remove(yd->url_datas, url_data);
794 794
795 user_info = purple_notify_user_info_new(); 795 user_info = purple_notify_user_info_new();
796 796
797 title = yd->jp ? _("Yahoo! Japan Profile") : 797 title = yd->jp ? _("Yahoo! Japan Profile") :
981 /* Jun 29 05 Bleeter: Y! changed their profile pages. Terminators now seem to be */ 981 /* Jun 29 05 Bleeter: Y! changed their profile pages. Terminators now seem to be */
982 /* </dd> and not \n. The prpl's need to be audited before it can be moved */ 982 /* </dd> and not \n. The prpl's need to be audited before it can be moved */
983 /* in to purple_markup_strip_html*/ 983 /* in to purple_markup_strip_html*/
984 char *fudged_buffer; 984 char *fudged_buffer;
985 985
986 yd = info_data->gc->proto_data; 986 yd = purple_connection_get_protocol_data(info_data->gc);
987 yd->url_datas = g_slist_remove(yd->url_datas, url_data); 987 yd->url_datas = g_slist_remove(yd->url_datas, url_data);
988 988
989 fudged_buffer = purple_strcasereplace(url_buffer, "</dd>", "</dd><br>"); 989 fudged_buffer = purple_strcasereplace(url_buffer, "</dd>", "</dd><br>");
990 /* nuke the html, it's easier than trying to parse the horrid stuff */ 990 /* nuke the html, it's easier than trying to parse the horrid stuff */
991 stripped = purple_markup_strip_html(fudged_buffer); 991 stripped = purple_markup_strip_html(fudged_buffer);
1260 #endif /* PHOTO_SUPPORT */ 1260 #endif /* PHOTO_SUPPORT */
1261 } 1261 }
1262 1262
1263 void yahoo_get_info(PurpleConnection *gc, const char *name) 1263 void yahoo_get_info(PurpleConnection *gc, const char *name)
1264 { 1264 {
1265 YahooData *yd = gc->proto_data; 1265 YahooData *yd = purple_connection_get_protocol_data(gc);
1266 YahooGetInfoData *data; 1266 YahooGetInfoData *data;
1267 char *url; 1267 char *url;
1268 PurpleUtilFetchUrlData *url_data; 1268 PurpleUtilFetchUrlData *url_data;
1269 1269
1270 data = g_new0(YahooGetInfoData, 1); 1270 data = g_new0(YahooGetInfoData, 1);