⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.10
Server IP:
157.245.101.34
Server:
Linux skvinfotech-website 5.4.0-131-generic #147-Ubuntu SMP Fri Oct 14 17:07:22 UTC 2022 x86_64
Server Software:
Apache/2.4.41 (Ubuntu)
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
gtk-doc
/
html
/
gio
/
View File Name :
GSimpleAsyncResult.html
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>GSimpleAsyncResult: GIO Reference Manual</title> <meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> <link rel="home" href="index.html" title="GIO Reference Manual"> <link rel="up" href="async.html" title="Asynchronous I/O"> <link rel="prev" href="gio-GIOScheduler.html" title="GIOScheduler"> <link rel="next" href="conversion.html" title="Data conversion"> <meta name="generator" content="GTK-Doc V1.32 (XML mode)"> <link rel="stylesheet" href="style.css" type="text/css"> </head> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> <td width="100%" align="left" class="shortcuts"> <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> <a href="#GSimpleAsyncResult.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> <a href="#GSimpleAsyncResult.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span> <a href="#GSimpleAsyncResult.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span> </td> <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> <td><a accesskey="u" href="async.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> <td><a accesskey="p" href="gio-GIOScheduler.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> <td><a accesskey="n" href="conversion.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> </tr></table> <div class="refentry"> <a name="GSimpleAsyncResult"></a><div class="titlepage"></div> <div class="refnamediv"><table width="100%"><tr> <td valign="top"> <h2><span class="refentrytitle"><a name="GSimpleAsyncResult.top_of_page"></a>GSimpleAsyncResult</span></h2> <p>GSimpleAsyncResult — Simple asynchronous results implementation</p> </td> <td class="gallery_image" valign="top" align="right"></td> </tr></table></div> <div class="refsect1"> <a name="GSimpleAsyncResult.functions"></a><h2>Functions</h2> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="functions_proto_type"> <col class="functions_proto_name"> </colgroup> <tbody> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <span class="c_punctuation">(</span><a class="link" href="GSimpleAsyncResult.html#GSimpleAsyncThreadFunc" title="GSimpleAsyncThreadFunc ()">*GSimpleAsyncThreadFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="returnvalue">GSimpleAsyncResult</span></a> * </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-new" title="g_simple_async_result_new ()">g_simple_async_result_new</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="returnvalue">GSimpleAsyncResult</span></a> * </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-new-error" title="g_simple_async_result_new_error ()">g_simple_async_result_new_error</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="returnvalue">GSimpleAsyncResult</span></a> * </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-new-from-error" title="g_simple_async_result_new_from_error ()">g_simple_async_result_new_from_error</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="returnvalue">GSimpleAsyncResult</span></a> * </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-new-take-error" title="g_simple_async_result_new_take_error ()">g_simple_async_result_new_take_error</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-set-check-cancellable" title="g_simple_async_result_set_check_cancellable ()">g_simple_async_result_set_check_cancellable</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-set-op-res-gpointer" title="g_simple_async_result_set_op_res_gpointer ()">g_simple_async_result_set_op_res_gpointer</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">gpointer</span> </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-get-op-res-gpointer" title="g_simple_async_result_get_op_res_gpointer ()">g_simple_async_result_get_op_res_gpointer</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-set-op-res-gssize" title="g_simple_async_result_set_op_res_gssize ()">g_simple_async_result_set_op_res_gssize</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">gssize</span> </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-get-op-res-gssize" title="g_simple_async_result_get_op_res_gssize ()">g_simple_async_result_get_op_res_gssize</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-set-op-res-gboolean" title="g_simple_async_result_set_op_res_gboolean ()">g_simple_async_result_set_op_res_gboolean</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">gboolean</span> </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-get-op-res-gboolean" title="g_simple_async_result_get_op_res_gboolean ()">g_simple_async_result_get_op_res_gboolean</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">gpointer</span> </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-get-source-tag" title="g_simple_async_result_get_source_tag ()">g_simple_async_result_get_source_tag</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">gboolean</span> </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-is-valid" title="g_simple_async_result_is_valid ()">g_simple_async_result_is_valid</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-set-handle-cancellation" title="g_simple_async_result_set_handle_cancellation ()">g_simple_async_result_set_handle_cancellation</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-complete" title="g_simple_async_result_complete ()">g_simple_async_result_complete</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-complete-in-idle" title="g_simple_async_result_complete_in_idle ()">g_simple_async_result_complete_in_idle</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-run-in-thread" title="g_simple_async_result_run_in_thread ()">g_simple_async_result_run_in_thread</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-set-from-error" title="g_simple_async_result_set_from_error ()">g_simple_async_result_set_from_error</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-take-error" title="g_simple_async_result_take_error ()">g_simple_async_result_take_error</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">gboolean</span> </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-propagate-error" title="g_simple_async_result_propagate_error ()">g_simple_async_result_propagate_error</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-set-error" title="g_simple_async_result_set_error ()">g_simple_async_result_set_error</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-set-error-va" title="g_simple_async_result_set_error_va ()">g_simple_async_result_set_error_va</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-report-error-in-idle" title="g_simple_async_report_error_in_idle ()">g_simple_async_report_error_in_idle</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-report-gerror-in-idle" title="g_simple_async_report_gerror_in_idle ()">g_simple_async_report_gerror_in_idle</a> <span class="c_punctuation">()</span> </td> </tr> <tr> <td class="function_type"> <span class="returnvalue">void</span> </td> <td class="function_name"> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-report-take-gerror-in-idle" title="g_simple_async_report_take_gerror_in_idle ()">g_simple_async_report_take_gerror_in_idle</a> <span class="c_punctuation">()</span> </td> </tr> </tbody> </table></div> </div> <div class="refsect1"> <a name="GSimpleAsyncResult.other"></a><h2>Types and Values</h2> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="other_proto_type"> <col class="other_proto_name"> </colgroup> <tbody><tr> <td class="datatype_keyword"> </td> <td class="function_name"><a class="link" href="GSimpleAsyncResult.html#GSimpleAsyncResult-struct" title="GSimpleAsyncResult">GSimpleAsyncResult</a></td> </tr></tbody> </table></div> </div> <div class="refsect1"> <a name="GSimpleAsyncResult.object-hierarchy"></a><h2>Object Hierarchy</h2> <pre class="screen"> GObject <span class="lineart">╰──</span> GSimpleAsyncResult </pre> </div> <div class="refsect1"> <a name="GSimpleAsyncResult.implemented-interfaces"></a><h2>Implemented Interfaces</h2> <p> GSimpleAsyncResult implements <a class="link" href="GAsyncResult.html" title="GAsyncResult">GAsyncResult</a>.</p> </div> <div class="refsect1"> <a name="GSimpleAsyncResult.includes"></a><h2>Includes</h2> <pre class="synopsis">#include <gio/gio.h> </pre> </div> <div class="refsect1"> <a name="GSimpleAsyncResult.description"></a><h2>Description</h2> <p>As of GLib 2.46, <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> is deprecated in favor of <a class="link" href="GTask.html" title="GTask"><span class="type">GTask</span></a>, which provides a simpler API.</p> <p><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> implements <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a>.</p> <p>GSimpleAsyncResult handles <a href="GAsyncResult.html#GAsyncReadyCallback"><span class="type">GAsyncReadyCallbacks</span></a>, error reporting, operation cancellation and the final state of an operation, completely transparent to the application. Results can be returned as a pointer e.g. for functions that return data that is collected asynchronously, a boolean value for checking the success or failure of an operation, or a <span class="type">gssize</span> for operations which return the number of bytes modified by the operation; all of the simple return cases are covered.</p> <p>Most of the time, an application will not need to know of the details of this API; it is handled transparently, and any necessary operations are handled by <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a>'s interface. However, if implementing a new GIO module, for writing language bindings, or for complex applications that need better control of how asynchronous operations are completed, it is important to understand this functionality.</p> <p>GSimpleAsyncResults are tagged with the calling function to ensure that asynchronous functions and their finishing functions are used together correctly.</p> <p>To create a new <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>, call <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-new" title="g_simple_async_result_new ()"><code class="function">g_simple_async_result_new()</code></a>. If the result needs to be created for a <span class="type">GError</span>, use <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-new-from-error" title="g_simple_async_result_new_from_error ()"><code class="function">g_simple_async_result_new_from_error()</code></a> or <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-new-take-error" title="g_simple_async_result_new_take_error ()"><code class="function">g_simple_async_result_new_take_error()</code></a>. If a <span class="type">GError</span> is not available (e.g. the asynchronous operation's doesn't take a <span class="type">GError</span> argument), but the result still needs to be created for an error condition, use <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-new-error" title="g_simple_async_result_new_error ()"><code class="function">g_simple_async_result_new_error()</code></a> (or <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-set-error-va" title="g_simple_async_result_set_error_va ()"><code class="function">g_simple_async_result_set_error_va()</code></a> if your application or binding requires passing a variable argument list directly), and the error can then be propagated through the use of <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-propagate-error" title="g_simple_async_result_propagate_error ()"><code class="function">g_simple_async_result_propagate_error()</code></a>.</p> <p>An asynchronous operation can be made to ignore a cancellation event by calling <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-set-handle-cancellation" title="g_simple_async_result_set_handle_cancellation ()"><code class="function">g_simple_async_result_set_handle_cancellation()</code></a> with a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> for the operation and <code class="literal">FALSE</code>. This is useful for operations that are dangerous to cancel, such as close (which would cause a leak if cancelled before being run).</p> <p>GSimpleAsyncResult can integrate into GLib's event loop, <span class="type">GMainLoop</span>, or it can use <span class="type">GThreads</span>. <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-complete" title="g_simple_async_result_complete ()"><code class="function">g_simple_async_result_complete()</code></a> will finish an I/O task directly from the point where it is called. <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-complete-in-idle" title="g_simple_async_result_complete_in_idle ()"><code class="function">g_simple_async_result_complete_in_idle()</code></a> will finish it from an idle handler in the thread-default main context where the <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> was created. <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-run-in-thread" title="g_simple_async_result_run_in_thread ()"><code class="function">g_simple_async_result_run_in_thread()</code></a> will run the job in a separate thread and then use <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-complete-in-idle" title="g_simple_async_result_complete_in_idle ()"><code class="function">g_simple_async_result_complete_in_idle()</code></a> to deliver the result.</p> <p>To set the results of an asynchronous function, <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-set-op-res-gpointer" title="g_simple_async_result_set_op_res_gpointer ()"><code class="function">g_simple_async_result_set_op_res_gpointer()</code></a>, <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-set-op-res-gboolean" title="g_simple_async_result_set_op_res_gboolean ()"><code class="function">g_simple_async_result_set_op_res_gboolean()</code></a>, and <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-set-op-res-gssize" title="g_simple_async_result_set_op_res_gssize ()"><code class="function">g_simple_async_result_set_op_res_gssize()</code></a> are provided, setting the operation's result to a gpointer, gboolean, or gssize, respectively.</p> <p>Likewise, to get the result of an asynchronous function, <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-get-op-res-gpointer" title="g_simple_async_result_get_op_res_gpointer ()"><code class="function">g_simple_async_result_get_op_res_gpointer()</code></a>, <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-get-op-res-gboolean" title="g_simple_async_result_get_op_res_gboolean ()"><code class="function">g_simple_async_result_get_op_res_gboolean()</code></a>, and <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-get-op-res-gssize" title="g_simple_async_result_get_op_res_gssize ()"><code class="function">g_simple_async_result_get_op_res_gssize()</code></a> are provided, getting the operation's result as a gpointer, gboolean, and gssize, respectively.</p> <p>For the details of the requirements implementations must respect, see <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a>. A typical implementation of an asynchronous operation using GSimpleAsyncResult looks something like this:</p> <div class="informalexample"> <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td class="listing_lines" align="right"><pre>1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92</pre></td> <td class="listing_code"><pre class="programlisting"><span class="k">static</span> <span class="kt">void</span> <span class="nf">baked_cb</span> <span class="p">(</span><span class="n">Cake</span> <span class="o">*</span><span class="n">cake</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">user_data</span><span class="p">)</span> <span class="p">{</span> <span class="c1">// In this example, this callback is not given a reference to the cake,</span> <span class="c1">// so the GSimpleAsyncResult has to take a reference to it.</span> <span class="n">GSimpleAsyncResult</span> <span class="o">*</span><span class="n">result</span> <span class="o">=</span> <span class="n">user_data</span><span class="p">;</span> <span class="k">if</span> <span class="p">(</span><span class="n">cake</span> <span class="o">==</span> <span class="nb">NULL</span><span class="p">)</span> <span class="n">g_simple_async_result_set_error</span> <span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="n">BAKER_ERRORS</span><span class="p">,</span> <span class="n">BAKER_ERROR_NO_FLOUR</span><span class="p">,</span> <span class="s">"Go to the supermarket"</span><span class="p">);</span> <span class="k">else</span> <span class="n">g_simple_async_result_set_op_res_gpointer</span> <span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="n">g_object_ref</span> <span class="p">(</span><span class="n">cake</span><span class="p">),</span> <span class="n">g_object_unref</span><span class="p">);</span> <span class="c1">// In this example, we assume that baked_cb is called as a callback from</span> <span class="c1">// the mainloop, so it's safe to complete the operation synchronously here.</span> <span class="c1">// If, however, _baker_prepare_cake () might call its callback without</span> <span class="c1">// first returning to the mainloop — inadvisable, but some APIs do so —</span> <span class="c1">// we would need to use g_simple_async_result_complete_in_idle().</span> <span class="n">g_simple_async_result_complete</span> <span class="p">(</span><span class="n">result</span><span class="p">);</span> <span class="n">g_object_unref</span> <span class="p">(</span><span class="n">result</span><span class="p">);</span> <span class="p">}</span> <span class="kt">void</span> <span class="nf">baker_bake_cake_async</span> <span class="p">(</span><span class="n">Baker</span> <span class="o">*</span><span class="n">self</span><span class="p">,</span> <span class="n">guint</span> <span class="n">radius</span><span class="p">,</span> <span class="n">GAsyncReadyCallback</span> <span class="n">callback</span><span class="p">,</span> <span class="n">gpointer</span> <span class="n">user_data</span><span class="p">)</span> <span class="p">{</span> <span class="n">GSimpleAsyncResult</span> <span class="o">*</span><span class="n">simple</span><span class="p">;</span> <span class="n">Cake</span> <span class="o">*</span><span class="n">cake</span><span class="p">;</span> <span class="k">if</span> <span class="p">(</span><span class="n">radius</span> <span class="o"><</span> <span class="mi">3</span><span class="p">)</span> <span class="p">{</span> <span class="n">g_simple_async_report_error_in_idle</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">self</span><span class="p">),</span> <span class="n">callback</span><span class="p">,</span> <span class="n">user_data</span><span class="p">,</span> <span class="n">BAKER_ERRORS</span><span class="p">,</span> <span class="n">BAKER_ERROR_TOO_SMALL</span><span class="p">,</span> <span class="s">"%ucm radius cakes are silly"</span><span class="p">,</span> <span class="n">radius</span><span class="p">);</span> <span class="k">return</span><span class="p">;</span> <span class="p">}</span> <span class="n">simple</span> <span class="o">=</span> <span class="n">g_simple_async_result_new</span> <span class="p">(</span><span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">self</span><span class="p">),</span> <span class="n">callback</span><span class="p">,</span> <span class="n">user_data</span><span class="p">,</span> <span class="n">baker_bake_cake_async</span><span class="p">);</span> <span class="n">cake</span> <span class="o">=</span> <span class="n">_baker_get_cached_cake</span> <span class="p">(</span><span class="n">self</span><span class="p">,</span> <span class="n">radius</span><span class="p">);</span> <span class="k">if</span> <span class="p">(</span><span class="n">cake</span> <span class="o">!=</span> <span class="nb">NULL</span><span class="p">)</span> <span class="p">{</span> <span class="n">g_simple_async_result_set_op_res_gpointer</span> <span class="p">(</span><span class="n">simple</span><span class="p">,</span> <span class="n">g_object_ref</span> <span class="p">(</span><span class="n">cake</span><span class="p">),</span> <span class="n">g_object_unref</span><span class="p">);</span> <span class="n">g_simple_async_result_complete_in_idle</span> <span class="p">(</span><span class="n">simple</span><span class="p">);</span> <span class="n">g_object_unref</span> <span class="p">(</span><span class="n">simple</span><span class="p">);</span> <span class="c1">// Drop the reference returned by _baker_get_cached_cake();</span> <span class="c1">// the GSimpleAsyncResult has taken its own reference.</span> <span class="n">g_object_unref</span> <span class="p">(</span><span class="n">cake</span><span class="p">);</span> <span class="k">return</span><span class="p">;</span> <span class="p">}</span> <span class="n">_baker_prepare_cake</span> <span class="p">(</span><span class="n">self</span><span class="p">,</span> <span class="n">radius</span><span class="p">,</span> <span class="n">baked_cb</span><span class="p">,</span> <span class="n">simple</span><span class="p">);</span> <span class="p">}</span> <span class="n">Cake</span> <span class="o">*</span> <span class="nf">baker_bake_cake_finish</span> <span class="p">(</span><span class="n">Baker</span> <span class="o">*</span><span class="n">self</span><span class="p">,</span> <span class="n">GAsyncResult</span> <span class="o">*</span><span class="n">result</span><span class="p">,</span> <span class="n">GError</span> <span class="o">**</span><span class="n">error</span><span class="p">)</span> <span class="p">{</span> <span class="n">GSimpleAsyncResult</span> <span class="o">*</span><span class="n">simple</span><span class="p">;</span> <span class="n">Cake</span> <span class="o">*</span><span class="n">cake</span><span class="p">;</span> <span class="n">g_return_val_if_fail</span> <span class="p">(</span><span class="n">g_simple_async_result_is_valid</span> <span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="n">G_OBJECT</span> <span class="p">(</span><span class="n">self</span><span class="p">),</span> <span class="n">baker_bake_cake_async</span><span class="p">),</span> <span class="nb">NULL</span><span class="p">);</span> <span class="n">simple</span> <span class="o">=</span> <span class="p">(</span><span class="n">GSimpleAsyncResult</span> <span class="o">*</span><span class="p">)</span> <span class="n">result</span><span class="p">;</span> <span class="k">if</span> <span class="p">(</span><span class="n">g_simple_async_result_propagate_error</span> <span class="p">(</span><span class="n">simple</span><span class="p">,</span> <span class="n">error</span><span class="p">))</span> <span class="k">return</span> <span class="nb">NULL</span><span class="p">;</span> <span class="n">cake</span> <span class="o">=</span> <span class="n">CAKE</span> <span class="p">(</span><span class="n">g_simple_async_result_get_op_res_gpointer</span> <span class="p">(</span><span class="n">simple</span><span class="p">));</span> <span class="k">return</span> <span class="n">g_object_ref</span> <span class="p">(</span><span class="n">cake</span><span class="p">);</span> <span class="p">}</span></pre></td> </tr> </tbody> </table> </div> <p></p> </div> <div class="refsect1"> <a name="GSimpleAsyncResult.functions_details"></a><h2>Functions</h2> <div class="refsect2"> <a name="GSimpleAsyncThreadFunc"></a><h3>GSimpleAsyncThreadFunc ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> <span class="c_punctuation">(</span>*GSimpleAsyncThreadFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *res</code></em>, <em class="parameter"><code><span class="type">GObject</span> *object</code></em>, <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>);</pre> <p>Simple thread function that runs an asynchronous operation and checks for cancellation.</p> <div class="refsect3"> <a name="GSimpleAsyncThreadFunc.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>res</p></td> <td class="parameter_description"><p>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>object</p></td> <td class="parameter_description"><p>a <span class="type">GObject</span>.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>cancellable</p></td> <td class="parameter_description"><p>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <code class="literal">NULL</code> to ignore.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="g-simple-async-result-new"></a><h3>g_simple_async_result_new ()</h3> <pre class="programlisting"><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="returnvalue">GSimpleAsyncResult</span></a> * g_simple_async_result_new (<em class="parameter"><code><span class="type">GObject</span> *source_object</code></em>, <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>, <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>, <em class="parameter"><code><span class="type">gpointer</span> source_tag</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_result_new</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html#g-task-new" title="g_task_new ()"><code class="function">g_task_new()</code></a> instead.</p> </div> <p>Creates a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</p> <p>The common convention is to create the <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> in the function that starts the asynchronous operation and use that same function as the <em class="parameter"><code>source_tag</code></em> .</p> <p>If your operation supports cancellation with <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> (which it probably should) then you should provide the user's cancellable to <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-set-check-cancellable" title="g_simple_async_result_set_check_cancellable ()"><code class="function">g_simple_async_result_set_check_cancellable()</code></a> immediately after this function returns.</p> <div class="refsect3"> <a name="g-simple-async-result-new.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>source_object</p></td> <td class="parameter_description"><p>a <span class="type">GObject</span>, or <code class="literal">NULL</code>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>callback</p></td> <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>user_data</p></td> <td class="parameter_description"><p>user data passed to <em class="parameter"><code>callback</code></em> . </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>source_tag</p></td> <td class="parameter_description"><p>the asynchronous function.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="g-simple-async-result-new.returns"></a><h4>Returns</h4> <p> a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</p> </div> </div> <hr> <div class="refsect2"> <a name="g-simple-async-result-new-error"></a><h3>g_simple_async_result_new_error ()</h3> <pre class="programlisting"><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="returnvalue">GSimpleAsyncResult</span></a> * g_simple_async_result_new_error (<em class="parameter"><code><span class="type">GObject</span> *source_object</code></em>, <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>, <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>, <em class="parameter"><code><span class="type">GQuark</span> domain</code></em>, <em class="parameter"><code><span class="type">gint</span> code</code></em>, <em class="parameter"><code>const <span class="type">char</span> *format</code></em>, <em class="parameter"><code>...</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_result_new_error</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html#g-task-new" title="g_task_new ()"><code class="function">g_task_new()</code></a> and <a class="link" href="GTask.html#g-task-return-new-error" title="g_task_return_new_error ()"><code class="function">g_task_return_new_error()</code></a> instead.</p> </div> <p>Creates a new <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> with a set error.</p> <div class="refsect3"> <a name="g-simple-async-result-new-error.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>source_object</p></td> <td class="parameter_description"><p>a <span class="type">GObject</span>, or <code class="literal">NULL</code>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>callback</p></td> <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>user_data</p></td> <td class="parameter_description"><p>user data passed to <em class="parameter"><code>callback</code></em> . </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>domain</p></td> <td class="parameter_description"><p>a <span class="type">GQuark</span>.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>code</p></td> <td class="parameter_description"><p>an error code.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>format</p></td> <td class="parameter_description"><p>a string with format characters.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>...</p></td> <td class="parameter_description"><p>a list of values to insert into <em class="parameter"><code>format</code></em> .</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="g-simple-async-result-new-error.returns"></a><h4>Returns</h4> <p> a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</p> </div> </div> <hr> <div class="refsect2"> <a name="g-simple-async-result-new-from-error"></a><h3>g_simple_async_result_new_from_error ()</h3> <pre class="programlisting"><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="returnvalue">GSimpleAsyncResult</span></a> * g_simple_async_result_new_from_error (<em class="parameter"><code><span class="type">GObject</span> *source_object</code></em>, <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>, <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>, <em class="parameter"><code>const <span class="type">GError</span> *error</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_result_new_from_error</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html#g-task-new" title="g_task_new ()"><code class="function">g_task_new()</code></a> and <a class="link" href="GTask.html#g-task-return-error" title="g_task_return_error ()"><code class="function">g_task_return_error()</code></a> instead.</p> </div> <p>Creates a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> from an error condition.</p> <div class="refsect3"> <a name="g-simple-async-result-new-from-error.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>source_object</p></td> <td class="parameter_description"><p>a <span class="type">GObject</span>, or <code class="literal">NULL</code>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>callback</p></td> <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>user_data</p></td> <td class="parameter_description"><p>user data passed to <em class="parameter"><code>callback</code></em> . </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>error</p></td> <td class="parameter_description"><p>a <span class="type">GError</span></p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="g-simple-async-result-new-from-error.returns"></a><h4>Returns</h4> <p> a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</p> </div> </div> <hr> <div class="refsect2"> <a name="g-simple-async-result-new-take-error"></a><h3>g_simple_async_result_new_take_error ()</h3> <pre class="programlisting"><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="returnvalue">GSimpleAsyncResult</span></a> * g_simple_async_result_new_take_error (<em class="parameter"><code><span class="type">GObject</span> *source_object</code></em>, <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>, <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>, <em class="parameter"><code><span class="type">GError</span> *error</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_result_new_take_error</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html#g-task-new" title="g_task_new ()"><code class="function">g_task_new()</code></a> and <a class="link" href="GTask.html#g-task-return-error" title="g_task_return_error ()"><code class="function">g_task_return_error()</code></a> instead.</p> </div> <p>Creates a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> from an error condition, and takes over the caller's ownership of <em class="parameter"><code>error</code></em> , so the caller does not need to free it anymore.</p> <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p> <div class="refsect3"> <a name="g-simple-async-result-new-take-error.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>source_object</p></td> <td class="parameter_description"><p>a <span class="type">GObject</span>, or <code class="literal">NULL</code>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>callback</p></td> <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>user_data</p></td> <td class="parameter_description"><p>user data passed to <em class="parameter"><code>callback</code></em> . </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>error</p></td> <td class="parameter_description"><p>a <span class="type">GError</span></p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="g-simple-async-result-new-take-error.returns"></a><h4>Returns</h4> <p> a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a></p> </div> <p class="since">Since: <a class="link" href="api-index-2-28.html#api-index-2.28">2.28</a></p> </div> <hr> <div class="refsect2"> <a name="g-simple-async-result-set-check-cancellable"></a><h3>g_simple_async_result_set_check_cancellable ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_simple_async_result_set_check_cancellable (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>, <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *check_cancellable</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_result_set_check_cancellable</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html" title="GTask"><span class="type">GTask</span></a> instead.</p> </div> <p>Sets a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> to check before dispatching results.</p> <p>This function has one very specific purpose: the provided cancellable is checked at the time of <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-propagate-error" title="g_simple_async_result_propagate_error ()"><code class="function">g_simple_async_result_propagate_error()</code></a> If it is cancelled, these functions will return an "Operation was cancelled" error (<a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a>).</p> <p>Implementors of cancellable asynchronous functions should use this in order to provide a guarantee to their callers that cancelling an async operation will reliably result in an error being returned for that operation (even if a positive result for the operation has already been sent as an idle to the main context to be dispatched).</p> <p>The checking described above is done regardless of any call to the unrelated <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-set-handle-cancellation" title="g_simple_async_result_set_handle_cancellation ()"><code class="function">g_simple_async_result_set_handle_cancellation()</code></a> function.</p> <div class="refsect3"> <a name="g-simple-async-result-set-check-cancellable.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>simple</p></td> <td class="parameter_description"><p>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>check_cancellable</p></td> <td class="parameter_description"><p>a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> to check, or <code class="literal">NULL</code> to unset. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-2-32.html#api-index-2.32">2.32</a></p> </div> <hr> <div class="refsect2"> <a name="g-simple-async-result-set-op-res-gpointer"></a><h3>g_simple_async_result_set_op_res_gpointer ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_simple_async_result_set_op_res_gpointer (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>, <em class="parameter"><code><span class="type">gpointer</span> op_res</code></em>, <em class="parameter"><code><span class="type">GDestroyNotify</span> destroy_op_res</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_result_set_op_res_gpointer</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html" title="GTask"><span class="type">GTask</span></a> and <a class="link" href="GTask.html#g-task-return-pointer" title="g_task_return_pointer ()"><code class="function">g_task_return_pointer()</code></a> instead.</p> </div> <p>Sets the operation result within the asynchronous result to a pointer.</p> <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p> <div class="refsect3"> <a name="g-simple-async-result-set-op-res-gpointer.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>simple</p></td> <td class="parameter_description"><p>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>op_res</p></td> <td class="parameter_description"><p>a pointer result from an asynchronous function.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>destroy_op_res</p></td> <td class="parameter_description"><p>a <span class="type">GDestroyNotify</span> function.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="g-simple-async-result-get-op-res-gpointer"></a><h3>g_simple_async_result_get_op_res_gpointer ()</h3> <pre class="programlisting"><span class="returnvalue">gpointer</span> g_simple_async_result_get_op_res_gpointer (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_result_get_op_res_gpointer</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html" title="GTask"><span class="type">GTask</span></a> and <a class="link" href="GTask.html#g-task-propagate-pointer" title="g_task_propagate_pointer ()"><code class="function">g_task_propagate_pointer()</code></a> instead.</p> </div> <p>Gets a pointer result as returned by the asynchronous function.</p> <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p> <div class="refsect3"> <a name="g-simple-async-result-get-op-res-gpointer.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>simple</p></td> <td class="parameter_description"><p>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="g-simple-async-result-get-op-res-gpointer.returns"></a><h4>Returns</h4> <p> a pointer from the result.</p> </div> </div> <hr> <div class="refsect2"> <a name="g-simple-async-result-set-op-res-gssize"></a><h3>g_simple_async_result_set_op_res_gssize ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_simple_async_result_set_op_res_gssize (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>, <em class="parameter"><code><span class="type">gssize</span> op_res</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_result_set_op_res_gssize</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html" title="GTask"><span class="type">GTask</span></a> and <a class="link" href="GTask.html#g-task-return-int" title="g_task_return_int ()"><code class="function">g_task_return_int()</code></a> instead.</p> </div> <p>Sets the operation result within the asynchronous result to the given <em class="parameter"><code>op_res</code></em> .</p> <div class="refsect3"> <a name="g-simple-async-result-set-op-res-gssize.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>simple</p></td> <td class="parameter_description"><p>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>op_res</p></td> <td class="parameter_description"><p>a <span class="type">gssize</span>.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="g-simple-async-result-get-op-res-gssize"></a><h3>g_simple_async_result_get_op_res_gssize ()</h3> <pre class="programlisting"><span class="returnvalue">gssize</span> g_simple_async_result_get_op_res_gssize (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_result_get_op_res_gssize</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html" title="GTask"><span class="type">GTask</span></a> and <a class="link" href="GTask.html#g-task-propagate-int" title="g_task_propagate_int ()"><code class="function">g_task_propagate_int()</code></a> instead.</p> </div> <p>Gets a gssize from the asynchronous result.</p> <div class="refsect3"> <a name="g-simple-async-result-get-op-res-gssize.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>simple</p></td> <td class="parameter_description"><p>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="g-simple-async-result-get-op-res-gssize.returns"></a><h4>Returns</h4> <p> a gssize returned from the asynchronous function.</p> </div> </div> <hr> <div class="refsect2"> <a name="g-simple-async-result-set-op-res-gboolean"></a><h3>g_simple_async_result_set_op_res_gboolean ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_simple_async_result_set_op_res_gboolean (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>, <em class="parameter"><code><span class="type">gboolean</span> op_res</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_result_set_op_res_gboolean</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html" title="GTask"><span class="type">GTask</span></a> and <a class="link" href="GTask.html#g-task-return-boolean" title="g_task_return_boolean ()"><code class="function">g_task_return_boolean()</code></a> instead.</p> </div> <p>Sets the operation result to a boolean within the asynchronous result.</p> <div class="refsect3"> <a name="g-simple-async-result-set-op-res-gboolean.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>simple</p></td> <td class="parameter_description"><p>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>op_res</p></td> <td class="parameter_description"><p>a <span class="type">gboolean</span>.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="g-simple-async-result-get-op-res-gboolean"></a><h3>g_simple_async_result_get_op_res_gboolean ()</h3> <pre class="programlisting"><span class="returnvalue">gboolean</span> g_simple_async_result_get_op_res_gboolean (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_result_get_op_res_gboolean</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html" title="GTask"><span class="type">GTask</span></a> and <a class="link" href="GTask.html#g-task-propagate-boolean" title="g_task_propagate_boolean ()"><code class="function">g_task_propagate_boolean()</code></a> instead.</p> </div> <p>Gets the operation result boolean from within the asynchronous result.</p> <div class="refsect3"> <a name="g-simple-async-result-get-op-res-gboolean.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>simple</p></td> <td class="parameter_description"><p>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="g-simple-async-result-get-op-res-gboolean.returns"></a><h4>Returns</h4> <p> <code class="literal">TRUE</code> if the operation's result was <code class="literal">TRUE</code>, <code class="literal">FALSE</code> if the operation's result was <code class="literal">FALSE</code>.</p> </div> </div> <hr> <div class="refsect2"> <a name="g-simple-async-result-get-source-tag"></a><h3>g_simple_async_result_get_source_tag ()</h3> <pre class="programlisting"><span class="returnvalue">gpointer</span> g_simple_async_result_get_source_tag (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_result_get_source_tag</code> has been deprecated since version 2.46. and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html" title="GTask"><span class="type">GTask</span></a> and <a class="link" href="GTask.html#g-task-get-source-tag" title="g_task_get_source_tag ()"><code class="function">g_task_get_source_tag()</code></a> instead.</p> </div> <p>Gets the source tag for the <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</p> <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p> <div class="refsect3"> <a name="g-simple-async-result-get-source-tag.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>simple</p></td> <td class="parameter_description"><p>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> <div class="refsect3"> <a name="g-simple-async-result-get-source-tag.returns"></a><h4>Returns</h4> <p> a <span class="type">gpointer</span> to the source object for the <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</p> </div> </div> <hr> <div class="refsect2"> <a name="g-simple-async-result-is-valid"></a><h3>g_simple_async_result_is_valid ()</h3> <pre class="programlisting"><span class="returnvalue">gboolean</span> g_simple_async_result_is_valid (<em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>, <em class="parameter"><code><span class="type">GObject</span> *source</code></em>, <em class="parameter"><code><span class="type">gpointer</span> source_tag</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_result_is_valid</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html" title="GTask"><span class="type">GTask</span></a> and <a class="link" href="GTask.html#g-task-is-valid" title="g_task_is_valid ()"><code class="function">g_task_is_valid()</code></a> instead.</p> </div> <p>Ensures that the data passed to the _finish function of an async operation is consistent. Three checks are performed.</p> <p>First, <em class="parameter"><code>result</code></em> is checked to ensure that it is really a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>. Second, <em class="parameter"><code>source</code></em> is checked to ensure that it matches the source object of <em class="parameter"><code>result</code></em> . Third, <em class="parameter"><code>source_tag</code></em> is checked to ensure that it is equal to the <em class="parameter"><code>source_tag</code></em> argument given to <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-new" title="g_simple_async_result_new ()"><code class="function">g_simple_async_result_new()</code></a> (which, by convention, is a pointer to the _async function corresponding to the _finish function from which this function is called). (Alternatively, if either <em class="parameter"><code>source_tag</code></em> or <em class="parameter"><code>result</code></em> 's source tag is <code class="literal">NULL</code>, then the source tag check is skipped.)</p> <div class="refsect3"> <a name="g-simple-async-result-is-valid.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>result</p></td> <td class="parameter_description"><p>the <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> passed to the _finish function.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>source</p></td> <td class="parameter_description"><p>the <span class="type">GObject</span> passed to the _finish function. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>source_tag</p></td> <td class="parameter_description"><p>the asynchronous function. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="g-simple-async-result-is-valid.returns"></a><h4>Returns</h4> <p> <span class="type">TRUE</span> if all checks passed or <span class="type">FALSE</span> if any failed.</p> </div> <p class="since">Since: <a class="link" href="api-index-2-20.html#api-index-2.20">2.20</a></p> </div> <hr> <div class="refsect2"> <a name="g-simple-async-result-set-handle-cancellation"></a><h3>g_simple_async_result_set_handle_cancellation ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_simple_async_result_set_handle_cancellation (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>, <em class="parameter"><code><span class="type">gboolean</span> handle_cancellation</code></em>);</pre> <div class="warning"><p><code class="literal">g_simple_async_result_set_handle_cancellation</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p></div> <p>Sets whether to handle cancellation within the asynchronous operation.</p> <p>This function has nothing to do with <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-set-check-cancellable" title="g_simple_async_result_set_check_cancellable ()"><code class="function">g_simple_async_result_set_check_cancellable()</code></a>. It only refers to the <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> passed to <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-run-in-thread" title="g_simple_async_result_run_in_thread ()"><code class="function">g_simple_async_result_run_in_thread()</code></a>.</p> <div class="refsect3"> <a name="g-simple-async-result-set-handle-cancellation.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>simple</p></td> <td class="parameter_description"><p>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>handle_cancellation</p></td> <td class="parameter_description"><p>a <span class="type">gboolean</span>.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="g-simple-async-result-complete"></a><h3>g_simple_async_result_complete ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_simple_async_result_complete (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_result_complete</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html" title="GTask"><span class="type">GTask</span></a> instead.</p> </div> <p>Completes an asynchronous I/O job immediately. Must be called in the thread where the asynchronous result was to be delivered, as it invokes the callback directly. If you are in a different thread use <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-complete-in-idle" title="g_simple_async_result_complete_in_idle ()"><code class="function">g_simple_async_result_complete_in_idle()</code></a>.</p> <p>Calling this function takes a reference to <em class="parameter"><code>simple</code></em> for as long as is needed to complete the call.</p> <div class="refsect3"> <a name="g-simple-async-result-complete.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>simple</p></td> <td class="parameter_description"><p>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="g-simple-async-result-complete-in-idle"></a><h3>g_simple_async_result_complete_in_idle ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_simple_async_result_complete_in_idle (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_result_complete_in_idle</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html" title="GTask"><span class="type">GTask</span></a> instead.</p> </div> <p>Completes an asynchronous function in an idle handler in the thread-default main context of the thread that <em class="parameter"><code>simple</code></em> was initially created in (and re-pushes that context around the invocation of the callback).</p> <p>Calling this function takes a reference to <em class="parameter"><code>simple</code></em> for as long as is needed to complete the call.</p> <div class="refsect3"> <a name="g-simple-async-result-complete-in-idle.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody><tr> <td class="parameter_name"><p>simple</p></td> <td class="parameter_description"><p>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</p></td> <td class="parameter_annotations"> </td> </tr></tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="g-simple-async-result-run-in-thread"></a><h3>g_simple_async_result_run_in_thread ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_simple_async_result_run_in_thread (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>, <em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html#GSimpleAsyncThreadFunc" title="GSimpleAsyncThreadFunc ()"><span class="type">GSimpleAsyncThreadFunc</span></a> func</code></em>, <em class="parameter"><code><span class="type">int</span> io_priority</code></em>, <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_result_run_in_thread</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html" title="GTask"><span class="type">GTask</span></a> and <a class="link" href="GTask.html#g-task-run-in-thread" title="g_task_run_in_thread ()"><code class="function">g_task_run_in_thread()</code></a> instead.</p> </div> <p>Runs the asynchronous job in a separate thread and then calls <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-complete-in-idle" title="g_simple_async_result_complete_in_idle ()"><code class="function">g_simple_async_result_complete_in_idle()</code></a> on <em class="parameter"><code>simple</code></em> to return the result to the appropriate main loop.</p> <p>Calling this function takes a reference to <em class="parameter"><code>simple</code></em> for as long as is needed to run the job and report its completion.</p> <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p> <div class="refsect3"> <a name="g-simple-async-result-run-in-thread.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>simple</p></td> <td class="parameter_description"><p>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>func</p></td> <td class="parameter_description"><p>a <a class="link" href="GSimpleAsyncResult.html#GSimpleAsyncThreadFunc" title="GSimpleAsyncThreadFunc ()"><span class="type">GSimpleAsyncThreadFunc</span></a>.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>io_priority</p></td> <td class="parameter_description"><p>the io priority of the request.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>cancellable</p></td> <td class="parameter_description"><p>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <code class="literal">NULL</code> to ignore. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> </tr> </tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="g-simple-async-result-set-from-error"></a><h3>g_simple_async_result_set_from_error ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_simple_async_result_set_from_error (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>, <em class="parameter"><code>const <span class="type">GError</span> *error</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_result_set_from_error</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html" title="GTask"><span class="type">GTask</span></a> and <a class="link" href="GTask.html#g-task-return-error" title="g_task_return_error ()"><code class="function">g_task_return_error()</code></a> instead.</p> </div> <p>Sets the result from a <span class="type">GError</span>.</p> <div class="refsect3"> <a name="g-simple-async-result-set-from-error.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>simple</p></td> <td class="parameter_description"><p>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>error</p></td> <td class="parameter_description"><p><span class="type">GError</span>.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="g-simple-async-result-take-error"></a><h3>g_simple_async_result_take_error ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_simple_async_result_take_error (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>, <em class="parameter"><code><span class="type">GError</span> *error</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_result_take_error</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html" title="GTask"><span class="type">GTask</span></a> and <a class="link" href="GTask.html#g-task-return-error" title="g_task_return_error ()"><code class="function">g_task_return_error()</code></a> instead.</p> </div> <p>Sets the result from <em class="parameter"><code>error</code></em> , and takes over the caller's ownership of <em class="parameter"><code>error</code></em> , so the caller does not need to free it any more.</p> <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p> <div class="refsect3"> <a name="g-simple-async-result-take-error.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>simple</p></td> <td class="parameter_description"><p>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a></p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>error</p></td> <td class="parameter_description"><p>a <span class="type">GError</span></p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-2-28.html#api-index-2.28">2.28</a></p> </div> <hr> <div class="refsect2"> <a name="g-simple-async-result-propagate-error"></a><h3>g_simple_async_result_propagate_error ()</h3> <pre class="programlisting"><span class="returnvalue">gboolean</span> g_simple_async_result_propagate_error (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>, <em class="parameter"><code><span class="type">GError</span> **dest</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_result_propagate_error</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html" title="GTask"><span class="type">GTask</span></a> instead.</p> </div> <p>Propagates an error from within the simple asynchronous result to a given destination.</p> <p>If the <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> given to a prior call to <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-set-check-cancellable" title="g_simple_async_result_set_check_cancellable ()"><code class="function">g_simple_async_result_set_check_cancellable()</code></a> is cancelled then this function will return <code class="literal">TRUE</code> with <em class="parameter"><code>dest</code></em> set appropriately.</p> <div class="refsect3"> <a name="g-simple-async-result-propagate-error.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>simple</p></td> <td class="parameter_description"><p>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>dest</p></td> <td class="parameter_description"><p>a location to propagate the error to. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td> </tr> </tbody> </table></div> </div> <div class="refsect3"> <a name="g-simple-async-result-propagate-error.returns"></a><h4>Returns</h4> <p> <code class="literal">TRUE</code> if the error was propagated to <em class="parameter"><code>dest</code></em> . <code class="literal">FALSE</code> otherwise.</p> </div> </div> <hr> <div class="refsect2"> <a name="g-simple-async-result-set-error"></a><h3>g_simple_async_result_set_error ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_simple_async_result_set_error (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>, <em class="parameter"><code><span class="type">GQuark</span> domain</code></em>, <em class="parameter"><code><span class="type">gint</span> code</code></em>, <em class="parameter"><code>const <span class="type">char</span> *format</code></em>, <em class="parameter"><code>...</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_result_set_error</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html" title="GTask"><span class="type">GTask</span></a> and <a class="link" href="GTask.html#g-task-return-new-error" title="g_task_return_new_error ()"><code class="function">g_task_return_new_error()</code></a> instead.</p> </div> <p>Sets an error within the asynchronous result without a <span class="type">GError</span>.</p> <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p> <div class="refsect3"> <a name="g-simple-async-result-set-error.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>simple</p></td> <td class="parameter_description"><p>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>domain</p></td> <td class="parameter_description"><p>a <span class="type">GQuark</span> (usually <a class="link" href="gio-GIOError.html#G-IO-ERROR:CAPS" title="G_IO_ERROR"><span class="type">G_IO_ERROR</span></a>).</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>code</p></td> <td class="parameter_description"><p>an error code.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>format</p></td> <td class="parameter_description"><p>a formatted error reporting string.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>...</p></td> <td class="parameter_description"><p>a list of variables to fill in <em class="parameter"><code>format</code></em> .</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="g-simple-async-result-set-error-va"></a><h3>g_simple_async_result_set_error_va ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_simple_async_result_set_error_va (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>, <em class="parameter"><code><span class="type">GQuark</span> domain</code></em>, <em class="parameter"><code><span class="type">gint</span> code</code></em>, <em class="parameter"><code>const <span class="type">char</span> *format</code></em>, <em class="parameter"><code><span class="type">va_list</span> args</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_result_set_error_va</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html" title="GTask"><span class="type">GTask</span></a> and <a class="link" href="GTask.html#g-task-return-error" title="g_task_return_error ()"><code class="function">g_task_return_error()</code></a> instead.</p> </div> <p>Sets an error within the asynchronous result without a <span class="type">GError</span>. Unless writing a binding, see <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-set-error" title="g_simple_async_result_set_error ()"><code class="function">g_simple_async_result_set_error()</code></a>.</p> <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p> <div class="refsect3"> <a name="g-simple-async-result-set-error-va.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>simple</p></td> <td class="parameter_description"><p>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>domain</p></td> <td class="parameter_description"><p>a <span class="type">GQuark</span> (usually <a class="link" href="gio-GIOError.html#G-IO-ERROR:CAPS" title="G_IO_ERROR"><span class="type">G_IO_ERROR</span></a>).</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>code</p></td> <td class="parameter_description"><p>an error code.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>format</p></td> <td class="parameter_description"><p>a formatted error reporting string.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>args</p></td> <td class="parameter_description"><p>va_list of arguments.</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="g-simple-async-report-error-in-idle"></a><h3>g_simple_async_report_error_in_idle ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_simple_async_report_error_in_idle (<em class="parameter"><code><span class="type">GObject</span> *object</code></em>, <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>, <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>, <em class="parameter"><code><span class="type">GQuark</span> domain</code></em>, <em class="parameter"><code><span class="type">gint</span> code</code></em>, <em class="parameter"><code>const <span class="type">char</span> *format</code></em>, <em class="parameter"><code>...</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_report_error_in_idle</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html#g-task-report-error" title="g_task_report_error ()"><code class="function">g_task_report_error()</code></a>.</p> </div> <p>Reports an error in an asynchronous function in an idle function by directly setting the contents of the <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> with the given error information.</p> <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p> <div class="refsect3"> <a name="g-simple-async-report-error-in-idle.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>object</p></td> <td class="parameter_description"><p>a <span class="type">GObject</span>, or <code class="literal">NULL</code>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>callback</p></td> <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>user_data</p></td> <td class="parameter_description"><p>user data passed to <em class="parameter"><code>callback</code></em> .</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>domain</p></td> <td class="parameter_description"><p>a <span class="type">GQuark</span> containing the error domain (usually <a class="link" href="gio-GIOError.html#G-IO-ERROR:CAPS" title="G_IO_ERROR"><span class="type">G_IO_ERROR</span></a>).</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>code</p></td> <td class="parameter_description"><p>a specific error code.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>format</p></td> <td class="parameter_description"><p>a formatted error reporting string.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>...</p></td> <td class="parameter_description"><p>a list of variables to fill in <em class="parameter"><code>format</code></em> .</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="g-simple-async-report-gerror-in-idle"></a><h3>g_simple_async_report_gerror_in_idle ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_simple_async_report_gerror_in_idle (<em class="parameter"><code><span class="type">GObject</span> *object</code></em>, <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>, <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>, <em class="parameter"><code>const <span class="type">GError</span> *error</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_report_gerror_in_idle</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html#g-task-report-error" title="g_task_report_error ()"><code class="function">g_task_report_error()</code></a>.</p> </div> <p>Reports an error in an idle function. Similar to <a class="link" href="GSimpleAsyncResult.html#g-simple-async-report-error-in-idle" title="g_simple_async_report_error_in_idle ()"><code class="function">g_simple_async_report_error_in_idle()</code></a>, but takes a <span class="type">GError</span> rather than building a new one.</p> <div class="refsect3"> <a name="g-simple-async-report-gerror-in-idle.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>object</p></td> <td class="parameter_description"><p>a <span class="type">GObject</span>, or <code class="literal">NULL</code>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>callback</p></td> <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>user_data</p></td> <td class="parameter_description"><p>user data passed to <em class="parameter"><code>callback</code></em> . </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>error</p></td> <td class="parameter_description"><p>the <span class="type">GError</span> to report</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> </div> <hr> <div class="refsect2"> <a name="g-simple-async-report-take-gerror-in-idle"></a><h3>g_simple_async_report_take_gerror_in_idle ()</h3> <pre class="programlisting"><span class="returnvalue">void</span> g_simple_async_report_take_gerror_in_idle (<em class="parameter"><code><span class="type">GObject</span> *object</code></em>, <em class="parameter"><code><a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a> callback</code></em>, <em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>, <em class="parameter"><code><span class="type">GError</span> *error</code></em>);</pre> <div class="warning"> <p><code class="literal">g_simple_async_report_take_gerror_in_idle</code> has been deprecated since version 2.46 and should not be used in newly-written code.</p> <p>Use <a class="link" href="GTask.html#g-task-report-error" title="g_task_report_error ()"><code class="function">g_task_report_error()</code></a>.</p> </div> <p>Reports an error in an idle function. Similar to <a class="link" href="GSimpleAsyncResult.html#g-simple-async-report-gerror-in-idle" title="g_simple_async_report_gerror_in_idle ()"><code class="function">g_simple_async_report_gerror_in_idle()</code></a>, but takes over the caller's ownership of <em class="parameter"><code>error</code></em> , so the caller does not have to free it any more.</p> <p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p> <div class="refsect3"> <a name="g-simple-async-report-take-gerror-in-idle.parameters"></a><h4>Parameters</h4> <div class="informaltable"><table class="informaltable" width="100%" border="0"> <colgroup> <col width="150px" class="parameters_name"> <col class="parameters_description"> <col width="200px" class="parameters_annotations"> </colgroup> <tbody> <tr> <td class="parameter_name"><p>object</p></td> <td class="parameter_description"><p>a <span class="type">GObject</span>, or <code class="literal">NULL</code>. </p></td> <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> </tr> <tr> <td class="parameter_name"><p>callback</p></td> <td class="parameter_description"><p>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>.</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>user_data</p></td> <td class="parameter_description"><p>user data passed to <em class="parameter"><code>callback</code></em> .</p></td> <td class="parameter_annotations"> </td> </tr> <tr> <td class="parameter_name"><p>error</p></td> <td class="parameter_description"><p>the <span class="type">GError</span> to report</p></td> <td class="parameter_annotations"> </td> </tr> </tbody> </table></div> </div> <p class="since">Since: <a class="link" href="api-index-2-28.html#api-index-2.28">2.28</a></p> </div> </div> <div class="refsect1"> <a name="GSimpleAsyncResult.other_details"></a><h2>Types and Values</h2> <div class="refsect2"> <a name="GSimpleAsyncResult-struct"></a><h3>GSimpleAsyncResult</h3> <pre class="programlisting">typedef struct _GSimpleAsyncResult GSimpleAsyncResult;</pre> <p>A simple implementation of <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a>.</p> </div> </div> <div class="refsect1"> <a name="GSimpleAsyncResult.see-also"></a><h2>See Also</h2> <p><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a>, <a class="link" href="GTask.html" title="GTask"><span class="type">GTask</span></a></p> </div> </div> <div class="footer"> <hr>Generated by GTK-Doc V1.32</div> </body> </html>