/usr/share/gtk-doc/html/exo-1/ExoSimpleJob.html is in libexo-1-dev 0.10.7-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ExoSimpleJob: Exo Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Exo Reference Manual">
<link rel="up" href="exo-jobs.html" title="Part V. Framework for threaded/asynchronous jobs">
<link rel="prev" href="ExoJob.html" title="ExoJob">
<link rel="next" href="exo-extensions.html" title="Part VI. Extensions to existing frameworks">
<meta name="generator" content="GTK-Doc V1.24 (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="#ExoSimpleJob.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
<a href="#ExoSimpleJob.object-hierarchy" class="shortcut">Object Hierarchy</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="exo-jobs.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ExoJob.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="exo-extensions.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="ExoSimpleJob"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="ExoSimpleJob.top_of_page"></a>ExoSimpleJob</span></h2>
<p>ExoSimpleJob — Simple interface to execute functions asynchronously</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="ExoSimpleJob.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="ExoSimpleJob.html#ExoSimpleJobFunc" title="ExoSimpleJobFunc ()">*ExoSimpleJobFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="ExoJob.html" title="ExoJob"><span class="returnvalue">ExoJob</span></a> *
</td>
<td class="function_name">
<a class="link" href="ExoSimpleJob.html#exo-simple-job-launch" title="exo_simple_job_launch ()">exo_simple_job_launch</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ExoSimpleJob.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="ExoSimpleJob.html#ExoSimpleJob-struct" title="ExoSimpleJob">ExoSimpleJob</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="ExoSimpleJob.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
<span class="lineart">╰──</span> <a class="link" href="ExoJob.html" title="ExoJob">ExoJob</a>
<span class="lineart">╰──</span> ExoSimpleJob
</pre>
</div>
<div class="refsect1">
<a name="ExoSimpleJob.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <exo/exo.h>
</pre>
</div>
<div class="refsect1">
<a name="ExoSimpleJob.description"></a><h2>Description</h2>
<a class="link" href="ExoSimpleJob.html" title="ExoSimpleJob">ExoSimpleJob</a> can be used to execute
<p>functions asynchronously in an <a class="link" href="ExoJob.html" title="ExoJob"><span class="type">ExoJob</span></a> wrapper object. It is easier to
use than the <a href="https://developer.gnome.org/glib/unstable/glib-Threads.html#GThread"><span class="type">GThread</span></a> system and provides basic signals to follow the
progress of an operation.</p>
</div>
<div class="refsect1">
<a name="ExoSimpleJob.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="ExoSimpleJobFunc"></a><h3>ExoSimpleJobFunc ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="c_punctuation">(</span>*ExoSimpleJobFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="ExoJob.html" title="ExoJob"><span class="type">ExoJob</span></a> *job</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/gobject/unstable/gobject-Value-arrays.html#GValueArray"><span class="type">GValueArray</span></a> *param_values</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Used by the <a class="link" href="ExoSimpleJob.html" title="ExoSimpleJob"><span class="type">ExoSimpleJob</span></a> to process the <em class="parameter"><code>job</code></em>
. See <a class="link" href="ExoSimpleJob.html#exo-simple-job-launch" title="exo_simple_job_launch ()"><code class="function">exo_simple_job_launch()</code></a>
for further details.</p>
<div class="refsect3">
<a name="id-1.6.4.8.2.5"></a><h4>Parameters</h4>
<div class="informaltable"><table 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>job</p></td>
<td class="parameter_description"><p>an <a class="link" href="ExoJob.html" title="ExoJob"><span class="type">ExoJob</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>param_values</p></td>
<td class="parameter_description"><p>a <a href="https://developer.gnome.org/gobject/unstable/gobject-Value-arrays.html#GValueArray"><span class="type">GValueArray</span></a> of the <a href="https://developer.gnome.org/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a>s passed to
<a class="link" href="ExoSimpleJob.html#exo-simple-job-launch" title="exo_simple_job_launch ()"><code class="function">exo_simple_job_launch()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>return location for errors.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.6.4.8.2.6"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> in case of an error.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="exo-simple-job-launch"></a><h3>exo_simple_job_launch ()</h3>
<pre class="programlisting"><a class="link" href="ExoJob.html" title="ExoJob"><span class="returnvalue">ExoJob</span></a> *
exo_simple_job_launch (<em class="parameter"><code><a class="link" href="ExoSimpleJob.html#ExoSimpleJobFunc" title="ExoSimpleJobFunc ()"><span class="type">ExoSimpleJobFunc</span></a> func</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_param_values</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>Allocates a new <a class="link" href="ExoJob.html" title="ExoJob"><span class="type">ExoJob</span></a> which executes the specified <em class="parameter"><code>func</code></em>
with
the specified parameters.</p>
<p>An example could be:</p>
<div class="informalexample"><pre class="programlisting">
static gboolean
list_directory (ExoJob *job,
GValueArray *param_values,
GError **error)
{
GFileEnumerator *enumerator;
GFileInfo *info;
GError *err = NULL;
GFile *directory;
if (exo_job_set_error_if_cancelled (EXO_JOB (job), error))
return FALSE;
directory = g_value_get_object (g_value_array_get_nth (param_values, 0));
enumerator = g_file_enumerate_children (directory,
"standard::display-name",
G_FILE_QUERY_INFO_NONE,
exo_job_get_cancellable (job),
&err);
if (err != NULL)
{
g_propagate_error (error, err);
return FALSE;
}
while (TRUE)
{
info = g_file_enumerator_next_file (enumerator,
exo_job_get_cancellable (job),
&err);
if (info == NULL)
break;
exo_job_info_message (job, _("Child: %s"),
g_file_info_get_display_name (info));
g_object_unref (info);
}
g_object_unref (enumerator);
if (err != NULL)
{
g_propagate_error (error, err);
return FALSE;
}
else
{
return TRUE;
}
}
...
GFile *file = g_file_new_for_path ("/home/user");
ExoJob *job = exo_simple_job_launch (list_directory, 1, G_TYPE_FILE, file);
g_signal_connect (job, "info-message", G_CALLBACK (update_some_widget), widget);
g_signal_connect (job, "finished", G_CALLBACK (unref_the_job_object), NULL);
</pre></div>
<p>The caller is responsible to release the returned <a class="link" href="ExoJob.html" title="ExoJob"><span class="type">ExoJob</span></a> object
using <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> when no longer needed.</p>
<div class="refsect3">
<a name="id-1.6.4.8.3.8"></a><h4>Parameters</h4>
<div class="informaltable"><table 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>func</p></td>
<td class="parameter_description"><p>the <a class="link" href="ExoSimpleJob.html#ExoSimpleJobFunc" title="ExoSimpleJobFunc ()"><span class="type">ExoSimpleJobFunc</span></a> to execute the job.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_param_values</p></td>
<td class="parameter_description"><p>the number of parameters to pass to the <em class="parameter"><code>func</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a list of <a href="https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> and parameter pairs (exactly
<em class="parameter"><code>n_param_values</code></em>
pairs) that are passed to <em class="parameter"><code>func</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.6.4.8.3.9"></a><h4>Returns</h4>
<p> the launched <a class="link" href="ExoJob.html" title="ExoJob"><span class="type">ExoJob</span></a>.</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="ExoSimpleJob.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="ExoSimpleJob-struct"></a><h3>ExoSimpleJob</h3>
<pre class="programlisting">typedef struct _ExoSimpleJob ExoSimpleJob;</pre>
<p>The <a class="link" href="ExoSimpleJob.html" title="ExoSimpleJob"><span class="type">ExoSimpleJob</span></a> struct contains only private fields and should not be
directly accessed.</p>
</div>
</div>
<div class="refsect1">
<a name="ExoSimpleJob.see-also"></a><h2>See Also</h2>
<a class="link" href="ExoJob.html" title="ExoJob">ExoJob</a>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.24</div>
</body>
</html>
|