Functions¶
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:
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:
Converts a enumerated type to its text representation
New in version 0.5.0.
- PackageKitGlib.client_error_quark()¶
- Returns:
an error quark.
- Return type:
An error quark for
PackageKitGlib.ClientError
.New in version 0.5.2.
- PackageKitGlib.control_error_quark()¶
- Returns:
Our personal error quark.
- Return type:
We are a
GObject.Object
that sets errorsNew 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()¶
-
Check if verbose debugging is enabled.
- PackageKitGlib.debug_set_verbose(verbose)¶
-
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:
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:
Converts a enumerated type to its text representation
New in version 0.5.0.
- PackageKitGlib.enum_find_string(table, value)¶
- Parameters:
table (
PackageKitGlib.EnumMatch
) – APackageKitGlib.EnumMatch
enum table of valuesvalue (
int
) – the enumerated constant value, e.g.PackageKitGlib.SigTypeEnum.GPG
- Returns:
the string constant, e.g. “desktop-gnome”
- Return type:
Search for a enum value in a table of constants.
- PackageKitGlib.enum_find_value(table, string)¶
- Parameters:
table (
PackageKitGlib.EnumMatch
) – APackageKitGlib.EnumMatch
enum table of valuesstring (
str
) – the string constant to search for, e.g. “desktop-gnome”
- Returns:
the enumerated constant value, e.g.
PackageKitGlib.SigTypeEnum.GPG
- Return type:
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:
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:
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:
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:
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:
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:
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:
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:
Converts a enumerated type to its text representation
New in version 0.5.0.
- PackageKitGlib.get_distro_id()¶
- Returns:
a distribution ID
- Return type:
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:
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:
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:
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:
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:
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:
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:
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:
Converts a enumerated type to its text representation
New in version 0.5.0.
- PackageKitGlib.iso8601_from_date(date)¶
- Parameters:
- Returns:
If valid then a new ISO8601 date, else
None
- Return type:
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:
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:
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:
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:
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:
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 aPackageKitGlib.OfflineAction
, e.g. “reboot”- Returns:
A
PackageKitGlib.OfflineAction
, orPackageKitGlib.OfflineAction.UNKNOWN
for invalid- Return type:
Converts the string to the enumerated value.
New in version 0.9.6.
- PackageKitGlib.offline_action_to_string(action)¶
- Parameters:
action (
PackageKitGlib.OfflineAction
) – aPackageKitGlib.OfflineAction
, e.g.PackageKitGlib.OfflineAction.REBOOT
- Returns:
string value, or
None
for invalid- Return type:
Converts the enumerated value to a string.
New in version 0.9.6.
- PackageKitGlib.offline_auth_cancel()¶
- Raises:
- Return type:
- PackageKitGlib.offline_auth_clear_results()¶
- Raises:
- Return type:
- PackageKitGlib.offline_auth_invalidate()¶
- Raises:
- Return type:
- PackageKitGlib.offline_auth_set_action(action)¶
- Parameters:
action (
PackageKitGlib.OfflineAction
) –- Raises:
- Return type:
- PackageKitGlib.offline_auth_set_prepared_ids(package_ids)¶
- Parameters:
package_ids (
str
) –- Raises:
- Return type:
- PackageKitGlib.offline_auth_set_prepared_upgrade(name, release_ver)¶
- Parameters:
- Raises:
- Return type:
- PackageKitGlib.offline_auth_set_results(results)¶
- Parameters:
results (
PackageKitGlib.Results
) –- Raises:
- Return type:
- PackageKitGlib.offline_auth_trigger(action)¶
- Parameters:
action (
PackageKitGlib.OfflineAction
) –- Raises:
- Return type:
- PackageKitGlib.offline_auth_trigger_upgrade(action)¶
- Parameters:
action (
PackageKitGlib.OfflineAction
) –- Raises:
- Return type:
- PackageKitGlib.offline_cancel(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
- Raises:
- Returns:
- Return type:
Cancels the offline operation that has been scheduled. If there is no scheduled offline operation then this method returns with success. The function always allows user interaction. To change the behavior, use
PackageKitGlib.offline_cancel_with_flags
().New in version 0.9.6.
- PackageKitGlib.offline_cancel_with_flags(flags, cancellable)¶
- Parameters:
flags (
PackageKitGlib.OfflineFlags
) – bit-or ofPackageKitGlib.OfflineFlags
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
- Raises:
- Returns:
- Return type:
Cancels the offline operation that has been scheduled. If there is no scheduled offline operation then this method returns with success.
New in version 1.2.5.
- PackageKitGlib.offline_clear_results(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
- Raises:
- Returns:
- Return type:
Clears the last offline operation report, which may be success or failure. If the report does not exist then this method returns success. The function always allows user interaction. To change the behavior, use
PackageKitGlib.offline_clear_results_with_flags
().New in version 0.9.6.
- PackageKitGlib.offline_clear_results_with_flags(flags, cancellable)¶
- Parameters:
flags (
PackageKitGlib.OfflineFlags
) – bit-or ofPackageKitGlib.OfflineFlags
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
- Raises:
- Returns:
- Return type:
Clears 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 1.2.5.
- PackageKitGlib.offline_error_quark()¶
- Returns:
an error quark.
- Return type:
An error quark for
PackageKitGlib.OfflineError
.New in version 0.9.6.
- PackageKitGlib.offline_get_action()¶
- Raises:
- Returns:
a
PackageKitGlib.OfflineAction
, e.g.PackageKitGlib.OfflineAction.REBOOT
- Return type:
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
orNone
) – AGio.Cancellable
orNone
- Raises:
- Returns:
A
Gio.FileMonitor
, orNone
- Return type:
Gets a file monitor for the trigger.
New in version 0.9.6.
- PackageKitGlib.offline_get_prepared_ids()¶
-
Gets the package-ids in the prepared transaction.
New in version 0.9.6.
- PackageKitGlib.offline_get_prepared_monitor(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
- Raises:
- Returns:
A
Gio.FileMonitor
, orNone
- Return type:
Gets a file monitor for the prepared transaction.
New in version 0.9.6.
- PackageKitGlib.offline_get_prepared_sack()¶
- Raises:
- Returns:
A new
PackageKitGlib.PackageSack
, orNone
- Return type:
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:
- Raises:
- Return type:
- PackageKitGlib.offline_get_prepared_upgrade_monitor(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
- Raises:
- Returns:
A
Gio.FileMonitor
, orNone
- Return type:
Gets a file monitor for the prepared system upgrade transaction.
New in version 1.0.12.
- PackageKitGlib.offline_get_prepared_upgrade_name()¶
- Raises:
- Returns:
- Return type:
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:
- Returns:
- Return type:
Gets the version of the prepared system upgrade in the prepared transaction.
New in version 1.0.12.
- PackageKitGlib.offline_get_results()¶
- Raises:
- Returns:
A
PackageKitGlib.Results
, orNone
- Return type:
Gets the last result of the offline transaction.
New in version 0.9.6.
- PackageKitGlib.offline_get_results_mtime()¶
- Raises:
- Returns:
a unix time, or 0 for error.
- Return type:
Gets the modification time of the prepared transaction.
New in version 0.9.6.
- PackageKitGlib.offline_trigger(action, cancellable)¶
- Parameters:
action (
PackageKitGlib.OfflineAction
) – aPackageKitGlib.OfflineAction
, e.g.PackageKitGlib.OfflineAction.REBOOT
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
- Raises:
- Returns:
- Return type:
Triggers the offline update so that the next reboot will perform the pending transaction. The function always allows user interaction. To change the behavior, use
PackageKitGlib.offline_trigger_with_flags
().New in version 0.9.6.
- PackageKitGlib.offline_trigger_upgrade(action, cancellable)¶
- Parameters:
action (
PackageKitGlib.OfflineAction
) – aPackageKitGlib.OfflineAction
, e.g.PackageKitGlib.OfflineAction.REBOOT
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
- Raises:
- Returns:
- Return type:
Triggers the offline system upgrade so that the next reboot will perform the pending transaction. The function always allows user interaction. To change the behavior, use
PackageKitGlib.offline_trigger_upgrade_with_flags
().New in version 1.0.12.
- PackageKitGlib.offline_trigger_upgrade_with_flags(action, flags, cancellable)¶
- Parameters:
action (
PackageKitGlib.OfflineAction
) – aPackageKitGlib.OfflineAction
, e.g.PackageKitGlib.OfflineAction.REBOOT
flags (
PackageKitGlib.OfflineFlags
) – bit-or ofPackageKitGlib.OfflineFlags
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
- Raises:
- Returns:
- Return type:
Triggers the offline system upgrade so that the next reboot will perform the pending transaction.
New in version 1.2.5.
- PackageKitGlib.offline_trigger_with_flags(action, flags, cancellable)¶
- Parameters:
action (
PackageKitGlib.OfflineAction
) – aPackageKitGlib.OfflineAction
, e.g.PackageKitGlib.OfflineAction.REBOOT
flags (
PackageKitGlib.OfflineFlags
) – bit-or ofPackageKitGlib.OfflineFlags
cancellable (
Gio.Cancellable
orNone
) – AGio.Cancellable
orNone
- Raises:
- Returns:
- Return type:
Triggers the offline update so that the next reboot will perform the pending transaction.
New in version 1.2.5.
- PackageKitGlib.polkit_agent_close()¶
- PackageKitGlib.ptr_array_to_strv(array)¶
- Parameters:
array ([
str
]) – theGLib.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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
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:
- PackageKitGlib.status_enum_to_string(status)¶
- Parameters:
status (
PackageKitGlib.StatusEnum
) – The enumerated type value- Returns:
the enumerated constant value, e.g. “available”
- Return type:
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:
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:
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:
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:
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:
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:
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:
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:
Converts a enumerated type to its text representation
New in version 0.6.11.