libpurple/protocols/oscar/libaim.c

Mon, 02 Sep 2013 03:40:52 +0530

author
Ankit Vani <a@nevitus.org>
date
Mon, 02 Sep 2013 03:40:52 +0530
branch
soc.2013.gobjectification.plugins
changeset 36650
7b581b0a96d4
parent 36638
5f6dcd83e8c1
child 36651
13a650a1dba6
permissions
-rw-r--r--

Initialize oscar protocol options in libaim and libicq so that they know who they are

15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15685
diff changeset
1 /* purple
15030
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
2 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15685
diff changeset
3 * Purple is the legal property of its developers, whose names are too numerous
15030
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
4 * to list here. Please refer to the COPYRIGHT file distributed with this
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
5 * source distribution.
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
6 *
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
10 * (at your option) any later version.
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
11 *
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
15 * GNU General Public License for more details.
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
16 *
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
19859
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 19050
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
15030
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
20 *
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
21 */
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
22
30402
80efab176d1f Minor comment fix.
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 30138
diff changeset
23 /* libaim is the AIM protocol plugin. It is linked against liboscar,
15030
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
24 * which contains all the shared implementation code with libicq
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
25 */
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
26
36590
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
27 #include "core.h"
36530
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
28 #include "plugins.h"
36590
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
29 #include "signals.h"
36530
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
30
36590
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
31 #include "libaim.h"
15030
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
32 #include "oscarcommon.h"
36590
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
33
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
34 static PurpleProtocol *my_protocol = NULL;
15030
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
35
36590
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
36 static void
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
37 aim_protocol_base_init(AIMProtocolClass *klass)
15030
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
38 {
36590
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
39 PurpleProtocolClass *proto_class = PURPLE_PROTOCOL_CLASS(klass);
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
40 PurpleAccountOption *option;
36650
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
41 static const gchar *encryption_keys[] = {
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
42 N_("Use encryption if available"),
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
43 N_("Require encryption"),
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
44 N_("Don't use encryption"),
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
45 NULL
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
46 };
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
47 static const gchar *encryption_values[] = {
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
48 OSCAR_OPPORTUNISTIC_ENCRYPTION,
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
49 OSCAR_REQUIRE_ENCRYPTION,
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
50 OSCAR_NO_ENCRYPTION,
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
51 NULL
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
52 };
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
53 GList *encryption_options = NULL;
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
54 int i;
36590
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
55
36638
5f6dcd83e8c1 Seperate plugin and protocol IDs. Protocol ID example: "msn". Plugin ID example: "protocol-msn".
Ankit Vani <a@nevitus.org>
parents: 36628
diff changeset
56 proto_class->id = "aim";
5f6dcd83e8c1 Seperate plugin and protocol IDs. Protocol ID example: "msn". Plugin ID example: "protocol-msn".
Ankit Vani <a@nevitus.org>
parents: 36628
diff changeset
57 proto_class->name = "AIM";
36590
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
58
36650
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
59 option = purple_account_option_int_new(_("Port"), "port", OSCAR_DEFAULT_LOGIN_PORT);
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
60 proto_class->protocol_options = g_list_append(proto_class->protocol_options, option);
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
61
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
62 for (i = 0; encryption_keys[i]; i++) {
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
63 PurpleKeyValuePair *kvp = g_new0(PurpleKeyValuePair, 1);
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
64 kvp->key = g_strdup(_(encryption_keys[i]));
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
65 kvp->value = g_strdup(encryption_values[i]);
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
66 encryption_options = g_list_append(encryption_options, kvp);
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
67 }
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
68 option = purple_account_option_list_new(_("Connection security"), "encryption", encryption_options);
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
69 proto_class->protocol_options = g_list_append(proto_class->protocol_options, option);
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
70
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
71 option = purple_account_option_bool_new(_("Use clientLogin"), "use_clientlogin",
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
72 OSCAR_DEFAULT_USE_CLIENTLOGIN);
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
73 proto_class->protocol_options = g_list_append(proto_class->protocol_options, option);
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
74
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
75 option = purple_account_option_bool_new(
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
76 _("Always use AIM proxy server for\nfile transfers and direct IM (slower,\nbut does not reveal your IP address)"), "always_use_rv_proxy",
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
77 OSCAR_DEFAULT_ALWAYS_USE_RV_PROXY);
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
78 proto_class->protocol_options = g_list_append(proto_class->protocol_options, option);
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
79
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
80 option = purple_account_option_bool_new(_("Allow multiple simultaneous logins"), "allow_multiple_logins",
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
81 OSCAR_DEFAULT_ALLOW_MULTIPLE_LOGINS);
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
82 proto_class->protocol_options = g_list_append(proto_class->protocol_options, option);
7b581b0a96d4 Initialize oscar protocol options in libaim and libicq so that they know who they are
Ankit Vani <a@nevitus.org>
parents: 36638
diff changeset
83
36590
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
84 option = purple_account_option_string_new(_("Server"), "server", oscar_get_login_server(FALSE, TRUE));
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
85 proto_class->protocol_options = g_list_append(proto_class->protocol_options, option);
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
86 }
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
87
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
88 static void
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
89 aim_protocol_interface_init(PurpleProtocolInterface *iface)
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
90 {
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
91 iface->list_icon = oscar_list_icon_aim;
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
92 iface->add_permit = oscar_add_permit;
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
93 iface->rem_permit = oscar_rem_permit;
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
94 iface->set_permit_deny = oscar_set_aim_permdeny;
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
95 iface->get_max_message_size = oscar_get_max_message_size;
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
96 }
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
97
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
98 static void aim_protocol_base_finalize(AIMProtocolClass *klass) { }
15030
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
99
36530
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
100 static PurplePluginInfo *
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
101 plugin_query(GError **error)
15030
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
102 {
36530
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
103 return purple_plugin_info_new(
36638
5f6dcd83e8c1 Seperate plugin and protocol IDs. Protocol ID example: "msn". Plugin ID example: "protocol-msn".
Ankit Vani <a@nevitus.org>
parents: 36628
diff changeset
104 "id", "protocol-aim",
5f6dcd83e8c1 Seperate plugin and protocol IDs. Protocol ID example: "msn". Plugin ID example: "protocol-msn".
Ankit Vani <a@nevitus.org>
parents: 36628
diff changeset
105 "name", "AIM Protocol",
36530
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
106 "version", DISPLAY_VERSION,
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
107 "category", N_("Protocol"),
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
108 "summary", N_("AIM Protocol Plugin"),
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
109 "description", N_("AIM Protocol Plugin"),
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
110 "website", PURPLE_WEBSITE,
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
111 "abi-version", PURPLE_ABI_VERSION,
36536
07f8c9889257 Added flags to all prpls
Ankit Vani <a@nevitus.org>
parents: 36530
diff changeset
112 "flags", GPLUGIN_PLUGIN_INFO_FLAGS_INTERNAL |
07f8c9889257 Added flags to all prpls
Ankit Vani <a@nevitus.org>
parents: 36530
diff changeset
113 GPLUGIN_PLUGIN_INFO_FLAGS_LOAD_ON_QUERY,
36530
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
114 NULL
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
115 );
15030
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
116 }
6a6cf7be07ea [gaim-migrate @ 17747]
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
117
36530
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
118 static gboolean
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
119 plugin_load(PurplePlugin *plugin, GError **error)
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
120 {
36628
3d43ca8d69ee Refactored the protocols to use the error argument of purple_protocols_{add/remove}
Ankit Vani <a@nevitus.org>
parents: 36613
diff changeset
121 my_protocol = purple_protocols_add(AIM_TYPE_PROTOCOL, error);
3d43ca8d69ee Refactored the protocols to use the error argument of purple_protocols_{add/remove}
Ankit Vani <a@nevitus.org>
parents: 36613
diff changeset
122 if (!my_protocol)
36590
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
123 return FALSE;
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
124
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
125 purple_signal_connect(purple_get_core(), "uri-handler", my_protocol,
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
126 PURPLE_CALLBACK(oscar_uri_handler), NULL);
36530
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
127
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
128 return TRUE;
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
129 }
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
130
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
131 static gboolean
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
132 plugin_unload(PurplePlugin *plugin, GError **error)
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
133 {
36628
3d43ca8d69ee Refactored the protocols to use the error argument of purple_protocols_{add/remove}
Ankit Vani <a@nevitus.org>
parents: 36613
diff changeset
134 if (!purple_protocols_remove(my_protocol, error))
36590
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
135 return FALSE;
36530
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
136
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
137 return TRUE;
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
138 }
b8caab360c96 Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents: 33696
diff changeset
139
36613
0e96218aa13a Refactored the protocols to use the new macros, to allow for static or dynamic loading of types as configured
Ankit Vani <a@nevitus.org>
parents: 36590
diff changeset
140 extern PurplePlugin *_oscar_plugin;
0e96218aa13a Refactored the protocols to use the new macros, to allow for static or dynamic loading of types as configured
Ankit Vani <a@nevitus.org>
parents: 36590
diff changeset
141
0e96218aa13a Refactored the protocols to use the new macros, to allow for static or dynamic loading of types as configured
Ankit Vani <a@nevitus.org>
parents: 36590
diff changeset
142 PURPLE_PROTOCOL_DEFINE_EXTENDED(_oscar_plugin, AIMProtocol, aim_protocol,
36590
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
143 OSCAR_TYPE_PROTOCOL, 0);
e77919ff5e74 Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents: 36583
diff changeset
144
36613
0e96218aa13a Refactored the protocols to use the new macros, to allow for static or dynamic loading of types as configured
Ankit Vani <a@nevitus.org>
parents: 36590
diff changeset
145 PURPLE_PLUGIN_INIT_VAL(_oscar_plugin, aim, plugin_query, plugin_load,
0e96218aa13a Refactored the protocols to use the new macros, to allow for static or dynamic loading of types as configured
Ankit Vani <a@nevitus.org>
parents: 36590
diff changeset
146 plugin_unload);

mercurial