diff libpurple/protocols/jabber/disco.c @ 29026:7b4ade7c6d8a

jabber: Start putting all the namespaces in one location with consistent naming.
author Paul Aurich <paul@darkrain42.org>
date Thu, 26 Nov 2009 22:35:07 +0000
parents d6cc51c4e375
children 9ae3e70a327b
line wrap: on
line diff
--- a/libpurple/protocols/jabber/disco.c	Thu Nov 26 19:47:39 2009 +0000
+++ b/libpurple/protocols/jabber/disco.c	Thu Nov 26 22:35:07 2009 +0000
@@ -152,7 +152,7 @@
 			 * advertises as 'voice-v1'.
 			 */
 			xmlnode *feature = xmlnode_new_child(query, "feature");
-			xmlnode_set_attrib(feature, "var", "http://www.google.com/xmpp/protocol/voice/v1");
+			xmlnode_set_attrib(feature, "var", NS_GOOGLE_VOICE);
 		} else if (g_str_equal(node, CAPS0115_NODE "#" "video-v1")) {
 			/*
 			 * HUGE HACK! We advertise this ext (see jabber_presence_create_js
@@ -164,7 +164,7 @@
 			 * advertises as 'video-v1'.
 			 */
 			xmlnode *feature = xmlnode_new_child(query, "feature");
-			xmlnode_set_attrib(feature, "var", "http://www.google.com/xmpp/protocol/video/v1");
+			xmlnode_set_attrib(feature, "var", NS_GOOGLE_VIDEO);
 		} else if (g_str_equal(node, CAPS0115_NODE "#" "camera-v1")) {
 			/*
 			 * HUGE HACK! We advertise this ext (see jabber_presence_create_js
@@ -176,7 +176,7 @@
 			 * advertises as 'camera-v1'.
 			 */
 			xmlnode *feature = xmlnode_new_child(query, "feature");
-			xmlnode_set_attrib(feature, "var", "http://www.google.com/xmpp/protocol/camera/v1");
+			xmlnode_set_attrib(feature, "var", NS_GOOGLE_CAMERA);
 #endif
 		} else {
 			xmlnode *error, *inf;
@@ -290,7 +290,7 @@
 					capabilities |= JABBER_CAP_IQ_SEARCH;
 				else if(!strcmp(var, "jabber:iq:register"))
 					capabilities |= JABBER_CAP_IQ_REGISTER;
-				else if(!strcmp(var, "urn:xmpp:ping"))
+				else if(!strcmp(var, NS_PING))
 					capabilities |= JABBER_CAP_PING;
 				else if(!strcmp(var, "http://jabber.org/protocol/disco#items"))
 					capabilities |= JABBER_CAP_ITEMS;