## fwupd-enums fwupd-enums — enumerated values shared by the daemon and library |

## Functions

const gchar * | fwupd_status_to_string ()
FwupdStatus | fwupd_status_from_string ()
const gchar * | fwupd_device_flag_to_string ()
FwupdDeviceFlags | fwupd_device_flag_from_string ()
const gchar * | fwupd_release_flag_to_string ()
FwupdReleaseFlags | fwupd_release_flag_from_string ()
const gchar * | fwupd_update_state_to_string ()
FwupdUpdateState | fwupd_update_state_from_string ()
const gchar * | fwupd_trust_flag_to_string ()
FwupdTrustFlags | fwupd_trust_flag_from_string ()
FwupdKeyringKind | fwupd_keyring_kind_from_string ()
const gchar * | fwupd_keyring_kind_to_string ()

## Types and Values

enum | FwupdStatus
enum | FwupdTrustFlags
#define | FWUPD_DEVICE_FLAG_NONE
#define | FWUPD_DEVICE_FLAG_INTERNAL
#define | FWUPD_DEVICE_FLAG_UPDATABLE
#define | FWUPD_DEVICE_FLAG_ONLY_OFFLINE
#define | FWUPD_DEVICE_FLAG_REQUIRE_AC
#define | FWUPD_DEVICE_FLAG_LOCKED
#define | FWUPD_DEVICE_FLAG_SUPPORTED
#define | FWUPD_DEVICE_FLAG_REGISTERED
#define | FWUPD_DEVICE_FLAG_NEEDS_REBOOT
#define | FWUPD_DEVICE_FLAG_REPORTED
#define | FWUPD_DEVICE_FLAG_NOTIFIED
#define | FWUPD_DEVICE_FLAG_USE_RUNTIME_VERSION
#define | FWUPD_DEVICE_FLAG_INSTALL_PARENT_FIRST
#define | FWUPD_DEVICE_FLAG_WAIT_FOR_REPLUG
#define | FWUPD_DEVICE_FLAG_IGNORE_VALIDATION
#define | FWUPD_DEVICE_FLAG_TRUSTED
#define | FWUPD_DEVICE_FLAG_NEEDS_SHUTDOWN
#define | FWUPD_DEVICE_FLAG_ANOTHER_WRITE_REQUIRED
#define | FWUPD_DEVICE_FLAG_NO_AUTO_INSTANCE_IDS
#define | FWUPD_DEVICE_FLAG_NEEDS_ACTIVATION
#define | FWUPD_DEVICE_FLAG_UNKNOWN
typedef | FwupdDeviceFlags
#define | FWUPD_RELEASE_FLAG_NONE
#define | FWUPD_RELEASE_FLAG_TRUSTED_PAYLOAD
#define | FWUPD_RELEASE_FLAG_TRUSTED_METADATA
#define | FWUPD_RELEASE_FLAG_BLOCKED_VERSION
#define | FWUPD_RELEASE_FLAG_BLOCKED_APPROVAL
#define | FWUPD_RELEASE_FLAG_UNKNOWN
typedef | FwupdReleaseFlags
enum | FwupdInstallFlags
enum | FwupdSelfSignFlags
enum | FwupdUpdateState
enum | FwupdKeyringKind

## Description

This file also provides helper functions to map enums to strings and back again.

See also: fwupd-error

## Functions

### fwupd_status_to_string ()

    const gchar *
    fwupd_status_to_string (FwupdStatus status);

Converts a FwupdStatus to a string.

#### Parameters

status | A FwupdStatus, e.g. `FWUPD_STATUS_DECOMPRESSING` |

#### Returns

identifier string

Since: 0.1.1

### fwupd_status_from_string ()

    FwupdStatus
    fwupd_status_from_string (const gchar *status);

Converts a string to a FwupdStatus.

#### Parameters

status | A string, e.g. `decompressing` |

#### Returns

enumerated value

Since: 0.1.1

### fwupd_device_flag_to_string ()

    const gchar *
    fwupd_device_flag_to_string (FwupdDeviceFlags device_flag);

Converts a FwupdDeviceFlags to a string.

#### Parameters

device_flag | A FwupdDeviceFlags, e.g. `FWUPD_DEVICE_FLAG_REQUIRE_AC` |

#### Returns

identifier string

Since: 0.7.0

### fwupd_device_flag_from_string ()

    FwupdDeviceFlags
    fwupd_device_flag_from_string (const gchar *device_flag);

Converts a string to a FwupdDeviceFlags.

#### Parameters

device_flag | A string, e.g. `require-ac` |

#### Returns

enumerated value

Since: 0.7.0

### fwupd_release_flag_to_string ()

    const gchar *
    fwupd_release_flag_to_string (FwupdReleaseFlags release_flag);

Converts a FwupdReleaseFlags to a string.

#### Parameters

release_flag | A FwupdReleaseFlags, e.g. `FWUPD_RELEASE_FLAG_TRUSTED_PAYLOAD` |

#### Returns

identifier string

Since: 1.2.6

### fwupd_release_flag_from_string ()

    FwupdReleaseFlags
    fwupd_release_flag_from_string (const gchar *release_flag);

Converts a string to a FwupdReleaseFlags.

#### Parameters

release_flag | A string, e.g. `trusted-payload` |

#### Returns

enumerated value

Since: 1.2.6

### fwupd_update_state_to_string ()

    const gchar *
    fwupd_update_state_to_string (FwupdUpdateState update_state);

Converts a FwupdUpdateState to a string.

#### Parameters

update_state | A FwupdUpdateState, e.g. `FWUPD_UPDATE_STATE_PENDING` |

#### Returns

identifier string

Since: 0.7.0

### fwupd_update_state_from_string ()

    FwupdUpdateState
    fwupd_update_state_from_string (const gchar *update_state);

Converts a string to a FwupdUpdateState.

#### Parameters

update_state | A string, e.g. `pending` |

#### Returns

enumerated value

Since: 0.7.0

### fwupd_trust_flag_to_string ()

    const gchar *
    fwupd_trust_flag_to_string (FwupdTrustFlags trust_flag);

Converts a FwupdTrustFlags to a string.

#### Parameters

trust_flag | A FwupdTrustFlags, e.g. `FWUPD_TRUST_FLAG_PAYLOAD` |

#### Returns

identifier string

Since: 0.7.0

### fwupd_trust_flag_from_string ()

    FwupdTrustFlags
    fwupd_trust_flag_from_string (const gchar *trust_flag);

Converts a string to a FwupdTrustFlags.

#### Parameters

trust_flag | A string, e.g. `payload` |

#### Returns

enumerated value

Since: 0.7.0

### fwupd_keyring_kind_from_string ()

    FwupdKeyringKind
    fwupd_keyring_kind_from_string (const gchar *keyring_kind);

Converts an printable string to an enumerated type.

#### Parameters

keyring_kind | a string, e.g. `gpg` |

#### Returns

a FwupdKeyringKind, e.g. `FWUPD_KEYRING_KIND_GPG`

Since: 0.9.7

### fwupd_keyring_kind_to_string ()

    const gchar *
    fwupd_keyring_kind_to_string (FwupdKeyringKind keyring_kind);

Converts an enumerated type to a printable string.

#### Parameters

keyring_kind | a FwupdKeyringKind, e.g. `FWUPD_KEYRING_KIND_GPG` |

#### Returns

a string, e.g. `gpg`

Since: 0.9.7

## Types and Values

### enum FwupdStatus

The flags to show daemon status.

#### Members

FWUPD_STATUS_UNKNOWN | Unknown state |
FWUPD_STATUS_IDLE | Idle |
FWUPD_STATUS_LOADING | Loading a resource |
FWUPD_STATUS_DECOMPRESSING | Decompressing firmware |
FWUPD_STATUS_DEVICE_RESTART | Restarting the device |
FWUPD_STATUS_DEVICE_WRITE | Writing to a device |
FWUPD_STATUS_DEVICE_VERIFY | Verifying (reading) a device |
FWUPD_STATUS_SCHEDULING | Scheduling an offline update |
FWUPD_STATUS_DOWNLOADING | A file is downloading |
FWUPD_STATUS_DEVICE_READ | Reading from a device |
FWUPD_STATUS_DEVICE_ERASE | Erasing a device |
FWUPD_STATUS_WAITING_FOR_AUTH | Waiting for authentication |
FWUPD_STATUS_DEVICE_BUSY | The device is busy |
FWUPD_STATUS_SHUTDOWN | The daemon is shutting down |

### enum FwupdTrustFlags

The flags to show the level of trust.

#### Members

FWUPD_TRUST_FLAG_NONE | No trust |
FWUPD_TRUST_FLAG_PAYLOAD | The firmware is trusted |
FWUPD_TRUST_FLAG_METADATA | The metadata is trusted |

### FWUPD_DEVICE_FLAG_NONE

    #define FWUPD_DEVICE_FLAG_NONE			(0u)		/* Since: 0.1.3 */

### FWUPD_DEVICE_FLAG_INTERNAL

    #define FWUPD_DEVICE_FLAG_INTERNAL		(1u << 0) /* Since: 0.1.3 */

### FWUPD_DEVICE_FLAG_UPDATABLE

    #define FWUPD_DEVICE_FLAG_UPDATABLE		(1u << 1) /* Since: 0.9.7 */

### FWUPD_DEVICE_FLAG_ONLY_OFFLINE

    #define FWUPD_DEVICE_FLAG_ONLY_OFFLINE		(1u << 2) /* Since: 0.9.7 */

### FWUPD_DEVICE_FLAG_REQUIRE_AC

    #define FWUPD_DEVICE_FLAG_REQUIRE_AC		(1u << 3) /* Since: 0.6.3 */

### FWUPD_DEVICE_FLAG_LOCKED

    #define FWUPD_DEVICE_FLAG_LOCKED		(1u << 4) /* Since: 0.6.3 */

### FWUPD_DEVICE_FLAG_SUPPORTED

    #define FWUPD_DEVICE_FLAG_SUPPORTED		(1u << 5) /* Since: 0.7.1 */

### FWUPD_DEVICE_FLAG_REGISTERED

    #define FWUPD_DEVICE_FLAG_REGISTERED		(1u << 7) /* Since: 0.9.7 */

### FWUPD_DEVICE_FLAG_NEEDS_REBOOT

    #define FWUPD_DEVICE_FLAG_NEEDS_REBOOT		(1u << 8) /* Since: 0.9.7 */

### FWUPD_DEVICE_FLAG_REPORTED

    #define FWUPD_DEVICE_FLAG_REPORTED		(1u << 9) /* Since: 1.0.4 */

### FWUPD_DEVICE_FLAG_NOTIFIED

    #define FWUPD_DEVICE_FLAG_NOTIFIED		(1u << 10) /* Since: 1.0.5 */

### FWUPD_DEVICE_FLAG_USE_RUNTIME_VERSION

    #define FWUPD_DEVICE_FLAG_USE_RUNTIME_VERSION (1u << 11) /* Since: 1.0.6 */

### FWUPD_DEVICE_FLAG_INSTALL_PARENT_FIRST

    #define FWUPD_DEVICE_FLAG_INSTALL_PARENT_FIRST (1u << 12) /* Since: 1.0.8 */

### FWUPD_DEVICE_FLAG_WAIT_FOR_REPLUG

    #define FWUPD_DEVICE_FLAG_WAIT_FOR_REPLUG (1u << 14) /* Since: 1.1.2 */

### FWUPD_DEVICE_FLAG_IGNORE_VALIDATION

    #define FWUPD_DEVICE_FLAG_IGNORE_VALIDATION (1u << 15) /* Since: 1.1.2 */

### FWUPD_DEVICE_FLAG_TRUSTED

    #define FWUPD_DEVICE_FLAG_TRUSTED		(1u << 16) /* Since: 1.1.2 */

### FWUPD_DEVICE_FLAG_NEEDS_SHUTDOWN

    #define FWUPD_DEVICE_FLAG_NEEDS_SHUTDOWN (1u << 17) /* Since: 1.2.4 */

### FWUPD_DEVICE_FLAG_ANOTHER_WRITE_REQUIRED

    #define FWUPD_DEVICE_FLAG_ANOTHER_WRITE_REQUIRED (1u << 18) /* Since: 1.2.5 */

### FWUPD_DEVICE_FLAG_NO_AUTO_INSTANCE_IDS

    #define FWUPD_DEVICE_FLAG_NO_AUTO_INSTANCE_IDS (1u << 19) /* Since: 1.2.5 */

### FWUPD_DEVICE_FLAG_NEEDS_ACTIVATION

    #define FWUPD_DEVICE_FLAG_NEEDS_ACTIVATION (1u << 20) /* Since: 1.2.6 */

### FWUPD_DEVICE_FLAG_UNKNOWN

    #define FWUPD_DEVICE_FLAG_UNKNOWN		G_MAXUINT64 /* Since: 0.7.3 */

### FwupdDeviceFlags

    typedef guint64 FwupdDeviceFlags;

The device flags.

### FWUPD_RELEASE_FLAG_NONE

    #define FWUPD_RELEASE_FLAG_NONE			(0u)		/* Since: 1.2.6 */

### FWUPD_RELEASE_FLAG_TRUSTED_PAYLOAD

    #define FWUPD_RELEASE_FLAG_TRUSTED_PAYLOAD (1u << 0) /* Since: 1.2.6 */

### FWUPD_RELEASE_FLAG_TRUSTED_METADATA

    #define FWUPD_RELEASE_FLAG_TRUSTED_METADATA (1u << 1) /* Since: 1.2.6 */

### FWUPD_RELEASE_FLAG_BLOCKED_VERSION

    #define FWUPD_RELEASE_FLAG_BLOCKED_VERSION (1u << 4) /* Since: 1.2.6 */

### FWUPD_RELEASE_FLAG_BLOCKED_APPROVAL

    #define FWUPD_RELEASE_FLAG_BLOCKED_APPROVAL (1u << 5) /* Since: 1.2.6 */

### FWUPD_RELEASE_FLAG_UNKNOWN

    #define FWUPD_RELEASE_FLAG_UNKNOWN		G_MAXUINT64 /* Since: 1.2.6 */

### FwupdReleaseFlags

    typedef guint64 FwupdReleaseFlags;

The release flags.

### enum FwupdInstallFlags

Flags to set when performing the firwmare update or install.

#### Members

FWUPD_INSTALL_FLAG_NONE | No flags set |
FWUPD_INSTALL_FLAG_OFFLINE | Schedule this for next boot |
FWUPD_INSTALL_FLAG_ALLOW_REINSTALL | Allow reinstalling the same version |
FWUPD_INSTALL_FLAG_ALLOW_OLDER | Allow downgrading firmware |
FWUPD_INSTALL_FLAG_FORCE | Force the update even if not a good idea |
FWUPD_INSTALL_FLAG_NO_HISTORY | Do not write to the history database |

### enum FwupdSelfSignFlags

Flags to set when performing the firwmare update or install.

#### Members

FWUPD_SELF_SIGN_FLAG_NONE | No flags set |
FWUPD_SELF_SIGN_FLAG_ADD_TIMESTAMP | Add the timestamp to the detached signature |
FWUPD_SELF_SIGN_FLAG_ADD_CERT | Add the certificate to the detached signature |

### enum FwupdUpdateState

The update state.

#### Members

FWUPD_UPDATE_STATE_UNKNOWN | Unknown |
FWUPD_UPDATE_STATE_PENDING | Update is pending |
FWUPD_UPDATE_STATE_SUCCESS | Update was successful |
FWUPD_UPDATE_STATE_FAILED | Update failed |
FWUPD_UPDATE_STATE_NEEDS_REBOOT | Waiting for a reboot to apply |
FWUPD_UPDATE_STATE_FAILED_TRANSIENT | Update failed due to transient issue, e.g. AC power required |

### enum FwupdKeyringKind

The update state.

#### Members

FWUPD_KEYRING_KIND_UNKNOWN | Unknown |
FWUPD_KEYRING_KIND_NONE | No verification |
FWUPD_KEYRING_KIND_GPG | Verification using GPG |
FWUPD_KEYRING_KIND_PKCS7 | Verification using PKCS7 |