Mercurial > pidgin.yaz
comparison libpurple/protocols/jabber/disco.c @ 27062:98ff7c538e48
propagate from branch 'im.pidgin.pidgin' (head 13ac492a493b4d31c8b29905174b43a533304300)
to branch 'im.pidgin.cpw.malu.client_type' (head 2952ce355b5cc07c63a105af4819f176c4c5e9b8)
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Sat, 02 May 2009 06:38:20 +0000 |
parents | 3912f55a1633 eea396f1583c |
children | 84325b6e3568 |
comparison
equal
deleted
inserted
replaced
26836:836a36564ff5 | 27062:98ff7c538e48 |
---|---|
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA | 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
19 * | 19 * |
20 */ | 20 */ |
21 | 21 |
22 #include "internal.h" | 22 #include "internal.h" |
23 #include "core.h" | |
23 #include "prefs.h" | 24 #include "prefs.h" |
24 #include "debug.h" | 25 #include "debug.h" |
25 | 26 |
26 #include "adhoccommands.h" | 27 #include "adhoccommands.h" |
27 #include "buddy.h" | 28 #include "buddy.h" |
115 | 116 |
116 if(node) | 117 if(node) |
117 xmlnode_set_attrib(query, "node", node); | 118 xmlnode_set_attrib(query, "node", node); |
118 | 119 |
119 if(!node || !strcmp(node, CAPS0115_NODE "#" VERSION)) { | 120 if(!node || !strcmp(node, CAPS0115_NODE "#" VERSION)) { |
121 GHashTable *ui_info = purple_core_get_ui_info(); | |
122 const gchar *ui_type = g_hash_table_lookup(ui_info, "client_type"); | |
123 const gchar *type = "pc"; /* default client type, if unknown or | |
124 unspecified */ | |
125 | |
126 if (ui_type) { | |
127 if (strcmp(ui_type, "pc") == 0 || | |
128 strcmp(ui_type, "console") == 0 || | |
129 strcmp(ui_type, "phone") == 0 || | |
130 strcmp(ui_type, "handheld") == 0 || | |
131 strcmp(ui_type, "web") == 0 || | |
132 strcmp(ui_type, "bot") == 0) { | |
133 type = ui_type; | |
134 } | |
135 } | |
120 identity = xmlnode_new_child(query, "identity"); | 136 identity = xmlnode_new_child(query, "identity"); |
121 xmlnode_set_attrib(identity, "category", "client"); | 137 xmlnode_set_attrib(identity, "category", "client"); |
122 xmlnode_set_attrib(identity, "type", "pc"); /* XXX: bot, console, | 138 xmlnode_set_attrib(identity, "type", type); |
123 * handheld, pc, phone, | |
124 * web */ | |
125 xmlnode_set_attrib(identity, "name", PACKAGE); | 139 xmlnode_set_attrib(identity, "name", PACKAGE); |
126 } | 140 } |
127 | 141 |
128 if(!node || !strcmp(node, node_uri)) { | 142 if(!node || !strcmp(node, node_uri)) { |
129 GList *features, *identities; | 143 GList *features, *identities; |