Mercurial > pidgin.yaz
comparison libpurple/protocols/yahoo/yahoo.c @ 15525:2193394fd427
Yahoo mobile status
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sun, 04 Feb 2007 04:58:33 +0000 |
parents | 0d4890637238 |
children | 71af5b6209d5 |
comparison
equal
deleted
inserted
replaced
15524:84b3ab83df35 | 15525:2193394fd427 |
---|---|
174 | 174 |
175 if (f->idle != 0) | 175 if (f->idle != 0) |
176 gaim_prpl_got_user_idle(gaim_connection_get_account(gc), name, TRUE, f->idle); | 176 gaim_prpl_got_user_idle(gaim_connection_get_account(gc), name, TRUE, f->idle); |
177 else | 177 else |
178 gaim_prpl_got_user_idle(gaim_connection_get_account(gc), name, FALSE, 0); | 178 gaim_prpl_got_user_idle(gaim_connection_get_account(gc), name, FALSE, 0); |
179 | |
180 if (f->sms) | |
181 gaim_prpl_got_user_status(gaim_connection_get_account(gc), name, YAHOO_STATUS_TYPE_MOBILE, NULL); | |
182 else | |
183 gaim_prpl_got_user_status_deactive(gaim_connection_get_account(gc), name, YAHOO_STATUS_TYPE_MOBILE); | |
179 } | 184 } |
180 | 185 |
181 static void yahoo_process_status(GaimConnection *gc, struct yahoo_packet *pkt) | 186 static void yahoo_process_status(GaimConnection *gc, struct yahoo_packet *pkt) |
182 { | 187 { |
183 GaimAccount *account = gaim_connection_get_account(gc); | 188 GaimAccount *account = gaim_connection_get_account(gc); |
298 break; | 303 break; |
299 case 13: /* bitmask, bit 0 = pager, bit 1 = chat, bit 2 = game */ | 304 case 13: /* bitmask, bit 0 = pager, bit 1 = chat, bit 2 = game */ |
300 if (strtol(pair->value, NULL, 10) == 0) { | 305 if (strtol(pair->value, NULL, 10) == 0) { |
301 if (f) | 306 if (f) |
302 f->status = YAHOO_STATUS_OFFLINE; | 307 f->status = YAHOO_STATUS_OFFLINE; |
303 if (name) | 308 if (name) { |
304 gaim_prpl_got_user_status(account, name, "offline", NULL); | 309 gaim_prpl_got_user_status(account, name, "offline", NULL); |
310 gaim_prpl_got_user_status_deactive(account, name, YAHOO_STATUS_TYPE_MOBILE); | |
311 } | |
305 break; | 312 break; |
306 } | 313 } |
307 break; | 314 break; |
308 case 60: /* SMS */ | 315 case 60: /* SMS */ |
309 if (f) { | 316 if (f) { |
2819 } | 2826 } |
2820 | 2827 |
2821 presence = gaim_buddy_get_presence(b); | 2828 presence = gaim_buddy_get_presence(b); |
2822 | 2829 |
2823 if (gaim_presence_is_online(presence)) { | 2830 if (gaim_presence_is_online(presence)) { |
2824 if (f->sms) | |
2825 return "mobile"; | |
2826 if (yahoo_friend_get_game(f)) | 2831 if (yahoo_friend_get_game(f)) |
2827 return "game"; | 2832 return "game"; |
2828 if (f->protocol == 2) | 2833 if (f->protocol == 2) |
2829 return "msn"; | 2834 return "msn"; |
2830 } | 2835 } |
3469 | 3474 |
3470 type = gaim_status_type_new(GAIM_STATUS_INVISIBLE, YAHOO_STATUS_TYPE_INVISIBLE, NULL, TRUE); | 3475 type = gaim_status_type_new(GAIM_STATUS_INVISIBLE, YAHOO_STATUS_TYPE_INVISIBLE, NULL, TRUE); |
3471 types = g_list_append(types, type); | 3476 types = g_list_append(types, type); |
3472 | 3477 |
3473 type = gaim_status_type_new(GAIM_STATUS_OFFLINE, YAHOO_STATUS_TYPE_OFFLINE, NULL, TRUE); | 3478 type = gaim_status_type_new(GAIM_STATUS_OFFLINE, YAHOO_STATUS_TYPE_OFFLINE, NULL, TRUE); |
3479 types = g_list_append(types, type); | |
3480 | |
3481 type = gaim_status_type_new_full(GAIM_STATUS_MOBILE, YAHOO_STATUS_TYPE_MOBILE, NULL, FALSE, FALSE, TRUE); | |
3474 types = g_list_append(types, type); | 3482 types = g_list_append(types, type); |
3475 | 3483 |
3476 return types; | 3484 return types; |
3477 } | 3485 } |
3478 | 3486 |