1 <?xml version="1.0" standalone="no"?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
5 <refentry id="class-giounixoutputstream">
7 <refname>gio.unix.OutputStream</refname>
8 <refpurpose>Streaming output operations for UNIX file descriptors.</refpurpose>
12 <title>Synopsis</title>
14 <classsynopsis language="python">
15 <ooclass><classname>gio.unix.OutputStream</classname></ooclass>
16 <ooclass><classname><link linkend="class-giooutputstream">gio.OutputStream</link></classname></ooclass>
18 <constructorsynopsis language="python">
19 <methodname><link linkend="constructor-giounixoutputstream">gio.unix.OutputStream</link></methodname>
20 <methodparam><parameter role="keyword">fd</parameter></methodparam>
21 <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
22 </constructorsynopsis>
24 <methodsynopsis language="python">
25 <methodname><link linkend="method-giounixoutputstream--get-close-fd">get_close_fd</link></methodname>
26 <methodparam></methodparam>
28 <methodsynopsis language="python">
29 <methodname><link linkend="method-giounixoutputstream--get-fd">get_fd</link></methodname>
30 <methodparam></methodparam>
32 <methodsynopsis language="python">
33 <methodname><link linkend="method-giounixoutputstream--set-close-fd">set_close_fd</link></methodname>
34 <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
42 <title>Ancestry</title>
44 <synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
45 +-- <link linkend="class-giooutputstream">gio.OutputStream</link>
46 +-- <link linkend="class-giounixoutputstream">gio.unix.OutputStream</link>
51 <refsect1 id="properties-giounixoutputstream">
52 <title>gio.unix.OutputStream Properties</title>
54 <blockquote role="properties">
55 <informaltable pgwide="1" frame="none">
57 <colspec column="1" colwidth="1in"/>
58 <colspec column="2" colwidth="1in"/>
59 <colspec column="3" colwidth="4in"/>
62 <entry>"close-fd"</entry>
63 <entry>Read - Write</entry>
64 <entry>Whether to close the file descriptor when the stream is closed.
65 Default value: <literal>True</literal>.</entry>
69 <entry>Read - Write - Construct only</entry>
70 <entry>The file descriptor that the stream writes to. Default value: -1.</entry>
80 <title>Description</title>
83 <link linkend="class-giounixoutputstream"><classname>gio.unix.OutputStream</classname></link>
84 implements <link linkend="class-giooutputstream"><classname>gio.OutputStream</classname></link>
85 for writing to a UNIX file descriptor, including asynchronous operations.
86 The file descriptor must be selectable, so it doesn't work with opened files.
89 Note that <link linkend="class-giounixoutputstream"><classname>gio.unix.OutputStream</classname></link>
90 belongs to the UNIX-specific GIO interfaces, thus you have to use the gio-unix-2.0.pc pkg-config file
95 <refsect1 id="constructor-giounixoutputstream">
96 <title>Constructor</title>
98 <programlisting><constructorsynopsis language="python">
99 <methodname>gio.unix.OutputStream</methodname>
100 <methodparam><parameter role="keyword">fd</parameter></methodparam>
101 <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
102 </constructorsynopsis></programlisting>
105 <term><parameter>fd</parameter> :</term>
106 <listitem><simpara>a UNIX file descriptor.
107 </simpara></listitem>
110 <term><parameter>close_fd</parameter> :</term>
111 <listitem><simpara><literal>True</literal>
112 to close the file descriptor when done
113 </simpara></listitem>
116 <term><emphasis>Returns</emphasis> :</term>
117 <listitem><simpara>a new
118 <link linkend="class-giounixoutputstream"><classname>gio.unix.OutputStream</classname></link>
119 </simpara></listitem>
124 Creates a new <link linkend="class-giounixoutputstream"><classname>gio.unix.OutputStream</classname></link>
128 If close_fd is <literal>True</literal>, the file descriptor will be closed when the stream is closed.
134 <title>Methods</title>
136 <refsect2 id="method-giounixoutputstream--get-close-fd">
137 <title>gio.unix.OutputStream.get_close_fd</title>
139 <programlisting><methodsynopsis language="python">
140 <methodname>get_close_fd</methodname>
141 <methodparam></methodparam>
142 </methodsynopsis></programlisting>
146 <term><emphasis>Returns</emphasis> :</term>
147 <listitem><simpara><literal>True</literal> if the file descriptor is closed when done.
148 </simpara></listitem>
153 The <methodname>get_close_fd</methodname>() method returns whether the file
154 descriptor of stream will be closed when the stream is closed.
158 <refsect2 id="method-giounixoutputstream--get-fd">
159 <title>gio.unix.OutputStream.get_fd</title>
161 <programlisting><methodsynopsis language="python">
162 <methodname>get_fd</methodname>
163 <methodparam></methodparam>
164 </methodsynopsis></programlisting>
168 <term><emphasis>Returns</emphasis> :</term>
169 <listitem><simpara>The file descriptor of stream.
170 </simpara></listitem>
175 The <methodname>get_fd</methodname>() method return the UNIX file descriptor
176 that the stream reads from.
180 <refsect2 id="method-giounixoutputstream--set-close-fd">
181 <title>gio.unix.OutputStream.set_close_fd</title>
183 <programlisting><methodsynopsis language="python">
184 <methodname>set_close_fd</methodname>
185 <methodparam><parameter role="keyword">close_fd</parameter></methodparam>
186 </methodsynopsis></programlisting>
190 <term><parameter role="keyword">close_fd</parameter> :</term>
191 <listitem><simpara><literal>True</literal> to close the file descriptor when done .
192 </simpara></listitem>
197 The <methodname>set_close_fd</methodname>() method sets whether the file descriptor
198 of stream shall be closed when the stream is closed.