changeset 29027:9feec7d1d95c

jabber: Add the missing file and fix up the Google session namespaces
author Paul Aurich <paul@darkrain42.org>
date Thu, 26 Nov 2009 22:47:53 +0000
parents 7b4ade7c6d8a
children f1437342cc0e
files libpurple/protocols/jabber/Makefile.am libpurple/protocols/jabber/google.c libpurple/protocols/jabber/iq.c libpurple/protocols/jabber/jabber.c libpurple/protocols/jabber/namespaces.h
diffstat 5 files changed, 64 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/Makefile.am	Thu Nov 26 22:35:07 2009 +0000
+++ b/libpurple/protocols/jabber/Makefile.am	Thu Nov 26 22:47:53 2009 +0000
@@ -48,6 +48,7 @@
 			  jutil.h \
 			  message.c \
 			  message.h \
+			  namespaces.h \
 			  oob.c \
 			  oob.h \
 			  parser.c \
--- a/libpurple/protocols/jabber/google.c	Thu Nov 26 22:35:07 2009 +0000
+++ b/libpurple/protocols/jabber/google.c	Thu Nov 26 22:47:53 2009 +0000
@@ -81,7 +81,7 @@
 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);
--- a/libpurple/protocols/jabber/iq.c	Thu Nov 26 22:35:07 2009 +0000
+++ b/libpurple/protocols/jabber/iq.c	Thu Nov 26 22:47:53 2009 +0000
@@ -480,7 +480,7 @@
 	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);
--- a/libpurple/protocols/jabber/jabber.c	Thu Nov 26 22:35:07 2009 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Thu Nov 26 22:47:53 2009 +0000
@@ -3500,7 +3500,7 @@
 	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);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/libpurple/protocols/jabber/namespaces.h	Thu Nov 26 22:47:53 2009 +0000
@@ -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_ */