Mercurial > pidgin.yaz
comparison libpurple/protocols/jabber/disco.c @ 25690:3da0957e7821
propagate from branch 'im.pidgin.pidgin' (head 868098fbe53290a8abcc3307c6fec2c6054a5e00)
to branch 'im.pidgin.soc.2008.vv' (head eb4a2834050e39f5387e97121b534adb7ffd1234)
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Thu, 26 Jun 2008 20:25:38 +0000 |
parents | 48fe9a9e20e2 |
children | 4bc74deeb503 |
comparison
equal
deleted
inserted
replaced
23394:eac0561dfd55 | 25690:3da0957e7821 |
---|---|
77 | 77 |
78 | 78 |
79 void jabber_disco_info_parse(JabberStream *js, xmlnode *packet) { | 79 void jabber_disco_info_parse(JabberStream *js, xmlnode *packet) { |
80 const char *from = xmlnode_get_attrib(packet, "from"); | 80 const char *from = xmlnode_get_attrib(packet, "from"); |
81 const char *type = xmlnode_get_attrib(packet, "type"); | 81 const char *type = xmlnode_get_attrib(packet, "type"); |
82 | 82 |
83 if(!from || !type) | 83 if(!from || !type) |
84 return; | 84 return; |
85 | 85 |
86 if(!strcmp(type, "get")) { | 86 if(!strcmp(type, "get")) { |
87 xmlnode *query, *identity, *feature; | 87 xmlnode *query, *identity, *feature; |
103 xmlnode_set_attrib(iq->node, "to", from); | 103 xmlnode_set_attrib(iq->node, "to", from); |
104 query = xmlnode_get_child(iq->node, "query"); | 104 query = xmlnode_get_child(iq->node, "query"); |
105 | 105 |
106 if(node) | 106 if(node) |
107 xmlnode_set_attrib(query, "node", node); | 107 xmlnode_set_attrib(query, "node", node); |
108 | 108 |
109 if(!node || !strcmp(node, CAPS0115_NODE "#" VERSION)) { | 109 if(!node || !strcmp(node, CAPS0115_NODE "#" VERSION)) { |
110 identity = xmlnode_new_child(query, "identity"); | 110 identity = xmlnode_new_child(query, "identity"); |
111 xmlnode_set_attrib(identity, "category", "client"); | 111 xmlnode_set_attrib(identity, "category", "client"); |
112 xmlnode_set_attrib(identity, "type", "pc"); /* XXX: bot, console, | 112 xmlnode_set_attrib(identity, "type", "pc"); /* XXX: bot, console, |
113 * handheld, pc, phone, | 113 * handheld, pc, phone, |
140 JabberFeature *feat = (JabberFeature*)features->data; | 140 JabberFeature *feat = (JabberFeature*)features->data; |
141 if(feat->is_enabled == NULL || feat->is_enabled(js, feat->shortname, feat->namespace) == TRUE) | 141 if(feat->is_enabled == NULL || feat->is_enabled(js, feat->shortname, feat->namespace) == TRUE) |
142 SUPPORT_FEATURE(feat->namespace); | 142 SUPPORT_FEATURE(feat->namespace); |
143 } | 143 } |
144 } | 144 } |
145 #ifdef USE_VV | |
146 } else if (node && !strcmp(node, CAPS0115_NODE "#voice-v1")) { | |
147 SUPPORT_FEATURE("http://www.google.com/session"); | |
148 SUPPORT_FEATURE("http://www.google.com/transport/p2p"); | |
149 SUPPORT_FEATURE("http://www.google.com/transport/raw-udp"); | |
150 SUPPORT_FEATURE("http://www.google.com/session/phone"); | |
151 SUPPORT_FEATURE("urn:xmpp:tmp:jingle"); | |
152 SUPPORT_FEATURE("urn:xmpp:tmp:jingle:apps:rtp#audio"); | |
153 SUPPORT_FEATURE("urn:xmpp:tmp:jingle:apps:rtp#video"); | |
154 SUPPORT_FEATURE("urn:xmpp:tmp:jingle:transports:ice-udp"); | |
155 #endif | |
145 } else { | 156 } else { |
146 const char *ext = NULL; | 157 const char *ext = NULL; |
147 unsigned pos; | 158 unsigned pos; |
148 unsigned nodelen = strlen(node); | 159 unsigned nodelen = strlen(node); |
149 unsigned capslen = strlen(CAPS0115_NODE); | 160 unsigned capslen = strlen(CAPS0115_NODE); |