Mercurial > pidgin
annotate libpurple/protocols/jabber/bosh.h @ 25995:e995540378f0
Obey the 'inactivity' attribute and send blank updates often enough. Also,
when receiving a reply from the server, if we have data to send, send it.
This is pretty clunky, as it currently triggers about two seconds before
the keepalive ping. Left a TODO in the code regarding that.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Mon, 16 Mar 2009 06:32:55 +0000 |
parents | 62d9bce9ff74 |
children | fcee93c74230 |
rev | line source |
---|---|
25038
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
1 /** |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
2 * @file bosh.h Buddy handlers |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
3 * |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
4 * purple |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
5 * |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
6 * Copyright (C) 2008, Tobias Markmann <tmarkmann@googlemail.com> |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
7 * |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
8 * This program is free software; you can redistribute it and/or modify |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
9 * it under the terms of the GNU General Public License as published by |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
10 * the Free Software Foundation; either version 2 of the License, or |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
11 * (at your option) any later version. |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
12 * |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
13 * This program is distributed in the hope that it will be useful, |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
16 * GNU General Public License for more details. |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
17 * |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
18 * You should have received a copy of the GNU General Public License |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
19 * along with this program; if not, write to the Free Software |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
21 */ |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
22 #ifndef _PURPLE_JABBER_BOSH_H_ |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
23 #define _PURPLE_JABBER_BOSH_H_ |
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
24 |
25042
1cbe5a9f6efb
* adding bosh files to Makefile.am & .mingw
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25040
diff
changeset
|
25 typedef struct _PurpleBOSHConnection PurpleBOSHConnection; |
25040 | 26 |
25181
7de1f124f95a
Jabber BOSH: Many fixes
Paul Aurich <paul@darkrain42.org>
parents:
25052
diff
changeset
|
27 #include "jabber.h" |
25042
1cbe5a9f6efb
* adding bosh files to Makefile.am & .mingw
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25040
diff
changeset
|
28 |
25182
17b60b844803
Jabber BOSH: more fixes.
Paul Aurich <paul@darkrain42.org>
parents:
25181
diff
changeset
|
29 void jabber_bosh_init(void); |
17b60b844803
Jabber BOSH: more fixes.
Paul Aurich <paul@darkrain42.org>
parents:
25181
diff
changeset
|
30 void jabber_bosh_uninit(void); |
17b60b844803
Jabber BOSH: more fixes.
Paul Aurich <paul@darkrain42.org>
parents:
25181
diff
changeset
|
31 |
25181
7de1f124f95a
Jabber BOSH: Many fixes
Paul Aurich <paul@darkrain42.org>
parents:
25052
diff
changeset
|
32 PurpleBOSHConnection* jabber_bosh_connection_init(JabberStream *js, const char *url); |
25182
17b60b844803
Jabber BOSH: more fixes.
Paul Aurich <paul@darkrain42.org>
parents:
25181
diff
changeset
|
33 void jabber_bosh_connection_destroy(PurpleBOSHConnection *conn); |
17b60b844803
Jabber BOSH: more fixes.
Paul Aurich <paul@darkrain42.org>
parents:
25181
diff
changeset
|
34 |
25042
1cbe5a9f6efb
* adding bosh files to Makefile.am & .mingw
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25040
diff
changeset
|
35 void jabber_bosh_connection_connect(PurpleBOSHConnection *conn); |
25182
17b60b844803
Jabber BOSH: more fixes.
Paul Aurich <paul@darkrain42.org>
parents:
25181
diff
changeset
|
36 void jabber_bosh_connection_close(PurpleBOSHConnection *conn); |
25043
15d9825a5621
* adding receive callback; preparing receiving and boot code
Tobias Markmann <tfar@soc.pidgin.im>
parents:
25042
diff
changeset
|
37 void jabber_bosh_connection_send(PurpleBOSHConnection *conn, xmlnode *node); |
25182
17b60b844803
Jabber BOSH: more fixes.
Paul Aurich <paul@darkrain42.org>
parents:
25181
diff
changeset
|
38 void jabber_bosh_connection_send_raw(PurpleBOSHConnection *conn, const char *data, int len); |
25183
62d9bce9ff74
Reorder some functions to eliminate prototypes and
Paul Aurich <paul@darkrain42.org>
parents:
25182
diff
changeset
|
39 void jabber_bosh_connection_refresh(PurpleBOSHConnection *conn); |
25038
7768cad83127
* looking for alternative connection methods if direct connection fails
Tobias Markmann <tfar@soc.pidgin.im>
parents:
diff
changeset
|
40 #endif /* _PURPLE_JABBER_BOSH_H_ */ |