# HG changeset patch # User Tobias Markmann # Date 1216136295 0 # Node ID 7f6558c7a0a3d4177abe5756e15281dd44fd11e5 # Parent 3f719eaa7fd191731c5470ed19af28195fade3aa * implemented jabber_caps_broadcast_change() and finished jabber_ipc_add_feature() IPC function diff -r 3f719eaa7fd1 -r 7f6558c7a0a3 libpurple/protocols/jabber/caps.c --- 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); + } + } +} + diff -r 3f719eaa7fd1 -r 7f6558c7a0a3 libpurple/protocols/jabber/caps.h --- 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_ */ diff -r 3f719eaa7fd1 -r 7f6558c7a0a3 libpurple/protocols/jabber/jabber.c --- 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