Tue, 01 Oct 2019 07:19:14 +0000
Merged in default (pull request #578)
Remove Purple type macros
|
36582
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
1 | /* purple |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
2 | * |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
3 | * Purple is the legal property of its developers, whose names are too numerous |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
4 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
5 | * source distribution. |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
6 | * |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
7 | * This program is free software; you can redistribute it and/or modify |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
8 | * it under the terms of the GNU General Public License as published by |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
9 | * the Free Software Foundation; either version 2 of the License, or |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
10 | * (at your option) any later version. |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
11 | * |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
12 | * This program is distributed in the hope that it will be useful, |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
15 | * GNU General Public License for more details. |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
16 | * |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
17 | * You should have received a copy of the GNU General Public License |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
18 | * along with this program; if not, write to the Free Software |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
20 | * |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
21 | */ |
|
39819
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39556
diff
changeset
|
22 | |
|
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39556
diff
changeset
|
23 | #ifndef PURPLE_JABBER_XMPP_H |
|
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39556
diff
changeset
|
24 | #define PURPLE_JABBER_XMPP_H |
|
36582
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
25 | |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
26 | #include "jabber.h" |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
27 | |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
28 | #define XMPP_TYPE_PROTOCOL (xmpp_protocol_get_type()) |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
29 | #define XMPP_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), XMPP_TYPE_PROTOCOL, XMPPProtocol)) |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
30 | #define XMPP_PROTOCOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), XMPP_TYPE_PROTOCOL, XMPPProtocolClass)) |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
31 | #define XMPP_IS_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), XMPP_TYPE_PROTOCOL)) |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
32 | #define XMPP_IS_PROTOCOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), XMPP_TYPE_PROTOCOL)) |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
33 | #define XMPP_PROTOCOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), XMPP_TYPE_PROTOCOL, XMPPProtocolClass)) |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
34 | |
|
39556
622bf98df0ac
Remove unnecessary struct tags.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
36775
diff
changeset
|
35 | typedef struct |
|
36582
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
36 | { |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
37 | JabberProtocol parent; |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
38 | } XMPPProtocol; |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
39 | |
|
39556
622bf98df0ac
Remove unnecessary struct tags.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
36775
diff
changeset
|
40 | typedef struct |
|
36582
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
41 | { |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
42 | JabberProtocolClass parent_class; |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
43 | } XMPPProtocolClass; |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
44 | |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
45 | /** |
|
36714
ec178f7d66da
Refactored protocols to use the new type definition macros
Ankit Vani <a@nevitus.org>
parents:
36665
diff
changeset
|
46 | * Registers the XMPPProtocol type in the type system. |
|
ec178f7d66da
Refactored protocols to use the new type definition macros
Ankit Vani <a@nevitus.org>
parents:
36665
diff
changeset
|
47 | */ |
|
39894
7eab91ea30a1
Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39556
diff
changeset
|
48 | G_GNUC_INTERNAL |
|
7eab91ea30a1
Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39556
diff
changeset
|
49 | void xmpp_protocol_register(PurplePlugin *plugin); |
|
36714
ec178f7d66da
Refactored protocols to use the new type definition macros
Ankit Vani <a@nevitus.org>
parents:
36665
diff
changeset
|
50 | |
|
ec178f7d66da
Refactored protocols to use the new type definition macros
Ankit Vani <a@nevitus.org>
parents:
36665
diff
changeset
|
51 | /** |
|
36582
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
52 | * Returns the GType for the XMPPProtocol object. |
|
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
53 | */ |
|
36775
5e59f252d777
Added G_MODULE_EXPORT declaration to protocol get_type() functions
Ankit Vani <a@nevitus.org>
parents:
36714
diff
changeset
|
54 | G_MODULE_EXPORT GType xmpp_protocol_get_type(void); |
|
36582
095b9c85c45c
Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff
changeset
|
55 | |
|
39819
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39556
diff
changeset
|
56 | #endif /* PURPLE_JABBER_XMPP_H */ |