Mercurial > pidgin
annotate libpurple/protocols/jabber/jingle/iceudp.c @ 26097:84ea07648377
Add the id attribute to ice-udp according to the XEP.
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Thu, 05 Feb 2009 09:36:23 +0000 |
parents | db517c55c508 |
children | 36c7efb85220 |
rev | line source |
---|---|
24966
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
1 /** |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
2 * @file iceudp.c |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
3 * |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
4 * purple |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
5 * |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
6 * This program is free software; you can redistribute it and/or modify |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
7 * it under the terms of the GNU General Public License as published by |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
8 * the Free Software Foundation; either version 2 of the License, or |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
9 * (at your option) any later version. |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
10 * |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
11 * This program is distributed in the hope that it will be useful, |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
14 * GNU General Public License for more details. |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
15 * |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
16 * You should have received a copy of the GNU General Public License |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
17 * along with this program; if not, write to the Free Software |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
19 */ |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
20 |
26010
db517c55c508
Make it compile in Windows with the equivalent of --disable-vv.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24966
diff
changeset
|
21 #include "internal.h" |
db517c55c508
Make it compile in Windows with the equivalent of --disable-vv.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
24966
diff
changeset
|
22 |
24966
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
23 #include "iceudp.h" |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
24 #include "jingle.h" |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
25 #include "debug.h" |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
26 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
27 #include <string.h> |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
28 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
29 struct _JingleIceUdpPrivate |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
30 { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
31 GList *local_candidates; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
32 GList *remote_candidates; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
33 }; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
34 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
35 #define JINGLE_ICEUDP_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), JINGLE_TYPE_ICEUDP, JingleIceUdpPrivate)) |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
36 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
37 static void jingle_iceudp_class_init (JingleIceUdpClass *klass); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
38 static void jingle_iceudp_init (JingleIceUdp *iceudp); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
39 static void jingle_iceudp_finalize (GObject *object); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
40 static void jingle_iceudp_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
41 static void jingle_iceudp_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
42 static JingleTransport *jingle_iceudp_parse_internal(xmlnode *iceudp); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
43 static xmlnode *jingle_iceudp_to_xml_internal(JingleTransport *transport, xmlnode *content, JingleActionType action); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
44 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
45 static JingleTransportClass *parent_class = NULL; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
46 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
47 enum { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
48 PROP_0, |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
49 PROP_LOCAL_CANDIDATES, |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
50 PROP_REMOTE_CANDIDATES, |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
51 }; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
52 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
53 static JingleIceUdpCandidate * |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
54 jingle_iceudp_candidate_copy(JingleIceUdpCandidate *candidate) |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
55 { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
56 JingleIceUdpCandidate *new_candidate = g_new0(JingleIceUdpCandidate, 1); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
57 new_candidate->component = candidate->component; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
58 new_candidate->foundation = g_strdup(candidate->foundation); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
59 new_candidate->generation = candidate->generation; |
26097
84ea07648377
Add the id attribute to ice-udp according to the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26010
diff
changeset
|
60 new_candidate->id = g_strdup(candidate->id); |
24966
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
61 new_candidate->ip = g_strdup(candidate->ip); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
62 new_candidate->network = candidate->network; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
63 new_candidate->port = candidate->port; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
64 new_candidate->priority = candidate->priority; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
65 new_candidate->protocol = g_strdup(candidate->protocol); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
66 new_candidate->type = g_strdup(candidate->type); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
67 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
68 new_candidate->username = g_strdup(candidate->username); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
69 new_candidate->password = g_strdup(candidate->password); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
70 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
71 return new_candidate; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
72 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
73 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
74 static void |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
75 jingle_iceudp_candidate_free(JingleIceUdpCandidate *candidate) |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
76 { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
77 g_free(candidate->foundation); |
26097
84ea07648377
Add the id attribute to ice-udp according to the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26010
diff
changeset
|
78 g_free(candidate->id); |
24966
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
79 g_free(candidate->ip); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
80 g_free(candidate->protocol); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
81 g_free(candidate->type); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
82 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
83 g_free(candidate->username); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
84 g_free(candidate->password); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
85 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
86 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
87 GType |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
88 jingle_iceudp_candidate_get_type() |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
89 { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
90 static GType type = 0; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
91 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
92 if (type == 0) { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
93 type = g_boxed_type_register_static("JingleIceUdpCandidate", |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
94 (GBoxedCopyFunc)jingle_iceudp_candidate_copy, |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
95 (GBoxedFreeFunc)jingle_iceudp_candidate_free); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
96 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
97 return type; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
98 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
99 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
100 JingleIceUdpCandidate * |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
101 jingle_iceudp_candidate_new(guint component, const gchar *foundation, |
26097
84ea07648377
Add the id attribute to ice-udp according to the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26010
diff
changeset
|
102 guint generation, const gchar *id, const gchar *ip, |
84ea07648377
Add the id attribute to ice-udp according to the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26010
diff
changeset
|
103 guint network, guint port, guint priority, |
84ea07648377
Add the id attribute to ice-udp according to the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26010
diff
changeset
|
104 const gchar *protocol, const gchar *type, |
84ea07648377
Add the id attribute to ice-udp according to the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26010
diff
changeset
|
105 const gchar *username, const gchar *password) |
24966
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
106 { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
107 JingleIceUdpCandidate *candidate = g_new0(JingleIceUdpCandidate, 1); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
108 candidate->component = component; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
109 candidate->foundation = g_strdup(foundation); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
110 candidate->generation = generation; |
26097
84ea07648377
Add the id attribute to ice-udp according to the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26010
diff
changeset
|
111 candidate->id = g_strdup(id); |
24966
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
112 candidate->ip = g_strdup(ip); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
113 candidate->network = network; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
114 candidate->port = port; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
115 candidate->priority = priority; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
116 candidate->protocol = g_strdup(protocol); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
117 candidate->type = g_strdup(type); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
118 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
119 candidate->username = g_strdup(username); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
120 candidate->password = g_strdup(password); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
121 return candidate; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
122 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
123 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
124 GType |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
125 jingle_iceudp_get_type() |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
126 { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
127 static GType type = 0; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
128 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
129 if (type == 0) { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
130 static const GTypeInfo info = { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
131 sizeof(JingleIceUdpClass), |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
132 NULL, |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
133 NULL, |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
134 (GClassInitFunc) jingle_iceudp_class_init, |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
135 NULL, |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
136 NULL, |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
137 sizeof(JingleIceUdp), |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
138 0, |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
139 (GInstanceInitFunc) jingle_iceudp_init, |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
140 NULL |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
141 }; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
142 type = g_type_register_static(JINGLE_TYPE_TRANSPORT, "JingleIceUdp", &info, 0); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
143 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
144 return type; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
145 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
146 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
147 static void |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
148 jingle_iceudp_class_init (JingleIceUdpClass *klass) |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
149 { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
150 GObjectClass *gobject_class = (GObjectClass*)klass; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
151 parent_class = g_type_class_peek_parent(klass); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
152 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
153 gobject_class->finalize = jingle_iceudp_finalize; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
154 gobject_class->set_property = jingle_iceudp_set_property; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
155 gobject_class->get_property = jingle_iceudp_get_property; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
156 klass->parent_class.to_xml = jingle_iceudp_to_xml_internal; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
157 klass->parent_class.parse = jingle_iceudp_parse_internal; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
158 klass->parent_class.transport_type = JINGLE_TRANSPORT_ICEUDP; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
159 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
160 g_object_class_install_property(gobject_class, PROP_LOCAL_CANDIDATES, |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
161 g_param_spec_pointer("local-candidates", |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
162 "Local candidates", |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
163 "The local candidates for this transport.", |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
164 G_PARAM_READABLE)); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
165 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
166 g_object_class_install_property(gobject_class, PROP_REMOTE_CANDIDATES, |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
167 g_param_spec_pointer("remote-candidates", |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
168 "Remote candidates", |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
169 "The remote candidates for this transport.", |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
170 G_PARAM_READABLE)); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
171 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
172 g_type_class_add_private(klass, sizeof(JingleIceUdpPrivate)); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
173 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
174 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
175 static void |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
176 jingle_iceudp_init (JingleIceUdp *iceudp) |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
177 { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
178 iceudp->priv = JINGLE_ICEUDP_GET_PRIVATE(iceudp); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
179 memset(iceudp->priv, 0, sizeof(iceudp->priv)); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
180 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
181 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
182 static void |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
183 jingle_iceudp_finalize (GObject *iceudp) |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
184 { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
185 /* JingleIceUdpPrivate *priv = JINGLE_ICEUDP_GET_PRIVATE(iceudp); */ |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
186 purple_debug_info("jingle","jingle_iceudp_finalize\n"); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
187 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
188 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
189 static void |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
190 jingle_iceudp_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
191 { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
192 JingleIceUdp *iceudp; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
193 g_return_if_fail(JINGLE_IS_ICEUDP(object)); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
194 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
195 iceudp = JINGLE_ICEUDP(object); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
196 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
197 switch (prop_id) { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
198 case PROP_LOCAL_CANDIDATES: |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
199 iceudp->priv->local_candidates = |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
200 g_value_get_pointer(value); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
201 break; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
202 case PROP_REMOTE_CANDIDATES: |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
203 iceudp->priv->remote_candidates = |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
204 g_value_get_pointer(value); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
205 break; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
206 default: |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
207 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
208 break; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
209 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
210 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
211 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
212 static void |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
213 jingle_iceudp_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
214 { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
215 JingleIceUdp *iceudp; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
216 g_return_if_fail(JINGLE_IS_ICEUDP(object)); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
217 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
218 iceudp = JINGLE_ICEUDP(object); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
219 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
220 switch (prop_id) { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
221 case PROP_LOCAL_CANDIDATES: |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
222 g_value_set_pointer(value, iceudp->priv->local_candidates); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
223 break; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
224 case PROP_REMOTE_CANDIDATES: |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
225 g_value_set_pointer(value, iceudp->priv->remote_candidates); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
226 break; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
227 default: |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
228 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
229 break; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
230 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
231 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
232 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
233 void |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
234 jingle_iceudp_add_local_candidate(JingleIceUdp *iceudp, JingleIceUdpCandidate *candidate) |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
235 { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
236 GList *iter = iceudp->priv->local_candidates; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
237 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
238 for (; iter; iter = g_list_next(iter)) { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
239 JingleIceUdpCandidate *c = iter->data; |
26097
84ea07648377
Add the id attribute to ice-udp according to the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26010
diff
changeset
|
240 if (!strcmp(c->id, candidate->id)) { |
24966
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
241 guint generation = c->generation + 1; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
242 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
243 g_boxed_free(JINGLE_TYPE_ICEUDP_CANDIDATE, c); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
244 iceudp->priv->local_candidates = g_list_delete_link( |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
245 iceudp->priv->local_candidates, iter); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
246 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
247 candidate->generation = generation; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
248 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
249 iceudp->priv->local_candidates = g_list_append( |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
250 iceudp->priv->local_candidates, candidate); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
251 return; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
252 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
253 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
254 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
255 iceudp->priv->local_candidates = g_list_append( |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
256 iceudp->priv->local_candidates, candidate); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
257 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
258 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
259 GList * |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
260 jingle_iceudp_get_remote_candidates(JingleIceUdp *iceudp) |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
261 { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
262 return g_list_copy(iceudp->priv->remote_candidates); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
263 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
264 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
265 static JingleIceUdpCandidate * |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
266 jingle_iceudp_get_remote_candidate_by_id(JingleIceUdp *iceudp, |
26097
84ea07648377
Add the id attribute to ice-udp according to the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26010
diff
changeset
|
267 const gchar *id) |
24966
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
268 { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
269 GList *iter = iceudp->priv->remote_candidates; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
270 for (; iter; iter = g_list_next(iter)) { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
271 JingleIceUdpCandidate *candidate = iter->data; |
26097
84ea07648377
Add the id attribute to ice-udp according to the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26010
diff
changeset
|
272 if (!strcmp(candidate->id, id)) { |
24966
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
273 return candidate; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
274 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
275 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
276 return NULL; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
277 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
278 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
279 static void |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
280 jingle_iceudp_add_remote_candidate(JingleIceUdp *iceudp, JingleIceUdpCandidate *candidate) |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
281 { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
282 JingleIceUdpPrivate *priv = JINGLE_ICEUDP_GET_PRIVATE(iceudp); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
283 JingleIceUdpCandidate *iceudp_candidate = |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
284 jingle_iceudp_get_remote_candidate_by_id(iceudp, |
26097
84ea07648377
Add the id attribute to ice-udp according to the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26010
diff
changeset
|
285 candidate->id); |
24966
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
286 if (iceudp_candidate != NULL) { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
287 priv->remote_candidates = g_list_remove( |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
288 priv->remote_candidates, iceudp_candidate); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
289 g_boxed_free(JINGLE_TYPE_ICEUDP_CANDIDATE, iceudp_candidate); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
290 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
291 priv->remote_candidates = g_list_append(priv->remote_candidates, candidate); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
292 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
293 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
294 static JingleTransport * |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
295 jingle_iceudp_parse_internal(xmlnode *iceudp) |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
296 { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
297 JingleTransport *transport = parent_class->parse(iceudp); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
298 xmlnode *candidate = xmlnode_get_child(iceudp, "candidate"); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
299 JingleIceUdpCandidate *iceudp_candidate = NULL; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
300 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
301 const gchar *username = xmlnode_get_attrib(iceudp, "ufrag"); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
302 const gchar *password = xmlnode_get_attrib(iceudp, "pwd"); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
303 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
304 for (; candidate; candidate = xmlnode_get_next_twin(candidate)) { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
305 iceudp_candidate = jingle_iceudp_candidate_new( |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
306 atoi(xmlnode_get_attrib(candidate, "component")), |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
307 xmlnode_get_attrib(candidate, "foundation"), |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
308 atoi(xmlnode_get_attrib(candidate, "generation")), |
26097
84ea07648377
Add the id attribute to ice-udp according to the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26010
diff
changeset
|
309 xmlnode_get_attrib(candidate, "id"), |
24966
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
310 xmlnode_get_attrib(candidate, "ip"), |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
311 atoi(xmlnode_get_attrib(candidate, "network")), |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
312 atoi(xmlnode_get_attrib(candidate, "port")), |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
313 atoi(xmlnode_get_attrib(candidate, "priority")), |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
314 xmlnode_get_attrib(candidate, "protocol"), |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
315 xmlnode_get_attrib(candidate, "type"), |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
316 username, password); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
317 jingle_iceudp_add_remote_candidate(JINGLE_ICEUDP(transport), iceudp_candidate); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
318 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
319 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
320 return transport; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
321 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
322 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
323 static xmlnode * |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
324 jingle_iceudp_to_xml_internal(JingleTransport *transport, xmlnode *content, JingleActionType action) |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
325 { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
326 xmlnode *node = parent_class->to_xml(transport, content, action); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
327 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
328 if (action == JINGLE_SESSION_INITIATE || action == JINGLE_TRANSPORT_INFO || |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
329 action == JINGLE_CONTENT_ADD || action == JINGLE_TRANSPORT_REPLACE) { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
330 JingleIceUdpCandidate *candidate = JINGLE_ICEUDP_GET_PRIVATE( |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
331 transport)->local_candidates->data; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
332 xmlnode_set_attrib(node, "pwd", candidate->password); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
333 xmlnode_set_attrib(node, "ufrag", candidate->username); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
334 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
335 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
336 if (action == JINGLE_TRANSPORT_INFO || action == JINGLE_SESSION_ACCEPT) { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
337 JingleIceUdpPrivate *priv = JINGLE_ICEUDP_GET_PRIVATE(transport); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
338 GList *iter = priv->local_candidates; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
339 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
340 for (; iter; iter = g_list_next(iter)) { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
341 JingleIceUdpCandidate *candidate = iter->data; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
342 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
343 xmlnode *xmltransport = xmlnode_new_child(node, "candidate"); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
344 gchar *component = g_strdup_printf("%d", candidate->component); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
345 gchar *generation = g_strdup_printf("%d", candidate->generation); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
346 gchar *network = g_strdup_printf("%d", candidate->network); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
347 gchar *port = g_strdup_printf("%d", candidate->port); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
348 gchar *priority = g_strdup_printf("%d", candidate->priority); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
349 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
350 xmlnode_set_attrib(xmltransport, "component", component); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
351 xmlnode_set_attrib(xmltransport, "foundation", candidate->foundation); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
352 xmlnode_set_attrib(xmltransport, "generation", generation); |
26097
84ea07648377
Add the id attribute to ice-udp according to the XEP.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
26010
diff
changeset
|
353 xmlnode_set_attrib(xmltransport, "id", candidate->id); |
24966
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
354 xmlnode_set_attrib(xmltransport, "ip", candidate->ip); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
355 xmlnode_set_attrib(xmltransport, "network", network); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
356 xmlnode_set_attrib(xmltransport, "port", port); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
357 xmlnode_set_attrib(xmltransport, "priority", priority); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
358 xmlnode_set_attrib(xmltransport, "protocol", candidate->protocol); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
359 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
360 if (action == JINGLE_SESSION_ACCEPT) { |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
361 /* XXX: fix this, it's dummy data */ |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
362 xmlnode_set_attrib(xmltransport, "rel-addr", "10.0.1.1"); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
363 xmlnode_set_attrib(xmltransport, "rel-port", "8998"); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
364 xmlnode_set_attrib(xmltransport, "rem-addr", "192.0.2.1"); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
365 xmlnode_set_attrib(xmltransport, "rem-port", "3478"); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
366 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
367 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
368 xmlnode_set_attrib(xmltransport, "type", candidate->type); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
369 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
370 g_free(component); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
371 g_free(generation); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
372 g_free(network); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
373 g_free(port); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
374 g_free(priority); |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
375 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
376 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
377 |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
378 return node; |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
379 } |
bee5ab815291
Added a Jingle ice-udp transmitter.
Mike Ruprecht <maiku@soc.pidgin.im>
parents:
diff
changeset
|
380 |