PackageKitGlib.Control

g GObject.Object GObject.Object PackageKitGlib.Control PackageKitGlib.Control GObject.Object->PackageKitGlib.Control

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

can_authorize_async (action_id, cancellable, callback, *user_data)

can_authorize_finish (res)

get_daemon_state_async (cancellable, callback, *user_data)

get_daemon_state_finish (res)

get_properties (cancellable)

get_properties_async (cancellable, callback, *user_data)

get_properties_finish (res)

get_tid_async (cancellable, callback, *user_data)

get_tid_finish (res)

get_time_since_action_async (role, cancellable, callback, *user_data)

get_time_since_action_finish (res)

get_transaction_list (cancellable)

get_transaction_list_async (cancellable, callback, *user_data)

get_transaction_list_finish (res)

set_proxy (proxy_http, proxy_ftp, cancellable)

set_proxy2 (proxy_http, proxy_https, proxy_ftp, proxy_socks, no_proxy, pac, cancellable)

set_proxy2_async (proxy_http, proxy_https, proxy_ftp, proxy_socks, no_proxy, pac, cancellable, callback, *user_data)

set_proxy_async (proxy_http, proxy_ftp, cancellable, callback, *user_data)

set_proxy_finish (res)

suggest_daemon_quit (cancellable)

suggest_daemon_quit_async (cancellable, callback, *user_data)

suggest_daemon_quit_finish (res)

Virtual Methods

Inherited:

GObject.Object (7)

do_connection_changed (connected)

do_locked (is_locked)

do_network_state_changed ()

do_repo_list_changed ()

do_restart_schedule ()

do_transaction_list_changed (transaction_ids)

do_updates_changed ()

Properties

Name

Type

Flags

Short Description

backend-author

str

r/w

backend-description

str

r/w

backend-name

str

r/w

connected

bool

r/w

distro-id

str

r/w

filters

int

r/w

groups

int

r/w

locked

bool

r/w

mime-types

[str]

r/w

network-state

PackageKitGlib.NetworkEnum

r/w

provides

int

r/w

roles

int

r/w

version-major

int

r

version-micro

int

r

version-minor

int

r

Signals

Inherited:

GObject.Object (1)

Name

Short Description

repo-list-changed

The ::repo-list-changed signal is emitted when the repo list may have changed and the control program may have to update some UI.

restart-schedule

The ::restart_schedule signal is emitted when the packagekitd service has been restarted because it has been upgraded.

transaction-list-changed

The ::transaction-list-changed signal is emitted when the list of transactions handled by the daemon is changed.

updates-changed

The ::updates-changed signal is emitted when the update list may have changed and the control program may have to update some UI.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

priv

PackageKitGlib.ControlPrivate

r

Class Details

class PackageKitGlib.Control(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

PackageKitGlib.ControlClass

classmethod new()
Returns:

a new PackageKitGlib.Control object.

Return type:

PackageKitGlib.Control

New in version 0.5.2.

can_authorize_async(action_id, cancellable, callback, *user_data)
Parameters:

We may want to know before we run a method if we are going to be denied, accepted or challenged for authentication.

New in version 0.5.2.

can_authorize_finish(res)
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

the PackageKitGlib.AuthorizeEnum or PackageKitGlib.AuthorizeEnum.UNKNOWN if the method failed

Return type:

PackageKitGlib.AuthorizeEnum

Gets the result from the asynchronous function.

New in version 0.5.2.

get_daemon_state_async(cancellable, callback, *user_data)
Parameters:

Gets the debugging state from the daemon.

New in version 0.5.2.

get_daemon_state_finish(res)
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

the ID, or None if unset, free with GLib.free()

Return type:

str

Gets the result from the asynchronous function.

New in version 0.5.2.

get_properties(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – a Gio.Cancellable or None

Raises:

GLib.Error

Returns:

True if the properties were set correctly

Return type:

bool

Gets the properties the daemon supports. Warning: this function is synchronous, and may block. Do not use it in GUI applications.

New in version 0.5.3.

get_properties_async(cancellable, callback, *user_data)
Parameters:

Gets global properties from the daemon.

New in version 0.5.2.

get_properties_finish(res)
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if we set the proxy successfully

Return type:

bool

Gets the result from the asynchronous function.

New in version 0.5.2.

get_tid_async(cancellable, callback, *user_data)
Parameters:

Gets a transacton ID from the daemon.

New in version 0.5.2.

get_tid_finish(res)
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

the ID, or None if unset, free with GLib.free()

Return type:

str

Gets the result from the asynchronous function.

New in version 0.5.2.

get_time_since_action_async(role, cancellable, callback, *user_data)
Parameters:

We may want to know how long it has been since we refreshed the cache or retrieved the update list.

New in version 0.5.2.

get_time_since_action_finish(res)
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if the daemon serviced the request

Return type:

int

Gets the result from the asynchronous function.

New in version 0.5.2.

get_transaction_list(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – a Gio.Cancellable or None

Raises:

GLib.Error

Returns:

The list of transaction id’s, or None, free with GLib.strfreev()

Return type:

[str]

Gets the transaction list in progress. Warning: this function is synchronous, and may block. Do not use it in GUI applications.

New in version 0.5.3.

get_transaction_list_async(cancellable, callback, *user_data)
Parameters:

Gets the transactions currently running in the daemon.

New in version 0.5.2.

get_transaction_list_finish(res)
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

A GStrv list of transaction ID’s, free with GLib.strfreev()

Return type:

[str]

Gets the result from the asynchronous function.

New in version 0.5.2.

set_proxy(proxy_http, proxy_ftp, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if the proxy was set correctly

NOTE: This is just provided for backwards compatibility. Clients should really be using PackageKitGlib.Control.set_proxy2().

Return type:

bool

Sets the network proxy to use in the daemon. Warning: this function is synchronous, and may block. Do not use it in GUI applications.

New in version 0.6.3.

set_proxy2(proxy_http, proxy_https, proxy_ftp, proxy_socks, no_proxy, pac, cancellable)
Parameters:
  • proxy_http (str) – the HTTP proxy server

  • proxy_https (str) – the HTTPS proxy server

  • proxy_ftp (str) – the FTP proxy server

  • proxy_socks (str) – the SOCKS proxy server

  • no_proxy (str) – the list of download IPs that shouldn’t go through the proxy

  • pac (str) – the PAC string

  • cancellable (Gio.Cancellable or None) – a Gio.Cancellable or None

Raises:

GLib.Error

Returns:

True if the proxy was set correctly

Return type:

bool

Sets the network proxy to use in the daemon. Warning: this function is synchronous, and may block. Do not use it in GUI applications.

New in version 0.6.13.

set_proxy2_async(proxy_http, proxy_https, proxy_ftp, proxy_socks, no_proxy, pac, cancellable, callback, *user_data)
Parameters:
  • proxy_http (str) – a HTTP proxy string such as “username:password`server`.lan:8080”, or None

  • proxy_https (str) – a HTTPS proxy string such as “username:password`server`.lan:8080”, or None

  • proxy_ftp (str) – a FTP proxy string such as “server.lan:8080”, or None

  • proxy_socks (str) – a SOCKS proxy string such as “server.lan:8080”, or None

  • no_proxy (str) – a list of download IPs that shouldn’t go through the proxy, or None

  • pac (str) – a PAC string, or None

  • cancellable (Gio.Cancellable or None) – a Gio.Cancellable or None

  • callback (Gio.AsyncReadyCallback or None) – the function to run on completion

  • user_data (object or None) – the data to pass to callback

Set a proxy on the PK daemon

New in version 0.6.13.

set_proxy_async(proxy_http, proxy_ftp, cancellable, callback, *user_data)
Parameters:

Set a proxy on the PK daemon

NOTE: This is just provided for backwards compatibility. Clients should really be using PackageKitGlib.Control.set_proxy2_async().

New in version 0.5.2.

set_proxy_finish(res)
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if we set the proxy successfully

Return type:

bool

Gets the result from the asynchronous function.

New in version 0.5.2.

suggest_daemon_quit(cancellable)
Parameters:

cancellable (Gio.Cancellable or None) – a Gio.Cancellable or None

Raises:

GLib.Error

Returns:

True if the suggestion was sent

Return type:

bool

Suggests to the daemon that it should quit as soon as possible. Warning: this function is synchronous, and may block. Do not use it in GUI applications.

New in version 0.6.2.

suggest_daemon_quit_async(cancellable, callback, *user_data)
Parameters:

Suggests to the daemon that it should quit as soon as possible.

New in version 0.6.2.

suggest_daemon_quit_finish(res)
Parameters:

res (Gio.AsyncResult) – the Gio.AsyncResult

Raises:

GLib.Error

Returns:

True if the suggestion was sent

Return type:

bool

Gets the result from the asynchronous function.

New in version 0.6.2.

do_connection_changed(connected) virtual
Parameters:

connected (bool) –

do_locked(is_locked) virtual
Parameters:

is_locked (bool) –

do_network_state_changed() virtual
do_repo_list_changed() virtual
do_restart_schedule() virtual
do_transaction_list_changed(transaction_ids) virtual
Parameters:

transaction_ids (str) –

do_updates_changed() virtual

Signal Details

PackageKitGlib.Control.signals.repo_list_changed(control)
Signal Name:

repo-list-changed

Flags:

RUN_LAST

Parameters:

control (PackageKitGlib.Control) – The object which received the signal

The ::repo-list-changed signal is emitted when the repo list may have changed and the control program may have to update some UI.

PackageKitGlib.Control.signals.restart_schedule(control)
Signal Name:

restart-schedule

Flags:

RUN_LAST

Parameters:

control (PackageKitGlib.Control) – The object which received the signal

The ::restart_schedule signal is emitted when the packagekitd service has been restarted because it has been upgraded. Client programs should reload themselves when it is convenient to do so, as old client tools may not be compatable with the new daemon.

PackageKitGlib.Control.signals.transaction_list_changed(control, transaction_ids)
Signal Name:

transaction-list-changed

Flags:

RUN_LAST

Parameters:
  • control (PackageKitGlib.Control) – The object which received the signal

  • transaction_ids ([str]) – an #GStrv array of transaction ID’s

The ::transaction-list-changed signal is emitted when the list of transactions handled by the daemon is changed.

PackageKitGlib.Control.signals.updates_changed(control)
Signal Name:

updates-changed

Flags:

RUN_LAST

Parameters:

control (PackageKitGlib.Control) – The object which received the signal

The ::updates-changed signal is emitted when the update list may have changed and the control program may have to update some UI.

Property Details

PackageKitGlib.Control.props.backend_author
Name:

backend-author

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

New in version 0.5.2.

PackageKitGlib.Control.props.backend_description
Name:

backend-description

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

New in version 0.5.2.

PackageKitGlib.Control.props.backend_name
Name:

backend-name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

New in version 0.5.2.

PackageKitGlib.Control.props.connected
Name:

connected

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

New in version 0.5.3.

PackageKitGlib.Control.props.distro_id
Name:

distro-id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

New in version 0.5.5.

PackageKitGlib.Control.props.filters
Name:

filters

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

New in version 0.5.2.

PackageKitGlib.Control.props.groups
Name:

groups

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

New in version 0.5.2.

PackageKitGlib.Control.props.locked
Name:

locked

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

New in version 0.5.3.

PackageKitGlib.Control.props.mime_types
Name:

mime-types

Type:

[str]

Default Value:

[]

Flags:

READABLE, WRITABLE

New in version 0.8.1.

PackageKitGlib.Control.props.network_state
Name:

network-state

Type:

PackageKitGlib.NetworkEnum

Default Value:

PackageKitGlib.NetworkEnum.LAST

Flags:

READABLE, WRITABLE

New in version 0.5.3.

PackageKitGlib.Control.props.provides
Name:

provides

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

New in version 0.8.8.

PackageKitGlib.Control.props.roles
Name:

roles

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

New in version 0.5.2.

PackageKitGlib.Control.props.version_major
Name:

version-major

Type:

int

Default Value:

0

Flags:

READABLE

New in version 0.5.2.

PackageKitGlib.Control.props.version_micro
Name:

version-micro

Type:

int

Default Value:

0

Flags:

READABLE

New in version 0.5.2.

PackageKitGlib.Control.props.version_minor
Name:

version-minor

Type:

int

Default Value:

0

Flags:

READABLE

New in version 0.5.2.