comparison libpurple/protocols/jabber/jabber.c @ 27064:007dff3cb9e4

Fixup after propagating new caps stuff
author Marcus Lundblad <ml@update.uu.se>
date Thu, 07 May 2009 21:20:16 +0000
parents 84325b6e3568
children 2dfb639b4f26
comparison
equal deleted inserted replaced
27063:84325b6e3568 27064:007dff3cb9e4
21 #include "internal.h" 21 #include "internal.h"
22 22
23 #include "account.h" 23 #include "account.h"
24 #include "accountopt.h" 24 #include "accountopt.h"
25 #include "blist.h" 25 #include "blist.h"
26 #include "core.h"
26 #include "cmds.h" 27 #include "cmds.h"
27 #include "connection.h" 28 #include "connection.h"
28 #include "conversation.h" 29 #include "conversation.h"
29 #include "debug.h" 30 #include "debug.h"
30 #include "dnssrv.h" 31 #include "dnssrv.h"
3351 } 3352 }
3352 3353
3353 void 3354 void
3354 jabber_init_plugin(PurplePlugin *plugin) 3355 jabber_init_plugin(PurplePlugin *plugin)
3355 { 3356 {
3357 GHashTable *ui_info = purple_core_get_ui_info();
3358 const gchar *ui_type = g_hash_table_lookup(ui_info, "client_type");
3359 const gchar *type = "pc"; /* default client type, if unknown or
3360 unspecified */
3361
3362 if (ui_type) {
3363 if (strcmp(ui_type, "pc") == 0 ||
3364 strcmp(ui_type, "console") == 0 ||
3365 strcmp(ui_type, "phone") == 0 ||
3366 strcmp(ui_type, "handheld") == 0 ||
3367 strcmp(ui_type, "web") == 0 ||
3368 strcmp(ui_type, "bot") == 0) {
3369 type = ui_type;
3370 }
3371 }
3356 my_protocol = plugin; 3372 my_protocol = plugin;
3357 3373
3358 jabber_add_identity("client", "pc", NULL, PACKAGE); 3374 jabber_add_identity("client", type, NULL, PACKAGE);
3359 3375
3360 /* initialize jabber_features list */ 3376 /* initialize jabber_features list */
3361 jabber_add_feature("jabber:iq:last", 0); 3377 jabber_add_feature("jabber:iq:last", 0);
3362 jabber_add_feature("jabber:iq:oob", 0); 3378 jabber_add_feature("jabber:iq:oob", 0);
3363 jabber_add_feature("jabber:iq:time", 0); 3379 jabber_add_feature("jabber:iq:time", 0);