| address.h | | address.h | |
| /* | | /* | |
| * This file is part of the Nice GLib ICE library. | | * This file is part of the Nice GLib ICE library. | |
| * | | * | |
|
| * (C) 2006, 2007 Collabora Ltd. | | * (C) 2006-2009 Collabora Ltd. | |
| * Contact: Dafydd Harries | | * Contact: Youness Alaoui | |
| * (C) 2006, 2007 Nokia Corporation. All rights reserved. | | * (C) 2006-2009 Nokia Corporation. All rights reserved. | |
| * Contact: Kai Vehmanen | | * Contact: Kai Vehmanen | |
| * | | * | |
| * The contents of this file are subject to the Mozilla Public License Vers
ion | | * The contents of this file are subject to the Mozilla Public License Vers
ion | |
| * 1.1 (the "License"); you may not use this file except in compliance with | | * 1.1 (the "License"); you may not use this file except in compliance with | |
| * the License. You may obtain a copy of the License at | | * the License. You may obtain a copy of the License at | |
| * http://www.mozilla.org/MPL/ | | * http://www.mozilla.org/MPL/ | |
| * | | * | |
| * Software distributed under the License is distributed on an "AS IS" basi
s, | | * Software distributed under the License is distributed on an "AS IS" basi
s, | |
| * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | |
| * for the specific language governing rights and limitations under the | | * for the specific language governing rights and limitations under the | |
| * License. | | * License. | |
| * | | * | |
| * The Original Code is the Nice GLib ICE library. | | * The Original Code is the Nice GLib ICE library. | |
| * | | * | |
| * The Initial Developers of the Original Code are Collabora Ltd and Nokia | | * The Initial Developers of the Original Code are Collabora Ltd and Nokia | |
| * Corporation. All Rights Reserved. | | * Corporation. All Rights Reserved. | |
| * | | * | |
| * Contributors: | | * Contributors: | |
|
| | | * Youness Alaoui, Collabora Ltd. | |
| * Dafydd Harries, Collabora Ltd. | | * Dafydd Harries, Collabora Ltd. | |
|
| | | * Kai Vehmanen | |
| * | | * | |
| * Alternatively, the contents of this file may be used under the terms of
the | | * Alternatively, the contents of this file may be used under the terms of
the | |
| * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which | | * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which | |
| * case the provisions of LGPL are applicable instead of those above. If yo
u | | * case the provisions of LGPL are applicable instead of those above. If yo
u | |
| * wish to allow use of your version of this file only under the terms of t
he | | * wish to allow use of your version of this file only under the terms of t
he | |
| * LGPL and not to allow others to use your version of this file under the | | * LGPL and not to allow others to use your version of this file under the | |
| * MPL, indicate your decision by deleting the provisions above and replace | | * MPL, indicate your decision by deleting the provisions above and replace | |
| * them with the notice and other provisions required by the LGPL. If you d
o | | * them with the notice and other provisions required by the LGPL. If you d
o | |
| * not delete the provisions above, a recipient may use your version of thi
s | | * not delete the provisions above, a recipient may use your version of thi
s | |
| * file under either the MPL or the LGPL. | | * file under either the MPL or the LGPL. | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 5 lines changed or added | |
|
| agent.h | | agent.h | |
| /* | | /* | |
| * This file is part of the Nice GLib ICE library. | | * This file is part of the Nice GLib ICE library. | |
| * | | * | |
|
| * (C) 2006, 2007 Collabora Ltd. | | * (C) 2006-2010 Collabora Ltd. | |
| * Contact: Dafydd Harries | | * Contact: Youness Alaoui | |
| * (C) 2006, 2007 Nokia Corporation. All rights reserved. | | * (C) 2006-2010 Nokia Corporation. All rights reserved. | |
| * Contact: Kai Vehmanen | | * Contact: Kai Vehmanen | |
| * | | * | |
| * The contents of this file are subject to the Mozilla Public License Vers
ion | | * The contents of this file are subject to the Mozilla Public License Vers
ion | |
| * 1.1 (the "License"); you may not use this file except in compliance with | | * 1.1 (the "License"); you may not use this file except in compliance with | |
| * the License. You may obtain a copy of the License at | | * the License. You may obtain a copy of the License at | |
| * http://www.mozilla.org/MPL/ | | * http://www.mozilla.org/MPL/ | |
| * | | * | |
| * Software distributed under the License is distributed on an "AS IS" basi
s, | | * Software distributed under the License is distributed on an "AS IS" basi
s, | |
| * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | |
| * for the specific language governing rights and limitations under the | | * for the specific language governing rights and limitations under the | |
| * License. | | * License. | |
| * | | * | |
| * The Original Code is the Nice GLib ICE library. | | * The Original Code is the Nice GLib ICE library. | |
| * | | * | |
| * The Initial Developers of the Original Code are Collabora Ltd and Nokia | | * The Initial Developers of the Original Code are Collabora Ltd and Nokia | |
| * Corporation. All Rights Reserved. | | * Corporation. All Rights Reserved. | |
| * | | * | |
| * Contributors: | | * Contributors: | |
| * Dafydd Harries, Collabora Ltd. | | * Dafydd Harries, Collabora Ltd. | |
|
| | | * Youness Alaoui, Collabora Ltd. | |
| * Kai Vehmanen, Nokia | | * Kai Vehmanen, Nokia | |
| * | | * | |
| * Alternatively, the contents of this file may be used under the terms of
the | | * Alternatively, the contents of this file may be used under the terms of
the | |
| * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which | | * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which | |
| * case the provisions of LGPL are applicable instead of those above. If yo
u | | * case the provisions of LGPL are applicable instead of those above. If yo
u | |
| * wish to allow use of your version of this file only under the terms of t
he | | * wish to allow use of your version of this file only under the terms of t
he | |
| * LGPL and not to allow others to use your version of this file under the | | * LGPL and not to allow others to use your version of this file under the | |
| * MPL, indicate your decision by deleting the provisions above and replace | | * MPL, indicate your decision by deleting the provisions above and replace | |
| * them with the notice and other provisions required by the LGPL. If you d
o | | * them with the notice and other provisions required by the LGPL. If you d
o | |
| * not delete the provisions above, a recipient may use your version of thi
s | | * not delete the provisions above, a recipient may use your version of thi
s | |
| | | | |
| skipping to change at line 233 | | skipping to change at line 234 | |
| /** | | /** | |
| * NiceProxyType: | | * NiceProxyType: | |
| * @NICE_PROXY_TYPE_NONE: Do not use a proxy | | * @NICE_PROXY_TYPE_NONE: Do not use a proxy | |
| * @NICE_PROXY_TYPE_SOCKS5: Use a SOCKS5 proxy | | * @NICE_PROXY_TYPE_SOCKS5: Use a SOCKS5 proxy | |
| * @NICE_PROXY_TYPE_HTTP: Use an HTTP proxy | | * @NICE_PROXY_TYPE_HTTP: Use an HTTP proxy | |
| * @NICE_PROXY_TYPE_LAST: Dummy last proxy type | | * @NICE_PROXY_TYPE_LAST: Dummy last proxy type | |
| * | | * | |
| * An enum to specify which proxy type to use for relaying. | | * An enum to specify which proxy type to use for relaying. | |
| * Note that the proxies will only be used with TCP TURN relaying. | | * Note that the proxies will only be used with TCP TURN relaying. | |
| * <para> See also: #NiceAgent:proxy-type </para> | | * <para> See also: #NiceAgent:proxy-type </para> | |
|
| | | * | |
| | | * Since: 0.0.4 | |
| */ | | */ | |
| typedef enum | | typedef enum | |
| { | | { | |
| NICE_PROXY_TYPE_NONE = 0, | | NICE_PROXY_TYPE_NONE = 0, | |
| NICE_PROXY_TYPE_SOCKS5, | | NICE_PROXY_TYPE_SOCKS5, | |
| NICE_PROXY_TYPE_HTTP, | | NICE_PROXY_TYPE_HTTP, | |
| NICE_PROXY_TYPE_LAST = NICE_PROXY_TYPE_HTTP, | | NICE_PROXY_TYPE_LAST = NICE_PROXY_TYPE_HTTP, | |
| } NiceProxyType; | | } NiceProxyType; | |
| | | | |
| /** | | /** | |
| | | | |
| skipping to change at line 273 | | skipping to change at line 276 | |
| * | | * | |
| * Create a new #NiceAgent. | | * Create a new #NiceAgent. | |
| * The returned object must be freed with g_object_unref() | | * The returned object must be freed with g_object_unref() | |
| * | | * | |
| * Returns: The new agent GObject | | * Returns: The new agent GObject | |
| */ | | */ | |
| NiceAgent * | | NiceAgent * | |
| nice_agent_new (GMainContext *ctx, NiceCompatibility compat); | | nice_agent_new (GMainContext *ctx, NiceCompatibility compat); | |
| | | | |
| /** | | /** | |
|
| | | * nice_agent_new_reliable: | |
| | | * @ctx: The Glib Mainloop Context to use for timers | |
| | | * @compat: The compatibility mode of the agent | |
| | | * | |
| | | * Create a new #NiceAgent in reliable mode, which uses #PseudoTcpSocket to | |
| | | * assure reliability of the messages. | |
| | | * The returned object must be freed with g_object_unref() | |
| | | * <para> See also: #NiceAgent::reliable-transport-writable </para> | |
| | | * | |
| | | * Since: 0.0.11 | |
| | | * | |
| | | * Returns: The new agent GObject | |
| | | */ | |
| | | NiceAgent * | |
| | | nice_agent_new_reliable (GMainContext *ctx, NiceCompatibility compat); | |
| | | | |
| | | /** | |
| * nice_agent_add_local_address: | | * nice_agent_add_local_address: | |
| * @agent: The #NiceAgent Object | | * @agent: The #NiceAgent Object | |
| * @addr: The address to listen to | | * @addr: The address to listen to | |
| * If the port is 0, then a random port will be chosen by the system | | * If the port is 0, then a random port will be chosen by the system | |
| * | | * | |
|
| * Add a local address from which to derive local host candidates | | * Add a local address from which to derive local host candidates for | |
| | | * candidate gathering. | |
| | | * <para> | |
| | | * Since 0.0.5, if this method is not called, libnice will automatically | |
| | | * discover the local addresses available | |
| | | * </para> | |
| * | | * | |
|
| | | * See also: nice_agent_gather_candidates() | |
| * Returns: %TRUE on success, %FALSE on fatal (memory allocation) errors | | * Returns: %TRUE on success, %FALSE on fatal (memory allocation) errors | |
| */ | | */ | |
| gboolean | | gboolean | |
| nice_agent_add_local_address (NiceAgent *agent, NiceAddress *addr); | | nice_agent_add_local_address (NiceAgent *agent, NiceAddress *addr); | |
| | | | |
| /** | | /** | |
| * nice_agent_add_stream: | | * nice_agent_add_stream: | |
| * @agent: The #NiceAgent Object | | * @agent: The #NiceAgent Object | |
| * @n_components: The number of components to add to the stream | | * @n_components: The number of components to add to the stream | |
| * | | * | |
| | | | |
| skipping to change at line 346 | | skipping to change at line 372 | |
| NiceRelayType type); | | NiceRelayType type); | |
| | | | |
| /** | | /** | |
| * nice_agent_gather_candidates: | | * nice_agent_gather_candidates: | |
| * @agent: The #NiceAgent Object | | * @agent: The #NiceAgent Object | |
| * @stream_id: The id of the stream to start | | * @stream_id: The id of the stream to start | |
| * | | * | |
| * Start the candidate gathering process. | | * Start the candidate gathering process. | |
| * Once done, #NiceAgent::candidate-gathering-done is called for the stream | | * Once done, #NiceAgent::candidate-gathering-done is called for the stream | |
| * | | * | |
|
| | | * See also: nice_agent_add_local_address() | |
| <note> | | <note> | |
| <para> | | <para> | |
| Local addresses can be previously set with nice_agent_add_local_address
() | | Local addresses can be previously set with nice_agent_add_local_address
() | |
| </para> | | </para> | |
| <para> | | <para> | |
|
| If no local address was previously added, then the nice agent will | | Since 0.0.5, If no local address was previously added, then the nice ag | |
| automatically detect the local address using nice_interfaces_get_local_ | | ent | |
| ips() | | will automatically detect the local address using | |
| | | nice_interfaces_get_local_ips() | |
| </para> | | </para> | |
| </note> | | </note> | |
| */ | | */ | |
| void | | void | |
| nice_agent_gather_candidates ( | | nice_agent_gather_candidates ( | |
| NiceAgent *agent, | | NiceAgent *agent, | |
| guint stream_id); | | guint stream_id); | |
| | | | |
| /** | | /** | |
| * nice_agent_set_remote_credentials: | | * nice_agent_set_remote_credentials: | |
| | | | |
| skipping to change at line 479 | | skipping to change at line 507 | |
| * @component_id: The ID of the component | | * @component_id: The ID of the component | |
| * | | * | |
| * Retreive from the agent the list of all local candidates | | * Retreive from the agent the list of all local candidates | |
| * for a stream's component | | * for a stream's component | |
| * | | * | |
| <note> | | <note> | |
| <para> | | <para> | |
| The caller owns the returned GSList as well as the candidates containe
d | | The caller owns the returned GSList as well as the candidates containe
d | |
| within it. | | within it. | |
| To get full results, the client should wait for the | | To get full results, the client should wait for the | |
|
| #NiceAgent::candidates-gathering-done signal. | | #NiceAgent::candidate-gathering-done signal. | |
| </para> | | </para> | |
| </note> | | </note> | |
| * | | * | |
| * Returns: a #GSList of #NiceCandidate objects representing | | * Returns: a #GSList of #NiceCandidate objects representing | |
| * the local candidates of @agent | | * the local candidates of @agent | |
| **/ | | **/ | |
| GSList * | | GSList * | |
| nice_agent_get_local_candidates ( | | nice_agent_get_local_candidates ( | |
| NiceAgent *agent, | | NiceAgent *agent, | |
| guint stream_id, | | guint stream_id, | |
| | | | |
| skipping to change at line 616 | | skipping to change at line 644 | |
| NiceCandidate *candidate); | | NiceCandidate *candidate); | |
| | | | |
| /** | | /** | |
| * nice_agent_set_stream_tos: | | * nice_agent_set_stream_tos: | |
| * @agent: The #NiceAgent Object | | * @agent: The #NiceAgent Object | |
| * @stream_id: The ID of the stream | | * @stream_id: The ID of the stream | |
| * @tos: The ToS to set | | * @tos: The ToS to set | |
| * | | * | |
| * Sets the IP_TOS and/or IPV6_TCLASS field on the stream's sockets' option
s | | * Sets the IP_TOS and/or IPV6_TCLASS field on the stream's sockets' option
s | |
| * | | * | |
|
| | | * Since: 0.0.9 | |
| */ | | */ | |
| void nice_agent_set_stream_tos ( | | void nice_agent_set_stream_tos ( | |
| NiceAgent *agent, | | NiceAgent *agent, | |
| guint stream_id, | | guint stream_id, | |
| gint tos); | | gint tos); | |
| | | | |
| /** | | /** | |
| * nice_agent_set_software: | | * nice_agent_set_software: | |
| * @agent: The #NiceAgent Object | | * @agent: The #NiceAgent Object | |
| * @software: The value of the SOFTWARE attribute to add. | | * @software: The value of the SOFTWARE attribute to add. | |
| * | | * | |
| * This function will set the value of the SOFTWARE attribute to be added t
o | | * This function will set the value of the SOFTWARE attribute to be added t
o | |
| * STUN requests, responses and error responses sent during connectivity ch
ecks. | | * STUN requests, responses and error responses sent during connectivity ch
ecks. | |
| * <para> | | * <para> | |
| * The SOFTWARE attribute will only be added in the #NICE_COMPATIBILITY_DRA
FT19 | | * The SOFTWARE attribute will only be added in the #NICE_COMPATIBILITY_DRA
FT19 | |
| * and #NICE_COMPATIBILITY_WLM2009 compatibility modes. | | * and #NICE_COMPATIBILITY_WLM2009 compatibility modes. | |
|
| | | * | |
| * </para> | | * </para> | |
| * <note> | | * <note> | |
| <para> | | <para> | |
| The @software argument will be appended with the libnice version bef
ore | | The @software argument will be appended with the libnice version bef
ore | |
| being sent. | | being sent. | |
| </para> | | </para> | |
| <para> | | <para> | |
| The @software argument must be in UTF-8 encoding and only the first | | The @software argument must be in UTF-8 encoding and only the first | |
| 128 characters will be sent. | | 128 characters will be sent. | |
| </para> | | </para> | |
| </note> | | </note> | |
| * | | * | |
|
| | | * Since: 0.0.10 | |
| | | * | |
| */ | | */ | |
| void nice_agent_set_software (NiceAgent *agent, const gchar *software); | | void nice_agent_set_software (NiceAgent *agent, const gchar *software); | |
| | | | |
| G_END_DECLS | | G_END_DECLS | |
| | | | |
| #endif /* _AGENT_H */ | | #endif /* _AGENT_H */ | |
| | | | |
End of changes. 12 change blocks. |
| 8 lines changed or deleted | | 40 lines changed or added | |
|
| bind.h | | bind.h | |
| /* | | /* | |
| * This file is part of the Nice GLib ICE library. | | * This file is part of the Nice GLib ICE library. | |
| * | | * | |
|
| * (C) 2007 Nokia Corporation. All rights reserved. | | * (C) 2008-2009 Collabora Ltd. | |
| | | * Contact: Youness Alaoui | |
| | | * (C) 2007-2009 Nokia Corporation. All rights reserved. | |
| * Contact: Rémi Denis-Courmont | | * Contact: Rémi Denis-Courmont | |
| * | | * | |
| * The contents of this file are subject to the Mozilla Public License Vers
ion | | * The contents of this file are subject to the Mozilla Public License Vers
ion | |
| * 1.1 (the "License"); you may not use this file except in compliance with | | * 1.1 (the "License"); you may not use this file except in compliance with | |
| * the License. You may obtain a copy of the License at | | * the License. You may obtain a copy of the License at | |
| * http://www.mozilla.org/MPL/ | | * http://www.mozilla.org/MPL/ | |
| * | | * | |
| * Software distributed under the License is distributed on an "AS IS" basi
s, | | * Software distributed under the License is distributed on an "AS IS" basi
s, | |
| * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | |
| * for the specific language governing rights and limitations under the | | * for the specific language governing rights and limitations under the | |
| * License. | | * License. | |
| * | | * | |
| * The Original Code is the Nice GLib ICE library. | | * The Original Code is the Nice GLib ICE library. | |
| * | | * | |
| * The Initial Developers of the Original Code are Collabora Ltd and Nokia | | * The Initial Developers of the Original Code are Collabora Ltd and Nokia | |
| * Corporation. All Rights Reserved. | | * Corporation. All Rights Reserved. | |
| * | | * | |
| * Contributors: | | * Contributors: | |
|
| | | * Youness Alaoui, Collabora Ltd. | |
| * Rémi Denis-Courmont, Nokia | | * Rémi Denis-Courmont, Nokia | |
| * | | * | |
| * Alternatively, the contents of this file may be used under the terms of
the | | * Alternatively, the contents of this file may be used under the terms of
the | |
| * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which | | * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which | |
| * case the provisions of LGPL are applicable instead of those above. If yo
u | | * case the provisions of LGPL are applicable instead of those above. If yo
u | |
| * wish to allow use of your version of this file only under the terms of t
he | | * wish to allow use of your version of this file only under the terms of t
he | |
| * LGPL and not to allow others to use your version of this file under the | | * LGPL and not to allow others to use your version of this file under the | |
| * MPL, indicate your decision by deleting the provisions above and replace | | * MPL, indicate your decision by deleting the provisions above and replace | |
| * them with the notice and other provisions required by the LGPL. If you d
o | | * them with the notice and other provisions required by the LGPL. If you d
o | |
| * not delete the provisions above, a recipient may use your version of thi
s | | * not delete the provisions above, a recipient may use your version of thi
s | |
| | | | |
| skipping to change at line 147 | | skipping to change at line 150 | |
| /** | | /** | |
| * stun_usage_bind_run: | | * stun_usage_bind_run: | |
| * @srv: A pointer to the #sockaddr structure representing the STUN server'
s | | * @srv: A pointer to the #sockaddr structure representing the STUN server'
s | |
| * address | | * address | |
| * @srvlen: The length of @srv | | * @srvlen: The length of @srv | |
| * @addr: A pointer to a #sockaddr structure to fill with the mapped addres
s | | * @addr: A pointer to a #sockaddr structure to fill with the mapped addres
s | |
| * that the STUN server gives us | | * that the STUN server gives us | |
| * @addrlen: The length of @addr | | * @addrlen: The length of @addr | |
| * | | * | |
| * This is a convenience function that will do a synchronous Binding reques
t to | | * This is a convenience function that will do a synchronous Binding reques
t to | |
|
| * a server and wait for its answer. It will use the #StunUsageTrans and | | * a server and wait for its answer. It will create the socket transports a | |
| * #StunUsageTimer usages to send the request and handle the response. | | nd | |
| | | * use the #StunTimer usage to send the request and handle the response. | |
| * Returns: A #StunUsageBindReturn. | | * Returns: A #StunUsageBindReturn. | |
| * Possible return values are #STUN_USAGE_BIND_RETURN_SUCCESS, | | * Possible return values are #STUN_USAGE_BIND_RETURN_SUCCESS, | |
| * #STUN_USAGE_BIND_RETURN_ERROR and #STUN_USAGE_BIND_RETURN_TIMEOUT | | * #STUN_USAGE_BIND_RETURN_ERROR and #STUN_USAGE_BIND_RETURN_TIMEOUT | |
| */ | | */ | |
| StunUsageBindReturn stun_usage_bind_run (const struct sockaddr *srv, | | StunUsageBindReturn stun_usage_bind_run (const struct sockaddr *srv, | |
| socklen_t srvlen, struct sockaddr *addr, socklen_t *addrlen); | | socklen_t srvlen, struct sockaddr *addr, socklen_t *addrlen); | |
| | | | |
| # ifdef __cplusplus | | # ifdef __cplusplus | |
| } | | } | |
| # endif | | # endif | |
| | | | |
End of changes. 3 change blocks. |
| 3 lines changed or deleted | | 7 lines changed or added | |
|
| candidate.h | | candidate.h | |
| /* | | /* | |
| * This file is part of the Nice GLib ICE library. | | * This file is part of the Nice GLib ICE library. | |
| * | | * | |
|
| * (C) 2006, 2007 Collabora Ltd. | | * (C) 2006-2009 Collabora Ltd. | |
| * Contact: Dafydd Harries | | * Contact: Youness Alaoui | |
| * (C) 2006, 2007 Nokia Corporation. All rights reserved. | | * (C) 2006-2009 Nokia Corporation. All rights reserved. | |
| * Contact: Kai Vehmanen | | * Contact: Kai Vehmanen | |
| * | | * | |
| * The contents of this file are subject to the Mozilla Public License Vers
ion | | * The contents of this file are subject to the Mozilla Public License Vers
ion | |
| * 1.1 (the "License"); you may not use this file except in compliance with | | * 1.1 (the "License"); you may not use this file except in compliance with | |
| * the License. You may obtain a copy of the License at | | * the License. You may obtain a copy of the License at | |
| * http://www.mozilla.org/MPL/ | | * http://www.mozilla.org/MPL/ | |
| * | | * | |
| * Software distributed under the License is distributed on an "AS IS" basi
s, | | * Software distributed under the License is distributed on an "AS IS" basi
s, | |
| * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | |
| * for the specific language governing rights and limitations under the | | * for the specific language governing rights and limitations under the | |
| * License. | | * License. | |
| * | | * | |
| * The Original Code is the Nice GLib ICE library. | | * The Original Code is the Nice GLib ICE library. | |
| * | | * | |
| * The Initial Developers of the Original Code are Collabora Ltd and Nokia | | * The Initial Developers of the Original Code are Collabora Ltd and Nokia | |
| * Corporation. All Rights Reserved. | | * Corporation. All Rights Reserved. | |
| * | | * | |
| * Contributors: | | * Contributors: | |
| * Dafydd Harries, Collabora Ltd. | | * Dafydd Harries, Collabora Ltd. | |
|
| | | * Youness Alaoui, Collabora Ltd. | |
| * Kai Vehmanen, Nokia | | * Kai Vehmanen, Nokia | |
| * | | * | |
| * Alternatively, the contents of this file may be used under the terms of
the | | * Alternatively, the contents of this file may be used under the terms of
the | |
| * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which | | * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which | |
| * case the provisions of LGPL are applicable instead of those above. If yo
u | | * case the provisions of LGPL are applicable instead of those above. If yo
u | |
| * wish to allow use of your version of this file only under the terms of t
he | | * wish to allow use of your version of this file only under the terms of t
he | |
| * LGPL and not to allow others to use your version of this file under the | | * LGPL and not to allow others to use your version of this file under the | |
| * MPL, indicate your decision by deleting the provisions above and replace | | * MPL, indicate your decision by deleting the provisions above and replace | |
| * them with the notice and other provisions required by the LGPL. If you d
o | | * them with the notice and other provisions required by the LGPL. If you d
o | |
| * not delete the provisions above, a recipient may use your version of thi
s | | * not delete the provisions above, a recipient may use your version of thi
s | |
| | | | |
| skipping to change at line 56 | | skipping to change at line 57 | |
| * @stability: Stable | | * @stability: Stable | |
| * | | * | |
| * A representation of an ICE candidate. Make sure you read the ICE drafts[
1] to | | * A representation of an ICE candidate. Make sure you read the ICE drafts[
1] to | |
| * understand correctly the concept of ICE candidates. | | * understand correctly the concept of ICE candidates. | |
| * | | * | |
| * [1] http://tools.ietf.org/wg/mmusic/draft-ietf-mmusic-ice/ | | * [1] http://tools.ietf.org/wg/mmusic/draft-ietf-mmusic-ice/ | |
| */ | | */ | |
| | | | |
| G_BEGIN_DECLS | | G_BEGIN_DECLS | |
| | | | |
|
| #include "socket.h" | | | |
| | | | |
| #define NICE_CANDIDATE_TYPE_PREF_HOST 120 | | #define NICE_CANDIDATE_TYPE_PREF_HOST 120 | |
| #define NICE_CANDIDATE_TYPE_PREF_PEER_REFLEXIVE 110 | | #define NICE_CANDIDATE_TYPE_PREF_PEER_REFLEXIVE 110 | |
| #define NICE_CANDIDATE_TYPE_PREF_SERVER_REFLEXIVE 100 | | #define NICE_CANDIDATE_TYPE_PREF_SERVER_REFLEXIVE 100 | |
| #define NICE_CANDIDATE_TYPE_PREF_RELAYED 60 | | #define NICE_CANDIDATE_TYPE_PREF_RELAYED 60 | |
| | | | |
| /* Max foundation size '1*32ice-char' plus terminating NULL, ICE ID-19 */ | | /* Max foundation size '1*32ice-char' plus terminating NULL, ICE ID-19 */ | |
| /** | | /** | |
| * NICE_CANDIDATE_MAX_FOUNDATION: | | * NICE_CANDIDATE_MAX_FOUNDATION: | |
| * | | * | |
| * The maximum size a candidate foundation can have. | | * The maximum size a candidate foundation can have. | |
| | | | |
| skipping to change at line 175 | | skipping to change at line 174 | |
| NiceCandidateTransport transport; | | NiceCandidateTransport transport; | |
| NiceAddress addr; | | NiceAddress addr; | |
| NiceAddress base_addr; | | NiceAddress base_addr; | |
| guint32 priority; | | guint32 priority; | |
| guint stream_id; | | guint stream_id; | |
| guint component_id; | | guint component_id; | |
| gchar foundation[NICE_CANDIDATE_MAX_FOUNDATION]; | | gchar foundation[NICE_CANDIDATE_MAX_FOUNDATION]; | |
| gchar *username; /* pointer to a NULL-terminated username string *
/ | | gchar *username; /* pointer to a NULL-terminated username string *
/ | |
| gchar *password; /* pointer to a NULL-terminated password string *
/ | | gchar *password; /* pointer to a NULL-terminated password string *
/ | |
| TurnServer *turn; | | TurnServer *turn; | |
|
| NiceSocket *sockptr; | | gpointer sockptr; | |
| }; | | }; | |
| | | | |
| /** | | /** | |
| * nice_candidate_new: | | * nice_candidate_new: | |
| * @type: The #NiceCandidateType of the candidate to create | | * @type: The #NiceCandidateType of the candidate to create | |
| * | | * | |
| * Creates a new candidate. Must be freed with nice_candidate_free() | | * Creates a new candidate. Must be freed with nice_candidate_free() | |
| * | | * | |
| * Returns: A new #NiceCandidate | | * Returns: A new #NiceCandidate | |
| */ | | */ | |
| | | | |
End of changes. 4 change blocks. |
| 6 lines changed or deleted | | 5 lines changed or added | |
|
| constants.h | | constants.h | |
| /* | | /* | |
| * This file is part of the Nice GLib ICE library. | | * This file is part of the Nice GLib ICE library. | |
| * | | * | |
| * (C) 2008 Collabora Ltd. | | * (C) 2008 Collabora Ltd. | |
|
| * (C) 2008 Nokia Corporation. All rights reserved. | | | |
| * Contact: Youness Alaoui | | * Contact: Youness Alaoui | |
|
| | | * (C) 2008 Nokia Corporation. All rights reserved. | |
| * | | * | |
| * The contents of this file are subject to the Mozilla Public License Vers
ion | | * The contents of this file are subject to the Mozilla Public License Vers
ion | |
| * 1.1 (the "License"); you may not use this file except in compliance with | | * 1.1 (the "License"); you may not use this file except in compliance with | |
| * the License. You may obtain a copy of the License at | | * the License. You may obtain a copy of the License at | |
| * http://www.mozilla.org/MPL/ | | * http://www.mozilla.org/MPL/ | |
| * | | * | |
| * Software distributed under the License is distributed on an "AS IS" basi
s, | | * Software distributed under the License is distributed on an "AS IS" basi
s, | |
| * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | |
| * for the specific language governing rights and limitations under the | | * for the specific language governing rights and limitations under the | |
| * License. | | * License. | |
| * | | * | |
| * The Original Code is the Nice GLib ICE library. | | * The Original Code is the Nice GLib ICE library. | |
| * | | * | |
| * The Initial Developers of the Original Code are Collabora Ltd and Nokia | | * The Initial Developers of the Original Code are Collabora Ltd and Nokia | |
| * Corporation. All Rights Reserved. | | * Corporation. All Rights Reserved. | |
| * | | * | |
|
| | | * Contributors: | |
| | | * Youness Alaoui, Collabora Ltd. | |
| * | | * | |
| * Alternatively, the contents of this file may be used under the terms of
the | | * Alternatively, the contents of this file may be used under the terms of
the | |
| * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which | | * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which | |
| * case the provisions of LGPL are applicable instead of those above. If yo
u | | * case the provisions of LGPL are applicable instead of those above. If yo
u | |
| * wish to allow use of your version of this file only under the terms of t
he | | * wish to allow use of your version of this file only under the terms of t
he | |
| * LGPL and not to allow others to use your version of this file under the | | * LGPL and not to allow others to use your version of this file under the | |
| * MPL, indicate your decision by deleting the provisions above and replace | | * MPL, indicate your decision by deleting the provisions above and replace | |
| * them with the notice and other provisions required by the LGPL. If you d
o | | * them with the notice and other provisions required by the LGPL. If you d
o | |
| * not delete the provisions above, a recipient may use your version of thi
s | | * not delete the provisions above, a recipient may use your version of thi
s | |
| * file under either the MPL or the LGPL. | | * file under either the MPL or the LGPL. | |
| | | | |
End of changes. 3 change blocks. |
| 1 lines changed or deleted | | 3 lines changed or added | |
|
| debug.h | | debug.h | |
| /* | | /* | |
| * This file is part of the Nice GLib ICE library. | | * This file is part of the Nice GLib ICE library. | |
| * | | * | |
| * (C) 2008 Collabora Ltd. | | * (C) 2008 Collabora Ltd. | |
|
| | | * Contact: Youness Alaoui | |
| * (C) 2008 Nokia Corporation. All rights reserved. | | * (C) 2008 Nokia Corporation. All rights reserved. | |
| * | | * | |
| * The contents of this file are subject to the Mozilla Public License Vers
ion | | * The contents of this file are subject to the Mozilla Public License Vers
ion | |
| * 1.1 (the "License"); you may not use this file except in compliance with | | * 1.1 (the "License"); you may not use this file except in compliance with | |
| * the License. You may obtain a copy of the License at | | * the License. You may obtain a copy of the License at | |
| * http://www.mozilla.org/MPL/ | | * http://www.mozilla.org/MPL/ | |
| * | | * | |
| * Software distributed under the License is distributed on an "AS IS" basi
s, | | * Software distributed under the License is distributed on an "AS IS" basi
s, | |
| * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | |
| * for the specific language governing rights and limitations under the | | * for the specific language governing rights and limitations under the | |
| | | | |
| skipping to change at line 42 | | skipping to change at line 43 | |
| * not delete the provisions above, a recipient may use your version of thi
s | | * not delete the provisions above, a recipient may use your version of thi
s | |
| * file under either the MPL or the LGPL. | | * file under either the MPL or the LGPL. | |
| */ | | */ | |
| | | | |
| #ifndef _DEBUG_H | | #ifndef _DEBUG_H | |
| #define _DEBUG_H | | #define _DEBUG_H | |
| | | | |
| /** | | /** | |
| * SECTION:debug | | * SECTION:debug | |
| * @short_description: Debug messages utility functions | | * @short_description: Debug messages utility functions | |
|
| * @stability: More flags are to come and a better API to | | * @stability: Unstable | |
| * enable/disable each flag should be added. Unstable | | | |
| * | | * | |
|
| * Libnice can output a lot of information when debug messages are enabled. | | * <para>Libnice can output a lot of information when debug messages are en
abled. | |
| * This can significantly help track down problems and/or understand what | | * This can significantly help track down problems and/or understand what | |
|
| * it's doing. | | * it's doing.</para> | |
| * You can enable/disable the debug messages by calling nice_debug_enable() | | * | |
| | | * <para>You can enable/disable the debug messages by calling nice_debug_en | |
| | | able() | |
| * or nice_debug_disable() and choosing whether you want only ICE debug mes
sages | | * or nice_debug_disable() and choosing whether you want only ICE debug mes
sages | |
|
| * or also stun debug messages. | | * or also stun debug messages.</para> | |
| * By default, the debug messages are disabled, unless the environment vari | | * | |
| able | | * <para>By default, the debug messages are disabled, unless the environmen | |
| * NICE_DEBUG is set, in which case, it must contain a comma separated list | | t | |
| of | | * variable NICE_DEBUG is set, in which case, it must contain a comma separ | |
| * flags specifying which debug to enable. The flags can be "nice", "stun", | | ated | |
| * or "all" to enable all debug messages. | | * list of flags specifying which debug to enable.</para> | |
| | | * <para> The currently available flags are "nice", "stun", "pseudotcp", | |
| | | * "pseudotcp-verbose" or "all" to enable all debug messages.</para> | |
| | | * <para> If the 'pseudotcp' flag is enabled, then 'pseudotcp-verbose' gets | |
| | | * automatically disabled. This is to allow the use of the 'all' flag witho | |
| | | ut | |
| | | * having verbose messages from pseudotcp. You can enable verbose debug mes | |
| | | sages | |
| | | * from the pseudotcp layer by specifying 'pseudotcp-verbose' without the | |
| | | * 'pseudotcp' flag.</para> | |
| | | * | |
| | | * | |
| | | * <para>This API is unstable and is subject to change at any time... | |
| | | * More flags are to come and a better API to enable/disable each flag | |
| | | * should be added.</para> | |
| */ | | */ | |
| | | | |
| #include <glib.h> | | #include <glib.h> | |
| | | | |
|
| | | G_BEGIN_DECLS | |
| | | | |
| /** | | /** | |
| * nice_debug_init: | | * nice_debug_init: | |
| * | | * | |
| * Initialize the debugging system. Uses the NICE_DEBUG environment variabl
e | | * Initialize the debugging system. Uses the NICE_DEBUG environment variabl
e | |
| * to set the appropriate debugging flags | | * to set the appropriate debugging flags | |
| */ | | */ | |
| void nice_debug_init (void); | | void nice_debug_init (void); | |
| | | | |
| /** | | /** | |
| * nice_debug_enable: | | * nice_debug_enable: | |
| | | | |
| skipping to change at line 85 | | skipping to change at line 100 | |
| /** | | /** | |
| * nice_debug_disable: | | * nice_debug_disable: | |
| * @with_stun: Also disable stun debugging messages | | * @with_stun: Also disable stun debugging messages | |
| * | | * | |
| * Disables libnice debug output to the terminal | | * Disables libnice debug output to the terminal | |
| */ | | */ | |
| void nice_debug_disable (gboolean with_stun); | | void nice_debug_disable (gboolean with_stun); | |
| | | | |
| void nice_debug (const char *fmt, ...); | | void nice_debug (const char *fmt, ...); | |
| | | | |
|
| | | G_END_DECLS | |
| | | | |
| #endif /* _DEBUG_H */ | | #endif /* _DEBUG_H */ | |
| | | | |
End of changes. 7 change blocks. |
| 12 lines changed or deleted | | 32 lines changed or added | |
|
| ice.h | | ice.h | |
| | | | |
| /* | | /* | |
| * This file is part of the Nice GLib ICE library. | | * This file is part of the Nice GLib ICE library. | |
| * | | * | |
|
| * (C) 2007 Nokia Corporation. All rights reserved. | | * (C) 2008-2009 Collabora Ltd. | |
| | | * Contact: Youness Alaoui | |
| | | * (C) 2007-2009 Nokia Corporation. All rights reserved. | |
| * Contact: Rémi Denis-Courmont | | * Contact: Rémi Denis-Courmont | |
| * | | * | |
| * The contents of this file are subject to the Mozilla Public License Vers
ion | | * The contents of this file are subject to the Mozilla Public License Vers
ion | |
| * 1.1 (the "License"); you may not use this file except in compliance with | | * 1.1 (the "License"); you may not use this file except in compliance with | |
| * the License. You may obtain a copy of the License at | | * the License. You may obtain a copy of the License at | |
| * http://www.mozilla.org/MPL/ | | * http://www.mozilla.org/MPL/ | |
| * | | * | |
| * Software distributed under the License is distributed on an "AS IS" basi
s, | | * Software distributed under the License is distributed on an "AS IS" basi
s, | |
| * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | |
| * for the specific language governing rights and limitations under the | | * for the specific language governing rights and limitations under the | |
| * License. | | * License. | |
| * | | * | |
| * The Original Code is the Nice GLib ICE library. | | * The Original Code is the Nice GLib ICE library. | |
| * | | * | |
| * The Initial Developers of the Original Code are Collabora Ltd and Nokia | | * The Initial Developers of the Original Code are Collabora Ltd and Nokia | |
| * Corporation. All Rights Reserved. | | * Corporation. All Rights Reserved. | |
| * | | * | |
| * Contributors: | | * Contributors: | |
|
| | | * Youness Alaoui, Collabora Ltd. | |
| * Rémi Denis-Courmont, Nokia | | * Rémi Denis-Courmont, Nokia | |
| * | | * | |
| * Alternatively, the contents of this file may be used under the terms of
the | | * Alternatively, the contents of this file may be used under the terms of
the | |
| * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which | | * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which | |
| * case the provisions of LGPL are applicable instead of those above. If yo
u | | * case the provisions of LGPL are applicable instead of those above. If yo
u | |
| * wish to allow use of your version of this file only under the terms of t
he | | * wish to allow use of your version of this file only under the terms of t
he | |
| * LGPL and not to allow others to use your version of this file under the | | * LGPL and not to allow others to use your version of this file under the | |
| * MPL, indicate your decision by deleting the provisions above and replace | | * MPL, indicate your decision by deleting the provisions above and replace | |
| * them with the notice and other provisions required by the LGPL. If you d
o | | * them with the notice and other provisions required by the LGPL. If you d
o | |
| * not delete the provisions above, a recipient may use your version of thi
s | | * not delete the provisions above, a recipient may use your version of thi
s | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 4 lines changed or added | |
|
| nice.h | | nice.h | |
| /* | | /* | |
| * This file is part of the Nice GLib ICE library. | | * This file is part of the Nice GLib ICE library. | |
| * | | * | |
|
| * (C) 2006, 2007 Collabora Ltd. | | * (C) 2006-2009 Collabora Ltd. | |
| * Contact: Dafydd Harries | | * Contact: Youness Alaoui | |
| * (C) 2006, 2007 Nokia Corporation. All rights reserved. | | * (C) 2006-2009 Nokia Corporation. All rights reserved. | |
| * Contact: Kai Vehmanen | | * Contact: Kai Vehmanen | |
| * | | * | |
| * The contents of this file are subject to the Mozilla Public License Vers
ion | | * The contents of this file are subject to the Mozilla Public License Vers
ion | |
| * 1.1 (the "License"); you may not use this file except in compliance with | | * 1.1 (the "License"); you may not use this file except in compliance with | |
| * the License. You may obtain a copy of the License at | | * the License. You may obtain a copy of the License at | |
| * http://www.mozilla.org/MPL/ | | * http://www.mozilla.org/MPL/ | |
| * | | * | |
| * Software distributed under the License is distributed on an "AS IS" basi
s, | | * Software distributed under the License is distributed on an "AS IS" basi
s, | |
| * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | |
| * for the specific language governing rights and limitations under the | | * for the specific language governing rights and limitations under the | |
| * License. | | * License. | |
| * | | * | |
| * The Original Code is the Nice GLib ICE library. | | * The Original Code is the Nice GLib ICE library. | |
| * | | * | |
| * The Initial Developers of the Original Code are Collabora Ltd and Nokia | | * The Initial Developers of the Original Code are Collabora Ltd and Nokia | |
| * Corporation. All Rights Reserved. | | * Corporation. All Rights Reserved. | |
| * | | * | |
| * Contributors: | | * Contributors: | |
| * Dafydd Harries, Collabora Ltd. | | * Dafydd Harries, Collabora Ltd. | |
|
| | | * Youness Alaoui, Collabora Ltd. | |
| * | | * | |
| * Alternatively, the contents of this file may be used under the terms of
the | | * Alternatively, the contents of this file may be used under the terms of
the | |
| * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which | | * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which | |
| * case the provisions of LGPL are applicable instead of those above. If yo
u | | * case the provisions of LGPL are applicable instead of those above. If yo
u | |
| * wish to allow use of your version of this file only under the terms of t
he | | * wish to allow use of your version of this file only under the terms of t
he | |
| * LGPL and not to allow others to use your version of this file under the | | * LGPL and not to allow others to use your version of this file under the | |
| * MPL, indicate your decision by deleting the provisions above and replace | | * MPL, indicate your decision by deleting the provisions above and replace | |
| * them with the notice and other provisions required by the LGPL. If you d
o | | * them with the notice and other provisions required by the LGPL. If you d
o | |
| * not delete the provisions above, a recipient may use your version of thi
s | | * not delete the provisions above, a recipient may use your version of thi
s | |
| * file under either the MPL or the LGPL. | | * file under either the MPL or the LGPL. | |
| | | | |
End of changes. 2 change blocks. |
| 3 lines changed or deleted | | 4 lines changed or added | |
|
| stunagent.h | | stunagent.h | |
| /* | | /* | |
| * This file is part of the Nice GLib ICE library. | | * This file is part of the Nice GLib ICE library. | |
| * | | * | |
|
| * (C) 2008 Collabora Ltd. | | * (C) 2008-2009 Collabora Ltd. | |
| * (C) 2008 Nokia Corporation. All rights reserved. | | | |
| * Contact: Youness Alaoui | | * Contact: Youness Alaoui | |
|
| | | * (C) 2008-2009 Nokia Corporation. All rights reserved. | |
| * | | * | |
| * The contents of this file are subject to the Mozilla Public License Vers
ion | | * The contents of this file are subject to the Mozilla Public License Vers
ion | |
| * 1.1 (the "License"); you may not use this file except in compliance with | | * 1.1 (the "License"); you may not use this file except in compliance with | |
| * the License. You may obtain a copy of the License at | | * the License. You may obtain a copy of the License at | |
| * http://www.mozilla.org/MPL/ | | * http://www.mozilla.org/MPL/ | |
| * | | * | |
| * Software distributed under the License is distributed on an "AS IS" basi
s, | | * Software distributed under the License is distributed on an "AS IS" basi
s, | |
| * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | |
| * for the specific language governing rights and limitations under the | | * for the specific language governing rights and limitations under the | |
| * License. | | * License. | |
| * | | * | |
| * The Original Code is the Nice GLib ICE library. | | * The Original Code is the Nice GLib ICE library. | |
| * | | * | |
| * The Initial Developers of the Original Code are Collabora Ltd and Nokia | | * The Initial Developers of the Original Code are Collabora Ltd and Nokia | |
| * Corporation. All Rights Reserved. | | * Corporation. All Rights Reserved. | |
| * | | * | |
|
| | | * Contributors: | |
| | | * Youness Alaoui, Collabora Ltd. | |
| * | | * | |
| * Alternatively, the contents of this file may be used under the terms of
the | | * Alternatively, the contents of this file may be used under the terms of
the | |
| * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which | | * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which | |
| * case the provisions of LGPL are applicable instead of those above. If yo
u | | * case the provisions of LGPL are applicable instead of those above. If yo
u | |
| * wish to allow use of your version of this file only under the terms of t
he | | * wish to allow use of your version of this file only under the terms of t
he | |
| * LGPL and not to allow others to use your version of this file under the | | * LGPL and not to allow others to use your version of this file under the | |
| * MPL, indicate your decision by deleting the provisions above and replace | | * MPL, indicate your decision by deleting the provisions above and replace | |
| * them with the notice and other provisions required by the LGPL. If you d
o | | * them with the notice and other provisions required by the LGPL. If you d
o | |
| * not delete the provisions above, a recipient may use your version of thi
s | | * not delete the provisions above, a recipient may use your version of thi
s | |
| * file under either the MPL or the LGPL. | | * file under either the MPL or the LGPL. | |
| | | | |
| skipping to change at line 466 | | skipping to change at line 468 | |
| * This function is used to make the #StunAgent forget about a previously | | * This function is used to make the #StunAgent forget about a previously | |
| * created transaction. | | * created transaction. | |
| * <para> | | * <para> | |
| * This function should be called when a STUN request was previously | | * This function should be called when a STUN request was previously | |
| * created with stun_agent_finish_message() and for which no response was e
ver | | * created with stun_agent_finish_message() and for which no response was e
ver | |
| * received (timed out). The #StunAgent keeps a list of the sent transactio
ns | | * received (timed out). The #StunAgent keeps a list of the sent transactio
ns | |
| * in order to validate the responses received. If the response is never re
ceived | | * in order to validate the responses received. If the response is never re
ceived | |
| * this will allow the #StunAgent to forget about the timed out transaction
and | | * this will allow the #StunAgent to forget about the timed out transaction
and | |
| * free its slot for future transactions. | | * free its slot for future transactions. | |
| * </para> | | * </para> | |
|
| | | * Since: 0.0.6 | |
| * Returns: %TRUE if the transaction was found, %FALSE otherwise | | * Returns: %TRUE if the transaction was found, %FALSE otherwise | |
| */ | | */ | |
| bool stun_agent_forget_transaction (StunAgent *agent, StunTransactionId id)
; | | bool stun_agent_forget_transaction (StunAgent *agent, StunTransactionId id)
; | |
| | | | |
| /** | | /** | |
| * stun_agent_set_software: | | * stun_agent_set_software: | |
| * @agent: The #StunAgent | | * @agent: The #StunAgent | |
| * @software: The value of the SOFTWARE attribute to add. | | * @software: The value of the SOFTWARE attribute to add. | |
| * | | * | |
| * This function will set the value of the SOFTWARE attribute to be added t
o | | * This function will set the value of the SOFTWARE attribute to be added t
o | |
| * STUN requests, responses and error responses. | | * STUN requests, responses and error responses. | |
| * <para> | | * <para> | |
| * Calling this function will automatically enable the addition of the SOFT
WARE | | * Calling this function will automatically enable the addition of the SOFT
WARE | |
| * attribute for RFC5389 and WLM2009 compatibility modes. | | * attribute for RFC5389 and WLM2009 compatibility modes. | |
|
| | | * | |
| * </para> | | * </para> | |
| * <note> | | * <note> | |
| <para> | | <para> | |
| The @software argument must be in UTF-8 encoding and only the first | | The @software argument must be in UTF-8 encoding and only the first | |
| 128 characters will be sent. | | 128 characters will be sent. | |
| </para> | | </para> | |
| <para> | | <para> | |
| The value of the @software argument must stay valid throughout the l
ife of | | The value of the @software argument must stay valid throughout the l
ife of | |
| the StunAgent's life. Do not free its content. | | the StunAgent's life. Do not free its content. | |
| </para> | | </para> | |
| </note> | | </note> | |
| * | | * | |
|
| | | * Since: 0.0.10 | |
| | | * | |
| */ | | */ | |
| void stun_agent_set_software (StunAgent *agent, const char *software); | | void stun_agent_set_software (StunAgent *agent, const char *software); | |
| | | | |
| #endif /* _STUN_AGENT_H */ | | #endif /* _STUN_AGENT_H */ | |
| | | | |
End of changes. 6 change blocks. |
| 2 lines changed or deleted | | 8 lines changed or added | |
|
| stunmessage.h | | stunmessage.h | |
| /* | | /* | |
| * This file is part of the Nice GLib ICE library. | | * This file is part of the Nice GLib ICE library. | |
| * | | * | |
|
| * (C) 2008 Collabora Ltd. | | * (C) 2008-2009 Collabora Ltd. | |
| * (C) 2008 Nokia Corporation. All rights reserved. | | | |
| * Contact: Youness Alaoui | | * Contact: Youness Alaoui | |
|
| | | * (C) 2008-2009 Nokia Corporation. All rights reserved. | |
| | | * Contact: Rémi Denis-Courmont | |
| * | | * | |
| * The contents of this file are subject to the Mozilla Public License Vers
ion | | * The contents of this file are subject to the Mozilla Public License Vers
ion | |
| * 1.1 (the "License"); you may not use this file except in compliance with | | * 1.1 (the "License"); you may not use this file except in compliance with | |
| * the License. You may obtain a copy of the License at | | * the License. You may obtain a copy of the License at | |
| * http://www.mozilla.org/MPL/ | | * http://www.mozilla.org/MPL/ | |
| * | | * | |
| * Software distributed under the License is distributed on an "AS IS" basi
s, | | * Software distributed under the License is distributed on an "AS IS" basi
s, | |
| * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | |
| * for the specific language governing rights and limitations under the | | * for the specific language governing rights and limitations under the | |
| * License. | | * License. | |
| * | | * | |
| * The Original Code is the Nice GLib ICE library. | | * The Original Code is the Nice GLib ICE library. | |
| * | | * | |
| * The Initial Developers of the Original Code are Collabora Ltd and Nokia | | * The Initial Developers of the Original Code are Collabora Ltd and Nokia | |
| * Corporation. All Rights Reserved. | | * Corporation. All Rights Reserved. | |
| * | | * | |
|
| | | * Contributors: | |
| | | * Youness Alaoui, Collabora Ltd. | |
| | | * Rémi Denis-Courmont, Nokia | |
| * | | * | |
| * Alternatively, the contents of this file may be used under the terms of
the | | * Alternatively, the contents of this file may be used under the terms of
the | |
| * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which | | * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which | |
| * case the provisions of LGPL are applicable instead of those above. If yo
u | | * case the provisions of LGPL are applicable instead of those above. If yo
u | |
| * wish to allow use of your version of this file only under the terms of t
he | | * wish to allow use of your version of this file only under the terms of t
he | |
| * LGPL and not to allow others to use your version of this file under the | | * LGPL and not to allow others to use your version of this file under the | |
| * MPL, indicate your decision by deleting the provisions above and replace | | * MPL, indicate your decision by deleting the provisions above and replace | |
| * them with the notice and other provisions required by the LGPL. If you d
o | | * them with the notice and other provisions required by the LGPL. If you d
o | |
| * not delete the provisions above, a recipient may use your version of thi
s | | * not delete the provisions above, a recipient may use your version of thi
s | |
| * file under either the MPL or the LGPL. | | * file under either the MPL or the LGPL. | |
| | | | |
| skipping to change at line 591 | | skipping to change at line 595 | |
| * @addr: The #sockaddr to be filled | | * @addr: The #sockaddr to be filled | |
| * @addrlen: The size of the @addr variable. Must be set to the size of the | | * @addrlen: The size of the @addr variable. Must be set to the size of the | |
| * @addr socket address and will be set to the size of the extracted socket | | * @addr socket address and will be set to the size of the extracted socket | |
| * address. | | * address. | |
| * | | * | |
| * Extracts a network address attribute from a STUN message. | | * Extracts a network address attribute from a STUN message. | |
| * | | * | |
| * Returns: A #StunMessageReturn value. | | * Returns: A #StunMessageReturn value. | |
| * %STUN_MESSAGE_RETURN_INVALID is returned if the attribute payload size i
s | | * %STUN_MESSAGE_RETURN_INVALID is returned if the attribute payload size i
s | |
| * wrong or if the @addrlen is too small | | * wrong or if the @addrlen is too small | |
|
| * %STUN_MESSAGE_RETURN_UNSUPPORTED_ADDRESSS if the address family is unkno
wn. | | * %STUN_MESSAGE_RETURN_UNSUPPORTED_ADDRESS if the address family is unknow
n. | |
| */ | | */ | |
| StunMessageReturn stun_message_find_addr (const StunMessage *msg, | | StunMessageReturn stun_message_find_addr (const StunMessage *msg, | |
| StunAttribute type, struct sockaddr *addr, socklen_t *addrlen); | | StunAttribute type, struct sockaddr *addr, socklen_t *addrlen); | |
| | | | |
| /** | | /** | |
| * stun_message_find_xor_addr: | | * stun_message_find_xor_addr: | |
| * @msg: The #StunMessage | | * @msg: The #StunMessage | |
| * @type: The #StunAttribute to find | | * @type: The #StunAttribute to find | |
| * @addr: The #sockaddr to be filled | | * @addr: The #sockaddr to be filled | |
| * @addrlen: The size of the @addr variable. Must be set to the size of the | | * @addrlen: The size of the @addr variable. Must be set to the size of the | |
| * @addr socket address and will be set to the size of the | | * @addr socket address and will be set to the size of the | |
| * extracted socket address. | | * extracted socket address. | |
| * | | * | |
| * Extracts an obfuscated network address attribute from a STUN message. | | * Extracts an obfuscated network address attribute from a STUN message. | |
| * | | * | |
| * Returns: A #StunMessageReturn value. | | * Returns: A #StunMessageReturn value. | |
| * %STUN_MESSAGE_RETURN_INVALID is returned if the attribute payload size i
s | | * %STUN_MESSAGE_RETURN_INVALID is returned if the attribute payload size i
s | |
| * wrong or if the @addrlen is too small | | * wrong or if the @addrlen is too small | |
|
| * %STUN_MESSAGE_RETURN_UNSUPPORTED_ADDRESSS if the address family is unkno
wn. | | * %STUN_MESSAGE_RETURN_UNSUPPORTED_ADDRESS if the address family is unknow
n. | |
| */ | | */ | |
| StunMessageReturn stun_message_find_xor_addr (const StunMessage *msg, | | StunMessageReturn stun_message_find_xor_addr (const StunMessage *msg, | |
| StunAttribute type, struct sockaddr *addr, socklen_t *addrlen); | | StunAttribute type, struct sockaddr *addr, socklen_t *addrlen); | |
| | | | |
| /** | | /** | |
| * stun_message_find_xor_addr_full: | | * stun_message_find_xor_addr_full: | |
| * @msg: The #StunMessage | | * @msg: The #StunMessage | |
| * @type: The #StunAttribute to find | | * @type: The #StunAttribute to find | |
| * @addr: The #sockaddr to be filled | | * @addr: The #sockaddr to be filled | |
| * @addrlen: The size of the @addr variable. Must be set to the size of the | | * @addrlen: The size of the @addr variable. Must be set to the size of the | |
| * @addr socket address and will be set to the size of the | | * @addr socket address and will be set to the size of the | |
| * extracted socket address. | | * extracted socket address. | |
| * @magic_cookie: The magic cookie to use to XOR the address. | | * @magic_cookie: The magic cookie to use to XOR the address. | |
| * | | * | |
| * Extracts an obfuscated network address attribute from a STUN message. | | * Extracts an obfuscated network address attribute from a STUN message. | |
| * | | * | |
| * Returns: A #StunMessageReturn value. | | * Returns: A #StunMessageReturn value. | |
| * %STUN_MESSAGE_RETURN_INVALID is returned if the attribute payload size i
s | | * %STUN_MESSAGE_RETURN_INVALID is returned if the attribute payload size i
s | |
| * wrong or if the @addrlen is too small | | * wrong or if the @addrlen is too small | |
|
| * %STUN_MESSAGE_RETURN_UNSUPPORTED_ADDRESSS if the address family is unkno
wn. | | * %STUN_MESSAGE_RETURN_UNSUPPORTED_ADDRESS if the address family is unknow
n. | |
| */ | | */ | |
| StunMessageReturn stun_message_find_xor_addr_full (const StunMessage *msg, | | StunMessageReturn stun_message_find_xor_addr_full (const StunMessage *msg, | |
| StunAttribute type, struct sockaddr *addr, | | StunAttribute type, struct sockaddr *addr, | |
| socklen_t *addrlen, uint32_t magic_cookie); | | socklen_t *addrlen, uint32_t magic_cookie); | |
| | | | |
| /** | | /** | |
| * stun_message_find_error: | | * stun_message_find_error: | |
| * @msg: The #StunMessage | | * @msg: The #StunMessage | |
| * @code: A pointer where to store the value | | * @code: A pointer where to store the value | |
| * | | * | |
| | | | |
| skipping to change at line 739 | | skipping to change at line 743 | |
| * stun_message_append_addr: | | * stun_message_append_addr: | |
| * @msg: The #StunMessage | | * @msg: The #StunMessage | |
| * @type: The #StunAttribute to append | | * @type: The #StunAttribute to append | |
| * @addr: The #sockaddr to be append | | * @addr: The #sockaddr to be append | |
| * @addrlen: The size of the @addr variable. | | * @addrlen: The size of the @addr variable. | |
| * | | * | |
| * Append a network address attribute to a STUN message | | * Append a network address attribute to a STUN message | |
| * | | * | |
| * Returns: A #StunMessageReturn value. | | * Returns: A #StunMessageReturn value. | |
| * %STUN_MESSAGE_RETURN_INVALID is returned if the @addrlen is too small | | * %STUN_MESSAGE_RETURN_INVALID is returned if the @addrlen is too small | |
|
| * %STUN_MESSAGE_RETURN_UNSUPPORTED_ADDRESSS if the address family is unkno
wn. | | * %STUN_MESSAGE_RETURN_UNSUPPORTED_ADDRESS if the address family is unknow
n. | |
| */ | | */ | |
| StunMessageReturn stun_message_append_addr (StunMessage * msg, | | StunMessageReturn stun_message_append_addr (StunMessage * msg, | |
| StunAttribute type, const struct sockaddr *addr, socklen_t addrlen); | | StunAttribute type, const struct sockaddr *addr, socklen_t addrlen); | |
| | | | |
| /** | | /** | |
| * stun_message_append_xor_addr: | | * stun_message_append_xor_addr: | |
| * @msg: The #StunMessage | | * @msg: The #StunMessage | |
| * @type: The #StunAttribute to append | | * @type: The #StunAttribute to append | |
| * @addr: The #sockaddr to be append | | * @addr: The #sockaddr to be append | |
| * @addrlen: The size of the @addr variable. | | * @addrlen: The size of the @addr variable. | |
| * | | * | |
| * Append an obfuscated network address attribute to a STUN message | | * Append an obfuscated network address attribute to a STUN message | |
| * | | * | |
| * Returns: A #StunMessageReturn value. | | * Returns: A #StunMessageReturn value. | |
| * %STUN_MESSAGE_RETURN_INVALID is returned if the @addrlen is too small | | * %STUN_MESSAGE_RETURN_INVALID is returned if the @addrlen is too small | |
|
| * %STUN_MESSAGE_RETURN_UNSUPPORTED_ADDRESSS if the address family is unkno
wn. | | * %STUN_MESSAGE_RETURN_UNSUPPORTED_ADDRESS if the address family is unknow
n. | |
| */ | | */ | |
| StunMessageReturn stun_message_append_xor_addr (StunMessage * msg, | | StunMessageReturn stun_message_append_xor_addr (StunMessage * msg, | |
| StunAttribute type, const struct sockaddr *addr, socklen_t addrlen); | | StunAttribute type, const struct sockaddr *addr, socklen_t addrlen); | |
| | | | |
| /** | | /** | |
| * stun_message_append_xor_addr_full: | | * stun_message_append_xor_addr_full: | |
| * @msg: The #StunMessage | | * @msg: The #StunMessage | |
| * @type: The #StunAttribute to append | | * @type: The #StunAttribute to append | |
| * @addr: The #sockaddr to be append | | * @addr: The #sockaddr to be append | |
| * @addrlen: The size of the @addr variable. | | * @addrlen: The size of the @addr variable. | |
| * @magic_cookie: The magic cookie to use to XOR the address. | | * @magic_cookie: The magic cookie to use to XOR the address. | |
| * | | * | |
| * Append an obfuscated network address attribute from a STUN message. | | * Append an obfuscated network address attribute from a STUN message. | |
| * | | * | |
| * Returns: A #StunMessageReturn value. | | * Returns: A #StunMessageReturn value. | |
| * %STUN_MESSAGE_RETURN_INVALID is returned if the @addrlen is too small | | * %STUN_MESSAGE_RETURN_INVALID is returned if the @addrlen is too small | |
|
| * %STUN_MESSAGE_RETURN_UNSUPPORTED_ADDRESSS if the address family is unkno
wn. | | * %STUN_MESSAGE_RETURN_UNSUPPORTED_ADDRESS if the address family is unknow
n. | |
| */ | | */ | |
| StunMessageReturn stun_message_append_xor_addr_full (StunMessage * msg, | | StunMessageReturn stun_message_append_xor_addr_full (StunMessage * msg, | |
| StunAttribute type, const struct sockaddr *addr, socklen_t addrlen, | | StunAttribute type, const struct sockaddr *addr, socklen_t addrlen, | |
| uint32_t magic_cookie); | | uint32_t magic_cookie); | |
| | | | |
| /** | | /** | |
| * stun_message_append_error: | | * stun_message_append_error: | |
| * @msg: The #StunMessage | | * @msg: The #StunMessage | |
| * @code: The error code value | | * @code: The error code value | |
| * | | * | |
| | | | |
End of changes. 9 change blocks. |
| 8 lines changed or deleted | | 12 lines changed or added | |
|
| timer.h | | timer.h | |
| /* | | /* | |
| * This file is part of the Nice GLib ICE library. | | * This file is part of the Nice GLib ICE library. | |
| * | | * | |
|
| * (C) 2007 Nokia Corporation. All rights reserved. | | * (C) 2008-2009 Collabora Ltd. | |
| | | * Contact: Youness Alaoui | |
| | | * (C) 2007-2009 Nokia Corporation. All rights reserved. | |
| * Contact: Rémi Denis-Courmont | | * Contact: Rémi Denis-Courmont | |
| * | | * | |
| * The contents of this file are subject to the Mozilla Public License Vers
ion | | * The contents of this file are subject to the Mozilla Public License Vers
ion | |
| * 1.1 (the "License"); you may not use this file except in compliance with | | * 1.1 (the "License"); you may not use this file except in compliance with | |
| * the License. You may obtain a copy of the License at | | * the License. You may obtain a copy of the License at | |
| * http://www.mozilla.org/MPL/ | | * http://www.mozilla.org/MPL/ | |
| * | | * | |
| * Software distributed under the License is distributed on an "AS IS" basi
s, | | * Software distributed under the License is distributed on an "AS IS" basi
s, | |
| * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | |
| * for the specific language governing rights and limitations under the | | * for the specific language governing rights and limitations under the | |
| * License. | | * License. | |
| * | | * | |
| * The Original Code is the Nice GLib ICE library. | | * The Original Code is the Nice GLib ICE library. | |
| * | | * | |
| * The Initial Developers of the Original Code are Collabora Ltd and Nokia | | * The Initial Developers of the Original Code are Collabora Ltd and Nokia | |
| * Corporation. All Rights Reserved. | | * Corporation. All Rights Reserved. | |
| * | | * | |
| * Contributors: | | * Contributors: | |
|
| | | * Youness Alaoui, Collabora Ltd. | |
| * Rémi Denis-Courmont, Nokia | | * Rémi Denis-Courmont, Nokia | |
| * | | * | |
| * Alternatively, the contents of this file may be used under the terms of
the | | * Alternatively, the contents of this file may be used under the terms of
the | |
| * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which | | * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which | |
| * case the provisions of LGPL are applicable instead of those above. If yo
u | | * case the provisions of LGPL are applicable instead of those above. If yo
u | |
| * wish to allow use of your version of this file only under the terms of t
he | | * wish to allow use of your version of this file only under the terms of t
he | |
| * LGPL and not to allow others to use your version of this file under the | | * LGPL and not to allow others to use your version of this file under the | |
| * MPL, indicate your decision by deleting the provisions above and replace | | * MPL, indicate your decision by deleting the provisions above and replace | |
| * them with the notice and other provisions required by the LGPL. If you d
o | | * them with the notice and other provisions required by the LGPL. If you d
o | |
| * not delete the provisions above, a recipient may use your version of thi
s | | * not delete the provisions above, a recipient may use your version of thi
s | |
| | | | |
End of changes. 2 change blocks. |
| 1 lines changed or deleted | | 4 lines changed or added | |
|
| turn.h | | turn.h | |
| /* | | /* | |
| * This file is part of the Nice GLib ICE library. | | * This file is part of the Nice GLib ICE library. | |
| * | | * | |
|
| * (C) 2008 Collabora Ltd. | | * (C) 2008-2009 Collabora Ltd. | |
| * (C) 2008 Nokia Corporation | | | |
| * Contact: Youness Alaoui | | * Contact: Youness Alaoui | |
|
| | | * (C) 2007-2009 Nokia Corporation. All rights reserved. | |
| | | * Contact: Rémi Denis-Courmont | |
| * | | * | |
| * The contents of this file are subject to the Mozilla Public License Vers
ion | | * The contents of this file are subject to the Mozilla Public License Vers
ion | |
| * 1.1 (the "License"); you may not use this file except in compliance with | | * 1.1 (the "License"); you may not use this file except in compliance with | |
| * the License. You may obtain a copy of the License at | | * the License. You may obtain a copy of the License at | |
| * http://www.mozilla.org/MPL/ | | * http://www.mozilla.org/MPL/ | |
| * | | * | |
| * Software distributed under the License is distributed on an "AS IS" basi
s, | | * Software distributed under the License is distributed on an "AS IS" basi
s, | |
| * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License | |
| * for the specific language governing rights and limitations under the | | * for the specific language governing rights and limitations under the | |
| * License. | | * License. | |
| * | | * | |
| * The Original Code is the Nice GLib ICE library. | | * The Original Code is the Nice GLib ICE library. | |
| * | | * | |
| * The Initial Developers of the Original Code are Collabora Ltd and Nokia | | * The Initial Developers of the Original Code are Collabora Ltd and Nokia | |
| * Corporation. All Rights Reserved. | | * Corporation. All Rights Reserved. | |
| * | | * | |
| * Contributors: | | * Contributors: | |
|
| * Dafydd Harries, Collabora Ltd. | | | |
| * Youness Alaoui, Collabora Ltd. | | * Youness Alaoui, Collabora Ltd. | |
|
| | | * Rémi Denis-Courmont, Nokia | |
| * | | * | |
| * Alternatively, the contents of this file may be used under the terms of
the | | * Alternatively, the contents of this file may be used under the terms of
the | |
| * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which | | * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which | |
| * case the provisions of LGPL are applicable instead of those above. If yo
u | | * case the provisions of LGPL are applicable instead of those above. If yo
u | |
| * wish to allow use of your version of this file only under the terms of t
he | | * wish to allow use of your version of this file only under the terms of t
he | |
| * LGPL and not to allow others to use your version of this file under the | | * LGPL and not to allow others to use your version of this file under the | |
| * MPL, indicate your decision by deleting the provisions above and replace | | * MPL, indicate your decision by deleting the provisions above and replace | |
| * them with the notice and other provisions required by the LGPL. If you d
o | | * them with the notice and other provisions required by the LGPL. If you d
o | |
| * not delete the provisions above, a recipient may use your version of thi
s | | * not delete the provisions above, a recipient may use your version of thi
s | |
| * file under either the MPL or the LGPL. | | * file under either the MPL or the LGPL. | |
| */ | | */ | |
| | | | |
|
| #ifndef _TURN_H | | #ifndef STUN_TURN_H | |
| #define _TURN_H | | # define STUN_TURN_H 1 | |
| | | | |
| | | /** | |
| | | * SECTION:turn | |
| | | * @short_description: TURN Allocation Usage | |
| | | * @include: stun/usages/turn.h | |
| | | * @stability: Stable | |
| | | * | |
| | | * The STUN TURN usage allows for easily creating and parsing STUN Allocate | |
| | | * requests and responses used for TURN. The API allows you to create a new | |
| | | * allocation or refresh an existing one as well as to parse a response to | |
| | | * an allocate or refresh request. | |
| | | */ | |
| | | | |
| | | #ifdef _WIN32 | |
| | | #include "win32_common.h" | |
| | | #else | |
| | | # include <stdbool.h> | |
| | | # include <stdint.h> | |
| | | #endif | |
| | | | |
| | | # include "stun/stunagent.h" | |
| | | | |
| | | # ifdef __cplusplus | |
| | | extern "C" { | |
| | | # endif | |
| | | | |
|
| | | /** | |
| | | * StunUsageTurnRequestPorts: | |
| | | * @STUN_USAGE_TURN_REQUEST_PORT_NORMAL: Request a normal port | |
| | | * @STUN_USAGE_TURN_REQUEST_PORT_EVEN: Request an even port | |
| | | * @STUN_USAGE_TURN_REQUEST_PORT_EVEN_AND_RESERVE: Request an even port and | |
| | | * reserve the next higher port | |
| | | * | |
| | | * This enum is used to specify which port configuration you want when crea | |
| | | ting | |
| | | * a new Allocation | |
| | | */ | |
| typedef enum { | | typedef enum { | |
|
| NICE_TURN_SOCKET_COMPATIBILITY_DRAFT9, | | STUN_USAGE_TURN_REQUEST_PORT_NORMAL = 0, | |
| NICE_TURN_SOCKET_COMPATIBILITY_GOOGLE, | | STUN_USAGE_TURN_REQUEST_PORT_EVEN = 1, | |
| NICE_TURN_SOCKET_COMPATIBILITY_MSN, | | STUN_USAGE_TURN_REQUEST_PORT_EVEN_AND_RESERVE = 2 | |
| } NiceTurnSocketCompatibility; | | } StunUsageTurnRequestPorts; | |
| | | | |
|
| #include "socket.h" | | /** | |
| #include "agent.h" | | * StunUsageTurnCompatibility: | |
| | | * @STUN_USAGE_TURN_COMPATIBILITY_DRAFT9: Use the specification compatible | |
| | | with | |
| | | * TURN Draft 09 | |
| | | * @STUN_USAGE_TURN_COMPATIBILITY_GOOGLE: Use the specification compatible | |
| | | with | |
| | | * Google Talk's relay server | |
| | | * @STUN_USAGE_TURN_COMPATIBILITY_MSN: Use the specification compatible wit | |
| | | h | |
| | | * MSN TURN servers | |
| | | * | |
| | | * Specifies which TURN specification compatibility to use | |
| | | */ | |
| | | typedef enum { | |
| | | STUN_USAGE_TURN_COMPATIBILITY_DRAFT9, | |
| | | STUN_USAGE_TURN_COMPATIBILITY_GOOGLE, | |
| | | STUN_USAGE_TURN_COMPATIBILITY_MSN, | |
| | | } StunUsageTurnCompatibility; | |
| | | | |
|
| G_BEGIN_DECLS | | /** | |
| | | * StunUsageTurnReturn: | |
| | | * @STUN_USAGE_TURN_RETURN_RELAY_SUCCESS: The response was successful and a | |
| | | relay | |
| | | * address is provided | |
| | | * @STUN_USAGE_TURN_RETURN_MAPPED_SUCCESS: The response was successful and | |
| | | a | |
| | | * relay address as well as a mapped address are provided | |
| | | * @STUN_USAGE_TURN_RETURN_ERROR: The response resulted in an error | |
| | | * @STUN_USAGE_TURN_RETURN_INVALID: The response is not a valid response | |
| | | * @STUN_USAGE_TURN_RETURN_ALTERNATE_SERVER: The server requests the messag | |
| | | e | |
| | | * to be sent to an alternate server | |
| | | * | |
| | | * Return value of stun_usage_turn_process() and | |
| | | * stun_usage_turn_refresh_process() which allows you to see what status th | |
| | | e | |
| | | * function call returned. | |
| | | */ | |
| | | typedef enum { | |
| | | STUN_USAGE_TURN_RETURN_RELAY_SUCCESS, | |
| | | STUN_USAGE_TURN_RETURN_MAPPED_SUCCESS, | |
| | | STUN_USAGE_TURN_RETURN_ERROR, | |
| | | STUN_USAGE_TURN_RETURN_INVALID, | |
| | | STUN_USAGE_TURN_RETURN_ALTERNATE_SERVER, | |
| | | } StunUsageTurnReturn; | |
| | | | |
|
| gint | | /** | |
| nice_turn_socket_parse_recv (NiceSocket *sock, NiceSocket **from_sock, | | * stun_usage_turn_create: | |
| NiceAddress *from, guint len, gchar *buf, | | * @agent: The #StunAgent to use to build the request | |
| NiceAddress *recv_from, gchar *recv_buf, guint recv_len); | | * @msg: The #StunMessage to build | |
| | | * @buffer: The buffer to use for creating the #StunMessage | |
| | | * @buffer_len: The size of the @buffer | |
| | | * @previous_response: If this is the first request you are sending, set th | |
| | | is | |
| | | * argument to NULL, if it's a subsequent request you are building, then se | |
| | | t this | |
| | | * argument to the response you have received. This argument is used for bu | |
| | | ilding | |
| | | * long term credentials (using the REALM and NONCE attributes) as well as | |
| | | for | |
| | | * getting the RESERVATION-TOKEN attribute when you previously requested an | |
| | | * allocation which reserved two ports | |
| | | * @request_ports: Specify how you want to request the allocated port(s). | |
| | | * This is only used if the compatibility is set to | |
| | | * #STUN_USAGE_TURN_COMPATIBILITY_DRAFT9 | |
| | | * <para>See #StunUsageTurnRequestPorts </para> | |
| | | * @bandwidth: The bandwidth to request from the server for the allocation. | |
| | | If | |
| | | * this value is negative, then no BANDWIDTH attribute is added to the requ | |
| | | est. | |
| | | * This is only used if the compatibility is set to | |
| | | * #STUN_USAGE_TURN_COMPATIBILITY_DRAFT9 | |
| | | * @lifetime: The lifetime of the allocation to request from the server. If | |
| | | * this value is negative, then no LIFETIME attribute is added to the reque | |
| | | st. | |
| | | * This is only used if the compatibility is set to | |
| | | * #STUN_USAGE_TURN_COMPATIBILITY_DRAFT9 | |
| | | * @username: The username to use in the request | |
| | | * @username_len: The length of @username | |
| | | * @password: The key to use for building the MESSAGE-INTEGRITY | |
| | | * @password_len: The length of @password | |
| | | * @compatibility: The compatibility mode to use for building the Allocatio | |
| | | n | |
| | | * request | |
| | | * | |
| | | * Create a new TURN Allocation request | |
| | | * Returns: The length of the message to send | |
| | | */ | |
| | | size_t stun_usage_turn_create (StunAgent *agent, StunMessage *msg, | |
| | | uint8_t *buffer, size_t buffer_len, | |
| | | StunMessage *previous_response, | |
| | | StunUsageTurnRequestPorts request_ports, | |
| | | int32_t bandwidth, int32_t lifetime, | |
| | | uint8_t *username, size_t username_len, | |
| | | uint8_t *password, size_t password_len, | |
| | | StunUsageTurnCompatibility compatibility); | |
| | | | |
|
| gboolean | | /** | |
| nice_turn_socket_set_peer (NiceSocket *sock, NiceAddress *peer); | | * stun_usage_turn_create_refresh: | |
| | | * @agent: The #StunAgent to use to build the request | |
| | | * @msg: The #StunMessage to build | |
| | | * @buffer: The buffer to use for creating the #StunMessage | |
| | | * @buffer_len: The size of the @buffer | |
| | | * @previous_response: If this is the first request you are sending, set th | |
| | | is | |
| | | * argument to NULL, if it's a subsequent request you are building, then se | |
| | | t this | |
| | | * argument to the response you have received. This argument is used for bu | |
| | | ilding | |
| | | * long term credentials (using the REALM and NONCE attributes) | |
| | | * @lifetime: The lifetime of the allocation to request from the server. If | |
| | | * this value is negative, then no LIFETIME attribute is added to the reque | |
| | | st. | |
| | | * This is only used if the compatibility is set to | |
| | | * #STUN_USAGE_TURN_COMPATIBILITY_DRAFT9 | |
| | | * @username: The username to use in the request | |
| | | * @username_len: The length of @username | |
| | | * @password: The key to use for building the MESSAGE-INTEGRITY | |
| | | * @password_len: The length of @password | |
| | | * @compatibility: The compatibility mode to use for building the Allocatio | |
| | | n | |
| | | * request | |
| | | * | |
| | | * Create a new TURN Refresh request | |
| | | * Returns: The length of the message to send | |
| | | */ | |
| | | size_t stun_usage_turn_create_refresh (StunAgent *agent, StunMessage *msg, | |
| | | uint8_t *buffer, size_t buffer_len, | |
| | | StunMessage *previous_response, int32_t lifetime, | |
| | | uint8_t *username, size_t username_len, | |
| | | uint8_t *password, size_t password_len, | |
| | | StunUsageTurnCompatibility compatibility); | |
| | | | |
|
| NiceSocket * | | /** | |
| nice_turn_socket_new (NiceAgent *agent, NiceAddress *addr, | | * stun_usage_turn_process: | |
| NiceSocket *base_socket, NiceAddress *server_addr, | | * @msg: The message containing the response | |
| gchar *username, gchar *password, NiceTurnSocketCompatibility compatibi | | * @relay_addr: A pointer to a #sockaddr structure to fill with the relay a | |
| lity); | | ddress | |
| | | * that the TURN server allocated for us | |
| | | * @relay_addrlen: The length of @relay_addr | |
| | | * @addr: A pointer to a #sockaddr structure to fill with the mapped addres | |
| | | s | |
| | | * that the STUN response contains. | |
| | | * This argument will only be filled if the return value | |
| | | * of the function is #STUN_USAGE_TURN_RETURN_MAPPED_SUCCESS | |
| | | * @addrlen: The length of @addr | |
| | | * @alternate_server: A pointer to a #sockaddr structure to fill with the | |
| | | * address of an alternate server to which we should send our new STUN | |
| | | * Allocate request, in case the currently used TURN server is requesting t | |
| | | he use | |
| | | * of an alternate server. This argument will only be filled if the return | |
| | | value | |
| | | * of the function is #STUN_USAGE_TURN_RETURN_ALTERNATE_SERVER | |
| | | * @alternate_server_len: The length of @alternate_server | |
| | | * @bandwidth: A pointer to fill with the bandwidth the TURN server allocat | |
| | | ed us | |
| | | * @lifetime: A pointer to fill with the lifetime of the allocation | |
| | | * @compatibility: The compatibility mode to use for processing the Allocat | |
| | | ion | |
| | | * response | |
| | | * | |
| | | * Process a TURN Allocate response and extract the necessary information f | |
| | | rom | |
| | | * the message | |
| | | * Returns: A #StunUsageTurnReturn value | |
| | | */ | |
| | | StunUsageTurnReturn stun_usage_turn_process (StunMessage *msg, | |
| | | struct sockaddr *relay_addr, socklen_t *relay_addrlen, | |
| | | struct sockaddr *addr, socklen_t *addrlen, | |
| | | struct sockaddr *alternate_server, socklen_t *alternate_server_len, | |
| | | uint32_t *bandwidth, uint32_t *lifetime, | |
| | | StunUsageTurnCompatibility compatibility); | |
| | | | |
|
| G_END_DECLS | | /** | |
| | | * stun_usage_turn_refresh_process: | |
| | | * @msg: The message containing the response | |
| | | * @lifetime: A pointer to fill with the lifetime of the allocation | |
| | | * @compatibility: The compatibility mode to use for processing the Refresh | |
| | | * response | |
| | | * | |
| | | * Process a TURN Refresh response and extract the necessary information fr | |
| | | om | |
| | | * the message | |
| | | * Returns: A #StunUsageTurnReturn value. A #STUN_USAGE_TURN_RETURN_RELAY_S | |
| | | UCCESS | |
| | | * means the Refresh was successful, but no relay address is given (kept th | |
| | | e same | |
| | | * as for the original allocation) | |
| | | */ | |
| | | StunUsageTurnReturn stun_usage_turn_refresh_process (StunMessage *msg, | |
| | | uint32_t *lifetime, StunUsageTurnCompatibility compatibility); | |
| | | | |
|
| #endif /* _TURN_H */ | | # ifdef __cplusplus | |
| | | } | |
| | | # endif | |
| | | | |
| | | #endif | |
| | | | |
End of changes. 14 change blocks. |
| 24 lines changed or deleted | | 233 lines changed or added | |
|