libpurple/protocols/oscar/libaim.c

branch
soc.2013.gobjectification.plugins
changeset 36651
13a650a1dba6
parent 36650
7b581b0a96d4
child 36653
4084c34c051d
equal deleted inserted replaced
36650:7b581b0a96d4 36651:13a650a1dba6
36 static void 36 static void
37 aim_protocol_base_init(AIMProtocolClass *klass) 37 aim_protocol_base_init(AIMProtocolClass *klass)
38 { 38 {
39 PurpleProtocolClass *proto_class = PURPLE_PROTOCOL_CLASS(klass); 39 PurpleProtocolClass *proto_class = PURPLE_PROTOCOL_CLASS(klass);
40 PurpleAccountOption *option; 40 PurpleAccountOption *option;
41 static const gchar *encryption_keys[] = {
42 N_("Use encryption if available"),
43 N_("Require encryption"),
44 N_("Don't use encryption"),
45 NULL
46 };
47 static const gchar *encryption_values[] = {
48 OSCAR_OPPORTUNISTIC_ENCRYPTION,
49 OSCAR_REQUIRE_ENCRYPTION,
50 OSCAR_NO_ENCRYPTION,
51 NULL
52 };
53 GList *encryption_options = NULL;
54 int i;
55 41
56 proto_class->id = "aim"; 42 proto_class->id = "aim";
57 proto_class->name = "AIM"; 43 proto_class->name = "AIM";
58 44
59 option = purple_account_option_int_new(_("Port"), "port", OSCAR_DEFAULT_LOGIN_PORT); 45 oscar_init_protocol_options(proto_class);
60 proto_class->protocol_options = g_list_append(proto_class->protocol_options, option);
61
62 for (i = 0; encryption_keys[i]; i++) {
63 PurpleKeyValuePair *kvp = g_new0(PurpleKeyValuePair, 1);
64 kvp->key = g_strdup(_(encryption_keys[i]));
65 kvp->value = g_strdup(encryption_values[i]);
66 encryption_options = g_list_append(encryption_options, kvp);
67 }
68 option = purple_account_option_list_new(_("Connection security"), "encryption", encryption_options);
69 proto_class->protocol_options = g_list_append(proto_class->protocol_options, option);
70
71 option = purple_account_option_bool_new(_("Use clientLogin"), "use_clientlogin",
72 OSCAR_DEFAULT_USE_CLIENTLOGIN);
73 proto_class->protocol_options = g_list_append(proto_class->protocol_options, option);
74
75 option = purple_account_option_bool_new(
76 _("Always use AIM proxy server for\nfile transfers and direct IM (slower,\nbut does not reveal your IP address)"), "always_use_rv_proxy",
77 OSCAR_DEFAULT_ALWAYS_USE_RV_PROXY);
78 proto_class->protocol_options = g_list_append(proto_class->protocol_options, option);
79 46
80 option = purple_account_option_bool_new(_("Allow multiple simultaneous logins"), "allow_multiple_logins", 47 option = purple_account_option_bool_new(_("Allow multiple simultaneous logins"), "allow_multiple_logins",
81 OSCAR_DEFAULT_ALLOW_MULTIPLE_LOGINS); 48 OSCAR_DEFAULT_ALLOW_MULTIPLE_LOGINS);
82 proto_class->protocol_options = g_list_append(proto_class->protocol_options, option); 49 proto_class->protocol_options = g_list_append(proto_class->protocol_options, option);
83 50

mercurial