| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>GIOStream</title> |
| <meta name="generator" content="DocBook XSL Stylesheets V1.75.2"> |
| <link rel="home" href="index.html" title="GIO Reference Manual"> |
| <link rel="up" href="streaming.html" title="Streaming I/O"> |
| <link rel="prev" href="GOutputStream.html" title="GOutputStream"> |
| <link rel="next" href="GFileInputStream.html" title="GFileInputStream"> |
| <meta name="generator" content="GTK-Doc V1.14 (XML mode)"> |
| <link rel="stylesheet" href="style.css" type="text/css"> |
| </head> |
| <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
| <tr valign="middle"> |
| <td><a accesskey="p" href="GOutputStream.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> |
| <td><a accesskey="u" href="streaming.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> |
| <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
| <th width="100%" align="center">GIO Reference Manual</th> |
| <td><a accesskey="n" href="GFileInputStream.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> |
| </tr> |
| <tr><td colspan="5" class="shortcuts"> |
| <a href="#GIOStream.synopsis" class="shortcut">Top</a> |
| | |
| <a href="#GIOStream.description" class="shortcut">Description</a> |
| | |
| <a href="#GIOStream.object-hierarchy" class="shortcut">Object Hierarchy</a> |
| | |
| <a href="#GIOStream.properties" class="shortcut">Properties</a> |
| </td></tr> |
| </table> |
| <div class="refentry" title="GIOStream"> |
| <a name="GIOStream"></a><div class="titlepage"></div> |
| <div class="refnamediv"><table width="100%"><tr> |
| <td valign="top"> |
| <h2><span class="refentrytitle"><a name="GIOStream.top_of_page"></a>GIOStream</span></h2> |
| <p>GIOStream — Base class for implementing read/write streams</p> |
| </td> |
| <td valign="top" align="right"></td> |
| </tr></table></div> |
| <div class="refsynopsisdiv" title="Synopsis"> |
| <a name="GIOStream.synopsis"></a><h2>Synopsis</h2> |
| <pre class="synopsis"> |
| #include <gio/gio.h> |
| |
| <a class="link" href="GIOStream.html#GIOStream-struct" title="GIOStream">GIOStream</a>; |
| <a class="link" href="GInputStream.html" title="GInputStream"><span class="returnvalue">GInputStream</span></a> * <a class="link" href="GIOStream.html#g-io-stream-get-input-stream" title="g_io_stream_get_input_stream ()">g_io_stream_get_input_stream</a> (<em class="parameter"><code><a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>); |
| <a class="link" href="GOutputStream.html" title="GOutputStream"><span class="returnvalue">GOutputStream</span></a> * <a class="link" href="GIOStream.html#g-io-stream-get-output-stream" title="g_io_stream_get_output_stream ()">g_io_stream_get_output_stream</a> (<em class="parameter"><code><a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GIOStream.html#g-io-stream-close" title="g_io_stream_close ()">g_io_stream_close</a> (<em class="parameter"><code><a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>, |
| <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); |
| <span class="returnvalue">void</span> <a class="link" href="GIOStream.html#g-io-stream-close-async" title="g_io_stream_close_async ()">g_io_stream_close_async</a> (<em class="parameter"><code><a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>, |
| <em class="parameter"><code><span class="type">int</span> io_priority</code></em>, |
| <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>, |
| <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GIOStream.html#g-io-stream-close-finish" title="g_io_stream_close_finish ()">g_io_stream_close_finish</a> (<em class="parameter"><code><a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>, |
| <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GIOStream.html#g-io-stream-is-closed" title="g_io_stream_is_closed ()">g_io_stream_is_closed</a> (<em class="parameter"><code><a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GIOStream.html#g-io-stream-has-pending" title="g_io_stream_has_pending ()">g_io_stream_has_pending</a> (<em class="parameter"><code><a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>); |
| <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GIOStream.html#g-io-stream-set-pending" title="g_io_stream_set_pending ()">g_io_stream_set_pending</a> (<em class="parameter"><code><a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>); |
| <span class="returnvalue">void</span> <a class="link" href="GIOStream.html#g-io-stream-clear-pending" title="g_io_stream_clear_pending ()">g_io_stream_clear_pending</a> (<em class="parameter"><code><a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>); |
| </pre> |
| </div> |
| <div class="refsect1" title="Object Hierarchy"> |
| <a name="GIOStream.object-hierarchy"></a><h2>Object Hierarchy</h2> |
| <pre class="synopsis"> |
| <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a> |
| +----GIOStream |
| +----<a class="link" href="GFileIOStream.html" title="GFileIOStream">GFileIOStream</a> |
| +----<a class="link" href="GSocketConnection.html" title="GSocketConnection">GSocketConnection</a> |
| </pre> |
| </div> |
| <div class="refsect1" title="Properties"> |
| <a name="GIOStream.properties"></a><h2>Properties</h2> |
| <pre class="synopsis"> |
| "<a class="link" href="GIOStream.html#GIOStream--closed" title='The "closed" property'>closed</a>" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write |
| "<a class="link" href="GIOStream.html#GIOStream--input-stream" title='The "input-stream" property'>input-stream</a>" <a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a>* : Read |
| "<a class="link" href="GIOStream.html#GIOStream--output-stream" title='The "output-stream" property'>output-stream</a>" <a class="link" href="GOutputStream.html" title="GOutputStream"><span class="type">GOutputStream</span></a>* : Read |
| </pre> |
| </div> |
| <div class="refsect1" title="Description"> |
| <a name="GIOStream.description"></a><h2>Description</h2> |
| <p> |
| GIOStream represents an object that has both read and write streams. |
| Generally the two streams acts as separate input and output streams, |
| but they share some common resources and state. For instance, for |
| seekable streams they may use the same position in both streams. |
| </p> |
| <p> |
| Examples of <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> objects are <a class="link" href="GSocketConnection.html" title="GSocketConnection"><span class="type">GSocketConnection</span></a> which represents |
| a two-way network connection, and <a class="link" href="GFileIOStream.html" title="GFileIOStream"><span class="type">GFileIOStream</span></a> which represent a |
| file handle opened in read-write mode. |
| </p> |
| <p> |
| To do the actual reading and writing you need to get the substreams |
| with <a class="link" href="GIOStream.html#g-io-stream-get-input-stream" title="g_io_stream_get_input_stream ()"><code class="function">g_io_stream_get_input_stream()</code></a> and <a class="link" href="GIOStream.html#g-io-stream-get-output-stream" title="g_io_stream_get_output_stream ()"><code class="function">g_io_stream_get_output_stream()</code></a>. |
| </p> |
| <p> |
| The <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> object owns the input and the output streams, not the other |
| way around, so keeping the substreams alive will not keep the <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> |
| object alive. If the <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> object is freed it will be closed, thus |
| closing the substream, so even if the substreams stay alive they will |
| always just return a <a class="link" href="gio-GIOError.html#G-IO-ERROR-CLOSED:CAPS"><code class="literal">G_IO_ERROR_CLOSED</code></a> for all operations. |
| </p> |
| <p> |
| To close a stream use <a class="link" href="GIOStream.html#g-io-stream-close" title="g_io_stream_close ()"><code class="function">g_io_stream_close()</code></a> which will close the common |
| stream object and also the individual substreams. You can also close |
| the substreams themselves. In most cases this only marks the |
| substream as closed, so further I/O on it fails. However, some streams |
| may support "half-closed" states where one direction of the stream |
| is actually shut down. |
| </p> |
| </div> |
| <div class="refsect1" title="Details"> |
| <a name="GIOStream.details"></a><h2>Details</h2> |
| <div class="refsect2" title="GIOStream"> |
| <a name="GIOStream-struct"></a><h3>GIOStream</h3> |
| <pre class="programlisting">typedef struct _GIOStream GIOStream;</pre> |
| <p> |
| Base class for read-write streams. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_io_stream_get_input_stream ()"> |
| <a name="g-io-stream-get-input-stream"></a><h3>g_io_stream_get_input_stream ()</h3> |
| <pre class="programlisting"><a class="link" href="GInputStream.html" title="GInputStream"><span class="returnvalue">GInputStream</span></a> * g_io_stream_get_input_stream (<em class="parameter"><code><a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>);</pre> |
| <p> |
| Gets the input stream for this object. This is used |
| for reading. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td> |
| <td>a <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> a <a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a>, owned by the <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a>. Do not free. |
| |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 2.22</p> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_io_stream_get_output_stream ()"> |
| <a name="g-io-stream-get-output-stream"></a><h3>g_io_stream_get_output_stream ()</h3> |
| <pre class="programlisting"><a class="link" href="GOutputStream.html" title="GOutputStream"><span class="returnvalue">GOutputStream</span></a> * g_io_stream_get_output_stream (<em class="parameter"><code><a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>);</pre> |
| <p> |
| Gets the output stream for this object. This is used for |
| writing. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td> |
| <td>a <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> a <a class="link" href="GOutputStream.html" title="GOutputStream"><span class="type">GOutputStream</span></a>, owned by the <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a>. Do not free. |
| |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 2.22</p> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_io_stream_close ()"> |
| <a name="g-io-stream-close"></a><h3>g_io_stream_close ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_io_stream_close (<em class="parameter"><code><a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>, |
| <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre> |
| <p> |
| Closes the stream, releasing resources related to it. This will also |
| closes the individual input and output streams, if they are not already |
| closed. |
| </p> |
| <p> |
| Once the stream is closed, all other operations will return |
| <a class="link" href="gio-GIOError.html#G-IO-ERROR-CLOSED:CAPS"><code class="literal">G_IO_ERROR_CLOSED</code></a>. Closing a stream multiple times will not |
| return an error. |
| </p> |
| <p> |
| Closing a stream will automatically flush any outstanding buffers |
| in the stream. |
| </p> |
| <p> |
| Streams will be automatically closed when the last reference |
| is dropped, but you might want to call this function to make sure |
| resources are released as early as possible. |
| </p> |
| <p> |
| Some streams might keep the backing store of the stream (e.g. a file |
| descriptor) open after the stream is closed. See the documentation for |
| the individual stream for details. |
| </p> |
| <p> |
| On failure the first error that happened will be reported, but the |
| close operation will finish as much as possible. A stream that failed |
| to close will still return <a class="link" href="gio-GIOError.html#G-IO-ERROR-CLOSED:CAPS"><code class="literal">G_IO_ERROR_CLOSED</code></a> for all operations. |
| Still, it is important to check and report the error to the user, |
| otherwise there might be a loss of data as all data might not be written. |
| </p> |
| <p> |
| If <em class="parameter"><code>cancellable</code></em> is not NULL, then the operation can be cancelled by |
| triggering the cancellable object from another thread. If the operation |
| was cancelled, the error <a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a> will be returned. |
| Cancelling a close will still leave the stream closed, but some streams |
| can use a faster close that doesn't block to e.g. check errors. |
| </p> |
| <p> |
| The default implementation of this method just calls close on the |
| individual input/output streams. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td> |
| <td>a <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td> |
| <td>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> |
| <td>location to store the error occuring, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> on failure |
| |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 2.22</p> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_io_stream_close_async ()"> |
| <a name="g-io-stream-close-async"></a><h3>g_io_stream_close_async ()</h3> |
| <pre class="programlisting"><span class="returnvalue">void</span> g_io_stream_close_async (<em class="parameter"><code><a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>, |
| <em class="parameter"><code><span class="type">int</span> io_priority</code></em>, |
| <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>, |
| <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre> |
| <p> |
| Requests an asynchronous close of the stream, releasing resources |
| related to it. When the operation is finished <em class="parameter"><code>callback</code></em> will be |
| called. You can then call <a class="link" href="GIOStream.html#g-io-stream-close-finish" title="g_io_stream_close_finish ()"><code class="function">g_io_stream_close_finish()</code></a> to get |
| the result of the operation. |
| </p> |
| <p> |
| For behaviour details see <a class="link" href="GIOStream.html#g-io-stream-close" title="g_io_stream_close ()"><code class="function">g_io_stream_close()</code></a>. |
| </p> |
| <p> |
| The asynchronous methods have a default fallback that uses threads |
| to implement asynchronicity, so they are optional for inheriting |
| classes. However, if you override one you must override all. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td> |
| <td>a <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td> |
| <td>the io priority of the request |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td> |
| <td>optional cancellable object |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td> |
| <td>callback to call when the request is satisfied |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td> |
| <td>the data to pass to callback function |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 2.22</p> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_io_stream_close_finish ()"> |
| <a name="g-io-stream-close-finish"></a><h3>g_io_stream_close_finish ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_io_stream_close_finish (<em class="parameter"><code><a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>, |
| <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre> |
| <p> |
| Closes a stream. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td> |
| <td>a <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td> |
| <td>a <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> |
| <td>a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store the error occuring, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to |
| ignore |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if stream was successfully closed, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise. |
| |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 2.22</p> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_io_stream_is_closed ()"> |
| <a name="g-io-stream-is-closed"></a><h3>g_io_stream_is_closed ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_io_stream_is_closed (<em class="parameter"><code><a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>);</pre> |
| <p> |
| Checks if a stream is closed. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td> |
| <td>a <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the stream is closed. |
| |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 2.22</p> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_io_stream_has_pending ()"> |
| <a name="g-io-stream-has-pending"></a><h3>g_io_stream_has_pending ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_io_stream_has_pending (<em class="parameter"><code><a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>);</pre> |
| <p> |
| Checks if a stream has pending actions. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td> |
| <td>a <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>stream</code></em> has pending actions. |
| |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 2.22</p> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_io_stream_set_pending ()"> |
| <a name="g-io-stream-set-pending"></a><h3>g_io_stream_set_pending ()</h3> |
| <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_io_stream_set_pending (<em class="parameter"><code><a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>, |
| <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre> |
| <p> |
| Sets <em class="parameter"><code>stream</code></em> to have actions pending. If the pending flag is |
| already set or <em class="parameter"><code>stream</code></em> is closed, it will return <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> and set |
| <em class="parameter"><code>error</code></em>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td> |
| <td>a <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> |
| <td>a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store the error occuring, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to |
| ignore |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if pending was previously unset and is now set. |
| |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 2.22</p> |
| </div> |
| <hr> |
| <div class="refsect2" title="g_io_stream_clear_pending ()"> |
| <a name="g-io-stream-clear-pending"></a><h3>g_io_stream_clear_pending ()</h3> |
| <pre class="programlisting"><span class="returnvalue">void</span> g_io_stream_clear_pending (<em class="parameter"><code><a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> *stream</code></em>);</pre> |
| <p> |
| Clears the pending flag on <em class="parameter"><code>stream</code></em>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody><tr> |
| <td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td> |
| <td>a <a class="link" href="GIOStream.html" title="GIOStream"><span class="type">GIOStream</span></a> |
| </td> |
| </tr></tbody> |
| </table></div> |
| <p class="since">Since 2.22</p> |
| </div> |
| </div> |
| <div class="refsect1" title="Property Details"> |
| <a name="GIOStream.property-details"></a><h2>Property Details</h2> |
| <div class="refsect2" title='The "closed" property'> |
| <a name="GIOStream--closed"></a><h3>The <code class="literal">"closed"</code> property</h3> |
| <pre class="programlisting"> "closed" <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> : Read / Write</pre> |
| <p>Is the stream closed.</p> |
| <p>Default value: FALSE</p> |
| </div> |
| <hr> |
| <div class="refsect2" title='The "input-stream" property'> |
| <a name="GIOStream--input-stream"></a><h3>The <code class="literal">"input-stream"</code> property</h3> |
| <pre class="programlisting"> "input-stream" <a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a>* : Read</pre> |
| <p>The GInputStream to read from.</p> |
| </div> |
| <hr> |
| <div class="refsect2" title='The "output-stream" property'> |
| <a name="GIOStream--output-stream"></a><h3>The <code class="literal">"output-stream"</code> property</h3> |
| <pre class="programlisting"> "output-stream" <a class="link" href="GOutputStream.html" title="GOutputStream"><span class="type">GOutputStream</span></a>* : Read</pre> |
| <p>The GOutputStream to write to.</p> |
| </div> |
| </div> |
| <div class="refsect1" title="See Also"> |
| <a name="GIOStream.see-also"></a><h2>See Also</h2> |
| <a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a>, <a class="link" href="GOutputStream.html" title="GOutputStream"><span class="type">GOutputStream</span></a> |
| </div> |
| </div> |
| <div class="footer"> |
| <hr> |
| Generated by GTK-Doc V1.14</div> |
| </body> |
| </html> |