annotate libpurple/protocols/jabber/jingle/rawudp.h @ 31582:bb91133708fe

jabber: Make the BOSH parsing a little more resilient and add more diagnostic output
author Paul Aurich <paul@darkrain42.org>
date Mon, 10 Jan 2011 03:34:00 +0000
parents c585572e80dd
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26023
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
1 /**
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
2 * @file rawudp.h
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
3 *
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
4 * purple
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
5 *
28398
c585572e80dd Remove specific copyright lines from the XMPP prpl.
Paul Aurich <paul@darkrain42.org>
parents: 26562
diff changeset
6 * Purple is the legal property of its developers, whose names are too numerous
c585572e80dd Remove specific copyright lines from the XMPP prpl.
Paul Aurich <paul@darkrain42.org>
parents: 26562
diff changeset
7 * to list here. Please refer to the COPYRIGHT file distributed with this
c585572e80dd Remove specific copyright lines from the XMPP prpl.
Paul Aurich <paul@darkrain42.org>
parents: 26562
diff changeset
8 * source distribution.
c585572e80dd Remove specific copyright lines from the XMPP prpl.
Paul Aurich <paul@darkrain42.org>
parents: 26562
diff changeset
9 *
26023
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
12 * the Free Software Foundation; either version 2 of the License, or
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
13 * (at your option) any later version.
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
14 *
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
15 * This program is distributed in the hope that it will be useful,
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
18 * GNU General Public License for more details.
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
19 *
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
20 * You should have received a copy of the GNU General Public License
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
21 * along with this program; if not, write to the Free Software
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
23 */
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
24
26562
0c8d41f5caa0 Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <paul@darkrain42.org>
parents: 26376
diff changeset
25 #ifndef PURPLE_JABBER_JINGLE_RAWUDP_H
0c8d41f5caa0 Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <paul@darkrain42.org>
parents: 26376
diff changeset
26 #define PURPLE_JABBER_JINGLE_RAWUDP_H
26023
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
27
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
28 #include <glib.h>
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
29 #include <glib-object.h>
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
30
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
31 #include "transport.h"
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
32
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
33 G_BEGIN_DECLS
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
34
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
35 #define JINGLE_TYPE_RAWUDP (jingle_rawudp_get_type())
26030
365eb0b68d5f Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26023
diff changeset
36 #define JINGLE_TYPE_RAWUDP_CANDIDATE (jingle_rawudp_candidate_get_type())
26023
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
37 #define JINGLE_RAWUDP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), JINGLE_TYPE_RAWUDP, JingleRawUdp))
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
38 #define JINGLE_RAWUDP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), JINGLE_TYPE_RAWUDP, JingleRawUdpClass))
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
39 #define JINGLE_IS_RAWUDP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), JINGLE_TYPE_RAWUDP))
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
40 #define JINGLE_IS_RAWUDP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), JINGLE_TYPE_RAWUDP))
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
41 #define JINGLE_RAWUDP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), JINGLE_TYPE_RAWUDP, JingleRawUdpClass))
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
42
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
43 /** @copydoc _JingleRawUdp */
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
44 typedef struct _JingleRawUdp JingleRawUdp;
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
45 /** @copydoc _JingleRawUdpClass */
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
46 typedef struct _JingleRawUdpClass JingleRawUdpClass;
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
47 /** @copydoc _JingleRawUdpPrivate */
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
48 typedef struct _JingleRawUdpPrivate JingleRawUdpPrivate;
26030
365eb0b68d5f Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26023
diff changeset
49 /** @copydoc _JingleRawUdpCandidate */
365eb0b68d5f Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26023
diff changeset
50 typedef struct _JingleRawUdpCandidate JingleRawUdpCandidate;
26023
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
51
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
52 /** The rawudp class */
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
53 struct _JingleRawUdpClass
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
54 {
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
55 JingleTransportClass parent_class; /**< The parent class. */
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
56
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
57 xmlnode *(*to_xml) (JingleTransport *transport, xmlnode *content, JingleActionType action);
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
58 JingleTransport *(*parse) (xmlnode *transport);
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
59 };
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
60
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
61 /** The rawudp class's private data */
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
62 struct _JingleRawUdp
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
63 {
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
64 JingleTransport parent; /**< The parent of this object. */
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
65 JingleRawUdpPrivate *priv; /**< The private data of this object. */
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
66 };
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
67
26030
365eb0b68d5f Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26023
diff changeset
68 struct _JingleRawUdpCandidate
365eb0b68d5f Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26023
diff changeset
69 {
365eb0b68d5f Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26023
diff changeset
70 guint generation;
365eb0b68d5f Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26023
diff changeset
71 guint component;
365eb0b68d5f Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26023
diff changeset
72 gchar *id;
365eb0b68d5f Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26023
diff changeset
73 gchar *ip;
365eb0b68d5f Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26023
diff changeset
74 guint port;
26376
1ac93927e7f5 Don't forget to copy the rem_know attribute of IceUdp candidates.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26030
diff changeset
75
1ac93927e7f5 Don't forget to copy the rem_know attribute of IceUdp candidates.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26030
diff changeset
76 gboolean rem_known; /* TRUE if the remote side knows
1ac93927e7f5 Don't forget to copy the rem_know attribute of IceUdp candidates.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26030
diff changeset
77 * about this candidate */
26030
365eb0b68d5f Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26023
diff changeset
78 };
365eb0b68d5f Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26023
diff changeset
79
26023
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
80 #ifdef __cplusplus
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
81 extern "C" {
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
82 #endif
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
83
26030
365eb0b68d5f Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26023
diff changeset
84 GType jingle_rawudp_candidate_get_type(void);
365eb0b68d5f Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26023
diff changeset
85
26023
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
86 /**
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
87 * Gets the rawudp class's GType
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
88 *
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
89 * @return The rawudp class's GType.
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
90 */
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
91 GType jingle_rawudp_get_type(void);
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
92
26030
365eb0b68d5f Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26023
diff changeset
93 JingleRawUdpCandidate *jingle_rawudp_candidate_new(const gchar *id,
365eb0b68d5f Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26023
diff changeset
94 guint generation, guint component, const gchar *ip, guint port);
365eb0b68d5f Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26023
diff changeset
95 void jingle_rawudp_add_local_candidate(JingleRawUdp *rawudp, JingleRawUdpCandidate *candidate);
365eb0b68d5f Update Jingle raw-udp to latest spec version.
Mike Ruprecht <maiku@soc.pidgin.im>
parents: 26023
diff changeset
96 GList *jingle_rawudp_get_remote_candidates(JingleRawUdp *rawudp);
26023
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
97
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
98 #ifdef __cplusplus
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
99 }
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
100 #endif
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
101
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
102 G_END_DECLS
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
103
26562
0c8d41f5caa0 Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <paul@darkrain42.org>
parents: 26376
diff changeset
104 #endif /* PURPLE_JABBER_JINGLE_RAWUDP_H */
26023
7252e3d0c627 Add files I missed committing before and remove a few unnecessary functions.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff changeset
105