soc.2008.xmpp: ba5f0e7f: * implemented jabber_caps_broadcast_chan...

tfar at soc.pidgin.im tfar at soc.pidgin.im
Tue Jul 15 12:16:19 EDT 2008


-----------------------------------------------------------------
Revision: ba5f0e7f8074e5390b904e95f6194688dbbe815a
Ancestor: cf844ef01dd31f6ec26b22c234d1af5c31f15316
Author: tfar at soc.pidgin.im
Date: 2008-07-15T15:38:15
Branch: im.pidgin.soc.2008.xmpp
URL: http://d.pidgin.im/viewmtn/revision/info/ba5f0e7f8074e5390b904e95f6194688dbbe815a

Modified files:
        libpurple/protocols/jabber/caps.c
        libpurple/protocols/jabber/caps.h
        libpurple/protocols/jabber/jabber.c

ChangeLog: 

* implemented jabber_caps_broadcast_change() and finished jabber_ipc_add_feature() IPC function

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/caps.c	fb2fbf53dc0ab023e1187c4846ee5d340b0d7168
+++ libpurple/protocols/jabber/caps.c	8bdd8dc587f05ecbe26307874f8ca30ca8c369d7
@@ -845,3 +845,16 @@ const gchar* jabber_caps_get_own_hash() 
 	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);
+		}
+	}
+}
+
============================================================
--- libpurple/protocols/jabber/caps.h	4d66abcbf83e79b1b2707f675cbfaa38d0c0b44f
+++ libpurple/protocols/jabber/caps.h	d051afb495621e409365a99b24af545692dad282
@@ -88,4 +88,9 @@ const gchar* jabber_caps_get_own_hash();
 **/
 const gchar* jabber_caps_get_own_hash();
 
+/**
+ *
+ */
+void jabber_caps_broadcast_change();
+
 #endif /* _PURPLE_JABBER_CAPS_H_ */
============================================================
--- libpurple/protocols/jabber/jabber.c	98889e65abb04a7e3d2439af9e7bb24459bcd464
+++ libpurple/protocols/jabber/jabber.c	5fc20633d49f500a587342d9b0d35d660fa8424b
@@ -2480,6 +2480,7 @@ jabber_ipc_add_feature(gchar *feature) 
 	jabber_add_feature(feature, 0);
 	
 	// send presence with new caps info for all connected accounts
+	jabber_caps_broadcast_change();
 }
 
 void


More information about the Commits mailing list