![]() |
![]() |
![]() |
fwupd Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#define FWUPD_TYPE_DEVICE struct FwupdDeviceClass; FwupdDevice * fwupd_device_new (void
); gchar * fwupd_device_to_string (FwupdDevice *device
); const gchar * fwupd_device_get_id (FwupdDevice *device
); void fwupd_device_set_id (FwupdDevice *device
,const gchar *id
); const gchar * fwupd_device_get_name (FwupdDevice *device
); void fwupd_device_set_name (FwupdDevice *device
,const gchar *name
); const gchar * fwupd_device_get_summary (FwupdDevice *device
); void fwupd_device_set_summary (FwupdDevice *device
,const gchar *summary
); const gchar * fwupd_device_get_description (FwupdDevice *device
); void fwupd_device_set_description (FwupdDevice *device
,const gchar *description
); const gchar * fwupd_device_get_version (FwupdDevice *device
); void fwupd_device_set_version (FwupdDevice *device
,const gchar *version
); const gchar * fwupd_device_get_version_lowest (FwupdDevice *device
); void fwupd_device_set_version_lowest (FwupdDevice *device
,const gchar *version_lowest
); const gchar * fwupd_device_get_version_bootloader (FwupdDevice *device
); void fwupd_device_set_version_bootloader (FwupdDevice *device
,const gchar *version_bootloader
); guint32 fwupd_device_get_flashes_left (FwupdDevice *device
); void fwupd_device_set_flashes_left (FwupdDevice *device
,guint32 flashes_left
); guint64 fwupd_device_get_flags (FwupdDevice *device
); void fwupd_device_set_flags (FwupdDevice *device
,guint64 flags
); void fwupd_device_add_flag (FwupdDevice *device
,FwupdDeviceFlags flag
); void fwupd_device_remove_flag (FwupdDevice *device
,FwupdDeviceFlags flag
); gboolean fwupd_device_has_flag (FwupdDevice *device
,FwupdDeviceFlags flag
); guint64 fwupd_device_get_created (FwupdDevice *device
); void fwupd_device_set_created (FwupdDevice *device
,guint64 created
); guint64 fwupd_device_get_modified (FwupdDevice *device
); void fwupd_device_set_modified (FwupdDevice *device
,guint64 modified
); GPtrArray * fwupd_device_get_checksums (FwupdDevice *device
); void fwupd_device_add_checksum (FwupdDevice *device
,const gchar *checksum
); const gchar * fwupd_device_get_plugin (FwupdDevice *device
); void fwupd_device_set_plugin (FwupdDevice *device
,const gchar *plugin
); const gchar * fwupd_device_get_vendor (FwupdDevice *device
); void fwupd_device_set_vendor (FwupdDevice *device
,const gchar *vendor
); const gchar * fwupd_device_get_vendor_id (FwupdDevice *device
); void fwupd_device_set_vendor_id (FwupdDevice *device
,const gchar *vendor_id
); void fwupd_device_add_guid (FwupdDevice *device
,const gchar *guid
); gboolean fwupd_device_has_guid (FwupdDevice *device
,const gchar *guid
); GPtrArray * fwupd_device_get_guids (FwupdDevice *device
); const gchar * fwupd_device_get_guid_default (FwupdDevice *device
); void fwupd_device_add_icon (FwupdDevice *device
,const gchar *icon
); GPtrArray * fwupd_device_get_icons (FwupdDevice *device
); FwupdUpdateState fwupd_device_get_update_state (FwupdDevice *device
); void fwupd_device_set_update_state (FwupdDevice *device
,FwupdUpdateState update_state
); const gchar * fwupd_device_get_update_error (FwupdDevice *device
); void fwupd_device_set_update_error (FwupdDevice *device
,const gchar *update_error
); void fwupd_device_add_release (FwupdDevice *device
,FwupdRelease *release
); GPtrArray * fwupd_device_get_releases (FwupdDevice *device
); FwupdRelease * fwupd_device_get_release_default (FwupdDevice *device
);
FwupdDevice * fwupd_device_new (void
);
Creates a new device.
Returns : |
a new FwupdDevice |
Since 0.9.3
gchar * fwupd_device_to_string (FwupdDevice *device
);
Builds a text representation of the object.
|
A FwupdDevice |
Returns : |
text, or NULL for invalid |
Since 0.9.3
const gchar * fwupd_device_get_id (FwupdDevice *device
);
Gets the ID.
|
A FwupdDevice |
Returns : |
the ID, or NULL if unset |
Since 0.9.3
void fwupd_device_set_id (FwupdDevice *device
,const gchar *id
);
Sets the ID.
|
A FwupdDevice |
|
the device ID, e.g. `USB:foo` |
Since 0.9.3
const gchar * fwupd_device_get_name (FwupdDevice *device
);
Gets the device name.
|
A FwupdDevice |
Returns : |
the device name, or NULL if unset |
Since 0.9.3
void fwupd_device_set_name (FwupdDevice *device
,const gchar *name
);
Sets the device name.
|
A FwupdDevice |
|
the device name, e.g. `ColorHug2` |
Since 0.9.3
const gchar * fwupd_device_get_summary (FwupdDevice *device
);
Gets the device summary.
|
A FwupdDevice |
Returns : |
the device summary, or NULL if unset |
Since 0.9.3
void fwupd_device_set_summary (FwupdDevice *device
,const gchar *summary
);
Sets the device summary.
|
A FwupdDevice |
|
the device one line summary |
Since 0.9.3
const gchar * fwupd_device_get_description (FwupdDevice *device
);
Gets the device description in AppStream markup format.
|
A FwupdDevice |
Returns : |
the device description, or NULL if unset |
Since 0.9.3
void fwupd_device_set_description (FwupdDevice *device
,const gchar *description
);
Sets the device description.
|
A FwupdDevice |
|
the description in AppStream markup format |
Since 0.9.3
const gchar * fwupd_device_get_version (FwupdDevice *device
);
Gets the device version.
|
A FwupdDevice |
Returns : |
the device version, or NULL if unset |
Since 0.9.3
void fwupd_device_set_version (FwupdDevice *device
,const gchar *version
);
Sets the device version.
|
A FwupdDevice |
|
the device version, e.g. `1.2.3` |
Since 0.9.3
const gchar * fwupd_device_get_version_lowest (FwupdDevice *device
);
Gets the lowest version of firmware the device will accept.
|
A FwupdDevice |
Returns : |
the device version_lowest, or NULL if unset |
Since 0.9.3
void fwupd_device_set_version_lowest (FwupdDevice *device
,const gchar *version_lowest
);
Sets the lowest version of firmware the device will accept.
|
A FwupdDevice |
|
the description |
Since 0.9.3
const gchar * fwupd_device_get_version_bootloader (FwupdDevice *device
);
Gets the version of the bootloader.
|
A FwupdDevice |
Returns : |
the device version_bootloader, or NULL if unset |
Since 0.9.3
void fwupd_device_set_version_bootloader (FwupdDevice *device
,const gchar *version_bootloader
);
Sets the bootloader version.
|
A FwupdDevice |
|
the description |
Since 0.9.3
guint32 fwupd_device_get_flashes_left (FwupdDevice *device
);
Gets the number of flash cycles left on the device
|
A FwupdDevice |
Returns : |
the flash cycles left, or NULL if unset |
Since 0.9.3
void fwupd_device_set_flashes_left (FwupdDevice *device
,guint32 flashes_left
);
Sets the number of flash cycles left on the device
|
A FwupdDevice |
|
the description |
Since 0.9.3
guint64 fwupd_device_get_flags (FwupdDevice *device
);
Gets the device flags.
|
A FwupdDevice |
Returns : |
the device flags, or 0 if unset |
Since 0.9.3
void fwupd_device_set_flags (FwupdDevice *device
,guint64 flags
);
Sets the device flags.
|
A FwupdDevice |
|
the device flags, e.g. FWUPD_DEVICE_FLAG_REQUIRE_AC
|
Since 0.9.3
void fwupd_device_add_flag (FwupdDevice *device
,FwupdDeviceFlags flag
);
Adds a specific device flag to the device.
|
A FwupdDevice |
|
the FwupdDeviceFlags |
Since 0.9.3
void fwupd_device_remove_flag (FwupdDevice *device
,FwupdDeviceFlags flag
);
Removes a specific device flag from the device.
|
A FwupdDevice |
|
the FwupdDeviceFlags |
Since 0.9.3
gboolean fwupd_device_has_flag (FwupdDevice *device
,FwupdDeviceFlags flag
);
Finds if the device has a specific device flag.
|
A FwupdDevice |
|
the FwupdDeviceFlags |
Returns : |
TRUE if the flag is set |
Since 0.9.3
guint64 fwupd_device_get_created (FwupdDevice *device
);
Gets when the device was created.
|
A FwupdDevice |
Returns : |
the UNIX time, or 0 if unset |
Since 0.9.3
void fwupd_device_set_created (FwupdDevice *device
,guint64 created
);
Sets when the device was created.
|
A FwupdDevice |
|
the UNIX time |
Since 0.9.3
guint64 fwupd_device_get_modified (FwupdDevice *device
);
Gets when the device was modified.
|
A FwupdDevice |
Returns : |
the UNIX time, or 0 if unset |
Since 0.9.3
void fwupd_device_set_modified (FwupdDevice *device
,guint64 modified
);
Sets when the device was modified.
|
A FwupdDevice |
|
the UNIX time |
Since 0.9.3
GPtrArray * fwupd_device_get_checksums (FwupdDevice *device
);
Gets the device checksums.
|
A FwupdDevice |
Returns : |
the checksums, which may be empty. [element-type utf8][transfer none] |
Since 0.9.3
void fwupd_device_add_checksum (FwupdDevice *device
,const gchar *checksum
);
Sets the device checksum.
|
A FwupdDevice |
|
the device checksum |
Since 0.9.3
const gchar * fwupd_device_get_plugin (FwupdDevice *device
);
Gets the plugin that created the device.
|
A FwupdDevice |
Returns : |
the plugin name, or NULL if unset |
Since 1.0.0
void fwupd_device_set_plugin (FwupdDevice *device
,const gchar *plugin
);
Sets the plugin that created the device.
|
A FwupdDevice |
|
the plugin name, e.g. `colorhug` |
Since 1.0.0
const gchar * fwupd_device_get_vendor (FwupdDevice *device
);
Gets the device vendor.
|
A FwupdDevice |
Returns : |
the device vendor, or NULL if unset |
Since 0.9.3
void fwupd_device_set_vendor (FwupdDevice *device
,const gchar *vendor
);
Sets the device vendor.
|
A FwupdDevice |
|
the description |
Since 0.9.3
const gchar * fwupd_device_get_vendor_id (FwupdDevice *device
);
Gets the device vendor ID.
|
A FwupdDevice |
Returns : |
the device vendor, e.g. 'USB:0x1234', or NULL if unset |
Since 0.9.4
void fwupd_device_set_vendor_id (FwupdDevice *device
,const gchar *vendor_id
);
Sets the device vendor ID.
|
A FwupdDevice |
|
the ID, e.g. 'USB:0x1234' |
Since 0.9.4
void fwupd_device_add_guid (FwupdDevice *device
,const gchar *guid
);
Adds the GUID if it does not already exist.
|
A FwupdDevice |
|
the GUID, e.g. `2082b5e0-7a64-478a-b1b2-e3404fab6dad` |
Since 0.9.3
gboolean fwupd_device_has_guid (FwupdDevice *device
,const gchar *guid
);
Finds out if the device has this specific GUID.
|
A FwupdDevice |
|
the GUID, e.g. `2082b5e0-7a64-478a-b1b2-e3404fab6dad` |
Returns : |
TRUE if the GUID is found |
Since 0.9.3
GPtrArray * fwupd_device_get_guids (FwupdDevice *device
);
Gets the GUIDs.
|
A FwupdDevice |
Returns : |
the GUIDs. [element-type utf8][transfer none] |
Since 0.9.3
const gchar * fwupd_device_get_guid_default (FwupdDevice *device
);
Gets the default GUID.
|
A FwupdDevice |
Returns : |
the GUID, or NULL if unset |
Since 0.9.3
void fwupd_device_add_icon (FwupdDevice *device
,const gchar *icon
);
Adds the icon name if it does not already exist.
|
A FwupdDevice |
|
the name, e.g. `input-mouse` or `/usr/share/icons/foo.png` |
Since 0.9.8
GPtrArray * fwupd_device_get_icons (FwupdDevice *device
);
Gets the icon names to use for the device.
NOTE: Icons specified without a full path are stock icons and should be loaded from the users icon theme.
|
A FwupdDevice |
Returns : |
an array of icon names. [element-type utf8][transfer none] |
Since 0.9.8
FwupdUpdateState fwupd_device_get_update_state (FwupdDevice *device
);
Gets the update state.
|
A FwupdDevice |
Returns : |
the update state, or FWUPD_UPDATE_STATE_UNKNOWN if unset |
Since 0.9.8
void fwupd_device_set_update_state (FwupdDevice *device
,FwupdUpdateState update_state
);
Sets the update state.
|
A FwupdDevice |
|
the state, e.g. FWUPD_UPDATE_STATE_PENDING
|
Since 0.9.8
const gchar * fwupd_device_get_update_error (FwupdDevice *device
);
Gets the update error.
|
A FwupdDevice |
Returns : |
the update error, or NULL if unset |
Since 0.9.8
void fwupd_device_set_update_error (FwupdDevice *device
,const gchar *update_error
);
Sets the update error.
|
A FwupdDevice |
|
the update error string |
Since 0.9.8
void fwupd_device_add_release (FwupdDevice *device
,FwupdRelease *release
);
Adds a release for this device.
|
A FwupdDevice |
|
a FwupdRelease |
Since 0.9.8
GPtrArray * fwupd_device_get_releases (FwupdDevice *device
);
Gets all the releases for this device.
|
A FwupdDevice |
Returns : |
array of releases. [transfer none][element-type FwupdRelease] |
Since 0.9.8