comparison libpurple/protocols/yahoo/ycht.c @ 28025:908be3822215

Move from "struct yahoo_data" to "YahooData" to be consistent with other structs in the prpl. I'm sure someone is going to want to shoot me over this, but I'm tired of seeing "struct yahoo_data" everywhere in this prpl.
author John Bailey <rekkanoryo@rekkanoryo.org>
date Sun, 26 Jul 2009 17:25:18 +0000
parents 09772222714a
children 259bbfb423d4
comparison
equal deleted inserted replaced
28024:8bc9087b5ec2 28025:908be3822215
53 * Functions to process various kinds of packets. 53 * Functions to process various kinds of packets.
54 ************************************************************************************/ 54 ************************************************************************************/
55 static void ycht_process_login(YchtConn *ycht, YchtPkt *pkt) 55 static void ycht_process_login(YchtConn *ycht, YchtPkt *pkt)
56 { 56 {
57 PurpleConnection *gc = ycht->gc; 57 PurpleConnection *gc = ycht->gc;
58 struct yahoo_data *yd = gc->proto_data; 58 YahooData *yd = gc->proto_data;
59 59
60 if (ycht->logged_in) 60 if (ycht->logged_in)
61 return; 61 return;
62 62
63 yd->chat_online = TRUE; 63 yd->chat_online = TRUE;
68 } 68 }
69 69
70 static void ycht_process_logout(YchtConn *ycht, YchtPkt *pkt) 70 static void ycht_process_logout(YchtConn *ycht, YchtPkt *pkt)
71 { 71 {
72 PurpleConnection *gc = ycht->gc; 72 PurpleConnection *gc = ycht->gc;
73 struct yahoo_data *yd = gc->proto_data; 73 YahooData *yd = gc->proto_data;
74 74
75 yd->chat_online = FALSE; 75 yd->chat_online = FALSE;
76 ycht->logged_in = FALSE; 76 ycht->logged_in = FALSE;
77 } 77 }
78 78
173 173
174 static void ycht_progress_online_friends(YchtConn *ycht, YchtPkt *pkt) 174 static void ycht_progress_online_friends(YchtConn *ycht, YchtPkt *pkt)
175 { 175 {
176 #if 0 176 #if 0
177 PurpleConnection *gc = ycht->gc; 177 PurpleConnection *gc = ycht->gc;
178 struct yahoo_data *yd = gc->proto_data; 178 YahooData *yd = gc->proto_data;
179 179
180 if (ycht->logged_in) 180 if (ycht->logged_in)
181 return; 181 return;
182 182
183 yd->chat_online = TRUE; 183 yd->chat_online = TRUE;
429 * structs, and all that stuff. 429 * structs, and all that stuff.
430 ************************************************************************************/ 430 ************************************************************************************/
431 431
432 void ycht_connection_close(YchtConn *ycht) 432 void ycht_connection_close(YchtConn *ycht)
433 { 433 {
434 struct yahoo_data *yd = ycht->gc->proto_data; 434 YahooData *yd = ycht->gc->proto_data;
435 435
436 if (yd) { 436 if (yd) {
437 yd->ycht = NULL; 437 yd->ycht = NULL;
438 yd->chat_online = FALSE; 438 yd->chat_online = FALSE;
439 } 439 }
541 541
542 static void ycht_got_connected(gpointer data, gint source, const gchar *error_message) 542 static void ycht_got_connected(gpointer data, gint source, const gchar *error_message)
543 { 543 {
544 YchtConn *ycht = data; 544 YchtConn *ycht = data;
545 PurpleConnection *gc = ycht->gc; 545 PurpleConnection *gc = ycht->gc;
546 struct yahoo_data *yd = gc->proto_data; 546 YahooData *yd = gc->proto_data;
547 YchtPkt *pkt; 547 YchtPkt *pkt;
548 char *buf; 548 char *buf;
549 549
550 if (source < 0) { 550 if (source < 0) {
551 ycht_connection_error(ycht, _("Unable to connect")); 551 ycht_connection_error(ycht, _("Unable to connect"));
568 } 568 }
569 569
570 void ycht_connection_open(PurpleConnection *gc) 570 void ycht_connection_open(PurpleConnection *gc)
571 { 571 {
572 YchtConn *ycht; 572 YchtConn *ycht;
573 struct yahoo_data *yd = gc->proto_data; 573 YahooData *yd = gc->proto_data;
574 PurpleAccount *account = purple_connection_get_account(gc); 574 PurpleAccount *account = purple_connection_get_account(gc);
575 575
576 ycht = g_new0(YchtConn, 1); 576 ycht = g_new0(YchtConn, 1);
577 ycht->gc = gc; 577 ycht->gc = gc;
578 ycht->fd = -1; 578 ycht->fd = -1;