comparison libpurple/protocols/jabber/disco.c @ 17566:0370da969e8a

Implemented adding callbacks for PEP events. Moved the feature list to be application-global instead of per-connection (makes more sense).
author Andreas Monitzer <pidgin@monitzer.com>
date Wed, 06 Jun 2007 02:07:53 +0000
parents 95affacf6f82
children e49b259fc7dd
comparison
equal deleted inserted replaced
17565:2f67cb504a51 17566:0370da969e8a
98 SUPPORT_FEATURE("http://jabber.org/protocol/xhtml-im") 98 SUPPORT_FEATURE("http://jabber.org/protocol/xhtml-im")
99 SUPPORT_FEATURE("http://www.xmpp.org/extensions/xep-0199.html#ns") 99 SUPPORT_FEATURE("http://www.xmpp.org/extensions/xep-0199.html#ns")
100 100
101 if(!node) { /* non-caps disco#info, add all extensions */ 101 if(!node) { /* non-caps disco#info, add all extensions */
102 GList *features; 102 GList *features;
103 for(features = js->features; features; features = features->next) { 103 for(features = jabber_features; features; features = features->next) {
104 JabberFeature *feat = (JabberFeature*)features->data; 104 JabberFeature *feat = (JabberFeature*)features->data;
105 SUPPORT_FEATURE(feat->namespace); 105 SUPPORT_FEATURE(feat->namespace);
106 } 106 }
107 } 107 }
108 } else { 108 } else {
124 } 124 }
125 125
126 if(ext != NULL) { 126 if(ext != NULL) {
127 /* look for that ext */ 127 /* look for that ext */
128 GList *features; 128 GList *features;
129 for(features = js->features; features; features = features->next) { 129 for(features = jabber_features; features; features = features->next) {
130 JabberFeature *feat = (JabberFeature*)features->data; 130 JabberFeature *feat = (JabberFeature*)features->data;
131 if(!strcmp(feat->shortname, ext)) { 131 if(!strcmp(feat->shortname, ext)) {
132 SUPPORT_FEATURE(feat->namespace); 132 SUPPORT_FEATURE(feat->namespace);
133 break; 133 break;
134 } 134 }
305 for (child = xmlnode_get_child(query, "identity"); child; 305 for (child = xmlnode_get_child(query, "identity"); child;
306 child = xmlnode_get_next_twin(child)) { 306 child = xmlnode_get_next_twin(child)) {
307 const char *category, *type, *name; 307 const char *category, *type, *name;
308 category = xmlnode_get_attrib(child, "category"); 308 category = xmlnode_get_attrib(child, "category");
309 type = xmlnode_get_attrib(child, "type"); 309 type = xmlnode_get_attrib(child, "type");
310 if(category && type && !strcmp(category, "pubsub") && !strcmp(type,"pep")) { 310 if(category && type && !strcmp(category, "pubsub") && !strcmp(type,"pep"))
311 /* server supports pep, initialize it */ 311 js->pep = TRUE;
312 jabber_pep_init(js);
313 }
314 if (!category || strcmp(category, "server")) 312 if (!category || strcmp(category, "server"))
315 continue; 313 continue;
316 if (!type || strcmp(type, "im")) 314 if (!type || strcmp(type, "im"))
317 continue; 315 continue;
318 316