Mercurial > pidgin
comparison libpurple/protocols/yahoo/yahoo_aliases.c @ 31998: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 | 7df08e88d9bb |
children | 904686722499 |
comparison
equal
deleted
inserted
replaced
31997:1a3723704543 | 31998:fcf841ffd620 |
---|---|
72 | 72 |
73 static void | 73 static void |
74 yahoo_fetch_aliases_cb(PurpleUtilFetchUrlData *url_data, gpointer user_data, const gchar *url_text, size_t len, const gchar *error_message) | 74 yahoo_fetch_aliases_cb(PurpleUtilFetchUrlData *url_data, gpointer user_data, const gchar *url_text, size_t len, const gchar *error_message) |
75 { | 75 { |
76 PurpleConnection *gc = user_data; | 76 PurpleConnection *gc = user_data; |
77 YahooData *yd = gc->proto_data; | 77 YahooData *yd = purple_connection_get_protocol_data(gc); |
78 | 78 |
79 yd->url_datas = g_slist_remove(yd->url_datas, url_data); | 79 yd->url_datas = g_slist_remove(yd->url_datas, url_data); |
80 | 80 |
81 if (len == 0) { | 81 if (len == 0) { |
82 purple_debug_info("yahoo", "No Aliases to process.%s%s\n", | 82 purple_debug_info("yahoo", "No Aliases to process.%s%s\n", |
184 } | 184 } |
185 | 185 |
186 void | 186 void |
187 yahoo_fetch_aliases(PurpleConnection *gc) | 187 yahoo_fetch_aliases(PurpleConnection *gc) |
188 { | 188 { |
189 YahooData *yd = gc->proto_data; | 189 YahooData *yd = purple_connection_get_protocol_data(gc); |
190 const char *url; | 190 const char *url; |
191 gchar *request, *webpage, *webaddress; | 191 gchar *request, *webpage, *webaddress; |
192 PurpleUtilFetchUrlData *url_data; | 192 PurpleUtilFetchUrlData *url_data; |
193 | 193 |
194 /* use whole URL if using HTTP Proxy */ | 194 /* use whole URL if using HTTP Proxy */ |
228 xmlnode *node, *result; | 228 xmlnode *node, *result; |
229 struct callback_data *cb = user_data; | 229 struct callback_data *cb = user_data; |
230 PurpleConnection *gc = cb->gc; | 230 PurpleConnection *gc = cb->gc; |
231 YahooData *yd; | 231 YahooData *yd; |
232 | 232 |
233 yd = gc->proto_data; | 233 yd = purple_connection_get_protocol_data(gc); |
234 yd->url_datas = g_slist_remove(yd->url_datas, url_data); | 234 yd->url_datas = g_slist_remove(yd->url_datas, url_data); |
235 | 235 |
236 if (len == 0 || error_message != NULL) { | 236 if (len == 0 || error_message != NULL) { |
237 purple_debug_info("yahoo", "Error updating alias for %s: %s\n", | 237 purple_debug_info("yahoo", "Error updating alias for %s: %s\n", |
238 cb->who, | 238 cb->who, |
308 if (f == NULL) { | 308 if (f == NULL) { |
309 purple_debug_error("yahoo", "Missing YahooFriend. Unable to set server alias.\n"); | 309 purple_debug_error("yahoo", "Missing YahooFriend. Unable to set server alias.\n"); |
310 return; | 310 return; |
311 } | 311 } |
312 | 312 |
313 yd = gc->proto_data; | 313 yd = purple_connection_get_protocol_data(gc); |
314 | 314 |
315 /* Using callback_data so I have access to gc in the callback function */ | 315 /* Using callback_data so I have access to gc in the callback function */ |
316 cb = g_new0(struct callback_data, 1); | 316 cb = g_new0(struct callback_data, 1); |
317 cb->who = g_strdup(who); | 317 cb->who = g_strdup(who); |
318 cb->id = g_strdup(yahoo_friend_get_alias_id(f)); | 318 cb->id = g_strdup(yahoo_friend_get_alias_id(f)); |