Sat, 11 Jul 2015 14:45:46 -0400
facebook: fixed all errors being marked as fatal
| 15884 | 1 | /* purple |
| 15030 | 2 | * |
| 15884 | 3 | * Purple is the legal property of its developers, whose names are too numerous |
| 15030 | 4 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 5 | * source distribution. | |
| 6 | * | |
| 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. | |
| 11 | * | |
| 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. | |
| 16 | * | |
| 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 | |
|
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 | 20 | * |
| 21 | */ | |
| 22 | ||
|
36666
5739f1f04078
Build a single library for oscar.
Ankit Vani <a@nevitus.org>
parents:
36657
diff
changeset
|
23 | #include "aim.h" |
|
36657
4a7f5f97d1ec
Make sure internal.h is included first
Ankit Vani <a@nevitus.org>
parents:
36653
diff
changeset
|
24 | |
|
36590
e77919ff5e74
Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36583
diff
changeset
|
25 | #include "core.h" |
|
36530
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
26 | #include "plugins.h" |
|
36590
e77919ff5e74
Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36583
diff
changeset
|
27 | #include "signals.h" |
|
36530
b8caab360c96
Refactored oscar to use the new plugin API
Ankit Vani <a@nevitus.org>
parents:
33696
diff
changeset
|
28 | |
| 15030 | 29 | #include "oscarcommon.h" |
|
36590
e77919ff5e74
Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36583
diff
changeset
|
30 | |
|
e77919ff5e74
Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36583
diff
changeset
|
31 | static void |
|
36684
ecc74498e088
Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents:
36678
diff
changeset
|
32 | aim_protocol_init(PurpleProtocol *protocol) |
| 15030 | 33 | { |
|
36590
e77919ff5e74
Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36583
diff
changeset
|
34 | PurpleAccountOption *option; |
|
e77919ff5e74
Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36583
diff
changeset
|
35 | |
| 37004 | 36 | protocol->id = "prpl-aim"; |
|
36684
ecc74498e088
Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents:
36678
diff
changeset
|
37 | protocol->name = "AIM"; |
|
36590
e77919ff5e74
Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36583
diff
changeset
|
38 | |
|
37038
8832d14d7d0c
Rename 'protocol_options' field of PurpleProtocol to more appropriate 'account_options'
Ankit Vani <a@nevitus.org>
parents:
37004
diff
changeset
|
39 | oscar_init_account_options(protocol); |
|
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
|
40 | |
|
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 | 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
|
42 | OSCAR_DEFAULT_ALLOW_MULTIPLE_LOGINS); |
|
37038
8832d14d7d0c
Rename 'protocol_options' field of PurpleProtocol to more appropriate 'account_options'
Ankit Vani <a@nevitus.org>
parents:
37004
diff
changeset
|
43 | protocol->account_options = g_list_append(protocol->account_options, 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
|
44 | |
|
36590
e77919ff5e74
Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36583
diff
changeset
|
45 | option = purple_account_option_string_new(_("Server"), "server", oscar_get_login_server(FALSE, TRUE)); |
|
37038
8832d14d7d0c
Rename 'protocol_options' field of PurpleProtocol to more appropriate 'account_options'
Ankit Vani <a@nevitus.org>
parents:
37004
diff
changeset
|
46 | protocol->account_options = g_list_append(protocol->account_options, option); |
|
36684
ecc74498e088
Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents:
36678
diff
changeset
|
47 | } |
|
ecc74498e088
Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents:
36678
diff
changeset
|
48 | |
|
ecc74498e088
Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents:
36678
diff
changeset
|
49 | static void |
|
ecc74498e088
Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents:
36678
diff
changeset
|
50 | aim_protocol_class_init(PurpleProtocolClass *klass) |
|
ecc74498e088
Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents:
36678
diff
changeset
|
51 | { |
|
36735
e336804e65d2
Refactored oscar to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents:
36729
diff
changeset
|
52 | klass->list_icon = oscar_list_icon_aim; |
|
36590
e77919ff5e74
Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36583
diff
changeset
|
53 | } |
|
e77919ff5e74
Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36583
diff
changeset
|
54 | |
|
e77919ff5e74
Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36583
diff
changeset
|
55 | static void |
|
36729
7f9fac14ed60
Temporarily replaced PurpleProtocolInterface with PurpleProtocolClientIface in protocols
Ankit Vani <a@nevitus.org>
parents:
36714
diff
changeset
|
56 | aim_protocol_client_iface_init(PurpleProtocolClientIface *client_iface) |
|
36590
e77919ff5e74
Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36583
diff
changeset
|
57 | { |
|
36729
7f9fac14ed60
Temporarily replaced PurpleProtocolInterface with PurpleProtocolClientIface in protocols
Ankit Vani <a@nevitus.org>
parents:
36714
diff
changeset
|
58 | client_iface->get_max_message_size = oscar_get_max_message_size; |
|
36590
e77919ff5e74
Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36583
diff
changeset
|
59 | } |
|
e77919ff5e74
Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36583
diff
changeset
|
60 | |
|
36735
e336804e65d2
Refactored oscar to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents:
36729
diff
changeset
|
61 | static void |
|
e336804e65d2
Refactored oscar to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents:
36729
diff
changeset
|
62 | aim_protocol_privacy_iface_init(PurpleProtocolPrivacyIface *privacy_iface) |
|
e336804e65d2
Refactored oscar to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents:
36729
diff
changeset
|
63 | { |
|
e336804e65d2
Refactored oscar to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents:
36729
diff
changeset
|
64 | privacy_iface->add_permit = oscar_add_permit; |
|
e336804e65d2
Refactored oscar to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents:
36729
diff
changeset
|
65 | privacy_iface->rem_permit = oscar_rem_permit; |
|
e336804e65d2
Refactored oscar to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents:
36729
diff
changeset
|
66 | privacy_iface->set_permit_deny = oscar_set_aim_permdeny; |
|
e336804e65d2
Refactored oscar to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents:
36729
diff
changeset
|
67 | } |
|
e336804e65d2
Refactored oscar to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents:
36729
diff
changeset
|
68 | |
|
36714
ec178f7d66da
Refactored protocols to use the new type definition macros
Ankit Vani <a@nevitus.org>
parents:
36684
diff
changeset
|
69 | PURPLE_DEFINE_TYPE_EXTENDED( |
|
ec178f7d66da
Refactored protocols to use the new type definition macros
Ankit Vani <a@nevitus.org>
parents:
36684
diff
changeset
|
70 | AIMProtocol, aim_protocol, OSCAR_TYPE_PROTOCOL, 0, |
|
36735
e336804e65d2
Refactored oscar to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents:
36729
diff
changeset
|
71 | |
|
36729
7f9fac14ed60
Temporarily replaced PurpleProtocolInterface with PurpleProtocolClientIface in protocols
Ankit Vani <a@nevitus.org>
parents:
36714
diff
changeset
|
72 | PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_CLIENT_IFACE, |
|
36735
e336804e65d2
Refactored oscar to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents:
36729
diff
changeset
|
73 | aim_protocol_client_iface_init) |
|
e336804e65d2
Refactored oscar to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents:
36729
diff
changeset
|
74 | |
|
e336804e65d2
Refactored oscar to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents:
36729
diff
changeset
|
75 | PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_PRIVACY_IFACE, |
|
e336804e65d2
Refactored oscar to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents:
36729
diff
changeset
|
76 | aim_protocol_privacy_iface_init) |
|
36714
ec178f7d66da
Refactored protocols to use the new type definition macros
Ankit Vani <a@nevitus.org>
parents:
36684
diff
changeset
|
77 | ); |