libpurple/protocols/jabber/jabber.h

Mon, 01 Apr 2019 22:19:54 -0400

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Mon, 01 Apr 2019 22:19:54 -0400
changeset 39556
622bf98df0ac
parent 39519
a702c3dd7036
child 39819
3554dac2991b
permissions
-rw-r--r--

Remove unnecessary struct tags.

This is basically three sed's:

fd '\.[ch]$' -exec \
sed -i 's/typedef struct _[A-Za-z0-9_]\+ {/typedef struct {/g'

fd '\.[ch]$' -exec \
sed -i 's/typedef struct _[A-Za-z0-9_]\+$/typedef struct/g'

sed -i 's/struct _pidgin_blist_node/PidginBlistNode/g' pidgin/gtkblist.c

7014
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
1 /**
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
2 * @file jabber.h
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
3 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15800
diff changeset
4 * purple
7014
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
5 *
28322
ac8fec1d2234 Remove specific copyright lines from the XMPP prpl.
Paul Aurich <darkrain42@pidgin.im>
parents: 28071
diff changeset
6 * Purple is the legal property of its developers, whose names are too numerous
ac8fec1d2234 Remove specific copyright lines from the XMPP prpl.
Paul Aurich <darkrain42@pidgin.im>
parents: 28071
diff changeset
7 * to list here. Please refer to the COPYRIGHT file distributed with this
ac8fec1d2234 Remove specific copyright lines from the XMPP prpl.
Paul Aurich <darkrain42@pidgin.im>
parents: 28071
diff changeset
8 * source distribution.
2086
007508451e2c [gaim-migrate @ 2096]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
9 *
7014
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
10 * This program is free software; you can redistribute it and/or modify
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
11 * it under the terms of the GNU General Public License as published by
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
12 * the Free Software Foundation; either version 2 of the License, or
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
13 * (at your option) any later version.
2086
007508451e2c [gaim-migrate @ 2096]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
14 *
7014
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
15 * This program is distributed in the hope that it will be useful,
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
18 * GNU General Public License for more details.
2086
007508451e2c [gaim-migrate @ 2096]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
19 *
7014
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
20 * You should have received a copy of the GNU General Public License
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
21 * 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: 18449
diff changeset
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
2086
007508451e2c [gaim-migrate @ 2096]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
23 */
26703
17f9a4bef2a3 Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <darkrain42@pidgin.im>
parents: 26692
diff changeset
24 #ifndef PURPLE_JABBER_H_
17f9a4bef2a3 Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <darkrain42@pidgin.im>
parents: 26692
diff changeset
25 #define PURPLE_JABBER_H_
2086
007508451e2c [gaim-migrate @ 2096]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
26
7014
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
27 typedef enum {
8312
3cb6d9d94694 [gaim-migrate @ 9036]
Nathan Walp <nwalp@pidgin.im>
parents: 8296
diff changeset
28 JABBER_CAP_NONE = 0,
27746
4b3f015977d9 For contacts who advertise Entity Caps, check for XHTML-IM support. Refs #4650.
Paul Aurich <darkrain42@pidgin.im>
parents: 27636
diff changeset
29 /* JABBER_CAP_XHTML = 1 << 0, */
27430
1b6c99fc6278 Comment out the JABBER_CAP for XEP-0022.
Paul Aurich <darkrain42@pidgin.im>
parents: 27304
diff changeset
30 /* JABBER_CAP_COMPOSING = 1 << 1, */
8312
3cb6d9d94694 [gaim-migrate @ 9036]
Nathan Walp <nwalp@pidgin.im>
parents: 8296
diff changeset
31 JABBER_CAP_SI = 1 << 2,
3cb6d9d94694 [gaim-migrate @ 9036]
Nathan Walp <nwalp@pidgin.im>
parents: 8296
diff changeset
32 JABBER_CAP_SI_FILE_XFER = 1 << 3,
3cb6d9d94694 [gaim-migrate @ 9036]
Nathan Walp <nwalp@pidgin.im>
parents: 8296
diff changeset
33 JABBER_CAP_BYTESTREAMS = 1 << 4,
3cb6d9d94694 [gaim-migrate @ 9036]
Nathan Walp <nwalp@pidgin.im>
parents: 8296
diff changeset
34 JABBER_CAP_IBB = 1 << 5,
11393
71e7a8e33810 [gaim-migrate @ 13623]
Ken Tossell
parents: 10941
diff changeset
35 JABBER_CAP_CHAT_STATES = 1 << 6,
11675
0eae965a9098 [gaim-migrate @ 13961]
Nathan Walp <nwalp@pidgin.im>
parents: 11393
diff changeset
36 JABBER_CAP_IQ_SEARCH = 1 << 7,
0eae965a9098 [gaim-migrate @ 13961]
Nathan Walp <nwalp@pidgin.im>
parents: 11393
diff changeset
37 JABBER_CAP_IQ_REGISTER = 1 << 8,
15225
d04a059065dd [gaim-migrate @ 17949]
Sean Egan <seanegan@pidgin.im>
parents: 15197
diff changeset
38
19898
218e4bb04853 Fix mingw build of xmpp prpl
Daniel Atallah <datallah@pidgin.im>
parents: 19897
diff changeset
39 /* Google Talk extensions:
33956
84f5fef32685 Fix and/or canonicalize a few URLs.
Mark Doliner <mark@kingant.net>
parents: 33955
diff changeset
40 * https://developers.google.com/talk/jep_extensions/extensions
15225
d04a059065dd [gaim-migrate @ 17949]
Sean Egan <seanegan@pidgin.im>
parents: 15197
diff changeset
41 */
d04a059065dd [gaim-migrate @ 17949]
Sean Egan <seanegan@pidgin.im>
parents: 15197
diff changeset
42 JABBER_CAP_GMAIL_NOTIFY = 1 << 9,
15265
a5b0ab58b05d [gaim-migrate @ 17993]
Sean Egan <seanegan@pidgin.im>
parents: 15225
diff changeset
43 JABBER_CAP_GOOGLE_ROSTER = 1 << 10,
15225
d04a059065dd [gaim-migrate @ 17949]
Sean Egan <seanegan@pidgin.im>
parents: 15197
diff changeset
44
17779
773326802e26 Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <am@adiumx.com>
parents: 17773
diff changeset
45 JABBER_CAP_PING = 1 << 11,
17816
1b7362b4a7a2 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 <am@adiumx.com>
parents: 17815
diff changeset
46 JABBER_CAP_ADHOC = 1 << 12,
25290
033942580f51 Commit patch #7670: Implement xep-0191 (simple blocking) for jabber protocols
Mark Doliner <markdoliner@pidgin.im>
parents: 24012
diff changeset
47 JABBER_CAP_BLOCKING = 1 << 13,
033942580f51 Commit patch #7670: Implement xep-0191 (simple blocking) for jabber protocols
Mark Doliner <markdoliner@pidgin.im>
parents: 24012
diff changeset
48
26583
e115c7ef2fcf Applied disco-2.patch from nops with some modifications:
Paul Aurich <darkrain42@pidgin.im>
parents: 26042
diff changeset
49 JABBER_CAP_ITEMS = 1 << 14,
29096
362b96f6f3da jabber: Roster Versioning support.
Paul Aurich <darkrain42@pidgin.im>
parents: 29007
diff changeset
50 JABBER_CAP_ROSTER_VERSIONING = 1 << 15,
26583
e115c7ef2fcf Applied disco-2.patch from nops with some modifications:
Paul Aurich <darkrain42@pidgin.im>
parents: 26042
diff changeset
51
8312
3cb6d9d94694 [gaim-migrate @ 9036]
Nathan Walp <nwalp@pidgin.im>
parents: 8296
diff changeset
52 JABBER_CAP_RETRIEVED = 1 << 31
3cb6d9d94694 [gaim-migrate @ 9036]
Nathan Walp <nwalp@pidgin.im>
parents: 8296
diff changeset
53 } JabberCapabilities;
3cb6d9d94694 [gaim-migrate @ 9036]
Nathan Walp <nwalp@pidgin.im>
parents: 8296
diff changeset
54
17800
39a0f9ed0e26 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 <am@adiumx.com>
parents: 17783
diff changeset
55 typedef struct _JabberStream JabberStream;
39a0f9ed0e26 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 <am@adiumx.com>
parents: 17783
diff changeset
56
13808
411ee56da344 [gaim-migrate @ 16229]
Sean Egan <seanegan@pidgin.im>
parents: 13385
diff changeset
57 #include <libxml/parser.h>
7014
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
58 #include <glib.h>
37418
28302ab00d1a Include gmodule.h in each protocol's eponymous header because they all
Michael McConville <mmcco@mykolab.com>
parents: 37384
diff changeset
59 #include <gmodule.h>
37457
0b957b80c46a This should do it for XMPP
Gary Kramlich <grim@reaperworld.com>
parents: 37384
diff changeset
60 #include <gio/gio.h>
0b957b80c46a This should do it for XMPP
Gary Kramlich <grim@reaperworld.com>
parents: 37384
diff changeset
61
38859
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38838
diff changeset
62 #include "attention.h"
34570
ac513e5901eb Rename circbuffer files to circularbuffer files to match the object name
Ankit Vani <a@nevitus.org>
parents: 34529
diff changeset
63 #include "circularbuffer.h"
7014
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
64 #include "connection.h"
34269
26b4c9a54166 HTTP: Use PurpleHttpConnectionSet instead of GSLists of PurpleHttpConnection structs
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34268
diff changeset
65 #include "http.h"
26106
afdca955b6f4 propagate from branch 'im.pidgin.pidgin' (head 0cff24bf7dbab39c8efd9ae15752966bda375780)
Michael Ruprecht <maiku@pidgin.im>
parents: 23975 23716
diff changeset
66 #include "media.h"
afdca955b6f4 propagate from branch 'im.pidgin.pidgin' (head 0cff24bf7dbab39c8efd9ae15752966bda375780)
Michael Ruprecht <maiku@pidgin.im>
parents: 23975 23716
diff changeset
67 #include "mediamanager.h"
36582
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
68 #include "protocol.h"
8113
6a2ffc66c022 [gaim-migrate @ 8817]
Tim Ringenbach <marv@pidgin.im>
parents: 8043
diff changeset
69 #include "roomlist.h"
7014
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
70 #include "sslconn.h"
2086
007508451e2c [gaim-migrate @ 2096]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
71
28979
191942cc7747 jabber: Start putting all the namespaces in one location with consistent naming.
Paul Aurich <darkrain42@pidgin.im>
parents: 28879
diff changeset
72 #include "namespaces.h"
191942cc7747 jabber: Start putting all the namespaces in one location with consistent naming.
Paul Aurich <darkrain42@pidgin.im>
parents: 28879
diff changeset
73
28855
c5bc85f9c00e jabber: Factor the SASL auth methods into their own files.
Paul Aurich <darkrain42@pidgin.im>
parents: 28840
diff changeset
74 #include "auth.h"
25817
09d6a40a341d Pass IQ handlers type, from, id, and the child node
Paul Aurich <darkrain42@pidgin.im>
parents: 25290
diff changeset
75 #include "iq.h"
7014
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
76 #include "jutil.h"
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
77 #include "xmlnode.h"
17800
39a0f9ed0e26 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 <am@adiumx.com>
parents: 17783
diff changeset
78 #include "buddy.h"
23610
6f4b6861c9a4 * missing commit
Tobias Markmann <tfar@soc.pidgin.im>
parents: 23596
diff changeset
79 #include "bosh.h"
2086
007508451e2c [gaim-migrate @ 2096]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
80
12508
32f6f8bf3a57 [gaim-migrate @ 14820]
Simon Wilkinson
parents: 11675
diff changeset
81 #ifdef HAVE_CYRUS_SASL
32f6f8bf3a57 [gaim-migrate @ 14820]
Simon Wilkinson
parents: 11675
diff changeset
82 #include <sasl/sasl.h>
32f6f8bf3a57 [gaim-migrate @ 14820]
Simon Wilkinson
parents: 11675
diff changeset
83 #endif
32f6f8bf3a57 [gaim-migrate @ 14820]
Simon Wilkinson
parents: 11675
diff changeset
84
33955
55aa58076485 Use https URLs for pidgin.im and developer.pidgin.im.
Mark Doliner <mark@kingant.net>
parents: 32438
diff changeset
85 #define CAPS0115_NODE "https://pidgin.im/"
13385
6fb64ae23761 [gaim-migrate @ 15757]
Nathan Walp <nwalp@pidgin.im>
parents: 13201
diff changeset
86
36582
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
87 #define JABBER_TYPE_PROTOCOL (jabber_protocol_get_type())
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
88 #define JABBER_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), JABBER_TYPE_PROTOCOL, JabberProtocol))
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
89 #define JABBER_PROTOCOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), JABBER_TYPE_PROTOCOL, JabberProtocolClass))
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
90 #define JABBER_IS_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), JABBER_TYPE_PROTOCOL))
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
91 #define JABBER_IS_PROTOCOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), JABBER_TYPE_PROTOCOL))
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
92 #define JABBER_PROTOCOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), JABBER_TYPE_PROTOCOL, JabberProtocolClass))
13385
6fb64ae23761 [gaim-migrate @ 15757]
Nathan Walp <nwalp@pidgin.im>
parents: 13201
diff changeset
93
30740
017077f79a0f jabber: Unify "Require TLS" and "Use old-style (port 5223) SSL" settings
Paul Aurich <darkrain42@pidgin.im>
parents: 30723
diff changeset
94 #define JABBER_DEFAULT_REQUIRE_TLS "require_starttls"
28830
7d2ea52db354 jabber: Fix a few places where the default for require_tls was wrong.
Paul Aurich <darkrain42@pidgin.im>
parents: 28379
diff changeset
95
20401
8aaa593a6269 Comment a partial implementation of the libpurple attention API for
Jeff Connelly <jeff2@soc.pidgin.im>
parents: 19898
diff changeset
96 /* Index into attention_types list */
8aaa593a6269 Comment a partial implementation of the libpurple attention API for
Jeff Connelly <jeff2@soc.pidgin.im>
parents: 19898
diff changeset
97 #define JABBER_BUZZ 0
8aaa593a6269 Comment a partial implementation of the libpurple attention API for
Jeff Connelly <jeff2@soc.pidgin.im>
parents: 19898
diff changeset
98
8312
3cb6d9d94694 [gaim-migrate @ 9036]
Nathan Walp <nwalp@pidgin.im>
parents: 8296
diff changeset
99 typedef enum {
7014
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
100 JABBER_STREAM_OFFLINE,
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
101 JABBER_STREAM_CONNECTING,
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
102 JABBER_STREAM_INITIALIZING,
17813
c5cc8ebf62c0 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 <am@adiumx.com>
parents: 17806
diff changeset
103 JABBER_STREAM_INITIALIZING_ENCRYPTION,
7014
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
104 JABBER_STREAM_AUTHENTICATING,
28379
df144a809a92 jabber: Fix using BOSH and legacy auth together. Closes #9990.
Paul Aurich <darkrain42@pidgin.im>
parents: 28322
diff changeset
105 JABBER_STREAM_POST_AUTH,
7014
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
106 JABBER_STREAM_CONNECTED
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
107 } JabberStreamState;
2086
007508451e2c [gaim-migrate @ 2096]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
108
39556
622bf98df0ac Remove unnecessary struct tags.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39519
diff changeset
109 typedef struct
36582
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
110 {
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
111 PurpleProtocol parent;
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
112 } JabberProtocol;
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
113
39556
622bf98df0ac Remove unnecessary struct tags.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39519
diff changeset
114 typedef struct
36582
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
115 {
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
116 PurpleProtocolClass parent_class;
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
117 } JabberProtocolClass;
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
118
17800
39a0f9ed0e26 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 <am@adiumx.com>
parents: 17783
diff changeset
119 struct _JabberStream
2086
007508451e2c [gaim-migrate @ 2096]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
120 {
7014
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
121 int fd;
32438
dc8991868906 A boring and large patch so I can merge heads.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 31625
diff changeset
122 guint inpa;
2086
007508451e2c [gaim-migrate @ 2096]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
123
37457
0b957b80c46a This should do it for XMPP
Gary Kramlich <grim@reaperworld.com>
parents: 37384
diff changeset
124 GCancellable *cancellable;
14175
2bc5a80c5071 [gaim-migrate @ 16747]
Mark Doliner <markdoliner@pidgin.im>
parents: 14062
diff changeset
125
13808
411ee56da344 [gaim-migrate @ 16229]
Sean Egan <seanegan@pidgin.im>
parents: 13385
diff changeset
126 xmlParserCtxt *context;
34935
686fa55b0deb Replaced xmlnode with PurpleXmlNode, and xmlnode_* API with purple_xmlnode_* API
Ankit Vani <a@nevitus.org>
parents: 34870
diff changeset
127 PurpleXmlNode *current;
2086
007508451e2c [gaim-migrate @ 2096]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
128
29849
d7b910200dc5 jabber: Treat the version properly.
Paul Aurich <darkrain42@pidgin.im>
parents: 29845
diff changeset
129 struct {
d7b910200dc5 jabber: Treat the version properly.
Paul Aurich <darkrain42@pidgin.im>
parents: 29845
diff changeset
130 guint8 major;
d7b910200dc5 jabber: Treat the version properly.
Paul Aurich <darkrain42@pidgin.im>
parents: 29845
diff changeset
131 guint8 minor;
7014
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
132 } protocol_version;
28855
c5bc85f9c00e jabber: Factor the SASL auth methods into their own files.
Paul Aurich <darkrain42@pidgin.im>
parents: 28840
diff changeset
133
c5bc85f9c00e jabber: Factor the SASL auth methods into their own files.
Paul Aurich <darkrain42@pidgin.im>
parents: 28840
diff changeset
134 JabberSaslMech *auth_mech;
28866
e3d867ce000b jabber: Complete (though untested) SCRAM implementation.
Paul Aurich <darkrain42@pidgin.im>
parents: 28855
diff changeset
135 gpointer auth_mech_data;
30150
883c3fc1f638 jabber: Use the auth_mech_data JabberStream member for what it's for.
Paul Aurich <darkrain42@pidgin.im>
parents: 30056
diff changeset
136
29865
3a23d291568e jabber: Clear the stream header when restarting a stream, and be
Paul Aurich <darkrain42@pidgin.im>
parents: 29849
diff changeset
137 /**
3a23d291568e jabber: Clear the stream header when restarting a stream, and be
Paul Aurich <darkrain42@pidgin.im>
parents: 29849
diff changeset
138 * The header from the opening <stream/> tag. This being NULL is treated
3a23d291568e jabber: Clear the stream header when restarting a stream, and be
Paul Aurich <darkrain42@pidgin.im>
parents: 29849
diff changeset
139 * as a special condition in the parsing code (signifying the next
3a23d291568e jabber: Clear the stream header when restarting a stream, and be
Paul Aurich <darkrain42@pidgin.im>
parents: 29849
diff changeset
140 * stanza started is an opening stream tag), and its being missing on
3a23d291568e jabber: Clear the stream header when restarting a stream, and be
Paul Aurich <darkrain42@pidgin.im>
parents: 29849
diff changeset
141 * the stream header is treated as a fatal error.
3a23d291568e jabber: Clear the stream header when restarting a stream, and be
Paul Aurich <darkrain42@pidgin.im>
parents: 29849
diff changeset
142 */
7014
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
143 char *stream_id;
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
144 JabberStreamState state;
2086
007508451e2c [gaim-migrate @ 2096]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
145
7014
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
146 GHashTable *buddies;
2086
007508451e2c [gaim-migrate @ 2096]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
147
23975
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
148 /*
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
149 * This boolean was added to eliminate a heinous bug where we would
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
150 * get into a loop with the server and move a buddy back and forth
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
151 * from one group to another.
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
152 *
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
153 * The sequence goes something like this:
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
154 * 1. Our resource and another resource both approve an authorization
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
155 * request at the exact same time. We put the buddy in group A and
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
156 * the other resource put the buddy in group B.
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
157 * 2. The server receives the roster add for group B and sends us a
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
158 * roster push.
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
159 * 3. We receive this roster push and modify our local blist. This
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
160 * triggers us to send a roster add for group B.
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
161 * 4. The server recieves our earlier roster add for group A and sends
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
162 * us a roster push.
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
163 * 5. We receive this roster push and modify our local blist. This
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
164 * triggers us to send a roster add for group A.
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
165 * 6. The server receives our earlier roster add for group B and sends
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
166 * us a roster push.
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
167 * (repeat steps 3 through 6 ad infinitum)
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
168 *
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
169 * This boolean is used to short-circuit the sending of a roster add
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
170 * when we receive a roster push.
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
171 *
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
172 * See these bug reports:
33956
84f5fef32685 Fix and/or canonicalize a few URLs.
Mark Doliner <mark@kingant.net>
parents: 33955
diff changeset
173 * https://trac.adium.im/ticket/8834
33955
55aa58076485 Use https URLs for pidgin.im and developer.pidgin.im.
Mark Doliner <mark@kingant.net>
parents: 32438
diff changeset
174 * https://developer.pidgin.im/ticket/5484
55aa58076485 Use https URLs for pidgin.im and developer.pidgin.im.
Mark Doliner <mark@kingant.net>
parents: 32438
diff changeset
175 * https://developer.pidgin.im/ticket/6188
23975
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
176 */
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
177 gboolean currently_parsing_roster_push;
8ee397f04ca9 We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents: 23910
diff changeset
178
7014
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
179 GHashTable *chats;
8043
86a087e9624c [gaim-migrate @ 8727]
Nathan Walp <nwalp@pidgin.im>
parents: 8016
diff changeset
180 GList *chat_servers;
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15800
diff changeset
181 PurpleRoomlist *roomlist;
11675
0eae965a9098 [gaim-migrate @ 13961]
Nathan Walp <nwalp@pidgin.im>
parents: 11393
diff changeset
182 GList *user_directories;
2086
007508451e2c [gaim-migrate @ 2096]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
183
8312
3cb6d9d94694 [gaim-migrate @ 9036]
Nathan Walp <nwalp@pidgin.im>
parents: 8296
diff changeset
184 GHashTable *iq_callbacks;
7014
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
185 int next_id;
2086
007508451e2c [gaim-migrate @ 2096]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
186
21688
a16385b34219 Implement more of XEP-0065 to support sending files through a proxy. To avoid adding strings this close to a release, it only supports using a proxy that is discovered from the server, but we'll include an account option to manually specify a ft proxy in the next release. Lots of this is based on a patch from galt - Fixes #3730, #116, #1768
Daniel Atallah <datallah@pidgin.im>
parents: 21279
diff changeset
187 GList *bs_proxies;
7395
e5595e8e13e4 [gaim-migrate @ 7990]
Nathan Walp <nwalp@pidgin.im>
parents: 7291
diff changeset
188 GList *oob_file_transfers;
7170
93a12931a1fd [gaim-migrate @ 7737]
Nathan Walp <nwalp@pidgin.im>
parents: 7077
diff changeset
189 GList *file_transfers;
93a12931a1fd [gaim-migrate @ 7737]
Nathan Walp <nwalp@pidgin.im>
parents: 7077
diff changeset
190
14453
1cc75906700c [gaim-migrate @ 17098]
Mark Doliner <markdoliner@pidgin.im>
parents: 14375
diff changeset
191 time_t idle;
24679
1b6b57d5b4e1 Change jabber_presence_send to not take an extra argument to force idle updating
Marcus Lundblad <malu@pidgin.im>
parents: 24012
diff changeset
192 time_t old_idle;
14453
1cc75906700c [gaim-migrate @ 17098]
Mark Doliner <markdoliner@pidgin.im>
parents: 14375
diff changeset
193
7014
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
194 JabberID *user;
28071
a0706162fefd jabber: Store the "own JabberBuddy" in the JabberStream* struct.
Paul Aurich <darkrain42@pidgin.im>
parents: 28064
diff changeset
195 JabberBuddy *user_jb;
a0706162fefd jabber: Store the "own JabberBuddy" in the JabberStream* struct.
Paul Aurich <darkrain42@pidgin.im>
parents: 28064
diff changeset
196
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15800
diff changeset
197 PurpleConnection *gc;
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15800
diff changeset
198 PurpleSslConnection *gsc;
7072
f42abfd8486e [gaim-migrate @ 7637]
Nathan Walp <nwalp@pidgin.im>
parents: 7014
diff changeset
199
f42abfd8486e [gaim-migrate @ 7637]
Nathan Walp <nwalp@pidgin.im>
parents: 7014
diff changeset
200 gboolean registration;
10189
bc7691fee058 [gaim-migrate @ 11304]
Nathan Walp <nwalp@pidgin.im>
parents: 8401
diff changeset
201
25811
57012229a242 Use a JabberStream variable instead of a setting for the initial hash
Paul Aurich <darkrain42@pidgin.im>
parents: 25290
diff changeset
202 char *initial_avatar_hash;
10189
bc7691fee058 [gaim-migrate @ 11304]
Nathan Walp <nwalp@pidgin.im>
parents: 8401
diff changeset
203 char *avatar_hash;
10941
7a67db0a7f43 [gaim-migrate @ 12731]
Nathan Walp <nwalp@pidgin.im>
parents: 10189
diff changeset
204 GSList *pending_avatar_requests;
12508
32f6f8bf3a57 [gaim-migrate @ 14820]
Simon Wilkinson
parents: 11675
diff changeset
205
15363
f6b9d1e3d0cb [gaim-migrate @ 18092]
Evan Schoenberg <evands@pidgin.im>
parents: 15265
diff changeset
206 GSList *pending_buddy_info_requests;
15800
2d0ec4fe2681 pass the correct domain to cyrus sasl (sf patch 1663064)
Nathan Walp <nwalp@pidgin.im>
parents: 15435
diff changeset
207
34529
68cf25486001 GObjectify PurpleCircBuffer as PurpleCircularBuffer (from gobjectification branch)
Ankit Vani <a@nevitus.org>
parents: 33956
diff changeset
208 PurpleCircularBuffer *write_buffer;
13201
8c224ef70efa [gaim-migrate @ 15563]
Daniel Atallah <datallah@pidgin.im>
parents: 12508
diff changeset
209 guint writeh;
8c224ef70efa [gaim-migrate @ 15563]
Daniel Atallah <datallah@pidgin.im>
parents: 12508
diff changeset
210
14062
dd8d7eb8fa76 [gaim-migrate @ 16585]
Ethan Blanton <elb@pidgin.im>
parents: 14013
diff changeset
211 gboolean reinit;
dd8d7eb8fa76 [gaim-migrate @ 16585]
Ethan Blanton <elb@pidgin.im>
parents: 14013
diff changeset
212
15225
d04a059065dd [gaim-migrate @ 17949]
Sean Egan <seanegan@pidgin.im>
parents: 15197
diff changeset
213 JabberCapabilities server_caps;
15197
1d98528d4ee3 [gaim-migrate @ 17921]
Sean Egan <seanegan@pidgin.im>
parents: 14899
diff changeset
214 gboolean googletalk;
1d98528d4ee3 [gaim-migrate @ 17921]
Sean Egan <seanegan@pidgin.im>
parents: 14899
diff changeset
215 char *server_name;
15800
2d0ec4fe2681 pass the correct domain to cyrus sasl (sf patch 1663064)
Nathan Walp <nwalp@pidgin.im>
parents: 15435
diff changeset
216
15225
d04a059065dd [gaim-migrate @ 17949]
Sean Egan <seanegan@pidgin.im>
parents: 15197
diff changeset
217 char *gmail_last_time;
d04a059065dd [gaim-migrate @ 17949]
Sean Egan <seanegan@pidgin.im>
parents: 15197
diff changeset
218 char *gmail_last_tid;
15197
1d98528d4ee3 [gaim-migrate @ 17921]
Sean Egan <seanegan@pidgin.im>
parents: 14899
diff changeset
219
21688
a16385b34219 Implement more of XEP-0065 to support sending files through a proxy. To avoid adding strings this close to a release, it only supports using a proxy that is discovered from the server, but we'll include an account option to manually specify a ft proxy in the next release. Lots of this is based on a patch from galt - Fixes #3730, #116, #1768
Daniel Atallah <datallah@pidgin.im>
parents: 21279
diff changeset
220 char *serverFQDN;
18449
2d2df64f4303 applied changes from f9186fabb483b56a9d7e8fb7241b2520e9930413
William Ehlhardt <williamehlhardt@gmail.com>
parents: 18235
diff changeset
221
12508
32f6f8bf3a57 [gaim-migrate @ 14820]
Simon Wilkinson
parents: 11675
diff changeset
222 #ifdef HAVE_CYRUS_SASL
32f6f8bf3a57 [gaim-migrate @ 14820]
Simon Wilkinson
parents: 11675
diff changeset
223 sasl_conn_t *sasl;
32f6f8bf3a57 [gaim-migrate @ 14820]
Simon Wilkinson
parents: 11675
diff changeset
224 sasl_callback_t *sasl_cb;
30723
96e248b07586 jabber: Fix a pernicious race condition in our cyrus auth code
Paul Aurich <darkrain42@pidgin.im>
parents: 30512
diff changeset
225 sasl_secret_t *sasl_secret;
22800
0288a22eb85a The next version of RFC 3920, the draft of which can be found at http://www.xmpp.org/internet-drafts/draft-saintandre-rfc3920bis-04.html, and subsequent email clarifications with Peter Saint-Andre and Alexey Melnikov indicate that we should be trying the next mechanism in line after one mechanism fails. We should also be ensuring that the mech list is sorted in order of descending security, which we don't do yet; however, servers are supposed to send us a sorted list, as well, so this isn't a major issue.
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22155
diff changeset
226 const char *current_mech;
0288a22eb85a The next version of RFC 3920, the draft of which can be found at http://www.xmpp.org/internet-drafts/draft-saintandre-rfc3920bis-04.html, and subsequent email clarifications with Peter Saint-Andre and Alexey Melnikov indicate that we should be trying the next mechanism in line after one mechanism fails. We should also be ensuring that the mech list is sorted in order of descending security, which we don't do yet; however, servers are supposed to send us a sorted list, as well, so this isn't a major issue.
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 22155
diff changeset
227 int auth_fail_count;
18235
60a9bd99f035 server-side jabber vcards now take precedence over local vcards, so
Nathan Walp <nwalp@pidgin.im>
parents: 16302
diff changeset
228
12508
32f6f8bf3a57 [gaim-migrate @ 14820]
Simon Wilkinson
parents: 11675
diff changeset
229 int sasl_state;
32f6f8bf3a57 [gaim-migrate @ 14820]
Simon Wilkinson
parents: 11675
diff changeset
230 int sasl_maxbuf;
32f6f8bf3a57 [gaim-migrate @ 14820]
Simon Wilkinson
parents: 11675
diff changeset
231 GString *sasl_mechs;
37646
8f99c1dff72e Fix jabber password dialog infinite loop with SASL
Jakub Adam <jakub.adam@ktknet.cz>
parents: 37466
diff changeset
232
8f99c1dff72e Fix jabber password dialog infinite loop with SASL
Jakub Adam <jakub.adam@ktknet.cz>
parents: 37466
diff changeset
233 gchar *sasl_password;
28840
0921099465ec jabber: did someone say something about the end of the struct?
Paul Aurich <darkrain42@pidgin.im>
parents: 28832
diff changeset
234 #endif
18235
60a9bd99f035 server-side jabber vcards now take precedence over local vcards, so
Nathan Walp <nwalp@pidgin.im>
parents: 16302
diff changeset
235
18912
606597744812 Added unregistering XMPP accounts. This requires a new prpl-struct entry, but I got an ok for that on the mailing list.
Andreas Monitzer <am@adiumx.com>
parents: 18719
diff changeset
236 gboolean unregistration;
18994
310e9d853e2b Implemented a callback for unregistering, mirroring the registration callback. Since this is a new API, I can do it properly by passing it right in the unregister function call, instead of having a separate function for setting it.
Andreas Monitzer <am@adiumx.com>
parents: 18912
diff changeset
237 PurpleAccountUnregistrationCb unregistration_cb;
310e9d853e2b Implemented a callback for unregistering, mirroring the registration callback. Since this is a new API, I can do it properly by passing it right in the unregister function call, instead of having a separate function for setting it.
Andreas Monitzer <am@adiumx.com>
parents: 18912
diff changeset
238 void *unregistration_user_data;
26042
4dabdb5fe213 Remove some extra trailing whitespace I noticed after merging mlundblad's
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25290
diff changeset
239
18235
60a9bd99f035 server-side jabber vcards now take precedence over local vcards, so
Nathan Walp <nwalp@pidgin.im>
parents: 16302
diff changeset
240 gboolean vcard_fetched;
28046
8b6fcc2c95b3 jabber: Fix setting Google Talk avatar at login.
Paul Aurich <darkrain42@pidgin.im>
parents: 27747
diff changeset
241 /* Timer at login to push updated avatar */
8b6fcc2c95b3 jabber: Fix setting Google Talk avatar at login.
Paul Aurich <darkrain42@pidgin.im>
parents: 27747
diff changeset
242 guint vcard_timer;
12508
32f6f8bf3a57 [gaim-migrate @ 14820]
Simon Wilkinson
parents: 11675
diff changeset
243
24716
047f5075ca58 Entity Capabilities must be per-JabberStream
Paul Aurich <darkrain42@pidgin.im>
parents: 24715
diff changeset
244 /* Entity Capabilities hash */
047f5075ca58 Entity Capabilities must be per-JabberStream
Paul Aurich <darkrain42@pidgin.im>
parents: 24715
diff changeset
245 char *caps_hash;
047f5075ca58 Entity Capabilities must be per-JabberStream
Paul Aurich <darkrain42@pidgin.im>
parents: 24715
diff changeset
246
17779
773326802e26 Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <am@adiumx.com>
parents: 17773
diff changeset
247 /* does the local server support PEP? */
773326802e26 Fixed whitespace to match the coding convention used in libpurple
Andreas Monitzer <am@adiumx.com>
parents: 17773
diff changeset
248 gboolean pep;
2086
007508451e2c [gaim-migrate @ 2096]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
249
17824
52683dfc1f7d Added the option to enable/disable buzz via a status setting. It's default off for the pidgin folks.
Andreas Monitzer <am@adiumx.com>
parents: 17817
diff changeset
250 /* Is Buzz enabled? */
52683dfc1f7d Added the option to enable/disable buzz via a status setting. It's default off for the pidgin folks.
Andreas Monitzer <am@adiumx.com>
parents: 17817
diff changeset
251 gboolean allowBuzz;
26042
4dabdb5fe213 Remove some extra trailing whitespace I noticed after merging mlundblad's
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25290
diff changeset
252
17817
8e0f271aab78 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 <am@adiumx.com>
parents: 17816
diff changeset
253 /* A list of JabberAdHocCommands supported by the server */
8e0f271aab78 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 <am@adiumx.com>
parents: 17816
diff changeset
254 GList *commands;
26042
4dabdb5fe213 Remove some extra trailing whitespace I noticed after merging mlundblad's
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25290
diff changeset
255
17800
39a0f9ed0e26 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 <am@adiumx.com>
parents: 17783
diff changeset
256 /* last presence update to check for differences */
39a0f9ed0e26 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 <am@adiumx.com>
parents: 17783
diff changeset
257 JabberBuddyState old_state;
39a0f9ed0e26 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 <am@adiumx.com>
parents: 17783
diff changeset
258 char *old_msg;
39a0f9ed0e26 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 <am@adiumx.com>
parents: 17783
diff changeset
259 int old_priority;
39a0f9ed0e26 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 <am@adiumx.com>
parents: 17783
diff changeset
260 char *old_avatarhash;
26042
4dabdb5fe213 Remove some extra trailing whitespace I noticed after merging mlundblad's
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25290
diff changeset
261
17800
39a0f9ed0e26 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 <am@adiumx.com>
parents: 17783
diff changeset
262 /* same for user tune */
39a0f9ed0e26 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 <am@adiumx.com>
parents: 17783
diff changeset
263 char *old_artist;
39a0f9ed0e26 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 <am@adiumx.com>
parents: 17783
diff changeset
264 char *old_title;
39a0f9ed0e26 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 <am@adiumx.com>
parents: 17783
diff changeset
265 char *old_source;
39a0f9ed0e26 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 <am@adiumx.com>
parents: 17783
diff changeset
266 char *old_uri;
39a0f9ed0e26 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 <am@adiumx.com>
parents: 17783
diff changeset
267 int old_length;
39a0f9ed0e26 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 <am@adiumx.com>
parents: 17783
diff changeset
268 char *old_track;
26042
4dabdb5fe213 Remove some extra trailing whitespace I noticed after merging mlundblad's
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25290
diff changeset
269
22155
7c2034388bdb Now checking the hostname supplied by the user, or the host-part of the JID when no host name is given against the CN of the domain. This makes libpurple comply to the RFC. Fixes http://trac.adiumx.com/ticket/8787
Andreas Monitzer <am@adiumx.com>
parents: 22096
diff changeset
270 char *certificate_CN;
26042
4dabdb5fe213 Remove some extra trailing whitespace I noticed after merging mlundblad's
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 25290
diff changeset
271
22096
0d28b254d322 Keep track of the keepalive timeout source so it can be removed when the account disconnects. This prevents a possible crash if the timeout fired after the account disconnected.
Evan Schoenberg <evands@pidgin.im>
parents: 21929
diff changeset
272 /* A purple timeout tag for the keepalive */
27304
b2dc447b8c0b The XMPP keepalive timeout handle needs to be a guint.
Paul Aurich <darkrain42@pidgin.im>
parents: 27225
diff changeset
273 guint keepalive_timeout;
30056
24dcb476e62b jabber: Send whitespace keepalives every two minutes of (outgoing) silence.
Paul Aurich <darkrain42@pidgin.im>
parents: 29865
diff changeset
274 guint max_inactivity;
24dcb476e62b jabber: Send whitespace keepalives every two minutes of (outgoing) silence.
Paul Aurich <darkrain42@pidgin.im>
parents: 29865
diff changeset
275 guint inactivity_timer;
35044
8060985edd4a Moved conn_close_timeout to JabberStream
Ankit Vani <a@nevitus.org>
parents: 35001
diff changeset
276 guint conn_close_timeout;
23954
ca45bedce4a8 propagate from branch 'im.pidgin.pidgin' (head 918c72f0ff7f7e3c545d3baf6368ccbd2ba21427)
Tobias Markmann <tfar@soc.pidgin.im>
parents: 23910 23610
diff changeset
277
34268
cf61366236ee HTTP: connections set support added; BOSH for xmpp reimplemented, to use http API instead of its own HTTP implementation
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34238
diff changeset
278 PurpleJabberBOSHConnection *bosh;
24714
2ba5d09cf046 propagate from branch 'im.pidgin.pidgin' (head 134bd2024c88a611caa45dad3b06a53c12a82ed3)
Paul Aurich <darkrain42@pidgin.im>
parents: 23955 24012
diff changeset
279
34269
26b4c9a54166 HTTP: Use PurpleHttpConnectionSet instead of GSLists of PurpleHttpConnection structs
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34268
diff changeset
280 PurpleHttpConnectionSet *http_conns;
26583
e115c7ef2fcf Applied disco-2.patch from nops with some modifications:
Paul Aurich <darkrain42@pidgin.im>
parents: 26042
diff changeset
281
23698
0815965bd80b Moved jingle.c global variable "sessions" into JabberStream.
Michael Ruprecht <maiku@pidgin.im>
parents: 23696
diff changeset
282 /* keep a hash table of JingleSessions */
0815965bd80b Moved jingle.c global variable "sessions" into JabberStream.
Michael Ruprecht <maiku@pidgin.im>
parents: 23696
diff changeset
283 GHashTable *sessions;
26286
443041606e32 Add automatic discovery of GTalk STUN servers when using a Gtalk account
Marcus Lundblad <malu@pidgin.im>
parents: 26215
diff changeset
284
443041606e32 Add automatic discovery of GTalk STUN servers when using a Gtalk account
Marcus Lundblad <malu@pidgin.im>
parents: 26215
diff changeset
285 /* maybe this should only be present when USE_VV? */
443041606e32 Add automatic discovery of GTalk STUN servers when using a Gtalk account
Marcus Lundblad <malu@pidgin.im>
parents: 26215
diff changeset
286 gchar *stun_ip;
443041606e32 Add automatic discovery of GTalk STUN servers when using a Gtalk account
Marcus Lundblad <malu@pidgin.im>
parents: 26215
diff changeset
287 int stun_port;
28445
c3dbe0b64f44 Some unfinished code to take advantage of Google's relays
Marcus Lundblad <malu@pidgin.im>
parents: 28379
diff changeset
288
c3dbe0b64f44 Some unfinished code to take advantage of Google's relays
Marcus Lundblad <malu@pidgin.im>
parents: 28379
diff changeset
289 /* stuff for Google's relay handling */
c3dbe0b64f44 Some unfinished code to take advantage of Google's relays
Marcus Lundblad <malu@pidgin.im>
parents: 28379
diff changeset
290 gchar *google_relay_token;
c3dbe0b64f44 Some unfinished code to take advantage of Google's relays
Marcus Lundblad <malu@pidgin.im>
parents: 28379
diff changeset
291 gchar *google_relay_host;
17800
39a0f9ed0e26 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 <am@adiumx.com>
parents: 17783
diff changeset
292 };
12508
32f6f8bf3a57 [gaim-migrate @ 14820]
Simon Wilkinson
parents: 11675
diff changeset
293
23586
e495a4623f76 Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents: 22800
diff changeset
294 typedef gboolean (JabberFeatureEnabled)(JabberStream *js, const gchar *namespace);
2086
007508451e2c [gaim-migrate @ 2096]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
295
39556
622bf98df0ac Remove unnecessary struct tags.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39519
diff changeset
296 typedef struct
17783
2687df1ca202 PEP publishing features are now only announced in disco#info when PEP is supported by the server.
Andreas Monitzer <am@adiumx.com>
parents: 17779
diff changeset
297 {
2687df1ca202 PEP publishing features are now only announced in disco#info when PEP is supported by the server.
Andreas Monitzer <am@adiumx.com>
parents: 17779
diff changeset
298 gchar *namespace;
2687df1ca202 PEP publishing features are now only announced in disco#info when PEP is supported by the server.
Andreas Monitzer <am@adiumx.com>
parents: 17779
diff changeset
299 JabberFeatureEnabled *is_enabled;
2687df1ca202 PEP publishing features are now only announced in disco#info when PEP is supported by the server.
Andreas Monitzer <am@adiumx.com>
parents: 17779
diff changeset
300 } JabberFeature;
2687df1ca202 PEP publishing features are now only announced in disco#info when PEP is supported by the server.
Andreas Monitzer <am@adiumx.com>
parents: 17779
diff changeset
301
39556
622bf98df0ac Remove unnecessary struct tags.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39519
diff changeset
302 typedef struct
23586
e495a4623f76 Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents: 22800
diff changeset
303 {
e495a4623f76 Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents: 22800
diff changeset
304 gchar *category;
e495a4623f76 Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents: 22800
diff changeset
305 gchar *type;
e495a4623f76 Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents: 22800
diff changeset
306 gchar *name;
23589
91775cc26843 * defined JabberCapsIdentity as struct _JabberIdentity
Tobias Markmann <tfar@soc.pidgin.im>
parents: 23586
diff changeset
307 gchar *lang;
23586
e495a4623f76 Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents: 22800
diff changeset
308 } JabberIdentity;
e495a4623f76 Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents: 22800
diff changeset
309
39556
622bf98df0ac Remove unnecessary struct tags.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39519
diff changeset
310 typedef struct {
21688
a16385b34219 Implement more of XEP-0065 to support sending files through a proxy. To avoid adding strings this close to a release, it only supports using a proxy that is discovered from the server, but we'll include an account option to manually specify a ft proxy in the next release. Lots of this is based on a patch from galt - Fixes #3730, #116, #1768
Daniel Atallah <datallah@pidgin.im>
parents: 21279
diff changeset
311 char *jid;
a16385b34219 Implement more of XEP-0065 to support sending files through a proxy. To avoid adding strings this close to a release, it only supports using a proxy that is discovered from the server, but we'll include an account option to manually specify a ft proxy in the next release. Lots of this is based on a patch from galt - Fixes #3730, #116, #1768
Daniel Atallah <datallah@pidgin.im>
parents: 21279
diff changeset
312 char *host;
34457
a9d3726c3a8f Clang warnings: clean up libpurple
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents: 34269
diff changeset
313 guint16 port;
21688
a16385b34219 Implement more of XEP-0065 to support sending files through a proxy. To avoid adding strings this close to a release, it only supports using a proxy that is discovered from the server, but we'll include an account option to manually specify a ft proxy in the next release. Lots of this is based on a patch from galt - Fixes #3730, #116, #1768
Daniel Atallah <datallah@pidgin.im>
parents: 21279
diff changeset
314 char *zeroconf;
a16385b34219 Implement more of XEP-0065 to support sending files through a proxy. To avoid adding strings this close to a release, it only supports using a proxy that is discovered from the server, but we'll include an account option to manually specify a ft proxy in the next release. Lots of this is based on a patch from galt - Fixes #3730, #116, #1768
Daniel Atallah <datallah@pidgin.im>
parents: 21279
diff changeset
315 } JabberBytestreamsStreamhost;
a16385b34219 Implement more of XEP-0065 to support sending files through a proxy. To avoid adding strings this close to a release, it only supports using a proxy that is discovered from the server, but we'll include an account option to manually specify a ft proxy in the next release. Lots of this is based on a patch from galt - Fixes #3730, #116, #1768
Daniel Atallah <datallah@pidgin.im>
parents: 21279
diff changeset
316
17783
2687df1ca202 PEP publishing features are now only announced in disco#info when PEP is supported by the server.
Andreas Monitzer <am@adiumx.com>
parents: 17779
diff changeset
317 /* what kind of additional features as returned from disco#info are supported? */
2687df1ca202 PEP publishing features are now only announced in disco#info when PEP is supported by the server.
Andreas Monitzer <am@adiumx.com>
parents: 17779
diff changeset
318 extern GList *jabber_features;
30512
f0f51b3a3f30 jabber: Move another function out of caps.c...
Paul Aurich <darkrain42@pidgin.im>
parents: 30150
diff changeset
319 /* A sorted list of identities advertised. Use jabber_add_identity to add
f0f51b3a3f30 jabber: Move another function out of caps.c...
Paul Aurich <darkrain42@pidgin.im>
parents: 30150
diff changeset
320 * so it remains sorted.
f0f51b3a3f30 jabber: Move another function out of caps.c...
Paul Aurich <darkrain42@pidgin.im>
parents: 30150
diff changeset
321 */
23586
e495a4623f76 Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents: 22800
diff changeset
322 extern GList *jabber_identities;
17783
2687df1ca202 PEP publishing features are now only announced in disco#info when PEP is supported by the server.
Andreas Monitzer <am@adiumx.com>
parents: 17779
diff changeset
323
36582
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
324 /**
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
325 * Returns the GType for the JabberProtocol object.
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
326 */
36775
5e59f252d777 Added G_MODULE_EXPORT declaration to protocol get_type() functions
Ankit Vani <a@nevitus.org>
parents: 36692
diff changeset
327 G_MODULE_EXPORT GType jabber_protocol_get_type(void);
36582
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
328
34935
686fa55b0deb Replaced xmlnode with PurpleXmlNode, and xmlnode_* API with purple_xmlnode_* API
Ankit Vani <a@nevitus.org>
parents: 34870
diff changeset
329 void jabber_stream_features_parse(JabberStream *js, PurpleXmlNode *packet);
686fa55b0deb Replaced xmlnode with PurpleXmlNode, and xmlnode_* API with purple_xmlnode_* API
Ankit Vani <a@nevitus.org>
parents: 34870
diff changeset
330 void jabber_process_packet(JabberStream *js, PurpleXmlNode **packet);
686fa55b0deb Replaced xmlnode with PurpleXmlNode, and xmlnode_* API with purple_xmlnode_* API
Ankit Vani <a@nevitus.org>
parents: 34870
diff changeset
331 void jabber_send(JabberStream *js, PurpleXmlNode *data);
7642
4e1735a499f5 [gaim-migrate @ 8285]
Nathan Walp <nwalp@pidgin.im>
parents: 7395
diff changeset
332 void jabber_send_raw(JabberStream *js, const char *data, int len);
34935
686fa55b0deb Replaced xmlnode with PurpleXmlNode, and xmlnode_* API with purple_xmlnode_* API
Ankit Vani <a@nevitus.org>
parents: 34870
diff changeset
333 void jabber_send_signal_cb(PurpleConnection *pc, PurpleXmlNode **packet,
27225
48c94daedc1c Use the jabber-sending-xmlnode signal to send all XMPP stanzas.
Paul Aurich <darkrain42@pidgin.im>
parents: 27221
diff changeset
334 gpointer unused);
2086
007508451e2c [gaim-migrate @ 2096]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
335
7014
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
336 void jabber_stream_set_state(JabberStream *js, JabberStreamState state);
2086
007508451e2c [gaim-migrate @ 2096]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
337
25817
09d6a40a341d Pass IQ handlers type, from, id, and the child node
Paul Aurich <darkrain42@pidgin.im>
parents: 25290
diff changeset
338 void jabber_register_parse(JabberStream *js, const char *from,
34935
686fa55b0deb Replaced xmlnode with PurpleXmlNode, and xmlnode_* API with purple_xmlnode_* API
Ankit Vani <a@nevitus.org>
parents: 34870
diff changeset
339 JabberIqType type, const char *id, PurpleXmlNode *query);
8016
d75a4e86f7c3 [gaim-migrate @ 8696]
Nathan Walp <nwalp@pidgin.im>
parents: 7642
diff changeset
340 void jabber_register_start(JabberStream *js);
7077
59212c1d205a [gaim-migrate @ 7642]
Nathan Walp <nwalp@pidgin.im>
parents: 7072
diff changeset
341
7014
11471fae7ba0 [gaim-migrate @ 7577]
Nathan Walp <nwalp@pidgin.im>
parents: 3717
diff changeset
342 char *jabber_get_next_id(JabberStream *js);
2086
007508451e2c [gaim-migrate @ 2096]
Eric Warmenhoven <warmenhoven@yahoo.com>
parents:
diff changeset
343
21150
bedd1215fb5e Stop jabber setting wants_to_die itself. This involved plumbing disconnection
Will Thompson <resiak@pidgin.im>
parents: 20401
diff changeset
344 /** Parse an error into a human-readable string and optionally a disconnect
bedd1215fb5e Stop jabber setting wants_to_die itself. This involved plumbing disconnection
Will Thompson <resiak@pidgin.im>
parents: 20401
diff changeset
345 * reason.
bedd1215fb5e Stop jabber setting wants_to_die itself. This involved plumbing disconnection
Will Thompson <resiak@pidgin.im>
parents: 20401
diff changeset
346 * @param js the stream on which the error occurred.
bedd1215fb5e Stop jabber setting wants_to_die itself. This involved plumbing disconnection
Will Thompson <resiak@pidgin.im>
parents: 20401
diff changeset
347 * @param packet the error packet
bedd1215fb5e Stop jabber setting wants_to_die itself. This involved plumbing disconnection
Will Thompson <resiak@pidgin.im>
parents: 20401
diff changeset
348 * @param reason where to store the disconnection reason, or @c NULL if you
bedd1215fb5e Stop jabber setting wants_to_die itself. This involved plumbing disconnection
Will Thompson <resiak@pidgin.im>
parents: 20401
diff changeset
349 * don't care or you don't intend to close the connection.
bedd1215fb5e Stop jabber setting wants_to_die itself. This involved plumbing disconnection
Will Thompson <resiak@pidgin.im>
parents: 20401
diff changeset
350 */
34935
686fa55b0deb Replaced xmlnode with PurpleXmlNode, and xmlnode_* API with purple_xmlnode_* API
Ankit Vani <a@nevitus.org>
parents: 34870
diff changeset
351 char *jabber_parse_error(JabberStream *js, PurpleXmlNode *packet, PurpleConnectionError *reason);
8401
9fe6cadf2581 [gaim-migrate @ 9130]
Nathan Walp <nwalp@pidgin.im>
parents: 8312
diff changeset
352
30808
3b3b80587ebf jabber: Comment the problematic behavior of jabber_add_(feature|identity)
Paul Aurich <darkrain42@pidgin.im>
parents: 30769
diff changeset
353 /**
3b3b80587ebf jabber: Comment the problematic behavior of jabber_add_(feature|identity)
Paul Aurich <darkrain42@pidgin.im>
parents: 30769
diff changeset
354 * Add a feature to the list of features advertised via disco#info. If you
3b3b80587ebf jabber: Comment the problematic behavior of jabber_add_(feature|identity)
Paul Aurich <darkrain42@pidgin.im>
parents: 30769
diff changeset
355 * call this while accounts are connected, Bad Things(TM) will happen because
3b3b80587ebf jabber: Comment the problematic behavior of jabber_add_(feature|identity)
Paul Aurich <darkrain42@pidgin.im>
parents: 30769
diff changeset
356 * the Entity Caps hash will be out-of-date (which should be fixed :/)
3b3b80587ebf jabber: Comment the problematic behavior of jabber_add_(feature|identity)
Paul Aurich <darkrain42@pidgin.im>
parents: 30769
diff changeset
357 *
3b3b80587ebf jabber: Comment the problematic behavior of jabber_add_(feature|identity)
Paul Aurich <darkrain42@pidgin.im>
parents: 30769
diff changeset
358 * @param namespace The namespace of the feature
3b3b80587ebf jabber: Comment the problematic behavior of jabber_add_(feature|identity)
Paul Aurich <darkrain42@pidgin.im>
parents: 30769
diff changeset
359 * @param cb A callback determining whether or not this feature
3b3b80587ebf jabber: Comment the problematic behavior of jabber_add_(feature|identity)
Paul Aurich <darkrain42@pidgin.im>
parents: 30769
diff changeset
360 * will advertised; may be NULL.
3b3b80587ebf jabber: Comment the problematic behavior of jabber_add_(feature|identity)
Paul Aurich <darkrain42@pidgin.im>
parents: 30769
diff changeset
361 */
3b3b80587ebf jabber: Comment the problematic behavior of jabber_add_(feature|identity)
Paul Aurich <darkrain42@pidgin.im>
parents: 30769
diff changeset
362 void jabber_add_feature(const gchar *namespace, JabberFeatureEnabled cb);
23586
e495a4623f76 Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents: 22800
diff changeset
363 void jabber_remove_feature(const gchar *namespace);
e495a4623f76 Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents: 22800
diff changeset
364
30808
3b3b80587ebf jabber: Comment the problematic behavior of jabber_add_(feature|identity)
Paul Aurich <darkrain42@pidgin.im>
parents: 30769
diff changeset
365 /** Adds an identity to this jabber library instance. For list of valid values
3b3b80587ebf jabber: Comment the problematic behavior of jabber_add_(feature|identity)
Paul Aurich <darkrain42@pidgin.im>
parents: 30769
diff changeset
366 * visit the website of the XMPP Registrar
33956
84f5fef32685 Fix and/or canonicalize a few URLs.
Mark Doliner <mark@kingant.net>
parents: 33955
diff changeset
367 * (http://xmpp.org/registrar/disco-categories.html#client)
30808
3b3b80587ebf jabber: Comment the problematic behavior of jabber_add_(feature|identity)
Paul Aurich <darkrain42@pidgin.im>
parents: 30769
diff changeset
368 *
3b3b80587ebf jabber: Comment the problematic behavior of jabber_add_(feature|identity)
Paul Aurich <darkrain42@pidgin.im>
parents: 30769
diff changeset
369 * Like with jabber_add_feature, if you call this while accounts are connected,
3b3b80587ebf jabber: Comment the problematic behavior of jabber_add_(feature|identity)
Paul Aurich <darkrain42@pidgin.im>
parents: 30769
diff changeset
370 * Bad Things will happen.
3b3b80587ebf jabber: Comment the problematic behavior of jabber_add_(feature|identity)
Paul Aurich <darkrain42@pidgin.im>
parents: 30769
diff changeset
371 *
23586
e495a4623f76 Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents: 22800
diff changeset
372 * @param category the category of the identity.
24734
780b8ad67c22 Sprinkle around more support for xml:lang on JabberIdentities
Paul Aurich <darkrain42@pidgin.im>
parents: 24716
diff changeset
373 * @param type the type of the identity.
780b8ad67c22 Sprinkle around more support for xml:lang on JabberIdentities
Paul Aurich <darkrain42@pidgin.im>
parents: 24716
diff changeset
374 * @param language the language localization of the name. Can be NULL.
780b8ad67c22 Sprinkle around more support for xml:lang on JabberIdentities
Paul Aurich <darkrain42@pidgin.im>
parents: 24716
diff changeset
375 * @param name the name of the identity.
23586
e495a4623f76 Removing short-names for features and calculating own caps hash.
Tobias Markmann <tfar@soc.pidgin.im>
parents: 22800
diff changeset
376 */
24737
b8a96a07e7ac Add more jabber plugin unloading functions to clean up more data structures
Paul Aurich <darkrain42@pidgin.im>
parents: 24735
diff changeset
377 void jabber_add_identity(const gchar *category, const gchar *type, const gchar *lang, const gchar *name);
17770
e67998927a3c Added the ability to define extensions to caps
Andreas Monitzer <am@adiumx.com>
parents: 17769
diff changeset
378
26533
5c74696c34d1 BOSH: For authentication purposes, HTTPS is equivalent to a secured JabberStream.
Paul Aurich <darkrain42@pidgin.im>
parents: 26072
diff changeset
379 /**
30512
f0f51b3a3f30 jabber: Move another function out of caps.c...
Paul Aurich <darkrain42@pidgin.im>
parents: 30150
diff changeset
380 * GCompareFunc for JabberIdentity structs.
f0f51b3a3f30 jabber: Move another function out of caps.c...
Paul Aurich <darkrain42@pidgin.im>
parents: 30150
diff changeset
381 */
f0f51b3a3f30 jabber: Move another function out of caps.c...
Paul Aurich <darkrain42@pidgin.im>
parents: 30150
diff changeset
382 gint jabber_identity_compare(gconstpointer a, gconstpointer b);
f0f51b3a3f30 jabber: Move another function out of caps.c...
Paul Aurich <darkrain42@pidgin.im>
parents: 30150
diff changeset
383
f0f51b3a3f30 jabber: Move another function out of caps.c...
Paul Aurich <darkrain42@pidgin.im>
parents: 30150
diff changeset
384 /**
26533
5c74696c34d1 BOSH: For authentication purposes, HTTPS is equivalent to a secured JabberStream.
Paul Aurich <darkrain42@pidgin.im>
parents: 26072
diff changeset
385 * Returns true if this connection is over a secure (SSL) stream. Use this
5c74696c34d1 BOSH: For authentication purposes, HTTPS is equivalent to a secured JabberStream.
Paul Aurich <darkrain42@pidgin.im>
parents: 26072
diff changeset
386 * instead of checking js->gsc because BOSH stores its PurpleSslConnection
5c74696c34d1 BOSH: For authentication purposes, HTTPS is equivalent to a secured JabberStream.
Paul Aurich <darkrain42@pidgin.im>
parents: 26072
diff changeset
387 * members in its own data structure.
5c74696c34d1 BOSH: For authentication purposes, HTTPS is equivalent to a secured JabberStream.
Paul Aurich <darkrain42@pidgin.im>
parents: 26072
diff changeset
388 */
5c74696c34d1 BOSH: For authentication purposes, HTTPS is equivalent to a secured JabberStream.
Paul Aurich <darkrain42@pidgin.im>
parents: 26072
diff changeset
389 gboolean jabber_stream_is_ssl(JabberStream *js);
17770
e67998927a3c Added the ability to define extensions to caps
Andreas Monitzer <am@adiumx.com>
parents: 17769
diff changeset
390
30056
24dcb476e62b jabber: Send whitespace keepalives every two minutes of (outgoing) silence.
Paul Aurich <darkrain42@pidgin.im>
parents: 29865
diff changeset
391 /**
24dcb476e62b jabber: Send whitespace keepalives every two minutes of (outgoing) silence.
Paul Aurich <darkrain42@pidgin.im>
parents: 29865
diff changeset
392 * Restart the "we haven't sent anything in a while and should send
24dcb476e62b jabber: Send whitespace keepalives every two minutes of (outgoing) silence.
Paul Aurich <darkrain42@pidgin.im>
parents: 29865
diff changeset
393 * something or the server will kick us off" timer (obviously
24dcb476e62b jabber: Send whitespace keepalives every two minutes of (outgoing) silence.
Paul Aurich <darkrain42@pidgin.im>
parents: 29865
diff changeset
394 * called when sending something. It's exposed for BOSH.)
24dcb476e62b jabber: Send whitespace keepalives every two minutes of (outgoing) silence.
Paul Aurich <darkrain42@pidgin.im>
parents: 29865
diff changeset
395 */
24dcb476e62b jabber: Send whitespace keepalives every two minutes of (outgoing) silence.
Paul Aurich <darkrain42@pidgin.im>
parents: 29865
diff changeset
396 void jabber_stream_restart_inactivity_timer(JabberStream *js);
24dcb476e62b jabber: Send whitespace keepalives every two minutes of (outgoing) silence.
Paul Aurich <darkrain42@pidgin.im>
parents: 29865
diff changeset
397
36637
9b0109ae118d Renamed some prpl stuff to protocol stuff.
Ankit Vani <a@nevitus.org>
parents: 36613
diff changeset
398 /** Protocol functions */
16302
eb633ebf84f2 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@pidgin.im>
parents: 16066
diff changeset
399 const char *jabber_list_icon(PurpleAccount *a, PurpleBuddy *b);
eb633ebf84f2 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@pidgin.im>
parents: 16066
diff changeset
400 const char* jabber_list_emblem(PurpleBuddy *b);
eb633ebf84f2 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@pidgin.im>
parents: 16066
diff changeset
401 char *jabber_status_text(PurpleBuddy *b);
eb633ebf84f2 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@pidgin.im>
parents: 16066
diff changeset
402 void jabber_tooltip_text(PurpleBuddy *b, PurpleNotifyUserInfo *user_info, gboolean full);
eb633ebf84f2 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@pidgin.im>
parents: 16066
diff changeset
403 GList *jabber_status_types(PurpleAccount *account);
eb633ebf84f2 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@pidgin.im>
parents: 16066
diff changeset
404 void jabber_login(PurpleAccount *account);
eb633ebf84f2 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@pidgin.im>
parents: 16066
diff changeset
405 void jabber_close(PurpleConnection *gc);
eb633ebf84f2 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@pidgin.im>
parents: 16066
diff changeset
406 void jabber_idle_set(PurpleConnection *gc, int idle);
27175
e027ae421bf3 Support pushed notifications about XEP-0191 Blocks/Unblocks. Closes #8045.
Paul Aurich <darkrain42@pidgin.im>
parents: 27155
diff changeset
407 void jabber_blocklist_parse_push(JabberStream *js, const char *from,
e027ae421bf3 Support pushed notifications about XEP-0191 Blocks/Unblocks. Closes #8045.
Paul Aurich <darkrain42@pidgin.im>
parents: 27155
diff changeset
408 JabberIqType type, const char *id,
34935
686fa55b0deb Replaced xmlnode with PurpleXmlNode, and xmlnode_* API with purple_xmlnode_* API
Ankit Vani <a@nevitus.org>
parents: 34870
diff changeset
409 PurpleXmlNode *child);
25290
033942580f51 Commit patch #7670: Implement xep-0191 (simple blocking) for jabber protocols
Mark Doliner <markdoliner@pidgin.im>
parents: 24012
diff changeset
410 void jabber_request_block_list(JabberStream *js);
033942580f51 Commit patch #7670: Implement xep-0191 (simple blocking) for jabber protocols
Mark Doliner <markdoliner@pidgin.im>
parents: 24012
diff changeset
411 void jabber_add_deny(PurpleConnection *gc, const char *who);
033942580f51 Commit patch #7670: Implement xep-0191 (simple blocking) for jabber protocols
Mark Doliner <markdoliner@pidgin.im>
parents: 24012
diff changeset
412 void jabber_rem_deny(PurpleConnection *gc, const char *who);
16302
eb633ebf84f2 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@pidgin.im>
parents: 16066
diff changeset
413 void jabber_keepalive(PurpleConnection *gc);
17806
ed4647f0915d Added the ability to register gateways, re-using most of the account registration code for this.
Andreas Monitzer <am@adiumx.com>
parents: 17800
diff changeset
414 void jabber_register_gateway(JabberStream *js, const char *gateway);
16302
eb633ebf84f2 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@pidgin.im>
parents: 16066
diff changeset
415 void jabber_register_account(PurpleAccount *account);
18994
310e9d853e2b Implemented a callback for unregistering, mirroring the registration callback. Since this is a new API, I can do it properly by passing it right in the unregister function call, instead of having a separate function for setting it.
Andreas Monitzer <am@adiumx.com>
parents: 18912
diff changeset
416 void jabber_unregister_account(PurpleAccount *account, PurpleAccountUnregistrationCb cb, void *user_data);
38859
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38838
diff changeset
417 gboolean jabber_send_attention(PurpleProtocolAttention *attn, PurpleConnection *gc, const char *username, guint code);
ed15916ec9ed First pass at moving attention to it's own files
Gary Kramlich <grim@reaperworld.com>
parents: 38838
diff changeset
418 GList *jabber_attention_types(PurpleProtocolAttention *attn, PurpleAccount *account);
16302
eb633ebf84f2 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@pidgin.im>
parents: 16066
diff changeset
419 void jabber_convo_closed(PurpleConnection *gc, const char *who);
eb633ebf84f2 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@pidgin.im>
parents: 16066
diff changeset
420 PurpleChat *jabber_find_blist_chat(PurpleAccount *account, const char *name);
eb633ebf84f2 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@pidgin.im>
parents: 16066
diff changeset
421 gboolean jabber_offline_message(const PurpleBuddy *buddy);
36545
23b59a16c808 Replaced some _prpl_ stuff with _protocol_
Ankit Vani <a@nevitus.org>
parents: 36544
diff changeset
422 int jabber_protocol_send_raw(PurpleConnection *gc, const char *buf, int len);
36496
e7fe371c60a6 Refactored jabber to use the new API
Ankit Vani <a@nevitus.org>
parents: 34870
diff changeset
423 GList *jabber_get_actions(PurpleConnection *gc);
26668
ef06285f3b64 Fix allowing gmail user to initiate voice call by advertising a specific ext
Paul Aurich <darkrain42@pidgin.im>
parents: 26658
diff changeset
424
ef06285f3b64 Fix allowing gmail user to initiate voice call by advertising a specific ext
Paul Aurich <darkrain42@pidgin.im>
parents: 26658
diff changeset
425 gboolean jabber_audio_enabled(JabberStream *js, const char *unused);
27202
5244a5510e0e Add Gmail video support.
Michael Ruprecht <maiku@pidgin.im>
parents: 27175
diff changeset
426 gboolean jabber_video_enabled(JabberStream *js, const char *unused);
26746
2a2d45ac9774 Switch media to store accounts rather than connections.
Michael Ruprecht <maiku@pidgin.im>
parents: 26703
diff changeset
427 gboolean jabber_initiate_media(PurpleAccount *account, const char *who,
26454
94130b583e0b Clean up usage of USE_VV in the XMPP protocol.
Michael Ruprecht <maiku@pidgin.im>
parents: 26337
diff changeset
428 PurpleMediaSessionType type);
26746
2a2d45ac9774 Switch media to store accounts rather than connections.
Michael Ruprecht <maiku@pidgin.im>
parents: 26703
diff changeset
429 PurpleMediaCaps jabber_get_media_caps(PurpleAccount *account, const char *who);
38838
c93c58dd6ce4 fix up jabber for the xfer cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 38833
diff changeset
430 gboolean jabber_can_receive_file(PurpleProtocolXfer *xfer, PurpleConnection *gc, const gchar *who);
26668
ef06285f3b64 Fix allowing gmail user to initiate voice call by advertising a specific ext
Paul Aurich <darkrain42@pidgin.im>
parents: 26658
diff changeset
431
26703
17f9a4bef2a3 Further standardize the sentinel style (did someone say leading _s are theoretically a reserved namespace?)
Paul Aurich <darkrain42@pidgin.im>
parents: 26692
diff changeset
432 #endif /* PURPLE_JABBER_H_ */

mercurial