Thu, 07 Feb 2019 04:54:05 -0500
Use G_DEFINE_TYPE_WITH_PRIVATE for Purple*Presence.
| 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 | { |
| 37004 | 34 | protocol->id = "prpl-aim"; |
|
36684
ecc74498e088
Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents:
36678
diff
changeset
|
35 | protocol->name = "AIM"; |
|
36590
e77919ff5e74
Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36583
diff
changeset
|
36 | |
|
37761
4b57eced35d5
oscar: Code cleaning by moving AIM/ICQ specific options to oscar.c
Youness Alaoui <kakaroto@kakaroto.homelinux.net>
parents:
37759
diff
changeset
|
37 | oscar_init_account_options(protocol, FALSE); |
|
36684
ecc74498e088
Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents:
36678
diff
changeset
|
38 | } |
|
ecc74498e088
Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents:
36678
diff
changeset
|
39 | |
|
ecc74498e088
Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents:
36678
diff
changeset
|
40 | static void |
|
ecc74498e088
Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents:
36678
diff
changeset
|
41 | aim_protocol_class_init(PurpleProtocolClass *klass) |
|
ecc74498e088
Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents:
36678
diff
changeset
|
42 | { |
|
36735
e336804e65d2
Refactored oscar to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents:
36729
diff
changeset
|
43 | 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
|
44 | } |
|
e77919ff5e74
Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36583
diff
changeset
|
45 | |
|
e77919ff5e74
Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36583
diff
changeset
|
46 | static void |
|
36729
7f9fac14ed60
Temporarily replaced PurpleProtocolInterface with PurpleProtocolClientIface in protocols
Ankit Vani <a@nevitus.org>
parents:
36714
diff
changeset
|
47 | 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
|
48 | { |
|
36729
7f9fac14ed60
Temporarily replaced PurpleProtocolInterface with PurpleProtocolClientIface in protocols
Ankit Vani <a@nevitus.org>
parents:
36714
diff
changeset
|
49 | 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
|
50 | } |
|
e77919ff5e74
Refactored oscar to use the new protocol API
Ankit Vani <a@nevitus.org>
parents:
36583
diff
changeset
|
51 | |
|
36735
e336804e65d2
Refactored oscar to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents:
36729
diff
changeset
|
52 | static void |
|
e336804e65d2
Refactored oscar to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents:
36729
diff
changeset
|
53 | 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
|
54 | { |
|
e336804e65d2
Refactored oscar to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents:
36729
diff
changeset
|
55 | 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
|
56 | 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
|
57 | 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
|
58 | } |
|
e336804e65d2
Refactored oscar to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents:
36729
diff
changeset
|
59 | |
|
36714
ec178f7d66da
Refactored protocols to use the new type definition macros
Ankit Vani <a@nevitus.org>
parents:
36684
diff
changeset
|
60 | PURPLE_DEFINE_TYPE_EXTENDED( |
|
ec178f7d66da
Refactored protocols to use the new type definition macros
Ankit Vani <a@nevitus.org>
parents:
36684
diff
changeset
|
61 | 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
|
62 | |
|
36729
7f9fac14ed60
Temporarily replaced PurpleProtocolInterface with PurpleProtocolClientIface in protocols
Ankit Vani <a@nevitus.org>
parents:
36714
diff
changeset
|
63 | 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
|
64 | aim_protocol_client_iface_init) |
|
e336804e65d2
Refactored oscar to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents:
36729
diff
changeset
|
65 | |
|
e336804e65d2
Refactored oscar to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents:
36729
diff
changeset
|
66 | 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
|
67 | 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
|
68 | ); |