cpw.malu.xmpp.google_ft: c58cf947: this seems to be how the desktop client ...

malu at pidgin.im malu at pidgin.im
Tue Sep 14 16:35:42 EDT 2010


----------------------------------------------------------------------
Revision: c58cf9475b309633c6bd3199d5fe6246b22db185
Parent:   48a901a88012d9653fa1b5be22e3195e81904a4b
Author:   malu at pidgin.im
Date:     09/14/10 16:30:43
Branch:   im.pidgin.cpw.malu.xmpp.google_ft
URL: http://d.pidgin.im/viewmtn/revision/info/c58cf9475b309633c6bd3199d5fe6246b22db185

Changelog: 

this seems to be how the desktop client sends candidates and stuff, the web client appearantly uses some other protocol and I still haven't gotten the libjingle pcp example to initiate a session with Pidgin...

Changes against parent 48a901a88012d9653fa1b5be22e3195e81904a4b

  patched  libpurple/protocols/jabber/google/google_share.c
  patched  libpurple/protocols/jabber/namespaces.h

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/namespaces.h	de187f60b726a335e8dfa4c467f28e25478a35fa
+++ libpurple/protocols/jabber/namespaces.h	2c7fba00cd0bfc909fb12f95e017e00f361a315e
@@ -111,4 +111,6 @@
 #define NS_GOOGLE_SESSION_VIDEO "http://www.google.com/session/video"
 #define NS_GOOGLE_SESSION_SHARE "http://www.google.com/session/share"
 
+#define NS_GOOGLE_TRANSPORT_P2P "http://www.google.com/transport/p2p"
+
 #endif /* PURPLE_JABBER_NAMESPACES_H_ */
============================================================
--- libpurple/protocols/jabber/google/google_share.c	353271ef85659ca07046d31920e6a15361df1883
+++ libpurple/protocols/jabber/google/google_share.c	e35cb83146380f1bd261c3a03c37c0c5f45ef561
@@ -96,11 +96,13 @@ google_share_candidate_gathering_done_cb
 		NiceCandidate *candidate = (NiceCandidate *) candidates->data;
 		JabberIq *iq = jabber_iq_new(session->js, JABBER_IQ_SET);
 		xmlnode *sess =
-			google_session_create_xmlnode(session, "candidates");
+			google_session_create_xmlnode(session, "transport-info");
+		xmlnode *transport = xmlnode_new_child(sess, "tranport");
 
+		xmlnode_set_namespace(transport, NS_GOOGLE_TRANSPORT_P2P);
 		xmlnode_insert_child(iq->node, sess);
 		xmlnode_set_attrib(iq->node, "to", session->remote_jid);
-		xmlnode_insert_child(sess,
+		xmlnode_insert_child(transport,
 			google_share_nice_candidate_to_xml(candidate,
 				session_data->channel_name));
 
@@ -132,7 +134,20 @@ google_share_init(PurpleXfer *xfer)
 	JabberIq *iq;
 	xmlnode *sess;
 	xmlnode *channel;
+	xmlnode *transport;
 	
+	/* send transport-accept
+	 	should this only be for Google session v0.4? */
+	iq = jabber_iq_new(session->js, JABBER_IQ_SET);
+	sess = google_session_create_xmlnode(session, "transport-accept");
+	transport = xmlnode_new_child(sess, "transport");
+	xmlnode_set_namespace(transport, NS_GOOGLE_TRANSPORT_P2P);
+	xmlnode_set_attrib(transport, "name", session_data->channel_name);
+	xmlnode_set_attrib(iq->node, "to", session->remote_jid);
+	xmlnode_set_attrib(iq->node, "from", me);
+	xmlnode_insert_child(iq->node, sess);
+	jabber_iq_send(iq);
+
 	/* send accept */
 	iq = jabber_iq_new(session->js, JABBER_IQ_SET);
 	sess = google_session_create_xmlnode(session, "accept");


More information about the Commits mailing list