--- a/libpurple/protocols/jabber/google.c Mon Nov 23 21:32:39 2009 +0000 +++ b/libpurple/protocols/jabber/google.c Sun Nov 29 18:53:11 2009 +0000 @@ -37,9 +37,6 @@ #ifdef USE_VV -#define NS_GOOGLE_VIDEO "http://www.google.com/session/video" -#define NS_GOOGLE_PHONE "http://www.google.com/session/phone" - typedef struct { char *id; char *initiator; @@ -86,7 +83,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); @@ -215,9 +212,9 @@ xmlnode_insert_child(iq->node, sess); desc = xmlnode_new_child(sess, "description"); if (session->video) - xmlnode_set_namespace(desc, NS_GOOGLE_VIDEO); + xmlnode_set_namespace(desc, NS_GOOGLE_SESSION_VIDEO); else - xmlnode_set_namespace(desc, NS_GOOGLE_PHONE); + xmlnode_set_namespace(desc, NS_GOOGLE_SESSION_PHONE); codecs = purple_media_get_codecs(media, "google-video"); @@ -250,7 +247,7 @@ purple_media_codec_get_clock_rate(codec)); payload = xmlnode_new_child(desc, "payload-type"); if (session->video) - xmlnode_set_namespace(payload, NS_GOOGLE_PHONE); + xmlnode_set_namespace(payload, NS_GOOGLE_SESSION_PHONE); xmlnode_set_attrib(payload, "id", id); /* * Hack to make Gmail accept speex as the codec. @@ -613,7 +610,7 @@ id = xmlnode_get_attrib(codec_element, "id"); if (!session->video || - (xmlns && !strcmp(xmlns, NS_GOOGLE_PHONE))) { + (xmlns && !strcmp(xmlns, NS_GOOGLE_SESSION_PHONE))) { clock_rate = xmlnode_get_attrib( codec_element, "clockrate"); video = FALSE; @@ -790,7 +787,7 @@ GList *codecs = NULL, *video_codecs = NULL; JabberIq *result = NULL; const gchar *xmlns = xmlnode_get_namespace(desc_element); - gboolean video = (xmlns && !strcmp(xmlns, NS_GOOGLE_VIDEO)); + gboolean video = (xmlns && !strcmp(xmlns, NS_GOOGLE_SESSION_VIDEO)); for (; codec_element; codec_element = codec_element->next) { const gchar *xmlns, *encoding_name, *id, @@ -804,7 +801,7 @@ encoding_name = xmlnode_get_attrib(codec_element, "name"); id = xmlnode_get_attrib(codec_element, "id"); - if (!video || purple_strequal(xmlns, NS_GOOGLE_PHONE)) + if (!video || purple_strequal(xmlns, NS_GOOGLE_SESSION_PHONE)) clock_rate = xmlnode_get_attrib( codec_element, "clockrate"); else { @@ -1080,7 +1077,7 @@ purple_debug_misc("jabber", "Got new mail notification. Sending request for more info\n"); - iq = jabber_iq_new_query(js, JABBER_IQ_GET, "google:mail:notify"); + iq = jabber_iq_new_query(js, JABBER_IQ_GET, NS_GOOGLE_MAIL_NOTIFY); jabber_iq_set_callback(iq, jabber_gmail_parse, NULL); query = xmlnode_get_child(iq->node, "query"); @@ -1114,7 +1111,7 @@ xmlnode_set_attrib(mailnotifications, "value", "true"); jabber_iq_send(iq); - iq = jabber_iq_new_query(js, JABBER_IQ_GET, "google:mail:notify"); + iq = jabber_iq_new_query(js, JABBER_IQ_GET, NS_GOOGLE_MAIL_NOTIFY); jabber_iq_set_callback(iq, jabber_gmail_parse, NULL); jabber_iq_send(iq); } @@ -1584,7 +1581,7 @@ xmlnode *packet, gpointer data) { xmlnode *query = xmlnode_get_child_with_namespace(packet, "query", - GOOGLE_JINGLE_INFO_NAMESPACE); + NS_GOOGLE_JINGLE_INFO); if (query) jabber_google_jingle_info_common(js, from, type, query); @@ -1604,7 +1601,7 @@ jabber_google_send_jingle_info(JabberStream *js) { JabberIq *jingle_info = - jabber_iq_new_query(js, JABBER_IQ_GET, GOOGLE_JINGLE_INFO_NAMESPACE); + jabber_iq_new_query(js, JABBER_IQ_GET, NS_GOOGLE_JINGLE_INFO); jabber_iq_set_callback(jingle_info, jabber_google_jingle_info_cb, NULL);