Imported Upstream version 0.1.16
[platform/upstream/libnice.git] / docs / reference / libnice / html / NiceAgent.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>NiceAgent: libnice Reference Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
7 <link rel="home" href="index.html" title="libnice Reference Manual">
8 <link rel="up" href="ch01.html" title="">
9 <link rel="prev" href="ch01.html" title="">
10 <link rel="next" href="libnice-NiceAddress.html" title="NiceAddress">
11 <meta name="generator" content="GTK-Doc V1.29 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
18                   <a href="#NiceAgent.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
19                   <a href="#NiceAgent.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties">  <span class="dim">|</span> 
20                   <a href="#NiceAgent.properties" class="shortcut">Properties</a></span><span id="nav_signals">  <span class="dim">|</span> 
21                   <a href="#NiceAgent.signals" class="shortcut">Signals</a></span>
22 </td>
23 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
24 <td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
25 <td><a accesskey="p" href="ch01.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
26 <td><a accesskey="n" href="libnice-NiceAddress.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
27 </tr></table>
28 <div class="refentry">
29 <a name="NiceAgent"></a><div class="titlepage"></div>
30 <div class="refnamediv"><table width="100%"><tr>
31 <td valign="top">
32 <h2><span class="refentrytitle"><a name="NiceAgent.top_of_page"></a>NiceAgent</span></h2>
33 <p>NiceAgent — ICE agent API implementation</p>
34 </td>
35 <td class="gallery_image" valign="top" align="right"></td>
36 </tr></table></div>
37 <div class="refsect1">
38 <a name="NiceAgent.stability-level"></a><h2>Stability Level</h2>
39 <acronym title="The intention of a Stable interface is to enable arbitrary third parties to
40 develop applications to these interfaces, release them, and have confidence that
41 they will run on all minor releases of the product (after the one in which the
42 interface was introduced, and within the same major release). Even at a major
43 release, incompatible changes are expected to be rare, and to have strong
44 justifications.
45 "><span class="acronym">Stable</span></acronym>, unless otherwise indicated
46 </div>
47 <div class="refsect1">
48 <a name="NiceAgent.functions"></a><h2>Functions</h2>
49 <div class="informaltable"><table class="informaltable" width="100%" border="0">
50 <colgroup>
51 <col width="150px" class="functions_return">
52 <col class="functions_name">
53 </colgroup>
54 <tbody>
55 <tr>
56 <td class="function_type">
57 <span class="returnvalue">void</span>
58 </td>
59 <td class="function_name">
60 <span class="c_punctuation">(</span><a class="link" href="NiceAgent.html#NiceAgentRecvFunc" title="NiceAgentRecvFunc ()">*NiceAgentRecvFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
61 </td>
62 </tr>
63 <tr>
64 <td class="function_type">
65 <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *
66 </td>
67 <td class="function_name">
68 <a class="link" href="NiceAgent.html#nice-agent-new" title="nice_agent_new ()">nice_agent_new</a> <span class="c_punctuation">()</span>
69 </td>
70 </tr>
71 <tr>
72 <td class="function_type">
73 <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *
74 </td>
75 <td class="function_name">
76 <a class="link" href="NiceAgent.html#nice-agent-new-reliable" title="nice_agent_new_reliable ()">nice_agent_new_reliable</a> <span class="c_punctuation">()</span>
77 </td>
78 </tr>
79 <tr>
80 <td class="function_type">
81 <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *
82 </td>
83 <td class="function_name">
84 <a class="link" href="NiceAgent.html#nice-agent-new-full" title="nice_agent_new_full ()">nice_agent_new_full</a> <span class="c_punctuation">()</span>
85 </td>
86 </tr>
87 <tr>
88 <td class="function_type">
89 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
90 </td>
91 <td class="function_name">
92 <a class="link" href="NiceAgent.html#nice-agent-add-local-address" title="nice_agent_add_local_address ()">nice_agent_add_local_address</a> <span class="c_punctuation">()</span>
93 </td>
94 </tr>
95 <tr>
96 <td class="function_type">
97 <span class="returnvalue">void</span>
98 </td>
99 <td class="function_name">
100 <a class="link" href="NiceAgent.html#nice-agent-set-port-range" title="nice_agent_set_port_range ()">nice_agent_set_port_range</a> <span class="c_punctuation">()</span>
101 </td>
102 </tr>
103 <tr>
104 <td class="function_type">
105 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
106 </td>
107 <td class="function_name">
108 <a class="link" href="NiceAgent.html#nice-agent-add-stream" title="nice_agent_add_stream ()">nice_agent_add_stream</a> <span class="c_punctuation">()</span>
109 </td>
110 </tr>
111 <tr>
112 <td class="function_type">
113 <span class="returnvalue">void</span>
114 </td>
115 <td class="function_name">
116 <a class="link" href="NiceAgent.html#nice-agent-remove-stream" title="nice_agent_remove_stream ()">nice_agent_remove_stream</a> <span class="c_punctuation">()</span>
117 </td>
118 </tr>
119 <tr>
120 <td class="function_type">
121 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
122 </td>
123 <td class="function_name">
124 <a class="link" href="NiceAgent.html#nice-agent-set-relay-info" title="nice_agent_set_relay_info ()">nice_agent_set_relay_info</a> <span class="c_punctuation">()</span>
125 </td>
126 </tr>
127 <tr>
128 <td class="function_type">
129 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
130 </td>
131 <td class="function_name">
132 <a class="link" href="NiceAgent.html#nice-agent-forget-relays" title="nice_agent_forget_relays ()">nice_agent_forget_relays</a> <span class="c_punctuation">()</span>
133 </td>
134 </tr>
135 <tr>
136 <td class="function_type">
137 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
138 </td>
139 <td class="function_name">
140 <a class="link" href="NiceAgent.html#nice-agent-gather-candidates" title="nice_agent_gather_candidates ()">nice_agent_gather_candidates</a> <span class="c_punctuation">()</span>
141 </td>
142 </tr>
143 <tr>
144 <td class="function_type">
145 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
146 </td>
147 <td class="function_name">
148 <a class="link" href="NiceAgent.html#nice-agent-set-remote-credentials" title="nice_agent_set_remote_credentials ()">nice_agent_set_remote_credentials</a> <span class="c_punctuation">()</span>
149 </td>
150 </tr>
151 <tr>
152 <td class="function_type">
153 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
154 </td>
155 <td class="function_name">
156 <a class="link" href="NiceAgent.html#nice-agent-get-local-credentials" title="nice_agent_get_local_credentials ()">nice_agent_get_local_credentials</a> <span class="c_punctuation">()</span>
157 </td>
158 </tr>
159 <tr>
160 <td class="function_type">
161 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
162 </td>
163 <td class="function_name">
164 <a class="link" href="NiceAgent.html#nice-agent-set-local-credentials" title="nice_agent_set_local_credentials ()">nice_agent_set_local_credentials</a> <span class="c_punctuation">()</span>
165 </td>
166 </tr>
167 <tr>
168 <td class="function_type">
169 <span class="returnvalue">int</span>
170 </td>
171 <td class="function_name">
172 <a class="link" href="NiceAgent.html#nice-agent-set-remote-candidates" title="nice_agent_set_remote_candidates ()">nice_agent_set_remote_candidates</a> <span class="c_punctuation">()</span>
173 </td>
174 </tr>
175 <tr>
176 <td class="function_type">
177 <a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> *
178 </td>
179 <td class="function_name">
180 <a class="link" href="NiceAgent.html#nice-agent-get-remote-candidates" title="nice_agent_get_remote_candidates ()">nice_agent_get_remote_candidates</a> <span class="c_punctuation">()</span>
181 </td>
182 </tr>
183 <tr>
184 <td class="function_type">
185 <a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> *
186 </td>
187 <td class="function_name">
188 <a class="link" href="NiceAgent.html#nice-agent-get-local-candidates" title="nice_agent_get_local_candidates ()">nice_agent_get_local_candidates</a> <span class="c_punctuation">()</span>
189 </td>
190 </tr>
191 <tr>
192 <td class="function_type">
193 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
194 </td>
195 <td class="function_name">
196 <a class="link" href="NiceAgent.html#nice-agent-get-selected-pair" title="nice_agent_get_selected_pair ()">nice_agent_get_selected_pair</a> <span class="c_punctuation">()</span>
197 </td>
198 </tr>
199 <tr>
200 <td class="function_type">
201 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
202 </td>
203 <td class="function_name">
204 <a class="link" href="NiceAgent.html#nice-agent-peer-candidate-gathering-done" title="nice_agent_peer_candidate_gathering_done ()">nice_agent_peer_candidate_gathering_done</a> <span class="c_punctuation">()</span>
205 </td>
206 </tr>
207 <tr>
208 <td class="function_type">
209 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
210 </td>
211 <td class="function_name">
212 <a class="link" href="NiceAgent.html#nice-agent-send" title="nice_agent_send ()">nice_agent_send</a> <span class="c_punctuation">()</span>
213 </td>
214 </tr>
215 <tr>
216 <td class="function_type">
217 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
218 </td>
219 <td class="function_name">
220 <a class="link" href="NiceAgent.html#nice-agent-send-messages-nonblocking" title="nice_agent_send_messages_nonblocking ()">nice_agent_send_messages_nonblocking</a> <span class="c_punctuation">()</span>
221 </td>
222 </tr>
223 <tr>
224 <td class="function_type">
225 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
226 </td>
227 <td class="function_name">
228 <a class="link" href="NiceAgent.html#nice-agent-recv" title="nice_agent_recv ()">nice_agent_recv</a> <span class="c_punctuation">()</span>
229 </td>
230 </tr>
231 <tr>
232 <td class="function_type">
233 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
234 </td>
235 <td class="function_name">
236 <a class="link" href="NiceAgent.html#nice-agent-recv-messages" title="nice_agent_recv_messages ()">nice_agent_recv_messages</a> <span class="c_punctuation">()</span>
237 </td>
238 </tr>
239 <tr>
240 <td class="function_type">
241 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
242 </td>
243 <td class="function_name">
244 <a class="link" href="NiceAgent.html#nice-agent-recv-nonblocking" title="nice_agent_recv_nonblocking ()">nice_agent_recv_nonblocking</a> <span class="c_punctuation">()</span>
245 </td>
246 </tr>
247 <tr>
248 <td class="function_type">
249 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
250 </td>
251 <td class="function_name">
252 <a class="link" href="NiceAgent.html#nice-agent-recv-messages-nonblocking" title="nice_agent_recv_messages_nonblocking ()">nice_agent_recv_messages_nonblocking</a> <span class="c_punctuation">()</span>
253 </td>
254 </tr>
255 <tr>
256 <td class="function_type">
257 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
258 </td>
259 <td class="function_name">
260 <a class="link" href="NiceAgent.html#nice-agent-attach-recv" title="nice_agent_attach_recv ()">nice_agent_attach_recv</a> <span class="c_punctuation">()</span>
261 </td>
262 </tr>
263 <tr>
264 <td class="function_type">
265 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
266 </td>
267 <td class="function_name">
268 <a class="link" href="NiceAgent.html#nice-agent-set-selected-pair" title="nice_agent_set_selected_pair ()">nice_agent_set_selected_pair</a> <span class="c_punctuation">()</span>
269 </td>
270 </tr>
271 <tr>
272 <td class="function_type">
273 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
274 </td>
275 <td class="function_name">
276 <a class="link" href="NiceAgent.html#nice-agent-set-selected-remote-candidate" title="nice_agent_set_selected_remote_candidate ()">nice_agent_set_selected_remote_candidate</a> <span class="c_punctuation">()</span>
277 </td>
278 </tr>
279 <tr>
280 <td class="function_type">
281 <span class="returnvalue">void</span>
282 </td>
283 <td class="function_name">
284 <a class="link" href="NiceAgent.html#nice-agent-set-stream-tos" title="nice_agent_set_stream_tos ()">nice_agent_set_stream_tos</a> <span class="c_punctuation">()</span>
285 </td>
286 </tr>
287 <tr>
288 <td class="function_type">
289 <span class="returnvalue">void</span>
290 </td>
291 <td class="function_name">
292 <a class="link" href="NiceAgent.html#nice-agent-set-software" title="nice_agent_set_software ()">nice_agent_set_software</a> <span class="c_punctuation">()</span>
293 </td>
294 </tr>
295 <tr>
296 <td class="function_type">
297 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
298 </td>
299 <td class="function_name">
300 <a class="link" href="NiceAgent.html#nice-agent-restart" title="nice_agent_restart ()">nice_agent_restart</a> <span class="c_punctuation">()</span>
301 </td>
302 </tr>
303 <tr>
304 <td class="function_type">
305 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
306 </td>
307 <td class="function_name">
308 <a class="link" href="NiceAgent.html#nice-agent-restart-stream" title="nice_agent_restart_stream ()">nice_agent_restart_stream</a> <span class="c_punctuation">()</span>
309 </td>
310 </tr>
311 <tr>
312 <td class="function_type">
313 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
314 </td>
315 <td class="function_name">
316 <a class="link" href="NiceAgent.html#nice-agent-set-stream-name" title="nice_agent_set_stream_name ()">nice_agent_set_stream_name</a> <span class="c_punctuation">()</span>
317 </td>
318 </tr>
319 <tr>
320 <td class="function_type">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
321 </td>
322 <td class="function_name">
323 <a class="link" href="NiceAgent.html#nice-agent-get-stream-name" title="nice_agent_get_stream_name ()">nice_agent_get_stream_name</a> <span class="c_punctuation">()</span>
324 </td>
325 </tr>
326 <tr>
327 <td class="function_type">
328 <a class="link" href="NiceCandidate.html" title="NiceCandidate"><span class="returnvalue">NiceCandidate</span></a> *
329 </td>
330 <td class="function_name">
331 <a class="link" href="NiceAgent.html#nice-agent-get-default-local-candidate" title="nice_agent_get_default_local_candidate ()">nice_agent_get_default_local_candidate</a> <span class="c_punctuation">()</span>
332 </td>
333 </tr>
334 <tr>
335 <td class="function_type">
336 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
337 </td>
338 <td class="function_name">
339 <a class="link" href="NiceAgent.html#nice-agent-generate-local-sdp" title="nice_agent_generate_local_sdp ()">nice_agent_generate_local_sdp</a> <span class="c_punctuation">()</span>
340 </td>
341 </tr>
342 <tr>
343 <td class="function_type">
344 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
345 </td>
346 <td class="function_name">
347 <a class="link" href="NiceAgent.html#nice-agent-generate-local-stream-sdp" title="nice_agent_generate_local_stream_sdp ()">nice_agent_generate_local_stream_sdp</a> <span class="c_punctuation">()</span>
348 </td>
349 </tr>
350 <tr>
351 <td class="function_type">
352 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
353 </td>
354 <td class="function_name">
355 <a class="link" href="NiceAgent.html#nice-agent-generate-local-candidate-sdp" title="nice_agent_generate_local_candidate_sdp ()">nice_agent_generate_local_candidate_sdp</a> <span class="c_punctuation">()</span>
356 </td>
357 </tr>
358 <tr>
359 <td class="function_type">
360 <span class="returnvalue">int</span>
361 </td>
362 <td class="function_name">
363 <a class="link" href="NiceAgent.html#nice-agent-parse-remote-sdp" title="nice_agent_parse_remote_sdp ()">nice_agent_parse_remote_sdp</a> <span class="c_punctuation">()</span>
364 </td>
365 </tr>
366 <tr>
367 <td class="function_type">
368 <a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> *
369 </td>
370 <td class="function_name">
371 <a class="link" href="NiceAgent.html#nice-agent-parse-remote-stream-sdp" title="nice_agent_parse_remote_stream_sdp ()">nice_agent_parse_remote_stream_sdp</a> <span class="c_punctuation">()</span>
372 </td>
373 </tr>
374 <tr>
375 <td class="function_type">
376 <a class="link" href="NiceCandidate.html" title="NiceCandidate"><span class="returnvalue">NiceCandidate</span></a> *
377 </td>
378 <td class="function_name">
379 <a class="link" href="NiceAgent.html#nice-agent-parse-remote-candidate-sdp" title="nice_agent_parse_remote_candidate_sdp ()">nice_agent_parse_remote_candidate_sdp</a> <span class="c_punctuation">()</span>
380 </td>
381 </tr>
382 <tr>
383 <td class="function_type">
384 <a href="/usr/share/gtk-doc/html/gio/GIOStream.html#GIOStream-struct"><span class="returnvalue">GIOStream</span></a> *
385 </td>
386 <td class="function_name">
387 <a class="link" href="NiceAgent.html#nice-agent-get-io-stream" title="nice_agent_get_io_stream ()">nice_agent_get_io_stream</a> <span class="c_punctuation">()</span>
388 </td>
389 </tr>
390 <tr>
391 <td class="function_type">
392 <a href="/usr/share/gtk-doc/html/gio/GSocket.html#GSocket-struct"><span class="returnvalue">GSocket</span></a> *
393 </td>
394 <td class="function_name">
395 <a class="link" href="NiceAgent.html#nice-agent-get-selected-socket" title="nice_agent_get_selected_socket ()">nice_agent_get_selected_socket</a> <span class="c_punctuation">()</span>
396 </td>
397 </tr>
398 <tr>
399 <td class="function_type">
400 <a class="link" href="NiceAgent.html#NiceComponentState" title="enum NiceComponentState"><span class="returnvalue">NiceComponentState</span></a>
401 </td>
402 <td class="function_name">
403 <a class="link" href="NiceAgent.html#nice-agent-get-component-state" title="nice_agent_get_component_state ()">nice_agent_get_component_state</a> <span class="c_punctuation">()</span>
404 </td>
405 </tr>
406 <tr>
407 <td class="function_type">
408 <span class="returnvalue">void</span>
409 </td>
410 <td class="function_name">
411 <a class="link" href="NiceAgent.html#nice-agent-close-async" title="nice_agent_close_async ()">nice_agent_close_async</a> <span class="c_punctuation">()</span>
412 </td>
413 </tr>
414 <tr>
415 <td class="function_type">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
416 </td>
417 <td class="function_name">
418 <a class="link" href="NiceAgent.html#nice-component-state-to-string" title="nice_component_state_to_string ()">nice_component_state_to_string</a> <span class="c_punctuation">()</span>
419 </td>
420 </tr>
421 </tbody>
422 </table></div>
423 </div>
424 <div class="refsect1">
425 <a name="NiceAgent.properties"></a><h2>Properties</h2>
426 <div class="informaltable"><table class="informaltable" border="0">
427 <colgroup>
428 <col width="150px" class="properties_type">
429 <col width="300px" class="properties_name">
430 <col width="200px" class="properties_flags">
431 </colgroup>
432 <tbody>
433 <tr>
434 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
435 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--bytestream-tcp" title="The “bytestream-tcp” property">bytestream-tcp</a></td>
436 <td class="property_flags">Read</td>
437 </tr>
438 <tr>
439 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
440 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--compatibility" title="The “compatibility” property">compatibility</a></td>
441 <td class="property_flags">Read / Write / Construct Only</td>
442 </tr>
443 <tr>
444 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
445 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--controlling-mode" title="The “controlling-mode” property">controlling-mode</a></td>
446 <td class="property_flags">Read / Write</td>
447 </tr>
448 <tr>
449 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
450 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--force-relay" title="The “force-relay” property">force-relay</a></td>
451 <td class="property_flags">Read / Write</td>
452 </tr>
453 <tr>
454 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
455 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--full-mode" title="The “full-mode” property">full-mode</a></td>
456 <td class="property_flags">Read / Write / Construct Only</td>
457 </tr>
458 <tr>
459 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
460 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--ice-tcp" title="The “ice-tcp” property">ice-tcp</a></td>
461 <td class="property_flags">Read / Write</td>
462 </tr>
463 <tr>
464 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
465 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--ice-trickle" title="The “ice-trickle” property">ice-trickle</a></td>
466 <td class="property_flags">Read / Write</td>
467 </tr>
468 <tr>
469 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
470 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--ice-udp" title="The “ice-udp” property">ice-udp</a></td>
471 <td class="property_flags">Read / Write</td>
472 </tr>
473 <tr>
474 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
475 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--keepalive-conncheck" title="The “keepalive-conncheck” property">keepalive-conncheck</a></td>
476 <td class="property_flags">Read / Write</td>
477 </tr>
478 <tr>
479 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a></td>
480 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--main-context" title="The “main-context” property">main-context</a></td>
481 <td class="property_flags">Read / Write / Construct Only</td>
482 </tr>
483 <tr>
484 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
485 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--max-connectivity-checks" title="The “max-connectivity-checks” property">max-connectivity-checks</a></td>
486 <td class="property_flags">Read / Write</td>
487 </tr>
488 <tr>
489 <td class="property_type"><a class="link" href="NiceAgent.html#NiceNominationMode" title="enum NiceNominationMode"><span class="type">NiceNominationMode</span></a></td>
490 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--nomination-mode" title="The “nomination-mode” property">nomination-mode</a></td>
491 <td class="property_flags">Read / Write / Construct Only</td>
492 </tr>
493 <tr>
494 <td class="property_type">
495 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
496 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--proxy-ip" title="The “proxy-ip” property">proxy-ip</a></td>
497 <td class="property_flags">Read / Write</td>
498 </tr>
499 <tr>
500 <td class="property_type">
501 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
502 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--proxy-password" title="The “proxy-password” property">proxy-password</a></td>
503 <td class="property_flags">Read / Write</td>
504 </tr>
505 <tr>
506 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
507 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--proxy-port" title="The “proxy-port” property">proxy-port</a></td>
508 <td class="property_flags">Read / Write</td>
509 </tr>
510 <tr>
511 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
512 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--proxy-type" title="The “proxy-type” property">proxy-type</a></td>
513 <td class="property_flags">Read / Write</td>
514 </tr>
515 <tr>
516 <td class="property_type">
517 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
518 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--proxy-username" title="The “proxy-username” property">proxy-username</a></td>
519 <td class="property_flags">Read / Write</td>
520 </tr>
521 <tr>
522 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
523 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--reliable" title="The “reliable” property">reliable</a></td>
524 <td class="property_flags">Read / Write / Construct Only</td>
525 </tr>
526 <tr>
527 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
528 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--stun-initial-timeout" title="The “stun-initial-timeout” property">stun-initial-timeout</a></td>
529 <td class="property_flags">Read / Write / Construct</td>
530 </tr>
531 <tr>
532 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
533 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--stun-max-retransmissions" title="The “stun-max-retransmissions” property">stun-max-retransmissions</a></td>
534 <td class="property_flags">Read / Write / Construct</td>
535 </tr>
536 <tr>
537 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
538 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--stun-pacing-timer" title="The “stun-pacing-timer” property">stun-pacing-timer</a></td>
539 <td class="property_flags">Read / Write / Construct</td>
540 </tr>
541 <tr>
542 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
543 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--stun-reliable-timeout" title="The “stun-reliable-timeout” property">stun-reliable-timeout</a></td>
544 <td class="property_flags">Read / Write / Construct</td>
545 </tr>
546 <tr>
547 <td class="property_type">
548 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</td>
549 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--stun-server" title="The “stun-server” property">stun-server</a></td>
550 <td class="property_flags">Read / Write</td>
551 </tr>
552 <tr>
553 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
554 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--stun-server-port" title="The “stun-server-port” property">stun-server-port</a></td>
555 <td class="property_flags">Read / Write</td>
556 </tr>
557 <tr>
558 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
559 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--support-renomination" title="The “support-renomination” property">support-renomination</a></td>
560 <td class="property_flags">Read / Write</td>
561 </tr>
562 <tr>
563 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></td>
564 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--upnp" title="The “upnp” property">upnp</a></td>
565 <td class="property_flags">Read / Write / Construct</td>
566 </tr>
567 <tr>
568 <td class="property_type"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></td>
569 <td class="property_name"><a class="link" href="NiceAgent.html#NiceAgent--upnp-timeout" title="The “upnp-timeout” property">upnp-timeout</a></td>
570 <td class="property_flags">Read / Write / Construct</td>
571 </tr>
572 </tbody>
573 </table></div>
574 </div>
575 <div class="refsect1">
576 <a name="NiceAgent.signals"></a><h2>Signals</h2>
577 <div class="informaltable"><table class="informaltable" border="0">
578 <colgroup>
579 <col width="150px" class="signals_return">
580 <col width="300px" class="signals_name">
581 <col width="200px" class="signals_flags">
582 </colgroup>
583 <tbody>
584 <tr>
585 <td class="signal_type"><span class="returnvalue">void</span></td>
586 <td class="signal_name"><a class="link" href="NiceAgent.html#NiceAgent-candidate-gathering-done" title="The “candidate-gathering-done” signal">candidate-gathering-done</a></td>
587 <td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
588 </tr>
589 <tr>
590 <td class="signal_type"><span class="returnvalue">void</span></td>
591 <td class="signal_name"><a class="link" href="NiceAgent.html#NiceAgent-component-state-changed" title="The “component-state-changed” signal">component-state-changed</a></td>
592 <td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
593 </tr>
594 <tr>
595 <td class="signal_type"><span class="returnvalue">void</span></td>
596 <td class="signal_name"><a class="link" href="NiceAgent.html#NiceAgent-initial-binding-request-received" title="The “initial-binding-request-received” signal">initial-binding-request-received</a></td>
597 <td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
598 </tr>
599 <tr>
600 <td class="signal_type"><span class="returnvalue">void</span></td>
601 <td class="signal_name"><a class="link" href="NiceAgent.html#NiceAgent-new-candidate" title="The “new-candidate” signal">new-candidate</a></td>
602 <td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
603 </tr>
604 <tr>
605 <td class="signal_type"><span class="returnvalue">void</span></td>
606 <td class="signal_name"><a class="link" href="NiceAgent.html#NiceAgent-new-candidate-full" title="The “new-candidate-full” signal">new-candidate-full</a></td>
607 <td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
608 </tr>
609 <tr>
610 <td class="signal_type"><span class="returnvalue">void</span></td>
611 <td class="signal_name"><a class="link" href="NiceAgent.html#NiceAgent-new-remote-candidate" title="The “new-remote-candidate” signal">new-remote-candidate</a></td>
612 <td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
613 </tr>
614 <tr>
615 <td class="signal_type"><span class="returnvalue">void</span></td>
616 <td class="signal_name"><a class="link" href="NiceAgent.html#NiceAgent-new-remote-candidate-full" title="The “new-remote-candidate-full” signal">new-remote-candidate-full</a></td>
617 <td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
618 </tr>
619 <tr>
620 <td class="signal_type"><span class="returnvalue">void</span></td>
621 <td class="signal_name"><a class="link" href="NiceAgent.html#NiceAgent-new-selected-pair" title="The “new-selected-pair” signal">new-selected-pair</a></td>
622 <td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
623 </tr>
624 <tr>
625 <td class="signal_type"><span class="returnvalue">void</span></td>
626 <td class="signal_name"><a class="link" href="NiceAgent.html#NiceAgent-new-selected-pair-full" title="The “new-selected-pair-full” signal">new-selected-pair-full</a></td>
627 <td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
628 </tr>
629 <tr>
630 <td class="signal_type"><span class="returnvalue">void</span></td>
631 <td class="signal_name"><a class="link" href="NiceAgent.html#NiceAgent-reliable-transport-writable" title="The “reliable-transport-writable” signal">reliable-transport-writable</a></td>
632 <td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
633 </tr>
634 <tr>
635 <td class="signal_type"><span class="returnvalue">void</span></td>
636 <td class="signal_name"><a class="link" href="NiceAgent.html#NiceAgent-streams-removed" title="The “streams-removed” signal">streams-removed</a></td>
637 <td class="signal_flags"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></td>
638 </tr>
639 </tbody>
640 </table></div>
641 </div>
642 <div class="refsect1">
643 <a name="NiceAgent.other"></a><h2>Types and Values</h2>
644 <div class="informaltable"><table class="informaltable" width="100%" border="0">
645 <colgroup>
646 <col width="150px" class="name">
647 <col class="description">
648 </colgroup>
649 <tbody>
650 <tr>
651 <td class="datatype_keyword"> </td>
652 <td class="function_name"><a class="link" href="NiceAgent.html#NiceAgent-struct" title="NiceAgent">NiceAgent</a></td>
653 </tr>
654 <tr>
655 <td class="datatype_keyword">enum</td>
656 <td class="function_name"><a class="link" href="NiceAgent.html#NiceComponentState" title="enum NiceComponentState">NiceComponentState</a></td>
657 </tr>
658 <tr>
659 <td class="datatype_keyword">enum</td>
660 <td class="function_name"><a class="link" href="NiceAgent.html#NiceComponentType" title="enum NiceComponentType">NiceComponentType</a></td>
661 </tr>
662 <tr>
663 <td class="datatype_keyword">enum</td>
664 <td class="function_name"><a class="link" href="NiceAgent.html#NiceProxyType" title="enum NiceProxyType">NiceProxyType</a></td>
665 </tr>
666 <tr>
667 <td class="datatype_keyword">enum</td>
668 <td class="function_name"><a class="link" href="NiceAgent.html#NiceNominationMode" title="enum NiceNominationMode">NiceNominationMode</a></td>
669 </tr>
670 <tr>
671 <td class="datatype_keyword">enum</td>
672 <td class="function_name"><a class="link" href="NiceAgent.html#NiceCompatibility" title="enum NiceCompatibility">NiceCompatibility</a></td>
673 </tr>
674 <tr>
675 <td class="datatype_keyword"> </td>
676 <td class="function_name"><a class="link" href="NiceAgent.html#NiceInputMessage" title="NiceInputMessage">NiceInputMessage</a></td>
677 </tr>
678 <tr>
679 <td class="datatype_keyword"> </td>
680 <td class="function_name"><a class="link" href="NiceAgent.html#NiceOutputMessage" title="NiceOutputMessage">NiceOutputMessage</a></td>
681 </tr>
682 <tr>
683 <td class="define_keyword">#define</td>
684 <td class="function_name"><a class="link" href="NiceAgent.html#NICE-AGENT-MAX-REMOTE-CANDIDATES:CAPS" title="NICE_AGENT_MAX_REMOTE_CANDIDATES">NICE_AGENT_MAX_REMOTE_CANDIDATES</a></td>
685 </tr>
686 <tr>
687 <td class="datatype_keyword">enum</td>
688 <td class="function_name"><a class="link" href="NiceAgent.html#NiceAgentOption" title="enum NiceAgentOption">NiceAgentOption</a></td>
689 </tr>
690 </tbody>
691 </table></div>
692 </div>
693 <div class="refsect1">
694 <a name="NiceAgent.object-hierarchy"></a><h2>Object Hierarchy</h2>
695 <pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GEnum</a>
696     <span class="lineart">├──</span> NiceCompatibility
697     <span class="lineart">├──</span> NiceComponentState
698     <span class="lineart">├──</span> NiceComponentType
699     <span class="lineart">├──</span> NiceNominationMode
700     <span class="lineart">╰──</span> NiceProxyType
701     <a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GFlags</a>
702     <span class="lineart">╰──</span> NiceAgentOption
703     <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
704     <span class="lineart">╰──</span> NiceAgent
705 </pre>
706 </div>
707 <div class="refsect1">
708 <a name="NiceAgent.includes"></a><h2>Includes</h2>
709 <pre class="synopsis">#include &lt;agent.h&gt;
710 </pre>
711 </div>
712 <div class="refsect1">
713 <a name="NiceAgent.description"></a><h2>Description</h2>
714 <p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> is your main object when using libnice.
715 It is the agent that will take care of everything relating to ICE.
716 It will take care of discovering your local candidates and do
717  connectivity checks to create a stream of data between you and your peer.</p>
718 <p>A <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> must always be used with a <a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GMainLoop"><span class="type">GMainLoop</span></a> running the <a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a>
719 passed into <a class="link" href="NiceAgent.html#nice-agent-new" title="nice_agent_new ()"><code class="function">nice_agent_new()</code></a> (or <a class="link" href="NiceAgent.html#nice-agent-new-reliable" title="nice_agent_new_reliable ()"><code class="function">nice_agent_new_reliable()</code></a>). Without the
720 <a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> being iterated, the agent’s timers will not fire, etc.</p>
721 <p>Streams and their components are referenced by integer IDs (with respect to a
722 given <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a>). These IDs are guaranteed to be positive (i.e. non-zero)
723 for valid streams/components.</p>
724 <p>To complete the ICE connectivity checks, the user must either register
725 an I/O callback (with <a class="link" href="NiceAgent.html#nice-agent-attach-recv" title="nice_agent_attach_recv ()"><code class="function">nice_agent_attach_recv()</code></a>) or call <a class="link" href="NiceAgent.html#nice-agent-recv-messages" title="nice_agent_recv_messages ()"><code class="function">nice_agent_recv_messages()</code></a>
726 in a loop on a dedicated thread.
727 Technically, <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> does not poll the streams on its own, since
728 user data could arrive at any time; to receive STUN packets
729 required for establishing ICE connectivity, it is backpiggying
730 on the facility chosen by the user. <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> will handle all STUN
731 packets internally; they're never actually passed to the I/O callback
732 or returned from <a class="link" href="NiceAgent.html#nice-agent-recv-messages" title="nice_agent_recv_messages ()"><code class="function">nice_agent_recv_messages()</code></a> and related functions.</p>
733 <p>Each stream can receive data in one of two ways: using
734 <a class="link" href="NiceAgent.html#nice-agent-attach-recv" title="nice_agent_attach_recv ()"><code class="function">nice_agent_attach_recv()</code></a> or <a class="link" href="NiceAgent.html#nice-agent-recv-messages" title="nice_agent_recv_messages ()"><code class="function">nice_agent_recv_messages()</code></a> (and the derived
735 <span class="type">NiceInputStream</span> and <span class="type">NiceIOStream</span> classes accessible using
736 <a class="link" href="NiceAgent.html#nice-agent-get-io-stream" title="nice_agent_get_io_stream ()"><code class="function">nice_agent_get_io_stream()</code></a>). <a class="link" href="NiceAgent.html#nice-agent-attach-recv" title="nice_agent_attach_recv ()"><code class="function">nice_agent_attach_recv()</code></a> is non-blocking: it
737 takes a user-provided callback function and attaches the stream’s socket to
738 the provided <a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a>, invoking the callback in that context for every
739 packet received. <a class="link" href="NiceAgent.html#nice-agent-recv-messages" title="nice_agent_recv_messages ()"><code class="function">nice_agent_recv_messages()</code></a> instead blocks on receiving a
740 packet, and writes it directly into a user-provided buffer. This reduces the
741 number of callback invokations and (potentially) buffer copies required to
742 receive packets. <a class="link" href="NiceAgent.html#nice-agent-recv-messages" title="nice_agent_recv_messages ()"><code class="function">nice_agent_recv_messages()</code></a> (or <span class="type">NiceInputStream</span>) is designed
743 to be used in a blocking loop in a separate thread.</p>
744 <div class="example">
745 <a name="id-1.2.2.1.10.7"></a><p class="title"><b>Example 1. Simple example on how to use libnice</b></p>
746 <div class="example-contents">
747   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
748     <tbody>
749       <tr>
750         <td class="listing_lines" align="right"><pre>1
751 2
752 3
753 4
754 5
755 6
756 7
757 8
758 9
759 10
760 11
761 12
762 13
763 14
764 15
765 16
766 17
767 18
768 19
769 20
770 21
771 22
772 23
773 24
774 25
775 26
776 27
777 28
778 29
779 30
780 31
781 32
782 33
783 34
784 35
785 36
786 37
787 38
788 39
789 40
790 41
791 42
792 43
793 44
794 45
795 46
796 47
797 48
798 49</pre></td>
799         <td class="listing_code"><pre class="programlisting"><span class="usertype">guint</span><span class="normal"> stream_id</span><span class="symbol">;</span>
800 <span class="usertype">gchar</span><span class="normal"> buffer</span><span class="symbol">[]</span><span class="normal"> </span><span class="symbol">=</span><span class="normal"> </span><span class="string">"hello world!"</span><span class="symbol">;</span>
801 <span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">ufrag </span><span class="symbol">=</span><span class="normal"> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">pwd </span><span class="symbol">=</span><span class="normal"> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
802 <span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">remote_ufrag</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">remote_pwd</span><span class="symbol">;</span>
803 <span class="usertype">GSList</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">lcands </span><span class="symbol">=</span><span class="normal"> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">;</span>
804
805 <span class="comment">// Create a nice agent, passing in the global default GMainContext.</span>
806 <span class="usertype">NiceAgent</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">agent </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="NiceAgent.html#nice-agent-new">nice_agent_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span><span class="normal"> <a href="NiceAgent.html#NICE-COMPATIBILITY-RFC5245:CAPS">NICE_COMPATIBILITY_RFC5245</a></span><span class="symbol">);</span>
807 <span class="function">spawn_thread_to_run_main_loop</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#g-main-loop-new">g_main_loop_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span><span class="normal"> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS">FALSE</a></span><span class="symbol">));</span>
808
809 <span class="comment">// Connect the signals</span>
810 <span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#G-OBJECT:CAPS">G_OBJECT</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">agent</span><span class="symbol">),</span><span class="normal"> </span><span class="string">"candidate-gathering-done"</span><span class="symbol">,</span>
811 <span class="normal">                  </span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cb_candidate_gathering_done</span><span class="symbol">),</span><span class="normal"> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
812 <span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#G-OBJECT:CAPS">G_OBJECT</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">agent</span><span class="symbol">),</span><span class="normal"> </span><span class="string">"component-state-changed"</span><span class="symbol">,</span>
813 <span class="normal">                  </span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cb_component_state_changed</span><span class="symbol">),</span><span class="normal"> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
814 <span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#G-OBJECT:CAPS">G_OBJECT</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">agent</span><span class="symbol">),</span><span class="normal"> </span><span class="string">"new-selected-pair"</span><span class="symbol">,</span>
815 <span class="normal">                  </span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">cb_new_selected_pair</span><span class="symbol">),</span><span class="normal"> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
816
817 <span class="comment">// Create a new stream with one component and start gathering candidates</span>
818 <span class="normal">stream_id </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="NiceAgent.html#nice-agent-add-stream">nice_agent_add_stream</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">agent</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1</span><span class="symbol">);</span>
819 <span class="function"><a href="NiceAgent.html#nice-agent-gather-candidates">nice_agent_gather_candidates</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">agent</span><span class="symbol">,</span><span class="normal"> stream_id</span><span class="symbol">);</span>
820
821 <span class="comment">// Attach I/O callback the component to ensure that:</span>
822 <span class="comment">// 1) agent gets its STUN packets (not delivered to cb_nice_recv)</span>
823 <span class="comment">// 2) you get your own data</span>
824 <span class="function"><a href="NiceAgent.html#nice-agent-attach-recv">nice_agent_attach_recv</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">agent</span><span class="symbol">,</span><span class="normal"> stream_id</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1</span><span class="symbol">,</span><span class="normal"> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">,</span>
825 <span class="normal">                       cb_nice_recv</span><span class="symbol">,</span><span class="normal"> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
826
827 <span class="comment">// ... Wait until the signal candidate-gathering-done is fired ...</span>
828 <span class="normal">lcands </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="NiceAgent.html#nice-agent-get-local-candidates">nice_agent_get_local_candidates</a></span><span class="symbol">(</span><span class="normal">agent</span><span class="symbol">,</span><span class="normal"> stream_id</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1</span><span class="symbol">);</span>
829
830 <span class="function"><a href="NiceAgent.html#nice-agent-get-local-credentials">nice_agent_get_local_credentials</a></span><span class="symbol">(</span><span class="normal">agent</span><span class="symbol">,</span><span class="normal"> stream_id</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">ufrag</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&amp;</span><span class="normal">pwd</span><span class="symbol">);</span>
831
832 <span class="comment">// ... Send local candidates and credentials to the peer</span>
833
834 <span class="comment">// Set the peer's remote credentials and remote candidates</span>
835 <span class="function"><a href="NiceAgent.html#nice-agent-set-remote-credentials">nice_agent_set_remote_credentials</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">agent</span><span class="symbol">,</span><span class="normal"> stream_id</span><span class="symbol">,</span><span class="normal"> remote_ufrag</span><span class="symbol">,</span><span class="normal"> remote_pwd</span><span class="symbol">);</span>
836 <span class="function"><a href="NiceAgent.html#nice-agent-set-remote-candidates">nice_agent_set_remote_candidates</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">agent</span><span class="symbol">,</span><span class="normal"> stream_id</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1</span><span class="symbol">,</span><span class="normal"> rcands</span><span class="symbol">);</span>
837
838 <span class="comment">// ... Wait until the signal new-selected-pair is fired ...</span>
839 <span class="comment">// Send our message!</span>
840 <span class="function"><a href="NiceAgent.html#nice-agent-send">nice_agent_send</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">agent</span><span class="symbol">,</span><span class="normal"> stream_id</span><span class="symbol">,</span><span class="normal"> </span><span class="number">1</span><span class="symbol">,</span><span class="normal"> </span><span class="keyword">sizeof</span><span class="symbol">(</span><span class="normal">buffer</span><span class="symbol">),</span><span class="normal"> buffer</span><span class="symbol">);</span>
841
842 <span class="comment">// Anything received will be received through the cb_nice_recv callback.</span>
843 <span class="comment">// You must be running a GMainLoop on the global default GMainContext in</span>
844 <span class="comment">// another thread for this to work.</span>
845
846 <span class="comment">// Destroy the object</span>
847 <span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span><span class="symbol">(</span><span class="normal">agent</span><span class="symbol">);</span></pre></td>
848       </tr>
849     </tbody>
850   </table>
851 </div>
852
853 </div>
854 <br class="example-break"><p>Refer to the examples in the examples/ subdirectory of the libnice source for
855 more complete examples.</p>
856 </div>
857 <div class="refsect1">
858 <a name="NiceAgent.functions_details"></a><h2>Functions</h2>
859 <div class="refsect2">
860 <a name="NiceAgentRecvFunc"></a><h3>NiceAgentRecvFunc ()</h3>
861 <pre class="programlisting"><span class="returnvalue">void</span>
862 <span class="c_punctuation">(</span>*NiceAgentRecvFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
863                       <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
864                       <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>,
865                       <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>,
866                       <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buf</code></em>,
867                       <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
868 <p>Callback function when data is received on a component</p>
869 <div class="refsect3">
870 <a name="NiceAgentRecvFunc.parameters"></a><h4>Parameters</h4>
871 <div class="informaltable"><table class="informaltable" width="100%" border="0">
872 <colgroup>
873 <col width="150px" class="parameters_name">
874 <col class="parameters_description">
875 <col width="200px" class="parameters_annotations">
876 </colgroup>
877 <tbody>
878 <tr>
879 <td class="parameter_name"><p>agent</p></td>
880 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
881 <td class="parameter_annotations"> </td>
882 </tr>
883 <tr>
884 <td class="parameter_name"><p>stream_id</p></td>
885 <td class="parameter_description"><p>The id of the stream</p></td>
886 <td class="parameter_annotations"> </td>
887 </tr>
888 <tr>
889 <td class="parameter_name"><p>component_id</p></td>
890 <td class="parameter_description"><p>The id of the component of the stream
891 which received the data</p></td>
892 <td class="parameter_annotations"> </td>
893 </tr>
894 <tr>
895 <td class="parameter_name"><p>len</p></td>
896 <td class="parameter_description"><p>The length of the data</p></td>
897 <td class="parameter_annotations"> </td>
898 </tr>
899 <tr>
900 <td class="parameter_name"><p>buf</p></td>
901 <td class="parameter_description"><p>The buffer containing the data received</p></td>
902 <td class="parameter_annotations"> </td>
903 </tr>
904 <tr>
905 <td class="parameter_name"><p>user_data</p></td>
906 <td class="parameter_description"><p>The user data set in <a class="link" href="NiceAgent.html#nice-agent-attach-recv" title="nice_agent_attach_recv ()"><code class="function">nice_agent_attach_recv()</code></a></p></td>
907 <td class="parameter_annotations"> </td>
908 </tr>
909 </tbody>
910 </table></div>
911 </div>
912 </div>
913 <hr>
914 <div class="refsect2">
915 <a name="nice-agent-new"></a><h3>nice_agent_new ()</h3>
916 <pre class="programlisting"><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *
917 nice_agent_new (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> *ctx</code></em>,
918                 <em class="parameter"><code><a class="link" href="NiceAgent.html#NiceCompatibility" title="enum NiceCompatibility"><span class="type">NiceCompatibility</span></a> compat</code></em>);</pre>
919 <p>Create a new <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a>.
920 The returned object must be freed with <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a></p>
921 <div class="refsect3">
922 <a name="nice-agent-new.parameters"></a><h4>Parameters</h4>
923 <div class="informaltable"><table class="informaltable" width="100%" border="0">
924 <colgroup>
925 <col width="150px" class="parameters_name">
926 <col class="parameters_description">
927 <col width="200px" class="parameters_annotations">
928 </colgroup>
929 <tbody>
930 <tr>
931 <td class="parameter_name"><p>ctx</p></td>
932 <td class="parameter_description"><p>The Glib Mainloop Context to use for timers</p></td>
933 <td class="parameter_annotations"> </td>
934 </tr>
935 <tr>
936 <td class="parameter_name"><p>compat</p></td>
937 <td class="parameter_description"><p>The compatibility mode of the agent</p></td>
938 <td class="parameter_annotations"> </td>
939 </tr>
940 </tbody>
941 </table></div>
942 </div>
943 <div class="refsect3">
944 <a name="nice-agent-new.returns"></a><h4>Returns</h4>
945 <p> The new agent GObject</p>
946 </div>
947 </div>
948 <hr>
949 <div class="refsect2">
950 <a name="nice-agent-new-reliable"></a><h3>nice_agent_new_reliable ()</h3>
951 <pre class="programlisting"><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *
952 nice_agent_new_reliable (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> *ctx</code></em>,
953                          <em class="parameter"><code><a class="link" href="NiceAgent.html#NiceCompatibility" title="enum NiceCompatibility"><span class="type">NiceCompatibility</span></a> compat</code></em>);</pre>
954 <p>Create a new <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> in reliable mode. If the connectivity is established
955 through ICE-UDP, then a <a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a> will be transparently used to
956 ensure reliability of the messages.
957 The returned object must be freed with <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a></p>
958 <p> See also: <a class="link" href="NiceAgent.html#NiceAgent-reliable-transport-writable" title="The “reliable-transport-writable” signal"><span class="type">“reliable-transport-writable”</span></a> </p>
959 <div class="refsect3">
960 <a name="nice-agent-new-reliable.parameters"></a><h4>Parameters</h4>
961 <div class="informaltable"><table class="informaltable" width="100%" border="0">
962 <colgroup>
963 <col width="150px" class="parameters_name">
964 <col class="parameters_description">
965 <col width="200px" class="parameters_annotations">
966 </colgroup>
967 <tbody>
968 <tr>
969 <td class="parameter_name"><p>ctx</p></td>
970 <td class="parameter_description"><p>The Glib Mainloop Context to use for timers</p></td>
971 <td class="parameter_annotations"> </td>
972 </tr>
973 <tr>
974 <td class="parameter_name"><p>compat</p></td>
975 <td class="parameter_description"><p>The compatibility mode of the agent</p></td>
976 <td class="parameter_annotations"> </td>
977 </tr>
978 </tbody>
979 </table></div>
980 </div>
981 <div class="refsect3">
982 <a name="nice-agent-new-reliable.returns"></a><h4>Returns</h4>
983 <p> The new agent GObject</p>
984 </div>
985 <p class="since">Since: <a class="link" href="ix08.html#api-index-0.0.11">0.0.11</a></p>
986 </div>
987 <hr>
988 <div class="refsect2">
989 <a name="nice-agent-new-full"></a><h3>nice_agent_new_full ()</h3>
990 <pre class="programlisting"><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="returnvalue">NiceAgent</span></a> *
991 nice_agent_new_full (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> *ctx</code></em>,
992                      <em class="parameter"><code><a class="link" href="NiceAgent.html#NiceCompatibility" title="enum NiceCompatibility"><span class="type">NiceCompatibility</span></a> compat</code></em>,
993                      <em class="parameter"><code><a class="link" href="NiceAgent.html#NiceAgentOption" title="enum NiceAgentOption"><span class="type">NiceAgentOption</span></a> flags</code></em>);</pre>
994 <p>Create a new <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> with parameters that must be be defined at
995 construction time.
996 The returned object must be freed with <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a></p>
997 <p> See also: <a class="link" href="NiceAgent.html#NiceNominationMode" title="enum NiceNominationMode"><span class="type">NiceNominationMode</span></a> and <a class="link" href="NiceAgent.html#NiceAgentOption" title="enum NiceAgentOption"><span class="type">NiceAgentOption</span></a></p>
998 <div class="refsect3">
999 <a name="nice-agent-new-full.parameters"></a><h4>Parameters</h4>
1000 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1001 <colgroup>
1002 <col width="150px" class="parameters_name">
1003 <col class="parameters_description">
1004 <col width="200px" class="parameters_annotations">
1005 </colgroup>
1006 <tbody>
1007 <tr>
1008 <td class="parameter_name"><p>ctx</p></td>
1009 <td class="parameter_description"><p>The Glib Mainloop Context to use for timers</p></td>
1010 <td class="parameter_annotations"> </td>
1011 </tr>
1012 <tr>
1013 <td class="parameter_name"><p>compat</p></td>
1014 <td class="parameter_description"><p>The compatibility mode of the agent</p></td>
1015 <td class="parameter_annotations"> </td>
1016 </tr>
1017 <tr>
1018 <td class="parameter_name"><p>flags</p></td>
1019 <td class="parameter_description"><p>Flags to set the properties</p></td>
1020 <td class="parameter_annotations"> </td>
1021 </tr>
1022 </tbody>
1023 </table></div>
1024 </div>
1025 <div class="refsect3">
1026 <a name="nice-agent-new-full.returns"></a><h4>Returns</h4>
1027 <p> The new agent GObject</p>
1028 </div>
1029 <p class="since">Since: <a class="link" href="ix14.html#api-index-0.1.15">0.1.15</a></p>
1030 </div>
1031 <hr>
1032 <div class="refsect2">
1033 <a name="nice-agent-add-local-address"></a><h3>nice_agent_add_local_address ()</h3>
1034 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1035 nice_agent_add_local_address (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
1036                               <em class="parameter"><code><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *addr</code></em>);</pre>
1037 <p>Add a local address from which to derive local host candidates for
1038 candidate gathering.</p>
1039 <p>
1040 Since 0.0.5, if this method is not called, libnice will automatically
1041 discover the local addresses available
1042 </p>
1043 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-gather-candidates" title="nice_agent_gather_candidates ()"><code class="function">nice_agent_gather_candidates()</code></a></p>
1044 <div class="refsect3">
1045 <a name="nice-agent-add-local-address.parameters"></a><h4>Parameters</h4>
1046 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1047 <colgroup>
1048 <col width="150px" class="parameters_name">
1049 <col class="parameters_description">
1050 <col width="200px" class="parameters_annotations">
1051 </colgroup>
1052 <tbody>
1053 <tr>
1054 <td class="parameter_name"><p>agent</p></td>
1055 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
1056 <td class="parameter_annotations"> </td>
1057 </tr>
1058 <tr>
1059 <td class="parameter_name"><p>addr</p></td>
1060 <td class="parameter_description"><p>The address to listen to
1061 If the port is 0, then a random port will be chosen by the system</p></td>
1062 <td class="parameter_annotations"> </td>
1063 </tr>
1064 </tbody>
1065 </table></div>
1066 </div>
1067 <div class="refsect3">
1068 <a name="nice-agent-add-local-address.returns"></a><h4>Returns</h4>
1069 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on fatal (memory allocation) errors</p>
1070 </div>
1071 </div>
1072 <hr>
1073 <div class="refsect2">
1074 <a name="nice-agent-set-port-range"></a><h3>nice_agent_set_port_range ()</h3>
1075 <pre class="programlisting"><span class="returnvalue">void</span>
1076 nice_agent_set_port_range (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
1077                            <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
1078                            <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>,
1079                            <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> min_port</code></em>,
1080                            <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> max_port</code></em>);</pre>
1081 <p>Sets a preferred port range for allocating host candidates.</p>
1082 <p>
1083 If a local host candidate cannot be created on that port
1084 range, then the <a class="link" href="NiceAgent.html#nice-agent-gather-candidates" title="nice_agent_gather_candidates ()"><code class="function">nice_agent_gather_candidates()</code></a> call will fail.
1085 </p>
1086 <p>
1087 This MUST be called before <a class="link" href="NiceAgent.html#nice-agent-gather-candidates" title="nice_agent_gather_candidates ()"><code class="function">nice_agent_gather_candidates()</code></a>
1088 </p>
1089 <div class="refsect3">
1090 <a name="nice-agent-set-port-range.parameters"></a><h4>Parameters</h4>
1091 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1092 <colgroup>
1093 <col width="150px" class="parameters_name">
1094 <col class="parameters_description">
1095 <col width="200px" class="parameters_annotations">
1096 </colgroup>
1097 <tbody>
1098 <tr>
1099 <td class="parameter_name"><p>agent</p></td>
1100 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
1101 <td class="parameter_annotations"> </td>
1102 </tr>
1103 <tr>
1104 <td class="parameter_name"><p>stream_id</p></td>
1105 <td class="parameter_description"><p>The ID of the stream</p></td>
1106 <td class="parameter_annotations"> </td>
1107 </tr>
1108 <tr>
1109 <td class="parameter_name"><p>component_id</p></td>
1110 <td class="parameter_description"><p>The ID of the component</p></td>
1111 <td class="parameter_annotations"> </td>
1112 </tr>
1113 <tr>
1114 <td class="parameter_name"><p>min_port</p></td>
1115 <td class="parameter_description"><p>The minimum port to use</p></td>
1116 <td class="parameter_annotations"> </td>
1117 </tr>
1118 <tr>
1119 <td class="parameter_name"><p>max_port</p></td>
1120 <td class="parameter_description"><p>The maximum port to use</p></td>
1121 <td class="parameter_annotations"> </td>
1122 </tr>
1123 </tbody>
1124 </table></div>
1125 </div>
1126 </div>
1127 <hr>
1128 <div class="refsect2">
1129 <a name="nice-agent-add-stream"></a><h3>nice_agent_add_stream ()</h3>
1130 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
1131 nice_agent_add_stream (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
1132                        <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_components</code></em>);</pre>
1133 <p>Adds a data stream to <em class="parameter"><code>agent</code></em>
1134  containing <em class="parameter"><code>n_components</code></em>
1135  components. The
1136 returned stream ID is guaranteed to be positive on success.</p>
1137 <div class="refsect3">
1138 <a name="nice-agent-add-stream.parameters"></a><h4>Parameters</h4>
1139 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1140 <colgroup>
1141 <col width="150px" class="parameters_name">
1142 <col class="parameters_description">
1143 <col width="200px" class="parameters_annotations">
1144 </colgroup>
1145 <tbody>
1146 <tr>
1147 <td class="parameter_name"><p>agent</p></td>
1148 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
1149 <td class="parameter_annotations"> </td>
1150 </tr>
1151 <tr>
1152 <td class="parameter_name"><p>n_components</p></td>
1153 <td class="parameter_description"><p>The number of components to add to the stream</p></td>
1154 <td class="parameter_annotations"> </td>
1155 </tr>
1156 </tbody>
1157 </table></div>
1158 </div>
1159 <div class="refsect3">
1160 <a name="nice-agent-add-stream.returns"></a><h4>Returns</h4>
1161 <p> The ID of the new stream, 0 on failure</p>
1162 </div>
1163 </div>
1164 <hr>
1165 <div class="refsect2">
1166 <a name="nice-agent-remove-stream"></a><h3>nice_agent_remove_stream ()</h3>
1167 <pre class="programlisting"><span class="returnvalue">void</span>
1168 nice_agent_remove_stream (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
1169                           <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>);</pre>
1170 <p>Remove and free a previously created data stream from <em class="parameter"><code>agent</code></em>
1171 . If any I/O
1172 streams have been created using <a class="link" href="NiceAgent.html#nice-agent-get-io-stream" title="nice_agent_get_io_stream ()"><code class="function">nice_agent_get_io_stream()</code></a>, they should be
1173 closed completely using <a href="/usr/share/gtk-doc/html/gio/GIOStream.html#g-io-stream-close"><code class="function">g_io_stream_close()</code></a> before this is called, or they
1174 will get broken pipe errors.</p>
1175 <div class="refsect3">
1176 <a name="nice-agent-remove-stream.parameters"></a><h4>Parameters</h4>
1177 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1178 <colgroup>
1179 <col width="150px" class="parameters_name">
1180 <col class="parameters_description">
1181 <col width="200px" class="parameters_annotations">
1182 </colgroup>
1183 <tbody>
1184 <tr>
1185 <td class="parameter_name"><p>agent</p></td>
1186 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
1187 <td class="parameter_annotations"> </td>
1188 </tr>
1189 <tr>
1190 <td class="parameter_name"><p>stream_id</p></td>
1191 <td class="parameter_description"><p>The ID of the stream to remove</p></td>
1192 <td class="parameter_annotations"> </td>
1193 </tr>
1194 </tbody>
1195 </table></div>
1196 </div>
1197 </div>
1198 <hr>
1199 <div class="refsect2">
1200 <a name="nice-agent-set-relay-info"></a><h3>nice_agent_set_relay_info ()</h3>
1201 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1202 nice_agent_set_relay_info (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
1203                            <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
1204                            <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>,
1205                            <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *server_ip</code></em>,
1206                            <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> server_port</code></em>,
1207                            <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *username</code></em>,
1208                            <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *password</code></em>,
1209                            <em class="parameter"><code><a class="link" href="NiceCandidate.html#NiceRelayType" title="enum NiceRelayType"><span class="type">NiceRelayType</span></a> type</code></em>);</pre>
1210 <p>Sets the settings for using a relay server during the candidate discovery.
1211 This may be called multiple times to add multiple relay servers to the
1212 discovery process; one TCP and one UDP, for example.</p>
1213 <div class="refsect3">
1214 <a name="nice-agent-set-relay-info.parameters"></a><h4>Parameters</h4>
1215 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1216 <colgroup>
1217 <col width="150px" class="parameters_name">
1218 <col class="parameters_description">
1219 <col width="200px" class="parameters_annotations">
1220 </colgroup>
1221 <tbody>
1222 <tr>
1223 <td class="parameter_name"><p>agent</p></td>
1224 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
1225 <td class="parameter_annotations"> </td>
1226 </tr>
1227 <tr>
1228 <td class="parameter_name"><p>stream_id</p></td>
1229 <td class="parameter_description"><p>The ID of the stream</p></td>
1230 <td class="parameter_annotations"> </td>
1231 </tr>
1232 <tr>
1233 <td class="parameter_name"><p>component_id</p></td>
1234 <td class="parameter_description"><p>The ID of the component</p></td>
1235 <td class="parameter_annotations"> </td>
1236 </tr>
1237 <tr>
1238 <td class="parameter_name"><p>server_ip</p></td>
1239 <td class="parameter_description"><p>The IP address of the TURN server</p></td>
1240 <td class="parameter_annotations"> </td>
1241 </tr>
1242 <tr>
1243 <td class="parameter_name"><p>server_port</p></td>
1244 <td class="parameter_description"><p>The port of the TURN server</p></td>
1245 <td class="parameter_annotations"> </td>
1246 </tr>
1247 <tr>
1248 <td class="parameter_name"><p>username</p></td>
1249 <td class="parameter_description"><p>The TURN username to use for the allocate</p></td>
1250 <td class="parameter_annotations"> </td>
1251 </tr>
1252 <tr>
1253 <td class="parameter_name"><p>password</p></td>
1254 <td class="parameter_description"><p>The TURN password to use for the allocate</p></td>
1255 <td class="parameter_annotations"> </td>
1256 </tr>
1257 <tr>
1258 <td class="parameter_name"><p>type</p></td>
1259 <td class="parameter_description"><p>The type of relay to use</p></td>
1260 <td class="parameter_annotations"> </td>
1261 </tr>
1262 </tbody>
1263 </table></div>
1264 </div>
1265 <div class="refsect3">
1266 <a name="nice-agent-set-relay-info.returns"></a><h4>Returns</h4>
1267 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the TURN settings were accepted.
1268 <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the address was invalid.</p>
1269 </div>
1270 </div>
1271 <hr>
1272 <div class="refsect2">
1273 <a name="nice-agent-forget-relays"></a><h3>nice_agent_forget_relays ()</h3>
1274 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1275 nice_agent_forget_relays (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
1276                           <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
1277                           <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>);</pre>
1278 <p>Forget all the relay servers previously added using
1279 <a class="link" href="NiceAgent.html#nice-agent-set-relay-info" title="nice_agent_set_relay_info ()"><code class="function">nice_agent_set_relay_info()</code></a>. Currently connected streams will keep
1280 using the relay as long as they have not been restarted and haven't
1281 succesfully negotiated a different path.</p>
1282 <div class="refsect3">
1283 <a name="nice-agent-forget-relays.parameters"></a><h4>Parameters</h4>
1284 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1285 <colgroup>
1286 <col width="150px" class="parameters_name">
1287 <col class="parameters_description">
1288 <col width="200px" class="parameters_annotations">
1289 </colgroup>
1290 <tbody>
1291 <tr>
1292 <td class="parameter_name"><p>agent</p></td>
1293 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
1294 <td class="parameter_annotations"> </td>
1295 </tr>
1296 <tr>
1297 <td class="parameter_name"><p>stream_id</p></td>
1298 <td class="parameter_description"><p>The ID of the stream</p></td>
1299 <td class="parameter_annotations"> </td>
1300 </tr>
1301 <tr>
1302 <td class="parameter_name"><p>component_id</p></td>
1303 <td class="parameter_description"><p>The ID of the component</p></td>
1304 <td class="parameter_annotations"> </td>
1305 </tr>
1306 </tbody>
1307 </table></div>
1308 </div>
1309 <div class="refsect3">
1310 <a name="nice-agent-forget-relays.returns"></a><h4>Returns</h4>
1311 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the component could not be found, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> otherwise</p>
1312 </div>
1313 <p class="since">Since: <a class="link" href="ix11.html#api-index-0.1.6">0.1.6</a></p>
1314 </div>
1315 <hr>
1316 <div class="refsect2">
1317 <a name="nice-agent-gather-candidates"></a><h3>nice_agent_gather_candidates ()</h3>
1318 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1319 nice_agent_gather_candidates (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
1320                               <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>);</pre>
1321 <p>Allocate and start listening on local candidate ports and start the remote
1322 candidate gathering process.
1323 Once done, <a class="link" href="NiceAgent.html#NiceAgent-candidate-gathering-done" title="The “candidate-gathering-done” signal"><span class="type">“candidate-gathering-done”</span></a> is called for the stream.
1324 As soon as this function is called, <a class="link" href="NiceAgent.html#NiceAgent-new-candidate" title="The “new-candidate” signal"><span class="type">“new-candidate”</span></a> signals may be
1325 emitted, even before this function returns.</p>
1326 <p>nice_agent_get_local_candidates() will only return non-empty results after
1327 calling this function.</p>
1328 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-add-local-address" title="nice_agent_add_local_address ()"><code class="function">nice_agent_add_local_address()</code></a></p>
1329 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-set-port-range" title="nice_agent_set_port_range ()"><code class="function">nice_agent_set_port_range()</code></a></p>
1330 <div class="refsect3">
1331 <a name="nice-agent-gather-candidates.parameters"></a><h4>Parameters</h4>
1332 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1333 <colgroup>
1334 <col width="150px" class="parameters_name">
1335 <col class="parameters_description">
1336 <col width="200px" class="parameters_annotations">
1337 </colgroup>
1338 <tbody>
1339 <tr>
1340 <td class="parameter_name"><p>agent</p></td>
1341 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object</p></td>
1342 <td class="parameter_annotations"> </td>
1343 </tr>
1344 <tr>
1345 <td class="parameter_name"><p>stream_id</p></td>
1346 <td class="parameter_description"><p>The ID of the stream to start</p></td>
1347 <td class="parameter_annotations"> </td>
1348 </tr>
1349 </tbody>
1350 </table></div>
1351 </div>
1352 <div class="refsect3">
1353 <a name="nice-agent-gather-candidates.returns"></a><h4>Returns</h4>
1354 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the stream ID is invalid or if a host candidate couldn't
1355 be allocated on the requested interfaces/ports; <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> otherwise</p>
1356 <div class="note">
1357 <p>
1358 Local addresses can be previously set with <a class="link" href="NiceAgent.html#nice-agent-add-local-address" title="nice_agent_add_local_address ()"><code class="function">nice_agent_add_local_address()</code></a>
1359 </p>
1360 <p>
1361 Since 0.0.5, If no local address was previously added, then the nice agent
1362 will automatically detect the local address using
1363 <a class="link" href="libnice-Network-interfaces-discovery.html#nice-interfaces-get-local-ips" title="nice_interfaces_get_local_ips ()"><code class="function">nice_interfaces_get_local_ips()</code></a>
1364 </p>
1365 </div>
1366 </div>
1367 </div>
1368 <hr>
1369 <div class="refsect2">
1370 <a name="nice-agent-set-remote-credentials"></a><h3>nice_agent_set_remote_credentials ()</h3>
1371 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1372 nice_agent_set_remote_credentials (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
1373                                    <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
1374                                    <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *ufrag</code></em>,
1375                                    <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *pwd</code></em>);</pre>
1376 <p>Sets the remote credentials for stream <em class="parameter"><code>stream_id</code></em>
1377 .</p>
1378 <div class="note">
1379 <p>
1380      Stream credentials do not override per-candidate credentials if set
1381    </p>
1382 <p>
1383      Due to the native of peer-reflexive candidates, any agent using a per-stream
1384      credentials (RFC5245, WLM2009, OC2007R2 and DRAFT19) instead of
1385      per-candidate credentials (GOOGLE, MSN, OC2007), must
1386      use the <a class="link" href="NiceAgent.html#nice-agent-set-remote-credentials" title="nice_agent_set_remote_credentials ()"><code class="function">nice_agent_set_remote_credentials()</code></a> API instead of setting the
1387      username and password on the candidates.
1388    </p>
1389 </div>
1390 <div class="refsect3">
1391 <a name="nice-agent-set-remote-credentials.parameters"></a><h4>Parameters</h4>
1392 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1393 <colgroup>
1394 <col width="150px" class="parameters_name">
1395 <col class="parameters_description">
1396 <col width="200px" class="parameters_annotations">
1397 </colgroup>
1398 <tbody>
1399 <tr>
1400 <td class="parameter_name"><p>agent</p></td>
1401 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
1402 <td class="parameter_annotations"> </td>
1403 </tr>
1404 <tr>
1405 <td class="parameter_name"><p>stream_id</p></td>
1406 <td class="parameter_description"><p>The ID of the stream</p></td>
1407 <td class="parameter_annotations"> </td>
1408 </tr>
1409 <tr>
1410 <td class="parameter_name"><p>ufrag</p></td>
1411 <td class="parameter_description"><p>nul-terminated string containing an ICE username fragment
1412 (length must be between 22 and 256 chars)</p></td>
1413 <td class="parameter_annotations"> </td>
1414 </tr>
1415 <tr>
1416 <td class="parameter_name"><p>pwd</p></td>
1417 <td class="parameter_description"><p>nul-terminated string containing an ICE password
1418 (length must be between 4 and 256 chars)</p></td>
1419 <td class="parameter_annotations"> </td>
1420 </tr>
1421 </tbody>
1422 </table></div>
1423 </div>
1424 <div class="refsect3">
1425 <a name="nice-agent-set-remote-credentials.returns"></a><h4>Returns</h4>
1426 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error.</p>
1427 </div>
1428 </div>
1429 <hr>
1430 <div class="refsect2">
1431 <a name="nice-agent-get-local-credentials"></a><h3>nice_agent_get_local_credentials ()</h3>
1432 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1433 nice_agent_get_local_credentials (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
1434                                   <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
1435                                   <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **ufrag</code></em>,
1436                                   <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **pwd</code></em>);</pre>
1437 <p>Gets the local credentials for stream <em class="parameter"><code>stream_id</code></em>
1438 . This may be called any time
1439 after creating a stream using <a class="link" href="NiceAgent.html#nice-agent-add-stream" title="nice_agent_add_stream ()"><code class="function">nice_agent_add_stream()</code></a>.</p>
1440 <p>An error will be returned if this is called for a non-existent stream, or if
1441 either of <em class="parameter"><code>ufrag</code></em>
1442  or <em class="parameter"><code>pwd</code></em>
1443  are <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
1444 <div class="refsect3">
1445 <a name="nice-agent-get-local-credentials.parameters"></a><h4>Parameters</h4>
1446 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1447 <colgroup>
1448 <col width="150px" class="parameters_name">
1449 <col class="parameters_description">
1450 <col width="200px" class="parameters_annotations">
1451 </colgroup>
1452 <tbody>
1453 <tr>
1454 <td class="parameter_name"><p>agent</p></td>
1455 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
1456 <td class="parameter_annotations"> </td>
1457 </tr>
1458 <tr>
1459 <td class="parameter_name"><p>stream_id</p></td>
1460 <td class="parameter_description"><p>The ID of the stream</p></td>
1461 <td class="parameter_annotations"> </td>
1462 </tr>
1463 <tr>
1464 <td class="parameter_name"><p>ufrag</p></td>
1465 <td class="parameter_description"><p>return location for a nul-terminated string
1466 containing an ICE username fragment; must be freed with <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>. </p></td>
1467 <td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out callee-allocates</span></acronym>]</span></td>
1468 </tr>
1469 <tr>
1470 <td class="parameter_name"><p>pwd</p></td>
1471 <td class="parameter_description"><p>return location for a nul-terminated string
1472 containing an ICE password; must be freed with <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>. </p></td>
1473 <td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out callee-allocates</span></acronym>]</span></td>
1474 </tr>
1475 </tbody>
1476 </table></div>
1477 </div>
1478 <div class="refsect3">
1479 <a name="nice-agent-get-local-credentials.returns"></a><h4>Returns</h4>
1480 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error.</p>
1481 </div>
1482 </div>
1483 <hr>
1484 <div class="refsect2">
1485 <a name="nice-agent-set-local-credentials"></a><h3>nice_agent_set_local_credentials ()</h3>
1486 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1487 nice_agent_set_local_credentials (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
1488                                   <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
1489                                   <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *ufrag</code></em>,
1490                                   <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *pwd</code></em>);</pre>
1491 <p>Sets the local credentials for stream <em class="parameter"><code>stream_id</code></em>
1492 .</p>
1493 <div class="note"><p>
1494      This is only effective before ICE negotiation has started.
1495    </p></div>
1496 <p>Since 0.1.11</p>
1497 <div class="refsect3">
1498 <a name="nice-agent-set-local-credentials.parameters"></a><h4>Parameters</h4>
1499 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1500 <colgroup>
1501 <col width="150px" class="parameters_name">
1502 <col class="parameters_description">
1503 <col width="200px" class="parameters_annotations">
1504 </colgroup>
1505 <tbody>
1506 <tr>
1507 <td class="parameter_name"><p>agent</p></td>
1508 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
1509 <td class="parameter_annotations"> </td>
1510 </tr>
1511 <tr>
1512 <td class="parameter_name"><p>stream_id</p></td>
1513 <td class="parameter_description"><p>The ID of the stream</p></td>
1514 <td class="parameter_annotations"> </td>
1515 </tr>
1516 <tr>
1517 <td class="parameter_name"><p>ufrag</p></td>
1518 <td class="parameter_description"><p>nul-terminated string containing an ICE username fragment
1519 (length must be between 22 and 256 chars)</p></td>
1520 <td class="parameter_annotations"> </td>
1521 </tr>
1522 <tr>
1523 <td class="parameter_name"><p>pwd</p></td>
1524 <td class="parameter_description"><p>nul-terminated string containing an ICE password
1525 (length must be between 4 and 256 chars)</p></td>
1526 <td class="parameter_annotations"> </td>
1527 </tr>
1528 </tbody>
1529 </table></div>
1530 </div>
1531 <div class="refsect3">
1532 <a name="nice-agent-set-local-credentials.returns"></a><h4>Returns</h4>
1533 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error.</p>
1534 </div>
1535 </div>
1536 <hr>
1537 <div class="refsect2">
1538 <a name="nice-agent-set-remote-candidates"></a><h3>nice_agent_set_remote_candidates ()</h3>
1539 <pre class="programlisting"><span class="returnvalue">int</span>
1540 nice_agent_set_remote_candidates (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
1541                                   <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
1542                                   <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>,
1543                                   <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *candidates</code></em>);</pre>
1544 <p>Sets, adds or updates the remote candidates for a component of a stream.</p>
1545 <div class="note">
1546 <p>
1547     NICE_AGENT_MAX_REMOTE_CANDIDATES is the absolute maximum limit
1548     for remote candidates.
1549    </p>
1550 <p>
1551    You must first call <a class="link" href="NiceAgent.html#nice-agent-gather-candidates" title="nice_agent_gather_candidates ()"><code class="function">nice_agent_gather_candidates()</code></a> and wait for the
1552    <a class="link" href="NiceAgent.html#NiceAgent-candidate-gathering-done" title="The “candidate-gathering-done” signal"><span class="type">“candidate-gathering-done”</span></a> signale before
1553    calling <a class="link" href="NiceAgent.html#nice-agent-set-remote-candidates" title="nice_agent_set_remote_candidates ()"><code class="function">nice_agent_set_remote_candidates()</code></a>
1554    </p>
1555 <p>
1556     Since 0.1.3, there is no need to wait for the candidate-gathering-done signal.
1557     Remote candidates can be set even while gathering local candidates.
1558     Newly discovered local candidates will automatically be paired with
1559     existing remote candidates.
1560    </p>
1561 </div>
1562 <div class="refsect3">
1563 <a name="nice-agent-set-remote-candidates.parameters"></a><h4>Parameters</h4>
1564 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1565 <colgroup>
1566 <col width="150px" class="parameters_name">
1567 <col class="parameters_description">
1568 <col width="200px" class="parameters_annotations">
1569 </colgroup>
1570 <tbody>
1571 <tr>
1572 <td class="parameter_name"><p>agent</p></td>
1573 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
1574 <td class="parameter_annotations"> </td>
1575 </tr>
1576 <tr>
1577 <td class="parameter_name"><p>stream_id</p></td>
1578 <td class="parameter_description"><p>The ID of the stream the candidates are for</p></td>
1579 <td class="parameter_annotations"> </td>
1580 </tr>
1581 <tr>
1582 <td class="parameter_name"><p>component_id</p></td>
1583 <td class="parameter_description"><p>The ID of the component the candidates are for</p></td>
1584 <td class="parameter_annotations"> </td>
1585 </tr>
1586 <tr>
1587 <td class="parameter_name"><p>candidates</p></td>
1588 <td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> of
1589 <a class="link" href="NiceCandidate.html" title="NiceCandidate"><span class="type">NiceCandidate</span></a> items describing each candidate to add. </p></td>
1590 <td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NiceCandidate][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td>
1591 </tr>
1592 </tbody>
1593 </table></div>
1594 </div>
1595 <div class="refsect3">
1596 <a name="nice-agent-set-remote-candidates.returns"></a><h4>Returns</h4>
1597 <p> The number of candidates added, negative on errors (memory
1598 allocation error or invalid component)</p>
1599 </div>
1600 </div>
1601 <hr>
1602 <div class="refsect2">
1603 <a name="nice-agent-get-remote-candidates"></a><h3>nice_agent_get_remote_candidates ()</h3>
1604 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> *
1605 nice_agent_get_remote_candidates (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
1606                                   <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
1607                                   <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>);</pre>
1608 <p>Get a list of the remote candidates set on a stream's component</p>
1609 <div class="note">
1610 <p>
1611      The caller owns the returned GSList as well as the candidates contained
1612      within it.
1613    </p>
1614 <p>
1615      The list of remote candidates can change during processing.
1616      The client should register for the <a class="link" href="NiceAgent.html#NiceAgent-new-remote-candidate" title="The “new-remote-candidate” signal"><span class="type">“new-remote-candidate”</span></a> signal
1617      to get notified of new remote candidates.
1618    </p>
1619 </div>
1620 <div class="refsect3">
1621 <a name="nice-agent-get-remote-candidates.parameters"></a><h4>Parameters</h4>
1622 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1623 <colgroup>
1624 <col width="150px" class="parameters_name">
1625 <col class="parameters_description">
1626 <col width="200px" class="parameters_annotations">
1627 </colgroup>
1628 <tbody>
1629 <tr>
1630 <td class="parameter_name"><p>agent</p></td>
1631 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
1632 <td class="parameter_annotations"> </td>
1633 </tr>
1634 <tr>
1635 <td class="parameter_name"><p>stream_id</p></td>
1636 <td class="parameter_description"><p>The ID of the stream</p></td>
1637 <td class="parameter_annotations"> </td>
1638 </tr>
1639 <tr>
1640 <td class="parameter_name"><p>component_id</p></td>
1641 <td class="parameter_description"><p>The ID of the component</p></td>
1642 <td class="parameter_annotations"> </td>
1643 </tr>
1644 </tbody>
1645 </table></div>
1646 </div>
1647 <div class="refsect3">
1648 <a name="nice-agent-get-remote-candidates.returns"></a><h4>Returns</h4>
1649 <p>a <a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> of
1650 <a href="NiceCandidate.html#NiceCandidate-struct"><span class="type">NiceCandidates</span></a> objects representing the remote candidates set on the <em class="parameter"><code>agent</code></em>
1651 . </p>
1652 <p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NiceCandidate][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
1653 </div>
1654 </div>
1655 <hr>
1656 <div class="refsect2">
1657 <a name="nice-agent-get-local-candidates"></a><h3>nice_agent_get_local_candidates ()</h3>
1658 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> *
1659 nice_agent_get_local_candidates (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
1660                                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
1661                                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>);</pre>
1662 <p>Retrieve from the agent the list of all local candidates
1663 for a stream's component</p>
1664 <div class="note"><p>
1665      The caller owns the returned GSList as well as the candidates contained
1666      within it.
1667      To get full results, the client should wait for the
1668      <a class="link" href="NiceAgent.html#NiceAgent-candidate-gathering-done" title="The “candidate-gathering-done” signal"><span class="type">“candidate-gathering-done”</span></a> signal.
1669    </p></div>
1670 <div class="refsect3">
1671 <a name="nice-agent-get-local-candidates.parameters"></a><h4>Parameters</h4>
1672 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1673 <colgroup>
1674 <col width="150px" class="parameters_name">
1675 <col class="parameters_description">
1676 <col width="200px" class="parameters_annotations">
1677 </colgroup>
1678 <tbody>
1679 <tr>
1680 <td class="parameter_name"><p>agent</p></td>
1681 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
1682 <td class="parameter_annotations"> </td>
1683 </tr>
1684 <tr>
1685 <td class="parameter_name"><p>stream_id</p></td>
1686 <td class="parameter_description"><p>The ID of the stream</p></td>
1687 <td class="parameter_annotations"> </td>
1688 </tr>
1689 <tr>
1690 <td class="parameter_name"><p>component_id</p></td>
1691 <td class="parameter_description"><p>The ID of the component</p></td>
1692 <td class="parameter_annotations"> </td>
1693 </tr>
1694 </tbody>
1695 </table></div>
1696 </div>
1697 <div class="refsect3">
1698 <a name="nice-agent-get-local-candidates.returns"></a><h4>Returns</h4>
1699 <p>a <a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> of
1700 <a class="link" href="NiceCandidate.html" title="NiceCandidate"><span class="type">NiceCandidate</span></a> objects representing the local candidates of <em class="parameter"><code>agent</code></em>
1701 . </p>
1702 <p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NiceCandidate][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
1703 </div>
1704 </div>
1705 <hr>
1706 <div class="refsect2">
1707 <a name="nice-agent-get-selected-pair"></a><h3>nice_agent_get_selected_pair ()</h3>
1708 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1709 nice_agent_get_selected_pair (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
1710                               <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
1711                               <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>,
1712                               <em class="parameter"><code><a class="link" href="NiceCandidate.html" title="NiceCandidate"><span class="type">NiceCandidate</span></a> **local</code></em>,
1713                               <em class="parameter"><code><a class="link" href="NiceCandidate.html" title="NiceCandidate"><span class="type">NiceCandidate</span></a> **remote</code></em>);</pre>
1714 <p>Retreive the selected candidate pair for media transmission
1715 for a given stream's component.</p>
1716 <div class="refsect3">
1717 <a name="nice-agent-get-selected-pair.parameters"></a><h4>Parameters</h4>
1718 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1719 <colgroup>
1720 <col width="150px" class="parameters_name">
1721 <col class="parameters_description">
1722 <col width="200px" class="parameters_annotations">
1723 </colgroup>
1724 <tbody>
1725 <tr>
1726 <td class="parameter_name"><p>agent</p></td>
1727 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
1728 <td class="parameter_annotations"> </td>
1729 </tr>
1730 <tr>
1731 <td class="parameter_name"><p>stream_id</p></td>
1732 <td class="parameter_description"><p>The ID of the stream</p></td>
1733 <td class="parameter_annotations"> </td>
1734 </tr>
1735 <tr>
1736 <td class="parameter_name"><p>component_id</p></td>
1737 <td class="parameter_description"><p>The ID of the component</p></td>
1738 <td class="parameter_annotations"> </td>
1739 </tr>
1740 <tr>
1741 <td class="parameter_name"><p>local</p></td>
1742 <td class="parameter_description"><p>The local selected candidate</p></td>
1743 <td class="parameter_annotations"> </td>
1744 </tr>
1745 <tr>
1746 <td class="parameter_name"><p>remote</p></td>
1747 <td class="parameter_description"><p>The remote selected candidate</p></td>
1748 <td class="parameter_annotations"> </td>
1749 </tr>
1750 </tbody>
1751 </table></div>
1752 </div>
1753 <div class="refsect3">
1754 <a name="nice-agent-get-selected-pair.returns"></a><h4>Returns</h4>
1755 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if there is no selected candidate pair</p>
1756 </div>
1757 </div>
1758 <hr>
1759 <div class="refsect2">
1760 <a name="nice-agent-peer-candidate-gathering-done"></a><h3>nice_agent_peer_candidate_gathering_done ()</h3>
1761 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
1762 nice_agent_peer_candidate_gathering_done
1763                                (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
1764                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>);</pre>
1765 <p>Notifies the agent that the remote peer has concluded candidate gathering and
1766 thus no more remote candidates are expected to arrive for <em class="parameter"><code>stream_id</code></em>
1767 .</p>
1768 <p>This will allow the stream components without a successful connectivity check
1769 to stop waiting for more candidates to come and finally transit into
1770 <a class="link" href="NiceAgent.html#NICE-COMPONENT-STATE-FAILED:CAPS"><code class="literal">NICE_COMPONENT_STATE_FAILED</code></a>.</p>
1771 <p>Calling the function has an effect only when <span class="type">“trickle-ice”</span> is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.</p>
1772 <div class="refsect3">
1773 <a name="nice-agent-peer-candidate-gathering-done.parameters"></a><h4>Parameters</h4>
1774 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1775 <colgroup>
1776 <col width="150px" class="parameters_name">
1777 <col class="parameters_description">
1778 <col width="200px" class="parameters_annotations">
1779 </colgroup>
1780 <tbody>
1781 <tr>
1782 <td class="parameter_name"><p>agent</p></td>
1783 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
1784 <td class="parameter_annotations"> </td>
1785 </tr>
1786 <tr>
1787 <td class="parameter_name"><p>stream_id</p></td>
1788 <td class="parameter_description"><p>The ID of the stream</p></td>
1789 <td class="parameter_annotations"> </td>
1790 </tr>
1791 </tbody>
1792 </table></div>
1793 </div>
1794 <div class="refsect3">
1795 <a name="nice-agent-peer-candidate-gathering-done.returns"></a><h4>Returns</h4>
1796 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the stream could not be found, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> otherwise</p>
1797 </div>
1798 <p class="since">Since: <a class="link" href="ix15.html#api-index-0.1.16">0.1.16</a></p>
1799 </div>
1800 <hr>
1801 <div class="refsect2">
1802 <a name="nice-agent-send"></a><h3>nice_agent_send ()</h3>
1803 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
1804 nice_agent_send (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
1805                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
1806                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>,
1807                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> len</code></em>,
1808                  <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *buf</code></em>);</pre>
1809 <p>Sends a data payload over a stream's component.</p>
1810 <div class="note">
1811 <p>
1812      Component state MUST be NICE_COMPONENT_STATE_READY, or as a special case,
1813      in any state if component was in READY state before and was then restarted
1814    </p>
1815 <p>
1816    In reliable mode, the -1 error value means either that you are not yet
1817    connected or that the send buffer is full (equivalent to EWOULDBLOCK).
1818    In both cases, you simply need to wait for the
1819    <a class="link" href="NiceAgent.html#NiceAgent-reliable-transport-writable" title="The “reliable-transport-writable” signal"><span class="type">“reliable-transport-writable”</span></a> signal to be fired before resending
1820    the data.
1821    </p>
1822 <p>
1823    In non-reliable mode, it will virtually never happen with UDP sockets, but
1824    it might happen if the active candidate is a TURN-TCP connection that got
1825    disconnected.
1826    </p>
1827 <p>
1828    In both reliable and non-reliable mode, a -1 error code could also mean that
1829    the stream_id and/or component_id are invalid.
1830    </p>
1831 </div>
1832 <div class="refsect3">
1833 <a name="nice-agent-send.parameters"></a><h4>Parameters</h4>
1834 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1835 <colgroup>
1836 <col width="150px" class="parameters_name">
1837 <col class="parameters_description">
1838 <col width="200px" class="parameters_annotations">
1839 </colgroup>
1840 <tbody>
1841 <tr>
1842 <td class="parameter_name"><p>agent</p></td>
1843 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
1844 <td class="parameter_annotations"> </td>
1845 </tr>
1846 <tr>
1847 <td class="parameter_name"><p>stream_id</p></td>
1848 <td class="parameter_description"><p>The ID of the stream to send to</p></td>
1849 <td class="parameter_annotations"> </td>
1850 </tr>
1851 <tr>
1852 <td class="parameter_name"><p>component_id</p></td>
1853 <td class="parameter_description"><p>The ID of the component to send to</p></td>
1854 <td class="parameter_annotations"> </td>
1855 </tr>
1856 <tr>
1857 <td class="parameter_name"><p>len</p></td>
1858 <td class="parameter_description"><p>The length of the buffer to send</p></td>
1859 <td class="parameter_annotations"> </td>
1860 </tr>
1861 <tr>
1862 <td class="parameter_name"><p>buf</p></td>
1863 <td class="parameter_description"><p>The buffer of data to send</p></td>
1864 <td class="parameter_annotations"> </td>
1865 </tr>
1866 </tbody>
1867 </table></div>
1868 </div>
1869 <div class="refsect3">
1870 <a name="nice-agent-send.returns"></a><h4>Returns</h4>
1871 <p> The number of bytes sent, or negative error code</p>
1872 </div>
1873 </div>
1874 <hr>
1875 <div class="refsect2">
1876 <a name="nice-agent-send-messages-nonblocking"></a><h3>nice_agent_send_messages_nonblocking ()</h3>
1877 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
1878 nice_agent_send_messages_nonblocking (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
1879                                       <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
1880                                       <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>,
1881                                       <em class="parameter"><code>const <a class="link" href="NiceAgent.html#NiceOutputMessage" title="NiceOutputMessage"><span class="type">NiceOutputMessage</span></a> *messages</code></em>,
1882                                       <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_messages</code></em>,
1883                                       <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
1884                                       <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1885 <p>Sends multiple messages on the socket identified by the given
1886 stream/component pair. Transmission is non-blocking, so a
1887 <a href="/usr/share/gtk-doc/html/gio/gio-GIOError.html#G-IO-ERROR-WOULD-BLOCK:CAPS"><code class="literal">G_IO_ERROR_WOULD_BLOCK</code></a> error may be returned if the send buffer is full.</p>
1888 <p>As with <a class="link" href="NiceAgent.html#nice-agent-send" title="nice_agent_send ()"><code class="function">nice_agent_send()</code></a>, the given component must be in
1889 <a class="link" href="NiceAgent.html#NICE-COMPONENT-STATE-READY:CAPS"><code class="literal">NICE_COMPONENT_STATE_READY</code></a> or, as a special case, in any state if it was
1890 previously ready and was then restarted.</p>
1891 <p>On success, the number of messages written to the socket will be returned,
1892 which may be less than <em class="parameter"><code>n_messages</code></em>
1893  if transmission would have blocked
1894 part-way through. Zero will be returned if <em class="parameter"><code>n_messages</code></em>
1895  is zero, or if
1896 transmission would have blocked on the first message.</p>
1897 <p>In reliable mode, it is instead recommended to use
1898 <a class="link" href="NiceAgent.html#nice-agent-send" title="nice_agent_send ()"><code class="function">nice_agent_send()</code></a>.  The return value can be less than <em class="parameter"><code>n_messages</code></em>
1899
1900 or 0 even if it is still possible to send a partial message. In
1901 this case, "nice-agent-writable" will never be triggered, so the
1902 application would have to use <code class="function">nice_agent_sent()</code> to fill the buffer or have
1903 to retry sending at a later point.</p>
1904 <p>On failure, -1 will be returned and <em class="parameter"><code>error</code></em>
1905  will be set. If the <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> is
1906 reliable and the socket is not yet connected, <a href="/usr/share/gtk-doc/html/gio/gio-GIOError.html#G-IO-ERROR-BROKEN-PIPE:CAPS"><code class="literal">G_IO_ERROR_BROKEN_PIPE</code></a> will be
1907 returned; if the write buffer is full, <a href="/usr/share/gtk-doc/html/gio/gio-GIOError.html#G-IO-ERROR-WOULD-BLOCK:CAPS"><code class="literal">G_IO_ERROR_WOULD_BLOCK</code></a> will be
1908 returned. In both cases, wait for the <a class="link" href="NiceAgent.html#NiceAgent-reliable-transport-writable" title="The “reliable-transport-writable” signal"><span class="type">“reliable-transport-writable”</span></a>
1909 signal before trying again. If the given <em class="parameter"><code>stream_id</code></em>
1910  or <em class="parameter"><code>component_id</code></em>
1911  are
1912 invalid or not yet connected, <a href="/usr/share/gtk-doc/html/gio/gio-GIOError.html#G-IO-ERROR-BROKEN-PIPE:CAPS"><code class="literal">G_IO_ERROR_BROKEN_PIPE</code></a> will be returned.
1913 <a href="/usr/share/gtk-doc/html/gio/gio-GIOError.html#G-IO-ERROR-FAILED:CAPS"><code class="literal">G_IO_ERROR_FAILED</code></a> will be returned for other errors.</p>
1914 <div class="refsect3">
1915 <a name="nice-agent-send-messages-nonblocking.parameters"></a><h4>Parameters</h4>
1916 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1917 <colgroup>
1918 <col width="150px" class="parameters_name">
1919 <col class="parameters_description">
1920 <col width="200px" class="parameters_annotations">
1921 </colgroup>
1922 <tbody>
1923 <tr>
1924 <td class="parameter_name"><p>agent</p></td>
1925 <td class="parameter_description"><p>a <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a></p></td>
1926 <td class="parameter_annotations"> </td>
1927 </tr>
1928 <tr>
1929 <td class="parameter_name"><p>stream_id</p></td>
1930 <td class="parameter_description"><p>the ID of the stream to send to</p></td>
1931 <td class="parameter_annotations"> </td>
1932 </tr>
1933 <tr>
1934 <td class="parameter_name"><p>component_id</p></td>
1935 <td class="parameter_description"><p>the ID of the component to send to</p></td>
1936 <td class="parameter_annotations"> </td>
1937 </tr>
1938 <tr>
1939 <td class="parameter_name"><p>messages</p></td>
1940 <td class="parameter_description"><p>array of messages to send, of at least
1941 <em class="parameter"><code>n_messages</code></em>
1942 entries in length. </p></td>
1943 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_messages]</span></td>
1944 </tr>
1945 <tr>
1946 <td class="parameter_name"><p>n_messages</p></td>
1947 <td class="parameter_description"><p>number of entries in <em class="parameter"><code>messages</code></em>
1948 </p></td>
1949 <td class="parameter_annotations"> </td>
1950 </tr>
1951 <tr>
1952 <td class="parameter_name"><p>cancellable</p></td>
1953 <td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> to cancel the operation from
1954 another thread, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1955 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1956 </tr>
1957 <tr>
1958 <td class="parameter_name"><p>error</p></td>
1959 <td class="parameter_description"><p>return location for a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
1960 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
1961 </tr>
1962 </tbody>
1963 </table></div>
1964 </div>
1965 <div class="refsect3">
1966 <a name="nice-agent-send-messages-nonblocking.returns"></a><h4>Returns</h4>
1967 <p> the number of messages sent (may be zero), or -1 on error</p>
1968 </div>
1969 <p class="since">Since: <a class="link" href="ix10.html#api-index-0.1.5">0.1.5</a></p>
1970 </div>
1971 <hr>
1972 <div class="refsect2">
1973 <a name="nice-agent-recv"></a><h3>nice_agent_recv ()</h3>
1974 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
1975 nice_agent_recv (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
1976                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
1977                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>,
1978                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *buf</code></em>,
1979                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> buf_len</code></em>,
1980                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
1981                  <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
1982 <p>A single-message version of <a class="link" href="NiceAgent.html#nice-agent-recv-messages" title="nice_agent_recv_messages ()"><code class="function">nice_agent_recv_messages()</code></a>.</p>
1983 <div class="refsect3">
1984 <a name="nice-agent-recv.parameters"></a><h4>Parameters</h4>
1985 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1986 <colgroup>
1987 <col width="150px" class="parameters_name">
1988 <col class="parameters_description">
1989 <col width="200px" class="parameters_annotations">
1990 </colgroup>
1991 <tbody>
1992 <tr>
1993 <td class="parameter_name"><p>agent</p></td>
1994 <td class="parameter_description"><p>a <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a></p></td>
1995 <td class="parameter_annotations"> </td>
1996 </tr>
1997 <tr>
1998 <td class="parameter_name"><p>stream_id</p></td>
1999 <td class="parameter_description"><p>the ID of the stream to receive on</p></td>
2000 <td class="parameter_annotations"> </td>
2001 </tr>
2002 <tr>
2003 <td class="parameter_name"><p>component_id</p></td>
2004 <td class="parameter_description"><p>the ID of the component to receive on</p></td>
2005 <td class="parameter_annotations"> </td>
2006 </tr>
2007 <tr>
2008 <td class="parameter_name"><p>buf</p></td>
2009 <td class="parameter_description"><p>caller-allocated buffer
2010 to write the received data into, of length at least <em class="parameter"><code>buf_len</code></em>
2011 . </p></td>
2012 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=buf_len][<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
2013 </tr>
2014 <tr>
2015 <td class="parameter_name"><p>buf_len</p></td>
2016 <td class="parameter_description"><p>length of <em class="parameter"><code>buf</code></em>
2017 </p></td>
2018 <td class="parameter_annotations"> </td>
2019 </tr>
2020 <tr>
2021 <td class="parameter_name"><p>cancellable</p></td>
2022 <td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> to allow the operation to be
2023 cancelled from another thread, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2024 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2025 </tr>
2026 <tr>
2027 <td class="parameter_name"><p>error</p></td>
2028 <td class="parameter_description"><p>return location for a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2029 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2030 </tr>
2031 </tbody>
2032 </table></div>
2033 </div>
2034 <div class="refsect3">
2035 <a name="nice-agent-recv.returns"></a><h4>Returns</h4>
2036 <p> the number of bytes written to <em class="parameter"><code>buf</code></em>
2037 on success (guaranteed to be
2038 greater than 0 unless <em class="parameter"><code>buf_len</code></em>
2039 is 0), 0 if in reliable mode and the remote
2040 peer closed the stream, or -1 on error</p>
2041 </div>
2042 <p class="since">Since: <a class="link" href="ix10.html#api-index-0.1.5">0.1.5</a></p>
2043 </div>
2044 <hr>
2045 <div class="refsect2">
2046 <a name="nice-agent-recv-messages"></a><h3>nice_agent_recv_messages ()</h3>
2047 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
2048 nice_agent_recv_messages (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
2049                           <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
2050                           <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>,
2051                           <em class="parameter"><code><a class="link" href="NiceAgent.html#NiceInputMessage" title="NiceInputMessage"><span class="type">NiceInputMessage</span></a> *messages</code></em>,
2052                           <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_messages</code></em>,
2053                           <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
2054                           <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2055 <p>Block on receiving data from the given stream/component combination on
2056 <em class="parameter"><code>agent</code></em>
2057 , returning only once exactly <em class="parameter"><code>n_messages</code></em>
2058  messages have been received
2059 and written into <em class="parameter"><code>messages</code></em>
2060 , the stream is closed by the other end or by
2061 calling <a class="link" href="NiceAgent.html#nice-agent-remove-stream" title="nice_agent_remove_stream ()"><code class="function">nice_agent_remove_stream()</code></a>, or <em class="parameter"><code>cancellable</code></em>
2062  is cancelled.</p>
2063 <p>Any STUN packets received will not be added to <em class="parameter"><code>messages</code></em>
2064 ; instead,
2065 they'll be passed for processing to <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> itself. Since <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a>
2066 does not poll for messages on its own, it's therefore essential to keep
2067 calling this function for ICE connection establishment to work.</p>
2068 <p>In the non-error case, in reliable mode, this will block until all buffers in
2069 all <em class="parameter"><code>n_messages</code></em>
2070  have been filled with received data (i.e. <em class="parameter"><code>messages</code></em>
2071  is
2072 treated as a large, flat array of buffers). In non-reliable mode, it will
2073 block until <em class="parameter"><code>n_messages</code></em>
2074  messages have been received, each of which does not
2075 have to fill all the buffers in its <a class="link" href="NiceAgent.html#NiceInputMessage" title="NiceInputMessage"><span class="type">NiceInputMessage</span></a>. In the non-reliable
2076 case, each <a class="link" href="NiceAgent.html#NiceInputMessage" title="NiceInputMessage"><span class="type">NiceInputMessage</span></a> must have enough buffers to contain an entire
2077 message (65536 bytes), or any excess data may be silently dropped.</p>
2078 <p>For each received message, <span class="type">“length”</span> will be set to the
2079 number of valid bytes stored in the message’s buffers. The bytes are stored
2080 sequentially in the buffers; there are no gaps apart from at the end of the
2081 buffer array (in non-reliable mode). If non-<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on input,
2082 <span class="type">“from”</span> will have the address of the sending peer stored in
2083 it. The base addresses, sizes, and number of buffers in each message will not
2084 be modified in any case.</p>
2085 <p>This must not be used in combination with <a class="link" href="NiceAgent.html#nice-agent-attach-recv" title="nice_agent_attach_recv ()"><code class="function">nice_agent_attach_recv()</code></a> on the
2086 same stream/component pair.</p>
2087 <p>If the stream/component pair doesn’t exist, or if a suitable candidate socket
2088 hasn’t yet been selected for it, a <a href="/usr/share/gtk-doc/html/gio/gio-GIOError.html#G-IO-ERROR-BROKEN-PIPE:CAPS"><code class="literal">G_IO_ERROR_BROKEN_PIPE</code></a> error will be
2089 returned. A <a href="/usr/share/gtk-doc/html/gio/gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a> error will be returned if the operation was
2090 cancelled. <a href="/usr/share/gtk-doc/html/gio/gio-GIOError.html#G-IO-ERROR-FAILED:CAPS"><code class="literal">G_IO_ERROR_FAILED</code></a> will be returned for other errors.</p>
2091 <div class="refsect3">
2092 <a name="nice-agent-recv-messages.parameters"></a><h4>Parameters</h4>
2093 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2094 <colgroup>
2095 <col width="150px" class="parameters_name">
2096 <col class="parameters_description">
2097 <col width="200px" class="parameters_annotations">
2098 </colgroup>
2099 <tbody>
2100 <tr>
2101 <td class="parameter_name"><p>agent</p></td>
2102 <td class="parameter_description"><p>a <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a></p></td>
2103 <td class="parameter_annotations"> </td>
2104 </tr>
2105 <tr>
2106 <td class="parameter_name"><p>stream_id</p></td>
2107 <td class="parameter_description"><p>the ID of the stream to receive on</p></td>
2108 <td class="parameter_annotations"> </td>
2109 </tr>
2110 <tr>
2111 <td class="parameter_name"><p>component_id</p></td>
2112 <td class="parameter_description"><p>the ID of the component to receive on</p></td>
2113 <td class="parameter_annotations"> </td>
2114 </tr>
2115 <tr>
2116 <td class="parameter_name"><p>messages</p></td>
2117 <td class="parameter_description"><p>caller-allocated
2118 array of <a href="NiceAgent.html#NiceInputMessage"><span class="type">NiceInputMessages</span></a> to write the received messages into, of length at
2119 least <em class="parameter"><code>n_messages</code></em>
2120 . </p></td>
2121 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_messages][<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
2122 </tr>
2123 <tr>
2124 <td class="parameter_name"><p>n_messages</p></td>
2125 <td class="parameter_description"><p>number of entries in <em class="parameter"><code>messages</code></em>
2126 </p></td>
2127 <td class="parameter_annotations"> </td>
2128 </tr>
2129 <tr>
2130 <td class="parameter_name"><p>cancellable</p></td>
2131 <td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> to allow the operation to be
2132 cancelled from another thread, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2133 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2134 </tr>
2135 <tr>
2136 <td class="parameter_name"><p>error</p></td>
2137 <td class="parameter_description"><p>return location for a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2138 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2139 </tr>
2140 </tbody>
2141 </table></div>
2142 </div>
2143 <div class="refsect3">
2144 <a name="nice-agent-recv-messages.returns"></a><h4>Returns</h4>
2145 <p> the number of valid messages written to <em class="parameter"><code>messages</code></em>
2146 on success
2147 (guaranteed to be greater than 0 unless <em class="parameter"><code>n_messages</code></em>
2148 is 0), 0 if the remote
2149 peer closed the stream, or -1 on error</p>
2150 </div>
2151 <p class="since">Since: <a class="link" href="ix10.html#api-index-0.1.5">0.1.5</a></p>
2152 </div>
2153 <hr>
2154 <div class="refsect2">
2155 <a name="nice-agent-recv-nonblocking"></a><h3>nice_agent_recv_nonblocking ()</h3>
2156 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>
2157 nice_agent_recv_nonblocking (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
2158                              <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
2159                              <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>,
2160                              <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *buf</code></em>,
2161                              <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> buf_len</code></em>,
2162                              <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
2163                              <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2164 <p>A single-message version of <a class="link" href="NiceAgent.html#nice-agent-recv-messages-nonblocking" title="nice_agent_recv_messages_nonblocking ()"><code class="function">nice_agent_recv_messages_nonblocking()</code></a>.</p>
2165 <div class="refsect3">
2166 <a name="nice-agent-recv-nonblocking.parameters"></a><h4>Parameters</h4>
2167 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2168 <colgroup>
2169 <col width="150px" class="parameters_name">
2170 <col class="parameters_description">
2171 <col width="200px" class="parameters_annotations">
2172 </colgroup>
2173 <tbody>
2174 <tr>
2175 <td class="parameter_name"><p>agent</p></td>
2176 <td class="parameter_description"><p>a <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a></p></td>
2177 <td class="parameter_annotations"> </td>
2178 </tr>
2179 <tr>
2180 <td class="parameter_name"><p>stream_id</p></td>
2181 <td class="parameter_description"><p>the ID of the stream to receive on</p></td>
2182 <td class="parameter_annotations"> </td>
2183 </tr>
2184 <tr>
2185 <td class="parameter_name"><p>component_id</p></td>
2186 <td class="parameter_description"><p>the ID of the component to receive on</p></td>
2187 <td class="parameter_annotations"> </td>
2188 </tr>
2189 <tr>
2190 <td class="parameter_name"><p>buf</p></td>
2191 <td class="parameter_description"><p>caller-allocated buffer
2192 to write the received data into, of length at least <em class="parameter"><code>buf_len</code></em>
2193 . </p></td>
2194 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=buf_len][<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
2195 </tr>
2196 <tr>
2197 <td class="parameter_name"><p>buf_len</p></td>
2198 <td class="parameter_description"><p>length of <em class="parameter"><code>buf</code></em>
2199 </p></td>
2200 <td class="parameter_annotations"> </td>
2201 </tr>
2202 <tr>
2203 <td class="parameter_name"><p>cancellable</p></td>
2204 <td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> to allow the operation to be
2205 cancelled from another thread, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2206 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2207 </tr>
2208 <tr>
2209 <td class="parameter_name"><p>error</p></td>
2210 <td class="parameter_description"><p>return location for a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2211 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2212 </tr>
2213 </tbody>
2214 </table></div>
2215 </div>
2216 <div class="refsect3">
2217 <a name="nice-agent-recv-nonblocking.returns"></a><h4>Returns</h4>
2218 <p> the number of bytes received into <em class="parameter"><code>buf</code></em>
2219 on success (guaranteed to be
2220 greater than 0 unless <em class="parameter"><code>buf_len</code></em>
2221 is 0), 0 if in reliable mode and the remote
2222 peer closed the stream, or -1 on error</p>
2223 </div>
2224 <p class="since">Since: <a class="link" href="ix10.html#api-index-0.1.5">0.1.5</a></p>
2225 </div>
2226 <hr>
2227 <div class="refsect2">
2228 <a name="nice-agent-recv-messages-nonblocking"></a><h3>nice_agent_recv_messages_nonblocking ()</h3>
2229 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
2230 nice_agent_recv_messages_nonblocking (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
2231                                       <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
2232                                       <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>,
2233                                       <em class="parameter"><code><a class="link" href="NiceAgent.html#NiceInputMessage" title="NiceInputMessage"><span class="type">NiceInputMessage</span></a> *messages</code></em>,
2234                                       <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_messages</code></em>,
2235                                       <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> *cancellable</code></em>,
2236                                       <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
2237 <p>Try to receive data from the given stream/component combination on <em class="parameter"><code>agent</code></em>
2238 ,
2239 without blocking. If receiving data would block, -1 is returned and
2240 <a href="/usr/share/gtk-doc/html/gio/gio-GIOError.html#G-IO-ERROR-WOULD-BLOCK:CAPS"><code class="literal">G_IO_ERROR_WOULD_BLOCK</code></a> is set in <em class="parameter"><code>error</code></em>
2241 . If any other error occurs, -1 is
2242 returned and <em class="parameter"><code>error</code></em>
2243  is set accordingly. Otherwise, 0 is returned if (and only
2244 if) <em class="parameter"><code>n_messages</code></em>
2245  is 0. In all other cases, the number of valid messages stored
2246 in <em class="parameter"><code>messages</code></em>
2247  is returned, and will be greater than 0.</p>
2248 <p>This function behaves similarly to <a class="link" href="NiceAgent.html#nice-agent-recv-messages" title="nice_agent_recv_messages ()"><code class="function">nice_agent_recv_messages()</code></a>, except that it
2249 will not block on filling (in reliable mode) or receiving (in non-reliable
2250 mode) exactly <em class="parameter"><code>n_messages</code></em>
2251  messages. In reliable mode, it will receive bytes
2252 into <em class="parameter"><code>messages</code></em>
2253  until it would block; in non-reliable mode, it will receive
2254 messages until it would block.</p>
2255 <p>Any STUN packets received will not be added to <em class="parameter"><code>messages</code></em>
2256 ; instead,
2257 they'll be passed for processing to <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> itself. Since <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a>
2258 does not poll for messages on its own, it's therefore essential to keep
2259 calling this function for ICE connection establishment to work.</p>
2260 <p>As this function is non-blocking, <em class="parameter"><code>cancellable</code></em>
2261  is included only for parity
2262 with <a class="link" href="NiceAgent.html#nice-agent-recv-messages" title="nice_agent_recv_messages ()"><code class="function">nice_agent_recv_messages()</code></a>. If <em class="parameter"><code>cancellable</code></em>
2263  is cancelled before this
2264 function is called, a <a href="/usr/share/gtk-doc/html/gio/gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a> error will be returned
2265 immediately.</p>
2266 <p>This must not be used in combination with <a class="link" href="NiceAgent.html#nice-agent-attach-recv" title="nice_agent_attach_recv ()"><code class="function">nice_agent_attach_recv()</code></a> on the
2267 same stream/component pair.</p>
2268 <div class="refsect3">
2269 <a name="nice-agent-recv-messages-nonblocking.parameters"></a><h4>Parameters</h4>
2270 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2271 <colgroup>
2272 <col width="150px" class="parameters_name">
2273 <col class="parameters_description">
2274 <col width="200px" class="parameters_annotations">
2275 </colgroup>
2276 <tbody>
2277 <tr>
2278 <td class="parameter_name"><p>agent</p></td>
2279 <td class="parameter_description"><p>a <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a></p></td>
2280 <td class="parameter_annotations"> </td>
2281 </tr>
2282 <tr>
2283 <td class="parameter_name"><p>stream_id</p></td>
2284 <td class="parameter_description"><p>the ID of the stream to receive on</p></td>
2285 <td class="parameter_annotations"> </td>
2286 </tr>
2287 <tr>
2288 <td class="parameter_name"><p>component_id</p></td>
2289 <td class="parameter_description"><p>the ID of the component to receive on</p></td>
2290 <td class="parameter_annotations"> </td>
2291 </tr>
2292 <tr>
2293 <td class="parameter_name"><p>messages</p></td>
2294 <td class="parameter_description"><p>caller-allocated
2295 array of <a href="NiceAgent.html#NiceInputMessage"><span class="type">NiceInputMessages</span></a> to write the received messages into, of length at
2296 least <em class="parameter"><code>n_messages</code></em>
2297 . </p></td>
2298 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_messages][<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
2299 </tr>
2300 <tr>
2301 <td class="parameter_name"><p>n_messages</p></td>
2302 <td class="parameter_description"><p>number of entries in <em class="parameter"><code>messages</code></em>
2303 </p></td>
2304 <td class="parameter_annotations"> </td>
2305 </tr>
2306 <tr>
2307 <td class="parameter_name"><p>cancellable</p></td>
2308 <td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/gio/GCancellable.html#GCancellable-struct"><span class="type">GCancellable</span></a> to allow the operation to be
2309 cancelled from another thread, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2310 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2311 </tr>
2312 <tr>
2313 <td class="parameter_name"><p>error</p></td>
2314 <td class="parameter_description"><p>return location for a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
2315 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
2316 </tr>
2317 </tbody>
2318 </table></div>
2319 </div>
2320 <div class="refsect3">
2321 <a name="nice-agent-recv-messages-nonblocking.returns"></a><h4>Returns</h4>
2322 <p> the number of valid messages written to <em class="parameter"><code>messages</code></em>
2323 on success
2324 (guaranteed to be greater than 0 unless <em class="parameter"><code>n_messages</code></em>
2325 is 0), 0 if in reliable
2326 mode and the remote peer closed the stream, or -1 on error</p>
2327 </div>
2328 <p class="since">Since: <a class="link" href="ix10.html#api-index-0.1.5">0.1.5</a></p>
2329 </div>
2330 <hr>
2331 <div class="refsect2">
2332 <a name="nice-agent-attach-recv"></a><h3>nice_agent_attach_recv ()</h3>
2333 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
2334 nice_agent_attach_recv (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
2335                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
2336                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>,
2337                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> *ctx</code></em>,
2338                         <em class="parameter"><code><a class="link" href="NiceAgent.html#NiceAgentRecvFunc" title="NiceAgentRecvFunc ()"><span class="type">NiceAgentRecvFunc</span></a> func</code></em>,
2339                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> data</code></em>);</pre>
2340 <p>Attaches the stream's component's sockets to the Glib Mainloop Context in
2341 order to be notified whenever data becomes available for a component,
2342 and to enable <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> to receive STUN messages (during the
2343 establishment of ICE connectivity).</p>
2344 <p>This must not be used in combination with <a class="link" href="NiceAgent.html#nice-agent-recv-messages" title="nice_agent_recv_messages ()"><code class="function">nice_agent_recv_messages()</code></a> (or
2345 <span class="type">NiceIOStream</span> or <span class="type">NiceInputStream</span>) on the same stream/component pair.</p>
2346 <p>Calling <a class="link" href="NiceAgent.html#nice-agent-attach-recv" title="nice_agent_attach_recv ()"><code class="function">nice_agent_attach_recv()</code></a> with a <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> <em class="parameter"><code>func</code></em>
2347  will detach any existing
2348 callback and cause reception to be paused for the given stream/component
2349 pair. You must iterate the previously specified <a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> sufficiently to
2350 ensure all pending I/O callbacks have been received before calling this
2351 function to unset <em class="parameter"><code>func</code></em>
2352 , otherwise data loss of received packets may occur.</p>
2353 <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
2354 <div class="refsect3">
2355 <a name="nice-agent-attach-recv.parameters"></a><h4>Parameters</h4>
2356 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2357 <colgroup>
2358 <col width="150px" class="parameters_name">
2359 <col class="parameters_description">
2360 <col width="200px" class="parameters_annotations">
2361 </colgroup>
2362 <tbody>
2363 <tr>
2364 <td class="parameter_name"><p>agent</p></td>
2365 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
2366 <td class="parameter_annotations"> </td>
2367 </tr>
2368 <tr>
2369 <td class="parameter_name"><p>stream_id</p></td>
2370 <td class="parameter_description"><p>The ID of stream</p></td>
2371 <td class="parameter_annotations"> </td>
2372 </tr>
2373 <tr>
2374 <td class="parameter_name"><p>component_id</p></td>
2375 <td class="parameter_description"><p>The ID of the component</p></td>
2376 <td class="parameter_annotations"> </td>
2377 </tr>
2378 <tr>
2379 <td class="parameter_name"><p>ctx</p></td>
2380 <td class="parameter_description"><p>The Glib Mainloop Context to use for listening on the component</p></td>
2381 <td class="parameter_annotations"> </td>
2382 </tr>
2383 <tr>
2384 <td class="parameter_name"><p>func</p></td>
2385 <td class="parameter_description"><p>The callback function to be called when data is received on
2386 the stream's component (will not be called for STUN messages that
2387 should be handled by <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> itself)</p></td>
2388 <td class="parameter_annotations"> </td>
2389 </tr>
2390 <tr>
2391 <td class="parameter_name"><p>data</p></td>
2392 <td class="parameter_description"><p>user data associated with the callback</p></td>
2393 <td class="parameter_annotations"> </td>
2394 </tr>
2395 </tbody>
2396 </table></div>
2397 </div>
2398 <div class="refsect3">
2399 <a name="nice-agent-attach-recv.returns"></a><h4>Returns</h4>
2400 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the stream or component IDs are invalid.</p>
2401 </div>
2402 </div>
2403 <hr>
2404 <div class="refsect2">
2405 <a name="nice-agent-set-selected-pair"></a><h3>nice_agent_set_selected_pair ()</h3>
2406 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
2407 nice_agent_set_selected_pair (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
2408                               <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
2409                               <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>,
2410                               <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *lfoundation</code></em>,
2411                               <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *rfoundation</code></em>);</pre>
2412 <p>Sets the selected candidate pair for media transmission
2413 for a given stream's component. Calling this function will
2414 disable all further ICE processing (connection check,
2415 state machine updates, etc). Note that keepalives will
2416 continue to be sent.</p>
2417 <div class="refsect3">
2418 <a name="nice-agent-set-selected-pair.parameters"></a><h4>Parameters</h4>
2419 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2420 <colgroup>
2421 <col width="150px" class="parameters_name">
2422 <col class="parameters_description">
2423 <col width="200px" class="parameters_annotations">
2424 </colgroup>
2425 <tbody>
2426 <tr>
2427 <td class="parameter_name"><p>agent</p></td>
2428 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
2429 <td class="parameter_annotations"> </td>
2430 </tr>
2431 <tr>
2432 <td class="parameter_name"><p>stream_id</p></td>
2433 <td class="parameter_description"><p>The ID of the stream</p></td>
2434 <td class="parameter_annotations"> </td>
2435 </tr>
2436 <tr>
2437 <td class="parameter_name"><p>component_id</p></td>
2438 <td class="parameter_description"><p>The ID of the component</p></td>
2439 <td class="parameter_annotations"> </td>
2440 </tr>
2441 <tr>
2442 <td class="parameter_name"><p>lfoundation</p></td>
2443 <td class="parameter_description"><p>The local foundation of the candidate to use</p></td>
2444 <td class="parameter_annotations"> </td>
2445 </tr>
2446 <tr>
2447 <td class="parameter_name"><p>rfoundation</p></td>
2448 <td class="parameter_description"><p>The remote foundation of the candidate to use</p></td>
2449 <td class="parameter_annotations"> </td>
2450 </tr>
2451 </tbody>
2452 </table></div>
2453 </div>
2454 <div class="refsect3">
2455 <a name="nice-agent-set-selected-pair.returns"></a><h4>Returns</h4>
2456 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if the candidate pair cannot be found</p>
2457 </div>
2458 </div>
2459 <hr>
2460 <div class="refsect2">
2461 <a name="nice-agent-set-selected-remote-candidate"></a><h3>nice_agent_set_selected_remote_candidate ()</h3>
2462 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
2463 nice_agent_set_selected_remote_candidate
2464                                (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
2465                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
2466                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>,
2467                                 <em class="parameter"><code><a class="link" href="NiceCandidate.html" title="NiceCandidate"><span class="type">NiceCandidate</span></a> *candidate</code></em>);</pre>
2468 <p>Sets the selected remote candidate for media transmission
2469 for a given stream's component. This is used to force the selection of
2470 a specific remote candidate even when connectivity checks are failing
2471 (e.g. non-ICE compatible candidates).
2472 Calling this function will disable all further ICE processing
2473 (connection check, state machine updates, etc). Note that keepalives will
2474 continue to be sent.</p>
2475 <div class="refsect3">
2476 <a name="nice-agent-set-selected-remote-candidate.parameters"></a><h4>Parameters</h4>
2477 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2478 <colgroup>
2479 <col width="150px" class="parameters_name">
2480 <col class="parameters_description">
2481 <col width="200px" class="parameters_annotations">
2482 </colgroup>
2483 <tbody>
2484 <tr>
2485 <td class="parameter_name"><p>agent</p></td>
2486 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
2487 <td class="parameter_annotations"> </td>
2488 </tr>
2489 <tr>
2490 <td class="parameter_name"><p>stream_id</p></td>
2491 <td class="parameter_description"><p>The ID of the stream</p></td>
2492 <td class="parameter_annotations"> </td>
2493 </tr>
2494 <tr>
2495 <td class="parameter_name"><p>component_id</p></td>
2496 <td class="parameter_description"><p>The ID of the component</p></td>
2497 <td class="parameter_annotations"> </td>
2498 </tr>
2499 <tr>
2500 <td class="parameter_name"><p>candidate</p></td>
2501 <td class="parameter_description"><p>The <a class="link" href="NiceCandidate.html" title="NiceCandidate"><span class="type">NiceCandidate</span></a> to select</p></td>
2502 <td class="parameter_annotations"> </td>
2503 </tr>
2504 </tbody>
2505 </table></div>
2506 </div>
2507 <div class="refsect3">
2508 <a name="nice-agent-set-selected-remote-candidate.returns"></a><h4>Returns</h4>
2509 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on failure</p>
2510 </div>
2511 </div>
2512 <hr>
2513 <div class="refsect2">
2514 <a name="nice-agent-set-stream-tos"></a><h3>nice_agent_set_stream_tos ()</h3>
2515 <pre class="programlisting"><span class="returnvalue">void</span>
2516 nice_agent_set_stream_tos (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
2517                            <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
2518                            <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> tos</code></em>);</pre>
2519 <p>Sets the IP_TOS and/or IPV6_TCLASS field on the stream's sockets' options</p>
2520 <div class="refsect3">
2521 <a name="nice-agent-set-stream-tos.parameters"></a><h4>Parameters</h4>
2522 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2523 <colgroup>
2524 <col width="150px" class="parameters_name">
2525 <col class="parameters_description">
2526 <col width="200px" class="parameters_annotations">
2527 </colgroup>
2528 <tbody>
2529 <tr>
2530 <td class="parameter_name"><p>agent</p></td>
2531 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
2532 <td class="parameter_annotations"> </td>
2533 </tr>
2534 <tr>
2535 <td class="parameter_name"><p>stream_id</p></td>
2536 <td class="parameter_description"><p>The ID of the stream</p></td>
2537 <td class="parameter_annotations"> </td>
2538 </tr>
2539 <tr>
2540 <td class="parameter_name"><p>tos</p></td>
2541 <td class="parameter_description"><p>The ToS to set</p></td>
2542 <td class="parameter_annotations"> </td>
2543 </tr>
2544 </tbody>
2545 </table></div>
2546 </div>
2547 <p class="since">Since: <a class="link" href="ix06.html#api-index-0.0.9">0.0.9</a></p>
2548 </div>
2549 <hr>
2550 <div class="refsect2">
2551 <a name="nice-agent-set-software"></a><h3>nice_agent_set_software ()</h3>
2552 <pre class="programlisting"><span class="returnvalue">void</span>
2553 nice_agent_set_software (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
2554                          <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *software</code></em>);</pre>
2555 <p>This function will set the value of the SOFTWARE attribute to be added to
2556 STUN requests, responses and error responses sent during connectivity checks.</p>
2557 <p>
2558 The SOFTWARE attribute will only be added in the <a class="link" href="NiceAgent.html#NICE-COMPATIBILITY-RFC5245:CAPS"><span class="type">NICE_COMPATIBILITY_RFC5245</span></a>
2559 and <a class="link" href="NiceAgent.html#NICE-COMPATIBILITY-WLM2009:CAPS"><span class="type">NICE_COMPATIBILITY_WLM2009</span></a> compatibility modes.
2560
2561 </p>
2562 <div class="note">
2563 <p>
2564        The <em class="parameter"><code>software</code></em> argument will be appended with the libnice version before
2565        being sent.
2566      </p>
2567 <p>
2568        The <em class="parameter"><code>software</code></em> argument must be in UTF-8 encoding and only the first
2569        128 characters will be sent.
2570      </p>
2571 </div>
2572 <div class="refsect3">
2573 <a name="nice-agent-set-software.parameters"></a><h4>Parameters</h4>
2574 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2575 <colgroup>
2576 <col width="150px" class="parameters_name">
2577 <col class="parameters_description">
2578 <col width="200px" class="parameters_annotations">
2579 </colgroup>
2580 <tbody>
2581 <tr>
2582 <td class="parameter_name"><p>agent</p></td>
2583 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
2584 <td class="parameter_annotations"> </td>
2585 </tr>
2586 <tr>
2587 <td class="parameter_name"><p>software</p></td>
2588 <td class="parameter_description"><p>The value of the SOFTWARE attribute to add.</p></td>
2589 <td class="parameter_annotations"> </td>
2590 </tr>
2591 </tbody>
2592 </table></div>
2593 </div>
2594 <p class="since">Since: <a class="link" href="ix07.html#api-index-0.0.10">0.0.10</a></p>
2595 </div>
2596 <hr>
2597 <div class="refsect2">
2598 <a name="nice-agent-restart"></a><h3>nice_agent_restart ()</h3>
2599 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
2600 nice_agent_restart (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>);</pre>
2601 <p>Restarts the session as defined in ICE draft 19. This function
2602 needs to be called both when initiating (ICE spec section 9.1.1.1.
2603 "ICE Restarts"), as well as when reacting (spec section 9.2.1.1.
2604 "Detecting ICE Restart") to a restart.</p>
2605 <div class="refsect3">
2606 <a name="nice-agent-restart.parameters"></a><h4>Parameters</h4>
2607 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2608 <colgroup>
2609 <col width="150px" class="parameters_name">
2610 <col class="parameters_description">
2611 <col width="200px" class="parameters_annotations">
2612 </colgroup>
2613 <tbody><tr>
2614 <td class="parameter_name"><p>agent</p></td>
2615 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
2616 <td class="parameter_annotations"> </td>
2617 </tr></tbody>
2618 </table></div>
2619 </div>
2620 <div class="refsect3">
2621 <a name="nice-agent-restart.returns"></a><h4>Returns</h4>
2622 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error</p>
2623 </div>
2624 </div>
2625 <hr>
2626 <div class="refsect2">
2627 <a name="nice-agent-restart-stream"></a><h3>nice_agent_restart_stream ()</h3>
2628 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
2629 nice_agent_restart_stream (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
2630                            <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>);</pre>
2631 <p>Restarts a single stream as defined in RFC 5245. This function
2632 needs to be called both when initiating (ICE spec section 9.1.1.1.
2633 "ICE Restarts"), as well as when reacting (spec section 9.2.1.1.
2634 "Detecting ICE Restart") to a restart.</p>
2635 <p>Unlike <a class="link" href="NiceAgent.html#nice-agent-restart" title="nice_agent_restart ()"><code class="function">nice_agent_restart()</code></a>, this applies to a single stream. It also
2636 does not generate a new tie breaker.</p>
2637 <div class="refsect3">
2638 <a name="nice-agent-restart-stream.parameters"></a><h4>Parameters</h4>
2639 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2640 <colgroup>
2641 <col width="150px" class="parameters_name">
2642 <col class="parameters_description">
2643 <col width="200px" class="parameters_annotations">
2644 </colgroup>
2645 <tbody>
2646 <tr>
2647 <td class="parameter_name"><p>agent</p></td>
2648 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
2649 <td class="parameter_annotations"> </td>
2650 </tr>
2651 <tr>
2652 <td class="parameter_name"><p>stream_id</p></td>
2653 <td class="parameter_description"><p>The ID of the stream</p></td>
2654 <td class="parameter_annotations"> </td>
2655 </tr>
2656 </tbody>
2657 </table></div>
2658 </div>
2659 <div class="refsect3">
2660 <a name="nice-agent-restart-stream.returns"></a><h4>Returns</h4>
2661 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on error</p>
2662 </div>
2663 <p class="since">Since: <a class="link" href="ix11.html#api-index-0.1.6">0.1.6</a></p>
2664 </div>
2665 <hr>
2666 <div class="refsect2">
2667 <a name="nice-agent-set-stream-name"></a><h3>nice_agent_set_stream_name ()</h3>
2668 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
2669 nice_agent_set_stream_name (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
2670                             <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
2671                             <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
2672 <p>This function will assign a media type to a stream. The only values
2673 that can be used to produce a valid SDP are: "audio", "video",
2674 "text", "application", "image" and "message".</p>
2675 <p>This is only useful when parsing and generating an SDP of the
2676 candidates.</p>
2677 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-generate-local-sdp" title="nice_agent_generate_local_sdp ()"><code class="function">nice_agent_generate_local_sdp()</code></a></p>
2678 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-parse-remote-sdp" title="nice_agent_parse_remote_sdp ()"><code class="function">nice_agent_parse_remote_sdp()</code></a></p>
2679 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-get-stream-name" title="nice_agent_get_stream_name ()"><code class="function">nice_agent_get_stream_name()</code></a></p>
2680 <div class="refsect3">
2681 <a name="nice-agent-set-stream-name.parameters"></a><h4>Parameters</h4>
2682 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2683 <colgroup>
2684 <col width="150px" class="parameters_name">
2685 <col class="parameters_description">
2686 <col width="200px" class="parameters_annotations">
2687 </colgroup>
2688 <tbody>
2689 <tr>
2690 <td class="parameter_name"><p>agent</p></td>
2691 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
2692 <td class="parameter_annotations"> </td>
2693 </tr>
2694 <tr>
2695 <td class="parameter_name"><p>stream_id</p></td>
2696 <td class="parameter_description"><p>The ID of the stream to change</p></td>
2697 <td class="parameter_annotations"> </td>
2698 </tr>
2699 <tr>
2700 <td class="parameter_name"><p>name</p></td>
2701 <td class="parameter_description"><p>The new name of the stream or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
2702 <td class="parameter_annotations"> </td>
2703 </tr>
2704 </tbody>
2705 </table></div>
2706 </div>
2707 <div class="refsect3">
2708 <a name="nice-agent-set-stream-name.returns"></a><h4>Returns</h4>
2709 <p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the name has been set. <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> in case of error
2710 (invalid stream or duplicate name).</p>
2711 </div>
2712 <p class="since">Since: <a class="link" href="ix09.html#api-index-0.1.4">0.1.4</a></p>
2713 </div>
2714 <hr>
2715 <div class="refsect2">
2716 <a name="nice-agent-get-stream-name"></a><h3>nice_agent_get_stream_name ()</h3>
2717 <pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
2718 nice_agent_get_stream_name (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
2719                             <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>);</pre>
2720 <p>This function will return the name assigned to a stream.</p>
2721 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-set-stream-name" title="nice_agent_set_stream_name ()"><code class="function">nice_agent_set_stream_name()</code></a></p>
2722 <div class="refsect3">
2723 <a name="nice-agent-get-stream-name.parameters"></a><h4>Parameters</h4>
2724 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2725 <colgroup>
2726 <col width="150px" class="parameters_name">
2727 <col class="parameters_description">
2728 <col width="200px" class="parameters_annotations">
2729 </colgroup>
2730 <tbody>
2731 <tr>
2732 <td class="parameter_name"><p>agent</p></td>
2733 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
2734 <td class="parameter_annotations"> </td>
2735 </tr>
2736 <tr>
2737 <td class="parameter_name"><p>stream_id</p></td>
2738 <td class="parameter_description"><p>The ID of the stream to change</p></td>
2739 <td class="parameter_annotations"> </td>
2740 </tr>
2741 </tbody>
2742 </table></div>
2743 </div>
2744 <div class="refsect3">
2745 <a name="nice-agent-get-stream-name.returns"></a><h4>Returns</h4>
2746 <p> The name of the stream. The name is only valid while the stream
2747 exists or until it changes through a call to <a class="link" href="NiceAgent.html#nice-agent-set-stream-name" title="nice_agent_set_stream_name ()"><code class="function">nice_agent_set_stream_name()</code></a>.</p>
2748 </div>
2749 <p class="since">Since: <a class="link" href="ix09.html#api-index-0.1.4">0.1.4</a></p>
2750 </div>
2751 <hr>
2752 <div class="refsect2">
2753 <a name="nice-agent-get-default-local-candidate"></a><h3>nice_agent_get_default_local_candidate ()</h3>
2754 <pre class="programlisting"><a class="link" href="NiceCandidate.html" title="NiceCandidate"><span class="returnvalue">NiceCandidate</span></a> *
2755 nice_agent_get_default_local_candidate
2756                                (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
2757                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
2758                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>);</pre>
2759 <p>This helper function will return the recommended default candidate to be
2760 used for non-ICE compatible clients. This will usually be the candidate
2761 with the lowest priority, since it will be the longest path but the one with
2762 the most chances of success.</p>
2763 <div class="note"><p>
2764      This function is only useful in order to manually generate the
2765      local SDP
2766      </p></div>
2767 <div class="refsect3">
2768 <a name="nice-agent-get-default-local-candidate.parameters"></a><h4>Parameters</h4>
2769 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2770 <colgroup>
2771 <col width="150px" class="parameters_name">
2772 <col class="parameters_description">
2773 <col width="200px" class="parameters_annotations">
2774 </colgroup>
2775 <tbody>
2776 <tr>
2777 <td class="parameter_name"><p>agent</p></td>
2778 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
2779 <td class="parameter_annotations"> </td>
2780 </tr>
2781 <tr>
2782 <td class="parameter_name"><p>stream_id</p></td>
2783 <td class="parameter_description"><p>The ID of the stream</p></td>
2784 <td class="parameter_annotations"> </td>
2785 </tr>
2786 <tr>
2787 <td class="parameter_name"><p>component_id</p></td>
2788 <td class="parameter_description"><p>The ID of the component</p></td>
2789 <td class="parameter_annotations"> </td>
2790 </tr>
2791 </tbody>
2792 </table></div>
2793 </div>
2794 <div class="refsect3">
2795 <a name="nice-agent-get-default-local-candidate.returns"></a><h4>Returns</h4>
2796 <p> The candidate to be used as the default candidate, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> in case
2797 of error. Must be freed with <a class="link" href="NiceCandidate.html#nice-candidate-free" title="nice_candidate_free ()"><code class="function">nice_candidate_free()</code></a> once done.</p>
2798 </div>
2799 </div>
2800 <hr>
2801 <div class="refsect2">
2802 <a name="nice-agent-generate-local-sdp"></a><h3>nice_agent_generate_local_sdp ()</h3>
2803 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
2804 nice_agent_generate_local_sdp (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>);</pre>
2805 <p>Generate an SDP string containing the local candidates and credentials for
2806 all streams and components in the agent.</p>
2807 <div class="note">
2808 <p>
2809      The SDP will not contain any codec lines and the 'm' line will not list
2810      any payload types.
2811    </p>
2812 <p>
2813     It is highly recommended to set names on the streams prior to calling this
2814     function. Unnamed streams will show up as '-' in the 'm' line, but the SDP
2815     will not be parseable with <a class="link" href="NiceAgent.html#nice-agent-parse-remote-sdp" title="nice_agent_parse_remote_sdp ()"><code class="function">nice_agent_parse_remote_sdp()</code></a> if a stream is
2816     unnamed.
2817    </p>
2818 <p>
2819      The default candidate in the SDP will be selected based on the lowest
2820      priority candidate for the first component.
2821    </p>
2822 </div>
2823 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-set-stream-name" title="nice_agent_set_stream_name ()"><code class="function">nice_agent_set_stream_name()</code></a> </p>
2824 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-parse-remote-sdp" title="nice_agent_parse_remote_sdp ()"><code class="function">nice_agent_parse_remote_sdp()</code></a> </p>
2825 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-generate-local-stream-sdp" title="nice_agent_generate_local_stream_sdp ()"><code class="function">nice_agent_generate_local_stream_sdp()</code></a> </p>
2826 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-generate-local-candidate-sdp" title="nice_agent_generate_local_candidate_sdp ()"><code class="function">nice_agent_generate_local_candidate_sdp()</code></a> </p>
2827 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-get-default-local-candidate" title="nice_agent_get_default_local_candidate ()"><code class="function">nice_agent_get_default_local_candidate()</code></a> </p>
2828 <div class="refsect3">
2829 <a name="nice-agent-generate-local-sdp.parameters"></a><h4>Parameters</h4>
2830 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2831 <colgroup>
2832 <col width="150px" class="parameters_name">
2833 <col class="parameters_description">
2834 <col width="200px" class="parameters_annotations">
2835 </colgroup>
2836 <tbody><tr>
2837 <td class="parameter_name"><p>agent</p></td>
2838 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
2839 <td class="parameter_annotations"> </td>
2840 </tr></tbody>
2841 </table></div>
2842 </div>
2843 <div class="refsect3">
2844 <a name="nice-agent-generate-local-sdp.returns"></a><h4>Returns</h4>
2845 <p> A string representing the local SDP. Must be freed with <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>
2846 once done.</p>
2847 </div>
2848 <p class="since">Since: <a class="link" href="ix09.html#api-index-0.1.4">0.1.4</a></p>
2849 </div>
2850 <hr>
2851 <div class="refsect2">
2852 <a name="nice-agent-generate-local-stream-sdp"></a><h3>nice_agent_generate_local_stream_sdp ()</h3>
2853 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
2854 nice_agent_generate_local_stream_sdp (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
2855                                       <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
2856                                       <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> include_non_ice</code></em>);</pre>
2857 <p>Generate an SDP string containing the local candidates and credentials
2858 for a stream.</p>
2859 <div class="note">
2860 <p>
2861      The SDP will not contain any codec lines and the 'm' line will not list
2862      any payload types.
2863    </p>
2864 <p>
2865     It is highly recommended to set the name of the stream prior to calling this
2866     function. Unnamed streams will show up as '-' in the 'm' line.
2867    </p>
2868 <p>
2869      The default candidate in the SDP will be selected based on the lowest
2870      priority candidate.
2871    </p>
2872 </div>
2873 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-set-stream-name" title="nice_agent_set_stream_name ()"><code class="function">nice_agent_set_stream_name()</code></a> </p>
2874 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-parse-remote-stream-sdp" title="nice_agent_parse_remote_stream_sdp ()"><code class="function">nice_agent_parse_remote_stream_sdp()</code></a> </p>
2875 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-generate-local-sdp" title="nice_agent_generate_local_sdp ()"><code class="function">nice_agent_generate_local_sdp()</code></a> </p>
2876 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-generate-local-candidate-sdp" title="nice_agent_generate_local_candidate_sdp ()"><code class="function">nice_agent_generate_local_candidate_sdp()</code></a> </p>
2877 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-get-default-local-candidate" title="nice_agent_get_default_local_candidate ()"><code class="function">nice_agent_get_default_local_candidate()</code></a> </p>
2878 <div class="refsect3">
2879 <a name="nice-agent-generate-local-stream-sdp.parameters"></a><h4>Parameters</h4>
2880 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2881 <colgroup>
2882 <col width="150px" class="parameters_name">
2883 <col class="parameters_description">
2884 <col width="200px" class="parameters_annotations">
2885 </colgroup>
2886 <tbody>
2887 <tr>
2888 <td class="parameter_name"><p>agent</p></td>
2889 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
2890 <td class="parameter_annotations"> </td>
2891 </tr>
2892 <tr>
2893 <td class="parameter_name"><p>stream_id</p></td>
2894 <td class="parameter_description"><p>The ID of the stream</p></td>
2895 <td class="parameter_annotations"> </td>
2896 </tr>
2897 <tr>
2898 <td class="parameter_name"><p>include_non_ice</p></td>
2899 <td class="parameter_description"><p>Whether or not to include non ICE specific lines
2900 (m=, c= and a=rtcp: lines)</p></td>
2901 <td class="parameter_annotations"> </td>
2902 </tr>
2903 </tbody>
2904 </table></div>
2905 </div>
2906 <div class="refsect3">
2907 <a name="nice-agent-generate-local-stream-sdp.returns"></a><h4>Returns</h4>
2908 <p> A string representing the local SDP for the stream. Must be freed
2909 with <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> once done.</p>
2910 </div>
2911 <p class="since">Since: <a class="link" href="ix09.html#api-index-0.1.4">0.1.4</a></p>
2912 </div>
2913 <hr>
2914 <div class="refsect2">
2915 <a name="nice-agent-generate-local-candidate-sdp"></a><h3>nice_agent_generate_local_candidate_sdp ()</h3>
2916 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
2917 nice_agent_generate_local_candidate_sdp
2918                                (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
2919                                 <em class="parameter"><code><a class="link" href="NiceCandidate.html" title="NiceCandidate"><span class="type">NiceCandidate</span></a> *candidate</code></em>);</pre>
2920 <p>Generate an SDP string representing a local candidate.</p>
2921 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-parse-remote-candidate-sdp" title="nice_agent_parse_remote_candidate_sdp ()"><code class="function">nice_agent_parse_remote_candidate_sdp()</code></a> </p>
2922 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-generate-local-sdp" title="nice_agent_generate_local_sdp ()"><code class="function">nice_agent_generate_local_sdp()</code></a> </p>
2923 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-generate-local-stream-sdp" title="nice_agent_generate_local_stream_sdp ()"><code class="function">nice_agent_generate_local_stream_sdp()</code></a> </p>
2924 <div class="refsect3">
2925 <a name="nice-agent-generate-local-candidate-sdp.parameters"></a><h4>Parameters</h4>
2926 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2927 <colgroup>
2928 <col width="150px" class="parameters_name">
2929 <col class="parameters_description">
2930 <col width="200px" class="parameters_annotations">
2931 </colgroup>
2932 <tbody>
2933 <tr>
2934 <td class="parameter_name"><p>agent</p></td>
2935 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
2936 <td class="parameter_annotations"> </td>
2937 </tr>
2938 <tr>
2939 <td class="parameter_name"><p>candidate</p></td>
2940 <td class="parameter_description"><p>The candidate to generate</p></td>
2941 <td class="parameter_annotations"> </td>
2942 </tr>
2943 </tbody>
2944 </table></div>
2945 </div>
2946 <div class="refsect3">
2947 <a name="nice-agent-generate-local-candidate-sdp.returns"></a><h4>Returns</h4>
2948 <p> A string representing the SDP for the candidate. Must be freed
2949 with <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> once done.</p>
2950 </div>
2951 <p class="since">Since: <a class="link" href="ix09.html#api-index-0.1.4">0.1.4</a></p>
2952 </div>
2953 <hr>
2954 <div class="refsect2">
2955 <a name="nice-agent-parse-remote-sdp"></a><h3>nice_agent_parse_remote_sdp ()</h3>
2956 <pre class="programlisting"><span class="returnvalue">int</span>
2957 nice_agent_parse_remote_sdp (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
2958                              <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sdp</code></em>);</pre>
2959 <p>Parse an SDP string and extracts candidates and credentials from it and sets
2960 them on the agent.</p>
2961 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-set-stream-name" title="nice_agent_set_stream_name ()"><code class="function">nice_agent_set_stream_name()</code></a> </p>
2962 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-generate-local-sdp" title="nice_agent_generate_local_sdp ()"><code class="function">nice_agent_generate_local_sdp()</code></a> </p>
2963 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-parse-remote-stream-sdp" title="nice_agent_parse_remote_stream_sdp ()"><code class="function">nice_agent_parse_remote_stream_sdp()</code></a> </p>
2964 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-parse-remote-candidate-sdp" title="nice_agent_parse_remote_candidate_sdp ()"><code class="function">nice_agent_parse_remote_candidate_sdp()</code></a> </p>
2965 <div class="refsect3">
2966 <a name="nice-agent-parse-remote-sdp.parameters"></a><h4>Parameters</h4>
2967 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2968 <colgroup>
2969 <col width="150px" class="parameters_name">
2970 <col class="parameters_description">
2971 <col width="200px" class="parameters_annotations">
2972 </colgroup>
2973 <tbody>
2974 <tr>
2975 <td class="parameter_name"><p>agent</p></td>
2976 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
2977 <td class="parameter_annotations"> </td>
2978 </tr>
2979 <tr>
2980 <td class="parameter_name"><p>sdp</p></td>
2981 <td class="parameter_description"><p>The remote SDP to parse</p></td>
2982 <td class="parameter_annotations"> </td>
2983 </tr>
2984 </tbody>
2985 </table></div>
2986 </div>
2987 <div class="refsect3">
2988 <a name="nice-agent-parse-remote-sdp.returns"></a><h4>Returns</h4>
2989 <p> The number of candidates added, negative on errors</p>
2990 </div>
2991 <p class="since">Since: <a class="link" href="ix09.html#api-index-0.1.4">0.1.4</a></p>
2992 </div>
2993 <hr>
2994 <div class="refsect2">
2995 <a name="nice-agent-parse-remote-stream-sdp"></a><h3>nice_agent_parse_remote_stream_sdp ()</h3>
2996 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> *
2997 nice_agent_parse_remote_stream_sdp (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
2998                                     <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
2999                                     <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sdp</code></em>,
3000                                     <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **ufrag</code></em>,
3001                                     <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **pwd</code></em>);</pre>
3002 <p>Parse an SDP string representing a single stream and extracts candidates
3003 and credentials from it.</p>
3004 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-generate-local-stream-sdp" title="nice_agent_generate_local_stream_sdp ()"><code class="function">nice_agent_generate_local_stream_sdp()</code></a> </p>
3005 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-parse-remote-sdp" title="nice_agent_parse_remote_sdp ()"><code class="function">nice_agent_parse_remote_sdp()</code></a> </p>
3006 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-parse-remote-candidate-sdp" title="nice_agent_parse_remote_candidate_sdp ()"><code class="function">nice_agent_parse_remote_candidate_sdp()</code></a> </p>
3007 <div class="refsect3">
3008 <a name="nice-agent-parse-remote-stream-sdp.parameters"></a><h4>Parameters</h4>
3009 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3010 <colgroup>
3011 <col width="150px" class="parameters_name">
3012 <col class="parameters_description">
3013 <col width="200px" class="parameters_annotations">
3014 </colgroup>
3015 <tbody>
3016 <tr>
3017 <td class="parameter_name"><p>agent</p></td>
3018 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
3019 <td class="parameter_annotations"> </td>
3020 </tr>
3021 <tr>
3022 <td class="parameter_name"><p>stream_id</p></td>
3023 <td class="parameter_description"><p>The ID of the stream to parse</p></td>
3024 <td class="parameter_annotations"> </td>
3025 </tr>
3026 <tr>
3027 <td class="parameter_name"><p>sdp</p></td>
3028 <td class="parameter_description"><p>The remote SDP to parse</p></td>
3029 <td class="parameter_annotations"> </td>
3030 </tr>
3031 <tr>
3032 <td class="parameter_name"><p>ufrag</p></td>
3033 <td class="parameter_description"><p>Pointer to store the ice ufrag if non <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. Must be freed with
3034 <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> after use</p></td>
3035 <td class="parameter_annotations"> </td>
3036 </tr>
3037 <tr>
3038 <td class="parameter_name"><p>pwd</p></td>
3039 <td class="parameter_description"><p>Pointer to store the ice password if non <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. Must be freed with
3040 <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> after use</p></td>
3041 <td class="parameter_annotations"> </td>
3042 </tr>
3043 </tbody>
3044 </table></div>
3045 </div>
3046 <div class="refsect3">
3047 <a name="nice-agent-parse-remote-stream-sdp.returns"></a><h4>Returns</h4>
3048 <p>A <a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> of
3049 candidates parsed from the SDP, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> in case of errors. </p>
3050 <p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> NiceCandidate][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
3051 </div>
3052 <p class="since">Since: <a class="link" href="ix09.html#api-index-0.1.4">0.1.4</a></p>
3053 </div>
3054 <hr>
3055 <div class="refsect2">
3056 <a name="nice-agent-parse-remote-candidate-sdp"></a><h3>nice_agent_parse_remote_candidate_sdp ()</h3>
3057 <pre class="programlisting"><a class="link" href="NiceCandidate.html" title="NiceCandidate"><span class="returnvalue">NiceCandidate</span></a> *
3058 nice_agent_parse_remote_candidate_sdp (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
3059                                        <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
3060                                        <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *sdp</code></em>);</pre>
3061 <p>Parse an SDP string and extracts the candidate from it.</p>
3062 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-generate-local-candidate-sdp" title="nice_agent_generate_local_candidate_sdp ()"><code class="function">nice_agent_generate_local_candidate_sdp()</code></a> </p>
3063 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-parse-remote-sdp" title="nice_agent_parse_remote_sdp ()"><code class="function">nice_agent_parse_remote_sdp()</code></a> </p>
3064 <p>See also: <a class="link" href="NiceAgent.html#nice-agent-parse-remote-stream-sdp" title="nice_agent_parse_remote_stream_sdp ()"><code class="function">nice_agent_parse_remote_stream_sdp()</code></a> </p>
3065 <div class="refsect3">
3066 <a name="nice-agent-parse-remote-candidate-sdp.parameters"></a><h4>Parameters</h4>
3067 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3068 <colgroup>
3069 <col width="150px" class="parameters_name">
3070 <col class="parameters_description">
3071 <col width="200px" class="parameters_annotations">
3072 </colgroup>
3073 <tbody>
3074 <tr>
3075 <td class="parameter_name"><p>agent</p></td>
3076 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
3077 <td class="parameter_annotations"> </td>
3078 </tr>
3079 <tr>
3080 <td class="parameter_name"><p>stream_id</p></td>
3081 <td class="parameter_description"><p>The ID of the stream the candidate belongs to</p></td>
3082 <td class="parameter_annotations"> </td>
3083 </tr>
3084 <tr>
3085 <td class="parameter_name"><p>sdp</p></td>
3086 <td class="parameter_description"><p>The remote SDP to parse</p></td>
3087 <td class="parameter_annotations"> </td>
3088 </tr>
3089 </tbody>
3090 </table></div>
3091 </div>
3092 <div class="refsect3">
3093 <a name="nice-agent-parse-remote-candidate-sdp.returns"></a><h4>Returns</h4>
3094 <p> The parsed candidate or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there was an error.</p>
3095 </div>
3096 <p class="since">Since: <a class="link" href="ix09.html#api-index-0.1.4">0.1.4</a></p>
3097 </div>
3098 <hr>
3099 <div class="refsect2">
3100 <a name="nice-agent-get-io-stream"></a><h3>nice_agent_get_io_stream ()</h3>
3101 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/gio/GIOStream.html#GIOStream-struct"><span class="returnvalue">GIOStream</span></a> *
3102 nice_agent_get_io_stream (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
3103                           <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
3104                           <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>);</pre>
3105 <p>Gets a <a href="/usr/share/gtk-doc/html/gio/GIOStream.html#GIOStream-struct"><span class="type">GIOStream</span></a> wrapper around the given stream and component in
3106 <em class="parameter"><code>agent</code></em>
3107 . The I/O stream will be valid for as long as <em class="parameter"><code>stream_id</code></em>
3108  is valid.
3109 The <a href="/usr/share/gtk-doc/html/gio/GInputStream.html#GInputStream-struct"><span class="type">GInputStream</span></a> and <a href="/usr/share/gtk-doc/html/gio/GOutputStream.html#GOutputStream-struct"><span class="type">GOutputStream</span></a> implement <a href="/usr/share/gtk-doc/html/gio/GPollableInputStream.html#GPollableInputStream-struct"><span class="type">GPollableInputStream</span></a> and
3110 <a href="/usr/share/gtk-doc/html/gio/GPollableOutputStream.html#GPollableOutputStream-struct"><span class="type">GPollableOutputStream</span></a>.</p>
3111 <p>This function may only be called on reliable <a href="NiceAgent.html#NiceAgent-struct"><span class="type">NiceAgents</span></a>. It is a
3112 programming error to try and create an I/O stream wrapper for an
3113 unreliable stream.</p>
3114 <div class="refsect3">
3115 <a name="nice-agent-get-io-stream.parameters"></a><h4>Parameters</h4>
3116 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3117 <colgroup>
3118 <col width="150px" class="parameters_name">
3119 <col class="parameters_description">
3120 <col width="200px" class="parameters_annotations">
3121 </colgroup>
3122 <tbody>
3123 <tr>
3124 <td class="parameter_name"><p>agent</p></td>
3125 <td class="parameter_description"><p>A <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a></p></td>
3126 <td class="parameter_annotations"> </td>
3127 </tr>
3128 <tr>
3129 <td class="parameter_name"><p>stream_id</p></td>
3130 <td class="parameter_description"><p>The ID of the stream to wrap</p></td>
3131 <td class="parameter_annotations"> </td>
3132 </tr>
3133 <tr>
3134 <td class="parameter_name"><p>component_id</p></td>
3135 <td class="parameter_description"><p>The ID of the component to wrap</p></td>
3136 <td class="parameter_annotations"> </td>
3137 </tr>
3138 </tbody>
3139 </table></div>
3140 </div>
3141 <div class="refsect3">
3142 <a name="nice-agent-get-io-stream.returns"></a><h4>Returns</h4>
3143 <p>A <a href="/usr/share/gtk-doc/html/gio/GIOStream.html#GIOStream-struct"><span class="type">GIOStream</span></a>. </p>
3144 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
3145 </div>
3146 <p class="since">Since: <a class="link" href="ix10.html#api-index-0.1.5">0.1.5</a></p>
3147 </div>
3148 <hr>
3149 <div class="refsect2">
3150 <a name="nice-agent-get-selected-socket"></a><h3>nice_agent_get_selected_socket ()</h3>
3151 <pre class="programlisting"><a href="/usr/share/gtk-doc/html/gio/GSocket.html#GSocket-struct"><span class="returnvalue">GSocket</span></a> *
3152 nice_agent_get_selected_socket (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
3153                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
3154                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>);</pre>
3155 <p>Retreive the local socket associated with the selected candidate pair
3156 for media transmission for a given stream's component.</p>
3157 <p>This is useful for adding ICE support to legacy applications that already
3158 have a protocol that maintains a connection. If the socket is duplicated
3159 before unrefing the agent, the application can take over and continue to use
3160 it. New applications are encouraged to use the built in libnice stream
3161 handling instead and let libnice handle the connection maintenance.</p>
3162 <p>Users of this method are encouraged to not use a TURN relay or any kind
3163 of proxy, as in this case, the socket will not be available to the
3164 application because the packets are encapsulated.</p>
3165 <div class="refsect3">
3166 <a name="nice-agent-get-selected-socket.parameters"></a><h4>Parameters</h4>
3167 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3168 <colgroup>
3169 <col width="150px" class="parameters_name">
3170 <col class="parameters_description">
3171 <col width="200px" class="parameters_annotations">
3172 </colgroup>
3173 <tbody>
3174 <tr>
3175 <td class="parameter_name"><p>agent</p></td>
3176 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
3177 <td class="parameter_annotations"> </td>
3178 </tr>
3179 <tr>
3180 <td class="parameter_name"><p>stream_id</p></td>
3181 <td class="parameter_description"><p>The ID of the stream</p></td>
3182 <td class="parameter_annotations"> </td>
3183 </tr>
3184 <tr>
3185 <td class="parameter_name"><p>component_id</p></td>
3186 <td class="parameter_description"><p>The ID of the component</p></td>
3187 <td class="parameter_annotations"> </td>
3188 </tr>
3189 </tbody>
3190 </table></div>
3191 </div>
3192 <div class="refsect3">
3193 <a name="nice-agent-get-selected-socket.returns"></a><h4>Returns</h4>
3194 <p>pointer to the <a href="/usr/share/gtk-doc/html/gio/GSocket.html#GSocket-struct"><span class="type">GSocket</span></a>, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if
3195 there is no selected candidate or if the selected candidate is a relayed
3196 candidate. </p>
3197 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
3198 </div>
3199 <p class="since">Since: <a class="link" href="ix10.html#api-index-0.1.5">0.1.5</a></p>
3200 </div>
3201 <hr>
3202 <div class="refsect2">
3203 <a name="nice-agent-get-component-state"></a><h3>nice_agent_get_component_state ()</h3>
3204 <pre class="programlisting"><a class="link" href="NiceAgent.html#NiceComponentState" title="enum NiceComponentState"><span class="returnvalue">NiceComponentState</span></a>
3205 nice_agent_get_component_state (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
3206                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> stream_id</code></em>,
3207                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> component_id</code></em>);</pre>
3208 <p>Retrieves the current state of a component.</p>
3209 <div class="refsect3">
3210 <a name="nice-agent-get-component-state.parameters"></a><h4>Parameters</h4>
3211 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3212 <colgroup>
3213 <col width="150px" class="parameters_name">
3214 <col class="parameters_description">
3215 <col width="200px" class="parameters_annotations">
3216 </colgroup>
3217 <tbody>
3218 <tr>
3219 <td class="parameter_name"><p>agent</p></td>
3220 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> Object</p></td>
3221 <td class="parameter_annotations"> </td>
3222 </tr>
3223 <tr>
3224 <td class="parameter_name"><p>stream_id</p></td>
3225 <td class="parameter_description"><p>The ID of the stream</p></td>
3226 <td class="parameter_annotations"> </td>
3227 </tr>
3228 <tr>
3229 <td class="parameter_name"><p>component_id</p></td>
3230 <td class="parameter_description"><p>The ID of the component</p></td>
3231 <td class="parameter_annotations"> </td>
3232 </tr>
3233 </tbody>
3234 </table></div>
3235 </div>
3236 <div class="refsect3">
3237 <a name="nice-agent-get-component-state.returns"></a><h4>Returns</h4>
3238 <p> the <a class="link" href="NiceAgent.html#NiceComponentState" title="enum NiceComponentState"><span class="type">NiceComponentState</span></a> of the component and
3239 <a class="link" href="NiceAgent.html#NICE-COMPONENT-STATE-FAILED:CAPS"><code class="literal">NICE_COMPONENT_STATE_FAILED</code></a> if the component was invalid.</p>
3240 </div>
3241 <p class="since">Since: <a class="link" href="ix12.html#api-index-0.1.8">0.1.8</a></p>
3242 </div>
3243 <hr>
3244 <div class="refsect2">
3245 <a name="nice-agent-close-async"></a><h3>nice_agent_close_async ()</h3>
3246 <pre class="programlisting"><span class="returnvalue">void</span>
3247 nice_agent_close_async (<em class="parameter"><code><a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent</code></em>,
3248                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gio/GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
3249                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> callback_data</code></em>);</pre>
3250 <p>Asynchronously closes resources the agent has allocated on remote servers.</p>
3251 <p>The agent will call the callback in the current <a href="/usr/share/gtk-doc/html/glib/glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> in
3252 which this function is called. The <a href="/usr/share/gtk-doc/html/gio/GAsyncResult.html#GAsyncResult-struct"><span class="type">GAsyncResult</span></a> in the callback
3253 can be ignored as this operation never fails.</p>
3254 <p>Calling this function before freeing the agent makes sure the allocated relay
3255 ports aren't left behind on TURN server but properly removed.</p>
3256 <div class="refsect3">
3257 <a name="nice-agent-close-async.parameters"></a><h4>Parameters</h4>
3258 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3259 <colgroup>
3260 <col width="150px" class="parameters_name">
3261 <col class="parameters_description">
3262 <col width="200px" class="parameters_annotations">
3263 </colgroup>
3264 <tbody>
3265 <tr>
3266 <td class="parameter_name"><p>agent</p></td>
3267 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object</p></td>
3268 <td class="parameter_annotations"> </td>
3269 </tr>
3270 <tr>
3271 <td class="parameter_name"><p>callback</p></td>
3272 <td class="parameter_description"><p>A callback that will be called when the closing is
3273 complete. </p></td>
3274 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
3275 </tr>
3276 <tr>
3277 <td class="parameter_name"><p>callback_data</p></td>
3278 <td class="parameter_description"><p>A pointer that will be passed to the callback. </p></td>
3279 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
3280 </tr>
3281 </tbody>
3282 </table></div>
3283 </div>
3284 <p class="since">Since: <a class="link" href="ix15.html#api-index-0.1.16">0.1.16</a></p>
3285 </div>
3286 <hr>
3287 <div class="refsect2">
3288 <a name="nice-component-state-to-string"></a><h3>nice_component_state_to_string ()</h3>
3289 <pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
3290 nice_component_state_to_string (<em class="parameter"><code><a class="link" href="NiceAgent.html#NiceComponentState" title="enum NiceComponentState"><span class="type">NiceComponentState</span></a> state</code></em>);</pre>
3291 <p>Returns a string representation of the state, generally to use in debug
3292 messages.</p>
3293 <div class="refsect3">
3294 <a name="nice-component-state-to-string.parameters"></a><h4>Parameters</h4>
3295 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3296 <colgroup>
3297 <col width="150px" class="parameters_name">
3298 <col class="parameters_description">
3299 <col width="200px" class="parameters_annotations">
3300 </colgroup>
3301 <tbody><tr>
3302 <td class="parameter_name"><p>state</p></td>
3303 <td class="parameter_description"><p>a <a class="link" href="NiceAgent.html#NiceComponentState" title="enum NiceComponentState"><span class="type">NiceComponentState</span></a></p></td>
3304 <td class="parameter_annotations"> </td>
3305 </tr></tbody>
3306 </table></div>
3307 </div>
3308 <div class="refsect3">
3309 <a name="nice-component-state-to-string.returns"></a><h4>Returns</h4>
3310 <p>a string representation of <em class="parameter"><code>state</code></em>
3311 . </p>
3312 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
3313 </div>
3314 <p class="since">Since: <a class="link" href="ix11.html#api-index-0.1.6">0.1.6</a></p>
3315 </div>
3316 </div>
3317 <div class="refsect1">
3318 <a name="NiceAgent.other_details"></a><h2>Types and Values</h2>
3319 <div class="refsect2">
3320 <a name="NiceAgent-struct"></a><h3>NiceAgent</h3>
3321 <pre class="programlisting">typedef struct _NiceAgent NiceAgent;</pre>
3322 <p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> is the main GObject of the libnice library and represents
3323 the ICE agent.</p>
3324 </div>
3325 <hr>
3326 <div class="refsect2">
3327 <a name="NiceComponentState"></a><h3>enum NiceComponentState</h3>
3328 <p>An enum representing the state of a component.</p>
3329 <p> See also: <a class="link" href="NiceAgent.html#NiceAgent-component-state-changed" title="The “component-state-changed” signal"><span class="type">“component-state-changed”</span></a> </p>
3330 <div class="refsect3">
3331 <a name="NiceComponentState.members"></a><h4>Members</h4>
3332 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3333 <colgroup>
3334 <col width="300px" class="enum_members_name">
3335 <col class="enum_members_description">
3336 <col width="200px" class="enum_members_annotations">
3337 </colgroup>
3338 <tbody>
3339 <tr>
3340 <td class="enum_member_name"><p><a name="NICE-COMPONENT-STATE-DISCONNECTED:CAPS"></a>NICE_COMPONENT_STATE_DISCONNECTED</p></td>
3341 <td class="enum_member_description">
3342 <p>No activity scheduled</p>
3343 </td>
3344 <td class="enum_member_annotations"> </td>
3345 </tr>
3346 <tr>
3347 <td class="enum_member_name"><p><a name="NICE-COMPONENT-STATE-GATHERING:CAPS"></a>NICE_COMPONENT_STATE_GATHERING</p></td>
3348 <td class="enum_member_description">
3349 <p>Gathering local candidates</p>
3350 </td>
3351 <td class="enum_member_annotations"> </td>
3352 </tr>
3353 <tr>
3354 <td class="enum_member_name"><p><a name="NICE-COMPONENT-STATE-CONNECTING:CAPS"></a>NICE_COMPONENT_STATE_CONNECTING</p></td>
3355 <td class="enum_member_description">
3356 <p>Establishing connectivity</p>
3357 </td>
3358 <td class="enum_member_annotations"> </td>
3359 </tr>
3360 <tr>
3361 <td class="enum_member_name"><p><a name="NICE-COMPONENT-STATE-CONNECTED:CAPS"></a>NICE_COMPONENT_STATE_CONNECTED</p></td>
3362 <td class="enum_member_description">
3363 <p>At least one working candidate pair</p>
3364 </td>
3365 <td class="enum_member_annotations"> </td>
3366 </tr>
3367 <tr>
3368 <td class="enum_member_name"><p><a name="NICE-COMPONENT-STATE-READY:CAPS"></a>NICE_COMPONENT_STATE_READY</p></td>
3369 <td class="enum_member_description">
3370 <p>ICE concluded, candidate pair selection
3371 is now final</p>
3372 </td>
3373 <td class="enum_member_annotations"> </td>
3374 </tr>
3375 <tr>
3376 <td class="enum_member_name"><p><a name="NICE-COMPONENT-STATE-FAILED:CAPS"></a>NICE_COMPONENT_STATE_FAILED</p></td>
3377 <td class="enum_member_description">
3378 <p>Connectivity checks have been completed,
3379 but connectivity was not established</p>
3380 </td>
3381 <td class="enum_member_annotations"> </td>
3382 </tr>
3383 <tr>
3384 <td class="enum_member_name"><p><a name="NICE-COMPONENT-STATE-LAST:CAPS"></a>NICE_COMPONENT_STATE_LAST</p></td>
3385 <td class="enum_member_description">
3386 <p>Dummy state</p>
3387 </td>
3388 <td class="enum_member_annotations"> </td>
3389 </tr>
3390 </tbody>
3391 </table></div>
3392 </div>
3393 </div>
3394 <hr>
3395 <div class="refsect2">
3396 <a name="NiceComponentType"></a><h3>enum NiceComponentType</h3>
3397 <p>Convenience enum representing the type of a component for use as the
3398 component_id for RTP/RTCP usages.</p>
3399 <div class="example">
3400 <a name="id-1.2.2.1.12.4.4"></a><p class="title"><b>Example 2. Example of use.</b></p>
3401 <div class="example-contents">
3402   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
3403     <tbody>
3404       <tr>
3405         <td class="listing_lines" align="right"><pre>1</pre></td>
3406         <td class="listing_code"><pre class="programlisting"><span class="function"><a href="NiceAgent.html#nice-agent-send">nice_agent_send</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">agent</span><span class="symbol">,</span><span class="normal"> stream_id</span><span class="symbol">,</span><span class="normal"> <a href="NiceAgent.html#NICE-COMPONENT-TYPE-RTP:CAPS">NICE_COMPONENT_TYPE_RTP</a></span><span class="symbol">,</span><span class="normal"> len</span><span class="symbol">,</span><span class="normal"> buf</span><span class="symbol">);</span></pre></td>
3407       </tr>
3408     </tbody>
3409   </table>
3410 </div>
3411
3412 </div>
3413 <br class="example-break"><div class="refsect3">
3414 <a name="NiceComponentType.members"></a><h4>Members</h4>
3415 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3416 <colgroup>
3417 <col width="300px" class="enum_members_name">
3418 <col class="enum_members_description">
3419 <col width="200px" class="enum_members_annotations">
3420 </colgroup>
3421 <tbody>
3422 <tr>
3423 <td class="enum_member_name"><p><a name="NICE-COMPONENT-TYPE-RTP:CAPS"></a>NICE_COMPONENT_TYPE_RTP</p></td>
3424 <td class="enum_member_description">
3425 <p>RTP Component type</p>
3426 </td>
3427 <td class="enum_member_annotations"> </td>
3428 </tr>
3429 <tr>
3430 <td class="enum_member_name"><p><a name="NICE-COMPONENT-TYPE-RTCP:CAPS"></a>NICE_COMPONENT_TYPE_RTCP</p></td>
3431 <td class="enum_member_description">
3432 <p>RTCP Component type</p>
3433 </td>
3434 <td class="enum_member_annotations"> </td>
3435 </tr>
3436 </tbody>
3437 </table></div>
3438 </div>
3439 </div>
3440 <hr>
3441 <div class="refsect2">
3442 <a name="NiceProxyType"></a><h3>enum NiceProxyType</h3>
3443 <p>An enum to specify which proxy type to use for relaying.
3444 Note that the proxies will only be used with TCP TURN relaying.</p>
3445 <p> See also: <a class="link" href="NiceAgent.html#NiceAgent--proxy-type" title="The “proxy-type” property"><span class="type">“proxy-type”</span></a> </p>
3446 <div class="refsect3">
3447 <a name="NiceProxyType.members"></a><h4>Members</h4>
3448 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3449 <colgroup>
3450 <col width="300px" class="enum_members_name">
3451 <col class="enum_members_description">
3452 <col width="200px" class="enum_members_annotations">
3453 </colgroup>
3454 <tbody>
3455 <tr>
3456 <td class="enum_member_name"><p><a name="NICE-PROXY-TYPE-NONE:CAPS"></a>NICE_PROXY_TYPE_NONE</p></td>
3457 <td class="enum_member_description">
3458 <p>Do not use a proxy</p>
3459 </td>
3460 <td class="enum_member_annotations"> </td>
3461 </tr>
3462 <tr>
3463 <td class="enum_member_name"><p><a name="NICE-PROXY-TYPE-SOCKS5:CAPS"></a>NICE_PROXY_TYPE_SOCKS5</p></td>
3464 <td class="enum_member_description">
3465 <p>Use a SOCKS5 proxy</p>
3466 </td>
3467 <td class="enum_member_annotations"> </td>
3468 </tr>
3469 <tr>
3470 <td class="enum_member_name"><p><a name="NICE-PROXY-TYPE-HTTP:CAPS"></a>NICE_PROXY_TYPE_HTTP</p></td>
3471 <td class="enum_member_description">
3472 <p>Use an HTTP proxy</p>
3473 </td>
3474 <td class="enum_member_annotations"> </td>
3475 </tr>
3476 <tr>
3477 <td class="enum_member_name"><p><a name="NICE-PROXY-TYPE-LAST:CAPS"></a>NICE_PROXY_TYPE_LAST</p></td>
3478 <td class="enum_member_description">
3479 <p>Dummy last proxy type</p>
3480 </td>
3481 <td class="enum_member_annotations"> </td>
3482 </tr>
3483 </tbody>
3484 </table></div>
3485 </div>
3486 <p class="since">Since: <a class="link" href="ix03.html#api-index-0.0.4">0.0.4</a></p>
3487 </div>
3488 <hr>
3489 <div class="refsect2">
3490 <a name="NiceNominationMode"></a><h3>enum NiceNominationMode</h3>
3491 <p>An enum to specity the kind of nomination mode to use by
3492 the agent, as described in RFC 5245. Two modes exists,
3493 regular and aggressive. They differ by the way the controlling
3494 agent chooses to put the USE-CANDIDATE attribute in its STUN
3495 messages. The aggressive mode is supposed to nominate a pair
3496 faster, than the regular mode, potentially causing the nominated
3497 pair to change until the connection check completes.</p>
3498 <div class="refsect3">
3499 <a name="NiceNominationMode.members"></a><h4>Members</h4>
3500 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3501 <colgroup>
3502 <col width="300px" class="enum_members_name">
3503 <col class="enum_members_description">
3504 <col width="200px" class="enum_members_annotations">
3505 </colgroup>
3506 <tbody>
3507 <tr>
3508 <td class="enum_member_name"><p><a name="NICE-NOMINATION-MODE-REGULAR:CAPS"></a>NICE_NOMINATION_MODE_REGULAR</p></td>
3509 <td class="enum_member_description">
3510 <p>Regular nomination mode</p>
3511 </td>
3512 <td class="enum_member_annotations"> </td>
3513 </tr>
3514 <tr>
3515 <td class="enum_member_name"><p><a name="NICE-NOMINATION-MODE-AGGRESSIVE:CAPS"></a>NICE_NOMINATION_MODE_AGGRESSIVE</p></td>
3516 <td class="enum_member_description">
3517 <p>Aggressive nomination mode</p>
3518 </td>
3519 <td class="enum_member_annotations"> </td>
3520 </tr>
3521 </tbody>
3522 </table></div>
3523 </div>
3524 <p class="since">Since: <a class="link" href="ix14.html#api-index-0.1.15">0.1.15</a></p>
3525 </div>
3526 <hr>
3527 <div class="refsect2">
3528 <a name="NiceCompatibility"></a><h3>enum NiceCompatibility</h3>
3529 <p>An enum to specify which compatible specifications the <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> should use.
3530 Use with <a class="link" href="NiceAgent.html#nice-agent-new" title="nice_agent_new ()"><code class="function">nice_agent_new()</code></a></p>
3531 <div class="warning">
3532 <em class="parameter"><code>NICE_COMPATIBILITY_DRAFT19</code></em> is deprecated and should not be used
3533 in newly-written code. It is kept for compatibility reasons and
3534 represents the same compatibility as <em class="parameter"><code>NICE_COMPATIBILITY_RFC5245</code></em>
3535 </div>
3536 <div class="note"><p>
3537    If <em class="parameter"><code>NICE_COMPATIBILITY_RFC5245</code></em> compatibility mode is used for a non-reliable
3538    agent, then ICE-UDP will be used with higher priority and ICE-TCP will also
3539    be used when the UDP connectivity fails. If it is used with a reliable agent,
3540    then ICE-UDP will be used with the TCP-Over-UDP (<a class="link" href="libnice-Pseudo-TCP-Socket.html#PseudoTcpSocket"><span class="type">PseudoTcpSocket</span></a>) if ICE-TCP
3541    fails and ICE-UDP succeeds.
3542   </p></div>
3543 <div class="refsect3">
3544 <a name="NiceCompatibility.members"></a><h4>Members</h4>
3545 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3546 <colgroup>
3547 <col width="300px" class="enum_members_name">
3548 <col class="enum_members_description">
3549 <col width="200px" class="enum_members_annotations">
3550 </colgroup>
3551 <tbody>
3552 <tr>
3553 <td class="enum_member_name"><p><a name="NICE-COMPATIBILITY-RFC5245:CAPS"></a>NICE_COMPATIBILITY_RFC5245</p></td>
3554 <td class="enum_member_description">
3555 <p>Use compatibility with the RFC5245 ICE-UDP specs
3556 and RFC6544 ICE-TCP specs</p>
3557 </td>
3558 <td class="enum_member_annotations"> </td>
3559 </tr>
3560 <tr>
3561 <td class="enum_member_name"><p><a name="NICE-COMPATIBILITY-DRAFT19:CAPS"></a>NICE_COMPATIBILITY_DRAFT19</p></td>
3562 <td class="enum_member_description">
3563 <p>Use compatibility for ICE Draft 19 specs</p>
3564 </td>
3565 <td class="enum_member_annotations"> </td>
3566 </tr>
3567 <tr>
3568 <td class="enum_member_name"><p><a name="NICE-COMPATIBILITY-GOOGLE:CAPS"></a>NICE_COMPATIBILITY_GOOGLE</p></td>
3569 <td class="enum_member_description">
3570 <p>Use compatibility for Google Talk specs</p>
3571 </td>
3572 <td class="enum_member_annotations"> </td>
3573 </tr>
3574 <tr>
3575 <td class="enum_member_name"><p><a name="NICE-COMPATIBILITY-MSN:CAPS"></a>NICE_COMPATIBILITY_MSN</p></td>
3576 <td class="enum_member_description">
3577 <p>Use compatibility for MSN Messenger specs</p>
3578 </td>
3579 <td class="enum_member_annotations"> </td>
3580 </tr>
3581 <tr>
3582 <td class="enum_member_name"><p><a name="NICE-COMPATIBILITY-WLM2009:CAPS"></a>NICE_COMPATIBILITY_WLM2009</p></td>
3583 <td class="enum_member_description">
3584 <p>Use compatibility with Windows Live Messenger
3585 2009</p>
3586 </td>
3587 <td class="enum_member_annotations"> </td>
3588 </tr>
3589 <tr>
3590 <td class="enum_member_name"><p><a name="NICE-COMPATIBILITY-OC2007:CAPS"></a>NICE_COMPATIBILITY_OC2007</p></td>
3591 <td class="enum_member_description">
3592 <p>Use compatibility with Microsoft Office Communicator 2007</p>
3593 </td>
3594 <td class="enum_member_annotations"> </td>
3595 </tr>
3596 <tr>
3597 <td class="enum_member_name"><p><a name="NICE-COMPATIBILITY-OC2007R2:CAPS"></a>NICE_COMPATIBILITY_OC2007R2</p></td>
3598 <td class="enum_member_description">
3599 <p>Use compatibility with Microsoft Office Communicator 2007 R2</p>
3600 </td>
3601 <td class="enum_member_annotations"> </td>
3602 </tr>
3603 <tr>
3604 <td class="enum_member_name"><p><a name="NICE-COMPATIBILITY-LAST:CAPS"></a>NICE_COMPATIBILITY_LAST</p></td>
3605 <td class="enum_member_description">
3606 <p>Dummy last compatibility mode</p>
3607 </td>
3608 <td class="enum_member_annotations"> </td>
3609 </tr>
3610 </tbody>
3611 </table></div>
3612 </div>
3613 </div>
3614 <hr>
3615 <div class="refsect2">
3616 <a name="NiceInputMessage"></a><h3>NiceInputMessage</h3>
3617 <pre class="programlisting">typedef struct {
3618   GInputVector *buffers;
3619   gint n_buffers;  /* may be -1 to indicate @buffers is NULL-terminated */
3620   NiceAddress *from;  /* return location for address of message sender */
3621   gsize length;  /* sum of the lengths of @buffers */
3622 } NiceInputMessage;
3623 </pre>
3624 <p>Represents a single message received off the network. For reliable
3625 connections, this is essentially just an array of buffers (specifically,
3626 <em class="parameter"><code>from</code></em>
3627  can be ignored). for non-reliable connections, it represents a single
3628 packet as received from the OS.</p>
3629 <p><em class="parameter"><code>n_buffers</code></em>
3630  may be -1 to indicate that <em class="parameter"><code>buffers</code></em>
3631  is terminated by a
3632 <a href="/usr/share/gtk-doc/html/gio/GSocket.html#GInputVector"><span class="type">GInputVector</span></a> with a <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> buffer pointer.</p>
3633 <p>By providing arrays of <a href="NiceAgent.html#NiceInputMessage"><span class="type">NiceInputMessages</span></a> to functions like
3634 <a class="link" href="NiceAgent.html#nice-agent-recv-messages" title="nice_agent_recv_messages ()"><code class="function">nice_agent_recv_messages()</code></a>, multiple messages may be received with a single
3635 call, which is more efficient than making multiple calls in a loop. In this
3636 manner, <a class="link" href="NiceAgent.html#nice-agent-recv-messages" title="nice_agent_recv_messages ()"><code class="function">nice_agent_recv_messages()</code></a> is analogous to <code class="function">recvmmsg()</code>; and
3637 <a class="link" href="NiceAgent.html#NiceInputMessage" title="NiceInputMessage"><span class="type">NiceInputMessage</span></a> to struct mmsghdr.</p>
3638 <div class="refsect3">
3639 <a name="NiceInputMessage.members"></a><h4>Members</h4>
3640 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3641 <colgroup>
3642 <col width="300px" class="struct_members_name">
3643 <col class="struct_members_description">
3644 <col width="200px" class="struct_members_annotations">
3645 </colgroup>
3646 <tbody>
3647 <tr>
3648 <td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/gio/GSocket.html#GInputVector"><span class="type">GInputVector</span></a> *<em class="structfield"><code><a name="NiceInputMessage.buffers"></a>buffers</code></em>;</p></td>
3649 <td class="struct_member_description"><p>unowned array of <a href="/usr/share/gtk-doc/html/gio/GSocket.html#GInputVector"><span class="type">GInputVector</span></a> buffers to
3650 store data in for this message. </p></td>
3651 <td class="struct_member_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_buffers]</span></td>
3652 </tr>
3653 <tr>
3654 <td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="NiceInputMessage.n-buffers"></a>n_buffers</code></em>;</p></td>
3655 <td class="struct_member_description"><p>number of <a href="/usr/share/gtk-doc/html/gio/GSocket.html#GInputVector"><span class="type">GInputVectors</span></a> in <em class="parameter"><code>buffers</code></em>
3656 , or -1 to indicate <em class="parameter"><code>buffers</code></em>
3657 is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated</p></td>
3658 <td class="struct_member_annotations"> </td>
3659 </tr>
3660 <tr>
3661 <td class="struct_member_name"><p><a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a> *<em class="structfield"><code><a name="NiceInputMessage.from"></a>from</code></em>;</p></td>
3662 <td class="struct_member_description"><p>return location to store the address of the peer who
3663 transmitted the message, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
3664 <td class="struct_member_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
3665 </tr>
3666 <tr>
3667 <td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> <em class="structfield"><code><a name="NiceInputMessage.length"></a>length</code></em>;</p></td>
3668 <td class="struct_member_description"><p>total number of valid bytes contiguously stored in <em class="parameter"><code>buffers</code></em>
3669 </p></td>
3670 <td class="struct_member_annotations"> </td>
3671 </tr>
3672 </tbody>
3673 </table></div>
3674 </div>
3675 <p class="since">Since: <a class="link" href="ix10.html#api-index-0.1.5">0.1.5</a></p>
3676 </div>
3677 <hr>
3678 <div class="refsect2">
3679 <a name="NiceOutputMessage"></a><h3>NiceOutputMessage</h3>
3680 <pre class="programlisting">typedef struct {
3681   GOutputVector *buffers;
3682   gint n_buffers;
3683 } NiceOutputMessage;
3684 </pre>
3685 <p>Represents a single message to transmit on the network. For
3686 reliable connections, this is essentially just an array of
3687 buffer. for non-reliable connections, it represents a single packet
3688 to send to the OS.</p>
3689 <p><em class="parameter"><code>n_buffers</code></em>
3690  may be -1 to indicate that <em class="parameter"><code>buffers</code></em>
3691  is terminated by a
3692 <a href="/usr/share/gtk-doc/html/gio/GSocket.html#GOutputVector"><span class="type">GOutputVector</span></a> with a <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> buffer pointer.</p>
3693 <p>By providing arrays of <a href="NiceAgent.html#NiceOutputMessage"><span class="type">NiceOutputMessages</span></a> to functions like
3694 <a class="link" href="NiceAgent.html#nice-agent-send-messages-nonblocking" title="nice_agent_send_messages_nonblocking ()"><code class="function">nice_agent_send_messages_nonblocking()</code></a>, multiple messages may be transmitted
3695 with a single call, which is more efficient than making multiple calls in a
3696 loop. In this manner, <a class="link" href="NiceAgent.html#nice-agent-send-messages-nonblocking" title="nice_agent_send_messages_nonblocking ()"><code class="function">nice_agent_send_messages_nonblocking()</code></a> is analogous to
3697 <code class="function">sendmmsg()</code>; and <a class="link" href="NiceAgent.html#NiceOutputMessage" title="NiceOutputMessage"><span class="type">NiceOutputMessage</span></a> to struct mmsghdr.</p>
3698 <div class="refsect3">
3699 <a name="NiceOutputMessage.members"></a><h4>Members</h4>
3700 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3701 <colgroup>
3702 <col width="300px" class="struct_members_name">
3703 <col class="struct_members_description">
3704 <col width="200px" class="struct_members_annotations">
3705 </colgroup>
3706 <tbody>
3707 <tr>
3708 <td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/gio/GSocket.html#GOutputVector"><span class="type">GOutputVector</span></a> *<em class="structfield"><code><a name="NiceOutputMessage.buffers"></a>buffers</code></em>;</p></td>
3709 <td class="struct_member_description"><p>unowned array of <a href="/usr/share/gtk-doc/html/gio/GSocket.html#GOutputVector"><span class="type">GOutputVector</span></a> buffers
3710 which contain data to transmit for this message. </p></td>
3711 <td class="struct_member_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_buffers]</span></td>
3712 </tr>
3713 <tr>
3714 <td class="struct_member_name"><p><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="NiceOutputMessage.n-buffers"></a>n_buffers</code></em>;</p></td>
3715 <td class="struct_member_description"><p>number of <a href="/usr/share/gtk-doc/html/gio/GSocket.html#GOutputVector"><span class="type">GOutputVectors</span></a> in <em class="parameter"><code>buffers</code></em>
3716 , or -1 to indicate <em class="parameter"><code>buffers</code></em>
3717 is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated</p></td>
3718 <td class="struct_member_annotations"> </td>
3719 </tr>
3720 </tbody>
3721 </table></div>
3722 </div>
3723 <p class="since">Since: <a class="link" href="ix10.html#api-index-0.1.5">0.1.5</a></p>
3724 </div>
3725 <hr>
3726 <div class="refsect2">
3727 <a name="NICE-AGENT-MAX-REMOTE-CANDIDATES:CAPS"></a><h3>NICE_AGENT_MAX_REMOTE_CANDIDATES</h3>
3728 <pre class="programlisting">#define NICE_AGENT_MAX_REMOTE_CANDIDATES    25
3729 </pre>
3730 <p>A hard limit for the number of remote candidates. This
3731 limit is enforced to protect against malevolent remote
3732 clients.</p>
3733 </div>
3734 <hr>
3735 <div class="refsect2">
3736 <a name="NiceAgentOption"></a><h3>enum NiceAgentOption</h3>
3737 <p>These are options that can be passed to <a class="link" href="NiceAgent.html#nice-agent-new-full" title="nice_agent_new_full ()"><code class="function">nice_agent_new_full()</code></a>. They set
3738 various properties on the agent. Not including them sets the property to
3739 the other value.</p>
3740 <div class="refsect3">
3741 <a name="NiceAgentOption.members"></a><h4>Members</h4>
3742 <div class="informaltable"><table class="informaltable" width="100%" border="0">
3743 <colgroup>
3744 <col width="300px" class="enum_members_name">
3745 <col class="enum_members_description">
3746 <col width="200px" class="enum_members_annotations">
3747 </colgroup>
3748 <tbody>
3749 <tr>
3750 <td class="enum_member_name"><p><a name="NICE-AGENT-OPTION-REGULAR-NOMINATION:CAPS"></a>NICE_AGENT_OPTION_REGULAR_NOMINATION</p></td>
3751 <td class="enum_member_description">
3752 <p>Enables regular nomination, default
3753  is aggrssive mode (see <a class="link" href="NiceAgent.html#NiceNominationMode" title="enum NiceNominationMode"><span class="type">NiceNominationMode</span></a>).</p>
3754 </td>
3755 <td class="enum_member_annotations"> </td>
3756 </tr>
3757 <tr>
3758 <td class="enum_member_name"><p><a name="NICE-AGENT-OPTION-RELIABLE:CAPS"></a>NICE_AGENT_OPTION_RELIABLE</p></td>
3759 <td class="enum_member_description">
3760 <p>Enables reliable mode, possibly using PseudoTCP, *  see <a class="link" href="NiceAgent.html#nice-agent-new-reliable" title="nice_agent_new_reliable ()"><code class="function">nice_agent_new_reliable()</code></a>.</p>
3761 </td>
3762 <td class="enum_member_annotations"> </td>
3763 </tr>
3764 <tr>
3765 <td class="enum_member_name"><p><a name="NICE-AGENT-OPTION-LITE-MODE:CAPS"></a>NICE_AGENT_OPTION_LITE_MODE</p></td>
3766 <td class="enum_member_description">
3767 <p>Enable lite mode</p>
3768 </td>
3769 <td class="enum_member_annotations"> </td>
3770 </tr>
3771 <tr>
3772 <td class="enum_member_name"><p><a name="NICE-AGENT-OPTION-ICE-TRICKLE:CAPS"></a>NICE_AGENT_OPTION_ICE_TRICKLE</p></td>
3773 <td class="enum_member_description">
3774 <p>Enable ICE trickle mode</p>
3775 </td>
3776 <td class="enum_member_annotations"> </td>
3777 </tr>
3778 <tr>
3779 <td class="enum_member_name"><p><a name="NICE-AGENT-OPTION-SUPPORT-RENOMINATION:CAPS"></a>NICE_AGENT_OPTION_SUPPORT_RENOMINATION</p></td>
3780 <td class="enum_member_description">
3781 <p>Enable renomination triggered by NOMINATION STUN attribute
3782 proposed here: https://tools.ietf.org/html/draft-thatcher-ice-renomination-00</p>
3783 </td>
3784 <td class="enum_member_annotations"> </td>
3785 </tr>
3786 </tbody>
3787 </table></div>
3788 </div>
3789 <p class="since">Since: <a class="link" href="ix14.html#api-index-0.1.15">0.1.15</a></p>
3790 </div>
3791 </div>
3792 <div class="refsect1">
3793 <a name="NiceAgent.property-details"></a><h2>Property Details</h2>
3794 <div class="refsect2">
3795 <a name="NiceAgent--bytestream-tcp"></a><h3>The <code class="literal">“bytestream-tcp”</code> property</h3>
3796 <pre class="programlisting">  “bytestream-tcp”           <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
3797 <p>This property defines whether receive/send over a TCP or pseudo-TCP, in
3798 reliable mode, are considered as packetized or as bytestream.
3799 In unreliable mode, every send/recv is considered as packetized, and
3800 this property is ignored and cannot be set.</p>
3801 <p>
3802 In reliable mode, this property will always return <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> in the
3803 <a class="link" href="NiceAgent.html#NICE-COMPATIBILITY-GOOGLE:CAPS"><code class="literal">NICE_COMPATIBILITY_GOOGLE</code></a> compatibility mode.
3804 </p>
3805 <p>If the property is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the stream is considered in bytestream mode
3806 and data can be read with any receive size. If the property is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, then
3807 the stream is considred packetized and each receive will return one packet
3808 of the same size as what was sent from the peer. If in packetized mode,
3809 then doing a receive with a size smaller than the packet, will cause the
3810 remaining bytes in the packet to be dropped, breaking the reliability
3811 of the stream.</p>
3812 <p>
3813 This property is currently read-only, and will become read/write once
3814 bytestream mode will be supported.
3815 </p>
3816 <p>Flags: Read</p>
3817 <p>Default value: FALSE</p>
3818 <p class="since">Since: <a class="link" href="ix12.html#api-index-0.1.8">0.1.8</a></p>
3819 </div>
3820 <hr>
3821 <div class="refsect2">
3822 <a name="NiceAgent--compatibility"></a><h3>The <code class="literal">“compatibility”</code> property</h3>
3823 <pre class="programlisting">  “compatibility”            <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
3824 <p>The Nice agent can work in various compatibility modes depending on
3825 what the application/peer needs.</p>
3826 <p> See also: <a class="link" href="NiceAgent.html#NiceCompatibility" title="enum NiceCompatibility"><span class="type">NiceCompatibility</span></a></p>
3827 <p>Flags: Read / Write / Construct Only</p>
3828 <p>Allowed values: &lt;= 5</p>
3829 <p>Default value: 0</p>
3830 </div>
3831 <hr>
3832 <div class="refsect2">
3833 <a name="NiceAgent--controlling-mode"></a><h3>The <code class="literal">“controlling-mode”</code> property</h3>
3834 <pre class="programlisting">  “controlling-mode”         <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
3835 <p>Whether the agent has the controlling role. This property should
3836 be modified before gathering candidates, any modification occuring
3837 later will be hold until ICE is restarted.</p>
3838 <p>Flags: Read / Write</p>
3839 <p>Default value: FALSE</p>
3840 </div>
3841 <hr>
3842 <div class="refsect2">
3843 <a name="NiceAgent--force-relay"></a><h3>The <code class="literal">“force-relay”</code> property</h3>
3844 <pre class="programlisting">  “force-relay”              <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
3845 <p>Force all traffic to go through a relay for added privacy, this
3846 allows hiding the local IP address. When this is enabled, so
3847 local candidates are available before relay servers have been set
3848 with <a class="link" href="NiceAgent.html#nice-agent-set-relay-info" title="nice_agent_set_relay_info ()"><code class="function">nice_agent_set_relay_info()</code></a>.</p>
3849 <p>Flags: Read / Write</p>
3850 <p>Default value: FALSE</p>
3851 <p class="since">Since: <a class="link" href="ix13.html#api-index-0.1.14">0.1.14</a></p>
3852 </div>
3853 <hr>
3854 <div class="refsect2">
3855 <a name="NiceAgent--full-mode"></a><h3>The <code class="literal">“full-mode”</code> property</h3>
3856 <pre class="programlisting">  “full-mode”                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
3857 <p>Whether agent runs in ICE full mode.</p>
3858 <p>Flags: Read / Write / Construct Only</p>
3859 <p>Default value: TRUE</p>
3860 </div>
3861 <hr>
3862 <div class="refsect2">
3863 <a name="NiceAgent--ice-tcp"></a><h3>The <code class="literal">“ice-tcp”</code> property</h3>
3864 <pre class="programlisting">  “ice-tcp”                  <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
3865 <p>Whether the agent should use ICE-TCP when gathering candidates.
3866 If the option is disabled, no TCP candidates will be generated. If the
3867 agent is in reliable mode, then pseudotcp will need to be used over UDP
3868 candidates.</p>
3869 <p>
3870 This option should be set before gathering candidates and should not be
3871 modified afterwards.
3872 </p>
3873 <p>The <a class="link" href="NiceAgent.html#NiceAgent--ice-tcp" title="The “ice-tcp” property"><span class="type">“ice-tcp”</span></a> property can be set at the same time as the
3874 <a class="link" href="NiceAgent.html#NiceAgent--ice-udp" title="The “ice-udp” property"><span class="type">“ice-udp”</span></a> property, but both cannot be unset at the same time.
3875 If <a class="link" href="NiceAgent.html#NiceAgent--ice-udp" title="The “ice-udp” property"><span class="type">“ice-udp”</span></a> is set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, then this property cannot be set
3876 to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> as well.</p>
3877 <div class="note"><p>
3878    ICE-TCP is only supported for <a class="link" href="NiceAgent.html#NICE-COMPATIBILITY-RFC5245:CAPS"><code class="literal">NICE_COMPATIBILITY_RFC5245</code></a>,
3879    <a class="link" href="NiceAgent.html#NICE-COMPATIBILITY-OC2007:CAPS"><code class="literal">NICE_COMPATIBILITY_OC2007</code></a> and <a class="link" href="NiceAgent.html#NICE-COMPATIBILITY-OC2007R2:CAPS"><code class="literal">NICE_COMPATIBILITY_OC2007R2</code></a> compatibility
3880    modes.
3881    </p></div>
3882 <p>Flags: Read / Write</p>
3883 <p>Default value: TRUE</p>
3884 <p class="since">Since: <a class="link" href="ix12.html#api-index-0.1.8">0.1.8</a></p>
3885 </div>
3886 <hr>
3887 <div class="refsect2">
3888 <a name="NiceAgent--ice-trickle"></a><h3>The <code class="literal">“ice-trickle”</code> property</h3>
3889 <pre class="programlisting">  “ice-trickle”              <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
3890 <p>Whether to perform Trickle ICE as per draft-ietf-ice-trickle-ice-21.
3891 When <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, the agent will postpone changing a component state to
3892 <a class="link" href="NiceAgent.html#NICE-COMPONENT-STATE-FAILED:CAPS"><code class="literal">NICE_COMPONENT_STATE_FAILED</code></a> until <a class="link" href="NiceAgent.html#nice-agent-peer-candidate-gathering-done" title="nice_agent_peer_candidate_gathering_done ()"><code class="function">nice_agent_peer_candidate_gathering_done()</code></a>
3893 has been called with the ID of the component's stream.</p>
3894 <p>Flags: Read / Write</p>
3895 <p>Default value: FALSE</p>
3896 <p class="since">Since: <a class="link" href="ix15.html#api-index-0.1.16">0.1.16</a></p>
3897 </div>
3898 <hr>
3899 <div class="refsect2">
3900 <a name="NiceAgent--ice-udp"></a><h3>The <code class="literal">“ice-udp”</code> property</h3>
3901 <pre class="programlisting">  “ice-udp”                  <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
3902 <p>Whether the agent should use ICE-UDP when gathering candidates.
3903 If the option is disabled, no UDP candidates will be generated. If the
3904 agent is in reliable mode, then pseudotcp will not be used since pseudotcp
3905 works on top of UDP candidates.</p>
3906 <p>
3907 This option should be set before gathering candidates and should not be
3908 modified afterwards.
3909 </p>
3910 <p>The <a class="link" href="NiceAgent.html#NiceAgent--ice-udp" title="The “ice-udp” property"><span class="type">“ice-udp”</span></a> property can be set at the same time as the
3911 <a class="link" href="NiceAgent.html#NiceAgent--ice-tcp" title="The “ice-tcp” property"><span class="type">“ice-tcp”</span></a> property, but both cannot be unset at the same time.
3912 If <a class="link" href="NiceAgent.html#NiceAgent--ice-tcp" title="The “ice-tcp” property"><span class="type">“ice-tcp”</span></a> is set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, then this property cannot be set
3913 to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> as well.</p>
3914 <p>Flags: Read / Write</p>
3915 <p>Default value: TRUE</p>
3916 <p class="since">Since: <a class="link" href="ix12.html#api-index-0.1.8">0.1.8</a></p>
3917 </div>
3918 <hr>
3919 <div class="refsect2">
3920 <a name="NiceAgent--keepalive-conncheck"></a><h3>The <code class="literal">“keepalive-conncheck”</code> property</h3>
3921 <pre class="programlisting">  “keepalive-conncheck”      <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
3922 <p>Use binding requests as keepalives instead of binding
3923 indications. This means that the keepalives may time out which
3924 will change the component state to <a class="link" href="NiceAgent.html#NICE-COMPONENT-STATE-FAILED:CAPS"><code class="literal">NICE_COMPONENT_STATE_FAILED</code></a>.</p>
3925 <p>Enabing this is a slight violation of RFC 5245 section 10 which
3926 recommends using Binding Indications for keepalives.</p>
3927 <p>This is always enabled if the compatibility mode is
3928 <a class="link" href="NiceAgent.html#NICE-COMPATIBILITY-GOOGLE:CAPS"><code class="literal">NICE_COMPATIBILITY_GOOGLE</code></a>.</p>
3929 <p>Flags: Read / Write</p>
3930 <p>Default value: FALSE</p>
3931 <p class="since">Since: <a class="link" href="ix12.html#api-index-0.1.8">0.1.8</a></p>
3932 </div>
3933 <hr>
3934 <div class="refsect2">
3935 <a name="NiceAgent--main-context"></a><h3>The <code class="literal">“main-context”</code> property</h3>
3936 <pre class="programlisting">  “main-context”             <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a></pre>
3937 <p>A GLib main context is needed for all timeouts used by libnice.
3938 This is a property being set by the <a class="link" href="NiceAgent.html#nice-agent-new" title="nice_agent_new ()"><code class="function">nice_agent_new()</code></a> call.</p>
3939 <p>Flags: Read / Write / Construct Only</p>
3940 </div>
3941 <hr>
3942 <div class="refsect2">
3943 <a name="NiceAgent--max-connectivity-checks"></a><h3>The <code class="literal">“max-connectivity-checks”</code> property</h3>
3944 <pre class="programlisting">  “max-connectivity-checks”  <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
3945 <p>Upper limit for the total number of connectivity checks performed.</p>
3946 <p>Flags: Read / Write</p>
3947 <p>Default value: 0</p>
3948 </div>
3949 <hr>
3950 <div class="refsect2">
3951 <a name="NiceAgent--nomination-mode"></a><h3>The <code class="literal">“nomination-mode”</code> property</h3>
3952 <pre class="programlisting">  “nomination-mode”          <a class="link" href="NiceAgent.html#NiceNominationMode" title="enum NiceNominationMode"><span class="type">NiceNominationMode</span></a></pre>
3953 <p>The nomination mode used in the ICE specification for describing
3954 the selection of valid pairs to be used upstream.</p>
3955 <p> See also: <a class="link" href="NiceAgent.html#NiceNominationMode" title="enum NiceNominationMode"><span class="type">NiceNominationMode</span></a> </p>
3956 <p>Flags: Read / Write / Construct Only</p>
3957 <p>Default value: NICE_NOMINATION_MODE_AGGRESSIVE</p>
3958 <p class="since">Since: <a class="link" href="ix14.html#api-index-0.1.15">0.1.15</a></p>
3959 </div>
3960 <hr>
3961 <div class="refsect2">
3962 <a name="NiceAgent--proxy-ip"></a><h3>The <code class="literal">“proxy-ip”</code> property</h3>
3963 <pre class="programlisting">  “proxy-ip”                 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
3964 <p>The proxy server IP used to bypass a proxy firewall</p>
3965 <p>Flags: Read / Write</p>
3966 <p>Default value: NULL</p>
3967 <p class="since">Since: <a class="link" href="ix03.html#api-index-0.0.4">0.0.4</a></p>
3968 </div>
3969 <hr>
3970 <div class="refsect2">
3971 <a name="NiceAgent--proxy-password"></a><h3>The <code class="literal">“proxy-password”</code> property</h3>
3972 <pre class="programlisting">  “proxy-password”           <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
3973 <p>The password used to authenticate with the proxy</p>
3974 <p>Flags: Read / Write</p>
3975 <p>Default value: NULL</p>
3976 <p class="since">Since: <a class="link" href="ix03.html#api-index-0.0.4">0.0.4</a></p>
3977 </div>
3978 <hr>
3979 <div class="refsect2">
3980 <a name="NiceAgent--proxy-port"></a><h3>The <code class="literal">“proxy-port”</code> property</h3>
3981 <pre class="programlisting">  “proxy-port”               <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
3982 <p>The proxy server port used to bypass a proxy firewall</p>
3983 <p>Flags: Read / Write</p>
3984 <p>Allowed values: [1,65536]</p>
3985 <p>Default value: 1</p>
3986 <p class="since">Since: <a class="link" href="ix03.html#api-index-0.0.4">0.0.4</a></p>
3987 </div>
3988 <hr>
3989 <div class="refsect2">
3990 <a name="NiceAgent--proxy-type"></a><h3>The <code class="literal">“proxy-type”</code> property</h3>
3991 <pre class="programlisting">  “proxy-type”               <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
3992 <p>The type of proxy set in the proxy-ip property</p>
3993 <p>Flags: Read / Write</p>
3994 <p>Allowed values: &lt;= 2</p>
3995 <p>Default value: 0</p>
3996 <p class="since">Since: <a class="link" href="ix03.html#api-index-0.0.4">0.0.4</a></p>
3997 </div>
3998 <hr>
3999 <div class="refsect2">
4000 <a name="NiceAgent--proxy-username"></a><h3>The <code class="literal">“proxy-username”</code> property</h3>
4001 <pre class="programlisting">  “proxy-username”           <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
4002 <p>The username used to authenticate with the proxy</p>
4003 <p>Flags: Read / Write</p>
4004 <p>Default value: NULL</p>
4005 <p class="since">Since: <a class="link" href="ix03.html#api-index-0.0.4">0.0.4</a></p>
4006 </div>
4007 <hr>
4008 <div class="refsect2">
4009 <a name="NiceAgent--reliable"></a><h3>The <code class="literal">“reliable”</code> property</h3>
4010 <pre class="programlisting">  “reliable”                 <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
4011 <p>Whether the agent is providing a reliable transport of messages (through
4012 ICE-TCP or PseudoTCP over ICE-UDP)</p>
4013 <p>Flags: Read / Write / Construct Only</p>
4014 <p>Default value: FALSE</p>
4015 <p class="since">Since: <a class="link" href="ix08.html#api-index-0.0.11">0.0.11</a></p>
4016 </div>
4017 <hr>
4018 <div class="refsect2">
4019 <a name="NiceAgent--stun-initial-timeout"></a><h3>The <code class="literal">“stun-initial-timeout”</code> property</h3>
4020 <pre class="programlisting">  “stun-initial-timeout”     <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
4021 <p>The initial timeout (msecs) of the STUN binding requests
4022 used in the gathering stage, to find our local candidates.
4023 This property is described as 'RTO' in the RFC 5389 and RFC 5245.
4024 This timeout is doubled for each retransmission, until
4025 <a class="link" href="NiceAgent.html#NiceAgent--stun-max-retransmissions" title="The “stun-max-retransmissions” property"><span class="type">“stun-max-retransmissions”</span></a> have been done,
4026 with an exception for the last restransmission, where the timeout is
4027 divided by two instead (RFC 5389 indicates that a customisable
4028 multiplier 'Rm' to 'RTO' should be used).</p>
4029 <p>Flags: Read / Write / Construct</p>
4030 <p>Allowed values: [20,9999]</p>
4031 <p>Default value: 200</p>
4032 <p class="since">Since: <a class="link" href="ix14.html#api-index-0.1.15">0.1.15</a></p>
4033 </div>
4034 <hr>
4035 <div class="refsect2">
4036 <a name="NiceAgent--stun-max-retransmissions"></a><h3>The <code class="literal">“stun-max-retransmissions”</code> property</h3>
4037 <pre class="programlisting">  “stun-max-retransmissions” <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
4038 <p>The maximum number of retransmissions of the STUN binding requests
4039 used in the gathering stage, to find our local candidates, and used
4040 in the connection check stage, to test the validity of each
4041 constructed pair. This property is described as 'Rc' in the RFC
4042 5389, with a default value of 7. The timeout of each STUN request
4043 is doubled for each retransmission, so the choice of this value has
4044 a direct impact on the time needed to move from the CONNECTED state
4045 to the READY state, and on the time needed to complete the GATHERING
4046 state.</p>
4047 <p>Flags: Read / Write / Construct</p>
4048 <p>Allowed values: [1,99]</p>
4049 <p>Default value: 7</p>
4050 <p class="since">Since: <a class="link" href="ix14.html#api-index-0.1.15">0.1.15</a></p>
4051 </div>
4052 <hr>
4053 <div class="refsect2">
4054 <a name="NiceAgent--stun-pacing-timer"></a><h3>The <code class="literal">“stun-pacing-timer”</code> property</h3>
4055 <pre class="programlisting">  “stun-pacing-timer”        <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
4056 <p>Timer 'Ta' (msecs) used in the IETF ICE specification for pacing candidate gathering and sending of connectivity checks.</p>
4057 <p>Flags: Read / Write / Construct</p>
4058 <p>Allowed values: &gt;= 1</p>
4059 <p>Default value: 20</p>
4060 </div>
4061 <hr>
4062 <div class="refsect2">
4063 <a name="NiceAgent--stun-reliable-timeout"></a><h3>The <code class="literal">“stun-reliable-timeout”</code> property</h3>
4064 <pre class="programlisting">  “stun-reliable-timeout”    <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
4065 <p>The initial timeout of the STUN binding requests used
4066 for a reliable timer.</p>
4067 <p>Flags: Read / Write / Construct</p>
4068 <p>Allowed values: [20,99999]</p>
4069 <p>Default value: 7900</p>
4070 <p class="since">Since: <a class="link" href="ix14.html#api-index-0.1.15">0.1.15</a></p>
4071 </div>
4072 <hr>
4073 <div class="refsect2">
4074 <a name="NiceAgent--stun-server"></a><h3>The <code class="literal">“stun-server”</code> property</h3>
4075 <pre class="programlisting">  “stun-server”              <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *</pre>
4076 <p>The IP address (not the hostname) of the STUN server to use.</p>
4077 <p>Flags: Read / Write</p>
4078 <p>Default value: NULL</p>
4079 </div>
4080 <hr>
4081 <div class="refsect2">
4082 <a name="NiceAgent--stun-server-port"></a><h3>The <code class="literal">“stun-server-port”</code> property</h3>
4083 <pre class="programlisting">  “stun-server-port”         <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
4084 <p>Port of the STUN server used to gather server-reflexive candidates.</p>
4085 <p>Flags: Read / Write</p>
4086 <p>Allowed values: [1,65536]</p>
4087 <p>Default value: 1</p>
4088 </div>
4089 <hr>
4090 <div class="refsect2">
4091 <a name="NiceAgent--support-renomination"></a><h3>The <code class="literal">“support-renomination”</code> property</h3>
4092 <pre class="programlisting">  “support-renomination”     <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
4093 <p>Support RENOMINATION STUN attribute proposed here:
4094 https://tools.ietf.org/html/draft-thatcher-ice-renomination-00 As
4095 soon as RENOMINATION attribute is received from remote
4096 candidate's address, corresponding candidates pair gets
4097 selected. This is specific to Google Chrome/libWebRTC.</p>
4098 <p>Flags: Read / Write</p>
4099 <p>Default value: FALSE</p>
4100 </div>
4101 <hr>
4102 <div class="refsect2">
4103 <a name="NiceAgent--upnp"></a><h3>The <code class="literal">“upnp”</code> property</h3>
4104 <pre class="programlisting">  “upnp”                     <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a></pre>
4105 <p>Whether the agent should use UPnP to open a port in the router and
4106 get the external IP</p>
4107 <p>Flags: Read / Write / Construct</p>
4108 <p>Default value: TRUE</p>
4109 <p class="since">Since: <a class="link" href="ix05.html#api-index-0.0.7">0.0.7</a></p>
4110 </div>
4111 <hr>
4112 <div class="refsect2">
4113 <a name="NiceAgent--upnp-timeout"></a><h3>The <code class="literal">“upnp-timeout”</code> property</h3>
4114 <pre class="programlisting">  “upnp-timeout”             <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a></pre>
4115 <p>The maximum amount of time (in milliseconds) to wait for UPnP discovery to
4116 finish before signaling the <a class="link" href="NiceAgent.html#NiceAgent-candidate-gathering-done" title="The “candidate-gathering-done” signal"><span class="type">“candidate-gathering-done”</span></a> signal</p>
4117 <p>Flags: Read / Write / Construct</p>
4118 <p>Allowed values: [100,60000]</p>
4119 <p>Default value: 200</p>
4120 <p class="since">Since: <a class="link" href="ix05.html#api-index-0.0.7">0.0.7</a></p>
4121 </div>
4122 </div>
4123 <div class="refsect1">
4124 <a name="NiceAgent.signal-details"></a><h2>Signal Details</h2>
4125 <div class="refsect2">
4126 <a name="NiceAgent-candidate-gathering-done"></a><h3>The <code class="literal">“candidate-gathering-done”</code> signal</h3>
4127 <pre class="programlisting"><span class="returnvalue">void</span>
4128 user_function (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent,
4129                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a>      stream_id,
4130                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)</pre>
4131 <p>This signal is fired whenever a stream has finished gathering its
4132 candidates after a call to <a class="link" href="NiceAgent.html#nice-agent-gather-candidates" title="nice_agent_gather_candidates ()"><code class="function">nice_agent_gather_candidates()</code></a></p>
4133 <div class="refsect3">
4134 <a name="NiceAgent-candidate-gathering-done.parameters"></a><h4>Parameters</h4>
4135 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4136 <colgroup>
4137 <col width="150px" class="parameters_name">
4138 <col class="parameters_description">
4139 <col width="200px" class="parameters_annotations">
4140 </colgroup>
4141 <tbody>
4142 <tr>
4143 <td class="parameter_name"><p>agent</p></td>
4144 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object</p></td>
4145 <td class="parameter_annotations"> </td>
4146 </tr>
4147 <tr>
4148 <td class="parameter_name"><p>stream_id</p></td>
4149 <td class="parameter_description"><p>The ID of the stream</p></td>
4150 <td class="parameter_annotations"> </td>
4151 </tr>
4152 <tr>
4153 <td class="parameter_name"><p>user_data</p></td>
4154 <td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
4155 <td class="parameter_annotations"> </td>
4156 </tr>
4157 </tbody>
4158 </table></div>
4159 </div>
4160 <p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
4161 </div>
4162 <hr>
4163 <div class="refsect2">
4164 <a name="NiceAgent-component-state-changed"></a><h3>The <code class="literal">“component-state-changed”</code> signal</h3>
4165 <pre class="programlisting"><span class="returnvalue">void</span>
4166 user_function (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent,
4167                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a>      stream_id,
4168                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a>      component_id,
4169                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a>      state,
4170                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)</pre>
4171 <p>This signal is fired whenever a component’s state changes. There are many
4172 valid state transitions.</p>
4173 <p><span class="inlinemediaobject"><img src="states.png" alt="State transition diagram"></span></p>
4174 <div class="refsect3">
4175 <a name="NiceAgent-component-state-changed.parameters"></a><h4>Parameters</h4>
4176 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4177 <colgroup>
4178 <col width="150px" class="parameters_name">
4179 <col class="parameters_description">
4180 <col width="200px" class="parameters_annotations">
4181 </colgroup>
4182 <tbody>
4183 <tr>
4184 <td class="parameter_name"><p>agent</p></td>
4185 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object</p></td>
4186 <td class="parameter_annotations"> </td>
4187 </tr>
4188 <tr>
4189 <td class="parameter_name"><p>stream_id</p></td>
4190 <td class="parameter_description"><p>The ID of the stream</p></td>
4191 <td class="parameter_annotations"> </td>
4192 </tr>
4193 <tr>
4194 <td class="parameter_name"><p>component_id</p></td>
4195 <td class="parameter_description"><p>The ID of the component</p></td>
4196 <td class="parameter_annotations"> </td>
4197 </tr>
4198 <tr>
4199 <td class="parameter_name"><p>state</p></td>
4200 <td class="parameter_description"><p>The new <a class="link" href="NiceAgent.html#NiceComponentState" title="enum NiceComponentState"><span class="type">NiceComponentState</span></a> of the component</p></td>
4201 <td class="parameter_annotations"> </td>
4202 </tr>
4203 <tr>
4204 <td class="parameter_name"><p>user_data</p></td>
4205 <td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
4206 <td class="parameter_annotations"> </td>
4207 </tr>
4208 </tbody>
4209 </table></div>
4210 </div>
4211 <p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
4212 </div>
4213 <hr>
4214 <div class="refsect2">
4215 <a name="NiceAgent-initial-binding-request-received"></a><h3>The <code class="literal">“initial-binding-request-received”</code> signal</h3>
4216 <pre class="programlisting"><span class="returnvalue">void</span>
4217 user_function (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent,
4218                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a>      stream_id,
4219                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)</pre>
4220 <p>This signal is fired when we received our first binding request from
4221 the peer.</p>
4222 <div class="refsect3">
4223 <a name="NiceAgent-initial-binding-request-received.parameters"></a><h4>Parameters</h4>
4224 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4225 <colgroup>
4226 <col width="150px" class="parameters_name">
4227 <col class="parameters_description">
4228 <col width="200px" class="parameters_annotations">
4229 </colgroup>
4230 <tbody>
4231 <tr>
4232 <td class="parameter_name"><p>agent</p></td>
4233 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object</p></td>
4234 <td class="parameter_annotations"> </td>
4235 </tr>
4236 <tr>
4237 <td class="parameter_name"><p>stream_id</p></td>
4238 <td class="parameter_description"><p>The ID of the stream</p></td>
4239 <td class="parameter_annotations"> </td>
4240 </tr>
4241 <tr>
4242 <td class="parameter_name"><p>user_data</p></td>
4243 <td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
4244 <td class="parameter_annotations"> </td>
4245 </tr>
4246 </tbody>
4247 </table></div>
4248 </div>
4249 <p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
4250 </div>
4251 <hr>
4252 <div class="refsect2">
4253 <a name="NiceAgent-new-candidate"></a><h3>The <code class="literal">“new-candidate”</code> signal</h3>
4254 <pre class="programlisting"><span class="returnvalue">void</span>
4255 user_function (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent,
4256                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a>      stream_id,
4257                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a>      component_id,
4258                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>     *foundation,
4259                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)</pre>
4260 <p>This signal is fired when the agent discovers a new local candidate.
4261 When this signal is emitted, a matching <a class="link" href="NiceAgent.html#NiceAgent-new-candidate-full" title="The “new-candidate-full” signal"><span class="type">“new-candidate-full”</span></a> is
4262 also emitted with the candidate.</p>
4263 <p>See also: <a class="link" href="NiceAgent.html#NiceAgent-candidate-gathering-done" title="The “candidate-gathering-done” signal"><span class="type">“candidate-gathering-done”</span></a>,
4264 <a class="link" href="NiceAgent.html#NiceAgent-new-candidate-full" title="The “new-candidate-full” signal"><span class="type">“new-candidate-full”</span></a></p>
4265 <div class="warning">
4266 <p><code class="literal">NiceAgent::new-candidate</code> has been deprecated since version 0.1.8 and should not be used in newly-written code.</p>
4267 <p>Use <a class="link" href="NiceAgent.html#NiceAgent-new-candidate-full" title="The “new-candidate-full” signal"><span class="type">“new-candidate-full”</span></a></p>
4268 </div>
4269 <div class="refsect3">
4270 <a name="NiceAgent-new-candidate.parameters"></a><h4>Parameters</h4>
4271 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4272 <colgroup>
4273 <col width="150px" class="parameters_name">
4274 <col class="parameters_description">
4275 <col width="200px" class="parameters_annotations">
4276 </colgroup>
4277 <tbody>
4278 <tr>
4279 <td class="parameter_name"><p>agent</p></td>
4280 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object</p></td>
4281 <td class="parameter_annotations"> </td>
4282 </tr>
4283 <tr>
4284 <td class="parameter_name"><p>stream_id</p></td>
4285 <td class="parameter_description"><p>The ID of the stream</p></td>
4286 <td class="parameter_annotations"> </td>
4287 </tr>
4288 <tr>
4289 <td class="parameter_name"><p>component_id</p></td>
4290 <td class="parameter_description"><p>The ID of the component</p></td>
4291 <td class="parameter_annotations"> </td>
4292 </tr>
4293 <tr>
4294 <td class="parameter_name"><p>foundation</p></td>
4295 <td class="parameter_description"><p>The foundation of the new candidate</p></td>
4296 <td class="parameter_annotations"> </td>
4297 </tr>
4298 <tr>
4299 <td class="parameter_name"><p>user_data</p></td>
4300 <td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
4301 <td class="parameter_annotations"> </td>
4302 </tr>
4303 </tbody>
4304 </table></div>
4305 </div>
4306 <p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
4307 </div>
4308 <hr>
4309 <div class="refsect2">
4310 <a name="NiceAgent-new-candidate-full"></a><h3>The <code class="literal">“new-candidate-full”</code> signal</h3>
4311 <pre class="programlisting"><span class="returnvalue">void</span>
4312 user_function (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a>     *agent,
4313                <a class="link" href="NiceCandidate.html" title="NiceCandidate"><span class="type">NiceCandidate</span></a> *candidate,
4314                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>       user_data)</pre>
4315 <p>This signal is fired when the agent discovers a new local candidate.
4316 When this signal is emitted, a matching <a class="link" href="NiceAgent.html#NiceAgent-new-candidate" title="The “new-candidate” signal"><span class="type">“new-candidate”</span></a> is
4317 also emitted with the candidate's foundation.</p>
4318 <p>See also: <a class="link" href="NiceAgent.html#NiceAgent-candidate-gathering-done" title="The “candidate-gathering-done” signal"><span class="type">“candidate-gathering-done”</span></a>,
4319 <a class="link" href="NiceAgent.html#NiceAgent-new-candidate" title="The “new-candidate” signal"><span class="type">“new-candidate”</span></a></p>
4320 <div class="refsect3">
4321 <a name="NiceAgent-new-candidate-full.parameters"></a><h4>Parameters</h4>
4322 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4323 <colgroup>
4324 <col width="150px" class="parameters_name">
4325 <col class="parameters_description">
4326 <col width="200px" class="parameters_annotations">
4327 </colgroup>
4328 <tbody>
4329 <tr>
4330 <td class="parameter_name"><p>agent</p></td>
4331 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object</p></td>
4332 <td class="parameter_annotations"> </td>
4333 </tr>
4334 <tr>
4335 <td class="parameter_name"><p>candidate</p></td>
4336 <td class="parameter_description"><p>The new <a class="link" href="NiceCandidate.html" title="NiceCandidate"><span class="type">NiceCandidate</span></a></p></td>
4337 <td class="parameter_annotations"> </td>
4338 </tr>
4339 <tr>
4340 <td class="parameter_name"><p>user_data</p></td>
4341 <td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
4342 <td class="parameter_annotations"> </td>
4343 </tr>
4344 </tbody>
4345 </table></div>
4346 </div>
4347 <p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
4348 <p class="since">Since: <a class="link" href="ix12.html#api-index-0.1.8">0.1.8</a></p>
4349 </div>
4350 <hr>
4351 <div class="refsect2">
4352 <a name="NiceAgent-new-remote-candidate"></a><h3>The <code class="literal">“new-remote-candidate”</code> signal</h3>
4353 <pre class="programlisting"><span class="returnvalue">void</span>
4354 user_function (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent,
4355                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a>      stream_id,
4356                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a>      component_id,
4357                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>     *foundation,
4358                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)</pre>
4359 <p>This signal is fired when the agent discovers a new remote
4360 candidate.  This can happen with peer reflexive candidates.  When
4361 this signal is emitted, a matching
4362 <a class="link" href="NiceAgent.html#NiceAgent-new-remote-candidate-full" title="The “new-remote-candidate-full” signal"><span class="type">“new-remote-candidate-full”</span></a> is also emitted with the
4363 candidate.</p>
4364 <p>See also: <a class="link" href="NiceAgent.html#NiceAgent-new-remote-candidate-full" title="The “new-remote-candidate-full” signal"><span class="type">“new-remote-candidate-full”</span></a></p>
4365 <div class="warning">
4366 <p><code class="literal">NiceAgent::new-remote-candidate</code> has been deprecated since version 0.1.8 and should not be used in newly-written code.</p>
4367 <p>Use <a class="link" href="NiceAgent.html#NiceAgent-new-remote-candidate-full" title="The “new-remote-candidate-full” signal"><span class="type">“new-remote-candidate-full”</span></a></p>
4368 </div>
4369 <div class="refsect3">
4370 <a name="NiceAgent-new-remote-candidate.parameters"></a><h4>Parameters</h4>
4371 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4372 <colgroup>
4373 <col width="150px" class="parameters_name">
4374 <col class="parameters_description">
4375 <col width="200px" class="parameters_annotations">
4376 </colgroup>
4377 <tbody>
4378 <tr>
4379 <td class="parameter_name"><p>agent</p></td>
4380 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object</p></td>
4381 <td class="parameter_annotations"> </td>
4382 </tr>
4383 <tr>
4384 <td class="parameter_name"><p>stream_id</p></td>
4385 <td class="parameter_description"><p>The ID of the stream</p></td>
4386 <td class="parameter_annotations"> </td>
4387 </tr>
4388 <tr>
4389 <td class="parameter_name"><p>component_id</p></td>
4390 <td class="parameter_description"><p>The ID of the component</p></td>
4391 <td class="parameter_annotations"> </td>
4392 </tr>
4393 <tr>
4394 <td class="parameter_name"><p>foundation</p></td>
4395 <td class="parameter_description"><p>The foundation of the new candidate</p></td>
4396 <td class="parameter_annotations"> </td>
4397 </tr>
4398 <tr>
4399 <td class="parameter_name"><p>user_data</p></td>
4400 <td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
4401 <td class="parameter_annotations"> </td>
4402 </tr>
4403 </tbody>
4404 </table></div>
4405 </div>
4406 <p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
4407 </div>
4408 <hr>
4409 <div class="refsect2">
4410 <a name="NiceAgent-new-remote-candidate-full"></a><h3>The <code class="literal">“new-remote-candidate-full”</code> signal</h3>
4411 <pre class="programlisting"><span class="returnvalue">void</span>
4412 user_function (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a>     *agent,
4413                <a class="link" href="NiceCandidate.html" title="NiceCandidate"><span class="type">NiceCandidate</span></a> *candidate,
4414                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>       user_data)</pre>
4415 <p>This signal is fired when the agent discovers a new remote candidate.
4416 This can happen with peer reflexive candidates.
4417 When this signal is emitted, a matching <a class="link" href="NiceAgent.html#NiceAgent-new-remote-candidate" title="The “new-remote-candidate” signal"><span class="type">“new-remote-candidate”</span></a> is
4418 also emitted with the candidate's foundation.</p>
4419 <p>See also: <a class="link" href="NiceAgent.html#NiceAgent-new-remote-candidate" title="The “new-remote-candidate” signal"><span class="type">“new-remote-candidate”</span></a></p>
4420 <div class="refsect3">
4421 <a name="NiceAgent-new-remote-candidate-full.parameters"></a><h4>Parameters</h4>
4422 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4423 <colgroup>
4424 <col width="150px" class="parameters_name">
4425 <col class="parameters_description">
4426 <col width="200px" class="parameters_annotations">
4427 </colgroup>
4428 <tbody>
4429 <tr>
4430 <td class="parameter_name"><p>agent</p></td>
4431 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object</p></td>
4432 <td class="parameter_annotations"> </td>
4433 </tr>
4434 <tr>
4435 <td class="parameter_name"><p>candidate</p></td>
4436 <td class="parameter_description"><p>The new <a class="link" href="NiceCandidate.html" title="NiceCandidate"><span class="type">NiceCandidate</span></a></p></td>
4437 <td class="parameter_annotations"> </td>
4438 </tr>
4439 <tr>
4440 <td class="parameter_name"><p>user_data</p></td>
4441 <td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
4442 <td class="parameter_annotations"> </td>
4443 </tr>
4444 </tbody>
4445 </table></div>
4446 </div>
4447 <p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
4448 <p class="since">Since: <a class="link" href="ix12.html#api-index-0.1.8">0.1.8</a></p>
4449 </div>
4450 <hr>
4451 <div class="refsect2">
4452 <a name="NiceAgent-new-selected-pair"></a><h3>The <code class="literal">“new-selected-pair”</code> signal</h3>
4453 <pre class="programlisting"><span class="returnvalue">void</span>
4454 user_function (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent,
4455                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a>      stream_id,
4456                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a>      component_id,
4457                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>     *lfoundation,
4458                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>     *rfoundation,
4459                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)</pre>
4460 <p>This signal is fired once a candidate pair is selected for data
4461 transfer for a stream's component This is emitted along with
4462 <a class="link" href="NiceAgent.html#NiceAgent-new-selected-pair-full" title="The “new-selected-pair-full” signal"><span class="type">“new-selected-pair-full”</span></a> which has the whole candidate,
4463 the Foundation of a Candidate is not a unique identifier.</p>
4464 <p>See also: <a class="link" href="NiceAgent.html#NiceAgent-new-selected-pair-full" title="The “new-selected-pair-full” signal"><span class="type">“new-selected-pair-full”</span></a></p>
4465 <div class="warning">
4466 <p><code class="literal">NiceAgent::new-selected-pair</code> has been deprecated since version 0.1.8 and should not be used in newly-written code.</p>
4467 <p>Use <a class="link" href="NiceAgent.html#NiceAgent-new-selected-pair-full" title="The “new-selected-pair-full” signal"><span class="type">“new-selected-pair-full”</span></a></p>
4468 </div>
4469 <div class="refsect3">
4470 <a name="NiceAgent-new-selected-pair.parameters"></a><h4>Parameters</h4>
4471 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4472 <colgroup>
4473 <col width="150px" class="parameters_name">
4474 <col class="parameters_description">
4475 <col width="200px" class="parameters_annotations">
4476 </colgroup>
4477 <tbody>
4478 <tr>
4479 <td class="parameter_name"><p>agent</p></td>
4480 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object</p></td>
4481 <td class="parameter_annotations"> </td>
4482 </tr>
4483 <tr>
4484 <td class="parameter_name"><p>stream_id</p></td>
4485 <td class="parameter_description"><p>The ID of the stream</p></td>
4486 <td class="parameter_annotations"> </td>
4487 </tr>
4488 <tr>
4489 <td class="parameter_name"><p>component_id</p></td>
4490 <td class="parameter_description"><p>The ID of the component</p></td>
4491 <td class="parameter_annotations"> </td>
4492 </tr>
4493 <tr>
4494 <td class="parameter_name"><p>lfoundation</p></td>
4495 <td class="parameter_description"><p>The local foundation of the selected candidate pair</p></td>
4496 <td class="parameter_annotations"> </td>
4497 </tr>
4498 <tr>
4499 <td class="parameter_name"><p>rfoundation</p></td>
4500 <td class="parameter_description"><p>The remote foundation of the selected candidate pair</p></td>
4501 <td class="parameter_annotations"> </td>
4502 </tr>
4503 <tr>
4504 <td class="parameter_name"><p>user_data</p></td>
4505 <td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
4506 <td class="parameter_annotations"> </td>
4507 </tr>
4508 </tbody>
4509 </table></div>
4510 </div>
4511 <p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
4512 </div>
4513 <hr>
4514 <div class="refsect2">
4515 <a name="NiceAgent-new-selected-pair-full"></a><h3>The <code class="literal">“new-selected-pair-full”</code> signal</h3>
4516 <pre class="programlisting"><span class="returnvalue">void</span>
4517 user_function (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a>     *agent,
4518                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a>          stream_id,
4519                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a>          component_id,
4520                <a class="link" href="NiceCandidate.html" title="NiceCandidate"><span class="type">NiceCandidate</span></a> *lcandidate,
4521                <a class="link" href="NiceCandidate.html" title="NiceCandidate"><span class="type">NiceCandidate</span></a> *rcandidate,
4522                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>       user_data)</pre>
4523 <p>This signal is fired once a candidate pair is selected for data
4524 transfer for a stream's component. This is emitted along with
4525 <a class="link" href="NiceAgent.html#NiceAgent-new-selected-pair" title="The “new-selected-pair” signal"><span class="type">“new-selected-pair”</span></a>.</p>
4526 <p>See also: <a class="link" href="NiceAgent.html#NiceAgent-new-selected-pair" title="The “new-selected-pair” signal"><span class="type">“new-selected-pair”</span></a></p>
4527 <div class="refsect3">
4528 <a name="NiceAgent-new-selected-pair-full.parameters"></a><h4>Parameters</h4>
4529 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4530 <colgroup>
4531 <col width="150px" class="parameters_name">
4532 <col class="parameters_description">
4533 <col width="200px" class="parameters_annotations">
4534 </colgroup>
4535 <tbody>
4536 <tr>
4537 <td class="parameter_name"><p>agent</p></td>
4538 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object</p></td>
4539 <td class="parameter_annotations"> </td>
4540 </tr>
4541 <tr>
4542 <td class="parameter_name"><p>stream_id</p></td>
4543 <td class="parameter_description"><p>The ID of the stream</p></td>
4544 <td class="parameter_annotations"> </td>
4545 </tr>
4546 <tr>
4547 <td class="parameter_name"><p>component_id</p></td>
4548 <td class="parameter_description"><p>The ID of the component</p></td>
4549 <td class="parameter_annotations"> </td>
4550 </tr>
4551 <tr>
4552 <td class="parameter_name"><p>lcandidate</p></td>
4553 <td class="parameter_description"><p>The local <a class="link" href="NiceCandidate.html" title="NiceCandidate"><span class="type">NiceCandidate</span></a> of the selected candidate pair</p></td>
4554 <td class="parameter_annotations"> </td>
4555 </tr>
4556 <tr>
4557 <td class="parameter_name"><p>rcandidate</p></td>
4558 <td class="parameter_description"><p>The remote <a class="link" href="NiceCandidate.html" title="NiceCandidate"><span class="type">NiceCandidate</span></a> of the selected candidate pair</p></td>
4559 <td class="parameter_annotations"> </td>
4560 </tr>
4561 <tr>
4562 <td class="parameter_name"><p>user_data</p></td>
4563 <td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
4564 <td class="parameter_annotations"> </td>
4565 </tr>
4566 </tbody>
4567 </table></div>
4568 </div>
4569 <p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
4570 <p class="since">Since: <a class="link" href="ix12.html#api-index-0.1.8">0.1.8</a></p>
4571 </div>
4572 <hr>
4573 <div class="refsect2">
4574 <a name="NiceAgent-reliable-transport-writable"></a><h3>The <code class="literal">“reliable-transport-writable”</code> signal</h3>
4575 <pre class="programlisting"><span class="returnvalue">void</span>
4576 user_function (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> *agent,
4577                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a>      stream_id,
4578                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a>      component_id,
4579                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>   user_data)</pre>
4580 <p>This signal is fired on the reliable <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> when the underlying reliable
4581 transport becomes writable.
4582 This signal is only emitted when the <a class="link" href="NiceAgent.html#nice-agent-send" title="nice_agent_send ()"><code class="function">nice_agent_send()</code></a> function returns less
4583 bytes than requested to send (or -1) and once when the connection
4584 is established.</p>
4585 <div class="refsect3">
4586 <a name="NiceAgent-reliable-transport-writable.parameters"></a><h4>Parameters</h4>
4587 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4588 <colgroup>
4589 <col width="150px" class="parameters_name">
4590 <col class="parameters_description">
4591 <col width="200px" class="parameters_annotations">
4592 </colgroup>
4593 <tbody>
4594 <tr>
4595 <td class="parameter_name"><p>agent</p></td>
4596 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object</p></td>
4597 <td class="parameter_annotations"> </td>
4598 </tr>
4599 <tr>
4600 <td class="parameter_name"><p>stream_id</p></td>
4601 <td class="parameter_description"><p>The ID of the stream</p></td>
4602 <td class="parameter_annotations"> </td>
4603 </tr>
4604 <tr>
4605 <td class="parameter_name"><p>component_id</p></td>
4606 <td class="parameter_description"><p>The ID of the component</p></td>
4607 <td class="parameter_annotations"> </td>
4608 </tr>
4609 <tr>
4610 <td class="parameter_name"><p>user_data</p></td>
4611 <td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
4612 <td class="parameter_annotations"> </td>
4613 </tr>
4614 </tbody>
4615 </table></div>
4616 </div>
4617 <p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
4618 <p class="since">Since: <a class="link" href="ix08.html#api-index-0.0.11">0.0.11</a></p>
4619 </div>
4620 <hr>
4621 <div class="refsect2">
4622 <a name="NiceAgent-streams-removed"></a><h3>The <code class="literal">“streams-removed”</code> signal</h3>
4623 <pre class="programlisting"><span class="returnvalue">void</span>
4624 user_function (<a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a>           *agent,
4625                <span class="type">_NiceAgentStreamIds</span> *stream_ids,
4626                <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>             user_data)</pre>
4627 <p>This signal is fired whenever one or more streams are removed from the
4628 <em class="parameter"><code>agent</code></em>
4629 .</p>
4630 <div class="refsect3">
4631 <a name="NiceAgent-streams-removed.parameters"></a><h4>Parameters</h4>
4632 <div class="informaltable"><table class="informaltable" width="100%" border="0">
4633 <colgroup>
4634 <col width="150px" class="parameters_name">
4635 <col class="parameters_description">
4636 <col width="200px" class="parameters_annotations">
4637 </colgroup>
4638 <tbody>
4639 <tr>
4640 <td class="parameter_name"><p>agent</p></td>
4641 <td class="parameter_description"><p>The <a class="link" href="NiceAgent.html" title="NiceAgent"><span class="type">NiceAgent</span></a> object</p></td>
4642 <td class="parameter_annotations"> </td>
4643 </tr>
4644 <tr>
4645 <td class="parameter_name"><p>stream_ids</p></td>
4646 <td class="parameter_description"><p>An array of
4647 unsigned integer stream IDs, ending with a 0 ID. </p></td>
4648 <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> uint]</span></td>
4649 </tr>
4650 <tr>
4651 <td class="parameter_name"><p>user_data</p></td>
4652 <td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
4653 <td class="parameter_annotations"> </td>
4654 </tr>
4655 </tbody>
4656 </table></div>
4657 </div>
4658 <p>Flags: <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-RUN-LAST:CAPS">Run Last</a></p>
4659 <p class="since">Since: <a class="link" href="ix10.html#api-index-0.1.5">0.1.5</a></p>
4660 </div>
4661 </div>
4662 <div class="refsect1">
4663 <a name="NiceAgent.see-also"></a><h2>See Also</h2>
4664 <p><a class="link" href="NiceCandidate.html" title="NiceCandidate"><span class="type">NiceCandidate</span></a>, <a class="link" href="libnice-NiceAddress.html#NiceAddress" title="NiceAddress"><span class="type">NiceAddress</span></a></p>
4665 </div>
4666 </div>
4667 <div class="footer">
4668 <hr>Generated by GTK-Doc V1.29</div>
4669 </body>
4670 </html>