Mercurial > pidgin
comparison src/protocols/jabber/disco.c @ 11675:828802f2251b
[gaim-migrate @ 13961]
Jabber User Directory searching...
This works when the stars are aligned, and breaks otherwise. It hasn't been tested on any "x:data" supporting servers (because I don't know of any yet). It doesn't let you know if there was an error. Really, it doesn't do a lot of things. But you can search. You do get results.
The results themselves, however, are a tad off. users.jabber.org is sending back results along the lines of:
<nick>faceprint@faceprint.com</nick><email>faceprint</email>
which is obviously switched. I'll ping the appropriate people to figure that out.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Mon, 17 Oct 2005 01:43:09 +0000 |
parents | ba12d8b12ab0 |
children | a580ffe73314 |
comparison
equal
deleted
inserted
replaced
11674:e860157296d4 | 11675:828802f2251b |
---|---|
104 const char *category = xmlnode_get_attrib(child, "category"); | 104 const char *category = xmlnode_get_attrib(child, "category"); |
105 const char *type = xmlnode_get_attrib(child, "type"); | 105 const char *type = xmlnode_get_attrib(child, "type"); |
106 if(!category || !type) | 106 if(!category || !type) |
107 continue; | 107 continue; |
108 | 108 |
109 /* we found a groupchat or MUC server, add it to the list */ | 109 if(!strcmp(category, "conference") && !strcmp(type, "text")) { |
110 /* XXX: actually check for protocol/muc or gc-1.0 support */ | 110 /* we found a groupchat or MUC server, add it to the list */ |
111 if(!strcmp(category, "conference") && !strcmp(type, "text")) | 111 /* XXX: actually check for protocol/muc or gc-1.0 support */ |
112 js->chat_servers = g_list_append(js->chat_servers, g_strdup(from)); | 112 js->chat_servers = g_list_append(js->chat_servers, g_strdup(from)); |
113 } else if(!strcmp(category, "directory") && !strcmp(type, "user")) { | |
114 /* we found a JUD */ | |
115 js->user_directories = g_list_append(js->user_directories, g_strdup(from)); | |
116 } | |
113 | 117 |
114 } else if(!strcmp(child->name, "feature")) { | 118 } else if(!strcmp(child->name, "feature")) { |
115 const char *var = xmlnode_get_attrib(child, "var"); | 119 const char *var = xmlnode_get_attrib(child, "var"); |
116 if(!var) | 120 if(!var) |
117 continue; | 121 continue; |
120 capabilities |= JABBER_CAP_SI; | 124 capabilities |= JABBER_CAP_SI; |
121 else if(!strcmp(var, "http://jabber.org/protocol/si/profile/file-transfer")) | 125 else if(!strcmp(var, "http://jabber.org/protocol/si/profile/file-transfer")) |
122 capabilities |= JABBER_CAP_SI_FILE_XFER; | 126 capabilities |= JABBER_CAP_SI_FILE_XFER; |
123 else if(!strcmp(var, "http://jabber.org/protocol/bytestreams")) | 127 else if(!strcmp(var, "http://jabber.org/protocol/bytestreams")) |
124 capabilities |= JABBER_CAP_BYTESTREAMS; | 128 capabilities |= JABBER_CAP_BYTESTREAMS; |
129 else if(!strcmp(var, "jabber:iq:search")) | |
130 capabilities |= JABBER_CAP_IQ_SEARCH; | |
131 else if(!strcmp(var, "jabber:iq:register")) | |
132 capabilities |= JABBER_CAP_IQ_REGISTER; | |
125 } | 133 } |
126 } | 134 } |
127 | 135 |
128 capabilities |= JABBER_CAP_RETRIEVED; | 136 capabilities |= JABBER_CAP_RETRIEVED; |
129 | 137 |