source: appstream-generator/build/girepo/gio/FilterOutputStream.d @ 4841

Last change on this file since 4841 was 4841, checked in by Juanma, 2 years ago

Initial release

File size: 2.9 KB
Line 
1/*
2 * Licensed under the GNU Lesser General Public License Version 3
3 *
4 * This library is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation, either version 3 of the license, or
7 * (at your option) any later version.
8 *
9 * This software is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this library.  If not, see <http://www.gnu.org/licenses/>.
16 */
17
18// generated automatically - do not change
19
20
21module gio.FilterOutputStream;
22
23private import gi.gio;
24public  import gi.giotypes;
25private import gio.OutputStream;
26private import gobject.ObjectG;
27
28
29/**
30 * Base class for output stream implementations that perform some
31 * kind of filtering operation on a base stream. Typical examples
32 * of filtering operations are character set conversion, compression
33 * and byte order flipping.
34 */
35public class FilterOutputStream : OutputStream
36{
37        /** the main Gtk struct */
38        protected GFilterOutputStream* gFilterOutputStream;
39
40        /** Get the main Gtk struct */
41        public GFilterOutputStream* getFilterOutputStreamStruct()
42        {
43                return gFilterOutputStream;
44        }
45
46        /** the main Gtk struct as a void* */
47        protected override void* getStruct()
48        {
49                return cast(void*)gFilterOutputStream;
50        }
51
52        protected override void setStruct(GObject* obj)
53        {
54                gFilterOutputStream = cast(GFilterOutputStream*)obj;
55                super.setStruct(obj);
56        }
57
58        /**
59         * Sets our main struct and passes it to the parent class.
60         */
61        public this (GFilterOutputStream* gFilterOutputStream, bool ownedRef = false)
62        {
63                this.gFilterOutputStream = gFilterOutputStream;
64                super(cast(GOutputStream*)gFilterOutputStream, ownedRef);
65        }
66
67
68        /** */
69        public static GType getType()
70        {
71                return g_filter_output_stream_get_type();
72        }
73
74        /**
75         * Gets the base stream for the filter stream.
76         *
77         * Returns: a #GOutputStream.
78         */
79        public OutputStream getBaseStream()
80        {
81                auto p = g_filter_output_stream_get_base_stream(gFilterOutputStream);
82               
83                if(p is null)
84                {
85                        return null;
86                }
87               
88                return ObjectG.getDObject!(OutputStream)(cast(GOutputStream*) p);
89        }
90
91        /**
92         * Returns whether the base stream will be closed when @stream is
93         * closed.
94         *
95         * Returns: %TRUE if the base stream will be closed.
96         */
97        public bool getCloseBaseStream()
98        {
99                return g_filter_output_stream_get_close_base_stream(gFilterOutputStream) != 0;
100        }
101
102        /**
103         * Sets whether the base stream will be closed when @stream is closed.
104         *
105         * Params:
106         *     closeBase = %TRUE to close the base stream.
107         */
108        public void setCloseBaseStream(bool closeBase)
109        {
110                g_filter_output_stream_set_close_base_stream(gFilterOutputStream, closeBase);
111        }
112}
Note: See TracBrowser for help on using the repository browser.