libpurple/protocols/jabber/jingle/iceudp.h

Wed, 13 May 2009 20:29:03 +0000

author
Marcus Lundblad <malu@pidgin.im>
date
Wed, 13 May 2009 20:29:03 +0000
changeset 27110
05ca719b901b
parent 26702
b3c0c14c4c5e
child 28322
ac8fec1d2234
permissions
-rw-r--r--

Support custom smileys in MUCs (when all participants support BoB and a maximum
of 10 participants are in the chat).
Always announce support for BoB, since disable custom smileys will still turn
off fetching them, and BoB can be used for other purposes further on.

26166
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
1 /**
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
2 * @file iceudp.h
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
3 *
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
4 * purple
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
5 *
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
6 * This program is free software; you can redistribute it and/or modify
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
7 * it under the terms of the GNU General Public License as published by
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
8 * the Free Software Foundation; either version 2 of the License, or
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
9 * (at your option) any later version.
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
10 *
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
11 * This program is distributed in the hope that it will be useful,
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
14 * GNU General Public License for more details.
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
15 *
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
16 * You should have received a copy of the GNU General Public License
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
17 * along with this program; if not, write to the Free Software
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
19 */
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
20
26702
b3c0c14c4c5e Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <darkrain42@pidgin.im>
parents: 26413
diff changeset
21 #ifndef PURPLE_JABBER_JINGLE_ICEUDP_H
b3c0c14c4c5e Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <darkrain42@pidgin.im>
parents: 26413
diff changeset
22 #define PURPLE_JABBER_JINGLE_ICEUDP_H
26166
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
23
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
24 #include <glib.h>
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
25 #include <glib-object.h>
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
26
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
27 #include "transport.h"
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
28
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
29 G_BEGIN_DECLS
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
30
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
31 #define JINGLE_TYPE_ICEUDP (jingle_iceudp_get_type())
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
32 #define JINGLE_TYPE_ICEUDP_CANDIDATE (jingle_iceudp_candidate_get_type())
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
33 #define JINGLE_ICEUDP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), JINGLE_TYPE_ICEUDP, JingleIceUdp))
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
34 #define JINGLE_ICEUDP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), JINGLE_TYPE_ICEUDP, JingleIceUdpClass))
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
35 #define JINGLE_IS_ICEUDP(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), JINGLE_TYPE_ICEUDP))
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
36 #define JINGLE_IS_ICEUDP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), JINGLE_TYPE_ICEUDP))
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
37 #define JINGLE_ICEUDP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), JINGLE_TYPE_ICEUDP, JingleIceUdpClass))
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
38
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
39 /** @copydoc _JingleIceUdp */
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
40 typedef struct _JingleIceUdp JingleIceUdp;
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
41 /** @copydoc _JingleIceUdpClass */
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
42 typedef struct _JingleIceUdpClass JingleIceUdpClass;
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
43 /** @copydoc _JingleIceUdpPrivate */
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
44 typedef struct _JingleIceUdpPrivate JingleIceUdpPrivate;
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
45 /** @copydoc _JingleIceUdpCandidate */
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
46 typedef struct _JingleIceUdpCandidate JingleIceUdpCandidate;
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
47
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
48 /** The iceudp class */
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
49 struct _JingleIceUdpClass
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
50 {
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
51 JingleTransportClass parent_class; /**< The parent class. */
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
52
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
53 xmlnode *(*to_xml) (JingleTransport *transport, xmlnode *content, JingleActionType action);
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
54 JingleTransport *(*parse) (xmlnode *transport);
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
55 };
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
56
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
57 /** The iceudp class's private data */
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
58 struct _JingleIceUdp
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
59 {
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
60 JingleTransport parent; /**< The parent of this object. */
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
61 JingleIceUdpPrivate *priv; /**< The private data of this object. */
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
62 };
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
63
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
64 struct _JingleIceUdpCandidate
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
65 {
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
66 guint component;
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
67 gchar *foundation;
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
68 guint generation;
26302
0fb3ad9495a5 Add the id attribute to ice-udp according to the XEP.
Michael Ruprecht <maiku@pidgin.im>
parents: 26166
diff changeset
69 gchar *id;
26166
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
70 gchar *ip;
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
71 guint network;
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
72 guint port;
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
73 guint priority;
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
74 gchar *protocol;
26325
5427d1073629 Use the correct values for Jingle Ice-Udp's rel-addr and rel-port.
Michael Ruprecht <maiku@pidgin.im>
parents: 26302
diff changeset
75 gchar *reladdr;
5427d1073629 Use the correct values for Jingle Ice-Udp's rel-addr and rel-port.
Michael Ruprecht <maiku@pidgin.im>
parents: 26302
diff changeset
76 guint relport;
26166
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
77 gchar *type;
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
78
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
79 gchar *username;
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
80 gchar *password;
26413
ffcca54b2b47 Make IceUdp candidates know whether the remote side knows about them.
Michael Ruprecht <maiku@pidgin.im>
parents: 26325
diff changeset
81
ffcca54b2b47 Make IceUdp candidates know whether the remote side knows about them.
Michael Ruprecht <maiku@pidgin.im>
parents: 26325
diff changeset
82 gboolean rem_known; /* TRUE if the remote side knows
ffcca54b2b47 Make IceUdp candidates know whether the remote side knows about them.
Michael Ruprecht <maiku@pidgin.im>
parents: 26325
diff changeset
83 * about this candidate */
26166
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
84 };
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
85
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
86 #ifdef __cplusplus
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
87 extern "C" {
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
88 #endif
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
89
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
90 GType jingle_iceudp_candidate_get_type(void);
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
91
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
92 /**
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
93 * Gets the iceudp class's GType
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
94 *
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
95 * @return The iceudp class's GType.
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
96 */
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
97 GType jingle_iceudp_get_type(void);
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
98
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
99 JingleIceUdpCandidate *jingle_iceudp_candidate_new(guint component,
26302
0fb3ad9495a5 Add the id attribute to ice-udp according to the XEP.
Michael Ruprecht <maiku@pidgin.im>
parents: 26166
diff changeset
100 const gchar *foundation, guint generation, const gchar *id,
0fb3ad9495a5 Add the id attribute to ice-udp according to the XEP.
Michael Ruprecht <maiku@pidgin.im>
parents: 26166
diff changeset
101 const gchar *ip, guint network, guint port, guint priority,
0fb3ad9495a5 Add the id attribute to ice-udp according to the XEP.
Michael Ruprecht <maiku@pidgin.im>
parents: 26166
diff changeset
102 const gchar *protocol, const gchar *type,
0fb3ad9495a5 Add the id attribute to ice-udp according to the XEP.
Michael Ruprecht <maiku@pidgin.im>
parents: 26166
diff changeset
103 const gchar *username, const gchar *password);
26166
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
104 void jingle_iceudp_add_local_candidate(JingleIceUdp *iceudp, JingleIceUdpCandidate *candidate);
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
105 GList *jingle_iceudp_get_remote_candidates(JingleIceUdp *iceudp);
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
106
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
107 #ifdef __cplusplus
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
108 }
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
109 #endif
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
110
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
111 G_END_DECLS
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
112
26702
b3c0c14c4c5e Standardize the header file sentinels to PURPLE_JABBER_[BLAH]_H
Paul Aurich <darkrain42@pidgin.im>
parents: 26413
diff changeset
113 #endif /* PURPLE_JABBER_JINGLE_ICEUDP_H */
26166
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
114

mercurial