PackageKitGlib.Progress

g GObject.Object GObject.Object PackageKitGlib.Progress PackageKitGlib.Progress GObject.Object->PackageKitGlib.Progress

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

get_allow_cancel ()

get_caller_active ()

get_download_size_remaining ()

get_elapsed_time ()

get_item_progress ()

get_package ()

get_package_id ()

get_percentage ()

get_remaining_time ()

get_role ()

get_sender ()

get_speed ()

get_status ()

get_transaction_flags ()

get_transaction_id ()

get_uid ()

set_allow_cancel (allow_cancel)

set_caller_active (caller_active)

set_download_size_remaining (download_size_remaining)

set_elapsed_time (elapsed_time)

set_item_progress (item_progress)

set_package (package)

set_package_id (package_id)

set_percentage (percentage)

set_remaining_time (remaining_time)

set_role (role)

set_sender (bus_name)

set_speed (speed)

set_status (status)

set_transaction_flags (transaction_flags)

set_transaction_id (transaction_id)

set_uid (uid)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

allow-cancel

bool

r/w

caller-active

bool

r/w

download-size-remaining

int

r/w

elapsed-time

int

r/w

item-progress

PackageKitGlib.ItemProgress

r/w

package

PackageKitGlib.Package

r/w

package-id

str

r/w

The full package_id, e.g. ‘gnome-power-manager;0.1.2;i386;fedora’

percentage

int

r/w

remaining-time

int

r/w

role

int

r/w

sender

str

r/w

speed

int

r/w

status

int

r/w

transaction-flags

int

r/w

transaction-id

str

r/w

The transaction_id, e.g. ‘/892_deabbbdb_data’

uid

int

r/w

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

priv

PackageKitGlib.ProgressPrivate

r

Class Details

class PackageKitGlib.Progress(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

PackageKitGlib.ProgressClass

classmethod new()
Returns:

A new PackageKitGlib.Progress instance

Return type:

PackageKitGlib.Progress

PackageKitGlib.Progress is a nice GObject.Object wrapper for PackageKit and makes writing frontends easy.

New in version 0.5.2.

get_allow_cancel()
Returns:

True if progress can be cancelled.

Return type:

bool

Get if this transaction can be cancelled.

New in version 1.0.12.

get_caller_active()
Returns:

True if the transaction caller is still connected.

Return type:

bool

Get if the transaction caller is connected.

New in version 1.0.12.

get_download_size_remaining()
Returns:

number of bytes remaining to download.

Return type:

int

Get the number of bytes remaining to download.

New in version 1.0.12.

get_elapsed_time()
Returns:

time in seconds

Return type:

int

Get the amount of time the transaction has taken.

New in version 1.0.12.

get_item_progress()
Returns:

a PackageKitGlib.ItemProgress

Return type:

PackageKitGlib.ItemProgress

Get the item progress associated with this transaction.

New in version 1.0.12.

get_package()
Returns:

a PackageKitGlib.Package

Return type:

PackageKitGlib.Package

Get the package this transaction is acting on.

New in version 1.0.12.

get_package_id()
Returns:

a PackageID

Return type:

str

Get the package ID this transaction is acting on.

New in version 1.0.12.

get_percentage()
Returns:

a percentage (0-100)

Return type:

int

Get the percentage complete.

New in version 1.0.12.

get_remaining_time()
Returns:

time in seconds or 0 if unknown.

Return type:

int

Get the amount of time the transaction will take to complete.

New in version 1.0.12.

get_role()
Returns:

a PackageKitGlib.RoleEnum

Return type:

PackageKitGlib.RoleEnum

Get the role of this transaction.

New in version 1.0.12.

get_sender()
Returns:

a D-Bus name

Return type:

str

Get the D-Bus name of the client that started this transaction.

New in version 1.2.6.

get_speed()
Returns:

speed in bits per scond or 0 if unknown

Return type:

int

Get the speed of this transaction.

New in version 1.0.12.

get_status()
Returns:

a status string

Return type:

PackageKitGlib.StatusEnum

Get the status of this transaction.

New in version 1.0.12.

get_transaction_flags()
Returns:

a #PkBitfield containing PackageKitGlib.TransactionFlagEnum values.

Return type:

int

Get the flags associated with this transaction.

New in version 1.0.12.

get_transaction_id()
Returns:

a transaction ID.

Return type:

str

Get the ID used by this transaction.

New in version 1.0.12.

get_uid()
Returns:

an UID

Return type:

int

Get the UID that started this transaction.

New in version 1.0.12.

set_allow_cancel(allow_cancel)
Parameters:

allow_cancel (bool) – True if this transaction can be cancelled.

Returns:

True if value changed.

Return type:

bool

Set if this transaction can be cancelled.

New in version 0.5.2.

set_caller_active(caller_active)
Parameters:

caller_active (bool) – True if the transaction caller is still connected.

Returns:

True if value changed.

Return type:

bool

Set if the transaction caller is connected.

New in version 0.5.2.

set_download_size_remaining(download_size_remaining)
Parameters:

download_size_remaining (int) – number of bytes remaining to download.

Returns:

True if value changed.

Return type:

bool

Set the number of bytes remaining to download.

New in version 0.8.0.

set_elapsed_time(elapsed_time)
Parameters:

elapsed_time (int) – time in seconds

Returns:

True if value changed.

Return type:

bool

Set the amount of time the transaction has taken.

New in version 0.5.2.

set_item_progress(item_progress)
Parameters:

item_progress (PackageKitGlib.ItemProgress) – a PackageKitGlib.ItemProgress

Returns:

True if value changed.

Return type:

bool

Set the item progress associated with this transaction.

New in version 0.8.1.

set_package(package)
Parameters:

package (PackageKitGlib.Package) – a PackageKitGlib.Package

Returns:

True if value changed.

Return type:

bool

Set the package this transaction is acting on.

New in version 0.5.2.

set_package_id(package_id)
Parameters:

package_id (str) – a PackageID

Returns:

True if value changed.

Return type:

bool

Set the package ID this transaction is acting on.

New in version 0.5.2.

set_percentage(percentage)
Parameters:

percentage (int) – a percentage value (0-100)

Returns:

True if value changed.

Return type:

bool

Set the percentage complete of this transaction.

New in version 0.5.2.

set_remaining_time(remaining_time)
Parameters:

remaining_time (int) – time in seconds or 0 if unknown.

Returns:

True if value changed.

Return type:

bool

Set the amount of time the transaction will take to complete.

New in version 0.5.2.

set_role(role)
Parameters:

role (PackageKitGlib.RoleEnum) – a PackageKitGlib.RoleEnum

Returns:

True if value changed.

Return type:

bool

Set the role of this transaction.

New in version 0.5.2.

set_sender(bus_name)
Parameters:

bus_name (str) – a D-Bus name

Returns:

True if value changed.

Return type:

bool

Set the D-Bus name of the client that started this transaction.

New in version 1.2.6.

set_speed(speed)
Parameters:

speed (int) – speed in bits per second or 0 if unknown

Returns:

True if value changed.

Return type:

bool

Set the speed of this transaction.

New in version 0.5.2.

set_status(status)
Parameters:

status (PackageKitGlib.StatusEnum) – a PackageKitGlib.StatusEnum

Returns:

True if value changed.

Return type:

bool

Set the status of this transaction.

New in version 0.5.2.

set_transaction_flags(transaction_flags)
Parameters:

transaction_flags (int) – a #PkBitfield containing PackageKitGlib.TransactionFlagEnum values.

Returns:

True if value changed.

Return type:

bool

Set the flags associated with this transaction.

New in version 0.8.8.

set_transaction_id(transaction_id)
Parameters:

transaction_id (str) – a transaction ID.

Returns:

True if value changed.

Return type:

bool

Set the ID used by this transaction.

New in version 0.5.3.

set_uid(uid)
Parameters:

uid (int) – a UID

Returns:

True if value changed.

Return type:

bool

Set the UID that started this transaction.

New in version 0.5.2.

Property Details

PackageKitGlib.Progress.props.allow_cancel
Name:

allow-cancel

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

True if this transaction can be cancelled.

New in version 0.5.2.

PackageKitGlib.Progress.props.caller_active
Name:

caller-active

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

True if the transaction caller is still connected.

New in version 0.5.2.

PackageKitGlib.Progress.props.download_size_remaining
Name:

download-size-remaining

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

Number of bytes remaining to download.

New in version 0.8.0.

PackageKitGlib.Progress.props.elapsed_time
Name:

elapsed-time

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

Amount of time the transaction has taken in seconds.

New in version 0.5.2.

PackageKitGlib.Progress.props.item_progress
Name:

item-progress

Type:

PackageKitGlib.ItemProgress

Default Value:

None

Flags:

READABLE, WRITABLE

Item progress associated with this transaction.

New in version 0.8.1.

PackageKitGlib.Progress.props.package
Name:

package

Type:

PackageKitGlib.Package

Default Value:

None

Flags:

READABLE, WRITABLE

The package this transaction is acting on.

New in version 0.5.3.

PackageKitGlib.Progress.props.package_id
Name:

package-id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

Package ID this transaction is acting on.

New in version 0.5.2.

PackageKitGlib.Progress.props.percentage
Name:

percentage

Type:

int

Default Value:

-1

Flags:

READABLE, WRITABLE

Percentage complete of this transaction.

New in version 0.5.2.

PackageKitGlib.Progress.props.remaining_time
Name:

remaining-time

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

Amount of time the transaction will take to complete in seconds or 0 if unknown.

New in version 0.5.2.

PackageKitGlib.Progress.props.role
Name:

role

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

Role of this transaction.

New in version 0.5.2.

PackageKitGlib.Progress.props.sender
Name:

sender

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The D-Bus name of the client that started this transaction.

New in version 1.2.6.

PackageKitGlib.Progress.props.speed
Name:

speed

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

Transaction speed in bits per second or 0 if unknown.

New in version 0.5.2.

PackageKitGlib.Progress.props.status
Name:

status

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

Status of this transaction.

New in version 0.5.2.

PackageKitGlib.Progress.props.transaction_flags
Name:

transaction-flags

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

A #PkBitfield containing PackageKitGlib.TransactionFlagEnum associated with this transaction.

New in version 0.8.8.

PackageKitGlib.Progress.props.transaction_id
Name:

transaction-id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

ID used by this transaction.

New in version 0.5.2.

PackageKitGlib.Progress.props.uid
Name:

uid

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The UID that started this transaction.

New in version 0.5.2.