diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2018-08-20 21:12:06 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2018-08-20 21:12:06 -0400 |
commit | 63e87c2d0c9d263f14c77b68f85c67d46ece82a9 (patch) | |
tree | 6260365cbf7d24f37d27669e8538227fcb72e243 /gtk+-mingw/share/gtk-doc/html/gio/GSimpleAsyncResult.html | |
parent | a4460f6d9453bbd7e584937686449cef3e19f052 (diff) |
Diffstat (limited to 'gtk+-mingw/share/gtk-doc/html/gio/GSimpleAsyncResult.html')
-rw-r--r-- | gtk+-mingw/share/gtk-doc/html/gio/GSimpleAsyncResult.html | 1224 |
1 files changed, 0 insertions, 1224 deletions
diff --git a/gtk+-mingw/share/gtk-doc/html/gio/GSimpleAsyncResult.html b/gtk+-mingw/share/gtk-doc/html/gio/GSimpleAsyncResult.html deleted file mode 100644 index 6c72744..0000000 --- a/gtk+-mingw/share/gtk-doc/html/gio/GSimpleAsyncResult.html +++ /dev/null @@ -1,1224 +0,0 @@ -<!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</title> -<meta name="generator" content="DocBook XSL Stylesheets V1.76.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.18 (XML mode)"> -<link rel="stylesheet" href="style.css" type="text/css"> -</head> -<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> -<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> -<tr valign="middle"> -<td><a accesskey="p" href="gio-GIOScheduler.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> -<td><a accesskey="u" href="async.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> -<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> -<th width="100%" align="center">GIO Reference Manual</th> -<td><a accesskey="n" href="conversion.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> -</tr> -<tr><td colspan="5" class="shortcuts"> -<a href="#GSimpleAsyncResult.synopsis" class="shortcut">Top</a> - | - <a href="#GSimpleAsyncResult.description" class="shortcut">Description</a> - | - <a href="#GSimpleAsyncResult.object-hierarchy" class="shortcut">Object Hierarchy</a> - | - <a href="#GSimpleAsyncResult.implemented-interfaces" class="shortcut">Implemented Interfaces</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 valign="top" align="right"></td> -</tr></table></div> -<div class="refsynopsisdiv"> -<a name="GSimpleAsyncResult.synopsis"></a><h2>Synopsis</h2> -<pre class="synopsis"> -#include <gio/gio.h> - - <a class="link" href="GSimpleAsyncResult.html#GSimpleAsyncResult-struct" title="GSimpleAsyncResult">GSimpleAsyncResult</a>; -<span class="returnvalue">void</span> (<a class="link" href="GSimpleAsyncResult.html#GSimpleAsyncThreadFunc" title="GSimpleAsyncThreadFunc ()">*GSimpleAsyncThreadFunc</a>) (<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><a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *object</code></em>, - <em class="parameter"><code><a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> *cancellable</code></em>); -<a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="returnvalue">GSimpleAsyncResult</span></a> * <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-new" title="g_simple_async_result_new ()">g_simple_async_result_new</a> (<em class="parameter"><code><a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *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><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> source_tag</code></em>); -<a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="returnvalue">GSimpleAsyncResult</span></a> * <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> (<em class="parameter"><code><a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *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><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> domain</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> code</code></em>, - <em class="parameter"><code>const <span class="type">char</span> *format</code></em>, - <em class="parameter"><code>...</code></em>); -<a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="returnvalue">GSimpleAsyncResult</span></a> * <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> - (<em class="parameter"><code><a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *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><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>, - <em class="parameter"><code>const <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>); -<a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="returnvalue">GSimpleAsyncResult</span></a> * <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> - (<em class="parameter"><code><a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *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><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>); -<span class="returnvalue">void</span> <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> - (<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>); -<span class="returnvalue">void</span> <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> - (<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 href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> op_res</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy_op_res</code></em>); -<a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> <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> - (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>); -<span class="returnvalue">void</span> <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> - (<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 href="./../glib/glib/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> op_res</code></em>); -<a href="./../glib/glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a> <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> - (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>); -<span class="returnvalue">void</span> <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> - (<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 href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> op_res</code></em>); -<a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <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> - (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>); -<a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> <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> - (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>); -<a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <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> (<em class="parameter"><code><a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> *result</code></em>, - <em class="parameter"><code><a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *source</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> source_tag</code></em>); -<span class="returnvalue">void</span> <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> - (<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 href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> handle_cancellation</code></em>); -<span class="returnvalue">void</span> <a class="link" href="GSimpleAsyncResult.html#g-simple-async-result-complete" title="g_simple_async_result_complete ()">g_simple_async_result_complete</a> (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>); -<span class="returnvalue">void</span> <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> - (<em class="parameter"><code><a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> *simple</code></em>); -<span class="returnvalue">void</span> <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> (<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>); -<span class="returnvalue">void</span> <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> - (<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 <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>); -<span class="returnvalue">void</span> <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> (<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 href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>); -<a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <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> - (<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 href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **dest</code></em>); -<span class="returnvalue">void</span> <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> (<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 href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> domain</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> code</code></em>, - <em class="parameter"><code>const <span class="type">char</span> *format</code></em>, - <em class="parameter"><code>...</code></em>); -<span class="returnvalue">void</span> <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> (<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 href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> domain</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> 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>); -<span class="returnvalue">void</span> <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> (<em class="parameter"><code><a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *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><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> domain</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> code</code></em>, - <em class="parameter"><code>const <span class="type">char</span> *format</code></em>, - <em class="parameter"><code>...</code></em>); -<span class="returnvalue">void</span> <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> - (<em class="parameter"><code><a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *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><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>, - <em class="parameter"><code>const <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>); -<span class="returnvalue">void</span> <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> - (<em class="parameter"><code><a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *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><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>); -</pre> -</div> -<div class="refsect1"> -<a name="GSimpleAsyncResult.object-hierarchy"></a><h2>Object Hierarchy</h2> -<pre class="synopsis"> - <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a> - +----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.description"></a><h2>Description</h2> -<p> -Implements <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> for simple cases. Most of the time, this -will be all an application needs, and will be used transparently. -Because of this, <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> is used throughout GIO for -handling asynchronous functions. -</p> -<p> -GSimpleAsyncResult handles <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>s, 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 <a href="./../glib/glib/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> 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 <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, 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 <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> is not available -(e.g. the asynchronous operation's doesn't take a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> 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 <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>. 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, <a href="./../glib/glib/glib-The-Main-Event-Loop.html#GMainLoop"><span class="type">GMainLoop</span></a>, -or it can use <a href="./../glib/glib/glib-Threads.html#GThread"><span class="type">GThread</span></a>s. -<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 <GTKDOCLINK HREF="g-main-context-push-thread-default">thread-default main -context</GTKDOCLINK>. <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 deliver the result to the -thread-default main context. -</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> -<p> -</p> -<div class="informalexample"><pre class="programlisting"> -static void -baked_cb (Cake *cake, - gpointer user_data) -{ - /* In this example, this callback is not given a reference to the cake, so - * the GSimpleAsyncResult has to take a reference to it. - */ - GSimpleAsyncResult *result = user_data; - - if (cake == NULL) - g_simple_async_result_set_error (result, - BAKER_ERRORS, - BAKER_ERROR_NO_FLOUR, - "Go to the supermarket"); - else - g_simple_async_result_set_op_res_gpointer (result, - g_object_ref (cake), - g_object_unref); - - - /* In this example, we assume that baked_cb is called as a callback from - * the mainloop, so it's safe to complete the operation synchronously here. - * If, however, _baker_prepare_cake () might call its callback without - * first returning to the mainloop — inadvisable, but some APIs do so — - * we would need to use g_simple_async_result_complete_in_idle(). - */ - g_simple_async_result_complete (result); - g_object_unref (result); -} - -void -baker_bake_cake_async (Baker *self, - guint radius, - GAsyncReadyCallback callback, - gpointer user_data) -{ - GSimpleAsyncResult *simple; - Cake *cake; - - if (radius < 3) - { - g_simple_async_report_error_in_idle (G_OBJECT (self), - callback, - user_data, - BAKER_ERRORS, - BAKER_ERROR_TOO_SMALL, - "%ucm radius cakes are silly", - radius); - return; - } - - simple = g_simple_async_result_new (G_OBJECT (self), - callback, - user_data, - baker_bake_cake_async); - cake = _baker_get_cached_cake (self, radius); - - if (cake != NULL) - { - g_simple_async_result_set_op_res_gpointer (simple, - g_object_ref (cake), - g_object_unref); - g_simple_async_result_complete_in_idle (simple); - g_object_unref (simple); - /* Drop the reference returned by _baker_get_cached_cake(); the - * GSimpleAsyncResult has taken its own reference. - */ - g_object_unref (cake); - return; - } - - _baker_prepare_cake (self, radius, baked_cb, simple); -} - -Cake * -baker_bake_cake_finish (Baker *self, - GAsyncResult *result, - GError **error) -{ - GSimpleAsyncResult *simple; - Cake *cake; - - g_return_val_if_fail (g_simple_async_result_is_valid (result, - G_OBJECT (self), - baker_bake_cake_async), - NULL); - - simple = (GSimpleAsyncResult *) result; - - if (g_simple_async_result_propagate_error (simple, error)) - return NULL; - - cake = CAKE (g_simple_async_result_get_op_res_gpointer (simple)); - return g_object_ref (cake); -} -</pre></div> -<p> -</p> -</div> -<div class="refsect1"> -<a name="GSimpleAsyncResult.details"></a><h2>Details</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> -<hr> -<div class="refsect2"> -<a name="GSimpleAsyncThreadFunc"></a><h3>GSimpleAsyncThreadFunc ()</h3> -<pre class="programlisting"><span class="returnvalue">void</span> (*GSimpleAsyncThreadFunc) (<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><a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *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="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>res</code></em> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td> -<td>a <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td> -<td>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</td> -</tr> -</tbody> -</table></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><a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *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><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> source_tag</code></em>);</pre> -<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="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>source_object</code></em> :</span></p></td> -<td>a <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td> -<td>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td> -<td>user data passed to <em class="parameter"><code>callback</code></em>. <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><p><span class="term"><em class="parameter"><code>source_tag</code></em> :</span></p></td> -<td>the asynchronous function.</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</td> -</tr> -</tbody> -</table></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><a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *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><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> domain</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> code</code></em>, - <em class="parameter"><code>const <span class="type">char</span> *format</code></em>, - <em class="parameter"><code>...</code></em>);</pre> -<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="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>source_object</code></em> :</span></p></td> -<td>a <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td> -<td>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td> -<td>user data passed to <em class="parameter"><code>callback</code></em>. <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><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td> -<td>a <a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a>.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td> -<td>an error code.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td> -<td>a string with format characters.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td> -<td>a list of values to insert into <em class="parameter"><code>format</code></em>.</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</td> -</tr> -</tbody> -</table></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><a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *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><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>, - <em class="parameter"><code>const <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>);</pre> -<p> -Creates a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> from an error condition. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>source_object</code></em> :</span></p></td> -<td>a <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td> -<td>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td> -<td>user data passed to <em class="parameter"><code>callback</code></em>. <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><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> -<td>a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</td> -</tr> -</tbody> -</table></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><a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *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><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>);</pre> -<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> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>source_object</code></em> :</span></p></td> -<td>a <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td> -<td>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td> -<td>user data passed to <em class="parameter"><code>callback</code></em>. <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><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> -<td>a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> -</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.28</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> -<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="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>simple</code></em> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>check_cancellable</code></em> :</span></p></td> -<td>a <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> to check, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to unset. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.32</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><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> op_res</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> destroy_op_res</code></em>);</pre> -<p> -Sets the operation result within the asynchronous result to a pointer. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>simple</code></em> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>op_res</code></em> :</span></p></td> -<td>a pointer result from an asynchronous function.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>destroy_op_res</code></em> :</span></p></td> -<td>a <a href="./../glib/glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> function.</td> -</tr> -</tbody> -</table></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"><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> 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> -<p> -Gets a pointer result as returned by the asynchronous function. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>simple</code></em> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a pointer from the result.</td> -</tr> -</tbody> -</table></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><a href="./../glib/glib/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> op_res</code></em>);</pre> -<p> -Sets the operation result within the asynchronous result to -the given <em class="parameter"><code>op_res</code></em>. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>simple</code></em> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>op_res</code></em> :</span></p></td> -<td>a <a href="./../glib/glib/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a>.</td> -</tr> -</tbody> -</table></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"><a href="./../glib/glib/glib-Basic-Types.html#gssize"><span class="returnvalue">gssize</span></a> 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> -<p> -Gets a gssize from the asynchronous result. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>simple</code></em> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a gssize returned from the asynchronous function.</td> -</tr> -</tbody> -</table></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><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> op_res</code></em>);</pre> -<p> -Sets the operation result to a boolean within the asynchronous result. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>simple</code></em> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>op_res</code></em> :</span></p></td> -<td>a <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>.</td> -</tr> -</tbody> -</table></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"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 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> -<p> -Gets the operation result boolean from within the asynchronous result. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>simple</code></em> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> -<a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the operation's result was <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> -if the operation's result was <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</td> -</tr> -</tbody> -</table></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"><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> 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> -<p> -Gets the source tag for the <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>simple</code></em> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td>a <a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> to the source object for the <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</td> -</tr> -</tbody> -</table></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"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 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><a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *source</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> source_tag</code></em>);</pre> -<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 either <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> (as it is when the result was -created by <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> or -<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>) or 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). -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>result</code></em> :</span></p></td> -<td>the <a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> passed to the _finish function.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td> -<td>the <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> passed to the _finish function.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>source_tag</code></em> :</span></p></td> -<td>the asynchronous function.</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> -<a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a> if all checks passed or <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><span class="type">FALSE</span></a> if any failed.</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.20</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><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> handle_cancellation</code></em>);</pre> -<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="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>simple</code></em> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>handle_cancellation</code></em> :</span></p></td> -<td>a <a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a>.</td> -</tr> -</tbody> -</table></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> -<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="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody><tr> -<td><p><span class="term"><em class="parameter"><code>simple</code></em> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</td> -</tr></tbody> -</table></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> -<p> -Completes an asynchronous function in an idle handler in the <GTKDOCLINK HREF="g-main-context-push-thread-default">thread-default main -loop</GTKDOCLINK> 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="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody><tr> -<td><p><span class="term"><em class="parameter"><code>simple</code></em> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</td> -</tr></tbody> -</table></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> -<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> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>simple</code></em> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html#GSimpleAsyncThreadFunc" title="GSimpleAsyncThreadFunc ()"><span class="type">GSimpleAsyncThreadFunc</span></a>.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>io_priority</code></em> :</span></p></td> -<td>the io priority of the request.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td> -<td>optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -</tbody> -</table></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 <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>);</pre> -<p> -Sets the result from a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>simple</code></em> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> -<td> -<a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.</td> -</tr> -</tbody> -</table></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><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>);</pre> -<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> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>simple</code></em> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> -<td>a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> -</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.28</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"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> 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><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **dest</code></em>);</pre> -<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 <a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> with <em class="parameter"><code>dest</code></em> set appropriately. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>simple</code></em> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td> -<td>a location to propagate the error to. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> -<td> -<a href="./../glib/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the error was propagated to <em class="parameter"><code>dest</code></em>. <a href="./../glib/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td> -</tr> -</tbody> -</table></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><a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> domain</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> code</code></em>, - <em class="parameter"><code>const <span class="type">char</span> *format</code></em>, - <em class="parameter"><code>...</code></em>);</pre> -<p> -Sets an error within the asynchronous result without a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>simple</code></em> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td> -<td>a <a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> (usually <a class="link" href="gio-GIOError.html#G-IO-ERROR:CAPS" title="G_IO_ERROR"><span class="type">G_IO_ERROR</span></a>).</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td> -<td>an error code.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td> -<td>a formatted error reporting string.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td> -<td>a list of variables to fill in <em class="parameter"><code>format</code></em>.</td> -</tr> -</tbody> -</table></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><a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> domain</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> 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> -<p> -Sets an error within the asynchronous result without a <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>. -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> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>simple</code></em> :</span></p></td> -<td>a <a class="link" href="GSimpleAsyncResult.html" title="GSimpleAsyncResult"><span class="type">GSimpleAsyncResult</span></a>.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td> -<td>a <a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> (usually <a class="link" href="gio-GIOError.html#G-IO-ERROR:CAPS" title="G_IO_ERROR"><span class="type">G_IO_ERROR</span></a>).</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td> -<td>an error code.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td> -<td>a formatted error reporting string.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>args</code></em> :</span></p></td> -<td>va_list of arguments.</td> -</tr> -</tbody> -</table></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><a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *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><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> domain</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> code</code></em>, - <em class="parameter"><code>const <span class="type">char</span> *format</code></em>, - <em class="parameter"><code>...</code></em>);</pre> -<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> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td> -<td>a <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td> -<td>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td> -<td>user data passed to <em class="parameter"><code>callback</code></em>.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td> -<td>a <a href="./../glib/glib/glib-Quarks.html#GQuark"><span class="type">GQuark</span></a> 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>).</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>code</code></em> :</span></p></td> -<td>a specific error code.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>format</code></em> :</span></p></td> -<td>a formatted error reporting string.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td> -<td>a list of variables to fill in <em class="parameter"><code>format</code></em>.</td> -</tr> -</tbody> -</table></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><a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *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><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>, - <em class="parameter"><code>const <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>);</pre> -<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 <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> rather -than building a new one. -</p> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td> -<td>a <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td> -<td>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>. <span class="annotation">[<acronym title="The callback is valid until first called."><span class="acronym">scope async</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td> -<td>user data passed to <em class="parameter"><code>callback</code></em>. <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><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> -<td>the <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> to report</td> -</tr> -</tbody> -</table></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><a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> *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><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>, - <em class="parameter"><code><a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> *error</code></em>);</pre> -<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> -<div class="variablelist"><table border="0"> -<col align="left" valign="top"> -<tbody> -<tr> -<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td> -<td>a <a href="./../gobject/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>, or <a href="./../glib/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> -</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td> -<td>a <a class="link" href="GAsyncResult.html#GAsyncReadyCallback" title="GAsyncReadyCallback ()"><span class="type">GAsyncReadyCallback</span></a>.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td> -<td>user data passed to <em class="parameter"><code>callback</code></em>.</td> -</tr> -<tr> -<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td> -<td>the <a href="./../glib/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> to report</td> -</tr> -</tbody> -</table></div> -<p class="since">Since 2.28</p> -</div> -</div> -<div class="refsect1"> -<a name="GSimpleAsyncResult.see-also"></a><h2>See Also</h2> -<a class="link" href="GAsyncResult.html" title="GAsyncResult"><span class="type">GAsyncResult</span></a> -</div> -</div> -<div class="footer"> -<hr> - Generated by GTK-Doc V1.18</div> -</body> -</html>
\ No newline at end of file |