Blob Blame History Raw
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>org.freedesktop.Problems2.Task</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"><link rel="home" href="index.html" title="Problems API"><link rel="up" href="ch02.html" title="Chapter 2. Interfaces"><link rel="prev" href="re03.html" title="org.freedesktop.Problems2.Session"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">
          <code class="literal">org.freedesktop.Problems2.Task</code>
        </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re03.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Interfaces</th><td width="20%" align="right"> </td></tr></table><hr></div><div class="refentry"><a name="org.freedesktop.Problems2.Task"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">
          <code class="literal">org.freedesktop.Problems2.Task</code>
        </span></h2><p>org.freedesktop.Problems2.Task — Represents an long running task</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="refsect2"><a name="methods"></a><h3>Methods</h3><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">
                <b class="fsfunc">Start</b>
              (</code></td><td>IN Dict&lt;String,Variant&gt; <var class="pdparam">options</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">
                <b class="fsfunc">Cancel</b>
              (</code></td><td>IN Int32 <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">
                <b class="fsfunc">Finish</b>
              (</code></td><td>OUT Dict&lt;String,Variant&gt; <var class="pdparam">results</var>, </td></tr><tr><td> </td><td>OUT Int32 <var class="pdparam">code</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect2"><a name="properties"></a><h3>Properties</h3><div class="refsynopsisdiv"><h2></h2><code class="fieldsynopsis"><span class="modifier">READ </span><span class="type">Dict&lt;String,Variant&gt; </span><span class="varname">Details </span>;</code><br><code class="fieldsynopsis"><span class="modifier">READ </span><span class="type">Int32 </span><span class="varname">Status </span>;</code></div></div></div><div class="refsection"><a name="methods"></a><h2>Methods</h2><div class="refsection"><a name="org.freedesktop.Problems2.Task.Start"></a><h3>
            <code class="literal">org.freedesktop.Problems2.Task.Start</code>
          </h3><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">
                <b class="fsfunc">Start</b>
              (</code></td><td>IN Dict&lt;String,Variant&gt; <var class="pdparam">options</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div><p>Request to start processing of the task. This method can be called only if the status property equals TASK_READY.</p><div class="glosslist"><dl><dt><span class="glossterm">
                <code class="literal">options</code>
              </span></dt><dd class="glossdef"><p>For future needs</p></dd></dl></div></div><div class="refsection"><a name="org.freedesktop.Problems2.Task.Cancel"></a><h3>
            <code class="literal">org.freedesktop.Problems2.Task.Cancel</code>
          </h3><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">
                <b class="fsfunc">Cancel</b>
              (</code></td><td>IN Int32 <var class="pdparam">flags</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div><p>Request to cancel processing of the task. The task will be disposed after that. This method can be called only if the status property equals TASK_PROCESSING.</p><div class="glosslist"><dl><dt><span class="glossterm">
                <code class="literal">flags</code>
              </span></dt><dd class="glossdef"><p>For future needs</p></dd></dl></div></div><div class="refsection"><a name="org.freedesktop.Problems2.Task.Finish"></a><h3>
            <code class="literal">org.freedesktop.Problems2.Task.Finish</code>
          </h3><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">
                <b class="fsfunc">Finish</b>
              (</code></td><td>OUT Dict&lt;String,Variant&gt; <var class="pdparam">results</var>, </td></tr><tr><td> </td><td>OUT Int32 <var class="pdparam">code</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div><p>Takes the results and dispose the task. The method can be called only if the status property equals TASK_DONE.</p><div class="glosslist"><dl><dt><span class="glossterm">
                <code class="literal">results</code>
              </span></dt><dd class="glossdef"><p>The parameter for returning the results.</p></dd><dt><span class="glossterm">
                <code class="literal">code</code>
              </span></dt><dd class="glossdef"><p>Return code
                        </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">0</span></dt><dd><p>Successfully finished</p></dd><dt><span class="term">non 0</span></dt><dd><p>Processing failed - check status code of the task type.</p></dd></dl></div><p>
                    </p></dd></dl></div></div></div><div class="refsection"><a name="dbus_properties"></a><h2>D-Bus Properties</h2><p>
            Accessed using the org.freedesktop.DBus.Properties interface.
          </p><code class="fieldsynopsis"><span class="modifier">READ </span><span class="type">Dict&lt;String,Variant&gt; </span><span class="varname">Details </span>;</code><br><p>Any details that the specific task provides.</p><code class="fieldsynopsis"><span class="modifier">READ </span><span class="type">Int32 </span><span class="varname">Status </span>;</code><p>This property supports org.freedesktop.DBus.Properties.PropertiesChanged signal.
                        </p><div class="variablelist"><dl class="variablelist"><dt><span class="term">0</span></dt><dd><p>TASK_NEW: processing can be started</p></dd><dt><span class="term">1</span></dt><dd><p>TASK_RUNNING: the task is being processed</p></dd><dt><span class="term">2</span></dt><dd><p>TASK_STOPPED: processing has been stopped - the task can define several stop points where the users can adjust the configuration</p></dd><dt><span class="term">3</span></dt><dd><p>TASK_CANCELED: processing has been canceled</p></dd><dt><span class="term">4</span></dt><dd><p>TASK_FAILED: processing has been failed</p></dd><dt><span class="term">5</span></dt><dd><p>TASK_DONE: processing has been finished</p></dd></dl></div><p>
                </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re03.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">
          <code class="literal">org.freedesktop.Problems2.Session</code>
         </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>