Mercurial > pidgin.yaz
comparison src/protocols/jabber/presence.c @ 10216:09876d57c520
[gaim-migrate @ 11343]
jabber can now set away messages, but can't come back when another account is logged in...someone feel free to clue me in as to what I did wrong
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sat, 20 Nov 2004 05:12:59 +0000 |
parents | 4e7249591251 |
children | ff5e0f059924 |
comparison
equal
deleted
inserted
replaced
10215:132e8767b2f6 | 10216:09876d57c520 |
---|---|
80 } | 80 } |
81 g_free(my_base_jid); | 81 g_free(my_base_jid); |
82 } | 82 } |
83 | 83 |
84 | 84 |
85 void jabber_presence_send(GaimConnection *gc, GaimStatus *status) | 85 void jabber_presence_send(GaimAccount *account, GaimStatus *status) |
86 { | 86 { |
87 GaimConnection *gc = account->gc; | |
87 JabberStream *js = gc->proto_data; | 88 JabberStream *js = gc->proto_data; |
88 xmlnode *presence, *x, *photo; | 89 xmlnode *presence, *x, *photo; |
89 char *stripped = NULL; | 90 char *stripped = NULL; |
90 const char *msg; | 91 const char *msg; |
91 JabberBuddyState state; | 92 JabberBuddyState state; |
531 xmlnode_free(presence); | 532 xmlnode_free(presence); |
532 } | 533 } |
533 | 534 |
534 void gaim_status_to_jabber(const GaimStatus *status, JabberBuddyState *state, const char **msg, int *priority) | 535 void gaim_status_to_jabber(const GaimStatus *status, JabberBuddyState *state, const char **msg, int *priority) |
535 { | 536 { |
536 const char *status_id; | 537 const char *status_id = NULL; |
538 | |
539 *state = JABBER_BUDDY_STATE_UNKNOWN; | |
540 *msg = NULL; | |
541 *priority = 0; | |
537 | 542 |
538 if(!status) { | 543 if(!status) { |
539 *state = JABBER_BUDDY_STATE_UNKNOWN; | 544 *state = JABBER_BUDDY_STATE_UNAVAILABLE; |
540 *msg = NULL; | 545 } else { |
541 *priority = 0; | 546 if(state) { |
542 return; | 547 status_id = gaim_status_get_id(status); |
543 } | 548 *state = jabber_buddy_status_id_get_state(status_id); |
544 | 549 } |
545 if(state) { | 550 |
546 status_id = gaim_status_get_id(status); | 551 if(msg) |
547 *state = jabber_buddy_status_id_get_state(status_id); | 552 *msg = gaim_status_get_attr_string(status, "message"); |
548 } | 553 |
549 | 554 if(priority) |
550 if(msg) | 555 *priority = gaim_status_get_attr_int(status, "priority"); |
551 *msg = gaim_status_get_attr_string(status, "message"); | 556 } |
552 | 557 |
553 if(priority) | 558 } |
554 *priority = gaim_status_get_attr_int(status, "priority"); | |
555 | |
556 } |