pidgin: 1b389c32: jabber: Add the missing file and fix up ...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Fri Nov 27 02:20:54 EST 2009


-----------------------------------------------------------------
Revision: 1b389c32bb4b40f9b7620c2826fcf26304f619c5
Ancestor: 8dbd11fef62ff86c44ca7059674569c1414c9079
Author: darkrain42 at pidgin.im
Date: 2009-11-26T22:47:53
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/1b389c32bb4b40f9b7620c2826fcf26304f619c5

Added files:
        libpurple/protocols/jabber/namespaces.h
Modified files:
        libpurple/protocols/jabber/Makefile.am
        libpurple/protocols/jabber/google.c
        libpurple/protocols/jabber/iq.c
        libpurple/protocols/jabber/jabber.c

ChangeLog: 

jabber: Add the missing file and fix up the Google session namespaces

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/namespaces.h	8c58aeef3e334c435fd485ccfc89951056d7169e
+++ libpurple/protocols/jabber/namespaces.h	8c58aeef3e334c435fd485ccfc89951056d7169e
@@ -0,0 +1,60 @@
+/*
+ * purple - Jabber Protocol Plugin
+ *
+ * Purple is the legal property of its developers, whose names are too numerous
+ * to list here.  Please refer to the COPYRIGHT file distributed with this
+ * source distribution.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
+ *
+ */
+
+#ifndef PURPLE_JABBER_NAMESPACES_H_
+#define PURPLE_JABBER_NAMESPACES_H_
+
+/* Implementation of XEP-0084 */
+
+/* XEP-0047 IBB (In-band bytestreams) */
+#define NS_IBB "http://jabber.org/protocol/ibb"
+
+/* XEP-0084 v0.12 User Avatar */
+#define NS_AVATAR_0_12_DATA     "http://www.xmpp.org/extensions/xep-0084.html#ns-data"
+#define NS_AVATAR_0_12_METADATA "http://www.xmpp.org/extensions/xep-0084.html#ns-metadata"
+
+/* XEP-0084 v1.1 User Avatar */
+#define NS_AVATAR_1_1_DATA      "urn:xmpp:avatar:data"
+#define NS_AVATAR_1_1_METADATA  "urn:xmpp:avatar:metadata"
+
+/* XEP-0224 Attention */
+#define NS_ATTENTION "urn:xmpp:attention:0"
+
+/* XEP-0231 BoB (Bits of Binary) */
+#define NS_BOB "urn:xmpp:bob"
+
+/* XEP-???? Ping */
+#define NS_PING "urn:xmpp:ping"
+
+/* Google extensions */
+#define NS_GOOGLE_CAMERA "http://www.google.com/xmpp/protocol/camera/v1"
+#define NS_GOOGLE_VIDEO "http://www.google.com/xmpp/protocol/video/v1"
+#define NS_GOOGLE_VOICE "http://www.google.com/xmpp/protocol/voice/v1"
+#define NS_GOOGLE_JINGLE_INFO "google:jingleinfo"
+
+#define NS_GOOGLE_PROTOCOL_SESSION "http://www.google.com/xmpp/protocol/session"
+#define NS_GOOGLE_SESSION "http://www.google.com/session"
+#define NS_GOOGLE_SESSION_PHONE "http://www.google.com/session/phone"
+#define NS_GOOGLE_SESSION_VIDEO "http://www.google.com/session/video"
+
+#endif /* PURPLE_JABBER_NAMESPACES_H_ */
============================================================
--- libpurple/protocols/jabber/Makefile.am	d61f1dcd3d5161bc8a12590ddf89e4f3a787d5c8
+++ libpurple/protocols/jabber/Makefile.am	2c80cc5bb843a8448b4ed0dd9e54ab33eb5a2a62
@@ -48,6 +48,7 @@ JABBERSOURCES = \
 			  jutil.h \
 			  message.c \
 			  message.h \
+			  namespaces.h \
 			  oob.c \
 			  oob.h \
 			  parser.c \
============================================================
--- libpurple/protocols/jabber/google.c	a082078fd126948e8410b57f71e2fc72cab88203
+++ libpurple/protocols/jabber/google.c	a1cb7a21691a5e17dafc6e799ab56c9ecfd88a5d
@@ -81,7 +81,7 @@ google_session_create_xmlnode(GoogleSess
 google_session_create_xmlnode(GoogleSession *session, const char *type)
 {
 	xmlnode *node = xmlnode_new("session");
-	xmlnode_set_namespace(node, "http://www.google.com/session");
+	xmlnode_set_namespace(node, NS_GOOGLE_SESSION);
 	xmlnode_set_attrib(node, "id", session->id.id);
 	xmlnode_set_attrib(node, "initiator", session->id.initiator);
 	xmlnode_set_attrib(node, "type", type);
============================================================
--- libpurple/protocols/jabber/iq.c	6a1eca3bfb209e7192c0f189202cf3510576d016
+++ libpurple/protocols/jabber/iq.c	abec2ce35b510c6566f0465df75b94385792f8e4
@@ -480,7 +480,7 @@ void jabber_iq_init(void)
 	jabber_iq_register_handler("query", "jabber:iq:version",
 			jabber_iq_version_parse);
 #ifdef USE_VV
-	jabber_iq_register_handler("session", "http://www.google.com/session",
+	jabber_iq_register_handler("session", NS_GOOGLE_SESSION,
 		jabber_google_session_parse);
 #endif
 	jabber_iq_register_handler("block", "urn:xmpp:blocking", jabber_blocklist_parse_push);
============================================================
--- libpurple/protocols/jabber/jabber.c	2a2103c185d19595c1814d57c234950068153ef7
+++ libpurple/protocols/jabber/jabber.c	d7ffbc604404c04df3d6d36dfc2f25682339a7af
@@ -3500,7 +3500,7 @@ jabber_init_plugin(PurplePlugin *plugin)
 	jabber_add_feature(JINGLE, 0);
 
 #ifdef USE_VV
-	jabber_add_feature(NS_GOOGLE_SESSION, jabber_audio_enabled);
+	jabber_add_feature(NS_GOOGLE_PROTOCOL_SESSION, jabber_audio_enabled);
 	jabber_add_feature(NS_GOOGLE_VOICE, jabber_audio_enabled);
 	jabber_add_feature(NS_GOOGLE_VIDEO, jabber_video_enabled);
 	jabber_add_feature(NS_GOOGLE_CAMERA, jabber_video_enabled);


More information about the Commits mailing list