org.freedesktop.Problems2.Task

`org.freedesktop.Problems2.Task`
Prev | Chapter 2. Interfaces |

## `org.freedesktop.Problems2.Task`

org.freedesktop.Problems2.Task — Represents an long running task

## Synopsis

### Methods

`Start (` | IN Dict<String,Variant> options`)`;

`Cancel (` | IN Int32 flags`)`;

`Finish (` | OUT Dict<String,Variant> results,
| OUT Int32 code`)`;

### Properties

##

`READ Dict<String,Variant> Details ;`
`READ Int32 Status ;`

## Methods

### `org.freedesktop.Problems2.Task.Start`

`Start (` | IN Dict<String,Variant> options`)`;

Request to start processing of the task. This method can be called only if the status property equals TASK_READY.

`options`

  For future needs

### `org.freedesktop.Problems2.Task.Cancel`

`Cancel (` | IN Int32 flags`)`;

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.

`flags`

  For future needs

### `org.freedesktop.Problems2.Task.Finish`

`Finish (` | OUT Dict<String,Variant> results,
| OUT Int32 code`)`;

Takes the results and dispose the task. The method can be called only if the status property equals TASK_DONE.

`results`

  The parameter for returning the results.

`code`

  Return code

  0

    Successfully finished

  non 0

    Processing failed - check status code of the task type.

## D-Bus Properties

Accessed using the org.freedesktop.DBus.Properties interface.

`READ Dict<String,Variant> Details ;`

Any details that the specific task provides.

`READ Int32 Status ;`

This property supports org.freedesktop.DBus.Properties.PropertiesChanged signal.

0

  TASK_NEW: processing can be started

1

  TASK_RUNNING: the task is being processed

2

  TASK_STOPPED: processing has been stopped - the task can define several stop points where the users can adjust the configuration

3

  TASK_CANCELED: processing has been canceled

4

  TASK_FAILED: processing has been failed

5

  TASK_DONE: processing has been finished

Prev | Up |
`org.freedesktop.Problems2.Session` | Home |