Functions

  authorize_type_enum_from_string (authorize_type)
  authorize_type_enum_to_string (authorize_type)
  client_error_quark ()
  control_error_quark ()
  debug_add_log_domain (log_domain)
  debug_is_verbose ()
  debug_set_verbose (verbose)
  distro_upgrade_enum_from_string (upgrade)
  distro_upgrade_enum_to_string (upgrade)
  enum_find_string (table, value)
  enum_find_value (table, string)
  error_enum_from_string (code)
  error_enum_to_string (code)
  exit_enum_from_string (exit)
  exit_enum_to_string (exit)
  filter_bitfield_from_string (filters)
  filter_bitfield_to_string (filters)
  filter_enum_from_string (filter)
  filter_enum_to_string (filter)
  get_distro_id ()
  group_bitfield_from_string (groups)
  group_bitfield_to_string (groups)
  group_enum_from_string (group)
  group_enum_to_string (group)
  info_enum_from_string (info)
  info_enum_to_localised_past (info)
  info_enum_to_localised_present (info)
  info_enum_to_string (info)
  iso8601_from_date (date)
  iso8601_present ()
  media_type_enum_from_string (media_type)
  media_type_enum_to_string (media_type)
  network_enum_from_string (network)
  network_enum_to_string (network)
  offline_action_from_string (action)
  offline_action_to_string (action)
  offline_auth_cancel ()
  offline_auth_clear_results ()
  offline_auth_invalidate ()
  offline_auth_set_action (action)
  offline_auth_set_prepared_ids (package_ids)
  offline_auth_set_prepared_upgrade (name, release_ver)
  offline_auth_set_results (results)
  offline_auth_trigger (action)
  offline_auth_trigger_upgrade (action)
  offline_cancel (cancellable)
  offline_clear_results (cancellable)
  offline_error_quark ()
  offline_get_action ()
  offline_get_action_monitor (cancellable)
  offline_get_prepared_ids ()
  offline_get_prepared_monitor (cancellable)
  offline_get_prepared_sack ()
  offline_get_prepared_upgrade (name, release_ver)
  offline_get_prepared_upgrade_monitor (cancellable)
  offline_get_prepared_upgrade_name ()
  offline_get_prepared_upgrade_version ()
  offline_get_results ()
  offline_get_results_mtime ()
  offline_trigger (action, cancellable)
  offline_trigger_upgrade (action, cancellable)
  polkit_agent_close ()
  polkit_agent_open ()
  ptr_array_to_strv (array)
  restart_enum_from_string (restart)
  restart_enum_to_string (restart)
  role_bitfield_from_string (roles)
  role_bitfield_to_string (roles)
  role_enum_from_string (role)
  role_enum_to_localised_present (role)
  role_enum_to_string (role)
  sig_type_enum_from_string (sig_type)
  sig_type_enum_to_string (sig_type)
  status_enum_from_string (status)
  status_enum_to_localised_text (status)
  status_enum_to_string (status)
  transaction_flag_bitfield_from_string (transaction_flags)
  transaction_flag_bitfield_to_string (transaction_flags)
  transaction_flag_enum_from_string (transaction_flag)
  transaction_flag_enum_to_string (transaction_flag)
  update_state_enum_from_string (update_state)
  update_state_enum_to_string (update_state)
  upgrade_kind_enum_from_string (upgrade_kind)
  upgrade_kind_enum_to_string (upgrade_kind)

Details

PackageKitGlib.authorize_type_enum_from_string(authorize_type)
Parameters:authorize_type (str) – Text describing the enumerated type
Returns:the enumerated constant value, e.g. PackageKitGlib.AuthorizeEnum.YES
Return type:PackageKitGlib.AuthorizeEnum

Converts a text enumerated type to its unsigned integer representation

New in version 0.5.0.

PackageKitGlib.authorize_type_enum_to_string(authorize_type)
Parameters:authorize_type (PackageKitGlib.AuthorizeEnum) – The enumerated type value
Returns:the enumerated constant value, e.g. “yes”
Return type:str

Converts a enumerated type to its text representation

New in version 0.5.0.

PackageKitGlib.client_error_quark()
Returns:an error quark.
Return type:int

An error quark for PackageKitGlib.ClientError.

New in version 0.5.2.

PackageKitGlib.control_error_quark()
Returns:Our personal error quark.
Return type:int

We are a GObject.Object that sets errors

New in version 0.5.2.

PackageKitGlib.debug_add_log_domain(log_domain)
Parameters:log_domain (str) – a log domain

Add a log domain to the debug output.

PackageKitGlib.debug_is_verbose()
Returns:True if we have debugging enabled
Return type:bool

Check if verbose debugging is enabled.

PackageKitGlib.debug_set_verbose(verbose)
Parameters:verbose (bool) – True if verbose debugging should be enabled.

Set if verbose debugging is enabled.

PackageKitGlib.distro_upgrade_enum_from_string(upgrade)
Parameters:upgrade (str) – Text describing the enumerated type
Returns:the enumerated constant value, e.g. PackageKitGlib.DistroUpgradeEnum.STABLE
Return type:PackageKitGlib.DistroUpgradeEnum

Converts a text enumerated type to its unsigned integer representation

New in version 0.5.0.

PackageKitGlib.distro_upgrade_enum_to_string(upgrade)
Parameters:upgrade (PackageKitGlib.DistroUpgradeEnum) – The enumerated type value
Returns:the enumerated constant value, e.g. “stable”
Return type:str

Converts a enumerated type to its text representation

New in version 0.5.0.

PackageKitGlib.enum_find_string(table, value)
Parameters:
Returns:

the string constant, e.g. “desktop-gnome”

Return type:

str

Search for a enum value in a table of constants.

PackageKitGlib.enum_find_value(table, string)
Parameters:
Returns:

the enumerated constant value, e.g. PackageKitGlib.SigTypeEnum.GPG

Return type:

int

Search for a string value in a table of constants.

PackageKitGlib.error_enum_from_string(code)
Parameters:code (str) – Text describing the enumerated type
Returns:the enumerated constant value, e.g. PackageKitGlib.SigTypeEnum.GPG
Return type:PackageKitGlib.ErrorEnum

Converts a text enumerated type to its unsigned integer representation

New in version 0.5.0.

PackageKitGlib.error_enum_to_string(code)
Parameters:code (PackageKitGlib.ErrorEnum) – The enumerated type value
Returns:the enumerated constant value, e.g. “available”
Return type:str

Converts a enumerated type to its text representation

New in version 0.5.0.

PackageKitGlib.exit_enum_from_string(exit)
Parameters:exit (str) – Text describing the enumerated type
Returns:the enumerated constant value, e.g. PackageKitGlib.SigTypeEnum.GPG
Return type:PackageKitGlib.ExitEnum

Converts a text enumerated type to its unsigned integer representation

New in version 0.5.0.

PackageKitGlib.exit_enum_to_string(exit)
Parameters:exit (PackageKitGlib.ExitEnum) – The enumerated type value
Returns:the enumerated constant value, e.g. “available”
Return type:str

Converts a enumerated type to its text representation

New in version 0.5.0.

PackageKitGlib.filter_bitfield_from_string(filters)
Parameters:filters (str) – the enumerated constant value, e.g. “available;~gui”
Returns:The enumerated type values
Return type:int

Converts text representation to its enumerated type bitfield, or 0 for invalid

New in version 0.5.2.

PackageKitGlib.filter_bitfield_to_string(filters)
Parameters:filters (int) – The enumerated type values
Returns:the enumerated constant value, e.g. “available;~gui”
Return type:str

Converts a enumerated type bitfield to its text representation

New in version 0.5.2.

PackageKitGlib.filter_enum_from_string(filter)
Parameters:filter (str) – Text describing the enumerated type
Returns:the enumerated constant value, e.g. PackageKitGlib.SigTypeEnum.GPG
Return type:PackageKitGlib.FilterEnum

Converts a text enumerated type to its unsigned integer representation

New in version 0.5.0.

PackageKitGlib.filter_enum_to_string(filter)
Parameters:filter (PackageKitGlib.FilterEnum) – The enumerated type value
Returns:the enumerated constant value, e.g. “available”
Return type:str

Converts a enumerated type to its text representation

New in version 0.5.0.

PackageKitGlib.get_distro_id()
Returns:a distribution ID
Return type:str

Get the distribution ID for the current host, typically “distro;version;arch”

PackageKitGlib.group_bitfield_from_string(groups)
Parameters:groups (str) – the enumerated constant value, e.g. “available;~gui”
Returns:The enumerated type values, or 0 for invalid
Return type:int

Converts text representation to its enumerated type bitfield

New in version 0.5.2.

PackageKitGlib.group_bitfield_to_string(groups)
Parameters:groups (int) – The enumerated type values
Returns:the enumerated constant value, e.g. “gnome;kde”
Return type:str

Converts a enumerated type bitfield to its text representation

New in version 0.5.2.

PackageKitGlib.group_enum_from_string(group)
Parameters:group (str) – Text describing the enumerated type
Returns:the enumerated constant value, e.g. PackageKitGlib.SigTypeEnum.GPG
Return type:PackageKitGlib.GroupEnum

Converts a text enumerated type to its unsigned integer representation

New in version 0.5.0.

PackageKitGlib.group_enum_to_string(group)
Parameters:group (PackageKitGlib.GroupEnum) – The enumerated type value
Returns:the enumerated constant value, e.g. “available”
Return type:str

Converts a enumerated type to its text representation

New in version 0.5.0.

PackageKitGlib.info_enum_from_string(info)
Parameters:info (str) – Text describing the enumerated type
Returns:the enumerated constant value, e.g. PackageKitGlib.SigTypeEnum.GPG
Return type:PackageKitGlib.InfoEnum

Converts a text enumerated type to its unsigned integer representation

New in version 0.5.0.

PackageKitGlib.info_enum_to_localised_past(info)
Parameters:info (PackageKitGlib.InfoEnum) – The enumerated type value
Returns:the translated text
Return type:str

Converts a enumerated type to its localized description

New in version 0.7.2.

PackageKitGlib.info_enum_to_localised_present(info)
Parameters:info (PackageKitGlib.InfoEnum) – The enumerated type value
Returns:the translated text
Return type:str

Converts a enumerated type to its localized description

New in version 0.7.2.

PackageKitGlib.info_enum_to_string(info)
Parameters:info (PackageKitGlib.InfoEnum) – The enumerated type value
Returns:the enumerated constant value, e.g. “available”
Return type:str

Converts a enumerated type to its text representation

New in version 0.5.0.

PackageKitGlib.iso8601_from_date(date)
Parameters:date (GLib.Date) – a GLib.Date to convert
Returns:If valid then a new ISO8601 date, else None
Return type:str

Convert a date into an ISO8601 data string.

New in version 0.5.2.

PackageKitGlib.iso8601_present()
Returns:The current iso8601 date and time
Return type:str

Get the current date / time as an ISO8601 string.

New in version 0.5.2.

PackageKitGlib.media_type_enum_from_string(media_type)
Parameters:media_type (str) – Text describing the enumerated type
Returns:the enumerated constant value, e.g. PackageKitGlib.MediaTypeEnum.CD
Return type:PackageKitGlib.MediaTypeEnum

Converts a text enumerated type to its unsigned integer representation

New in version 0.5.0.

PackageKitGlib.media_type_enum_to_string(media_type)
Parameters:media_type (PackageKitGlib.MediaTypeEnum) – The enumerated type value
Returns:the enumerated constant value, e.g. “dvd”
Return type:str

Converts a enumerated type to its text representation

New in version 0.5.0.

PackageKitGlib.network_enum_from_string(network)
Parameters:network (str) – Text describing the enumerated type
Returns:the enumerated constant value, e.g. PackageKitGlib.SigTypeEnum.GPG
Return type:PackageKitGlib.NetworkEnum

Converts a text enumerated type to its unsigned integer representation

New in version 0.5.0.

PackageKitGlib.network_enum_to_string(network)
Parameters:network (PackageKitGlib.NetworkEnum) – The enumerated type value
Returns:the enumerated constant value, e.g. “available”
Return type:str

Converts a enumerated type to its text representation

New in version 0.5.0.

PackageKitGlib.offline_action_from_string(action)
Parameters:action (str) – a string representation of a PackageKitGlib.OfflineAction, e.g. “reboot”
Returns:A PackageKitGlib.OfflineAction, or PackageKitGlib.OfflineAction.UNKNOWN for invalid
Return type:PackageKitGlib.OfflineAction

Converts the string to the enumerated value.

New in version 0.9.6.

PackageKitGlib.offline_action_to_string(action)
Parameters:action (PackageKitGlib.OfflineAction) – a PackageKitGlib.OfflineAction, e.g. PackageKitGlib.OfflineAction.REBOOT
Returns:string value, or None for invalid
Return type:str

Converts the enumerated value to a string.

New in version 0.9.6.

PackageKitGlib.offline_auth_cancel()
Raises:GLib.Error
Return type:bool
PackageKitGlib.offline_auth_clear_results()
Raises:GLib.Error
Return type:bool
PackageKitGlib.offline_auth_invalidate()
Raises:GLib.Error
Return type:bool
PackageKitGlib.offline_auth_set_action(action)
Parameters:action (PackageKitGlib.OfflineAction) –
Raises:GLib.Error
Return type:bool
PackageKitGlib.offline_auth_set_prepared_ids(package_ids)
Parameters:package_ids (str) –
Raises:GLib.Error
Return type:bool
PackageKitGlib.offline_auth_set_prepared_upgrade(name, release_ver)
Parameters:
  • name (str) –
  • release_ver (str) –
Raises:

GLib.Error

Return type:

bool

PackageKitGlib.offline_auth_set_results(results)
Parameters:results (PackageKitGlib.Results) –
Raises:GLib.Error
Return type:bool
PackageKitGlib.offline_auth_trigger(action)
Parameters:action (PackageKitGlib.OfflineAction) –
Raises:GLib.Error
Return type:bool
PackageKitGlib.offline_auth_trigger_upgrade(action)
Parameters:action (PackageKitGlib.OfflineAction) –
Raises:GLib.Error
Return type:bool
PackageKitGlib.offline_cancel(cancellable)
Parameters:cancellable (Gio.Cancellable or None) – A Gio.Cancellable or None
Raises:GLib.Error
Returns:True for success, else False and error set
Return type:bool

Cancels the offline operation that has been scheduled. If there is no scheduled offline operation then this method returns with success.

New in version 0.9.6.

PackageKitGlib.offline_clear_results(cancellable)
Parameters:cancellable (Gio.Cancellable or None) – A Gio.Cancellable or None
Raises:GLib.Error
Returns:True for success, else False and error set
Return type:bool

Crears the last offline operation report, which may be success or failure. If the report does not exist then this method returns success.

New in version 0.9.6.

PackageKitGlib.offline_error_quark()
Returns:an error quark.
Return type:int

An error quark for PackageKitGlib.OfflineError.

New in version 0.9.6.

PackageKitGlib.offline_get_action()
Raises:GLib.Error
Returns:a PackageKitGlib.OfflineAction, e.g. PackageKitGlib.OfflineAction.REBOOT
Return type:PackageKitGlib.OfflineAction

Gets the action that will be taken after the offline action has completed.

An error is set if the the value PackageKitGlib.OfflineAction.UNKNOWN is returned.

New in version 0.9.6.

PackageKitGlib.offline_get_action_monitor(cancellable)
Parameters:cancellable (Gio.Cancellable or None) – A Gio.Cancellable or None
Raises:GLib.Error
Returns:A Gio.FileMonitor, or None
Return type:Gio.FileMonitor

Gets a file monitor for the trigger.

New in version 0.9.6.

PackageKitGlib.offline_get_prepared_ids()
Raises:GLib.Error
Returns:array of package-ids, or None
Return type:[str]

Gets the package-ids in the prepared transaction.

New in version 0.9.6.

PackageKitGlib.offline_get_prepared_monitor(cancellable)
Parameters:cancellable (Gio.Cancellable or None) – A Gio.Cancellable or None
Raises:GLib.Error
Returns:A Gio.FileMonitor, or None
Return type:Gio.FileMonitor

Gets a file monitor for the prepared transaction.

New in version 0.9.6.

PackageKitGlib.offline_get_prepared_sack()
Raises:GLib.Error
Returns:A new PackageKitGlib.PackageSack, or None
Return type:PackageKitGlib.PackageSack

Gets a package sack of the packages in the prepared transaction.

New in version 0.9.6.

PackageKitGlib.offline_get_prepared_upgrade(name, release_ver)
Parameters:
  • name (str) –
  • release_ver (str) –
Raises:

GLib.Error

Return type:

bool

PackageKitGlib.offline_get_prepared_upgrade_monitor(cancellable)
Parameters:cancellable (Gio.Cancellable or None) – A Gio.Cancellable or None
Raises:GLib.Error
Returns:A Gio.FileMonitor, or None
Return type:Gio.FileMonitor

Gets a file monitor for the prepared system upgrade transaction.

New in version 1.0.12.

PackageKitGlib.offline_get_prepared_upgrade_name()
Raises:GLib.Error
Returns:the name, or None if unset, free with GLib.free()
Return type:str

Gets the name of the prepared system upgrade in the prepared transaction.

New in version 1.1.2.

PackageKitGlib.offline_get_prepared_upgrade_version()
Raises:GLib.Error
Returns:the version, or None if unset, free with GLib.free()
Return type:str

Gets the version of the prepared system upgrade in the prepared transaction.

New in version 1.0.12.

PackageKitGlib.offline_get_results()
Raises:GLib.Error
Returns:A PackageKitGlib.Results, or None
Return type:PackageKitGlib.Results

Gets the last result of the offline transaction.

New in version 0.9.6.

PackageKitGlib.offline_get_results_mtime()
Raises:GLib.Error
Returns:a unix time, or 0 for error.
Return type:int

Gets the modification time of the prepared transaction.

New in version 0.9.6.

PackageKitGlib.offline_trigger(action, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True for success, else False and error set

Return type:

bool

Triggers the offline update so that the next reboot will perform the pending transaction.

New in version 0.9.6.

PackageKitGlib.offline_trigger_upgrade(action, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True for success, else False and error set

Return type:

bool

Triggers the offline system upgrade so that the next reboot will perform the pending transaction.

New in version 1.0.12.

PackageKitGlib.polkit_agent_close()
PackageKitGlib.polkit_agent_open()
Return type:int
PackageKitGlib.ptr_array_to_strv(array)
Parameters:array ([str]) – the GLib.PtrArray of strings
Returns:the string array, or None if invalid
Return type:[str]

Form a composite string array of strings. The data in the GLib.PtrArray is copied.

New in version 0.5.2.

PackageKitGlib.restart_enum_from_string(restart)
Parameters:restart (str) – Text describing the enumerated type
Returns:the enumerated constant value, e.g. PackageKitGlib.SigTypeEnum.GPG
Return type:PackageKitGlib.RestartEnum

Converts a text enumerated type to its unsigned integer representation

New in version 0.5.0.

PackageKitGlib.restart_enum_to_string(restart)
Parameters:restart (PackageKitGlib.RestartEnum) – The enumerated type value
Returns:the enumerated constant value, e.g. “available”
Return type:str

Converts a enumerated type to its text representation

New in version 0.5.0.

PackageKitGlib.role_bitfield_from_string(roles)
Parameters:roles (str) – the enumerated constant value, e.g. “search-file;update-system”
Returns:The enumerated type values, or 0 for invalid
Return type:int

Converts text representation to its enumerated type bitfield

New in version 0.5.2.

PackageKitGlib.role_bitfield_to_string(roles)
Parameters:roles (int) – The enumerated type values
Returns:the enumerated constant value, e.g. “install-file;update-system”
Return type:str

Converts a enumerated type bitfield to its text representation

New in version 0.5.2.

PackageKitGlib.role_enum_from_string(role)
Parameters:role (str) – Text describing the enumerated type
Returns:the enumerated constant value, e.g. PackageKitGlib.SigTypeEnum.GPG
Return type:PackageKitGlib.RoleEnum

Converts a text enumerated type to its unsigned integer representation

New in version 0.5.0.

PackageKitGlib.role_enum_to_localised_present(role)
Parameters:role (PackageKitGlib.RoleEnum) – The enumerated type value
Returns:the translated text
Return type:str

Converts a enumerated type to its localized description

New in version 0.7.2.

PackageKitGlib.role_enum_to_string(role)
Parameters:role (PackageKitGlib.RoleEnum) – The enumerated type value
Returns:the enumerated constant value, e.g. “available”
Return type:str

Converts a enumerated type to its text representation

New in version 0.5.0.

PackageKitGlib.sig_type_enum_from_string(sig_type)
Parameters:sig_type (str) – Text describing the enumerated type
Returns:the enumerated constant value, e.g. PackageKitGlib.SigTypeEnum.GPG
Return type:PackageKitGlib.SigTypeEnum

Converts a text enumerated type to its unsigned integer representation

PackageKitGlib.sig_type_enum_to_string(sig_type)
Parameters:sig_type (PackageKitGlib.SigTypeEnum) – The enumerated type value
Returns:the enumerated constant value, e.g. “available”
Return type:str

Converts a enumerated type to its text representation

New in version 0.5.0.

PackageKitGlib.status_enum_from_string(status)
Parameters:status (str) – Text describing the enumerated type
Returns:the enumerated constant value, e.g. PackageKitGlib.SigTypeEnum.GPG
Return type:PackageKitGlib.StatusEnum

Converts a text enumerated type to its unsigned integer representation

New in version 0.5.0.

PackageKitGlib.status_enum_to_localised_text(status)
Parameters:status (PackageKitGlib.StatusEnum) –
Return type:str
PackageKitGlib.status_enum_to_string(status)
Parameters:status (PackageKitGlib.StatusEnum) – The enumerated type value
Returns:the enumerated constant value, e.g. “available”
Return type:str

Converts a enumerated type to its text representation

New in version 0.5.0.

PackageKitGlib.transaction_flag_bitfield_from_string(transaction_flags)
Parameters:transaction_flags (str) – the enumerated constant value, e.g. “only-trusted;simulate”
Returns:The enumerated type values
Return type:int

Converts text representation to its enumerated type bitfield, or 0 for invalid

New in version 0.8.1.

PackageKitGlib.transaction_flag_bitfield_to_string(transaction_flags)
Parameters:transaction_flags (int) – The enumerated type values
Returns:the enumerated constant value, e.g. “only-trusted;simulate”
Return type:str

Converts a enumerated type bitfield to its text representation

New in version 0.8.1.

PackageKitGlib.transaction_flag_enum_from_string(transaction_flag)
Parameters:transaction_flag (str) – Text describing the enumerated type
Returns:the enumerated constant value, e.g. PackageKitGlib.TransactionFlagEnum.SIMULATE
Return type:PackageKitGlib.TransactionFlagEnum

Converts a text enumerated type to its unsigned integer representation

New in version 0.8.1.

PackageKitGlib.transaction_flag_enum_to_string(transaction_flag)
Parameters:transaction_flag (PackageKitGlib.TransactionFlagEnum) – The enumerated type value
Returns:the enumerated constant value, e.g. “simulate”
Return type:str

Converts a enumerated type to its text representation

New in version 0.8.1.

PackageKitGlib.update_state_enum_from_string(update_state)
Parameters:update_state (str) – Text describing the enumerated type
Returns:the enumerated constant value, e.g. PackageKitGlib.UpdateStateEnum.STABLE
Return type:PackageKitGlib.UpdateStateEnum

Converts a text enumerated type to its unsigned integer representation

New in version 0.5.0.

PackageKitGlib.update_state_enum_to_string(update_state)
Parameters:update_state (PackageKitGlib.UpdateStateEnum) – The enumerated type value
Returns:the enumerated constant value, e.g. “testing”
Return type:str

Converts a enumerated type to its text representation

New in version 0.5.0.

PackageKitGlib.upgrade_kind_enum_from_string(upgrade_kind)
Parameters:upgrade_kind (str) – Text describing the enumerated type
Returns:the enumerated constant value, e.g. PackageKitGlib.UpgradeKindEnum.MINIMAL
Return type:PackageKitGlib.UpgradeKindEnum

Converts a text enumerated type to its unsigned integer representation

New in version 0.6.11.

PackageKitGlib.upgrade_kind_enum_to_string(upgrade_kind)
Parameters:upgrade_kind (PackageKitGlib.UpgradeKindEnum) – The enumerated type value
Returns:the enumerated constant value, e.g. “minimal”
Return type:str

Converts a enumerated type to its text representation

New in version 0.6.11.