# HG changeset patch # User Marcus Lundblad # Date 1222899936 0 # Node ID f763be370afbd682dfc3d6e8acf6511c2594a989 # Parent 04d8a514d2bbee6ec1805e7a7b32d297b51cbfdf Updated to new namespace for XEP-0224. Moved string constants to a #define diff -r 04d8a514d2bb -r f763be370afb libpurple/protocols/jabber/jabber.c --- a/libpurple/protocols/jabber/jabber.c Thu Sep 25 20:08:53 2008 +0000 +++ b/libpurple/protocols/jabber/jabber.c Wed Oct 01 22:25:36 2008 +0000 @@ -2315,7 +2315,7 @@ } for(iter = jbr->caps->features; iter; iter = g_list_next(iter)) { - if(!strcmp(iter->data, "http://www.xmpp.org/extensions/xep-0224.html#ns")) { + if(!strcmp(iter->data, XEP_0224_NAMESPACE)) { xmlnode *buzz, *msg = xmlnode_new("message"); gchar *to; @@ -2327,7 +2327,7 @@ xmlnode_set_attrib(msg, "type", "headline"); buzz = xmlnode_new_child(msg, "attention"); - xmlnode_set_namespace(buzz, "http://www.xmpp.org/extensions/xep-0224.html#ns"); + xmlnode_set_namespace(buzz, XEP_0224_NAMESPACE); jabber_send(js, msg); xmlnode_free(msg); diff -r 04d8a514d2bb -r f763be370afb libpurple/protocols/jabber/libxmpp.c --- a/libpurple/protocols/jabber/libxmpp.c Thu Sep 25 20:08:53 2008 +0000 +++ b/libpurple/protocols/jabber/libxmpp.c Wed Oct 01 22:25:36 2008 +0000 @@ -283,7 +283,7 @@ jabber_add_feature("avatarmeta", AVATARNAMESPACEMETA, jabber_pep_namespace_only_when_pep_enabled_cb); jabber_add_feature("avatardata", AVATARNAMESPACEDATA, jabber_pep_namespace_only_when_pep_enabled_cb); - jabber_add_feature("buzz", "http://www.xmpp.org/extensions/xep-0224.html#ns", + jabber_add_feature("buzz", XEP_0224_NAMESPACE, jabber_buzz_isenabled); jabber_add_feature("bob", XEP_0231_NAMESPACE, jabber_custom_smileys_isenabled); diff -r 04d8a514d2bb -r f763be370afb libpurple/protocols/jabber/message.c --- a/libpurple/protocols/jabber/message.c Thu Sep 25 20:08:53 2008 +0000 +++ b/libpurple/protocols/jabber/message.c Wed Oct 01 22:25:36 2008 +0000 @@ -704,7 +704,7 @@ jm->type = JABBER_MESSAGE_EVENT; for(items = xmlnode_get_child(child,"items"); items; items = items->next) jm->eventitems = g_list_append(jm->eventitems, items); - } else if(!strcmp(child->name, "attention") && !strcmp(xmlns,"http://www.xmpp.org/extensions/xep-0224.html#ns")) { + } else if(!strcmp(child->name, "attention") && !strcmp(xmlns, XEP_0224_NAMESPACE)) { jm->hasBuzz = TRUE; } else if(!strcmp(child->name, "error")) { const char *code = xmlnode_get_attrib(child, "code"); diff -r 04d8a514d2bb -r f763be370afb libpurple/protocols/jabber/message.h --- a/libpurple/protocols/jabber/message.h Thu Sep 25 20:08:53 2008 +0000 +++ b/libpurple/protocols/jabber/message.h Wed Oct 01 22:25:36 2008 +0000 @@ -26,6 +26,8 @@ #include "jabber.h" #include "xmlnode.h" +#define XEP_0224_NAMESPACE "urn:xmpp:attention:0" + typedef struct _JabberMessage { JabberStream *js; enum {