Imported Upstream version 0.1.17
[platform/upstream/libnice.git] / agent / iostream.h
1 /*
2  * This file is part of the Nice GLib ICE library.
3  *
4  * (C) 2010, 2013 Collabora Ltd.
5  *  Contact: Youness Alaoui
6  *
7  * The contents of this file are subject to the Mozilla Public License Version
8  * 1.1 (the "License"); you may not use this file except in compliance with
9  * the License. You may obtain a copy of the License at
10  * http://www.mozilla.org/MPL/
11  *
12  * Software distributed under the License is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
14  * for the specific language governing rights and limitations under the
15  * License.
16  *
17  * The Original Code is the Nice GLib ICE library.
18  *
19  * The Initial Developers of the Original Code are Collabora Ltd and Nokia
20  * Corporation. All Rights Reserved.
21  *
22  * Contributors:
23  *   Youness Alaoui, Collabora Ltd.
24  *
25  * Alternatively, the contents of this file may be used under the terms of the
26  * the GNU Lesser General Public License Version 2.1 (the "LGPL"), in which
27  * case the provisions of LGPL are applicable instead of those above. If you
28  * wish to allow use of your version of this file only under the terms of the
29  * LGPL and not to allow others to use your version of this file under the
30  * MPL, indicate your decision by deleting the provisions above and replace
31  * them with the notice and other provisions required by the LGPL. If you do
32  * not delete the provisions above, a recipient may use your version of this
33  * file under either the MPL or the LGPL.
34  */
35
36 #ifndef __NICE_IO_STREAM_H__
37 #define __NICE_IO_STREAM_H__
38
39 #include <glib-object.h>
40 #include <gio/gio.h>
41
42 G_BEGIN_DECLS
43
44 /* TYPE MACROS */
45
46 /* IO Stream */
47 #define NICE_TYPE_IO_STREAM \
48   (nice_io_stream_get_type ())
49 #define NICE_IO_STREAM(obj) \
50   (G_TYPE_CHECK_INSTANCE_CAST((obj), NICE_TYPE_IO_STREAM, \
51                               NiceIOStream))
52 #define NICE_IO_STREAM_CLASS(klass) \
53   (G_TYPE_CHECK_CLASS_CAST((klass), NICE_TYPE_IO_STREAM, \
54                            NiceIOStreamClass))
55 #define NICE_IS_IO_STREAM(obj) \
56   (G_TYPE_CHECK_INSTANCE_TYPE((obj), NICE_TYPE_IO_STREAM))
57 #define NICE_IS_IO_STREAM_CLASS(klass) \
58   (G_TYPE_CHECK_CLASS_TYPE((klass), NICE_TYPE_IO_STREAM))
59 #define NICE_IO_STREAM_GET_CLASS(obj) \
60   (G_TYPE_INSTANCE_GET_CLASS ((obj), NICE_TYPE_IO_STREAM, \
61                               NiceIOStreamClass))
62
63 /* IO Stream */
64 typedef struct _NiceIOStreamPrivate    NiceIOStreamPrivate;
65 typedef struct _NiceIOStreamClass  NiceIOStreamClass;
66 typedef struct _NiceIOStream NiceIOStream;
67
68 #include "agent.h"
69 #include "inputstream.h"
70 #include "outputstream.h"
71
72 /* IO Stream */
73 GType nice_io_stream_get_type (void);
74
75 struct _NiceIOStreamClass
76 {
77   GIOStreamClass parent_class;
78 };
79
80 struct _NiceIOStream
81 {
82   GIOStream parent_instance;
83   NiceIOStreamPrivate *priv;
84 };
85
86 GIOStream *nice_io_stream_new (NiceAgent *agent,
87     guint stream_id, guint component_id);
88
89 G_END_DECLS
90
91 #endif /* __NICE_IO_STREAM_H__ */