rename accountopt.[ch] to purpleaccountoption.[ch]
[pidgin-git.git] / libpurple / protocols / oscar / aim.c
bloba73bd37b4459b157b89fb820f01c060a8e23d9e9
1 /* purple
3 * Purple is the legal property of its developers, whose names are too numerous
4 * to list here. Please refer to the COPYRIGHT file distributed with this
5 * source distribution.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
23 #include "aim.h"
25 #include "core.h"
26 #include "plugins.h"
27 #include "signals.h"
29 #include "oscarcommon.h"
31 static void
32 aim_protocol_init(AIMProtocol *self)
34 PurpleProtocol *protocol = PURPLE_PROTOCOL(self);
36 protocol->id = "prpl-aim";
37 protocol->name = "AIM";
39 oscar_init_account_options(protocol, FALSE);
42 static void
43 aim_protocol_class_init(AIMProtocolClass *klass)
45 PurpleProtocolClass *protocol_class = PURPLE_PROTOCOL_CLASS(klass);
47 protocol_class->list_icon = oscar_list_icon_aim;
50 static void
51 aim_protocol_class_finalize(G_GNUC_UNUSED AIMProtocolClass *klass)
55 static void
56 aim_protocol_client_iface_init(PurpleProtocolClientInterface *client_iface)
58 client_iface->get_max_message_size = oscar_get_max_message_size;
61 static void
62 aim_protocol_privacy_iface_init(PurpleProtocolPrivacyInterface *privacy_iface)
64 privacy_iface->add_permit = oscar_add_permit;
65 privacy_iface->rem_permit = oscar_rem_permit;
66 privacy_iface->set_permit_deny = oscar_set_aim_permdeny;
69 G_DEFINE_DYNAMIC_TYPE_EXTENDED(
70 AIMProtocol, aim_protocol, OSCAR_TYPE_PROTOCOL, 0,
72 G_IMPLEMENT_INTERFACE_DYNAMIC(PURPLE_TYPE_PROTOCOL_CLIENT,
73 aim_protocol_client_iface_init)
75 G_IMPLEMENT_INTERFACE_DYNAMIC(PURPLE_TYPE_PROTOCOL_PRIVACY,
76 aim_protocol_privacy_iface_init));
78 /* This exists solely because the above macro makes aim_protocol_register_type
79 * static. */
80 void
81 aim_protocol_register(PurplePlugin *plugin)
83 aim_protocol_register_type(G_TYPE_MODULE(plugin));