1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19  
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 /*
25  * Conversion parameters:
26  * inFile  = GFilterInputStream.html
27  * outPack = gio
28  * outFile = FilterInputStream
29  * strct   = GFilterInputStream
30  * realStrct=
31  * ctorStrct=
32  * clss    = FilterInputStream
33  * interf  = 
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- g_filter_input_stream_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * imports:
46  * 	- gio.InputStream
47  * structWrap:
48  * 	- GInputStream* -> InputStream
49  * module aliases:
50  * local aliases:
51  * overrides:
52  */
53 
54 module gio.FilterInputStream;
55 
56 public  import gtkc.giotypes;
57 
58 private import gtkc.gio;
59 private import glib.ConstructionException;
60 private import gobject.ObjectG;
61 
62 private import gio.InputStream;
63 
64 
65 private import gio.InputStream;
66 
67 /**
68  * Base class for input stream implementations that perform some
69  * kind of filtering operation on a base stream. Typical examples
70  * of filtering operations are character set conversion, compression
71  * and byte order flipping.
72  */
73 public class FilterInputStream : InputStream
74 {
75 	
76 	/** the main Gtk struct */
77 	protected GFilterInputStream* gFilterInputStream;
78 	
79 	
80 	/** Get the main Gtk struct */
81 	public GFilterInputStream* getFilterInputStreamStruct()
82 	{
83 		return gFilterInputStream;
84 	}
85 	
86 	
87 	/** the main Gtk struct as a void* */
88 	protected override void* getStruct()
89 	{
90 		return cast(void*)gFilterInputStream;
91 	}
92 	
93 	/**
94 	 * Sets our main struct and passes it to the parent class
95 	 */
96 	public this (GFilterInputStream* gFilterInputStream)
97 	{
98 		super(cast(GInputStream*)gFilterInputStream);
99 		this.gFilterInputStream = gFilterInputStream;
100 	}
101 	
102 	protected override void setStruct(GObject* obj)
103 	{
104 		super.setStruct(obj);
105 		gFilterInputStream = cast(GFilterInputStream*)obj;
106 	}
107 	
108 	/**
109 	 */
110 	
111 	/**
112 	 * Gets the base stream for the filter stream.
113 	 * Returns: a GInputStream. [transfer none]
114 	 */
115 	public InputStream getBaseStream()
116 	{
117 		// GInputStream * g_filter_input_stream_get_base_stream  (GFilterInputStream *stream);
118 		auto p = g_filter_input_stream_get_base_stream(gFilterInputStream);
119 		
120 		if(p is null)
121 		{
122 			return null;
123 		}
124 		
125 		return ObjectG.getDObject!(InputStream)(cast(GInputStream*) p);
126 	}
127 	
128 	/**
129 	 * Returns whether the base stream will be closed when stream is
130 	 * closed.
131 	 * Returns: TRUE if the base stream will be closed.
132 	 */
133 	public int getCloseBaseStream()
134 	{
135 		// gboolean g_filter_input_stream_get_close_base_stream  (GFilterInputStream *stream);
136 		return g_filter_input_stream_get_close_base_stream(gFilterInputStream);
137 	}
138 	
139 	/**
140 	 * Sets whether the base stream will be closed when stream is closed.
141 	 * Params:
142 	 * closeBase = TRUE to close the base stream.
143 	 */
144 	public void setCloseBaseStream(int closeBase)
145 	{
146 		// void g_filter_input_stream_set_close_base_stream  (GFilterInputStream *stream,  gboolean close_base);
147 		g_filter_input_stream_set_close_base_stream(gFilterInputStream, closeBase);
148 	}
149 }