Mercurial > pidgin.yaz
changeset 24123:f763be370afb
Updated to new namespace for XEP-0224.
Moved string constants to a #define
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Wed, 01 Oct 2008 22:25:36 +0000 |
parents | 04d8a514d2bb |
children | 6baa6a829a90 |
files | libpurple/protocols/jabber/jabber.c libpurple/protocols/jabber/libxmpp.c libpurple/protocols/jabber/message.c libpurple/protocols/jabber/message.h |
diffstat | 4 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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);
--- 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);
--- 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");
--- 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 {