SnapdTask: snapd-glib Reference Manual

## SnapdTask SnapdTask — Task progress |

## Functions

const gchar * | snapd_task_get_id ()
const gchar * | snapd_task_get_kind ()
const gchar * | snapd_task_get_summary ()
const gchar * | snapd_task_get_status ()
gboolean | snapd_task_get_ready ()
const gchar * | snapd_task_get_progress_label ()
gint64 | snapd_task_get_progress_done ()
gint64 | snapd_task_get_progress_total ()
GDateTime * | snapd_task_get_spawn_time ()
GDateTime * | snapd_task_get_ready_time ()

## Properties

char * | id | Read / Write / Construct Only
char * | kind | Read / Write / Construct Only
gint64 | progress-done | Read / Write / Construct Only
char * | progress-label | Read / Write / Construct Only
gint64 | progress-total | Read / Write / Construct Only
gboolean | ready | Read / Write / Construct Only
GDateTime * | ready-time | Read / Write / Construct Only
GDateTime * | spawn-time | Read / Write / Construct Only
char * | status | Read / Write / Construct Only
char * | summary | Read / Write / Construct Only

## Types and Values

| SnapdTask

## Object Hierarchy

        GObject
        ╰── SnapdTask

## Includes

    #include <snapd-glib/snapd-glib.h>

## Description

A SnapdTask contains information on a task in a SnapdChange.

## Functions

### snapd_task_get_id ()

    const gchar *
    snapd_task_get_id (SnapdTask *task);

Get the unique ID for this task.

#### Parameters

task | a SnapdTask. |

#### Returns

an ID.

Since: 1.0

### snapd_task_get_kind ()

    const gchar *
    snapd_task_get_kind (SnapdTask *task);

Gets the kind of task this is.

#### Parameters

task | a SnapdTask. |

#### Returns

the kind of task.

Since: 1.0

### snapd_task_get_summary ()

    const gchar *
    snapd_task_get_summary (SnapdTask *task);

Get a human readable description of the task.

#### Parameters

task | a SnapdTask. |

#### Returns

a string describing the task.

Since: 1.0

### snapd_task_get_status ()

    const gchar *
    snapd_task_get_status (SnapdTask *task);

Get the status of the task.

#### Parameters

task | a SnapdTask. |

#### Returns

a status string.

Since: 1.0

### snapd_task_get_ready ()

    gboolean
    snapd_task_get_ready (SnapdTask *task);

`snapd_task_get_ready` has been deprecated since version 1.5 and should not be used in newly-written code.

Use `snapd_change_get_ready()` instead.

Get if this task is completed.

#### Parameters

task | a SnapdTask. |

#### Returns

`TRUE` if this task is complete.

Since: 1.0

### snapd_task_get_progress_label ()

    const gchar *
    snapd_task_get_progress_label (SnapdTask *task);

Get the the label associated with the progress.

#### Parameters

task | a SnapdTask. |

#### Returns

a label string.

Since: 1.5

### snapd_task_get_progress_done ()

    gint64
    snapd_task_get_progress_done (SnapdTask *task);

Get the the number of items completed in this task.

#### Parameters

task | a SnapdTask. |

#### Returns

a count.

Since: 1.0

### snapd_task_get_progress_total ()

    gint64
    snapd_task_get_progress_total (SnapdTask *task);

Get the the total number of items to be completed in this task.

#### Parameters

task | a SnapdTask. |

#### Returns

a count.

Since: 1.0

### snapd_task_get_spawn_time ()

    GDateTime *
    snapd_task_get_spawn_time (SnapdTask *task);

Get the time this task started.

#### Parameters

task | a SnapdTask. |

#### Returns

a GDateTime.

[transfer none]

Since: 1.0

### snapd_task_get_ready_time ()

    GDateTime *
    snapd_task_get_ready_time (SnapdTask *task);

Get the time this task completed or `NULL` if not yet completed.

#### Parameters

task | a SnapdTask. |

#### Returns

a GDateTime or `NULL`.

[transfer none][allow-none]

Since: 1.0

## Types and Values

### SnapdTask

    typedef struct _SnapdTask SnapdTask;

SnapdTask contains progress information for a task in a Snap transaction.

Since: 1.0

## Property Details

### The `“id”` property

      “id”                       char *

ID of task.

Owner: SnapdTask

Flags: Read / Write / Construct Only

Default value: NULL

### The `“kind”` property

      “kind”                     char *

Kind of task.

Owner: SnapdTask

Flags: Read / Write / Construct Only

Default value: NULL

### The `“progress-done”` property

      “progress-done”            gint64

Number of items done in this task.

Owner: SnapdTask

Flags: Read / Write / Construct Only

Allowed values: >= 0

Default value: 0

### The `“progress-label”` property

      “progress-label”           char *

Label for progress.

Owner: SnapdTask

Flags: Read / Write / Construct Only

Default value: NULL

### The `“progress-total”` property

      “progress-total”           gint64

Total number of items to be done in this task.

Owner: SnapdTask

Flags: Read / Write / Construct Only

Allowed values: >= 0

Default value: 0

### The `“ready”` property

      “ready”                    gboolean

TRUE when task complete.

Owner: SnapdTask

Flags: Read / Write / Construct Only

Default value: FALSE

### The `“ready-time”` property

      “ready-time”               GDateTime *

Time this task completed.

Owner: SnapdTask

Flags: Read / Write / Construct Only

### The `“spawn-time”` property

      “spawn-time”               GDateTime *

Time this task started.

Owner: SnapdTask

Flags: Read / Write / Construct Only

### The `“status”` property

      “status”                   char *

Status of task.

Owner: SnapdTask

Flags: Read / Write / Construct Only

Default value: NULL

### The `“summary”` property

      “summary”                  char *

Summary of task.

Owner: SnapdTask

Flags: Read / Write / Construct Only

Default value: NULL