~ubuntu-branches/ubuntu/vivid/glib2.0/vivid-proposed

« back to all changes in this revision

Viewing changes to docs/reference/gio/html/GAsyncInitable.html

  • Committer: Package Import Robot
  • Author(s): Andreas Henriksson
  • Date: 2014-03-24 20:58:34 UTC
  • mfrom: (1.66.13)
  • Revision ID: package-import@ubuntu.com-20140324205834-8hsgok8k36ftocqa
Tags: 2.40.0-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
</tr>
53
53
<tr>
54
54
<td class="function_type">
55
 
<a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
55
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
56
56
</td>
57
57
<td class="function_name">
58
58
<a class="link" href="GAsyncInitable.html#g-async-initable-init-finish" title="g_async_initable_init_finish ()">g_async_initable_init_finish</a> <span class="c_punctuation">()</span>
68
68
</tr>
69
69
<tr>
70
70
<td class="function_type">
71
 
<a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="returnvalue">GObject</span></a> *
 
71
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="returnvalue">GObject</span></a> *
72
72
</td>
73
73
<td class="function_name">
74
74
<a class="link" href="GAsyncInitable.html#g-async-initable-new-finish" title="g_async_initable_new_finish ()">g_async_initable_new_finish</a> <span class="c_punctuation">()</span>
114
114
</div>
115
115
<div class="refsect1">
116
116
<a name="GAsyncInitable.object-hierarchy"></a><h2>Object Hierarchy</h2>
117
 
<pre class="screen">    <a href="/home/desrt/.cache/jhbuild/install/share/gtk-doc/html/gobject/GTypeModule.html">GInterface</a>
 
117
<pre class="screen">    <a href="http://library.gnome.org/devel/gobject/unstable/GTypeModule.html">GInterface</a>
118
118
    <span class="lineart">╰──</span> GAsyncInitable
119
119
</pre>
120
120
</div>
122
122
<a name="GAsyncInitable.prerequisites"></a><h2>Prerequisites</h2>
123
123
<p>
124
124
GAsyncInitable requires
125
 
 <a href="../gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>.</p>
 
125
 <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>.</p>
126
126
</div>
127
127
<div class="refsect1">
128
128
<a name="GAsyncInitable.implementations"></a><h2>Known Implementations</h2>
145
145
method directly; instead it will be used automatically in various ways.
146
146
For C applications you generally just call <a class="link" href="GAsyncInitable.html#g-async-initable-new-async" title="g_async_initable_new_async ()"><code class="function">g_async_initable_new_async()</code></a>
147
147
directly, or indirectly via a <code class="function">foo_thing_new_async()</code> wrapper. This will call
148
 
<a class="link" href="GAsyncInitable.html#g-async-initable-init-async" title="g_async_initable_init_async ()"><code class="function">g_async_initable_init_async()</code></a> under the cover, calling back with <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> and
149
 
a set <a href="../glib/glib-Error-Reporting.html#GError"><code class="literal">GError</code></a> on failure.</p>
 
148
<a class="link" href="GAsyncInitable.html#g-async-initable-init-async" title="g_async_initable_init_async ()"><code class="function">g_async_initable_init_async()</code></a> under the cover, calling back with <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> and
 
149
a set <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><code class="literal">GError</code></a> on failure.</p>
150
150
<p>A typical implementation might look something like this:</p>
151
151
<div class="informalexample">
152
152
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
254
254
        <span class="function"><a href="GTask.html#g-task-return-boolean">g_task_return_boolean</a></span> <span class="gtkdoc opt">(</span>task<span class="gtkdoc opt">,</span> TRUE<span class="gtkdoc opt">);</span>
255
255
      <span class="keyword">else</span>
256
256
        <span class="function"><a href="GTask.html#g-task-return-new-error">g_task_return_new_error</a></span> <span class="gtkdoc opt">(</span>task<span class="gtkdoc opt">, ...);</span>
257
 
      <span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span> <span class="gtkdoc opt">(</span>task<span class="gtkdoc opt">);</span>
 
257
      <span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span> <span class="gtkdoc opt">(</span>task<span class="gtkdoc opt">);</span>
258
258
    <span class="gtkdoc opt">}</span>
259
259
 
260
 
  <span class="function"><a href="../glib/glib-Doubly-Linked-Lists.html#g-list-free">g_list_free</a></span> <span class="gtkdoc opt">(</span>self<span class="gtkdoc opt">-&gt;</span>priv<span class="gtkdoc opt">-&gt;</span>init_results<span class="gtkdoc opt">);</span>
 
260
  <span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#g-list-free">g_list_free</a></span> <span class="gtkdoc opt">(</span>self<span class="gtkdoc opt">-&gt;</span>priv<span class="gtkdoc opt">-&gt;</span>init_results<span class="gtkdoc opt">);</span>
261
261
  self<span class="gtkdoc opt">-&gt;</span>priv<span class="gtkdoc opt">-&gt;</span>init_results <span class="gtkdoc opt">=</span> NULL<span class="gtkdoc opt">;</span>
262
262
<span class="gtkdoc opt">}</span>
263
263
 
277
277
    <span class="gtkdoc opt">{</span>
278
278
      <span class="keyword">case</span> NOT_INITIALIZED<span class="gtkdoc opt">:</span>
279
279
        <span class="function">_foo_get_ready</span> <span class="gtkdoc opt">(</span>self<span class="gtkdoc opt">);</span>
280
 
        self<span class="gtkdoc opt">-&gt;</span>priv<span class="gtkdoc opt">-&gt;</span>init_results <span class="gtkdoc opt">=</span> <span class="function"><a href="../glib/glib-Doubly-Linked-Lists.html#g-list-append">g_list_append</a></span> <span class="gtkdoc opt">(</span>self<span class="gtkdoc opt">-&gt;</span>priv<span class="gtkdoc opt">-&gt;</span>init_results<span class="gtkdoc opt">,</span>
 
280
        self<span class="gtkdoc opt">-&gt;</span>priv<span class="gtkdoc opt">-&gt;</span>init_results <span class="gtkdoc opt">=</span> <span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#g-list-append">g_list_append</a></span> <span class="gtkdoc opt">(</span>self<span class="gtkdoc opt">-&gt;</span>priv<span class="gtkdoc opt">-&gt;</span>init_results<span class="gtkdoc opt">,</span>
281
281
                                                  task<span class="gtkdoc opt">);</span>
282
282
        self<span class="gtkdoc opt">-&gt;</span>priv<span class="gtkdoc opt">-&gt;</span>state <span class="gtkdoc opt">=</span> INITIALIZING<span class="gtkdoc opt">;</span>
283
283
        <span class="keyword">break</span><span class="gtkdoc opt">;</span>
284
284
      <span class="keyword">case</span> INITIALIZING<span class="gtkdoc opt">:</span>
285
 
        self<span class="gtkdoc opt">-&gt;</span>priv<span class="gtkdoc opt">-&gt;</span>init_results <span class="gtkdoc opt">=</span> <span class="function"><a href="../glib/glib-Doubly-Linked-Lists.html#g-list-append">g_list_append</a></span> <span class="gtkdoc opt">(</span>self<span class="gtkdoc opt">-&gt;</span>priv<span class="gtkdoc opt">-&gt;</span>init_results<span class="gtkdoc opt">,</span>
 
285
        self<span class="gtkdoc opt">-&gt;</span>priv<span class="gtkdoc opt">-&gt;</span>init_results <span class="gtkdoc opt">=</span> <span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#g-list-append">g_list_append</a></span> <span class="gtkdoc opt">(</span>self<span class="gtkdoc opt">-&gt;</span>priv<span class="gtkdoc opt">-&gt;</span>init_results<span class="gtkdoc opt">,</span>
286
286
                                                  task<span class="gtkdoc opt">);</span>
287
287
        <span class="keyword">break</span><span class="gtkdoc opt">;</span>
288
288
      <span class="keyword">case</span> INITIALIZED<span class="gtkdoc opt">:</span>
290
290
          <span class="function"><a href="GTask.html#g-task-return-new-error">g_task_return_new_error</a></span> <span class="gtkdoc opt">(</span>task<span class="gtkdoc opt">, ...);</span>
291
291
        <span class="keyword">else</span>
292
292
          <span class="function"><a href="GTask.html#g-task-return-boolean">g_task_return_boolean</a></span> <span class="gtkdoc opt">(</span>task<span class="gtkdoc opt">,</span> TRUE<span class="gtkdoc opt">);</span>
293
 
        <span class="function"><a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span> <span class="gtkdoc opt">(</span>task<span class="gtkdoc opt">);</span>
 
293
        <span class="function"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref">g_object_unref</a></span> <span class="gtkdoc opt">(</span>task<span class="gtkdoc opt">);</span>
294
294
        <span class="keyword">break</span><span class="gtkdoc opt">;</span>
295
295
    <span class="gtkdoc opt">}</span>
296
296
<span class="gtkdoc opt">}</span>
300
300
                 GAsyncResult         <span class="gtkdoc opt">*</span>result<span class="gtkdoc opt">,</span>
301
301
                 GError              <span class="gtkdoc opt">**</span>error<span class="gtkdoc opt">)</span>
302
302
<span class="gtkdoc opt">{</span>
303
 
  <span class="function"><a href="../glib/glib-Warnings-and-Assertions.html#g-return-val-if-fail">g_return_val_if_fail</a></span> <span class="gtkdoc opt">(</span><span class="function"><a href="GTask.html#g-task-is-valid">g_task_is_valid</a></span> <span class="gtkdoc opt">(</span>result<span class="gtkdoc opt">,</span> initable<span class="gtkdoc opt">),</span> FALSE<span class="gtkdoc opt">);</span>
 
303
  <span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Warnings-and-Assertions.html#g-return-val-if-fail">g_return_val_if_fail</a></span> <span class="gtkdoc opt">(</span><span class="function"><a href="GTask.html#g-task-is-valid">g_task_is_valid</a></span> <span class="gtkdoc opt">(</span>result<span class="gtkdoc opt">,</span> initable<span class="gtkdoc opt">),</span> FALSE<span class="gtkdoc opt">);</span>
304
304
 
305
305
  <span class="keyword">return</span> <span class="function"><a href="GTask.html#g-task-propagate-boolean">g_task_propagate_boolean</a></span> <span class="gtkdoc opt">(</span><span class="function">G_TASK</span> <span class="gtkdoc opt">(</span>result<span class="gtkdoc opt">),</span> error<span class="gtkdoc opt">);</span>
306
306
<span class="gtkdoc opt">}</span>
330
330
                             <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
331
331
                             <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
332
332
                             <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
333
 
                             <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
 
333
                             <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
334
334
<p>Starts asynchronous initialization of the object implementing the
335
335
interface. This must be done before any real use of the object after
336
336
initial construction. If the object also implements <a class="link" href="GInitable.html" title="GInitable"><span class="type">GInitable</span></a> you can
341
341
initialization.</p>
342
342
<p>Implementations may also support cancellation. If <em class="parameter"><code>cancellable</code></em>
343
343
 is not
344
 
<a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then initialization can be cancelled by triggering the cancellable
 
344
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then initialization can be cancelled by triggering the cancellable
345
345
object from another thread. If the operation was cancelled, the error
346
346
<a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a> will be returned. If <em class="parameter"><code>cancellable</code></em>
347
 
 is not <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, and
 
347
 is not <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, and
348
348
the object doesn't support cancellable initialization, the error
349
349
<a class="link" href="gio-GIOError.html#G-IO-ERROR-NOT-SUPPORTED:CAPS"><code class="literal">G_IO_ERROR_NOT_SUPPORTED</code></a> will be returned.</p>
350
350
<p>As with <a class="link" href="GInitable.html" title="GInitable"><span class="type">GInitable</span></a>, if the object is not initialized, or initialization</p>
369
369
</tr>
370
370
<tr>
371
371
<td class="parameter_name"><p>cancellable</p></td>
372
 
<td class="parameter_description"><p>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
372
<td class="parameter_description"><p>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
373
373
<td class="parameter_annotations"> </td>
374
374
</tr>
375
375
<tr>
388
388
<div class="refsect3">
389
389
<a name="id-1.4.11.3.10.2.9"></a><h4>Returns</h4>
390
390
<p>with an error, then all operations on the object except
391
 
<a href="../gobject/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a> and <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> are considered to be invalid, and
392
 
have undefined behaviour. They will often fail with <a href="../glib/glib-Message-Logging.html#g-critical"><code class="function">g_critical()</code></a> or
393
 
<a href="../glib/glib-Message-Logging.html#g-warning"><code class="function">g_warning()</code></a>, but this must not be relied on.</p>
 
391
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-ref"><code class="function">g_object_ref()</code></a> and <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> are considered to be invalid, and
 
392
have undefined behaviour. They will often fail with <a href="http://library.gnome.org/devel/glib/unstable/glib-Message-Logging.html#g-critical"><code class="function">g_critical()</code></a> or
 
393
<a href="http://library.gnome.org/devel/glib/unstable/glib-Message-Logging.html#g-warning"><code class="function">g_warning()</code></a>, but this must not be relied on.</p>
394
394
<p>Implementations of this method must be idempotent: i.e. multiple calls
395
395
to this function with the same argument should return the same results.
396
396
Only the first call initializes the object; further calls return the result
408
408
<hr>
409
409
<div class="refsect2">
410
410
<a name="g-async-initable-init-finish"></a><h3>g_async_initable_init_finish ()</h3>
411
 
<pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
 
411
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
412
412
g_async_initable_init_finish (<em class="parameter"><code><a class="link" href="GAsyncInitable.html" title="GAsyncInitable"><span class="type">GAsyncInitable</span></a> *initable</code></em>,
413
413
                              <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
414
 
                              <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
414
                              <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
415
415
<p>Finishes asynchronous initialization and returns the result.
416
416
See <a class="link" href="GAsyncInitable.html#g-async-initable-init-async" title="g_async_initable_init_async ()"><code class="function">g_async_initable_init_async()</code></a>.</p>
417
417
<div class="refsect3">
435
435
</tr>
436
436
<tr>
437
437
<td class="parameter_name"><p>error</p></td>
438
 
<td class="parameter_description"><p>a <a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store the error occurring, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to
 
438
<td class="parameter_description"><p>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store the error occurring, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to
439
439
ignore.</p></td>
440
440
<td class="parameter_annotations"> </td>
441
441
</tr>
444
444
</div>
445
445
<div class="refsect3">
446
446
<a name="id-1.4.11.3.10.3.6"></a><h4>Returns</h4>
447
 
<p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if successful. If an error has occurred, this function
448
 
will return <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> and set <em class="parameter"><code>error</code></em>
 
447
<p> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if successful. If an error has occurred, this function
 
448
will return <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> and set <em class="parameter"><code>error</code></em>
449
449
appropriately if present.</p>
450
450
<p></p>
451
451
</div>
455
455
<div class="refsect2">
456
456
<a name="g-async-initable-new-async"></a><h3>g_async_initable_new_async ()</h3>
457
457
<pre class="programlisting"><span class="returnvalue">void</span>
458
 
g_async_initable_new_async (<em class="parameter"><code><a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> object_type</code></em>,
 
458
g_async_initable_new_async (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> object_type</code></em>,
459
459
                            <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
460
460
                            <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
461
461
                            <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
462
 
                            <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
463
 
                            <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
 
462
                            <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
 
463
                            <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
464
464
                            <em class="parameter"><code>...</code></em>);</pre>
465
465
<p>Helper function for constructing <a class="link" href="GAsyncInitable.html" title="GAsyncInitable"><span class="type">GAsyncInitable</span></a> object. This is
466
 
similar to <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-new"><code class="function">g_object_new()</code></a> but also initializes the object asynchronously.</p>
 
466
similar to <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-new"><code class="function">g_object_new()</code></a> but also initializes the object asynchronously.</p>
467
467
<p>When the initialization is finished, <em class="parameter"><code>callback</code></em>
468
468
 will be called. You can
469
469
then call <a class="link" href="GAsyncInitable.html#g-async-initable-new-finish" title="g_async_initable_new_finish ()"><code class="function">g_async_initable_new_finish()</code></a> to get the new object and check
479
479
<tbody>
480
480
<tr>
481
481
<td class="parameter_name"><p>object_type</p></td>
482
 
<td class="parameter_description"><p>a <a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> supporting <a class="link" href="GAsyncInitable.html" title="GAsyncInitable"><span class="type">GAsyncInitable</span></a>.</p></td>
 
482
<td class="parameter_description"><p>a <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> supporting <a class="link" href="GAsyncInitable.html" title="GAsyncInitable"><span class="type">GAsyncInitable</span></a>.</p></td>
483
483
<td class="parameter_annotations"> </td>
484
484
</tr>
485
485
<tr>
489
489
</tr>
490
490
<tr>
491
491
<td class="parameter_name"><p>cancellable</p></td>
492
 
<td class="parameter_description"><p>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
492
<td class="parameter_description"><p>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
493
493
<td class="parameter_annotations"> </td>
494
494
</tr>
495
495
<tr>
505
505
</tr>
506
506
<tr>
507
507
<td class="parameter_name"><p>first_property_name</p></td>
508
 
<td class="parameter_description"><p> the name of the first property, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no
 
508
<td class="parameter_description"><p> the name of the first property, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no
509
509
properties. </p></td>
510
510
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
511
511
</tr>
512
512
<tr>
513
513
<td class="parameter_name"><p>...</p></td>
514
514
<td class="parameter_description"><p>the value of the first property, followed by other property
515
 
value pairs, and ended by <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
 
515
value pairs, and ended by <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
516
516
<td class="parameter_annotations"> </td>
517
517
</tr>
518
518
</tbody>
523
523
<hr>
524
524
<div class="refsect2">
525
525
<a name="g-async-initable-new-finish"></a><h3>g_async_initable_new_finish ()</h3>
526
 
<pre class="programlisting"><a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="returnvalue">GObject</span></a> *
 
526
<pre class="programlisting"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="returnvalue">GObject</span></a> *
527
527
g_async_initable_new_finish (<em class="parameter"><code><a class="link" href="GAsyncInitable.html" title="GAsyncInitable"><span class="type">GAsyncInitable</span></a> *initable</code></em>,
528
528
                             <em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *res</code></em>,
529
 
                             <em class="parameter"><code><a href="../glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
 
529
                             <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
530
530
<p>Finishes the async construction for the various g_async_initable_new
531
 
calls, returning the created object or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.</p>
 
531
calls, returning the created object or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error.</p>
532
532
<div class="refsect3">
533
533
<a name="id-1.4.11.3.10.5.5"></a><h4>Parameters</h4>
534
534
<div class="informaltable"><table width="100%" border="0">
550
550
</tr>
551
551
<tr>
552
552
<td class="parameter_name"><p>error</p></td>
553
 
<td class="parameter_description"><p>return location for errors, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore</p></td>
 
553
<td class="parameter_description"><p>return location for errors, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore</p></td>
554
554
<td class="parameter_annotations"> </td>
555
555
</tr>
556
556
</tbody>
558
558
</div>
559
559
<div class="refsect3">
560
560
<a name="id-1.4.11.3.10.5.6"></a><h4>Returns</h4>
561
 
<p> a newly created <a href="../gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>,
562
 
or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. Free with <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
 
561
<p> a newly created <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>,
 
562
or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on error. Free with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a>. </p>
563
563
<p><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GObject.Object][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
564
564
</div>
565
565
<p class="since">Since 2.22</p>
568
568
<div class="refsect2">
569
569
<a name="g-async-initable-new-valist-async"></a><h3>g_async_initable_new_valist_async ()</h3>
570
570
<pre class="programlisting"><span class="returnvalue">void</span>
571
 
g_async_initable_new_valist_async (<em class="parameter"><code><a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> object_type</code></em>,
572
 
                                   <em class="parameter"><code>const <a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
 
571
g_async_initable_new_valist_async (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> object_type</code></em>,
 
572
                                   <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *first_property_name</code></em>,
573
573
                                   <em class="parameter"><code><span class="type">va_list</span> var_args</code></em>,
574
574
                                   <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
575
575
                                   <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
576
576
                                   <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
577
 
                                   <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
 
577
                                   <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
578
578
<p>Helper function for constructing <a class="link" href="GAsyncInitable.html" title="GAsyncInitable"><span class="type">GAsyncInitable</span></a> object. This is
579
 
similar to <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-new-valist"><code class="function">g_object_new_valist()</code></a> but also initializes the object
 
579
similar to <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-new-valist"><code class="function">g_object_new_valist()</code></a> but also initializes the object
580
580
asynchronously.</p>
581
581
<p>When the initialization is finished, <em class="parameter"><code>callback</code></em>
582
582
 will be called. You can
593
593
<tbody>
594
594
<tr>
595
595
<td class="parameter_name"><p>object_type</p></td>
596
 
<td class="parameter_description"><p>a <a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> supporting <a class="link" href="GAsyncInitable.html" title="GAsyncInitable"><span class="type">GAsyncInitable</span></a>.</p></td>
 
596
<td class="parameter_description"><p>a <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> supporting <a class="link" href="GAsyncInitable.html" title="GAsyncInitable"><span class="type">GAsyncInitable</span></a>.</p></td>
597
597
<td class="parameter_annotations"> </td>
598
598
</tr>
599
599
<tr>
600
600
<td class="parameter_name"><p>first_property_name</p></td>
601
601
<td class="parameter_description"><p>the name of the first property, followed by
602
 
the value, and other property value pairs, and ended by <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
 
602
the value, and other property value pairs, and ended by <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
603
603
<td class="parameter_annotations"> </td>
604
604
</tr>
605
605
<tr>
615
615
</tr>
616
616
<tr>
617
617
<td class="parameter_name"><p>cancellable</p></td>
618
 
<td class="parameter_description"><p>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
618
<td class="parameter_description"><p>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
619
619
<td class="parameter_annotations"> </td>
620
620
</tr>
621
621
<tr>
638
638
<div class="refsect2">
639
639
<a name="g-async-initable-newv-async"></a><h3>g_async_initable_newv_async ()</h3>
640
640
<pre class="programlisting"><span class="returnvalue">void</span>
641
 
g_async_initable_newv_async (<em class="parameter"><code><a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> object_type</code></em>,
642
 
                             <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_parameters</code></em>,
643
 
                             <em class="parameter"><code><a href="../gobject/gobject-The-Base-Object-Type.html#GParameter"><span class="type">GParameter</span></a> *parameters</code></em>,
 
641
g_async_initable_newv_async (<em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> object_type</code></em>,
 
642
                             <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_parameters</code></em>,
 
643
                             <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GParameter"><span class="type">GParameter</span></a> *parameters</code></em>,
644
644
                             <em class="parameter"><code><span class="type">int</span> io_priority</code></em>,
645
645
                             <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>,
646
646
                             <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>,
647
 
                             <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
 
647
                             <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
648
648
<p>Helper function for constructing <a class="link" href="GAsyncInitable.html" title="GAsyncInitable"><span class="type">GAsyncInitable</span></a> object. This is
649
 
similar to <a href="../gobject/gobject-The-Base-Object-Type.html#g-object-newv"><code class="function">g_object_newv()</code></a> but also initializes the object asynchronously.</p>
 
649
similar to <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-newv"><code class="function">g_object_newv()</code></a> but also initializes the object asynchronously.</p>
650
650
<p>When the initialization is finished, <em class="parameter"><code>callback</code></em>
651
651
 will be called. You can
652
652
then call <a class="link" href="GAsyncInitable.html#g-async-initable-new-finish" title="g_async_initable_new_finish ()"><code class="function">g_async_initable_new_finish()</code></a> to get the new object and check
662
662
<tbody>
663
663
<tr>
664
664
<td class="parameter_name"><p>object_type</p></td>
665
 
<td class="parameter_description"><p>a <a href="../gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> supporting <a class="link" href="GAsyncInitable.html" title="GAsyncInitable"><span class="type">GAsyncInitable</span></a>.</p></td>
 
665
<td class="parameter_description"><p>a <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> supporting <a class="link" href="GAsyncInitable.html" title="GAsyncInitable"><span class="type">GAsyncInitable</span></a>.</p></td>
666
666
<td class="parameter_annotations"> </td>
667
667
</tr>
668
668
<tr>
683
683
</tr>
684
684
<tr>
685
685
<td class="parameter_name"><p>cancellable</p></td>
686
 
<td class="parameter_description"><p>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
 
686
<td class="parameter_description"><p>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</p></td>
687
687
<td class="parameter_annotations"> </td>
688
688
</tr>
689
689
<tr>
741
741
</colgroup>
742
742
<tbody>
743
743
<tr>
744
 
<td class="struct_member_name"><p><a href="../gobject/gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> <em class="structfield"><code><a name="GAsyncInitableIface.g-iface"></a>g_iface</code></em>;</p></td>
 
744
<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> <em class="structfield"><code><a name="GAsyncInitableIface.g-iface"></a>g_iface</code></em>;</p></td>
745
745
<td class="struct_member_description"><p>The parent interface.</p></td>
746
746
<td class="struct_member_annotations"> </td>
747
747
</tr>