136
134
<hr><h2>Member Function Documentation</h2>
135
<a class="anchor" name="7a3202cf7014bcfb2c0a7f301448ae50"></a><!-- doxytag: member="Gio::InputStream::close" ref="7a3202cf7014bcfb2c0a7f301448ae50" args="()" -->
136
<div class="memitem">
137
<div class="memproto">
138
<table class="memname">
140
<td class="memname">bool Gio::InputStream::close </td>
142
<td class="paramname"> </td>
143
<td> ) </td>
151
Closes the stream, releasing resources related to it.
153
Once the stream is closed, all other operations will throw a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with CLOSED. Closing a stream multiple times will not return an error.<p>
154
Streams will be automatically closed when the last reference is dropped, but you might want to call this make sure resources are released as early as possible.<p>
155
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>
156
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 throw a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with CLOSED for all operations. Still, it is important to check and report the error to the user.<p>
157
<dl class="return" compact><dt><b>Returns:</b></dt><dd><code>true</code> on success, <code>false</code> on failure. </dd></dl>
161
<a class="anchor" name="1b76b2503e607475f63731a886456e09"></a><!-- doxytag: member="Gio::InputStream::close" ref="1b76b2503e607475f63731a886456e09" args="(const Glib::RefPtr< Cancellable > &cancellable)" -->
162
<div class="memitem">
163
<div class="memproto">
164
<table class="memname">
166
<td class="memname">bool Gio::InputStream::close </td>
168
<td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1Cancellable.html">Cancellable</a>>& </td>
169
<td class="paramname"> <em>cancellable</em> </td>
170
<td> ) </td>
178
Closes the stream, releasing resources related to it.
180
Once the stream is closed, all other operations will throw a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with CLOSED. Closing a stream multiple times will not return an error.<p>
181
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>
182
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>
183
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 throw a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with CLOSED for all operations. Still, it is important to check and report the error to the user.<p>
184
The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> will be thrown with CANCELLED. 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. <dl compact><dt><b>Parameters:</b></dt><dd>
185
<table border="0" cellspacing="2" cellpadding="0">
186
<tr><td valign="top"></td><td valign="top"><em>cancellable</em> </td><td><a class="el" href="classGio_1_1Cancellable.html" title="Allows actions to be cancelled.">Cancellable</a> object. </td></tr>
189
<dl class="return" compact><dt><b>Returns:</b></dt><dd><code>true</code> on success, <code>false</code> on failure. </dd></dl>
193
<a class="anchor" name="b5160982124f34ed6e475776acd126d2"></a><!-- doxytag: member="Gio::InputStream::close_async" ref="b5160982124f34ed6e475776acd126d2" args="(const SlotAsyncReady &slot, int io_priority=Glib::PRIORITY_DEFAULT)" -->
194
<div class="memitem">
195
<div class="memproto">
196
<table class="memname">
198
<td class="memname">void Gio::InputStream::close_async </td>
200
<td class="paramtype">const <a class="el" href="namespaceGio.html#ecaa02709f9ab83fa2b36d2571665cbe">SlotAsyncReady</a>& </td>
201
<td class="paramname"> <em>slot</em>, </td>
204
<td class="paramkey"></td>
206
<td class="paramtype">int </td>
207
<td class="paramname"> <em>io_priority</em> = <code>Glib::PRIORITY_DEFAULT</code></td><td> </td>
212
<td></td><td></td><td></td>
219
Requests an asynchronous closes of the stream, releasing resources related to it.
221
When the operation is finished <em>slot</em> will be called. You can then call <a class="el" href="classGio_1_1InputStream.html#e5a0d2c3ccf27661e374f151117a8fb7" title="Finishes closing a stream asynchronously, started from g_input_stream_close_async()...">close_finish()</a> to get the result of the operation.<p>
222
For behaviour details see <a class="el" href="classGio_1_1InputStream.html#7a3202cf7014bcfb2c0a7f301448ae50" title="Closes the stream, releasing resources related to it.">close()</a>.<p>
223
The asyncronous 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>
224
<dl compact><dt><b>Parameters:</b></dt><dd>
225
<table border="0" cellspacing="2" cellpadding="0">
226
<tr><td valign="top"></td><td valign="top"><em>slot</em> </td><td>Callback to call when the request is satisfied. </td></tr>
227
<tr><td valign="top"></td><td valign="top"><em>io_priority</em> </td><td>The I/O priority of the request. </td></tr>
233
<a class="anchor" name="f66159778ee2d577e9df52063ced53bf"></a><!-- doxytag: member="Gio::InputStream::close_async" ref="f66159778ee2d577e9df52063ced53bf" args="(const SlotAsyncReady &slot, const Glib::RefPtr< Cancellable > &cancellable, int io_priority=Glib::PRIORITY_DEFAULT)" -->
234
<div class="memitem">
235
<div class="memproto">
236
<table class="memname">
238
<td class="memname">void Gio::InputStream::close_async </td>
240
<td class="paramtype">const <a class="el" href="namespaceGio.html#ecaa02709f9ab83fa2b36d2571665cbe">SlotAsyncReady</a>& </td>
241
<td class="paramname"> <em>slot</em>, </td>
244
<td class="paramkey"></td>
246
<td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1Cancellable.html">Cancellable</a>>& </td>
247
<td class="paramname"> <em>cancellable</em>, </td>
250
<td class="paramkey"></td>
252
<td class="paramtype">int </td>
253
<td class="paramname"> <em>io_priority</em> = <code>Glib::PRIORITY_DEFAULT</code></td><td> </td>
258
<td></td><td></td><td></td>
265
Requests an asynchronous closes of the stream, releasing resources related to it.
267
When the operation is finished <em>slot</em> will be called. You can then call <a class="el" href="classGio_1_1InputStream.html#e5a0d2c3ccf27661e374f151117a8fb7" title="Finishes closing a stream asynchronously, started from g_input_stream_close_async()...">close_finish()</a> to get the result of the operation.<p>
268
For behaviour details see <a class="el" href="classGio_1_1InputStream.html#7a3202cf7014bcfb2c0a7f301448ae50" title="Closes the stream, releasing resources related to it.">close()</a>.<p>
269
The asyncronous 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>
270
<dl compact><dt><b>Parameters:</b></dt><dd>
271
<table border="0" cellspacing="2" cellpadding="0">
272
<tr><td valign="top"></td><td valign="top"><em>slot</em> </td><td>Callback to call when the request is satisfied. </td></tr>
273
<tr><td valign="top"></td><td valign="top"><em>cancellable</em> </td><td>A <a class="el" href="classGio_1_1Cancellable.html" title="Allows actions to be cancelled.">Cancellable</a> object. </td></tr>
274
<tr><td valign="top"></td><td valign="top"><em>io_priority</em> </td><td>The I/O priority of the request. </td></tr>
280
<a class="anchor" name="e5a0d2c3ccf27661e374f151117a8fb7"></a><!-- doxytag: member="Gio::InputStream::close_finish" ref="e5a0d2c3ccf27661e374f151117a8fb7" args="(const Glib::RefPtr< AsyncResult > &result)" -->
281
<div class="memitem">
282
<div class="memproto">
283
<table class="memname">
285
<td class="memname">gboolean Gio::InputStream::close_finish </td>
287
<td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1AsyncResult.html">AsyncResult</a>>& </td>
288
<td class="paramname"> <em>result</em> </td>
289
<td> ) </td>
297
Finishes closing a stream asynchronously, started from g_input_stream_close_async().
299
<dl compact><dt><b>Parameters:</b></dt><dd>
300
<table border="0" cellspacing="2" cellpadding="0">
301
<tr><td valign="top"></td><td valign="top"><em>result</em> </td><td>A <a class="el" href="classGio_1_1AsyncResult.html" title="Provides a base class for implementing asynchronous function results.">AsyncResult</a>. </td></tr>
304
<dl class="return" compact><dt><b>Returns:</b></dt><dd><code>true</code> if the stream was closed successfully. </dd></dl>
308
<a class="anchor" name="1b0ef82ab81b3ded607584c7029fe1e9"></a><!-- doxytag: member="Gio::InputStream::gobj" ref="1b0ef82ab81b3ded607584c7029fe1e9" args="() const " -->
309
<div class="memitem">
310
<div class="memproto">
311
<table class="memname">
313
<td class="memname">const GInputStream* Gio::InputStream::gobj </td>
315
<td class="paramname"> </td>
316
<td> ) </td>
317
<td> const<code> [inline]</code></td>
324
Provides access to the underlying C GObject.
327
<p>Reimplemented from <a class="el" href="classGlib_1_1ObjectBase.html#778a94181132976bbfb0519793f3b32e">Glib::ObjectBase</a>.</p>
329
<p>Reimplemented in <a class="el" href="classGio_1_1BufferedInputStream.html#d6b09565f69b4c1cf1f0ca05ee53709e">Gio::BufferedInputStream</a>, <a class="el" href="classGio_1_1DataInputStream.html#5d8f01998854eac791a3089acef051c0">Gio::DataInputStream</a>, <a class="el" href="classGio_1_1FileInputStream.html#b1afea7b758100ca02a6aa5b89d57662">Gio::FileInputStream</a>, <a class="el" href="classGio_1_1FilterInputStream.html#c8fbd2cc879bfab4854d952b27ce271c">Gio::FilterInputStream</a>, <a class="el" href="classGio_1_1MemoryInputStream.html#f9ea44af840fc0d29d460498c8ce7d0e">Gio::MemoryInputStream</a>, and <a class="el" href="classGio_1_1UnixInputStream.html#dc7b87c43606f90378a521df99220971">Gio::UnixInputStream</a>.</p>
137
333
<a class="anchor" name="2ed1120b3d03a12086e7f0ed3946aba1"></a><!-- doxytag: member="Gio::InputStream::gobj" ref="2ed1120b3d03a12086e7f0ed3946aba1" args="()" -->
138
334
<div class="memitem">
139
335
<div class="memproto">
210
<a class="anchor" name="49a1f4219f96c7fafdcf1ed12eb443e2"></a><!-- doxytag: member="Gio::InputStream::read" ref="49a1f4219f96c7fafdcf1ed12eb443e2" args="(void *buffer, gsize count, const Glib::RefPtr< Cancellable > &cancellable)" -->
211
<div class="memitem">
212
<div class="memproto">
213
<table class="memname">
215
<td class="memname">gssize Gio::InputStream::read </td>
217
<td class="paramtype">void * </td>
218
<td class="paramname"> <em>buffer</em>, </td>
221
<td class="paramkey"></td>
223
<td class="paramtype">gsize </td>
224
<td class="paramname"> <em>count</em>, </td>
227
<td class="paramkey"></td>
229
<td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1Cancellable.html">Cancellable</a>>& </td>
230
<td class="paramname"> <em>cancellable</em></td><td> </td>
235
<td></td><td></td><td></td>
242
Tries to read <em>count</em> bytes from the stream into the buffer starting at <em>buffer</em>.
244
Will block during this read.<p>
245
If count is zero returns zero and does nothing. A value of <em>count</em> larger than MAXSSIZE will cause a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with INVALID_ARGUMENT to be thrown.<p>
246
On success, the number of bytes read into the buffer is returned. It is not an error if this is not the same as the requested size, as it can happen e.g. near the end of a file. Zero is returned on end of file (or if <em>count</em> is zero), but never otherwise.<p>
247
The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> will be thrown with CANCELLED. If an operation was partially finished when the operation was cancelled the partial result will be returned, without an error. <dl compact><dt><b>Parameters:</b></dt><dd>
248
<table border="0" cellspacing="2" cellpadding="0">
249
<tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>A buffer to read data into (which should be at least count bytes long). </td></tr>
250
<tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>The number of bytes that will be read from the stream. </td></tr>
251
<tr><td valign="top"></td><td valign="top"><em>cancellable</em> </td><td><a class="el" href="classGio_1_1Cancellable.html" title="Allows actions to be cancelled.">Cancellable</a> object. </td></tr>
254
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of bytes read, or -1 on error. </dd></dl>
258
381
<a class="anchor" name="42ab2486116d40f6ef828277befb508a"></a><!-- doxytag: member="Gio::InputStream::read" ref="42ab2486116d40f6ef828277befb508a" args="(void *buffer, gsize count)" -->
259
382
<div class="memitem">
260
383
<div class="memproto">
422
<a class="anchor" name="49a1f4219f96c7fafdcf1ed12eb443e2"></a><!-- doxytag: member="Gio::InputStream::read" ref="49a1f4219f96c7fafdcf1ed12eb443e2" args="(void *buffer, gsize count, const Glib::RefPtr< Cancellable > &cancellable)" -->
423
<div class="memitem">
424
<div class="memproto">
425
<table class="memname">
427
<td class="memname">gssize Gio::InputStream::read </td>
429
<td class="paramtype">void * </td>
430
<td class="paramname"> <em>buffer</em>, </td>
433
<td class="paramkey"></td>
435
<td class="paramtype">gsize </td>
436
<td class="paramname"> <em>count</em>, </td>
439
<td class="paramkey"></td>
441
<td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1Cancellable.html">Cancellable</a>>& </td>
442
<td class="paramname"> <em>cancellable</em></td><td> </td>
447
<td></td><td></td><td></td>
454
Tries to read <em>count</em> bytes from the stream into the buffer starting at <em>buffer</em>.
456
Will block during this read.<p>
457
If count is zero returns zero and does nothing. A value of <em>count</em> larger than MAXSSIZE will cause a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with INVALID_ARGUMENT to be thrown.<p>
458
On success, the number of bytes read into the buffer is returned. It is not an error if this is not the same as the requested size, as it can happen e.g. near the end of a file. Zero is returned on end of file (or if <em>count</em> is zero), but never otherwise.<p>
459
The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> will be thrown with CANCELLED. If an operation was partially finished when the operation was cancelled the partial result will be returned, without an error. <dl compact><dt><b>Parameters:</b></dt><dd>
460
<table border="0" cellspacing="2" cellpadding="0">
461
<tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>A buffer to read data into (which should be at least count bytes long). </td></tr>
462
<tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>The number of bytes that will be read from the stream. </td></tr>
463
<tr><td valign="top"></td><td valign="top"><em>cancellable</em> </td><td><a class="el" href="classGio_1_1Cancellable.html" title="Allows actions to be cancelled.">Cancellable</a> object. </td></tr>
466
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of bytes read, or -1 on error. </dd></dl>
470
<a class="anchor" name="6da0fc57d1a5df7107370c67e84aa496"></a><!-- doxytag: member="Gio::InputStream::read_all" ref="6da0fc57d1a5df7107370c67e84aa496" args="(void *buffer, gsize count, gsize &bytes_read)" -->
471
<div class="memitem">
472
<div class="memproto">
473
<table class="memname">
475
<td class="memname">bool Gio::InputStream::read_all </td>
477
<td class="paramtype">void * </td>
478
<td class="paramname"> <em>buffer</em>, </td>
481
<td class="paramkey"></td>
483
<td class="paramtype">gsize </td>
484
<td class="paramname"> <em>count</em>, </td>
487
<td class="paramkey"></td>
489
<td class="paramtype">gsize & </td>
490
<td class="paramname"> <em>bytes_read</em></td><td> </td>
495
<td></td><td></td><td></td>
502
Tries to read <em>count</em> bytes from the stream into the buffer starting at <em>buffer</em>.
504
Will block during this read.<p>
505
This function is similar to <a class="el" href="classGio_1_1InputStream.html#49a1f4219f96c7fafdcf1ed12eb443e2" title="Tries to read count bytes from the stream into the buffer starting at buffer.">read()</a>, except it tries to read as many bytes as requested, only stopping on an error or end of stream.<p>
506
On a successful read of <em>count</em> bytes, or if we reached the end of the stream, <code>true</code> is returned, and <em>bytes_read</em> is set to the number of bytes read into <em>buffer</em> .<p>
507
If there is an error during the operation <code>false</code> is returned and a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> is thrown to indicate the error status, <em>bytes_read</em> is updated to contain the number of bytes read into <em>buffer</em> before the error occured. <dl compact><dt><b>Parameters:</b></dt><dd>
508
<table border="0" cellspacing="2" cellpadding="0">
509
<tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>A buffer to read data into (which should be at least count bytes long). </td></tr>
510
<tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>The number of bytes that will be read from the stream. </td></tr>
511
<tr><td valign="top"></td><td valign="top"><em>bytes_read</em> </td><td>Location to store the number of bytes that was read from the stream. </td></tr>
514
<dl class="return" compact><dt><b>Returns:</b></dt><dd><code>true</code> on success, <code>false</code> if there was an error. </dd></dl>
299
518
<a class="anchor" name="1dc8a2babf32f93a0a5dccc0c39e0959"></a><!-- doxytag: member="Gio::InputStream::read_all" ref="1dc8a2babf32f93a0a5dccc0c39e0959" args="(void *buffer, gsize count, gsize &bytes_read, const Glib::RefPtr< Cancellable > &cancellable)" -->
300
519
<div class="memitem">
301
520
<div class="memproto">
354
<a class="anchor" name="6da0fc57d1a5df7107370c67e84aa496"></a><!-- doxytag: member="Gio::InputStream::read_all" ref="6da0fc57d1a5df7107370c67e84aa496" args="(void *buffer, gsize count, gsize &bytes_read)" -->
355
<div class="memitem">
356
<div class="memproto">
357
<table class="memname">
359
<td class="memname">bool Gio::InputStream::read_all </td>
361
<td class="paramtype">void * </td>
362
<td class="paramname"> <em>buffer</em>, </td>
365
<td class="paramkey"></td>
367
<td class="paramtype">gsize </td>
368
<td class="paramname"> <em>count</em>, </td>
371
<td class="paramkey"></td>
373
<td class="paramtype">gsize & </td>
374
<td class="paramname"> <em>bytes_read</em></td><td> </td>
379
<td></td><td></td><td></td>
386
Tries to read <em>count</em> bytes from the stream into the buffer starting at <em>buffer</em>.
388
Will block during this read.<p>
389
This function is similar to <a class="el" href="classGio_1_1InputStream.html#49a1f4219f96c7fafdcf1ed12eb443e2" title="Tries to read count bytes from the stream into the buffer starting at buffer.">read()</a>, except it tries to read as many bytes as requested, only stopping on an error or end of stream.<p>
390
On a successful read of <em>count</em> bytes, or if we reached the end of the stream, <code>true</code> is returned, and <em>bytes_read</em> is set to the number of bytes read into <em>buffer</em> .<p>
391
If there is an error during the operation <code>false</code> is returned and a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> is thrown to indicate the error status, <em>bytes_read</em> is updated to contain the number of bytes read into <em>buffer</em> before the error occured. <dl compact><dt><b>Parameters:</b></dt><dd>
392
<table border="0" cellspacing="2" cellpadding="0">
393
<tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>A buffer to read data into (which should be at least count bytes long). </td></tr>
394
<tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>The number of bytes that will be read from the stream. </td></tr>
395
<tr><td valign="top"></td><td valign="top"><em>bytes_read</em> </td><td>Location to store the number of bytes that was read from the stream. </td></tr>
398
<dl class="return" compact><dt><b>Returns:</b></dt><dd><code>true</code> on success, <code>false</code> if there was an error. </dd></dl>
402
<a class="anchor" name="17ea65f35c15043156db90af831a44a3"></a><!-- doxytag: member="Gio::InputStream::skip" ref="17ea65f35c15043156db90af831a44a3" args="(gsize count, const Glib::RefPtr< Cancellable > &cancellable)" -->
403
<div class="memitem">
404
<div class="memproto">
405
<table class="memname">
407
<td class="memname">gssize Gio::InputStream::skip </td>
409
<td class="paramtype">gsize </td>
410
<td class="paramname"> <em>count</em>, </td>
413
<td class="paramkey"></td>
415
<td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1Cancellable.html">Cancellable</a>>& </td>
416
<td class="paramname"> <em>cancellable</em></td><td> </td>
421
<td></td><td></td><td></td>
428
Tries to skip <em>count</em> bytes from the stream.
430
Will block during the operation.<p>
431
This is identical to g_input_stream_read(), from a behaviour standpoint, but the bytes that are skipped are not returned to the user. Some streams have an implementation that is more efficient than reading the data.<p>
432
This function is optional for inherited classes, as the default implementation emulates it using read.<p>
433
The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> will be thrown with CANCELLED. If an operation was partially finished when the operation was cancelled the partial result will be returned, without an error. <dl compact><dt><b>Parameters:</b></dt><dd>
434
<table border="0" cellspacing="2" cellpadding="0">
435
<tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>The number of bytes that will be skipped from the stream. </td></tr>
436
<tr><td valign="top"></td><td valign="top"><em>cancellable</em> </td><td><a class="el" href="classGio_1_1Cancellable.html" title="Allows actions to be cancelled.">Cancellable</a> object. </td></tr>
439
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of bytes skipped, or -1 on error. </dd></dl>
443
<a class="anchor" name="1ea9146d612c666168886734b79a5d65"></a><!-- doxytag: member="Gio::InputStream::skip" ref="1ea9146d612c666168886734b79a5d65" args="(gsize count)" -->
444
<div class="memitem">
445
<div class="memproto">
446
<table class="memname">
448
<td class="memname">gssize Gio::InputStream::skip </td>
450
<td class="paramtype">gsize </td>
451
<td class="paramname"> <em>count</em> </td>
452
<td> ) </td>
460
Tries to skip <em>count</em> bytes from the stream.
462
Will block during the operation.<p>
463
This is identical to <a class="el" href="classGio_1_1InputStream.html#49a1f4219f96c7fafdcf1ed12eb443e2" title="Tries to read count bytes from the stream into the buffer starting at buffer.">read()</a>, from a behaviour standpoint, but the bytes that are skipped are not returned to the user. Some streams have an implementation that is more efficient than reading the data.<p>
464
This function is optional for inherited classes, as the default implementation emulates it using read.<p>
465
<dl compact><dt><b>Parameters:</b></dt><dd>
466
<table border="0" cellspacing="2" cellpadding="0">
467
<tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>The number of bytes that will be skipped from the stream. </td></tr>
470
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of bytes skipped, or -1 on error. </dd></dl>
474
<a class="anchor" name="1b76b2503e607475f63731a886456e09"></a><!-- doxytag: member="Gio::InputStream::close" ref="1b76b2503e607475f63731a886456e09" args="(const Glib::RefPtr< Cancellable > &cancellable)" -->
475
<div class="memitem">
476
<div class="memproto">
477
<table class="memname">
479
<td class="memname">bool Gio::InputStream::close </td>
481
<td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1Cancellable.html">Cancellable</a>>& </td>
482
<td class="paramname"> <em>cancellable</em> </td>
483
<td> ) </td>
491
Closes the stream, releasing resources related to it.
493
Once the stream is closed, all other operations will throw a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with CLOSED. Closing a stream multiple times will not return an error.<p>
494
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>
495
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>
496
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 throw a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with CLOSED for all operations. Still, it is important to check and report the error to the user.<p>
497
The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> will be thrown with CANCELLED. 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. <dl compact><dt><b>Parameters:</b></dt><dd>
498
<table border="0" cellspacing="2" cellpadding="0">
499
<tr><td valign="top"></td><td valign="top"><em>cancellable</em> </td><td><a class="el" href="classGio_1_1Cancellable.html" title="Allows actions to be cancelled.">Cancellable</a> object. </td></tr>
502
<dl class="return" compact><dt><b>Returns:</b></dt><dd><code>true</code> on success, <code>false</code> on failure. </dd></dl>
506
<a class="anchor" name="7a3202cf7014bcfb2c0a7f301448ae50"></a><!-- doxytag: member="Gio::InputStream::close" ref="7a3202cf7014bcfb2c0a7f301448ae50" args="()" -->
507
<div class="memitem">
508
<div class="memproto">
509
<table class="memname">
511
<td class="memname">bool Gio::InputStream::close </td>
513
<td class="paramname"> </td>
514
<td> ) </td>
522
Closes the stream, releasing resources related to it.
524
Once the stream is closed, all other operations will throw a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with CLOSED. Closing a stream multiple times will not return an error.<p>
525
Streams will be automatically closed when the last reference is dropped, but you might want to call this make sure resources are released as early as possible.<p>
526
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>
527
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 throw a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with CLOSED for all operations. Still, it is important to check and report the error to the user.<p>
528
<dl class="return" compact><dt><b>Returns:</b></dt><dd><code>true</code> on success, <code>false</code> on failure. </dd></dl>
532
<a class="anchor" name="5b7762ee3f3c571fbc59a0c9af6e879e"></a><!-- doxytag: member="Gio::InputStream::read_async" ref="5b7762ee3f3c571fbc59a0c9af6e879e" args="(void *buffer, gsize count, const SlotAsyncReady &slot, const Glib::RefPtr< Cancellable > &cancellable, int io_priority=Glib::PRIORITY_DEFAULT)" -->
533
<div class="memitem">
534
<div class="memproto">
535
<table class="memname">
537
<td class="memname">void Gio::InputStream::read_async </td>
539
<td class="paramtype">void * </td>
540
<td class="paramname"> <em>buffer</em>, </td>
543
<td class="paramkey"></td>
545
<td class="paramtype">gsize </td>
546
<td class="paramname"> <em>count</em>, </td>
549
<td class="paramkey"></td>
551
<td class="paramtype">const <a class="el" href="namespaceGio.html#ecaa02709f9ab83fa2b36d2571665cbe">SlotAsyncReady</a>& </td>
552
<td class="paramname"> <em>slot</em>, </td>
555
<td class="paramkey"></td>
557
<td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1Cancellable.html">Cancellable</a>>& </td>
558
<td class="paramname"> <em>cancellable</em>, </td>
561
<td class="paramkey"></td>
563
<td class="paramtype">int </td>
564
<td class="paramname"> <em>io_priority</em> = <code>Glib::PRIORITY_DEFAULT</code></td><td> </td>
569
<td></td><td></td><td></td>
576
Request an asynchronous read of <em>count</em> bytes from the stream into the buffer starting at <em>buffer</em>.
578
When the operation is finished <em>slot</em> will be called. You can then call <a class="el" href="classGio_1_1InputStream.html#c089ab220e671ba0af2dd97f2405c0c5" title="Finishes an asynchronous stream read operation.">read_finish()</a> to get the result of the operation.<p>
579
During an async request no other sync and async calls are allowed, and will result in <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with PENDING being thrown.<p>
580
A value of <em>count</em> larger than MAXSSIZE will cause a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with INVALID_ARGUMENT to be thrown.<p>
581
On success, the number of bytes read into the buffer will be passed to the <em>slot</em> callback. It is not an error if this is not the same as the requested size, as it can happen e.g. near the end of a file, but generally we try to read as many bytes as requested. Zero is returned on end of file (or if <em>count</em> is zero), but never otherwise.<p>
582
Any outstanding i/o request with higher priority (lower numerical value) will be executed before an outstanding request with lower priority. Default priority is PRIORITY_DEFAULT.<p>
583
The asyncronous 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>
584
<dl compact><dt><b>Parameters:</b></dt><dd>
585
<table border="0" cellspacing="2" cellpadding="0">
586
<tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>A buffer to read data into (which should be at least count bytes long). </td></tr>
587
<tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>The number of bytes that will be read from the stream. </td></tr>
588
<tr><td valign="top"></td><td valign="top"><em>slot</em> </td><td>Callback to call when the request is satisfied. </td></tr>
589
<tr><td valign="top"></td><td valign="top"><em>cancellable</em> </td><td>A <a class="el" href="classGio_1_1Cancellable.html" title="Allows actions to be cancelled.">Cancellable</a> object. </td></tr>
590
<tr><td valign="top"></td><td valign="top"><em>io_priority</em> </td><td>The I/O priority of the request. </td></tr>
596
573
<a class="anchor" name="05bea76fa9ac3c098a167d2b377e36a6"></a><!-- doxytag: member="Gio::InputStream::read_async" ref="05bea76fa9ac3c098a167d2b377e36a6" args="(void *buffer, gsize count, const SlotAsyncReady &slot, int io_priority=Glib::PRIORITY_DEFAULT)" -->
597
574
<div class="memitem">
598
575
<div class="memproto">
630
<a class="anchor" name="5b7762ee3f3c571fbc59a0c9af6e879e"></a><!-- doxytag: member="Gio::InputStream::read_async" ref="5b7762ee3f3c571fbc59a0c9af6e879e" args="(void *buffer, gsize count, const SlotAsyncReady &slot, const Glib::RefPtr< Cancellable > &cancellable, int io_priority=Glib::PRIORITY_DEFAULT)" -->
631
<div class="memitem">
632
<div class="memproto">
633
<table class="memname">
635
<td class="memname">void Gio::InputStream::read_async </td>
637
<td class="paramtype">void * </td>
638
<td class="paramname"> <em>buffer</em>, </td>
641
<td class="paramkey"></td>
643
<td class="paramtype">gsize </td>
644
<td class="paramname"> <em>count</em>, </td>
647
<td class="paramkey"></td>
649
<td class="paramtype">const <a class="el" href="namespaceGio.html#ecaa02709f9ab83fa2b36d2571665cbe">SlotAsyncReady</a>& </td>
650
<td class="paramname"> <em>slot</em>, </td>
653
<td class="paramkey"></td>
655
<td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1Cancellable.html">Cancellable</a>>& </td>
656
<td class="paramname"> <em>cancellable</em>, </td>
659
<td class="paramkey"></td>
661
<td class="paramtype">int </td>
662
<td class="paramname"> <em>io_priority</em> = <code>Glib::PRIORITY_DEFAULT</code></td><td> </td>
667
<td></td><td></td><td></td>
674
Request an asynchronous read of <em>count</em> bytes from the stream into the buffer starting at <em>buffer</em>.
676
When the operation is finished <em>slot</em> will be called. You can then call <a class="el" href="classGio_1_1InputStream.html#c089ab220e671ba0af2dd97f2405c0c5" title="Finishes an asynchronous stream read operation.">read_finish()</a> to get the result of the operation.<p>
677
During an async request no other sync and async calls are allowed, and will result in <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with PENDING being thrown.<p>
678
A value of <em>count</em> larger than MAXSSIZE will cause a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with INVALID_ARGUMENT to be thrown.<p>
679
On success, the number of bytes read into the buffer will be passed to the <em>slot</em> callback. It is not an error if this is not the same as the requested size, as it can happen e.g. near the end of a file, but generally we try to read as many bytes as requested. Zero is returned on end of file (or if <em>count</em> is zero), but never otherwise.<p>
680
Any outstanding i/o request with higher priority (lower numerical value) will be executed before an outstanding request with lower priority. Default priority is PRIORITY_DEFAULT.<p>
681
The asyncronous 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>
682
<dl compact><dt><b>Parameters:</b></dt><dd>
683
<table border="0" cellspacing="2" cellpadding="0">
684
<tr><td valign="top"></td><td valign="top"><em>buffer</em> </td><td>A buffer to read data into (which should be at least count bytes long). </td></tr>
685
<tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>The number of bytes that will be read from the stream. </td></tr>
686
<tr><td valign="top"></td><td valign="top"><em>slot</em> </td><td>Callback to call when the request is satisfied. </td></tr>
687
<tr><td valign="top"></td><td valign="top"><em>cancellable</em> </td><td>A <a class="el" href="classGio_1_1Cancellable.html" title="Allows actions to be cancelled.">Cancellable</a> object. </td></tr>
688
<tr><td valign="top"></td><td valign="top"><em>io_priority</em> </td><td>The I/O priority of the request. </td></tr>
653
694
<a class="anchor" name="c089ab220e671ba0af2dd97f2405c0c5"></a><!-- doxytag: member="Gio::InputStream::read_finish" ref="c089ab220e671ba0af2dd97f2405c0c5" args="(const Glib::RefPtr< AsyncResult > &result)" -->
654
695
<div class="memitem">
655
696
<div class="memproto">
722
<a class="anchor" name="1ea9146d612c666168886734b79a5d65"></a><!-- doxytag: member="Gio::InputStream::skip" ref="1ea9146d612c666168886734b79a5d65" args="(gsize count)" -->
723
<div class="memitem">
724
<div class="memproto">
725
<table class="memname">
727
<td class="memname">gssize Gio::InputStream::skip </td>
729
<td class="paramtype">gsize </td>
730
<td class="paramname"> <em>count</em> </td>
731
<td> ) </td>
739
Tries to skip <em>count</em> bytes from the stream.
741
Will block during the operation.<p>
742
This is identical to <a class="el" href="classGio_1_1InputStream.html#49a1f4219f96c7fafdcf1ed12eb443e2" title="Tries to read count bytes from the stream into the buffer starting at buffer.">read()</a>, from a behaviour standpoint, but the bytes that are skipped are not returned to the user. Some streams have an implementation that is more efficient than reading the data.<p>
743
This function is optional for inherited classes, as the default implementation emulates it using read.<p>
744
<dl compact><dt><b>Parameters:</b></dt><dd>
745
<table border="0" cellspacing="2" cellpadding="0">
746
<tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>The number of bytes that will be skipped from the stream. </td></tr>
749
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of bytes skipped, or -1 on error. </dd></dl>
753
<a class="anchor" name="17ea65f35c15043156db90af831a44a3"></a><!-- doxytag: member="Gio::InputStream::skip" ref="17ea65f35c15043156db90af831a44a3" args="(gsize count, const Glib::RefPtr< Cancellable > &cancellable)" -->
754
<div class="memitem">
755
<div class="memproto">
756
<table class="memname">
758
<td class="memname">gssize Gio::InputStream::skip </td>
760
<td class="paramtype">gsize </td>
761
<td class="paramname"> <em>count</em>, </td>
764
<td class="paramkey"></td>
766
<td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1Cancellable.html">Cancellable</a>>& </td>
767
<td class="paramname"> <em>cancellable</em></td><td> </td>
772
<td></td><td></td><td></td>
779
Tries to skip <em>count</em> bytes from the stream.
781
Will block during the operation.<p>
782
This is identical to g_input_stream_read(), from a behaviour standpoint, but the bytes that are skipped are not returned to the user. Some streams have an implementation that is more efficient than reading the data.<p>
783
This function is optional for inherited classes, as the default implementation emulates it using read.<p>
784
The operation can be cancelled by triggering the cancellable object from another thread. If the operation was cancelled, a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> will be thrown with CANCELLED. If an operation was partially finished when the operation was cancelled the partial result will be returned, without an error. <dl compact><dt><b>Parameters:</b></dt><dd>
785
<table border="0" cellspacing="2" cellpadding="0">
786
<tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>The number of bytes that will be skipped from the stream. </td></tr>
787
<tr><td valign="top"></td><td valign="top"><em>cancellable</em> </td><td><a class="el" href="classGio_1_1Cancellable.html" title="Allows actions to be cancelled.">Cancellable</a> object. </td></tr>
790
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Number of bytes skipped, or -1 on error. </dd></dl>
794
<a class="anchor" name="111e86dad4548394edcff16d7735d2d5"></a><!-- doxytag: member="Gio::InputStream::skip_async" ref="111e86dad4548394edcff16d7735d2d5" args="(gsize count, const SlotAsyncReady &slot, int io_priority=Glib::PRIORITY_DEFAULT)" -->
795
<div class="memitem">
796
<div class="memproto">
797
<table class="memname">
799
<td class="memname">void Gio::InputStream::skip_async </td>
801
<td class="paramtype">gsize </td>
802
<td class="paramname"> <em>count</em>, </td>
805
<td class="paramkey"></td>
807
<td class="paramtype">const <a class="el" href="namespaceGio.html#ecaa02709f9ab83fa2b36d2571665cbe">SlotAsyncReady</a>& </td>
808
<td class="paramname"> <em>slot</em>, </td>
811
<td class="paramkey"></td>
813
<td class="paramtype">int </td>
814
<td class="paramname"> <em>io_priority</em> = <code>Glib::PRIORITY_DEFAULT</code></td><td> </td>
819
<td></td><td></td><td></td>
826
Request an asynchronous skip of <em>count</em> bytes from the stream into the buffer starting at <em>buffer</em>.
828
When the operation is finished <em>slot</em> will be called. You can then call <a class="el" href="classGio_1_1InputStream.html#1522468bd203ab3082ab54e9eba68b03" title="Finishes a stream skip operation.">skip_finish()</a> to get the result of the operation.<p>
829
During an async request no other sync and async calls are allowed, and will result in <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with PENDING being thrown.<p>
830
A value of <em>count</em> larger than MAXSSIZE will cause a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with INVALID_ARGUMENT to be thrown.<p>
831
On success, the number of bytes skipped will be passed to the callback. It is not an error if this is not the same as the requested size, as it can happen e.g. near the end of a file, but generally we try to skip as many bytes as requested. Zero is returned on end of file (or if <em>count</em> is zero), but never otherwise.<p>
832
Any outstanding i/o request with higher priority (lower numerical value) will be executed before an outstanding request with lower priority. Default priority is PRIORITY_DEFAULT.<p>
833
The asyncronous 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>
834
<dl compact><dt><b>Parameters:</b></dt><dd>
835
<table border="0" cellspacing="2" cellpadding="0">
836
<tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>The number of bytes that will be skipped from the stream. </td></tr>
837
<tr><td valign="top"></td><td valign="top"><em>slot</em> </td><td>Callback to call when the request is satisfied. </td></tr>
838
<tr><td valign="top"></td><td valign="top"><em>io_priority</em> </td><td>The I/O priority of the request. </td></tr>
681
844
<a class="anchor" name="1bf7a4a30005813b0a46e069215907a2"></a><!-- doxytag: member="Gio::InputStream::skip_async" ref="1bf7a4a30005813b0a46e069215907a2" args="(gsize count, const SlotAsyncReady &slot, const Glib::RefPtr< Cancellable > &cancellable, int io_priority=Glib::PRIORITY_DEFAULT)" -->
682
845
<div class="memitem">
683
846
<div class="memproto">
738
<a class="anchor" name="111e86dad4548394edcff16d7735d2d5"></a><!-- doxytag: member="Gio::InputStream::skip_async" ref="111e86dad4548394edcff16d7735d2d5" args="(gsize count, const SlotAsyncReady &slot, int io_priority=Glib::PRIORITY_DEFAULT)" -->
739
<div class="memitem">
740
<div class="memproto">
741
<table class="memname">
743
<td class="memname">void Gio::InputStream::skip_async </td>
745
<td class="paramtype">gsize </td>
746
<td class="paramname"> <em>count</em>, </td>
749
<td class="paramkey"></td>
751
<td class="paramtype">const <a class="el" href="namespaceGio.html#ecaa02709f9ab83fa2b36d2571665cbe">SlotAsyncReady</a>& </td>
752
<td class="paramname"> <em>slot</em>, </td>
755
<td class="paramkey"></td>
757
<td class="paramtype">int </td>
758
<td class="paramname"> <em>io_priority</em> = <code>Glib::PRIORITY_DEFAULT</code></td><td> </td>
763
<td></td><td></td><td></td>
770
Request an asynchronous skip of <em>count</em> bytes from the stream into the buffer starting at <em>buffer</em>.
772
When the operation is finished <em>slot</em> will be called. You can then call <a class="el" href="classGio_1_1InputStream.html#1522468bd203ab3082ab54e9eba68b03" title="Finishes a stream skip operation.">skip_finish()</a> to get the result of the operation.<p>
773
During an async request no other sync and async calls are allowed, and will result in <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with PENDING being thrown.<p>
774
A value of <em>count</em> larger than MAXSSIZE will cause a <a class="el" href="classGio_1_1Error.html" title="Exception class for giomm errors.">Gio::Error</a> with INVALID_ARGUMENT to be thrown.<p>
775
On success, the number of bytes skipped will be passed to the callback. It is not an error if this is not the same as the requested size, as it can happen e.g. near the end of a file, but generally we try to skip as many bytes as requested. Zero is returned on end of file (or if <em>count</em> is zero), but never otherwise.<p>
776
Any outstanding i/o request with higher priority (lower numerical value) will be executed before an outstanding request with lower priority. Default priority is PRIORITY_DEFAULT.<p>
777
The asyncronous 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>
778
<dl compact><dt><b>Parameters:</b></dt><dd>
779
<table border="0" cellspacing="2" cellpadding="0">
780
<tr><td valign="top"></td><td valign="top"><em>count</em> </td><td>The number of bytes that will be skipped from the stream. </td></tr>
781
<tr><td valign="top"></td><td valign="top"><em>slot</em> </td><td>Callback to call when the request is satisfied. </td></tr>
782
<tr><td valign="top"></td><td valign="top"><em>io_priority</em> </td><td>The I/O priority of the request. </td></tr>
788
901
<a class="anchor" name="1522468bd203ab3082ab54e9eba68b03"></a><!-- doxytag: member="Gio::InputStream::skip_finish" ref="1522468bd203ab3082ab54e9eba68b03" args="(const Glib::RefPtr< AsyncResult > &result)" -->
789
902
<div class="memitem">
790
903
<div class="memproto">
816
<a class="anchor" name="f66159778ee2d577e9df52063ced53bf"></a><!-- doxytag: member="Gio::InputStream::close_async" ref="f66159778ee2d577e9df52063ced53bf" args="(const SlotAsyncReady &slot, const Glib::RefPtr< Cancellable > &cancellable, int io_priority=Glib::PRIORITY_DEFAULT)" -->
817
<div class="memitem">
818
<div class="memproto">
819
<table class="memname">
821
<td class="memname">void Gio::InputStream::close_async </td>
823
<td class="paramtype">const <a class="el" href="namespaceGio.html#ecaa02709f9ab83fa2b36d2571665cbe">SlotAsyncReady</a>& </td>
824
<td class="paramname"> <em>slot</em>, </td>
827
<td class="paramkey"></td>
829
<td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1Cancellable.html">Cancellable</a>>& </td>
830
<td class="paramname"> <em>cancellable</em>, </td>
833
<td class="paramkey"></td>
835
<td class="paramtype">int </td>
836
<td class="paramname"> <em>io_priority</em> = <code>Glib::PRIORITY_DEFAULT</code></td><td> </td>
841
<td></td><td></td><td></td>
848
Requests an asynchronous closes of the stream, releasing resources related to it.
850
When the operation is finished <em>slot</em> will be called. You can then call <a class="el" href="classGio_1_1InputStream.html#e5a0d2c3ccf27661e374f151117a8fb7" title="Finishes closing a stream asynchronously, started from g_input_stream_close_async()...">close_finish()</a> to get the result of the operation.<p>
851
For behaviour details see <a class="el" href="classGio_1_1InputStream.html#7a3202cf7014bcfb2c0a7f301448ae50" title="Closes the stream, releasing resources related to it.">close()</a>.<p>
852
The asyncronous 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>
853
<dl compact><dt><b>Parameters:</b></dt><dd>
854
<table border="0" cellspacing="2" cellpadding="0">
855
<tr><td valign="top"></td><td valign="top"><em>slot</em> </td><td>Callback to call when the request is satisfied. </td></tr>
856
<tr><td valign="top"></td><td valign="top"><em>cancellable</em> </td><td>A <a class="el" href="classGio_1_1Cancellable.html" title="Allows actions to be cancelled.">Cancellable</a> object. </td></tr>
857
<tr><td valign="top"></td><td valign="top"><em>io_priority</em> </td><td>The I/O priority of the request. </td></tr>
863
<a class="anchor" name="b5160982124f34ed6e475776acd126d2"></a><!-- doxytag: member="Gio::InputStream::close_async" ref="b5160982124f34ed6e475776acd126d2" args="(const SlotAsyncReady &slot, int io_priority=Glib::PRIORITY_DEFAULT)" -->
864
<div class="memitem">
865
<div class="memproto">
866
<table class="memname">
868
<td class="memname">void Gio::InputStream::close_async </td>
870
<td class="paramtype">const <a class="el" href="namespaceGio.html#ecaa02709f9ab83fa2b36d2571665cbe">SlotAsyncReady</a>& </td>
871
<td class="paramname"> <em>slot</em>, </td>
874
<td class="paramkey"></td>
876
<td class="paramtype">int </td>
877
<td class="paramname"> <em>io_priority</em> = <code>Glib::PRIORITY_DEFAULT</code></td><td> </td>
882
<td></td><td></td><td></td>
889
Requests an asynchronous closes of the stream, releasing resources related to it.
891
When the operation is finished <em>slot</em> will be called. You can then call <a class="el" href="classGio_1_1InputStream.html#e5a0d2c3ccf27661e374f151117a8fb7" title="Finishes closing a stream asynchronously, started from g_input_stream_close_async()...">close_finish()</a> to get the result of the operation.<p>
892
For behaviour details see <a class="el" href="classGio_1_1InputStream.html#7a3202cf7014bcfb2c0a7f301448ae50" title="Closes the stream, releasing resources related to it.">close()</a>.<p>
893
The asyncronous 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>
894
<dl compact><dt><b>Parameters:</b></dt><dd>
895
<table border="0" cellspacing="2" cellpadding="0">
896
<tr><td valign="top"></td><td valign="top"><em>slot</em> </td><td>Callback to call when the request is satisfied. </td></tr>
897
<tr><td valign="top"></td><td valign="top"><em>io_priority</em> </td><td>The I/O priority of the request. </td></tr>
903
<a class="anchor" name="e5a0d2c3ccf27661e374f151117a8fb7"></a><!-- doxytag: member="Gio::InputStream::close_finish" ref="e5a0d2c3ccf27661e374f151117a8fb7" args="(const Glib::RefPtr< AsyncResult > &result)" -->
904
<div class="memitem">
905
<div class="memproto">
906
<table class="memname">
908
<td class="memname">gboolean Gio::InputStream::close_finish </td>
910
<td class="paramtype">const <a class="el" href="classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGio_1_1AsyncResult.html">AsyncResult</a>>& </td>
911
<td class="paramname"> <em>result</em> </td>
912
<td> ) </td>
920
Finishes closing a stream asynchronously, started from g_input_stream_close_async().
922
<dl compact><dt><b>Parameters:</b></dt><dd>
923
<table border="0" cellspacing="2" cellpadding="0">
924
<tr><td valign="top"></td><td valign="top"><em>result</em> </td><td>A <a class="el" href="classGio_1_1AsyncResult.html" title="Provides a base class for implementing asynchronous function results.">AsyncResult</a>. </td></tr>
927
<dl class="return" compact><dt><b>Returns:</b></dt><dd><code>true</code> if the stream was closed successfully. </dd></dl>
931
929
<hr><h2>Friends And Related Function Documentation</h2>
932
930
<a class="anchor" name="ec580b0fc1e0807d7ccba6cbb7e302db"></a><!-- doxytag: member="Gio::InputStream::wrap" ref="ec580b0fc1e0807d7ccba6cbb7e302db" args="(GInputStream *object, bool take_copy=false)" -->
933
931
<div class="memitem">