## pk-enum pk-enum — Functions for converting strings to enum and vice-versa |

## Synopsis

    #define             pk_sig_type_enum_from_text
    #define             pk_sig_type_enum_to_text
    #define             pk_distro_upgrade_enum_from_text
    #define             pk_distro_upgrade_enum_to_text
    #define             pk_provides_enum_from_text
    #define             pk_provides_enum_to_text
    #define             pk_info_enum_from_text
    #define             pk_info_enum_to_text
    #define             pk_exit_enum_from_text
    #define             pk_exit_enum_to_text
    #define             pk_network_enum_from_text
    #define             pk_network_enum_to_text
    #define             pk_status_enum_from_text
    #define             pk_status_enum_to_text
    #define             pk_role_enum_from_text
    #define             pk_role_enum_to_text
    #define             pk_error_enum_from_text
    #define             pk_error_enum_to_text
    #define             pk_restart_enum_from_text
    #define             pk_restart_enum_to_text
    #define             pk_message_enum_from_text
    #define             pk_message_enum_to_text
    #define             pk_group_enum_from_text
    #define             pk_group_enum_to_text
    #define             pk_update_state_enum_from_text
    #define             pk_update_state_enum_to_text
    #define             pk_filter_enum_from_text
    #define             pk_filter_enum_to_text
    #define             pk_license_enum_from_text
    #define             pk_license_enum_to_text
    #define             pk_media_type_enum_from_text
    #define             pk_media_type_enum_to_text
    #define             pk_authorize_type_enum_from_text
    #define             pk_authorize_type_enum_to_text
                        PkEnumMatch;
    enum                PkRoleEnum;
    enum                PkStatusEnum;
    enum                PkExitEnum;
    enum                PkNetworkEnum;
    enum                PkFilterEnum;
    enum                PkRestartEnum;
    enum                PkMessageEnum;
    enum                PkErrorEnum;
    enum                PkGroupEnum;
    enum                PkUpdateStateEnum;
    enum                PkInfoEnum;
    enum                PkDistroUpgradeEnum;
    enum                PkSigTypeEnum;
    enum                PkProvidesEnum;
    enum                PkLicenseEnum;
    enum                PkMediaTypeEnum;
    enum                PkAuthorizeEnum;
    void                pk_enum_test                        (gpointer user_data);
    guint               pk_enum_find_value                  (const PkEnumMatch *table,
                                                             const gchar *string);
    const gchar *       pk_enum_find_string                 (const PkEnumMatch *table,
                                                             guint value);
    PkSigTypeEnum       pk_sig_type_enum_from_string        (const gchar *sig_type);
    const gchar *       pk_sig_type_enum_to_string          (PkSigTypeEnum sig_type);
    PkInfoEnum          pk_info_enum_from_string            (const gchar *info);
    const gchar *       pk_info_enum_to_string              (PkInfoEnum info);
    PkUpdateStateEnum   pk_update_state_enum_from_string    (const gchar *update_state);
    const gchar *       pk_update_state_enum_to_string      (PkUpdateStateEnum update_state);
    PkExitEnum          pk_exit_enum_from_string            (const gchar *exit);
    const gchar *       pk_exit_enum_to_string              (PkExitEnum exit);
    PkNetworkEnum       pk_network_enum_from_string         (const gchar *network);
    const gchar *       pk_network_enum_to_string           (PkNetworkEnum network);
    PkStatusEnum        pk_status_enum_from_string          (const gchar *status);
    const gchar *       pk_status_enum_to_string            (PkStatusEnum status);
    PkRoleEnum          pk_role_enum_from_string            (const gchar *role);
    const gchar *       pk_role_enum_to_string              (PkRoleEnum role);
    PkErrorEnum         pk_error_enum_from_string           (const gchar *code);
    const gchar *       pk_error_enum_to_string             (PkErrorEnum code);
    PkRestartEnum       pk_restart_enum_from_string         (const gchar *restart);
    const gchar *       pk_restart_enum_to_string           (PkRestartEnum restart);
    PkMessageEnum       pk_message_enum_from_string         (const gchar *message);
    const gchar *       pk_message_enum_to_string           (PkMessageEnum message);
    PkGroupEnum         pk_group_enum_from_string           (const gchar *group);
    const gchar *       pk_group_enum_to_string             (PkGroupEnum group);
    PkFilterEnum        pk_filter_enum_from_string          (const gchar *filter);
    const gchar *       pk_filter_enum_to_string            (PkFilterEnum filter);
    PkProvidesEnum      pk_provides_enum_from_string        (const gchar *provides);
    const gchar *       pk_provides_enum_to_string          (PkProvidesEnum provides);
    PkLicenseEnum       pk_license_enum_from_string         (const gchar *license);
    const gchar *       pk_license_enum_to_string           (PkLicenseEnum license);
    PkDistroUpgradeEnum  pk_distro_upgrade_enum_from_string (const gchar *upgrade);
    const gchar *       pk_distro_upgrade_enum_to_string    (PkDistroUpgradeEnum upgrade);
    PkMediaTypeEnum     pk_media_type_enum_from_string      (const gchar *media_type);
    const gchar *       pk_media_type_enum_to_string        (PkMediaTypeEnum media_type);
    PkAuthorizeEnum     pk_authorize_type_enum_from_string  (const gchar *authorize_type);
    const gchar *       pk_authorize_type_enum_to_string    (PkAuthorizeEnum authorize_type);

## Description

This file contains functions to convert to and from enumerated types.

## Details

### pk_sig_type_enum_from_text

    #define pk_sig_type_enum_from_text		pk_sig_type_enum_from_string

### pk_sig_type_enum_to_text

    #define pk_sig_type_enum_to_text		pk_sig_type_enum_to_string

### pk_distro_upgrade_enum_from_text

    #define pk_distro_upgrade_enum_from_text pk_distro_upgrade_enum_from_string

### pk_distro_upgrade_enum_to_text

    #define pk_distro_upgrade_enum_to_text		pk_distro_upgrade_enum_to_string

### pk_provides_enum_from_text

    #define pk_provides_enum_from_text		pk_provides_enum_from_string

### pk_provides_enum_to_text

    #define pk_provides_enum_to_text		pk_provides_enum_to_string

### pk_info_enum_from_text

    #define pk_info_enum_from_text			pk_info_enum_from_string

### pk_info_enum_to_text

    #define pk_info_enum_to_text			pk_info_enum_to_string

### pk_exit_enum_from_text

    #define pk_exit_enum_from_text			pk_exit_enum_from_string

### pk_exit_enum_to_text

    #define pk_exit_enum_to_text			pk_exit_enum_to_string

### pk_network_enum_from_text

    #define pk_network_enum_from_text		pk_network_enum_from_string

### pk_network_enum_to_text

    #define pk_network_enum_to_text			pk_network_enum_to_string

### pk_status_enum_from_text

    #define pk_status_enum_from_text		pk_status_enum_from_string

### pk_status_enum_to_text

    #define pk_status_enum_to_text			pk_status_enum_to_string

### pk_role_enum_from_text

    #define pk_role_enum_from_text			pk_role_enum_from_string

### pk_role_enum_to_text

    #define pk_role_enum_to_text			pk_role_enum_to_string

### pk_error_enum_from_text

    #define pk_error_enum_from_text			pk_error_enum_from_string

### pk_error_enum_to_text

    #define pk_error_enum_to_text			pk_error_enum_to_string

### pk_restart_enum_from_text

    #define pk_restart_enum_from_text		pk_restart_enum_from_string

### pk_restart_enum_to_text

    #define pk_restart_enum_to_text			pk_restart_enum_to_string

### pk_message_enum_from_text

    #define pk_message_enum_from_text		pk_message_enum_from_string

### pk_message_enum_to_text

    #define pk_message_enum_to_text			pk_message_enum_to_string

### pk_group_enum_from_text

    #define pk_group_enum_from_text			pk_group_enum_from_string

### pk_group_enum_to_text

    #define pk_group_enum_to_text			pk_group_enum_to_string

### pk_update_state_enum_from_text

    #define pk_update_state_enum_from_text		pk_update_state_enum_from_string

### pk_update_state_enum_to_text

    #define pk_update_state_enum_to_text		pk_update_state_enum_to_string

### pk_filter_enum_from_text

    #define pk_filter_enum_from_text		pk_filter_enum_from_string

### pk_filter_enum_to_text

    #define pk_filter_enum_to_text			pk_filter_enum_to_string

### pk_license_enum_from_text

    #define pk_license_enum_from_text		pk_license_enum_from_string

### pk_license_enum_to_text

    #define pk_license_enum_to_text			pk_license_enum_to_string

### pk_media_type_enum_from_text

    #define pk_media_type_enum_from_text		pk_media_type_enum_from_string

### pk_media_type_enum_to_text

    #define pk_media_type_enum_to_text		pk_media_type_enum_to_string

### pk_authorize_type_enum_from_text

    #define pk_authorize_type_enum_from_text pk_authorize_type_enum_from_string

### pk_authorize_type_enum_to_text

    #define pk_authorize_type_enum_to_text		pk_authorize_type_enum_to_string

### PkEnumMatch

    typedef struct {
    	guint		 value;
    	const gchar *string;
    } PkEnumMatch;

Matching an enumerated type to a string

### enum PkRoleEnum

    typedef enum {
    	PK_ROLE_ENUM_UNKNOWN,
    	PK_ROLE_ENUM_CANCEL,
    	PK_ROLE_ENUM_GET_DEPENDS,
    	PK_ROLE_ENUM_GET_DETAILS,
    	PK_ROLE_ENUM_GET_FILES,
    	PK_ROLE_ENUM_GET_PACKAGES,
    	PK_ROLE_ENUM_GET_REPO_LIST,
    	PK_ROLE_ENUM_GET_REQUIRES,
    	PK_ROLE_ENUM_GET_UPDATE_DETAIL,
    	PK_ROLE_ENUM_GET_UPDATES,
    	PK_ROLE_ENUM_INSTALL_FILES,
    	PK_ROLE_ENUM_INSTALL_PACKAGES,
    	PK_ROLE_ENUM_INSTALL_SIGNATURE,
    	PK_ROLE_ENUM_REFRESH_CACHE,
    	PK_ROLE_ENUM_REMOVE_PACKAGES,
    	PK_ROLE_ENUM_REPO_ENABLE,
    	PK_ROLE_ENUM_REPO_SET_DATA,
    	PK_ROLE_ENUM_RESOLVE,
    	PK_ROLE_ENUM_ROLLBACK,
    	PK_ROLE_ENUM_SEARCH_DETAILS,
    	PK_ROLE_ENUM_SEARCH_FILE,
    	PK_ROLE_ENUM_SEARCH_GROUP,
    	PK_ROLE_ENUM_SEARCH_NAME,
    	PK_ROLE_ENUM_UPDATE_PACKAGES,
    	PK_ROLE_ENUM_UPDATE_SYSTEM,
    	PK_ROLE_ENUM_WHAT_PROVIDES,
    	PK_ROLE_ENUM_ACCEPT_EULA,
    	PK_ROLE_ENUM_DOWNLOAD_PACKAGES,
    	PK_ROLE_ENUM_GET_DISTRO_UPGRADES,
    	PK_ROLE_ENUM_GET_CATEGORIES,
    	PK_ROLE_ENUM_GET_OLD_TRANSACTIONS,
    	PK_ROLE_ENUM_SIMULATE_INSTALL_FILES,
    	PK_ROLE_ENUM_SIMULATE_INSTALL_PACKAGES,
    	PK_ROLE_ENUM_SIMULATE_REMOVE_PACKAGES,
    	PK_ROLE_ENUM_SIMULATE_UPDATE_PACKAGES,
    	PK_ROLE_ENUM_UPGRADE_SYSTEM,			/* Since: 0.6.11 */
    	PK_ROLE_ENUM_LAST
    } PkRoleEnum;

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

### enum PkStatusEnum

    typedef enum {
    	PK_STATUS_ENUM_UNKNOWN,
    	PK_STATUS_ENUM_WAIT,
    	PK_STATUS_ENUM_SETUP,
    	PK_STATUS_ENUM_RUNNING,
    	PK_STATUS_ENUM_QUERY,
    	PK_STATUS_ENUM_INFO,
    	PK_STATUS_ENUM_REMOVE,
    	PK_STATUS_ENUM_REFRESH_CACHE,
    	PK_STATUS_ENUM_DOWNLOAD,
    	PK_STATUS_ENUM_INSTALL,
    	PK_STATUS_ENUM_UPDATE,
    	PK_STATUS_ENUM_CLEANUP,
    	PK_STATUS_ENUM_OBSOLETE,
    	PK_STATUS_ENUM_DEP_RESOLVE,
    	PK_STATUS_ENUM_SIG_CHECK,
    	PK_STATUS_ENUM_ROLLBACK,
    	PK_STATUS_ENUM_TEST_COMMIT,
    	PK_STATUS_ENUM_COMMIT,
    	PK_STATUS_ENUM_REQUEST,
    	PK_STATUS_ENUM_FINISHED,
    	PK_STATUS_ENUM_CANCEL,
    	PK_STATUS_ENUM_DOWNLOAD_REPOSITORY,
    	PK_STATUS_ENUM_DOWNLOAD_PACKAGELIST,
    	PK_STATUS_ENUM_DOWNLOAD_FILELIST,
    	PK_STATUS_ENUM_DOWNLOAD_CHANGELOG,
    	PK_STATUS_ENUM_DOWNLOAD_GROUP,
    	PK_STATUS_ENUM_DOWNLOAD_UPDATEINFO,
    	PK_STATUS_ENUM_REPACKAGING,
    	PK_STATUS_ENUM_LOADING_CACHE,
    	PK_STATUS_ENUM_SCAN_APPLICATIONS,
    	PK_STATUS_ENUM_GENERATE_PACKAGE_LIST,
    	PK_STATUS_ENUM_WAITING_FOR_LOCK,
    	PK_STATUS_ENUM_WAITING_FOR_AUTH,
    	PK_STATUS_ENUM_SCAN_PROCESS_LIST,
    	PK_STATUS_ENUM_CHECK_EXECUTABLE_FILES,
    	PK_STATUS_ENUM_CHECK_LIBRARIES,
    	PK_STATUS_ENUM_COPY_FILES,
    	PK_STATUS_ENUM_LAST
    } PkStatusEnum;

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.

### enum PkExitEnum

    typedef enum {
    	PK_EXIT_ENUM_UNKNOWN,
    	PK_EXIT_ENUM_SUCCESS,
    	PK_EXIT_ENUM_FAILED,
    	PK_EXIT_ENUM_CANCELLED,
    	PK_EXIT_ENUM_KEY_REQUIRED,
    	PK_EXIT_ENUM_EULA_REQUIRED,
    	PK_EXIT_ENUM_KILLED, /* when we forced the cancel, but had to SIGKILL */
    	PK_EXIT_ENUM_MEDIA_CHANGE_REQUIRED,
    	PK_EXIT_ENUM_NEED_UNTRUSTED,
    	PK_EXIT_ENUM_LAST
    } PkExitEnum;

How the backend exited

### enum PkNetworkEnum

    typedef enum {
    	PK_NETWORK_ENUM_UNKNOWN,
    	PK_NETWORK_ENUM_OFFLINE,
    	PK_NETWORK_ENUM_ONLINE,
    	PK_NETWORK_ENUM_WIRED,
    	PK_NETWORK_ENUM_WIFI,
    	PK_NETWORK_ENUM_MOBILE,
    	PK_NETWORK_ENUM_LAST
    } PkNetworkEnum;

### enum PkFilterEnum

    typedef enum {
    	PK_FILTER_ENUM_UNKNOWN,
    	PK_FILTER_ENUM_NONE,
    	PK_FILTER_ENUM_INSTALLED,
    	PK_FILTER_ENUM_NOT_INSTALLED,
    	PK_FILTER_ENUM_DEVELOPMENT,
    	PK_FILTER_ENUM_NOT_DEVELOPMENT,
    	PK_FILTER_ENUM_GUI,
    	PK_FILTER_ENUM_NOT_GUI,
    	PK_FILTER_ENUM_FREE,
    	PK_FILTER_ENUM_NOT_FREE,
    	PK_FILTER_ENUM_VISIBLE,
    	PK_FILTER_ENUM_NOT_VISIBLE,
    	PK_FILTER_ENUM_SUPPORTED,
    	PK_FILTER_ENUM_NOT_SUPPORTED,
    	PK_FILTER_ENUM_BASENAME,
    	PK_FILTER_ENUM_NOT_BASENAME,
    	PK_FILTER_ENUM_NEWEST,
    	PK_FILTER_ENUM_NOT_NEWEST,
    	PK_FILTER_ENUM_ARCH,
    	PK_FILTER_ENUM_NOT_ARCH,
    	PK_FILTER_ENUM_SOURCE,
    	PK_FILTER_ENUM_NOT_SOURCE,
    	PK_FILTER_ENUM_COLLECTIONS,
    	PK_FILTER_ENUM_NOT_COLLECTIONS,
    	PK_FILTER_ENUM_APPLICATION,
    	PK_FILTER_ENUM_NOT_APPLICATION,
    	PK_FILTER_ENUM_LAST,
    } PkFilterEnum;

The filter types

### enum PkRestartEnum

    typedef enum {
    	PK_RESTART_ENUM_UNKNOWN,
    	PK_RESTART_ENUM_NONE,
    	PK_RESTART_ENUM_APPLICATION,
    	PK_RESTART_ENUM_SESSION,
    	PK_RESTART_ENUM_SYSTEM,
    	PK_RESTART_ENUM_SECURITY_SESSION, /* a library that is being used by this package has been updated for security */
    	PK_RESTART_ENUM_SECURITY_SYSTEM,
    	PK_RESTART_ENUM_LAST
    } PkRestartEnum;

What restart we need to after a transaction, ordered by severity

### enum PkMessageEnum

    typedef enum {
    	PK_MESSAGE_ENUM_UNKNOWN,
    	PK_MESSAGE_ENUM_BROKEN_MIRROR,
    	PK_MESSAGE_ENUM_CONNECTION_REFUSED,
    	PK_MESSAGE_ENUM_PARAMETER_INVALID,
    	PK_MESSAGE_ENUM_PRIORITY_INVALID,
    	PK_MESSAGE_ENUM_BACKEND_ERROR,
    	PK_MESSAGE_ENUM_DAEMON_ERROR,
    	PK_MESSAGE_ENUM_CACHE_BEING_REBUILT,
    	PK_MESSAGE_ENUM_UNTRUSTED_PACKAGE,
    	PK_MESSAGE_ENUM_NEWER_PACKAGE_EXISTS,
    	PK_MESSAGE_ENUM_COULD_NOT_FIND_PACKAGE,
    	PK_MESSAGE_ENUM_CONFIG_FILES_CHANGED,
    	PK_MESSAGE_ENUM_PACKAGE_ALREADY_INSTALLED,
    	PK_MESSAGE_ENUM_AUTOREMOVE_IGNORED,
    	PK_MESSAGE_ENUM_REPO_METADATA_DOWNLOAD_FAILED,
    	PK_MESSAGE_ENUM_REPO_FOR_DEVELOPERS_ONLY,
    	PK_MESSAGE_ENUM_OTHER_UPDATES_HELD_BACK,
    	PK_MESSAGE_ENUM_LAST
    } PkMessageEnum;

What message type we need to show

### enum PkErrorEnum

    typedef enum {
    	PK_ERROR_ENUM_UNKNOWN,
    	PK_ERROR_ENUM_OOM,
    	PK_ERROR_ENUM_NO_NETWORK,
    	PK_ERROR_ENUM_NOT_SUPPORTED,
    	PK_ERROR_ENUM_INTERNAL_ERROR,
    	PK_ERROR_ENUM_GPG_FAILURE,
    	PK_ERROR_ENUM_PACKAGE_ID_INVALID,
    	PK_ERROR_ENUM_PACKAGE_NOT_INSTALLED,
    	PK_ERROR_ENUM_PACKAGE_NOT_FOUND,
    	PK_ERROR_ENUM_PACKAGE_ALREADY_INSTALLED,
    	PK_ERROR_ENUM_PACKAGE_DOWNLOAD_FAILED,
    	PK_ERROR_ENUM_GROUP_NOT_FOUND,
    	PK_ERROR_ENUM_GROUP_LIST_INVALID,
    	PK_ERROR_ENUM_DEP_RESOLUTION_FAILED,
    	PK_ERROR_ENUM_FILTER_INVALID,
    	PK_ERROR_ENUM_CREATE_THREAD_FAILED,
    	PK_ERROR_ENUM_TRANSACTION_ERROR,
    	PK_ERROR_ENUM_TRANSACTION_CANCELLED,
    	PK_ERROR_ENUM_NO_CACHE,
    	PK_ERROR_ENUM_REPO_NOT_FOUND,
    	PK_ERROR_ENUM_CANNOT_REMOVE_SYSTEM_PACKAGE,
    	PK_ERROR_ENUM_PROCESS_KILL,
    	PK_ERROR_ENUM_FAILED_INITIALIZATION,
    	PK_ERROR_ENUM_FAILED_FINALISE,
    	PK_ERROR_ENUM_FAILED_CONFIG_PARSING,
    	PK_ERROR_ENUM_CANNOT_CANCEL,
    	PK_ERROR_ENUM_CANNOT_GET_LOCK,
    	PK_ERROR_ENUM_NO_PACKAGES_TO_UPDATE,
    	PK_ERROR_ENUM_CANNOT_WRITE_REPO_CONFIG,
    	PK_ERROR_ENUM_LOCAL_INSTALL_FAILED,
    	PK_ERROR_ENUM_BAD_GPG_SIGNATURE,
    	PK_ERROR_ENUM_MISSING_GPG_SIGNATURE,
    	PK_ERROR_ENUM_CANNOT_INSTALL_SOURCE_PACKAGE,
    	PK_ERROR_ENUM_REPO_CONFIGURATION_ERROR,
    	PK_ERROR_ENUM_NO_LICENSE_AGREEMENT,
    	PK_ERROR_ENUM_FILE_CONFLICTS,
    	PK_ERROR_ENUM_PACKAGE_CONFLICTS,
    	PK_ERROR_ENUM_REPO_NOT_AVAILABLE,
    	PK_ERROR_ENUM_INVALID_PACKAGE_FILE,
    	PK_ERROR_ENUM_PACKAGE_INSTALL_BLOCKED,
    	PK_ERROR_ENUM_PACKAGE_CORRUPT,
    	PK_ERROR_ENUM_ALL_PACKAGES_ALREADY_INSTALLED,
    	PK_ERROR_ENUM_FILE_NOT_FOUND,
    	PK_ERROR_ENUM_NO_MORE_MIRRORS_TO_TRY,
    	PK_ERROR_ENUM_NO_DISTRO_UPGRADE_DATA,
    	PK_ERROR_ENUM_INCOMPATIBLE_ARCHITECTURE,
    	PK_ERROR_ENUM_NO_SPACE_ON_DEVICE,
    	PK_ERROR_ENUM_MEDIA_CHANGE_REQUIRED,
    	PK_ERROR_ENUM_NOT_AUTHORIZED,
    	PK_ERROR_ENUM_UPDATE_NOT_FOUND,
    	PK_ERROR_ENUM_CANNOT_INSTALL_REPO_UNSIGNED,
    	PK_ERROR_ENUM_CANNOT_UPDATE_REPO_UNSIGNED,
    	PK_ERROR_ENUM_CANNOT_GET_FILELIST,
    	PK_ERROR_ENUM_CANNOT_GET_REQUIRES,
    	PK_ERROR_ENUM_CANNOT_DISABLE_REPOSITORY,
    	PK_ERROR_ENUM_RESTRICTED_DOWNLOAD,
    	PK_ERROR_ENUM_PACKAGE_FAILED_TO_CONFIGURE,
    	PK_ERROR_ENUM_PACKAGE_FAILED_TO_BUILD,
    	PK_ERROR_ENUM_PACKAGE_FAILED_TO_INSTALL,
    	PK_ERROR_ENUM_PACKAGE_FAILED_TO_REMOVE,
    	PK_ERROR_ENUM_UPDATE_FAILED_DUE_TO_RUNNING_PROCESS,
    	PK_ERROR_ENUM_PACKAGE_DATABASE_CHANGED,
    	PK_ERROR_ENUM_PROVIDE_TYPE_NOT_SUPPORTED,
    	PK_ERROR_ENUM_INSTALL_ROOT_INVALID,
    	PK_ERROR_ENUM_CANNOT_FETCH_SOURCES,
    	PK_ERROR_ENUM_LAST
    } PkErrorEnum;

The error type

### enum PkGroupEnum

    typedef enum {
    	PK_GROUP_ENUM_UNKNOWN,
    	PK_GROUP_ENUM_ACCESSIBILITY,
    	PK_GROUP_ENUM_ACCESSORIES,
    	PK_GROUP_ENUM_ADMIN_TOOLS,
    	PK_GROUP_ENUM_COMMUNICATION,
    	PK_GROUP_ENUM_DESKTOP_GNOME,
    	PK_GROUP_ENUM_DESKTOP_KDE,
    	PK_GROUP_ENUM_DESKTOP_OTHER,
    	PK_GROUP_ENUM_DESKTOP_XFCE,
    	PK_GROUP_ENUM_EDUCATION,
    	PK_GROUP_ENUM_FONTS,
    	PK_GROUP_ENUM_GAMES,
    	PK_GROUP_ENUM_GRAPHICS,
    	PK_GROUP_ENUM_INTERNET,
    	PK_GROUP_ENUM_LEGACY,
    	PK_GROUP_ENUM_LOCALIZATION,
    	PK_GROUP_ENUM_MAPS,
    	PK_GROUP_ENUM_MULTIMEDIA,
    	PK_GROUP_ENUM_NETWORK,
    	PK_GROUP_ENUM_OFFICE,
    	PK_GROUP_ENUM_OTHER,
    	PK_GROUP_ENUM_POWER_MANAGEMENT,
    	PK_GROUP_ENUM_PROGRAMMING,
    	PK_GROUP_ENUM_PUBLISHING,
    	PK_GROUP_ENUM_REPOS,
    	PK_GROUP_ENUM_SECURITY,
    	PK_GROUP_ENUM_SERVERS,
    	PK_GROUP_ENUM_SYSTEM,
    	PK_GROUP_ENUM_VIRTUALIZATION,
    	PK_GROUP_ENUM_SCIENCE,
    	PK_GROUP_ENUM_DOCUMENTATION,
    	PK_GROUP_ENUM_ELECTRONICS,
    	PK_GROUP_ENUM_COLLECTIONS,
    	PK_GROUP_ENUM_VENDOR,
    	PK_GROUP_ENUM_NEWEST,
    	PK_GROUP_ENUM_LAST
    } PkGroupEnum;

The group type

### enum PkUpdateStateEnum

    typedef enum {
    	PK_UPDATE_STATE_ENUM_UNKNOWN,
    	PK_UPDATE_STATE_ENUM_STABLE,
    	PK_UPDATE_STATE_ENUM_UNSTABLE,
    	PK_UPDATE_STATE_ENUM_TESTING,
    	PK_UPDATE_STATE_ENUM_LAST
    } PkUpdateStateEnum;

What state the update is in

### enum PkInfoEnum

    typedef enum {
    	PK_INFO_ENUM_UNKNOWN,
    	PK_INFO_ENUM_INSTALLED,
    	PK_INFO_ENUM_AVAILABLE,
    	PK_INFO_ENUM_LOW,
    	PK_INFO_ENUM_ENHANCEMENT,
    	PK_INFO_ENUM_NORMAL,
    	PK_INFO_ENUM_BUGFIX,
    	PK_INFO_ENUM_IMPORTANT,
    	PK_INFO_ENUM_SECURITY,
    	PK_INFO_ENUM_BLOCKED,
    	PK_INFO_ENUM_DOWNLOADING,
    	PK_INFO_ENUM_UPDATING,
    	PK_INFO_ENUM_INSTALLING,
    	PK_INFO_ENUM_REMOVING,
    	PK_INFO_ENUM_CLEANUP,
    	PK_INFO_ENUM_OBSOLETING,
    	PK_INFO_ENUM_COLLECTION_INSTALLED,
    	PK_INFO_ENUM_COLLECTION_AVAILABLE,
    	PK_INFO_ENUM_FINISHED,
    	PK_INFO_ENUM_REINSTALLING,
    	PK_INFO_ENUM_DOWNGRADING,
    	PK_INFO_ENUM_PREPARING,
    	PK_INFO_ENUM_DECOMPRESSING,
    	PK_INFO_ENUM_LAST
    } PkInfoEnum;

The enumerated types used in `Package()` - these have to refer to a specific package action, rather than a general state

### enum PkDistroUpgradeEnum

    typedef enum {
    	PK_DISTRO_UPGRADE_ENUM_UNKNOWN,
    	PK_DISTRO_UPGRADE_ENUM_STABLE,
    	PK_DISTRO_UPGRADE_ENUM_UNSTABLE,
    	PK_DISTRO_UPGRADE_ENUM_LAST
    } PkDistroUpgradeEnum;

The distro upgrade status

### enum PkSigTypeEnum

    typedef enum {
    	PK_SIGTYPE_ENUM_UNKNOWN,
    	PK_SIGTYPE_ENUM_GPG,
    	PK_SIGTYPE_ENUM_LAST
    } PkSigTypeEnum;

The signature type type

### enum PkProvidesEnum

    typedef enum {
    	PK_PROVIDES_ENUM_UNKNOWN,
    	PK_PROVIDES_ENUM_ANY,
    	PK_PROVIDES_ENUM_MODALIAS,
    	PK_PROVIDES_ENUM_CODEC,
    	PK_PROVIDES_ENUM_MIMETYPE,
    	PK_PROVIDES_ENUM_FONT,
    	PK_PROVIDES_ENUM_HARDWARE_DRIVER,
    	PK_PROVIDES_ENUM_POSTSCRIPT_DRIVER,
    	PK_PROVIDES_ENUM_LAST
    } PkProvidesEnum;

The signature type type

### enum PkLicenseEnum

    typedef enum {
    	PK_LICENSE_ENUM_UNKNOWN,
    	PK_LICENSE_ENUM_AAL,
    	PK_LICENSE_ENUM_ADOBE,
    	PK_LICENSE_ENUM_ADSL,
    	PK_LICENSE_ENUM_AFL,
    	PK_LICENSE_ENUM_AGPLV1,
    	PK_LICENSE_ENUM_AMDPLPA,
    	PK_LICENSE_ENUM_AML,
    	PK_LICENSE_ENUM_AMPAS_BSD,
    	PK_LICENSE_ENUM_APSL_2_DOT_0,
    	PK_LICENSE_ENUM_ARL,
    	PK_LICENSE_ENUM_ARPHIC,
    	PK_LICENSE_ENUM_ARTISTIC_2_DOT_0,
    	PK_LICENSE_ENUM_ARTISTIC_CLARIFIED,
    	PK_LICENSE_ENUM_ASL_1_DOT_0,
    	PK_LICENSE_ENUM_ASL_1_DOT_1,
    	PK_LICENSE_ENUM_ASL_2_DOT_0,
    	PK_LICENSE_ENUM_BAEKMUK,
    	PK_LICENSE_ENUM_BEOPEN,
    	PK_LICENSE_ENUM_BITTORRENT,
    	PK_LICENSE_ENUM_BOOST,
    	PK_LICENSE_ENUM_BSD,
    	PK_LICENSE_ENUM_BSD_PROTECTION,
    	PK_LICENSE_ENUM_BSD_WITH_ADVERTISING,
    	PK_LICENSE_ENUM_CATOSL,
    	PK_LICENSE_ENUM_CC0,
    	PK_LICENSE_ENUM_CC_BY,
    	PK_LICENSE_ENUM_CC_BY_SA,
    	PK_LICENSE_ENUM_CDDL,
    	PK_LICENSE_ENUM_CDL,
    	PK_LICENSE_ENUM_CECILL,
    	PK_LICENSE_ENUM_CECILL_B,
    	PK_LICENSE_ENUM_CECILL_C,
    	PK_LICENSE_ENUM_CNRI,
    	PK_LICENSE_ENUM_CONDOR,
    	PK_LICENSE_ENUM_COPYRIGHT_ONLY,
    	PK_LICENSE_ENUM_CPAL,
    	PK_LICENSE_ENUM_CPL,
    	PK_LICENSE_ENUM_CRYSTAL_STACKER,
    	PK_LICENSE_ENUM_DOC,
    	PK_LICENSE_ENUM_DSL,
    	PK_LICENSE_ENUM_DVIPDFM,
    	PK_LICENSE_ENUM_ECL_1_DOT_0,
    	PK_LICENSE_ENUM_ECL_2_DOT_0,
    	PK_LICENSE_ENUM_ECOS,
    	PK_LICENSE_ENUM_EFL_2_DOT_0,
    	PK_LICENSE_ENUM_ENTESSA,
    	PK_LICENSE_ENUM_EPL,
    	PK_LICENSE_ENUM_ERPL,
    	PK_LICENSE_ENUM_EUPL_1_DOT_1,
    	PK_LICENSE_ENUM_EUROSYM,
    	PK_LICENSE_ENUM_EU_DATAGRID,
    	PK_LICENSE_ENUM_FAIR,
    	PK_LICENSE_ENUM_FBSDDL,
    	PK_LICENSE_ENUM_FREE_ART,
    	PK_LICENSE_ENUM_FTL,
    	PK_LICENSE_ENUM_GEOGRATIS,
    	PK_LICENSE_ENUM_GFDL,
    	PK_LICENSE_ENUM_GIFTWARE,
    	PK_LICENSE_ENUM_GL2PS,
    	PK_LICENSE_ENUM_GLIDE,
    	PK_LICENSE_ENUM_GNUPLOT,
    	PK_LICENSE_ENUM_GPLV1,
    	PK_LICENSE_ENUM_GPLV2,
    	PK_LICENSE_ENUM_GPLV2_OR_ARTISTIC,
    	PK_LICENSE_ENUM_GPLV2_PLUS,
    	PK_LICENSE_ENUM_GPLV2_PLUS_OR_ARTISTIC,
    	PK_LICENSE_ENUM_GPLV2_PLUS_WITH_EXCEPTIONS,
    	PK_LICENSE_ENUM_GPLV2_WITH_EXCEPTIONS,
    	PK_LICENSE_ENUM_GPLV3,
    	PK_LICENSE_ENUM_GPLV3_PLUS,
    	PK_LICENSE_ENUM_GPLV3_PLUS_WITH_EXCEPTIONS,
    	PK_LICENSE_ENUM_GPLV3_WITH_EXCEPTIONS,
    	PK_LICENSE_ENUM_GPL_PLUS,
    	PK_LICENSE_ENUM_GPL_PLUS_OR_ARTISTIC,
    	PK_LICENSE_ENUM_GPL_PLUS_WITH_EXCEPTIONS,
    	PK_LICENSE_ENUM_IBM,
    	PK_LICENSE_ENUM_IEEE,
    	PK_LICENSE_ENUM_IJG,
    	PK_LICENSE_ENUM_IMAGEMAGICK,
    	PK_LICENSE_ENUM_IMATIX,
    	PK_LICENSE_ENUM_IMLIB2,
    	PK_LICENSE_ENUM_INTEL_ACPI,
    	PK_LICENSE_ENUM_INTERBASE,
    	PK_LICENSE_ENUM_IPA,
    	PK_LICENSE_ENUM_ISC,
    	PK_LICENSE_ENUM_JABBER,
    	PK_LICENSE_ENUM_JASPER,
    	PK_LICENSE_ENUM_JPYTHON,
    	PK_LICENSE_ENUM_KNUTH,
    	PK_LICENSE_ENUM_LBNL_BSD,
    	PK_LICENSE_ENUM_LDPL,
    	PK_LICENSE_ENUM_LGPLV2,
    	PK_LICENSE_ENUM_LGPLV2_PLUS,
    	PK_LICENSE_ENUM_LGPLV2_PLUS_OR_ARTISTIC,
    	PK_LICENSE_ENUM_LGPLV2_PLUS_WITH_EXCEPTIONS,
    	PK_LICENSE_ENUM_LGPLV2_WITH_EXCEPTIONS,
    	PK_LICENSE_ENUM_LGPLV3,
    	PK_LICENSE_ENUM_LGPLV3_PLUS,
    	PK_LICENSE_ENUM_LGPLV3_PLUS_WITH_EXCEPTIONS,
    	PK_LICENSE_ENUM_LGPLV3_WITH_EXCEPTIONS,
    	PK_LICENSE_ENUM_LIBERATION,
    	PK_LICENSE_ENUM_LIBTIFF,
    	PK_LICENSE_ENUM_LLGPL,
    	PK_LICENSE_ENUM_LOGICA,
    	PK_LICENSE_ENUM_LPL,
    	PK_LICENSE_ENUM_LPPL,
    	PK_LICENSE_ENUM_MECAB_IPADIC,
    	PK_LICENSE_ENUM_MIROS,
    	PK_LICENSE_ENUM_MIT,
    	PK_LICENSE_ENUM_MIT_WITH_ADVERTISING,
    	PK_LICENSE_ENUM_MOD_MACRO,
    	PK_LICENSE_ENUM_MOTOSOTO,
    	PK_LICENSE_ENUM_MPLUS,
    	PK_LICENSE_ENUM_MPLV1_DOT_0,
    	PK_LICENSE_ENUM_MPLV1_DOT_1,
    	PK_LICENSE_ENUM_MS_PL,
    	PK_LICENSE_ENUM_MS_RL,
    	PK_LICENSE_ENUM_NAUMEN,
    	PK_LICENSE_ENUM_NCSA,
    	PK_LICENSE_ENUM_NETCDF,
    	PK_LICENSE_ENUM_NETSCAPE,
    	PK_LICENSE_ENUM_NEWMAT,
    	PK_LICENSE_ENUM_NGPL,
    	PK_LICENSE_ENUM_NOKIA,
    	PK_LICENSE_ENUM_NOSL,
    	PK_LICENSE_ENUM_NOWEB,
    	PK_LICENSE_ENUM_OAL,
    	PK_LICENSE_ENUM_OFL,
    	PK_LICENSE_ENUM_OFSFDL,
    	PK_LICENSE_ENUM_OML,
    	PK_LICENSE_ENUM_OPENLDAP,
    	PK_LICENSE_ENUM_OPENPBS,
    	PK_LICENSE_ENUM_OPENSSL,
    	PK_LICENSE_ENUM_OREILLY,
    	PK_LICENSE_ENUM_OSL_1_DOT_0,
    	PK_LICENSE_ENUM_OSL_1_DOT_1,
    	PK_LICENSE_ENUM_OSL_2_DOT_0,
    	PK_LICENSE_ENUM_OSL_2_DOT_1,
    	PK_LICENSE_ENUM_OSL_3_DOT_0,
    	PK_LICENSE_ENUM_PHORUM,
    	PK_LICENSE_ENUM_PHP,
    	PK_LICENSE_ENUM_PLEXUS,
    	PK_LICENSE_ENUM_POSTGRESQL,
    	PK_LICENSE_ENUM_PSUTILS,
    	PK_LICENSE_ENUM_PTFL,
    	PK_LICENSE_ENUM_PUBLIC_DOMAIN,
    	PK_LICENSE_ENUM_PUBLIC_USE,
    	PK_LICENSE_ENUM_PYTHON,
    	PK_LICENSE_ENUM_QHULL,
    	PK_LICENSE_ENUM_QPL,
    	PK_LICENSE_ENUM_RDISC,
    	PK_LICENSE_ENUM_RICEBSD,
    	PK_LICENSE_ENUM_ROMIO,
    	PK_LICENSE_ENUM_RPSL,
    	PK_LICENSE_ENUM_RUBY,
    	PK_LICENSE_ENUM_SAXPATH,
    	PK_LICENSE_ENUM_SCEA,
    	PK_LICENSE_ENUM_SCRIP,
    	PK_LICENSE_ENUM_SENDMAIL,
    	PK_LICENSE_ENUM_SISSL,
    	PK_LICENSE_ENUM_SLEEPYCAT,
    	PK_LICENSE_ENUM_SLIB,
    	PK_LICENSE_ENUM_SNIA,
    	PK_LICENSE_ENUM_SPL,
    	PK_LICENSE_ENUM_STIX,
    	PK_LICENSE_ENUM_TCL,
    	PK_LICENSE_ENUM_TEEWORLDS,
    	PK_LICENSE_ENUM_TMATE,
    	PK_LICENSE_ENUM_TOSL,
    	PK_LICENSE_ENUM_TPL,
    	PK_LICENSE_ENUM_UCD,
    	PK_LICENSE_ENUM_VIM,
    	PK_LICENSE_ENUM_VNLSL,
    	PK_LICENSE_ENUM_VOSTROM,
    	PK_LICENSE_ENUM_VSL,
    	PK_LICENSE_ENUM_W3C,
    	PK_LICENSE_ENUM_WADALAB,
    	PK_LICENSE_ENUM_WEBMIN,
    	PK_LICENSE_ENUM_WTFPL,
    	PK_LICENSE_ENUM_WXWIDGETS,
    	PK_LICENSE_ENUM_XANO,
    	PK_LICENSE_ENUM_XEROX,
    	PK_LICENSE_ENUM_XINETD,
    	PK_LICENSE_ENUM_XSKAT,
    	PK_LICENSE_ENUM_YPLV1_DOT_1,
    	PK_LICENSE_ENUM_ZEND,
    	PK_LICENSE_ENUM_ZLIB,
    	PK_LICENSE_ENUM_ZLIB_WITH_ACKNOWLEDGEMENT,
    	PK_LICENSE_ENUM_ZPLV1_DOT_0,
    	PK_LICENSE_ENUM_ZPLV2_DOT_0,
    	PK_LICENSE_ENUM_ZPLV2_DOT_1,
    	PK_LICENSE_ENUM_LAST
    } PkLicenseEnum;

### enum PkMediaTypeEnum

    typedef enum {
    	PK_MEDIA_TYPE_ENUM_UNKNOWN,
    	PK_MEDIA_TYPE_ENUM_CD,
    	PK_MEDIA_TYPE_ENUM_DVD,
    	PK_MEDIA_TYPE_ENUM_DISC,
    	PK_MEDIA_TYPE_ENUM_LAST
    } PkMediaTypeEnum;

The media type

### enum PkAuthorizeEnum

    typedef enum {
    	PK_AUTHORIZE_ENUM_UNKNOWN,
    	PK_AUTHORIZE_ENUM_YES,
    	PK_AUTHORIZE_ENUM_NO,
    	PK_AUTHORIZE_ENUM_INTERACTIVE,
    	PK_AUTHORIZE_ENUM_LAST
    } PkAuthorizeEnum;

The authorization result

### pk_enum_test ()

    void                pk_enum_test                        (gpointer user_data);

`user_data` : |

### pk_enum_find_value ()

    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"
Returns : | the enumerated constant value, e.g. PK_SIGTYPE_ENUM_GPG

### pk_enum_find_string ()

    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
Returns : | the string constant, e.g. "desktop-gnome"

### pk_sig_type_enum_from_string ()

    PkSigTypeEnum       pk_sig_type_enum_from_string        (const gchar *sig_type);

Converts a text enumerated type to its unsigned integer representation

`sig_type` : | Text describing the enumerated type
Returns : | the enumerated constant value, e.g. PK_SIGTYPE_ENUM_GPG

### pk_sig_type_enum_to_string ()

    const gchar *       pk_sig_type_enum_to_string          (PkSigTypeEnum sig_type);

Converts a enumerated type to its text representation

`sig_type` : | The enumerated type value
Returns : | the enumerated constant value, e.g. "available"

Since 0.5.0

### pk_info_enum_from_string ()

    PkInfoEnum          pk_info_enum_from_string            (const gchar *info);

Converts a text enumerated type to its unsigned integer representation

`info` : | Text describing the enumerated type
Returns : | the enumerated constant value, e.g. PK_SIGTYPE_ENUM_GPG

Since 0.5.0

### pk_info_enum_to_string ()

    const gchar *       pk_info_enum_to_string              (PkInfoEnum info);

Converts a enumerated type to its text representation

`info` : | The enumerated type value
Returns : | the enumerated constant value, e.g. "available"

Since 0.5.0

### pk_update_state_enum_from_string ()

    PkUpdateStateEnum   pk_update_state_enum_from_string    (const gchar *update_state);

Converts a text enumerated type to its unsigned integer representation

`update_state` : | Text describing the enumerated type
Returns : | the enumerated constant value, e.g. `PK_UPDATE_STATE_ENUM_STABLE`

Since 0.5.0

### pk_update_state_enum_to_string ()

    const gchar *       pk_update_state_enum_to_string      (PkUpdateStateEnum update_state);

Converts a enumerated type to its text representation

`update_state` : | The enumerated type value
Returns : | the enumerated constant value, e.g. "testing"

Since 0.5.0

### pk_exit_enum_from_string ()

    PkExitEnum          pk_exit_enum_from_string            (const gchar *exit);

Converts a text enumerated type to its unsigned integer representation

`exit` : | Text describing the enumerated type
Returns : | the enumerated constant value, e.g. PK_SIGTYPE_ENUM_GPG

Since 0.5.0

### pk_exit_enum_to_string ()

    const gchar *       pk_exit_enum_to_string              (PkExitEnum exit);

Converts a enumerated type to its text representation

`exit` : | The enumerated type value
Returns : | the enumerated constant value, e.g. "available"

Since 0.5.0

### pk_network_enum_from_string ()

    PkNetworkEnum       pk_network_enum_from_string         (const gchar *network);

Converts a text enumerated type to its unsigned integer representation

`network` : | Text describing the enumerated type
Returns : | the enumerated constant value, e.g. PK_SIGTYPE_ENUM_GPG

Since 0.5.0

### pk_network_enum_to_string ()

    const gchar *       pk_network_enum_to_string           (PkNetworkEnum network);

Converts a enumerated type to its text representation

`network` : | The enumerated type value
Returns : | the enumerated constant value, e.g. "available"

Since 0.5.0

### pk_status_enum_from_string ()

    PkStatusEnum        pk_status_enum_from_string          (const gchar *status);

Converts a text enumerated type to its unsigned integer representation

`status` : | Text describing the enumerated type
Returns : | the enumerated constant value, e.g. PK_SIGTYPE_ENUM_GPG

Since 0.5.0

### pk_status_enum_to_string ()

    const gchar *       pk_status_enum_to_string            (PkStatusEnum status);

Converts a enumerated type to its text representation

`status` : | The enumerated type value
Returns : | the enumerated constant value, e.g. "available"

Since 0.5.0

### pk_role_enum_from_string ()

    PkRoleEnum          pk_role_enum_from_string            (const gchar *role);

Converts a text enumerated type to its unsigned integer representation

`role` : | Text describing the enumerated type
Returns : | the enumerated constant value, e.g. PK_SIGTYPE_ENUM_GPG

Since 0.5.0

### pk_role_enum_to_string ()

    const gchar *       pk_role_enum_to_string              (PkRoleEnum role);

Converts a enumerated type to its text representation

`role` : | The enumerated type value
Returns : | the enumerated constant value, e.g. "available"

Since 0.5.0

### pk_error_enum_from_string ()

    PkErrorEnum         pk_error_enum_from_string           (const gchar *code);

Converts a text enumerated type to its unsigned integer representation

`code` : | Text describing the enumerated type
Returns : | the enumerated constant value, e.g. PK_SIGTYPE_ENUM_GPG

Since 0.5.0

### pk_error_enum_to_string ()

    const gchar *       pk_error_enum_to_string             (PkErrorEnum code);

Converts a enumerated type to its text representation

`code` : | The enumerated type value
Returns : | the enumerated constant value, e.g. "available"

Since 0.5.0

### pk_restart_enum_from_string ()

    PkRestartEnum       pk_restart_enum_from_string         (const gchar *restart);

Converts a text enumerated type to its unsigned integer representation

`restart` : | Text describing the enumerated type
Returns : | the enumerated constant value, e.g. PK_SIGTYPE_ENUM_GPG

Since 0.5.0

### pk_restart_enum_to_string ()

    const gchar *       pk_restart_enum_to_string           (PkRestartEnum restart);

Converts a enumerated type to its text representation

`restart` : | The enumerated type value
Returns : | the enumerated constant value, e.g. "available"

Since 0.5.0

### pk_message_enum_from_string ()

    PkMessageEnum       pk_message_enum_from_string         (const gchar *message);

Converts a text enumerated type to its unsigned integer representation

`message` : | Text describing the enumerated type
Returns : | the enumerated constant value, e.g. PK_SIGTYPE_ENUM_GPG

Since 0.5.0

### pk_message_enum_to_string ()

    const gchar *       pk_message_enum_to_string           (PkMessageEnum message);

Converts a enumerated type to its text representation

`message` : | The enumerated type value
Returns : | the enumerated constant value, e.g. "available"

Since 0.5.0

### pk_group_enum_from_string ()

    PkGroupEnum         pk_group_enum_from_string           (const gchar *group);

Converts a text enumerated type to its unsigned integer representation

`group` : | Text describing the enumerated type
Returns : | the enumerated constant value, e.g. PK_SIGTYPE_ENUM_GPG

Since 0.5.0

### pk_group_enum_to_string ()

    const gchar *       pk_group_enum_to_string             (PkGroupEnum group);

Converts a enumerated type to its text representation

`group` : | The enumerated type value
Returns : | the enumerated constant value, e.g. "available"

Since 0.5.0

### pk_filter_enum_from_string ()

    PkFilterEnum        pk_filter_enum_from_string          (const gchar *filter);

Converts a text enumerated type to its unsigned integer representation

`filter` : | Text describing the enumerated type
Returns : | the enumerated constant value, e.g. PK_SIGTYPE_ENUM_GPG

Since 0.5.0

### pk_filter_enum_to_string ()

    const gchar *       pk_filter_enum_to_string            (PkFilterEnum filter);

Converts a enumerated type to its text representation

`filter` : | The enumerated type value
Returns : | the enumerated constant value, e.g. "available"

Since 0.5.0

### pk_provides_enum_from_string ()

    PkProvidesEnum      pk_provides_enum_from_string        (const gchar *provides);

Converts a text enumerated type to its unsigned integer representation

`provides` : | Text describing the enumerated type
Returns : | the enumerated constant value, e.g. PK_PROVIDES_ENUM_MODALIAS

Since 0.5.0

### pk_provides_enum_to_string ()

    const gchar *       pk_provides_enum_to_string          (PkProvidesEnum provides);

Converts a enumerated type to its text representation

`provides` : | The enumerated type value
Returns : | the enumerated constant value, e.g. "codec"

Since 0.5.0

### pk_license_enum_from_string ()

    PkLicenseEnum       pk_license_enum_from_string         (const gchar *license);

Converts a text enumerated type to its unsigned integer representation

`license` : | Text describing the enumerated type
Returns : | the enumerated constant value, e.g. PK_SIGTYPE_ENUM_GPG

Since 0.5.0

### pk_license_enum_to_string ()

    const gchar *       pk_license_enum_to_string           (PkLicenseEnum license);

Converts a enumerated type to its text representation

`license` : | The enumerated type value
Returns : | the enumerated constant value, e.g. "available"

Since 0.5.0

### pk_distro_upgrade_enum_from_string ()

    PkDistroUpgradeEnum  pk_distro_upgrade_enum_from_string (const gchar *upgrade);

Converts a text enumerated type to its unsigned integer representation

`upgrade` : | Text describing the enumerated type
Returns : | the enumerated constant value, e.g. PK_DISTRO_UPGRADE_ENUM_STABLE

Since 0.5.0

### pk_distro_upgrade_enum_to_string ()

    const gchar *       pk_distro_upgrade_enum_to_string    (PkDistroUpgradeEnum upgrade);

Converts a enumerated type to its text representation

`upgrade` : | The enumerated type value
Returns : | the enumerated constant value, e.g. "stable"

Since 0.5.0

### pk_media_type_enum_from_string ()

    PkMediaTypeEnum     pk_media_type_enum_from_string      (const gchar *media_type);

Converts a text enumerated type to its unsigned integer representation

`media_type` : | Text describing the enumerated type
Returns : | the enumerated constant value, e.g. PK_MEDIA_TYPE_ENUM_CD

Since 0.5.0

### pk_media_type_enum_to_string ()

    const gchar *       pk_media_type_enum_to_string        (PkMediaTypeEnum media_type);

Converts a enumerated type to its text representation

`media_type` : | The enumerated type value
Returns : | the enumerated constant value, e.g. "dvd"

Since 0.5.0

### pk_authorize_type_enum_from_string ()

    PkAuthorizeEnum     pk_authorize_type_enum_from_string  (const gchar *authorize_type);

Converts a text enumerated type to its unsigned integer representation

`authorize_type` : | Text describing the enumerated type
Returns : | the enumerated constant value, e.g. `PK_AUTHORIZE_ENUM_YES`

Since 0.5.0

### pk_authorize_type_enum_to_string ()

    const gchar *       pk_authorize_type_enum_to_string    (PkAuthorizeEnum authorize_type);

Converts a enumerated type to its text representation

`authorize_type` : | The enumerated type value
Returns : | the enumerated constant value, e.g. "yes"

Since 0.5.0