| fwupd Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
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_NEEDS_BOOTLOADER #define FWUPD_DEVICE_FLAG_REGISTERED #define FWUPD_DEVICE_FLAG_NEEDS_REBOOT #define FWUPD_DEVICE_FLAG_UNKNOWN typedef FwupdDeviceFlags; enum FwupdInstallFlags; enum FwupdUpdateState; enum FwupdKeyringKind; const gchar * fwupd_status_to_string (FwupdStatus status); FwupdStatus fwupd_status_from_string (const gchar *status); const gchar * fwupd_device_flag_to_string (FwupdDeviceFlags device_flag); FwupdDeviceFlags fwupd_device_flag_from_string (const gchar *device_flag); const gchar * fwupd_update_state_to_string (FwupdUpdateState update_state); FwupdUpdateState fwupd_update_state_from_string (const gchar *update_state); const gchar * fwupd_trust_flag_to_string (FwupdTrustFlags trust_flag); FwupdTrustFlags fwupd_trust_flag_from_string (const gchar *trust_flag); FwupdKeyringKind fwupd_keyring_kind_from_string (const gchar *keyring_kind); const gchar * fwupd_keyring_kind_to_string (FwupdKeyringKind keyring_kind);
This file also provides helper functions to map enums to strings and back again.
See also: fwupd-error
typedef enum {
FWUPD_STATUS_UNKNOWN, /* Since: 0.1.1 */
FWUPD_STATUS_IDLE, /* Since: 0.1.1 */
FWUPD_STATUS_LOADING, /* Since: 0.1.1 */
FWUPD_STATUS_DECOMPRESSING, /* Since: 0.1.1 */
FWUPD_STATUS_DEVICE_RESTART, /* Since: 0.1.1 */
FWUPD_STATUS_DEVICE_WRITE, /* Since: 0.1.1 */
FWUPD_STATUS_DEVICE_VERIFY, /* Since: 0.1.1 */
FWUPD_STATUS_SCHEDULING, /* Since: 0.1.1 */
FWUPD_STATUS_DOWNLOADING, /* Since: 0.9.4 */
FWUPD_STATUS_DEVICE_READ, /* Since: 1.0.0 */
FWUPD_STATUS_DEVICE_ERASE, /* Since: 1.0.0 */
FWUPD_STATUS_WAITING_FOR_AUTH, /* Since: 1.0.0 */
FWUPD_STATUS_DEVICE_BUSY, /* Since: 1.0.1 */
} FwupdStatus;
The flags to show daemon status.
| Unknown state | |
| Idle | |
| Loading a resource | |
| Decompressing firmware | |
| Restarting the device | |
| Writing to a device | |
| Verifying (reading) a device | |
| Scheduling an offline update | |
| A file is downloading | |
| Reading from a device | |
| Erasing a device | |
| Waiting for authentication | |
| The device is busy |
typedef enum {
FWUPD_TRUST_FLAG_NONE = 0, /* Since: 0.1.2 */
FWUPD_TRUST_FLAG_PAYLOAD = 1 << 0, /* Since: 0.1.2 */
FWUPD_TRUST_FLAG_METADATA = 1 << 1, /* Since: 0.1.2 */
} FwupdTrustFlags;
The flags to show the level of trust.
#define FWUPD_DEVICE_FLAG_NEEDS_BOOTLOADER (1u << 6) /* Since: 0.7.3 */
typedef enum {
FWUPD_INSTALL_FLAG_NONE = 0, /* Since: 0.7.0 */
FWUPD_INSTALL_FLAG_OFFLINE = 1, /* Since: 0.7.0 */
FWUPD_INSTALL_FLAG_ALLOW_REINSTALL = 2, /* Since: 0.7.0 */
FWUPD_INSTALL_FLAG_ALLOW_OLDER = 4, /* Since: 0.7.0 */
FWUPD_INSTALL_FLAG_FORCE = 8, /* Since: 0.7.1 */
} FwupdInstallFlags;
Flags to set when performing the firwmare update or install.
typedef enum {
FWUPD_UPDATE_STATE_UNKNOWN, /* Since: 0.7.0 */
FWUPD_UPDATE_STATE_PENDING, /* Since: 0.7.0 */
FWUPD_UPDATE_STATE_SUCCESS, /* Since: 0.7.0 */
FWUPD_UPDATE_STATE_FAILED, /* Since: 0.7.0 */
} FwupdUpdateState;
The update state.
typedef enum {
FWUPD_KEYRING_KIND_UNKNOWN, /* Since: 0.9.7 */
FWUPD_KEYRING_KIND_NONE, /* Since: 0.9.7 */
FWUPD_KEYRING_KIND_GPG, /* Since: 0.9.7 */
FWUPD_KEYRING_KIND_PKCS7, /* Since: 0.9.7 */
} FwupdKeyringKind;
The update state.
const gchar * fwupd_status_to_string (FwupdStatus status);
Converts a FwupdStatus to a string.
|
A FwupdStatus, e.g. FWUPD_STATUS_DECOMPRESSING
|
Returns : |
identifier string |
Since 0.1.1
FwupdStatus fwupd_status_from_string (const gchar *status);
Converts a string to a FwupdStatus.
|
A string, e.g. `decompressing` |
Returns : |
enumerated value |
Since 0.1.1
const gchar * fwupd_device_flag_to_string (FwupdDeviceFlags device_flag);
Converts a FwupdDeviceFlags to a string.
|
A FwupdDeviceFlags, e.g. FWUPD_DEVICE_FLAG_REQUIRE_AC
|
Returns : |
identifier string |
Since 0.7.0
FwupdDeviceFlags fwupd_device_flag_from_string (const gchar *device_flag);
Converts a string to a FwupdDeviceFlags.
|
A string, e.g. `require-ac` |
Returns : |
enumerated value |
Since 0.7.0
const gchar * fwupd_update_state_to_string (FwupdUpdateState update_state);
Converts a FwupdUpdateState to a string.
|
A FwupdUpdateState, e.g. FWUPD_UPDATE_STATE_PENDING
|
Returns : |
identifier string |
Since 0.7.0
FwupdUpdateState fwupd_update_state_from_string (const gchar *update_state);
Converts a string to a FwupdUpdateState.
|
A string, e.g. `pending` |
Returns : |
enumerated value |
Since 0.7.0
const gchar * fwupd_trust_flag_to_string (FwupdTrustFlags trust_flag);
Converts a FwupdTrustFlags to a string.
|
A FwupdTrustFlags, e.g. FWUPD_TRUST_FLAG_PAYLOAD
|
Returns : |
identifier string |
Since 0.7.0
FwupdTrustFlags fwupd_trust_flag_from_string (const gchar *trust_flag);
Converts a string to a FwupdTrustFlags.
|
A string, e.g. `payload` |
Returns : |
enumerated value |
Since 0.7.0
FwupdKeyringKind fwupd_keyring_kind_from_string (const gchar *keyring_kind);
Converts an printable string to an enumerated type.
|
a string, e.g. `gpg` |
Returns : |
a FwupdKeyringKind, e.g. FWUPD_KEYRING_KIND_GPG
|
Since 0.9.7
const gchar * fwupd_keyring_kind_to_string (FwupdKeyringKind keyring_kind);
Converts an enumerated type to a printable string.
|
a FwupdKeyringKind, e.g. FWUPD_KEYRING_KIND_GPG
|
Returns : |
a string, e.g. `gpg` |
Since 0.9.7