Find and document every message attribute/error code and from which RFC/Draft they...
[sipe-libnice.git] / socket / turn.h
blob651f4910eb261a7ed19225af89ab1fa9d1f0c1e2
1 /*
2 * This file is part of the Nice GLib ICE library.
4 * (C) 2008 Collabora Ltd.
5 * (C) 2008 Nokia Corporation
6 * Contact: Youness Alaoui
8 * The contents of this file are subject to the Mozilla Public License Version
9 * 1.1 (the "License"); you may not use this file except in compliance with
10 * the License. You may obtain a copy of the License at
11 * http://www.mozilla.org/MPL/
13 * Software distributed under the License is distributed on an "AS IS" basis,
14 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
15 * for the specific language governing rights and limitations under the
16 * License.
18 * The Original Code is the Nice GLib ICE library.
20 * The Initial Developers of the Original Code are Collabora Ltd and Nokia
21 * Corporation. All Rights Reserved.
23 * Contributors:
24 * Dafydd Harries, Collabora Ltd.
25 * Youness Alaoui, Collabora Ltd.
27 * Alternatively, the contents of this file may be used under the terms of the
28 * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which
29 * case the provisions of LGPL are applicable instead of those above. If you
30 * wish to allow use of your version of this file only under the terms of the
31 * LGPL and not to allow others to use your version of this file under the
32 * MPL, indicate your decision by deleting the provisions above and replace
33 * them with the notice and other provisions required by the LGPL. If you do
34 * not delete the provisions above, a recipient may use your version of this
35 * file under either the MPL or the LGPL.
38 #ifndef _TURN_H
39 #define _TURN_H
42 typedef enum {
43 NICE_TURN_SOCKET_COMPATIBILITY_DRAFT9,
44 NICE_TURN_SOCKET_COMPATIBILITY_GOOGLE,
45 NICE_TURN_SOCKET_COMPATIBILITY_MSN,
46 } NiceTurnSocketCompatibility;
48 #include "socket.h"
49 #include "agent.h"
52 G_BEGIN_DECLS
54 gint
55 nice_turn_socket_parse_recv (NiceSocket *sock, NiceSocket **from_sock,
56 NiceAddress *from, guint len, gchar *buf,
57 NiceAddress *recv_from, gchar *recv_buf, guint recv_len);
59 gboolean
60 nice_turn_socket_set_peer (NiceSocket *sock, NiceAddress *peer);
62 NiceSocket *
63 nice_turn_socket_new (NiceAgent *agent, NiceAddress *addr,
64 NiceSocket *base_socket, NiceAddress *server_addr,
65 gchar *username, gchar *password, NiceTurnSocketCompatibility compatibility);
68 G_END_DECLS
70 #endif /* _TURN_H */