MemoryLimit has been replaced by MemoryMax
[platform/core/system/tlm.git] / src / common / tlm-pipe-stream.h
1 /* vi: set et sw=4 ts=4 cino=t0,(0: */
2 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 /*
4  * This file is part of tlm
5  *
6  * Copyright (C) 2014 Intel Corporation.
7  *
8  * Contact: Imran Zaman <imran.zaman@intel.com>
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 2.1 of the License, or (at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful, but
16  * WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with this library; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
23  * 02110-1301 USA
24  */
25
26 #ifndef __TLM_PIPE_STREAM_H__
27 #define __TLM_PIPE_STREAM_H__
28
29 #include <glib.h>
30 #include <glib-object.h>
31 #include <gio/gio.h>
32
33 G_BEGIN_DECLS
34
35 /*
36  * Type macros.
37  */
38 #define TLM_TYPE_PIPE_STREAM   (tlm_pipe_stream_get_type ())
39 #define TLM_PIPE_STREAM(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
40                                            TLM_TYPE_PIPE_STREAM, \
41                                            TlmPipeStream))
42 #define TLM_IS_PIPE_STREAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
43                                            TLM_TYPE_PIPE_STREAM))
44 #define TLM_PIPE_STREAM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), \
45                                              TLM_TYPE_PIPE_STREAM, \
46                                              TlmPipeStreamClass))
47 #define TLM_IS_PIPE_STREAM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),\
48                                              TLM_TYPE_PIPE_STREAM))
49 #define TLM_PIPE_STREAM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \
50                                              TLM_TYPE_PIPE_STREAM, \
51                                              TlmPipeStreamClass))
52
53 typedef struct _TlmPipeStreamPrivate TlmPipeStreamPrivate;
54
55 typedef struct {
56     GIOStream parent_instance;
57
58     /*< private >*/
59     TlmPipeStreamPrivate *priv;
60 } TlmPipeStream;
61
62 typedef struct {
63     GIOStreamClass parent_class;
64
65 } TlmPipeStreamClass;
66
67 /* used by TLM_TYPE_PIPE_STREAM */
68 GType
69 tlm_pipe_stream_get_type (void);
70
71 TlmPipeStream *
72 tlm_pipe_stream_new (
73         gint in_fd,
74         gint out_fd,
75         gboolean close_fds);
76
77 G_END_DECLS
78
79 #endif /* __TLM_PIPE_STREAM_H__ */