libpurple/protocols/jabber/libgtalk.h

Tue, 27 Aug 2013 04:08:20 +0530

author
Ankit Vani <a@nevitus.org>
date
Tue, 27 Aug 2013 04:08:20 +0530
branch
soc.2013.gobjectification.plugins
changeset 36582
095b9c85c45c
child 36628
3d43ca8d69ee
permissions
-rw-r--r--

Refactored jabber to use the new protocol API.
XMPPProtocol, GTalkProtocol and FacebookProtocol inherit JabberProtocol.

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 */
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
22 #ifndef _LIBGTALK_H_
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
23 #define _LIBGTALK_H_
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
24
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
25 #include "jabber.h"
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
26
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
27 #define GTALK_ID "prpl-gtalk"
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
28 #define GTALK_NAME "Google Talk (XMPP)"
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
29 #define GTALK_DOMAIN (g_quark_from_static_string(GTALK_ID))
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
30
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
31 #define GTALK_TYPE_PROTOCOL (gtalk_protocol_get_type())
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
32 #define GTALK_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTALK_TYPE_PROTOCOL, GTalkProtocol))
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
33 #define GTALK_PROTOCOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GTALK_TYPE_PROTOCOL, GTalkProtocolClass))
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
34 #define GTALK_IS_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GTALK_TYPE_PROTOCOL))
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
35 #define GTALK_IS_PROTOCOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GTALK_TYPE_PROTOCOL))
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
36 #define GTALK_PROTOCOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTALK_TYPE_PROTOCOL, GTalkProtocolClass))
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
37
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
38 typedef struct _GTalkProtocol
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
39 {
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
40 JabberProtocol parent;
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
41 } GTalkProtocol;
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
42
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
43 typedef struct _GTalkProtocolClass
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 JabberProtocolClass parent_class;
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
46 } GTalkProtocolClass;
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
47
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
48 /**
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
49 * Returns the GType for the GTalkProtocol object.
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
50 */
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
51 GType gtalk_protocol_get_type(void);
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
52
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents:
diff changeset
53 #endif /* _LIBGTALK_H_ */

mercurial