| 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>UDisksSpawnedJob: 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="UDisksThreadedJob.html" title="UDisksThreadedJob"> |
| 10 |
<link rel="next" href="ref-daemon-linux-types.html" title="Linux-specific types"> |
| 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="#UDisksSpawnedJob.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> |
| 19 |
<a href="#UDisksSpawnedJob.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span> |
| 20 |
<a href="#UDisksSpawnedJob.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties"> <span class="dim">|</span> |
| 21 |
<a href="#UDisksSpawnedJob.properties" class="shortcut">Properties</a></span><span id="nav_signals"> <span class="dim">|</span> |
| 22 |
<a href="#UDisksSpawnedJob.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="UDisksThreadedJob.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> |
| 27 |
<td><a accesskey="n" href="ref-daemon-linux-types.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="UDisksSpawnedJob"></a><div class="titlepage"></div> |
| 31 |
<div class="refnamediv"><table width="100%"><tr> |
| 32 |
<td valign="top"> |
| 33 |
<h2><span class="refentrytitle"><a name="UDisksSpawnedJob.top_of_page"></a>UDisksSpawnedJob</span></h2> |
| 34 |
<p>UDisksSpawnedJob — Job that spawns a command</p> |
| 35 |
</td> |
| 36 |
<td class="gallery_image" valign="top" align="right"></td> |
| 37 |
</tr></table></div> |
| 38 |
<div class="refsect1"> |
| 39 |
<a name="UDisksSpawnedJob.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 |
<a class="link" href="UDisksSpawnedJob.html" title="UDisksSpawnedJob"><span class="returnvalue">UDisksSpawnedJob</span></a> * |
| 49 |
</td> |
| 50 |
<td class="function_name"> |
| 51 |
<a class="link" href="UDisksSpawnedJob.html#udisks-spawned-job-new" title="udisks_spawned_job_new ()">udisks_spawned_job_new</a> <span class="c_punctuation">()</span> |
| 52 |
</td> |
| 53 |
</tr> |
| 54 |
<tr> |
| 55 |
<td class="function_type">const <span class="returnvalue">gchar</span> * |
| 56 |
</td> |
| 57 |
<td class="function_name"> |
| 58 |
<a class="link" href="UDisksSpawnedJob.html#udisks-spawned-job-get-command-line" title="udisks_spawned_job_get_command_line ()">udisks_spawned_job_get_command_line</a> <span class="c_punctuation">()</span> |
| 59 |
</td> |
| 60 |
</tr> |
| 61 |
<tr> |
| 62 |
<td class="function_type"> |
| 63 |
<span class="returnvalue">void</span> |
| 64 |
</td> |
| 65 |
<td class="function_name"> |
| 66 |
<a class="link" href="UDisksSpawnedJob.html#udisks-spawned-job-start" title="udisks_spawned_job_start ()">udisks_spawned_job_start</a> <span class="c_punctuation">()</span> |
| 67 |
</td> |
| 68 |
</tr> |
| 69 |
</tbody> |
| 70 |
</table></div> |
| 71 |
</div> |
| 72 |
<div class="refsect1"> |
| 73 |
<a name="UDisksSpawnedJob.properties"></a><h2>Properties</h2> |
| 74 |
<div class="informaltable"><table class="informaltable" border="0"> |
| 75 |
<colgroup> |
| 76 |
<col width="150px" class="properties_type"> |
| 77 |
<col width="300px" class="properties_name"> |
| 78 |
<col width="200px" class="properties_flags"> |
| 79 |
</colgroup> |
| 80 |
<tbody> |
| 81 |
<tr> |
| 82 |
<td class="property_type"> |
| 83 |
<span class="type">char</span> *</td> |
| 84 |
<td class="property_name"><a class="link" href="UDisksSpawnedJob.html#UDisksSpawnedJob--command-line" title="The “command-line” property">command-line</a></td> |
| 85 |
<td class="property_flags">Read / Write / Construct Only</td> |
| 86 |
</tr> |
| 87 |
<tr> |
| 88 |
<td class="property_type"> |
| 89 |
<span class="type">AutowipeBuffer</span> *</td> |
| 90 |
<td class="property_name"><a class="link" href="UDisksSpawnedJob.html#UDisksSpawnedJob--input-string" title="The “input-string” property">input-string</a></td> |
| 91 |
<td class="property_flags">Write / Construct Only</td> |
| 92 |
</tr> |
| 93 |
<tr> |
| 94 |
<td class="property_type"><span class="type">guint</span></td> |
| 95 |
<td class="property_name"><a class="link" href="UDisksSpawnedJob.html#UDisksSpawnedJob--run-as-euid" title="The “run-as-euid” property">run-as-euid</a></td> |
| 96 |
<td class="property_flags">Write / Construct Only</td> |
| 97 |
</tr> |
| 98 |
<tr> |
| 99 |
<td class="property_type"><span class="type">guint</span></td> |
| 100 |
<td class="property_name"><a class="link" href="UDisksSpawnedJob.html#UDisksSpawnedJob--run-as-uid" title="The “run-as-uid” property">run-as-uid</a></td> |
| 101 |
<td class="property_flags">Write / Construct Only</td> |
| 102 |
</tr> |
| 103 |
</tbody> |
| 104 |
</table></div> |
| 105 |
</div> |
| 106 |
<div class="refsect1"> |
| 107 |
<a name="UDisksSpawnedJob.signals"></a><h2>Signals</h2> |
| 108 |
<div class="informaltable"><table class="informaltable" border="0"> |
| 109 |
<colgroup> |
| 110 |
<col width="150px" class="signal_proto_type"> |
| 111 |
<col width="300px" class="signal_proto_name"> |
| 112 |
<col width="200px" class="signal_proto_flags"> |
| 113 |
</colgroup> |
| 114 |
<tbody><tr> |
| 115 |
<td class="signal_type"><span class="returnvalue">gboolean</span></td> |
| 116 |
<td class="signal_name"><a class="link" href="UDisksSpawnedJob.html#UDisksSpawnedJob-spawned-job-completed" title="The “spawned-job-completed” signal">spawned-job-completed</a></td> |
| 117 |
<td class="signal_flags">Run Last</td> |
| 118 |
</tr></tbody> |
| 119 |
</table></div> |
| 120 |
</div> |
| 121 |
<div class="refsect1"> |
| 122 |
<a name="UDisksSpawnedJob.other"></a><h2>Types and Values</h2> |
| 123 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 124 |
<colgroup> |
| 125 |
<col width="150px" class="other_proto_type"> |
| 126 |
<col class="other_proto_name"> |
| 127 |
</colgroup> |
| 128 |
<tbody><tr> |
| 129 |
<td class="datatype_keyword"> </td> |
| 130 |
<td class="function_name"><a class="link" href="UDisksSpawnedJob.html#UDisksSpawnedJob-struct" title="UDisksSpawnedJob">UDisksSpawnedJob</a></td> |
| 131 |
</tr></tbody> |
| 132 |
</table></div> |
| 133 |
</div> |
| 134 |
<div class="refsect1"> |
| 135 |
<a name="UDisksSpawnedJob.object-hierarchy"></a><h2>Object Hierarchy</h2> |
| 136 |
<pre class="screen"> GObject |
| 137 |
<span class="lineart">╰──</span> GDBusInterfaceSkeleton |
| 138 |
<span class="lineart">╰──</span> <a class="link" href="UDisksJob.html#UDisksJobSkeleton">UDisksJobSkeleton</a> |
| 139 |
<span class="lineart">╰──</span> <a class="link" href="UDisksBaseJob.html" title="UDisksBaseJob">UDisksBaseJob</a> |
| 140 |
<span class="lineart">╰──</span> UDisksSpawnedJob |
| 141 |
</pre> |
| 142 |
</div> |
| 143 |
<div class="refsect1"> |
| 144 |
<a name="UDisksSpawnedJob.implemented-interfaces"></a><h2>Implemented Interfaces</h2> |
| 145 |
<p> |
| 146 |
UDisksSpawnedJob implements |
| 147 |
GDBusInterface and <a class="link" href="UDisksJob.html" title="UDisksJob">UDisksJob</a>.</p> |
| 148 |
</div> |
| 149 |
<div class="refsect1"> |
| 150 |
<a name="UDisksSpawnedJob.description"></a><h2>Description</h2> |
| 151 |
<p>This type provides an implementation of the <a class="link" href="UDisksJob.html" title="UDisksJob"><span class="type">UDisksJob</span></a> interface |
| 152 |
for jobs that are implemented by spawning a command line.</p> |
| 153 |
</div> |
| 154 |
<div class="refsect1"> |
| 155 |
<a name="UDisksSpawnedJob.functions_details"></a><h2>Functions</h2> |
| 156 |
<div class="refsect2"> |
| 157 |
<a name="udisks-spawned-job-new"></a><h3>udisks_spawned_job_new ()</h3> |
| 158 |
<pre class="programlisting"><a class="link" href="UDisksSpawnedJob.html" title="UDisksSpawnedJob"><span class="returnvalue">UDisksSpawnedJob</span></a> * |
| 159 |
udisks_spawned_job_new (<em class="parameter"><code>const <span class="type">gchar</span> *command_line</code></em>, |
| 160 |
<em class="parameter"><code><span class="type">GString</span> *input_string</code></em>, |
| 161 |
<em class="parameter"><code><span class="type">uid_t</span> run_as_uid</code></em>, |
| 162 |
<em class="parameter"><code><span class="type">uid_t</span> run_as_euid</code></em>, |
| 163 |
<em class="parameter"><code><a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a> *daemon</code></em>, |
| 164 |
<em class="parameter"><code><span class="type">GCancellable</span> *cancellable</code></em>);</pre> |
| 165 |
<p>Creates a new <a class="link" href="UDisksSpawnedJob.html" title="UDisksSpawnedJob"><span class="type">UDisksSpawnedJob</span></a> instance.</p> |
| 166 |
<p>The job is not started automatically! Use <a class="link" href="UDisksSpawnedJob.html#udisks-spawned-job-start" title="udisks_spawned_job_start ()"><code class="function">udisks_spawned_job_start()</code></a> to start |
| 167 |
the job after <a class="link" href="UDisksSpawnedJob.html#UDisksSpawnedJob-spawned-job-completed" title="The “spawned-job-completed” signal"><span class="type">“spawned-job-completed”</span></a> or |
| 168 |
<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 |
| 169 |
done). This is to prevent a race condition with the spawned process |
| 170 |
terminating before the signals are connected in which case the signal |
| 171 |
handlers are never triggered.</p> |
| 172 |
<div class="refsect3"> |
| 173 |
<a name="udisks-spawned-job-new.parameters"></a><h4>Parameters</h4> |
| 174 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 175 |
<colgroup> |
| 176 |
<col width="150px" class="parameters_name"> |
| 177 |
<col class="parameters_description"> |
| 178 |
<col width="200px" class="parameters_annotations"> |
| 179 |
</colgroup> |
| 180 |
<tbody> |
| 181 |
<tr> |
| 182 |
<td class="parameter_name"><p>command_line</p></td> |
| 183 |
<td class="parameter_description"><p>The command line to run.</p></td> |
| 184 |
<td class="parameter_annotations"> </td> |
| 185 |
</tr> |
| 186 |
<tr> |
| 187 |
<td class="parameter_name"><p>input_string</p></td> |
| 188 |
<td class="parameter_description"><p>A string to write to stdin of the spawned program or <code class="literal">NULL</code>.</p></td> |
| 189 |
<td class="parameter_annotations"> </td> |
| 190 |
</tr> |
| 191 |
<tr> |
| 192 |
<td class="parameter_name"><p>run_as_uid</p></td> |
| 193 |
<td class="parameter_description"><p>The <span class="type">uid_t</span> to run the program as.</p></td> |
| 194 |
<td class="parameter_annotations"> </td> |
| 195 |
</tr> |
| 196 |
<tr> |
| 197 |
<td class="parameter_name"><p>run_as_euid</p></td> |
| 198 |
<td class="parameter_description"><p>The effective <span class="type">uid_t</span> to run the program as.</p></td> |
| 199 |
<td class="parameter_annotations"> </td> |
| 200 |
</tr> |
| 201 |
<tr> |
| 202 |
<td class="parameter_name"><p>daemon</p></td> |
| 203 |
<td class="parameter_description"><p>A <a class="link" href="UDisksDaemon.html" title="UDisksDaemon"><span class="type">UDisksDaemon</span></a>.</p></td> |
| 204 |
<td class="parameter_annotations"> </td> |
| 205 |
</tr> |
| 206 |
<tr> |
| 207 |
<td class="parameter_name"><p>cancellable</p></td> |
| 208 |
<td class="parameter_description"><p>A <span class="type">GCancellable</span> or <code class="literal">NULL</code>.</p></td> |
| 209 |
<td class="parameter_annotations"> </td> |
| 210 |
</tr> |
| 211 |
</tbody> |
| 212 |
</table></div> |
| 213 |
</div> |
| 214 |
<div class="refsect3"> |
| 215 |
<a name="udisks-spawned-job-new.returns"></a><h4>Returns</h4> |
| 216 |
<p> A new <a class="link" href="UDisksSpawnedJob.html" title="UDisksSpawnedJob"><span class="type">UDisksSpawnedJob</span></a>. Free with <code class="function">g_object_unref()</code>.</p> |
| 217 |
</div> |
| 218 |
</div> |
| 219 |
<hr> |
| 220 |
<div class="refsect2"> |
| 221 |
<a name="udisks-spawned-job-get-command-line"></a><h3>udisks_spawned_job_get_command_line ()</h3> |
| 222 |
<pre class="programlisting">const <span class="returnvalue">gchar</span> * |
| 223 |
udisks_spawned_job_get_command_line (<em class="parameter"><code><a class="link" href="UDisksSpawnedJob.html" title="UDisksSpawnedJob"><span class="type">UDisksSpawnedJob</span></a> *job</code></em>);</pre> |
| 224 |
<p>Gets the command line that <em class="parameter"><code>job</code></em> |
| 225 |
was constructed with.</p> |
| 226 |
<div class="refsect3"> |
| 227 |
<a name="udisks-spawned-job-get-command-line.parameters"></a><h4>Parameters</h4> |
| 228 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 229 |
<colgroup> |
| 230 |
<col width="150px" class="parameters_name"> |
| 231 |
<col class="parameters_description"> |
| 232 |
<col width="200px" class="parameters_annotations"> |
| 233 |
</colgroup> |
| 234 |
<tbody><tr> |
| 235 |
<td class="parameter_name"><p>job</p></td> |
| 236 |
<td class="parameter_description"><p>A <a class="link" href="UDisksSpawnedJob.html" title="UDisksSpawnedJob"><span class="type">UDisksSpawnedJob</span></a>.</p></td> |
| 237 |
<td class="parameter_annotations"> </td> |
| 238 |
</tr></tbody> |
| 239 |
</table></div> |
| 240 |
</div> |
| 241 |
<div class="refsect3"> |
| 242 |
<a name="udisks-spawned-job-get-command-line.returns"></a><h4>Returns</h4> |
| 243 |
<p> A string owned by <em class="parameter"><code>job</code></em> |
| 244 |
. Do not free.</p> |
| 245 |
</div> |
| 246 |
</div> |
| 247 |
<hr> |
| 248 |
<div class="refsect2"> |
| 249 |
<a name="udisks-spawned-job-start"></a><h3>udisks_spawned_job_start ()</h3> |
| 250 |
<pre class="programlisting"><span class="returnvalue">void</span> |
| 251 |
udisks_spawned_job_start (<em class="parameter"><code><a class="link" href="UDisksSpawnedJob.html" title="UDisksSpawnedJob"><span class="type">UDisksSpawnedJob</span></a> *job</code></em>);</pre> |
| 252 |
<p>Connect to the <a class="link" href="UDisksSpawnedJob.html#UDisksSpawnedJob-spawned-job-completed" title="The “spawned-job-completed” signal"><span class="type">“spawned-job-completed”</span></a> or |
| 253 |
<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> |
| 254 |
<div class="refsect3"> |
| 255 |
<a name="udisks-spawned-job-start.parameters"></a><h4>Parameters</h4> |
| 256 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 257 |
<colgroup> |
| 258 |
<col width="150px" class="parameters_name"> |
| 259 |
<col class="parameters_description"> |
| 260 |
<col width="200px" class="parameters_annotations"> |
| 261 |
</colgroup> |
| 262 |
<tbody><tr> |
| 263 |
<td class="parameter_name"><p>job</p></td> |
| 264 |
<td class="parameter_description"><p>the job to start</p></td> |
| 265 |
<td class="parameter_annotations"> </td> |
| 266 |
</tr></tbody> |
| 267 |
</table></div> |
| 268 |
</div> |
| 269 |
</div> |
| 270 |
</div> |
| 271 |
<div class="refsect1"> |
| 272 |
<a name="UDisksSpawnedJob.other_details"></a><h2>Types and Values</h2> |
| 273 |
<div class="refsect2"> |
| 274 |
<a name="UDisksSpawnedJob-struct"></a><h3>UDisksSpawnedJob</h3> |
| 275 |
<pre class="programlisting">typedef struct _UDisksSpawnedJob UDisksSpawnedJob;</pre> |
| 276 |
<p>The <a class="link" href="UDisksSpawnedJob.html" title="UDisksSpawnedJob"><span class="type">UDisksSpawnedJob</span></a> structure contains only private data and should |
| 277 |
only be accessed using the provided API.</p> |
| 278 |
</div> |
| 279 |
</div> |
| 280 |
<div class="refsect1"> |
| 281 |
<a name="UDisksSpawnedJob.property-details"></a><h2>Property Details</h2> |
| 282 |
<div class="refsect2"> |
| 283 |
<a name="UDisksSpawnedJob--command-line"></a><h3>The <code class="literal">“command-line”</code> property</h3> |
| 284 |
<pre class="programlisting"> “command-line” <span class="type">char</span> *</pre> |
| 285 |
<p>The command-line to run.</p> |
| 286 |
<p>Owner: UDisksSpawnedJob</p> |
| 287 |
<p>Flags: Read / Write / Construct Only</p> |
| 288 |
<p>Default value: NULL</p> |
| 289 |
</div> |
| 290 |
<hr> |
| 291 |
<div class="refsect2"> |
| 292 |
<a name="UDisksSpawnedJob--input-string"></a><h3>The <code class="literal">“input-string”</code> property</h3> |
| 293 |
<pre class="programlisting"> “input-string” <span class="type">AutowipeBuffer</span> *</pre> |
| 294 |
<p>String that will be written to stdin of the spawned program or |
| 295 |
<code class="literal">NULL</code> to not write anything.</p> |
| 296 |
<p>This is passed as autowipe_buffer (rather than G_TYPE_GSTRING) to nuke |
| 297 |
the contents after usage since the input string may contain key material.</p> |
| 298 |
<p>Owner: UDisksSpawnedJob</p> |
| 299 |
<p>Flags: Write / Construct Only</p> |
| 300 |
</div> |
| 301 |
<hr> |
| 302 |
<div class="refsect2"> |
| 303 |
<a name="UDisksSpawnedJob--run-as-euid"></a><h3>The <code class="literal">“run-as-euid”</code> property</h3> |
| 304 |
<pre class="programlisting"> “run-as-euid” <span class="type">guint</span></pre> |
| 305 |
<p>The effective <span class="type">uid_t</span> to run the program as.</p> |
| 306 |
<p>Owner: UDisksSpawnedJob</p> |
| 307 |
<p>Flags: Write / Construct Only</p> |
| 308 |
<p>Default value: 0</p> |
| 309 |
</div> |
| 310 |
<hr> |
| 311 |
<div class="refsect2"> |
| 312 |
<a name="UDisksSpawnedJob--run-as-uid"></a><h3>The <code class="literal">“run-as-uid”</code> property</h3> |
| 313 |
<pre class="programlisting"> “run-as-uid” <span class="type">guint</span></pre> |
| 314 |
<p>The <span class="type">uid_t</span> to run the program as.</p> |
| 315 |
<p>Owner: UDisksSpawnedJob</p> |
| 316 |
<p>Flags: Write / Construct Only</p> |
| 317 |
<p>Default value: 0</p> |
| 318 |
</div> |
| 319 |
</div> |
| 320 |
<div class="refsect1"> |
| 321 |
<a name="UDisksSpawnedJob.signal-details"></a><h2>Signal Details</h2> |
| 322 |
<div class="refsect2"> |
| 323 |
<a name="UDisksSpawnedJob-spawned-job-completed"></a><h3>The <code class="literal">“spawned-job-completed”</code> signal</h3> |
| 324 |
<pre class="programlisting"><span class="returnvalue">gboolean</span> |
| 325 |
user_function (<a class="link" href="UDisksSpawnedJob.html" title="UDisksSpawnedJob"><span class="type">UDisksSpawnedJob</span></a> *job, |
| 326 |
<span class="type">GError</span> *error, |
| 327 |
<span class="type">int</span> status, |
| 328 |
<span class="type">GString</span> *standard_output, |
| 329 |
<span class="type">GString</span> *standard_error, |
| 330 |
<span class="type">gpointer</span> user_data)</pre> |
| 331 |
<p>Emitted when the spawned job is complete. If spawning the command |
| 332 |
failed or if the job was cancelled, <em class="parameter"><code>error</code></em> |
| 333 |
will |
| 334 |
non-<code class="literal">NULL</code>. Otherwise you can use macros such as <code class="function">WIFEXITED()</code> and |
| 335 |
<code class="function">WEXITSTATUS()</code> on the <em class="parameter"><code>status</code></em> |
| 336 |
integer to obtain more information.</p> |
| 337 |
<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> |
| 338 |
signal with <em class="parameter"><code>success</code></em> |
| 339 |
set to <code class="literal">TRUE</code> if, and only if, <em class="parameter"><code>error</code></em> |
| 340 |
is |
| 341 |
<code class="literal">NULL</code>, <code class="function">WIFEXITED()</code> evaluates to <code class="literal">TRUE</code> and <code class="function">WEXITSTATUS()</code> is |
| 342 |
zero. Additionally, <em class="parameter"><code>message</code></em> |
| 343 |
on that signal is set to |
| 344 |
<em class="parameter"><code>standard_error</code></em> |
| 345 |
regards of whether <em class="parameter"><code>success</code></em> |
| 346 |
is <code class="literal">TRUE</code> or <code class="literal">FALSE</code>.</p> |
| 347 |
<p>You can avoid the default implementation by returning <code class="literal">TRUE</code> from |
| 348 |
your signal handler.</p> |
| 349 |
<p>This signal is emitted in the</p> |
| 350 |
thread-default main loop<p>of the thread that <em class="parameter"><code>job</code></em> |
| 351 |
was created in.</p> |
| 352 |
<div class="refsect3"> |
| 353 |
<a name="UDisksSpawnedJob-spawned-job-completed.parameters"></a><h4>Parameters</h4> |
| 354 |
<div class="informaltable"><table class="informaltable" width="100%" border="0"> |
| 355 |
<colgroup> |
| 356 |
<col width="150px" class="parameters_name"> |
| 357 |
<col class="parameters_description"> |
| 358 |
<col width="200px" class="parameters_annotations"> |
| 359 |
</colgroup> |
| 360 |
<tbody> |
| 361 |
<tr> |
| 362 |
<td class="parameter_name"><p>job</p></td> |
| 363 |
<td class="parameter_description"><p>The <a class="link" href="UDisksSpawnedJob.html" title="UDisksSpawnedJob"><span class="type">UDisksSpawnedJob</span></a> emitting the signal.</p></td> |
| 364 |
<td class="parameter_annotations"> </td> |
| 365 |
</tr> |
| 366 |
<tr> |
| 367 |
<td class="parameter_name"><p>error</p></td> |
| 368 |
<td class="parameter_description"><p><code class="literal">NULL</code> if running the whole command line succeeded, otherwise a <span class="type">GError</span> that is set.</p></td> |
| 369 |
<td class="parameter_annotations"> </td> |
| 370 |
</tr> |
| 371 |
<tr> |
| 372 |
<td class="parameter_name"><p>status</p></td> |
| 373 |
<td class="parameter_description"><p>The exit status of the command line that was run.</p></td> |
| 374 |
<td class="parameter_annotations"> </td> |
| 375 |
</tr> |
| 376 |
<tr> |
| 377 |
<td class="parameter_name"><p>standard_output</p></td> |
| 378 |
<td class="parameter_description"><p>Standard output from the command line that was run.</p></td> |
| 379 |
<td class="parameter_annotations"> </td> |
| 380 |
</tr> |
| 381 |
<tr> |
| 382 |
<td class="parameter_name"><p>standard_error</p></td> |
| 383 |
<td class="parameter_description"><p>Standard error output from the command line that was run.</p></td> |
| 384 |
<td class="parameter_annotations"> </td> |
| 385 |
</tr> |
| 386 |
<tr> |
| 387 |
<td class="parameter_name"><p>user_data</p></td> |
| 388 |
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td> |
| 389 |
<td class="parameter_annotations"> </td> |
| 390 |
</tr> |
| 391 |
</tbody> |
| 392 |
</table></div> |
| 393 |
</div> |
| 394 |
<div class="refsect3"> |
| 395 |
<a name="UDisksSpawnedJob-spawned-job-completed.returns"></a><h4>Returns</h4> |
| 396 |
<p> <code class="literal">TRUE</code> if the signal was handled, <code class="literal">FALSE</code> to let other |
| 397 |
handlers run.</p> |
| 398 |
</div> |
| 399 |
<p>Flags: Run Last</p> |
| 400 |
</div> |
| 401 |
</div> |
| 402 |
</div> |
| 403 |
<div class="footer"> |
| 404 |
<hr>Generated by GTK-Doc V1.35.1</div> |
| 405 |
</body> |
| 406 |
</html> |