SnapdTask

SnapdTask — Task progress

Functions

Properties

gchar * id Read / Write / Construct Only
gchar * kind Read / Write / Construct Only
gint64 progress-done Read / Write / Construct Only
gchar * 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
gchar * status Read / Write / Construct Only
gchar * summary Read / Write / Construct Only

Types and Values

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”                       gchar *

ID of task.

Flags: Read / Write / Construct Only

Default value: NULL


The “kind” property

  “kind”                     gchar *

Kind of task.

Flags: Read / Write / Construct Only

Default value: NULL


The “progress-done” property

  “progress-done”            gint64

Number of items done in this task.

Flags: Read / Write / Construct Only

Allowed values: >= 0

Default value: 0


The “progress-label” property

  “progress-label”           gchar *

Label for progress.

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.

Flags: Read / Write / Construct Only

Allowed values: >= 0

Default value: 0


The “ready” property

  “ready”                    gboolean

TRUE when task complete.

Flags: Read / Write / Construct Only

Default value: FALSE


The “ready-time” property

  “ready-time”               GDateTime *

Time this task completed.

Flags: Read / Write / Construct Only


The “spawn-time” property

  “spawn-time”               GDateTime *

Time this task started.

Flags: Read / Write / Construct Only


The “status” property

  “status”                   gchar *

Status of task.

Flags: Read / Write / Construct Only

Default value: NULL


The “summary” property

  “summary”                  gchar *

Summary of task.

Flags: Read / Write / Construct Only

Default value: NULL