OSTree.AsyncProgress

g GObject.Object GObject.Object OSTree.AsyncProgress OSTree.AsyncProgress GObject.Object->OSTree.AsyncProgress

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

copy_state (dest)

finish ()

get_status ()

get_uint (key)

get_uint64 (key)

get_variant (key)

set_status (status)

set_uint (key, value)

set_uint64 (key, value)

set_variant (key, value)

Virtual Methods

Inherited:

GObject.Object (7)

do_changed (*user_data)

Properties

None

Signals

Inherited:

GObject.Object (1)

Name

Short Description

changed

Emitted when self has been changed.

Fields

Inherited:

GObject.Object (1)

Class Details

class OSTree.AsyncProgress(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

OSTree.AsyncProgressClass

classmethod new()
Returns:

A new progress object

Return type:

OSTree.AsyncProgress

copy_state(dest)
Parameters:

dest (OSTree.AsyncProgress) – An OSTree.AsyncProgress to copy to

Atomically copies all the state from self to dest, without invoking the callback. This is used for proxying progress objects across different GLib.MainContexts.

New in version 2019.6.

finish()

Process any pending signals, ensuring the main context is cleared of sources used by this object. Also ensures that no further events will be queued.

get_status()
Returns:

the current status, or None if none is set

Return type:

str or None

Get the human-readable status string from the OSTree.AsyncProgress. This operation is thread-safe. The retuned value may be None if no status is set.

This is a convenience function to get the well-known status key.

New in version 2017.6.

get_uint(key)
Parameters:

key (str) –

Return type:

int

get_uint64(key)
Parameters:

key (str) –

Return type:

int

get_variant(key)
Parameters:

key (str) – a key to look up

Returns:

value for the given key, or None if it was not set

Return type:

GLib.Variant or None

Look up a key in the OSTree.AsyncProgress and return the GLib.Variant associated with it. The lookup is thread-safe.

New in version 2017.6.

set_status(status)
Parameters:

status (str or None) – new status string, or None to clear the status

Set the human-readable status string for the OSTree.AsyncProgress. This operation is thread-safe. None may be passed to clear the status.

This is a convenience function to set the well-known status key.

New in version 2017.6.

set_uint(key, value)
Parameters:
  • key (str) –

  • value (int) –

set_uint64(key, value)
Parameters:
  • key (str) –

  • value (int) –

set_variant(key, value)
Parameters:
  • key (str) – a key to set

  • value (GLib.Variant) – the value to assign to key

Assign a new value to the given key, replacing any existing value. The operation is thread-safe. value may be a floating reference; GLib.Variant.ref_sink() will be called on it.

Any watchers of the OSTree.AsyncProgress will be notified of the change if value differs from the existing value for key.

New in version 2017.6.

do_changed(*user_data) virtual
Parameters:

user_data (object or None) –

Signal Details

OSTree.AsyncProgress.signals.changed(async_progress)
Signal Name:

changed

Flags:

RUN_LAST

Parameters:

async_progress (OSTree.AsyncProgress) – The object which received the signal

Emitted when self has been changed.