Top |
PkEnumMatch | |
enum | PkRoleEnum |
enum | PkStatusEnum |
enum | PkExitEnum |
enum | PkNetworkEnum |
enum | PkFilterEnum |
enum | PkRestartEnum |
enum | PkErrorEnum |
enum | PkGroupEnum |
enum | PkUpdateStateEnum |
enum | PkInfoEnum |
enum | PkDistroUpgradeEnum |
enum | PkSigTypeEnum |
enum | PkMediaTypeEnum |
enum | PkAuthorizeEnum |
enum | PkUpgradeKindEnum |
enum | PkTransactionFlagEnum |
GEnum ├── PkAuthorizeEnum ├── PkDistroUpgradeEnum ├── PkErrorEnum ├── PkExitEnum ├── PkFilterEnum ├── PkGroupEnum ├── PkInfoEnum ├── PkMediaTypeEnum ├── PkNetworkEnum ├── PkRestartEnum ├── PkRoleEnum ├── PkSigTypeEnum ├── PkStatusEnum ├── PkTransactionFlagEnum ├── PkUpdateStateEnum ╰── PkUpgradeKindEnum
guint pk_enum_find_value (const PkEnumMatch *table
,const gchar *string
);
Search for a string value in a table of constants.
table |
A PkEnumMatch enum table of values |
|
string |
the string constant to search for, e.g. "desktop-gnome" |
const gchar * pk_enum_find_string (const PkEnumMatch *table
,guint value
);
Search for a enum value in a table of constants.
table |
A PkEnumMatch enum table of values |
|
value |
the enumerated constant value, e.g. PK_SIGTYPE_ENUM_GPG |
PkSigTypeEnum
pk_sig_type_enum_from_string (const gchar *sig_type
);
Converts a text enumerated type to its unsigned integer representation
const gchar *
pk_sig_type_enum_to_string (PkSigTypeEnum sig_type
);
Converts a enumerated type to its text representation
Since: 0.5.0
PkInfoEnum
pk_info_enum_from_string (const gchar *info
);
Converts a text enumerated type to its unsigned integer representation
Since: 0.5.0
const gchar *
pk_info_enum_to_string (PkInfoEnum info
);
Converts a enumerated type to its text representation
Since: 0.5.0
PkUpdateStateEnum
pk_update_state_enum_from_string (const gchar *update_state
);
Converts a text enumerated type to its unsigned integer representation
Since: 0.5.0
const gchar *
pk_update_state_enum_to_string (PkUpdateStateEnum update_state
);
Converts a enumerated type to its text representation
Since: 0.5.0
PkExitEnum
pk_exit_enum_from_string (const gchar *exit
);
Converts a text enumerated type to its unsigned integer representation
Since: 0.5.0
const gchar *
pk_exit_enum_to_string (PkExitEnum exit
);
Converts a enumerated type to its text representation
Since: 0.5.0
PkNetworkEnum
pk_network_enum_from_string (const gchar *network
);
Converts a text enumerated type to its unsigned integer representation
Since: 0.5.0
const gchar *
pk_network_enum_to_string (PkNetworkEnum network
);
Converts a enumerated type to its text representation
Since: 0.5.0
PkStatusEnum
pk_status_enum_from_string (const gchar *status
);
Converts a text enumerated type to its unsigned integer representation
Since: 0.5.0
const gchar *
pk_status_enum_to_string (PkStatusEnum status
);
Converts a enumerated type to its text representation
Since: 0.5.0
PkRoleEnum
pk_role_enum_from_string (const gchar *role
);
Converts a text enumerated type to its unsigned integer representation
Since: 0.5.0
const gchar *
pk_role_enum_to_string (PkRoleEnum role
);
Converts a enumerated type to its text representation
Since: 0.5.0
PkErrorEnum
pk_error_enum_from_string (const gchar *code
);
Converts a text enumerated type to its unsigned integer representation
Since: 0.5.0
const gchar *
pk_error_enum_to_string (PkErrorEnum code
);
Converts a enumerated type to its text representation
Since: 0.5.0
PkRestartEnum
pk_restart_enum_from_string (const gchar *restart
);
Converts a text enumerated type to its unsigned integer representation
Since: 0.5.0
const gchar *
pk_restart_enum_to_string (PkRestartEnum restart
);
Converts a enumerated type to its text representation
Since: 0.5.0
PkGroupEnum
pk_group_enum_from_string (const gchar *group
);
Converts a text enumerated type to its unsigned integer representation
Since: 0.5.0
const gchar *
pk_group_enum_to_string (PkGroupEnum group
);
Converts a enumerated type to its text representation
Since: 0.5.0
PkFilterEnum
pk_filter_enum_from_string (const gchar *filter
);
Converts a text enumerated type to its unsigned integer representation
Since: 0.5.0
const gchar *
pk_filter_enum_to_string (PkFilterEnum filter
);
Converts a enumerated type to its text representation
Since: 0.5.0
PkDistroUpgradeEnum
pk_distro_upgrade_enum_from_string (const gchar *upgrade
);
Converts a text enumerated type to its unsigned integer representation
Since: 0.5.0
const gchar *
pk_distro_upgrade_enum_to_string (PkDistroUpgradeEnum upgrade
);
Converts a enumerated type to its text representation
Since: 0.5.0
PkMediaTypeEnum
pk_media_type_enum_from_string (const gchar *media_type
);
Converts a text enumerated type to its unsigned integer representation
Since: 0.5.0
const gchar *
pk_media_type_enum_to_string (PkMediaTypeEnum media_type
);
Converts a enumerated type to its text representation
Since: 0.5.0
PkAuthorizeEnum
pk_authorize_type_enum_from_string (const gchar *authorize_type
);
Converts a text enumerated type to its unsigned integer representation
Since: 0.5.0
const gchar *
pk_authorize_type_enum_to_string (PkAuthorizeEnum authorize_type
);
Converts a enumerated type to its text representation
Since: 0.5.0
PkUpgradeKindEnum
pk_upgrade_kind_enum_from_string (const gchar *upgrade_kind
);
Converts a text enumerated type to its unsigned integer representation
Since: 0.6.11
const gchar *
pk_upgrade_kind_enum_to_string (PkUpgradeKindEnum upgrade_kind
);
Converts a enumerated type to its text representation
Since: 0.6.11
PkTransactionFlagEnum
pk_transaction_flag_enum_from_string (const gchar *transaction_flag
);
Converts a text enumerated type to its unsigned integer representation
Since: 0.8.1
const gchar *
pk_transaction_flag_enum_to_string (PkTransactionFlagEnum transaction_flag
);
Converts a enumerated type to its text representation
Since: 0.8.1
const gchar *
pk_status_enum_to_localised_text (PkStatusEnum status
);
const gchar *
pk_info_enum_to_localised_past (PkInfoEnum info
);
Converts a enumerated type to its localized description
Since: 0.7.2
const gchar *
pk_info_enum_to_localised_present (PkInfoEnum info
);
Converts a enumerated type to its localized description
Since: 0.7.2
const gchar *
pk_role_enum_to_localised_present (PkRoleEnum role
);
Converts a enumerated type to its localized description
Since: 0.7.2
typedef struct { guint value; const gchar *string; } PkEnumMatch;
Matching an enumerated type to a string
What we were asked to do, this never changes for the lifetime of the transaction. Icons that have to represent the whole "aim" of the transaction will use these constants
What status we are now; this can change for each transaction giving a status of what sort of thing is happening Icons that change to represent the current status of the transaction will use these constants If you add to these, make sure you add filenames in gpk-watch.c also
A typical transaction will do:
schedule task WAIT
run task SETUP
wait for lock RUNNING
This means that backends should run pk_backend_set_status (backend, PK_STATUS_ENUM_RUNNING) when they are ready to start running the transaction and after a lock has been got.
The enumerated types used in Package()
- these have to refer to a specific
package action, rather than a general state