Tizen 2.1 base
[platform/upstream/glib2.0.git] / docs / reference / gio / html / GPollableOutputStream.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GPollableOutputStream</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GIO Reference Manual">
8 <link rel="up" href="streaming.html" title="Streaming I/O">
9 <link rel="prev" href="GPollableInputStream.html" title="GPollableInputStream">
10 <link rel="next" href="types.html" title="File types and applications">
11 <meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="GPollableInputStream.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="streaming.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GIO Reference Manual</th>
21 <td><a accesskey="n" href="types.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#GPollableOutputStream.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#GPollableOutputStream.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#GPollableOutputStream.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#GPollableOutputStream.prerequisites" class="shortcut">Prerequisites</a>
31                    | 
32                   <a href="#GPollableOutputStream.implementations" class="shortcut">Known Implementations</a>
33 </td></tr>
34 </table>
35 <div class="refentry">
36 <a name="GPollableOutputStream"></a><div class="titlepage"></div>
37 <div class="refnamediv"><table width="100%"><tr>
38 <td valign="top">
39 <h2><span class="refentrytitle"><a name="GPollableOutputStream.top_of_page"></a>GPollableOutputStream</span></h2>
40 <p>GPollableOutputStream — Interface for pollable output streams</p>
41 </td>
42 <td valign="top" align="right"></td>
43 </tr></table></div>
44 <div class="refsynopsisdiv">
45 <a name="GPollableOutputStream.synopsis"></a><h2>Synopsis</h2>
46 <pre class="synopsis">
47 #include &lt;gio/gio.h&gt;
48
49                     <a class="link" href="GPollableOutputStream.html#GPollableOutputStream-struct" title="GPollableOutputStream">GPollableOutputStream</a>;
50 struct              <a class="link" href="GPollableOutputStream.html#GPollableOutputStreamInterface" title="struct GPollableOutputStreamInterface">GPollableOutputStreamInterface</a>;
51
52 <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GPollableOutputStream.html#g-pollable-output-stream-can-poll" title="g_pollable_output_stream_can_poll ()">g_pollable_output_stream_can_poll</a>   (<em class="parameter"><code><a class="link" href="GPollableOutputStream.html" title="GPollableOutputStream"><span class="type">GPollableOutputStream</span></a> *stream</code></em>);
53 <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="GPollableOutputStream.html#g-pollable-output-stream-is-writable" title="g_pollable_output_stream_is_writable ()">g_pollable_output_stream_is_writable</a>
54                                                         (<em class="parameter"><code><a class="link" href="GPollableOutputStream.html" title="GPollableOutputStream"><span class="type">GPollableOutputStream</span></a> *stream</code></em>);
55 <a href="./../glib/glib/glib-The-Main-Event-Loop.html#GSource"><span class="returnvalue">GSource</span></a> *           <a class="link" href="GPollableOutputStream.html#g-pollable-output-stream-create-source" title="g_pollable_output_stream_create_source ()">g_pollable_output_stream_create_source</a>
56                                                         (<em class="parameter"><code><a class="link" href="GPollableOutputStream.html" title="GPollableOutputStream"><span class="type">GPollableOutputStream</span></a> *stream</code></em>,
57                                                          <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>);
58 <a href="./../glib/glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>              <a class="link" href="GPollableOutputStream.html#g-pollable-output-stream-write-nonblocking" title="g_pollable_output_stream_write_nonblocking ()">g_pollable_output_stream_write_nonblocking</a>
59                                                         (<em class="parameter"><code><a class="link" href="GPollableOutputStream.html" title="GPollableOutputStream"><span class="type">GPollableOutputStream</span></a> *stream</code></em>,
60                                                          <em class="parameter"><code>const <span class="type">void</span> *buffer</code></em>,
61                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>,
62                                                          <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
63                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
64 </pre>
65 </div>
66 <div class="refsect1">
67 <a name="GPollableOutputStream.object-hierarchy"></a><h2>Object Hierarchy</h2>
68 <pre class="synopsis">
69   GInterface
70    +----GPollableOutputStream
71 </pre>
72 </div>
73 <div class="refsect1">
74 <a name="GPollableOutputStream.prerequisites"></a><h2>Prerequisites</h2>
75 <p>
76 GPollableOutputStream requires
77  <a class="link" href="GOutputStream.html" title="GOutputStream">GOutputStream</a>.</p>
78 </div>
79 <div class="refsect1">
80 <a name="GPollableOutputStream.implementations"></a><h2>Known Implementations</h2>
81 <p>
82 GPollableOutputStream is implemented by
83  <a class="link" href="GUnixOutputStream.html" title="GUnixOutputStream">GUnixOutputStream</a>.</p>
84 </div>
85 <div class="refsect1">
86 <a name="GPollableOutputStream.description"></a><h2>Description</h2>
87 <p>
88 <a class="link" href="GPollableOutputStream.html" title="GPollableOutputStream"><span class="type">GPollableOutputStream</span></a> is implemented by <a class="link" href="GOutputStream.html" title="GOutputStream"><span class="type">GOutputStream</span></a>s that
89 can be polled for readiness to write. This can be used when
90 interfacing with a non-GIO API that expects
91 UNIX-file-descriptor-style asynchronous I/O rather than GIO-style.
92 </p>
93 </div>
94 <div class="refsect1">
95 <a name="GPollableOutputStream.details"></a><h2>Details</h2>
96 <div class="refsect2">
97 <a name="GPollableOutputStream-struct"></a><h3>GPollableOutputStream</h3>
98 <pre class="programlisting">typedef struct _GPollableOutputStream GPollableOutputStream;</pre>
99 <p>
100 An interface for a <a class="link" href="GOutputStream.html" title="GOutputStream"><span class="type">GOutputStream</span></a> that can be polled for readability.
101 </p>
102 <p class="since">Since 2.28</p>
103 </div>
104 <hr>
105 <div class="refsect2">
106 <a name="GPollableOutputStreamInterface"></a><h3>struct GPollableOutputStreamInterface</h3>
107 <pre class="programlisting">struct GPollableOutputStreamInterface {
108   GTypeInterface g_iface;
109
110   /* Virtual Table */
111   gboolean     (*can_poll)          (GPollableOutputStream  *stream);
112
113   gboolean     (*is_writable)       (GPollableOutputStream  *stream);
114   GSource *    (*create_source)     (GPollableOutputStream  *stream,
115                                      GCancellable           *cancellable);
116   gssize       (*write_nonblocking) (GPollableOutputStream  *stream,
117                                      const void             *buffer,
118                                      gsize                   size,
119                                      GError                **error);
120 };
121 </pre>
122 <p>
123 The interface for pollable output streams.
124 </p>
125 <p>
126 The default implementation of <em class="parameter"><code>can_poll</code></em> always returns <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.
127 </p>
128 <p>
129 The default implementation of <em class="parameter"><code>write_nonblocking</code></em> calls
130 <a class="link" href="GPollableOutputStream.html#g-pollable-output-stream-is-writable" title="g_pollable_output_stream_is_writable ()"><code class="function">g_pollable_output_stream_is_writable()</code></a>, and then calls
131 <a class="link" href="GOutputStream.html#g-output-stream-write" title="g_output_stream_write ()"><code class="function">g_output_stream_write()</code></a> if it returns <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. This means you only
132 need to override it if it is possible that your <em class="parameter"><code>is_writable</code></em>
133 implementation may return <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> when the stream is not actually
134 writable.
135 </p>
136 <div class="variablelist"><table border="0">
137 <col align="left" valign="top">
138 <tbody>
139 <tr>
140 <td><p><span class="term"><a href="./../gobject/gobject/gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> <em class="structfield"><code><a name="GPollableOutputStreamInterface.g-iface"></a>g_iface</code></em>;</span></p></td>
141 <td>The parent interface.</td>
142 </tr>
143 <tr>
144 <td><p><span class="term"><em class="structfield"><code><a name="GPollableOutputStreamInterface.can-poll"></a>can_poll</code></em> ()</span></p></td>
145 <td>Checks if the <a class="link" href="GPollableOutputStream.html" title="GPollableOutputStream"><span class="type">GPollableOutputStream</span></a> instance is actually pollable</td>
146 </tr>
147 <tr>
148 <td><p><span class="term"><em class="structfield"><code><a name="GPollableOutputStreamInterface.is-writable"></a>is_writable</code></em> ()</span></p></td>
149 <td>Checks if the stream is writable</td>
150 </tr>
151 <tr>
152 <td><p><span class="term"><em class="structfield"><code><a name="GPollableOutputStreamInterface.create-source"></a>create_source</code></em> ()</span></p></td>
153 <td>Creates a <a href="./../glib/glib/glib-The-Main-Event-Loop.html#GSource"><span class="type">GSource</span></a> to poll the stream</td>
154 </tr>
155 <tr>
156 <td><p><span class="term"><em class="structfield"><code><a name="GPollableOutputStreamInterface.write-nonblocking"></a>write_nonblocking</code></em> ()</span></p></td>
157 <td>Does a non-blocking write or returns
158 <a class="link" href="gio-GIOError.html#G-IO-ERROR-WOULD-BLOCK:CAPS"><code class="literal">G_IO_ERROR_WOULD_BLOCK</code></a>
159 </td>
160 </tr>
161 </tbody>
162 </table></div>
163 <p class="since">Since 2.28</p>
164 </div>
165 <hr>
166 <div class="refsect2">
167 <a name="g-pollable-output-stream-can-poll"></a><h3>g_pollable_output_stream_can_poll ()</h3>
168 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_pollable_output_stream_can_poll   (<em class="parameter"><code><a class="link" href="GPollableOutputStream.html" title="GPollableOutputStream"><span class="type">GPollableOutputStream</span></a> *stream</code></em>);</pre>
169 <p>
170 Checks if <em class="parameter"><code>stream</code></em> is actually pollable. Some classes may implement
171 <a class="link" href="GPollableOutputStream.html" title="GPollableOutputStream"><span class="type">GPollableOutputStream</span></a> but have only certain instances of that
172 class be pollable. If this method returns <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, then the behavior
173 of other <a class="link" href="GPollableOutputStream.html" title="GPollableOutputStream"><span class="type">GPollableOutputStream</span></a> methods is undefined.
174 </p>
175 <p>
176 For any given stream, the value returned by this method is constant;
177 a stream cannot switch from pollable to non-pollable or vice versa.
178 </p>
179 <div class="variablelist"><table border="0">
180 <col align="left" valign="top">
181 <tbody>
182 <tr>
183 <td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
184 <td>a <a class="link" href="GPollableOutputStream.html" title="GPollableOutputStream"><span class="type">GPollableOutputStream</span></a>.</td>
185 </tr>
186 <tr>
187 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
188 <td>
189 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>stream</code></em> is pollable, <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not.</td>
190 </tr>
191 </tbody>
192 </table></div>
193 <p class="since">Since 2.28</p>
194 </div>
195 <hr>
196 <div class="refsect2">
197 <a name="g-pollable-output-stream-is-writable"></a><h3>g_pollable_output_stream_is_writable ()</h3>
198 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            g_pollable_output_stream_is_writable
199                                                         (<em class="parameter"><code><a class="link" href="GPollableOutputStream.html" title="GPollableOutputStream"><span class="type">GPollableOutputStream</span></a> *stream</code></em>);</pre>
200 <p>
201 Checks if <em class="parameter"><code>stream</code></em> can be written.
202 </p>
203 <p>
204 Note that some stream types may not be able to implement this 100%
205 reliably, and it is possible that a call to <a class="link" href="GOutputStream.html#g-output-stream-write" title="g_output_stream_write ()"><code class="function">g_output_stream_write()</code></a>
206 after this returns <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> would still block. To guarantee
207 non-blocking behavior, you should always use
208 <a class="link" href="GPollableOutputStream.html#g-pollable-output-stream-write-nonblocking" title="g_pollable_output_stream_write_nonblocking ()"><code class="function">g_pollable_output_stream_write_nonblocking()</code></a>, which will return a
209 <a class="link" href="gio-GIOError.html#G-IO-ERROR-WOULD-BLOCK:CAPS"><code class="literal">G_IO_ERROR_WOULD_BLOCK</code></a> error rather than blocking.
210 </p>
211 <div class="variablelist"><table border="0">
212 <col align="left" valign="top">
213 <tbody>
214 <tr>
215 <td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
216 <td>a <a class="link" href="GPollableOutputStream.html" title="GPollableOutputStream"><span class="type">GPollableOutputStream</span></a>.</td>
217 </tr>
218 <tr>
219 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
220 <td>
221 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>stream</code></em> is writable, <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not. If an error
222 has occurred on <em class="parameter"><code>stream</code></em>, this will result in
223 <a class="link" href="GPollableOutputStream.html#g-pollable-output-stream-is-writable" title="g_pollable_output_stream_is_writable ()"><code class="function">g_pollable_output_stream_is_writable()</code></a> returning <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, and the
224 next attempt to write will return the error.</td>
225 </tr>
226 </tbody>
227 </table></div>
228 <p class="since">Since 2.28</p>
229 </div>
230 <hr>
231 <div class="refsect2">
232 <a name="g-pollable-output-stream-create-source"></a><h3>g_pollable_output_stream_create_source ()</h3>
233 <pre class="programlisting"><a href="./../glib/glib/glib-The-Main-Event-Loop.html#GSource"><span class="returnvalue">GSource</span></a> *           g_pollable_output_stream_create_source
234                                                         (<em class="parameter"><code><a class="link" href="GPollableOutputStream.html" title="GPollableOutputStream"><span class="type">GPollableOutputStream</span></a> *stream</code></em>,
235                                                          <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>);</pre>
236 <p>
237 Creates a <a href="./../glib/glib/glib-The-Main-Event-Loop.html#GSource"><span class="type">GSource</span></a> that triggers when <em class="parameter"><code>stream</code></em> can be written, or
238 <em class="parameter"><code>cancellable</code></em> is triggered or an error occurs. The callback on the
239 source is of the <a class="link" href="GPollableInputStream.html#GPollableSourceFunc" title="GPollableSourceFunc ()"><span class="type">GPollableSourceFunc</span></a> type.
240 </p>
241 <p>
242 As with <a class="link" href="GPollableOutputStream.html#g-pollable-output-stream-is-writable" title="g_pollable_output_stream_is_writable ()"><code class="function">g_pollable_output_stream_is_writable()</code></a>, it is possible that
243 the stream may not actually be writable even after the source
244 triggers, so you should use <a class="link" href="GPollableOutputStream.html#g-pollable-output-stream-write-nonblocking" title="g_pollable_output_stream_write_nonblocking ()"><code class="function">g_pollable_output_stream_write_nonblocking()</code></a>
245 rather than <a class="link" href="GOutputStream.html#g-output-stream-write" title="g_output_stream_write ()"><code class="function">g_output_stream_write()</code></a> from the callback.
246 </p>
247 <div class="variablelist"><table border="0">
248 <col align="left" valign="top">
249 <tbody>
250 <tr>
251 <td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
252 <td>a <a class="link" href="GPollableOutputStream.html" title="GPollableOutputStream"><span class="type">GPollableOutputStream</span></a>.</td>
253 </tr>
254 <tr>
255 <td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
256 <td>a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
257 </td>
258 </tr>
259 <tr>
260 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
261 <td>a new <a href="./../glib/glib/glib-The-Main-Event-Loop.html#GSource"><span class="type">GSource</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
262 </td>
263 </tr>
264 </tbody>
265 </table></div>
266 <p class="since">Since 2.28</p>
267 </div>
268 <hr>
269 <div class="refsect2">
270 <a name="g-pollable-output-stream-write-nonblocking"></a><h3>g_pollable_output_stream_write_nonblocking ()</h3>
271 <pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a>              g_pollable_output_stream_write_nonblocking
272                                                         (<em class="parameter"><code><a class="link" href="GPollableOutputStream.html" title="GPollableOutputStream"><span class="type">GPollableOutputStream</span></a> *stream</code></em>,
273                                                          <em class="parameter"><code>const <span class="type">void</span> *buffer</code></em>,
274                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>,
275                                                          <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
276                                                          <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
277 <p>
278 Attempts to write up to <em class="parameter"><code>size</code></em> bytes from <em class="parameter"><code>buffer</code></em> to <em class="parameter"><code>stream</code></em>, as
279 with <a class="link" href="GOutputStream.html#g-output-stream-write" title="g_output_stream_write ()"><code class="function">g_output_stream_write()</code></a>. If <em class="parameter"><code>stream</code></em> is not currently writable,
280 this will immediately return <a class="link" href="gio-GIOError.html#G-IO-ERROR-WOULD-BLOCK:CAPS"><code class="literal">G_IO_ERROR_WOULD_BLOCK</code></a>, and you can
281 use <a class="link" href="GPollableOutputStream.html#g-pollable-output-stream-create-source" title="g_pollable_output_stream_create_source ()"><code class="function">g_pollable_output_stream_create_source()</code></a> to create a <a href="./../glib/glib/glib-The-Main-Event-Loop.html#GSource"><span class="type">GSource</span></a>
282 that will be triggered when <em class="parameter"><code>stream</code></em> is writable.
283 </p>
284 <p>
285 Note that since this method never blocks, you cannot actually
286 use <em class="parameter"><code>cancellable</code></em> to cancel it. However, it will return an error
287 if <em class="parameter"><code>cancellable</code></em> has already been cancelled when you call, which
288 may happen if you call this method after a source triggers due
289 to having been cancelled.
290 </p>
291 <p>
292 Virtual: write_nonblocking
293 </p>
294 <div class="variablelist"><table border="0">
295 <col align="left" valign="top">
296 <tbody>
297 <tr>
298 <td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
299 <td>a <a class="link" href="GPollableOutputStream.html" title="GPollableOutputStream"><span class="type">GPollableOutputStream</span></a>
300 </td>
301 </tr>
302 <tr>
303 <td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
304 <td>a buffer to write
305 data from. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=size][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8]</span>
306 </td>
307 </tr>
308 <tr>
309 <td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
310 <td>the number of bytes you want to write</td>
311 </tr>
312 <tr>
313 <td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td>
314 <td>a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
315 </td>
316 </tr>
317 <tr>
318 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
319 <td>
320 <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for error reporting, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</td>
321 </tr>
322 <tr>
323 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
324 <td>the number of bytes written, or -1 on error (including
325 <a class="link" href="gio-GIOError.html#G-IO-ERROR-WOULD-BLOCK:CAPS"><code class="literal">G_IO_ERROR_WOULD_BLOCK</code></a>).</td>
326 </tr>
327 </tbody>
328 </table></div>
329 </div>
330 </div>
331 <div class="refsect1">
332 <a name="GPollableOutputStream.see-also"></a><h2>See Also</h2>
333 <a class="link" href="GOutputStream.html" title="GOutputStream"><span class="type">GOutputStream</span></a>, <a class="link" href="GFileDescriptorBased.html" title="GFileDescriptorBased"><span class="type">GFileDescriptorBased</span></a>, <a class="link" href="GPollableInputStream.html" title="GPollableInputStream"><span class="type">GPollableInputStream</span></a>
334 </div>
335 </div>
336 <div class="footer">
337 <hr>
338           Generated by GTK-Doc V1.18</div>
339 </body>
340 </html>