Mercurial > pidgin
changeset 25032:7f6558c7a0a3
* implemented jabber_caps_broadcast_change() and finished jabber_ipc_add_feature() IPC function
author | Tobias Markmann <tfar@soc.pidgin.im> |
---|---|
date | Tue, 15 Jul 2008 15:38:15 +0000 |
parents | 3f719eaa7fd1 |
children | 324cd6544a7b |
files | libpurple/protocols/jabber/caps.c libpurple/protocols/jabber/caps.h libpurple/protocols/jabber/jabber.c |
diffstat | 3 files changed, 19 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/caps.c Tue Jul 08 15:05:45 2008 +0000 +++ b/libpurple/protocols/jabber/caps.c Tue Jul 15 15:38:15 2008 +0000 @@ -845,3 +845,16 @@ return caps_hash; } +void jabber_caps_broadcast_change() { + GList *active_accounts = purple_accounts_get_all_active(); + for (active_accounts = purple_accounts_get_all_active(); active_accounts; active_accounts = active_accounts->next) { + PurpleAccount *account = active_accounts->data; + if (!strcmp(account->protocol_id, "jabber")) { + PurpleConnection *conn = account->gc; + JabberStream *js = conn->proto_data; + xmlnode *presence = jabber_presence_create_js(js, JABBER_BUDDY_STATE_UNKNOWN, 0, 0); + jabber_send(js, presence); + } + } +} +
--- a/libpurple/protocols/jabber/caps.h Tue Jul 08 15:05:45 2008 +0000 +++ b/libpurple/protocols/jabber/caps.h Tue Jul 15 15:38:15 2008 +0000 @@ -88,4 +88,9 @@ **/ const gchar* jabber_caps_get_own_hash(); +/** + * + */ +void jabber_caps_broadcast_change(); + #endif /* _PURPLE_JABBER_CAPS_H_ */
--- a/libpurple/protocols/jabber/jabber.c Tue Jul 08 15:05:45 2008 +0000 +++ b/libpurple/protocols/jabber/jabber.c Tue Jul 15 15:38:15 2008 +0000 @@ -2480,6 +2480,7 @@ jabber_add_feature(feature, 0); // send presence with new caps info for all connected accounts + jabber_caps_broadcast_change(); } void