| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| 5 |
<title>UDisksThreadedJob: UDisks Reference Manual</title> |
| 6 |
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"> |
| 7 |
<link rel="home" href="index.html" title="UDisks Reference Manual"> |
| 8 |
<link rel="up" href="ref-daemon-jobs.html" title="Jobs"> |
| 9 |
<link rel="prev" href="UDisksSimpleJob.html" title="UDisksSimpleJob"> |
| 10 |
<link rel="next" href="UDisksSpawnedJob.html" title="UDisksSpawnedJob"> |
| 11 |
<meta name="generator" content="GTK-Doc V1.35.1 (XML mode)"> |
| 12 |
<link rel="stylesheet" href="style.css" type="text/css"> |
| 13 |
</head> |
| 14 |
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| 15 |
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> |
| 16 |
<td width="100%" align="left" class="shortcuts"> |
| 17 |
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> |
| 18 |
<a href="#UDisksThreadedJob.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> |
| 19 |
<a href="#UDisksThreadedJob.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span> |
| 20 |
<a href="#UDisksThreadedJob.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties"> <span class="dim">|</span> |
| 21 |
<a href="#UDisksThreadedJob.properties" class="shortcut">Properties</a></span><span id="nav_signals"> <span class="dim">|</span> |
| 22 |
<a href="#UDisksThreadedJob.signals" class="shortcut">Signals</a></span> |
| 23 |
</td> |
| 24 |
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
| 25 |
<td><a accesskey="u" href="ref-daemon-jobs.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> |
| 26 |
<td><a accesskey="p" href="UDisksSimpleJob.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> |
| 27 |
<td><a accesskey="n" href="UDisksSpawnedJob.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> |
| 28 |
</tr></table> |
| 29 |
<div class="refentry"> |
| 30 |
<a name="UDisksThreadedJob"></a><div class="titlepage"></div> |
| 31 |
<div class="refnamediv"><table width="100%"><tr> |
| 32 |
<td valign="top"> |
| 33 |
<h2><span class="refentrytitle"><a name="UDisksThreadedJob.top_of_page"></a>UDisksThreadedJob</span></h2> |
| 34 |
<p>UDisksThreadedJob — Job that runs in a thread</p> |
| 35 |
</td> |
| 36 |
<td class="gallery_image" valign="top" align="right"></td> |
| 37 |
</tr></table></div> |
| 38 |
<div class="refsect1"> |
| 39 |
<a name="UDisksThreadedJob.functions"></a><h2>Functions</h2> |
| 40 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 41 |
<colgroup> |
| 42 |
<col width="150px" class="functions_proto_type"> |
| 43 |
<col class="functions_proto_name"> |
| 44 |
</colgroup> |
| 45 |
<tbody> |
| 46 |
<tr> |
| 47 |
<td class="function_type"> |
| 48 |
<span class="returnvalue">gboolean</span> |
| 49 |
</td> |
| 50 |
<td class="function_name"> |
| 51 |
<span class="c_punctuation">(</span><a class="link" href="UDisksThreadedJob.html#UDisksThreadedJobFunc" title="UDisksThreadedJobFunc ()">*UDisksThreadedJobFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span> |
| 52 |
</td> |
| 53 |
</tr> |
| 54 |
<tr> |
| 55 |
<td class="function_type"> |
| 56 |
<a class="link" href="UDisksThreadedJob.html" title="UDisksThreadedJob"><span class="returnvalue">UDisksThreadedJob</span></a> * |
| 57 |
</td> |
| 58 |
<td class="function_name"> |
| 59 |
<a class="link" href="UDisksThreadedJob.html#udisks-threaded-job-new" title="udisks_threaded_job_new ()">udisks_threaded_job_new</a> <span class="c_punctuation">()</span> |
| 60 |
</td> |
| 61 |
</tr> |
| 62 |
<tr> |
| 63 |
<td class="function_type"> |
| 64 |
<span class="returnvalue">void</span> |
| 65 |
</td> |
| 66 |
<td class="function_name"> |
| 67 |
<a class="link" href="UDisksThreadedJob.html#udisks-threaded-job-start" title="udisks_threaded_job_start ()">udisks_threaded_job_start</a> <span class="c_punctuation">()</span> |
| 68 |
</td> |
| 69 |
</tr> |
| 70 |
<tr> |
| 71 |
<td class="function_type"> |
| 72 |
<span class="returnvalue">gboolean</span> |
| 73 |
</td> |
| 74 |
<td class="function_name"> |
| 75 |
<a class="link" href="UDisksThreadedJob.html#udisks-threaded-job-run-sync" title="udisks_threaded_job_run_sync ()">udisks_threaded_job_run_sync</a> <span class="c_punctuation">()</span> |
| 76 |
</td> |
| 77 |
</tr> |
| 78 |
<tr> |
| 79 |
<td class="function_type"> |
| 80 |
<span class="returnvalue">gpointer</span> |
| 81 |
</td> |
| 82 |
<td class="function_name"> |
| 83 |
<a class="link" href="UDisksThreadedJob.html#udisks-threaded-job-get-user-data" title="udisks_threaded_job_get_user_data ()">udisks_threaded_job_get_user_data</a> <span class="c_punctuation">()</span> |
| 84 |
</td> |
| 85 |
</tr> |
| 86 |
</tbody> |
| 87 |
</table></div> |
| 88 |
</div> |
| 89 |
<div class="refsect1"> |
| 90 |
<a name="UDisksThreadedJob.properties"></a><h2>Properties</h2> |
| 91 |
<div class="informaltable"><table class="informaltable" border="0"> |
| 92 |
<colgroup> |
| 93 |
<col width="150px" class="properties_type"> |
| 94 |
<col width="300px" class="properties_name"> |
| 95 |
<col width="200px" class="properties_flags"> |
| 96 |
</colgroup> |
| 97 |
<tbody> |
| 98 |
<tr> |
| 99 |
<td class="property_type"><span class="type">gpointer</span></td> |
| 100 |
<td class="property_name"><a class="link" href="UDisksThreadedJob.html#UDisksThreadedJob--job-func" title="The “job-func” property">job-func</a></td> |
| 101 |
<td class="property_flags">Read / Write / Construct Only</td> |
| 102 |
</tr> |
| 103 |
<tr> |
| 104 |
<td class="property_type"><span class="type">gpointer</span></td> |
| 105 |
<td class="property_name"><a class="link" href="UDisksThreadedJob.html#UDisksThreadedJob--user-data" title="The “user-data” property">user-data</a></td> |
| 106 |
<td class="property_flags">Read / Write / Construct Only</td> |
| 107 |
</tr> |
| 108 |
<tr> |
| 109 |
<td class="property_type"><span class="type">gpointer</span></td> |
| 110 |
<td class="property_name"><a class="link" href="UDisksThreadedJob.html#UDisksThreadedJob--user-data-free-func" title="The “user-data-free-func” property">user-data-free-func</a></td> |
| 111 |
<td class="property_flags">Read / Write / Construct Only</td> |
| 112 |
</tr> |
| 113 |
</tbody> |
| 114 |
</table></div> |
| 115 |
</div> |
| 116 |
<div class="refsect1"> |
| 117 |
<a name="UDisksThreadedJob.signals"></a><h2>Signals</h2> |
| 118 |
<div class="informaltable"><table class="informaltable" border="0"> |
| 119 |
<colgroup> |
| 120 |
<col width="150px" class="signal_proto_type"> |
| 121 |
<col width="300px" class="signal_proto_name"> |
| 122 |
<col width="200px" class="signal_proto_flags"> |
| 123 |
</colgroup> |
| 124 |
<tbody><tr> |
| 125 |
<td class="signal_type"><span class="returnvalue">gboolean</span></td> |
| 126 |
<td class="signal_name"><a class="link" href="UDisksThreadedJob.html#UDisksThreadedJob-threaded-job-completed" title="The “threaded-job-completed” signal">threaded-job-completed</a></td> |
| 127 |
<td class="signal_flags">Run Last</td> |
| 128 |
</tr></tbody> |
| 129 |
</table></div> |
| 130 |
</div> |
| 131 |
<div class="refsect1"> |
| 132 |
<a name="UDisksThreadedJob.other"></a><h2>Types and Values</h2> |
| 133 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 134 |
<colgroup> |
| 135 |
<col width="150px" class="other_proto_type"> |
| 136 |
<col class="other_proto_name"> |
| 137 |
</colgroup> |
| 138 |
<tbody><tr> |
| 139 |
<td class="datatype_keyword"> </td> |
| 140 |
<td class="function_name"><a class="link" href="UDisksThreadedJob.html#UDisksThreadedJob-struct" title="UDisksThreadedJob">UDisksThreadedJob</a></td> |
| 141 |
</tr></tbody> |
| 142 |
</table></div> |
| 143 |
</div> |
| 144 |
<div class="refsect1"> |
| 145 |
<a name="UDisksThreadedJob.object-hierarchy"></a><h2>Object Hierarchy</h2> |
| 146 |
<pre class="screen"> GObject |
| 147 |
<span class="lineart">╰──</span> GDBusInterfaceSkeleton |
| 148 |
<span class="lineart">╰──</span> <a class="link" href="UDisksJob.html#UDisksJobSkeleton">UDisksJobSkeleton</a> |
| 149 |
<span class="lineart">╰──</span> <a class="link" href="UDisksBaseJob.html" title="UDisksBaseJob">UDisksBaseJob</a> |
| 150 |
<span class="lineart">╰──</span> UDisksThreadedJob |
| 151 |
</pre> |
| 152 |
</div> |
| 153 |
<div class="refsect1"> |
| 154 |
<a name="UDisksThreadedJob.implemented-interfaces"></a><h2>Implemented Interfaces</h2> |
| 155 |
<p> |
| 156 |
UDisksThreadedJob implements |
| 157 |
GDBusInterface and <a class="link" href="UDisksJob.html" title="UDisksJob">UDisksJob</a>.</p> |
| 158 |
</div> |
| 159 |
<div class="refsect1"> |
| 160 |
<a name="UDisksThreadedJob.description"></a><h2>Description</h2> |
| 161 |
<p>This type provides an implementation of the <a class="link" href="UDisksJob.html" title="UDisksJob"><span class="type">UDisksJob</span></a> interface |
| 162 |
for jobs that run in a thread.</p> |
| 163 |
</div> |
| 164 |
<div class="refsect1"> |
| 165 |
<a name="UDisksThreadedJob.functions_details"></a><h2>Functions</h2> |
| 166 |
<div class="refsect2"> |
| 167 |
<a name="UDisksThreadedJobFunc"></a><h3>UDisksThreadedJobFunc ()</h3> |
| 168 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 169 |
<span class="c_punctuation">(</span>*UDisksThreadedJobFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="UDisksThreadedJob.html" title="UDisksThreadedJob"><span class="type">UDisksThreadedJob</span></a> *job</code></em>, |
| 170 |
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>, |
| 171 |
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>, |
| 172 |
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> |
| 173 |
<p>Job function that runs in a separate thread.</p> |
| 174 |
<p>Long-running jobs should periodically check <em class="parameter"><code>cancellable</code></em> |
| 175 |
to see if |
| 176 |
they have been cancelled.</p> |
| 177 |
<div class="refsect3"> |
| 178 |
<a name="UDisksThreadedJobFunc.parameters"></a><h4>Parameters</h4> |
| 179 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 180 |
<colgroup> |
| 181 |
<col width="150px" class="parameters_name"> |
| 182 |
<col class="parameters_description"> |
| 183 |
<col width="200px" class="parameters_annotations"> |
| 184 |
</colgroup> |
| 185 |
<tbody> |
| 186 |
<tr> |
| 187 |
<td class="parameter_name"><p>job</p></td> |
| 188 |
<td class="parameter_description"><p>A <a class="link" href="UDisksThreadedJob.html" title="UDisksThreadedJob"><span class="type">UDisksThreadedJob</span></a>.</p></td> |
| 189 |
<td class="parameter_annotations"> </td> |
| 190 |
</tr> |
| 191 |
<tr> |
| 192 |
<td class="parameter_name"><p>cancellable</p></td> |
| 193 |
<td class="parameter_description"><p>A <span class="type">GCancellable</span> (never <code class="literal">NULL</code>).</p></td> |
| 194 |
<td class="parameter_annotations"> </td> |
| 195 |
</tr> |
| 196 |
<tr> |
| 197 |
<td class="parameter_name"><p>user_data</p></td> |
| 198 |
<td class="parameter_description"><p>User data passed when creating <em class="parameter"><code>job</code></em> |
| 199 |
.</p></td> |
| 200 |
<td class="parameter_annotations"> </td> |
| 201 |
</tr> |
| 202 |
<tr> |
| 203 |
<td class="parameter_name"><p>error</p></td> |
| 204 |
<td class="parameter_description"><p>Return location for error (never <code class="literal">NULL</code>).</p></td> |
| 205 |
<td class="parameter_annotations"> </td> |
| 206 |
</tr> |
| 207 |
</tbody> |
| 208 |
</table></div> |
| 209 |
</div> |
| 210 |
<div class="refsect3"> |
| 211 |
<a name="UDisksThreadedJobFunc.returns"></a><h4>Returns</h4> |
| 212 |
<p> <code class="literal">TRUE</code> if the job succeeded, <code class="literal">FALSE</code> if <em class="parameter"><code>error</code></em> |
| 213 |
is set.</p> |
| 214 |
</div> |
| 215 |
</div> |
| 216 |
<hr> |
| 217 |
<div class="refsect2"> |
| 218 |
<a name="udisks-threaded-job-new"></a><h3>udisks_threaded_job_new ()</h3> |
| 219 |
<pre class="programlisting"><a class="link" href="UDisksThreadedJob.html" title="UDisksThreadedJob"><span class="returnvalue">UDisksThreadedJob</span></a> * |
| 220 |
udisks_threaded_job_new (<em class="parameter"><code><a class="link" href="UDisksThreadedJob.html#UDisksThreadedJobFunc" title="UDisksThreadedJobFunc ()"><span class="type">UDisksThreadedJobFunc</span></a> job_func</code></em>, |
| 221 |
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>, |
| 222 |
<em class="parameter"><code><span class="type">GDestroyNotify</span> user_data_free_func</code></em>, |
| 223 |
<em class="parameter"><code><a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> *daemon</code></em>, |
| 224 |
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>);</pre> |
| 225 |
<p>Creates a new <a class="link" href="UDisksThreadedJob.html" title="UDisksThreadedJob"><span class="type">UDisksThreadedJob</span></a> instance.</p> |
| 226 |
<p>The job is not started automatically! Use <a class="link" href="UDisksThreadedJob.html#udisks-threaded-job-start" title="udisks_threaded_job_start ()"><code class="function">udisks_threaded_job_start()</code></a> to |
| 227 |
start the job after <a class="link" href="UDisksThreadedJob.html#UDisksThreadedJob-threaded-job-completed" title="The “threaded-job-completed” signal"><span class="type">“threaded-job-completed”</span></a> or |
| 228 |
<a class="link" href="UDisksJob.html#UDisksJob-completed" title="The “completed” signal"><span class="type">“completed”</span></a> signals are connected (to get notified when the job is |
| 229 |
done). This is to prevent a race condition with the <em class="parameter"><code>job_func</code></em> |
| 230 |
finishing |
| 231 |
before the signals are connected in which case the signal handlers are never |
| 232 |
triggered.</p> |
| 233 |
<div class="refsect3"> |
| 234 |
<a name="udisks-threaded-job-new.parameters"></a><h4>Parameters</h4> |
| 235 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 236 |
<colgroup> |
| 237 |
<col width="150px" class="parameters_name"> |
| 238 |
<col class="parameters_description"> |
| 239 |
<col width="200px" class="parameters_annotations"> |
| 240 |
</colgroup> |
| 241 |
<tbody> |
| 242 |
<tr> |
| 243 |
<td class="parameter_name"><p>job_func</p></td> |
| 244 |
<td class="parameter_description"><p>The function to run in another thread.</p></td> |
| 245 |
<td class="parameter_annotations"> </td> |
| 246 |
</tr> |
| 247 |
<tr> |
| 248 |
<td class="parameter_name"><p>user_data</p></td> |
| 249 |
<td class="parameter_description"><p>User data to pass to <em class="parameter"><code>job_func</code></em> |
| 250 |
.</p></td> |
| 251 |
<td class="parameter_annotations"> </td> |
| 252 |
</tr> |
| 253 |
<tr> |
| 254 |
<td class="parameter_name"><p>user_data_free_func</p></td> |
| 255 |
<td class="parameter_description"><p>Function to free <em class="parameter"><code>user_data</code></em> |
| 256 |
with or <code class="literal">NULL</code>.</p></td> |
| 257 |
<td class="parameter_annotations"> </td> |
| 258 |
</tr> |
| 259 |
<tr> |
| 260 |
<td class="parameter_name"><p>daemon</p></td> |
| 261 |
<td class="parameter_description"><p>A <a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a>.</p></td> |
| 262 |
<td class="parameter_annotations"> </td> |
| 263 |
</tr> |
| 264 |
<tr> |
| 265 |
<td class="parameter_name"><p>cancellable</p></td> |
| 266 |
<td class="parameter_description"><p>A <span class="type">GCancellable</span> or <code class="literal">NULL</code>.</p></td> |
| 267 |
<td class="parameter_annotations"> </td> |
| 268 |
</tr> |
| 269 |
</tbody> |
| 270 |
</table></div> |
| 271 |
</div> |
| 272 |
<div class="refsect3"> |
| 273 |
<a name="udisks-threaded-job-new.returns"></a><h4>Returns</h4> |
| 274 |
<p> A new <a class="link" href="UDisksThreadedJob.html" title="UDisksThreadedJob"><span class="type">UDisksThreadedJob</span></a>. Free with <code class="function">g_object_unref()</code>.</p> |
| 275 |
</div> |
| 276 |
</div> |
| 277 |
<hr> |
| 278 |
<div class="refsect2"> |
| 279 |
<a name="udisks-threaded-job-start"></a><h3>udisks_threaded_job_start ()</h3> |
| 280 |
<pre class="programlisting"><span class="returnvalue">void</span> |
| 281 |
udisks_threaded_job_start (<em class="parameter"><code><a class="link" href="UDisksThreadedJob.html" title="UDisksThreadedJob"><span class="type">UDisksThreadedJob</span></a> *job</code></em>);</pre> |
| 282 |
<p>Start the <em class="parameter"><code>job</code></em> |
| 283 |
. Connect to the <a class="link" href="UDisksThreadedJob.html#UDisksThreadedJob-threaded-job-completed" title="The “threaded-job-completed” signal"><span class="type">“threaded-job-completed”</span></a> or |
| 284 |
<a class="link" href="UDisksJob.html#UDisksJob-completed" title="The “completed” signal"><span class="type">“completed”</span></a> signals to get notified when the job is done.</p> |
| 285 |
<div class="refsect3"> |
| 286 |
<a name="udisks-threaded-job-start.parameters"></a><h4>Parameters</h4> |
| 287 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 288 |
<colgroup> |
| 289 |
<col width="150px" class="parameters_name"> |
| 290 |
<col class="parameters_description"> |
| 291 |
<col width="200px" class="parameters_annotations"> |
| 292 |
</colgroup> |
| 293 |
<tbody><tr> |
| 294 |
<td class="parameter_name"><p>job</p></td> |
| 295 |
<td class="parameter_description"><p>the job to start</p></td> |
| 296 |
<td class="parameter_annotations"> </td> |
| 297 |
</tr></tbody> |
| 298 |
</table></div> |
| 299 |
</div> |
| 300 |
</div> |
| 301 |
<hr> |
| 302 |
<div class="refsect2"> |
| 303 |
<a name="udisks-threaded-job-run-sync"></a><h3>udisks_threaded_job_run_sync ()</h3> |
| 304 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 305 |
udisks_threaded_job_run_sync (<em class="parameter"><code><a class="link" href="UDisksThreadedJob.html" title="UDisksThreadedJob"><span class="type">UDisksThreadedJob</span></a> *job</code></em>, |
| 306 |
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre> |
| 307 |
<p>Run the <em class="parameter"><code>job</code></em> |
| 308 |
synchronously.</p> |
| 309 |
<p>Connect to the <a class="link" href="UDisksThreadedJob.html#UDisksThreadedJob-threaded-job-completed" title="The “threaded-job-completed” signal"><span class="type">“threaded-job-completed”</span></a> or |
| 310 |
<a class="link" href="UDisksJob.html#UDisksJob-completed" title="The “completed” signal"><span class="type">“completed”</span></a> signals to get notified when the job is done.</p> |
| 311 |
<div class="refsect3"> |
| 312 |
<a name="udisks-threaded-job-run-sync.parameters"></a><h4>Parameters</h4> |
| 313 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 314 |
<colgroup> |
| 315 |
<col width="150px" class="parameters_name"> |
| 316 |
<col class="parameters_description"> |
| 317 |
<col width="200px" class="parameters_annotations"> |
| 318 |
</colgroup> |
| 319 |
<tbody> |
| 320 |
<tr> |
| 321 |
<td class="parameter_name"><p>job</p></td> |
| 322 |
<td class="parameter_description"><p>the job to run</p></td> |
| 323 |
<td class="parameter_annotations"> </td> |
| 324 |
</tr> |
| 325 |
<tr> |
| 326 |
<td class="parameter_name"><p>error</p></td> |
| 327 |
<td class="parameter_description"><p>The <span class="type">GError</span> set in case of failure</p></td> |
| 328 |
<td class="parameter_annotations"> </td> |
| 329 |
</tr> |
| 330 |
</tbody> |
| 331 |
</table></div> |
| 332 |
</div> |
| 333 |
<div class="refsect3"> |
| 334 |
<a name="udisks-threaded-job-run-sync.returns"></a><h4>Returns</h4> |
| 335 |
<p> <code class="literal">TRUE</code> if the job succeeded, <code class="literal">FALSE</code> in case of failure with <em class="parameter"><code>error</code></em> |
| 336 |
being set.</p> |
| 337 |
</div> |
| 338 |
</div> |
| 339 |
<hr> |
| 340 |
<div class="refsect2"> |
| 341 |
<a name="udisks-threaded-job-get-user-data"></a><h3>udisks_threaded_job_get_user_data ()</h3> |
| 342 |
<pre class="programlisting"><span class="returnvalue">gpointer</span> |
| 343 |
udisks_threaded_job_get_user_data (<em class="parameter"><code><a class="link" href="UDisksThreadedJob.html" title="UDisksThreadedJob"><span class="type">UDisksThreadedJob</span></a> *job</code></em>);</pre> |
| 344 |
<p>Gets the <em class="parameter"><code>user_data</code></em> |
| 345 |
parameter that <em class="parameter"><code>job</code></em> |
| 346 |
was constructed with.</p> |
| 347 |
<div class="refsect3"> |
| 348 |
<a name="udisks-threaded-job-get-user-data.parameters"></a><h4>Parameters</h4> |
| 349 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 350 |
<colgroup> |
| 351 |
<col width="150px" class="parameters_name"> |
| 352 |
<col class="parameters_description"> |
| 353 |
<col width="200px" class="parameters_annotations"> |
| 354 |
</colgroup> |
| 355 |
<tbody><tr> |
| 356 |
<td class="parameter_name"><p>job</p></td> |
| 357 |
<td class="parameter_description"><p>A <a class="link" href="UDisksThreadedJob.html" title="UDisksThreadedJob"><span class="type">UDisksThreadedJob</span></a>.</p></td> |
| 358 |
<td class="parameter_annotations"> </td> |
| 359 |
</tr></tbody> |
| 360 |
</table></div> |
| 361 |
</div> |
| 362 |
<div class="refsect3"> |
| 363 |
<a name="udisks-threaded-job-get-user-data.returns"></a><h4>Returns</h4> |
| 364 |
<p> A <span class="type">gpointer</span> owned by <em class="parameter"><code>job</code></em> |
| 365 |
.</p> |
| 366 |
</div> |
| 367 |
</div> |
| 368 |
</div> |
| 369 |
<div class="refsect1"> |
| 370 |
<a name="UDisksThreadedJob.other_details"></a><h2>Types and Values</h2> |
| 371 |
<div class="refsect2"> |
| 372 |
<a name="UDisksThreadedJob-struct"></a><h3>UDisksThreadedJob</h3> |
| 373 |
<pre class="programlisting">typedef struct _UDisksThreadedJob UDisksThreadedJob;</pre> |
| 374 |
<p>The <a class="link" href="UDisksThreadedJob.html" title="UDisksThreadedJob"><span class="type">UDisksThreadedJob</span></a> structure contains only private data and should |
| 375 |
only be accessed using the provided API.</p> |
| 376 |
</div> |
| 377 |
</div> |
| 378 |
<div class="refsect1"> |
| 379 |
<a name="UDisksThreadedJob.property-details"></a><h2>Property Details</h2> |
| 380 |
<div class="refsect2"> |
| 381 |
<a name="UDisksThreadedJob--job-func"></a><h3>The <code class="literal">“job-func”</code> property</h3> |
| 382 |
<pre class="programlisting"> “job-func” <span class="type">gpointer</span></pre> |
| 383 |
<p>The <a class="link" href="UDisksThreadedJob.html#UDisksThreadedJobFunc" title="UDisksThreadedJobFunc ()"><span class="type">UDisksThreadedJobFunc</span></a> to use.</p> |
| 384 |
<p>Owner: UDisksThreadedJob</p> |
| 385 |
<p>Flags: Read / Write / Construct Only</p> |
| 386 |
</div> |
| 387 |
<hr> |
| 388 |
<div class="refsect2"> |
| 389 |
<a name="UDisksThreadedJob--user-data"></a><h3>The <code class="literal">“user-data”</code> property</h3> |
| 390 |
<pre class="programlisting"> “user-data” <span class="type">gpointer</span></pre> |
| 391 |
<p>User data for the <a class="link" href="UDisksThreadedJob.html#UDisksThreadedJobFunc" title="UDisksThreadedJobFunc ()"><span class="type">UDisksThreadedJobFunc</span></a>.</p> |
| 392 |
<p>Owner: UDisksThreadedJob</p> |
| 393 |
<p>Flags: Read / Write / Construct Only</p> |
| 394 |
</div> |
| 395 |
<hr> |
| 396 |
<div class="refsect2"> |
| 397 |
<a name="UDisksThreadedJob--user-data-free-func"></a><h3>The <code class="literal">“user-data-free-func”</code> property</h3> |
| 398 |
<pre class="programlisting"> “user-data-free-func” <span class="type">gpointer</span></pre> |
| 399 |
<p>Free function for user data for the <a class="link" href="UDisksThreadedJob.html#UDisksThreadedJobFunc" title="UDisksThreadedJobFunc ()"><span class="type">UDisksThreadedJobFunc</span></a>.</p> |
| 400 |
<p>Owner: UDisksThreadedJob</p> |
| 401 |
<p>Flags: Read / Write / Construct Only</p> |
| 402 |
</div> |
| 403 |
</div> |
| 404 |
<div class="refsect1"> |
| 405 |
<a name="UDisksThreadedJob.signal-details"></a><h2>Signal Details</h2> |
| 406 |
<div class="refsect2"> |
| 407 |
<a name="UDisksThreadedJob-threaded-job-completed"></a><h3>The <code class="literal">“threaded-job-completed”</code> signal</h3> |
| 408 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 409 |
user_function (<a class="link" href="UDisksThreadedJob.html" title="UDisksThreadedJob"><span class="type">UDisksThreadedJob</span></a> *job, |
| 410 |
<span class="type">gboolean</span> result, |
| 411 |
<span class="type">GError</span> *error, |
| 412 |
<span class="type">gpointer</span> user_data)</pre> |
| 413 |
<p>Emitted when the threaded job is complete.</p> |
| 414 |
<p>The default implementation simply emits the <a class="link" href="UDisksJob.html#UDisksJob-completed" title="The “completed” signal"><span class="type">“completed”</span></a> |
| 415 |
signal with <em class="parameter"><code>success</code></em> |
| 416 |
set to <code class="literal">TRUE</code> if, and only if, <em class="parameter"><code>error</code></em> |
| 417 |
is |
| 418 |
<code class="literal">NULL</code>. Otherwise, <em class="parameter"><code>message</code></em> |
| 419 |
on that signal is set to a string |
| 420 |
describing <em class="parameter"><code>error</code></em> |
| 421 |
. You can avoid the default implementation by |
| 422 |
returning <code class="literal">TRUE</code> from your signal handler.</p> |
| 423 |
<p>This signal is emitted in the</p> |
| 424 |
thread-default main loop<p>of the thread that <em class="parameter"><code>job</code></em> |
| 425 |
was created in.</p> |
| 426 |
<div class="refsect3"> |
| 427 |
<a name="UDisksThreadedJob-threaded-job-completed.parameters"></a><h4>Parameters</h4> |
| 428 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 429 |
<colgroup> |
| 430 |
<col width="150px" class="parameters_name"> |
| 431 |
<col class="parameters_description"> |
| 432 |
<col width="200px" class="parameters_annotations"> |
| 433 |
</colgroup> |
| 434 |
<tbody> |
| 435 |
<tr> |
| 436 |
<td class="parameter_name"><p>job</p></td> |
| 437 |
<td class="parameter_description"><p>The <a class="link" href="UDisksThreadedJob.html" title="UDisksThreadedJob"><span class="type">UDisksThreadedJob</span></a> emitting the signal.</p></td> |
| 438 |
<td class="parameter_annotations"> </td> |
| 439 |
</tr> |
| 440 |
<tr> |
| 441 |
<td class="parameter_name"><p>result</p></td> |
| 442 |
<td class="parameter_description"><p>The <span class="type">gboolean</span> returned by the <a class="link" href="UDisksThreadedJob.html#UDisksThreadedJobFunc" title="UDisksThreadedJobFunc ()"><span class="type">UDisksThreadedJobFunc</span></a>.</p></td> |
| 443 |
<td class="parameter_annotations"> </td> |
| 444 |
</tr> |
| 445 |
<tr> |
| 446 |
<td class="parameter_name"><p>error</p></td> |
| 447 |
<td class="parameter_description"><p>The <span class="type">GError</span> set by the <a class="link" href="UDisksThreadedJob.html#UDisksThreadedJobFunc" title="UDisksThreadedJobFunc ()"><span class="type">UDisksThreadedJobFunc</span></a>.</p></td> |
| 448 |
<td class="parameter_annotations"> </td> |
| 449 |
</tr> |
| 450 |
<tr> |
| 451 |
<td class="parameter_name"><p>user_data</p></td> |
| 452 |
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td> |
| 453 |
<td class="parameter_annotations"> </td> |
| 454 |
</tr> |
| 455 |
</tbody> |
| 456 |
</table></div> |
| 457 |
</div> |
| 458 |
<div class="refsect3"> |
| 459 |
<a name="UDisksThreadedJob-threaded-job-completed.returns"></a><h4>Returns</h4> |
| 460 |
<p> <code class="literal">TRUE</code> if the signal was handled, <code class="literal">FALSE</code> to let other |
| 461 |
handlers run.</p> |
| 462 |
</div> |
| 463 |
<p>Flags: Run Last</p> |
| 464 |
</div> |
| 465 |
</div> |
| 466 |
</div> |
| 467 |
<div class="footer"> |
| 468 |
<hr>Generated by GTK-Doc V1.35.1</div> |
| 469 |
</body> |
| 470 |
</html> |