annotate libpurple/protocols/jabber/jabber.h @ 17621:bbd92ee894f2

Fixed a bug in the XMPP parser involving event handlers that replace the xmlnode packet. This caused double frees in this situation. The replacing function must free the xmlnode, since multiple event handlers could do this, and the intermediate xml trees would leak otherwise.
author Andreas Monitzer <pidgin@monitzer.com>
date Tue, 03 Jul 2007 23:51:26 +0000
parents 935005186312
children 5c1ed6296b56
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
1 /**
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
2 * @file jabber.h
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
3 *
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15766
diff changeset
4 * purple
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
5 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
6 * Copyright (C) 2003 Nathan Walp <faceprint@faceprint.com>
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
7 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
8 * This program is free software; you can redistribute it and/or modify
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
9 * it under the terms of the GNU General Public License as published by
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
10 * the Free Software Foundation; either version 2 of the License, or
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
11 * (at your option) any later version.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
12 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
13 * This program is distributed in the hope that it will be useful,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17572
2e0799b916b9 Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <pidgin@monitzer.com>
parents: 17566
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
16 * GNU General Public License for more details.
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
17 *
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
18 * You should have received a copy of the GNU General Public License
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
19 * along with this program; if not, write to the Free Software
17572
2e0799b916b9 Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <pidgin@monitzer.com>
parents: 17566
diff changeset
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
21 */
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15766
diff changeset
22 #ifndef _PURPLE_JABBER_H_
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15766
diff changeset
23 #define _PURPLE_JABBER_H_
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
24
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
25 typedef enum {
17572
2e0799b916b9 Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <pidgin@monitzer.com>
parents: 17566
diff changeset
26 JABBER_CAP_NONE = 0,
2e0799b916b9 Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <pidgin@monitzer.com>
parents: 17566
diff changeset
27 JABBER_CAP_XHTML = 1 << 0,
2e0799b916b9 Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <pidgin@monitzer.com>
parents: 17566
diff changeset
28 JABBER_CAP_COMPOSING = 1 << 1,
2e0799b916b9 Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <pidgin@monitzer.com>
parents: 17566
diff changeset
29 JABBER_CAP_SI = 1 << 2,
2e0799b916b9 Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <pidgin@monitzer.com>
parents: 17566
diff changeset
30 JABBER_CAP_SI_FILE_XFER = 1 << 3,
2e0799b916b9 Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <pidgin@monitzer.com>
parents: 17566
diff changeset
31 JABBER_CAP_BYTESTREAMS = 1 << 4,
2e0799b916b9 Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <pidgin@monitzer.com>
parents: 17566
diff changeset
32 JABBER_CAP_IBB = 1 << 5,
2e0799b916b9 Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <pidgin@monitzer.com>
parents: 17566
diff changeset
33 JABBER_CAP_CHAT_STATES = 1 << 6,
2e0799b916b9 Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <pidgin@monitzer.com>
parents: 17566
diff changeset
34 JABBER_CAP_IQ_SEARCH = 1 << 7,
2e0799b916b9 Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <pidgin@monitzer.com>
parents: 17566
diff changeset
35 JABBER_CAP_IQ_REGISTER = 1 << 8,
17593
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
36
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
37 /* Google Talk extensions:
17593
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
38 * http://code.google.com/apis/talk/jep_extensions/extensions.html
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
39 */
17572
2e0799b916b9 Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <pidgin@monitzer.com>
parents: 17566
diff changeset
40 JABBER_CAP_GMAIL_NOTIFY = 1 << 9,
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
41 JABBER_CAP_GOOGLE_ROSTER = 1 << 10,
17593
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
42
17572
2e0799b916b9 Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <pidgin@monitzer.com>
parents: 17566
diff changeset
43 JABBER_CAP_PING = 1 << 11,
17609
f88b3a093cba Implemented ad-hoc commands for the buddy action menu (untested), implemented the receiving end of XEP-0115: Entity Capabilities. Note that this seems not to be reliable right now, since some clients seem to have a very broken [read: completely non-functional] implementation (most notably Gajim and the py-transports).
Andreas Monitzer <pidgin@monitzer.com>
parents: 17608
diff changeset
44 JABBER_CAP_ADHOC = 1 << 12,
17593
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
45
17572
2e0799b916b9 Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <pidgin@monitzer.com>
parents: 17566
diff changeset
46 JABBER_CAP_RETRIEVED = 1 << 31
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
47 } JabberCapabilities;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
48
17593
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
49 typedef struct _JabberStream JabberStream;
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
50
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
51 #include <libxml/parser.h>
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
52 #include <glib.h>
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
53 #include "circbuffer.h"
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
54 #include "connection.h"
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
55 #include "dnssrv.h"
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
56 #include "roomlist.h"
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
57 #include "sslconn.h"
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
58
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
59 #include "jutil.h"
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
60 #include "xmlnode.h"
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
61 #include "buddy.h"
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
62
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
63 #ifdef HAVE_CYRUS_SASL
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
64 #include <sasl/sasl.h>
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
65 #endif
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
66
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
67 #define CAPS0115_NODE "http://pidgin.im/caps"
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
68
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
69 typedef enum {
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
70 JABBER_STREAM_OFFLINE,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
71 JABBER_STREAM_CONNECTING,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
72 JABBER_STREAM_INITIALIZING,
17606
108f3b42976f Introduced an additional connection stage to the jabber connection progress in order to be able to tell in the application, whether SSL/TLS is enabled, so it can display a lock icon next to the connection.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17599
diff changeset
73 JABBER_STREAM_INITIALIZING_ENCRYPTION,
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
74 JABBER_STREAM_AUTHENTICATING,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
75 JABBER_STREAM_REINITIALIZING,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
76 JABBER_STREAM_CONNECTED
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
77 } JabberStreamState;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
78
17593
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
79 struct _JabberStream
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
80 {
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
81 int fd;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
82
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15766
diff changeset
83 PurpleSrvQueryData *srv_query_data;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
84
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
85 xmlParserCtxt *context;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
86 xmlnode *current;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
87
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
88 enum {
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
89 JABBER_PROTO_0_9,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
90 JABBER_PROTO_1_0
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
91 } protocol_version;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
92 enum {
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
93 JABBER_AUTH_UNKNOWN,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
94 JABBER_AUTH_DIGEST_MD5,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
95 JABBER_AUTH_PLAIN,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
96 JABBER_AUTH_IQ_AUTH,
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
97 JABBER_AUTH_CYRUS
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
98 } auth_type;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
99 char *stream_id;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
100 JabberStreamState state;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
101
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
102 /* SASL authentication */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
103 char *expected_rspauth;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
104
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
105 GHashTable *buddies;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
106 gboolean roster_parsed;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
107
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
108 GHashTable *chats;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
109 GList *chat_servers;
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15766
diff changeset
110 PurpleRoomlist *roomlist;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
111 GList *user_directories;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
112
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
113 GHashTable *iq_callbacks;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
114 GHashTable *disco_callbacks;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
115 int next_id;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
116
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
117
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
118 GList *oob_file_transfers;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
119 GList *file_transfers;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
120
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
121 time_t idle;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
122
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
123 JabberID *user;
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15766
diff changeset
124 PurpleConnection *gc;
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15766
diff changeset
125 PurpleSslConnection *gsc;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
126
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
127 gboolean registration;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
128
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
129 char *avatar_hash;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
130 GSList *pending_avatar_requests;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
131
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
132 GSList *pending_buddy_info_requests;
15766
51dd9ae01585 pass the correct domain to cyrus sasl (sf patch 1663064)
Nathan Walp <nwalp@pidgin.im>
parents: 15374
diff changeset
133
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15766
diff changeset
134 PurpleCircBuffer *write_buffer;
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
135 guint writeh;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
136
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
137 gboolean reinit;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
138
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
139 JabberCapabilities server_caps;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
140 gboolean googletalk;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
141 char *server_name;
15766
51dd9ae01585 pass the correct domain to cyrus sasl (sf patch 1663064)
Nathan Walp <nwalp@pidgin.im>
parents: 15374
diff changeset
142
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
143 char *gmail_last_time;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
144 char *gmail_last_tid;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
145
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
146 /* OK, this stays at the end of the struct, so plugins can depend
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
147 * on the rest of the stuff being in the right place
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
148 */
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
149 #ifdef HAVE_CYRUS_SASL
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
150 sasl_conn_t *sasl;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
151 sasl_callback_t *sasl_cb;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
152 int sasl_state;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
153 int sasl_maxbuf;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
154 GString *sasl_mechs;
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
155 #endif
17572
2e0799b916b9 Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <pidgin@monitzer.com>
parents: 17566
diff changeset
156 char *serverFQDN;
2e0799b916b9 Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <pidgin@monitzer.com>
parents: 17566
diff changeset
157
2e0799b916b9 Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <pidgin@monitzer.com>
parents: 17566
diff changeset
158 /* does the local server support PEP? */
2e0799b916b9 Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <pidgin@monitzer.com>
parents: 17566
diff changeset
159 gboolean pep;
17593
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
160
17617
935005186312 Added the option to enable/disable buzz via a status setting. It's default off for the pidgin folks.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17610
diff changeset
161 /* Is Buzz enabled? */
935005186312 Added the option to enable/disable buzz via a status setting. It's default off for the pidgin folks.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17610
diff changeset
162 gboolean allowBuzz;
935005186312 Added the option to enable/disable buzz via a status setting. It's default off for the pidgin folks.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17610
diff changeset
163
17610
9a19c46adf66 The server's ad-hoc commands are now listed in the account's action menu. Note that this requires an additional field in the _PurplePluginAction struct. There's no other way, since there was no way to supply user_data, and dynamically created functions are not supported by C. This should be fine, since that struct is only malloced in purple_plugin_action_new, which is part of the core. Applications have to either pass the struct unmodified, or restore the user_data pointer if the action is recreated when necessary (as is the case in Adium).
Andreas Monitzer <pidgin@monitzer.com>
parents: 17609
diff changeset
164 /* A list of JabberAdHocCommands supported by the server */
9a19c46adf66 The server's ad-hoc commands are now listed in the account's action menu. Note that this requires an additional field in the _PurplePluginAction struct. There's no other way, since there was no way to supply user_data, and dynamically created functions are not supported by C. This should be fine, since that struct is only malloced in purple_plugin_action_new, which is part of the core. Applications have to either pass the struct unmodified, or restore the user_data pointer if the action is recreated when necessary (as is the case in Adium).
Andreas Monitzer <pidgin@monitzer.com>
parents: 17609
diff changeset
165 GList *commands;
9a19c46adf66 The server's ad-hoc commands are now listed in the account's action menu. Note that this requires an additional field in the _PurplePluginAction struct. There's no other way, since there was no way to supply user_data, and dynamically created functions are not supported by C. This should be fine, since that struct is only malloced in purple_plugin_action_new, which is part of the core. Applications have to either pass the struct unmodified, or restore the user_data pointer if the action is recreated when necessary (as is the case in Adium).
Andreas Monitzer <pidgin@monitzer.com>
parents: 17609
diff changeset
166
17593
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
167 /* last presence update to check for differences */
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
168 JabberBuddyState old_state;
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
169 char *old_msg;
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
170 int old_priority;
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
171 char *old_avatarhash;
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
172
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
173 /* same for user tune */
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
174 char *old_artist;
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
175 char *old_title;
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
176 char *old_source;
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
177 char *old_uri;
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
178 int old_length;
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
179 char *old_track;
759cd72bd2ff Replaced a clean and simple API with a very weird hack due to vivid request on #pidgin by multiple devs. This avoids the change in PurplePluginProtocolInfo, but requires complicated change tracking in every prpl. The others prpl should add this change tracking, too (since otherwise the status gets changed even though nothing they care about changed), but that's not up to me.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17576
diff changeset
180 };
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
181
17576
e49b259fc7dd PEP publishing features are now only announced in disco#info when PEP is supported by the server.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17572
diff changeset
182 typedef gboolean (JabberFeatureEnabled)(JabberStream *js, const gchar *shortname, const gchar *namespace);
e49b259fc7dd PEP publishing features are now only announced in disco#info when PEP is supported by the server.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17572
diff changeset
183
e49b259fc7dd PEP publishing features are now only announced in disco#info when PEP is supported by the server.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17572
diff changeset
184 typedef struct _JabberFeature
e49b259fc7dd PEP publishing features are now only announced in disco#info when PEP is supported by the server.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17572
diff changeset
185 {
e49b259fc7dd PEP publishing features are now only announced in disco#info when PEP is supported by the server.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17572
diff changeset
186 gchar *shortname;
e49b259fc7dd PEP publishing features are now only announced in disco#info when PEP is supported by the server.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17572
diff changeset
187 gchar *namespace;
e49b259fc7dd PEP publishing features are now only announced in disco#info when PEP is supported by the server.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17572
diff changeset
188 JabberFeatureEnabled *is_enabled;
e49b259fc7dd PEP publishing features are now only announced in disco#info when PEP is supported by the server.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17572
diff changeset
189 } JabberFeature;
e49b259fc7dd PEP publishing features are now only announced in disco#info when PEP is supported by the server.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17572
diff changeset
190
e49b259fc7dd PEP publishing features are now only announced in disco#info when PEP is supported by the server.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17572
diff changeset
191 /* what kind of additional features as returned from disco#info are supported? */
e49b259fc7dd PEP publishing features are now only announced in disco#info when PEP is supported by the server.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17572
diff changeset
192 extern GList *jabber_features;
e49b259fc7dd PEP publishing features are now only announced in disco#info when PEP is supported by the server.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17572
diff changeset
193
17621
bbd92ee894f2 Fixed a bug in the XMPP parser involving event handlers that replace the xmlnode packet. This caused double frees in this situation. The replacing function must free the xmlnode, since multiple event handlers could do this, and the intermediate xml trees would leak otherwise.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17617
diff changeset
194 void jabber_process_packet(JabberStream *js, xmlnode **packet);
15374
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
195 void jabber_send(JabberStream *js, xmlnode *data);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
196 void jabber_send_raw(JabberStream *js, const char *data, int len);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
197
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
198 void jabber_stream_set_state(JabberStream *js, JabberStreamState state);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
199
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
200 void jabber_register_parse(JabberStream *js, xmlnode *packet);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
201 void jabber_register_start(JabberStream *js);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
202
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
203 char *jabber_get_next_id(JabberStream *js);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
204
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
205 char *jabber_parse_error(JabberStream *js, xmlnode *packet);
5fe8042783c1 Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff changeset
206
17576
e49b259fc7dd PEP publishing features are now only announced in disco#info when PEP is supported by the server.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17572
diff changeset
207 void jabber_add_feature(const gchar *shortname, const gchar *namespace, JabberFeatureEnabled cb); /* cb may be NULL */
17566
0370da969e8a Implemented adding callbacks for PEP events. Moved the feature list to be application-global instead of per-connection (makes more sense).
Andreas Monitzer <pidgin@monitzer.com>
parents: 17563
diff changeset
208 void jabber_remove_feature(const gchar *shortname);
17563
95affacf6f82 Added the ability to define extensions to caps
Andreas Monitzer <pidgin@monitzer.com>
parents: 17562
diff changeset
209
16240
547c76fe2e7a This does the ol' AIM/ICQ split trick on Jabber, creating an XMPP prpl. This can be used, later, to create a Bonjour plugin that reuses libjabber
Sean Egan <seanegan@gmail.com>
parents: 16005
diff changeset
210 /** PRPL functions */
547c76fe2e7a This does the ol' AIM/ICQ split trick on Jabber, creating an XMPP prpl. This can be used, later, to create a Bonjour plugin that reuses libjabber
Sean Egan <seanegan@gmail.com>
parents: 16005
diff changeset
211 const char *jabber_list_icon(PurpleAccount *a, PurpleBuddy *b);
547c76fe2e7a This does the ol' AIM/ICQ split trick on Jabber, creating an XMPP prpl. This can be used, later, to create a Bonjour plugin that reuses libjabber
Sean Egan <seanegan@gmail.com>
parents: 16005
diff changeset
212 const char* jabber_list_emblem(PurpleBuddy *b);
547c76fe2e7a This does the ol' AIM/ICQ split trick on Jabber, creating an XMPP prpl. This can be used, later, to create a Bonjour plugin that reuses libjabber
Sean Egan <seanegan@gmail.com>
parents: 16005
diff changeset
213 char *jabber_status_text(PurpleBuddy *b);
547c76fe2e7a This does the ol' AIM/ICQ split trick on Jabber, creating an XMPP prpl. This can be used, later, to create a Bonjour plugin that reuses libjabber
Sean Egan <seanegan@gmail.com>
parents: 16005
diff changeset
214 void jabber_tooltip_text(PurpleBuddy *b, PurpleNotifyUserInfo *user_info, gboolean full);
547c76fe2e7a This does the ol' AIM/ICQ split trick on Jabber, creating an XMPP prpl. This can be used, later, to create a Bonjour plugin that reuses libjabber
Sean Egan <seanegan@gmail.com>
parents: 16005
diff changeset
215 GList *jabber_status_types(PurpleAccount *account);
547c76fe2e7a This does the ol' AIM/ICQ split trick on Jabber, creating an XMPP prpl. This can be used, later, to create a Bonjour plugin that reuses libjabber
Sean Egan <seanegan@gmail.com>
parents: 16005
diff changeset
216 void jabber_login(PurpleAccount *account);
547c76fe2e7a This does the ol' AIM/ICQ split trick on Jabber, creating an XMPP prpl. This can be used, later, to create a Bonjour plugin that reuses libjabber
Sean Egan <seanegan@gmail.com>
parents: 16005
diff changeset
217 void jabber_close(PurpleConnection *gc);
547c76fe2e7a This does the ol' AIM/ICQ split trick on Jabber, creating an XMPP prpl. This can be used, later, to create a Bonjour plugin that reuses libjabber
Sean Egan <seanegan@gmail.com>
parents: 16005
diff changeset
218 void jabber_idle_set(PurpleConnection *gc, int idle);
547c76fe2e7a This does the ol' AIM/ICQ split trick on Jabber, creating an XMPP prpl. This can be used, later, to create a Bonjour plugin that reuses libjabber
Sean Egan <seanegan@gmail.com>
parents: 16005
diff changeset
219 void jabber_keepalive(PurpleConnection *gc);
17599
8c3fbc353a9c Added the ability to register gateways, re-using most of the account registration code for this.
Andreas Monitzer <pidgin@monitzer.com>
parents: 17593
diff changeset
220 void jabber_register_gateway(JabberStream *js, const char *gateway);
16240
547c76fe2e7a This does the ol' AIM/ICQ split trick on Jabber, creating an XMPP prpl. This can be used, later, to create a Bonjour plugin that reuses libjabber
Sean Egan <seanegan@gmail.com>
parents: 16005
diff changeset
221 void jabber_register_account(PurpleAccount *account);
547c76fe2e7a This does the ol' AIM/ICQ split trick on Jabber, creating an XMPP prpl. This can be used, later, to create a Bonjour plugin that reuses libjabber
Sean Egan <seanegan@gmail.com>
parents: 16005
diff changeset
222 void jabber_convo_closed(PurpleConnection *gc, const char *who);
547c76fe2e7a This does the ol' AIM/ICQ split trick on Jabber, creating an XMPP prpl. This can be used, later, to create a Bonjour plugin that reuses libjabber
Sean Egan <seanegan@gmail.com>
parents: 16005
diff changeset
223 PurpleChat *jabber_find_blist_chat(PurpleAccount *account, const char *name);
547c76fe2e7a This does the ol' AIM/ICQ split trick on Jabber, creating an XMPP prpl. This can be used, later, to create a Bonjour plugin that reuses libjabber
Sean Egan <seanegan@gmail.com>
parents: 16005
diff changeset
224 gboolean jabber_offline_message(const PurpleBuddy *buddy);
547c76fe2e7a This does the ol' AIM/ICQ split trick on Jabber, creating an XMPP prpl. This can be used, later, to create a Bonjour plugin that reuses libjabber
Sean Egan <seanegan@gmail.com>
parents: 16005
diff changeset
225 int jabber_prpl_send_raw(PurpleConnection *gc, const char *buf, int len);
547c76fe2e7a This does the ol' AIM/ICQ split trick on Jabber, creating an XMPP prpl. This can be used, later, to create a Bonjour plugin that reuses libjabber
Sean Egan <seanegan@gmail.com>
parents: 16005
diff changeset
226 GList *jabber_actions(PurplePlugin *plugin, gpointer context);
547c76fe2e7a This does the ol' AIM/ICQ split trick on Jabber, creating an XMPP prpl. This can be used, later, to create a Bonjour plugin that reuses libjabber
Sean Egan <seanegan@gmail.com>
parents: 16005
diff changeset
227 void jabber_register_commands(void);
547c76fe2e7a This does the ol' AIM/ICQ split trick on Jabber, creating an XMPP prpl. This can be used, later, to create a Bonjour plugin that reuses libjabber
Sean Egan <seanegan@gmail.com>
parents: 16005
diff changeset
228 void jabber_init_plugin(PurplePlugin *plugin);
547c76fe2e7a This does the ol' AIM/ICQ split trick on Jabber, creating an XMPP prpl. This can be used, later, to create a Bonjour plugin that reuses libjabber
Sean Egan <seanegan@gmail.com>
parents: 16005
diff changeset
229
15823
32c366eeeb99 sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@gmail.com>
parents: 15766
diff changeset
230 #endif /* _PURPLE_JABBER_H_ */