libpurple/protocols/jabber/jingle/iceudp.h

Sun, 04 Jan 2009 05:19:54 +0000

author
Michael Ruprecht <maiku@pidgin.im>
date
Sun, 04 Jan 2009 05:19:54 +0000
branch
vv
changeset 26187
3b3059a7c091
parent 26166
ad7d09fef256
child 26302
0fb3ad9495a5
permissions
-rw-r--r--

Add initiator property to PurpleMedia.

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
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
21 #ifndef JINGLE_ICEUDP_H
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
22 #define JINGLE_ICEUDP_H
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;
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
69 gchar *ip;
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
70 guint network;
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
71 guint port;
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
72 guint priority;
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
73 gchar *protocol;
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
74 gchar *type;
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
75
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
76 gchar *username;
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
77 gchar *password;
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
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
80 #ifdef __cplusplus
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
81 extern "C" {
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
82 #endif
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
83
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
84 GType jingle_iceudp_candidate_get_type(void);
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 /**
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
87 * Gets the iceudp class's GType
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
88 *
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
89 * @return The iceudp class's GType.
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
90 */
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
91 GType jingle_iceudp_get_type(void);
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 JingleIceUdpCandidate *jingle_iceudp_candidate_new(guint component,
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
94 const gchar *foundation, guint generation, const gchar *ip,
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
95 guint network, guint port, guint priority, const gchar *protocol,
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
96 const gchar *type, const gchar *username, const gchar *password);
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
97 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
98 GList *jingle_iceudp_get_remote_candidates(JingleIceUdp *iceudp);
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
99
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
100 #ifdef __cplusplus
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
101 }
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
102 #endif
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
103
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
104 G_END_DECLS
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
105
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
106 #endif /* JINGLE_ICEUDP_H */
ad7d09fef256 Added a Jingle ice-udp transmitter.
Michael Ruprecht <maiku@pidgin.im>
parents:
diff changeset
107

mercurial