Class

FwupdDevice

Description [src]

class Fwupd.Device : GObject.Object {
  parent_instance: GObject
}

A physical device on the host with optionally updatable firmware.

See also: FwupdRelease

Ancestors

Constructors

fwupd_device_new

Creates a new device.

since: 0.9.3

Functions

fwupd_device_array_ensure_parents

Sets the parent object on all devices in the array using the parent ID.

since: 1.3.7

fwupd_device_array_filter_flags

Creates an array of new devices that match using fwupd_device_match_flags().

since: 1.9.3

fwupd_device_array_from_variant

Creates an array of new devices using serialized data.

since: 1.2.10

fwupd_device_flag_from_string

Converts a string to an enumerated device flag.

since: 0.7.0

fwupd_device_flag_to_string

Converts a device flag to a string.

since: 0.7.0

fwupd_device_from_variant

Creates a new device using serialized data.

since: 1.0.0

fwupd_device_id_is_valid

Checks the string is a valid non-partial device ID. It is important to note that the wildcard ID of * is not considered a valid ID in this function and the client must check for this manually if this should be allowed.

since: 1.4.1

fwupd_device_problem_from_string

Converts a string to a enumerated device inhibit kind.

since: 1.8.1

fwupd_device_problem_to_string

Converts a device inhibit kind to a string.

since: 1.8.1

Instance methods

fwupd_device_add_checksum

Adds a device checksum.

since: 0.9.3

fwupd_device_add_child

Adds a child device. An child device is logically linked to the primary device in some way.

since: 1.5.1

fwupd_device_add_flag

Adds a specific device flag to the device.

since: 0.9.3

fwupd_device_add_guid

Adds the GUID if it does not already exist.

since: 0.9.3

fwupd_device_add_icon

Adds the icon name if it does not already exist.

since: 0.9.8

fwupd_device_add_instance_id

Adds the instance ID if it does not already exist.

since: 1.2.5

fwupd_device_add_issue

Adds an current issue to this device.

since: 1.7.6

fwupd_device_add_problem

Adds a specific device problem kind to the device.

since: 1.8.1

fwupd_device_add_protocol

Adds a device protocol name.

since: 1.5.8

fwupd_device_add_release

Adds a release for this device.

since: 0.9.8

fwupd_device_add_request_flag

Adds a specific device request flag to the device.

since: 1.9.10

fwupd_device_add_vendor_id

Adds a device vendor ID.

since: 1.5.5

fwupd_device_compare

Comparison function for comparing two device objects.

since: 1.1.1

fwupd_device_from_json

Loads a fwupd security attribute from a JSON node.

since: 1.8.3

fwupd_device_get_battery_level

Returns the battery level.

since: 1.8.1

fwupd_device_get_battery_threshold

Returns the battery threshold under which a firmware update cannot be performed.

since: 1.8.1

fwupd_device_get_branch

Gets the current device branch.

since: 1.5.0

fwupd_device_get_checksums

Gets the device checksums.

since: 0.9.3

fwupd_device_get_children

Gets the device children. These can only be assigned using fwupd_device_set_parent().

since: 1.3.7

fwupd_device_get_composite_id

Gets the composite ID, falling back to the device ID if unset.

since: 1.6.0

fwupd_device_get_created

Gets when the device was created.

since: 0.9.3

fwupd_device_get_description

Gets the device description in AppStream markup format.

since: 0.9.3

fwupd_device_get_flags

Gets device flags.

since: 0.9.3

fwupd_device_get_flashes_left

Gets the number of flash cycles left on the device.

since: 0.9.3

fwupd_device_get_guid_default

Gets the default GUID.

since: 0.9.3

fwupd_device_get_guids

Gets the GUIDs.

since: 0.9.3

fwupd_device_get_icons

Gets the icon names to use for the device.

since: 0.9.8

fwupd_device_get_id

Gets the ID.

since: 0.9.3

fwupd_device_get_install_duration

Gets the time estimate for firmware installation (in seconds)

since: 1.1.3

fwupd_device_get_instance_ids

Gets the instance IDs.

since: 1.2.5

fwupd_device_get_issues

Gets the list of issues currently affecting this device.

since: 1.7.6

fwupd_device_get_modified

Gets when the device was modified.

since: 0.9.3

fwupd_device_get_name

Gets the device name.

since: 0.9.3

fwupd_device_get_parent

Gets the parent.

since: 1.0.8

fwupd_device_get_parent_id

Gets the parent ID.

since: 1.0.8

fwupd_device_get_percentage

Returns the percentage completion of the device.

since: 1.8.11

fwupd_device_get_plugin

Gets the plugin that created the device.

since: 1.0.0

fwupd_device_get_problems

Gets device problems.

since: 1.8.1

fwupd_device_get_protocol

Gets the protocol name that the device uses for updating.

deprecated: 1.5.8 since: 1.3.6

fwupd_device_get_protocols

Gets the device protocol names.

since: 1.5.8

fwupd_device_get_release_default

Gets the default release for this device.

since: 0.9.8

fwupd_device_get_releases

Gets all the releases for this device.

since: 0.9.8

fwupd_device_get_request_flags

Gets device request flags.

since: 1.9.10

fwupd_device_get_root

Gets the device root.

since: 1.7.4

fwupd_device_get_serial

Gets the serial number for the device.

since: 1.1.2

fwupd_device_get_status

Returns what the device is currently doing.

since: 1.4.0

fwupd_device_get_summary

Gets the device summary.

since: 0.9.3

fwupd_device_get_update_error

Gets the update error string.

since: 0.9.8

fwupd_device_get_update_image

Gets the update image URL.

since: 1.4.5

fwupd_device_get_update_message

Gets the update message string.

since: 1.2.4

fwupd_device_get_update_state

Gets the update state.

since: 0.9.8

fwupd_device_get_vendor

Gets the device vendor.

since: 0.9.3

fwupd_device_get_vendor_id

Gets the combined device vendor ID.

deprecated: 1.5.5 since: 0.9.4

fwupd_device_get_vendor_ids

Gets the device vendor ID.

since: 1.5.5

fwupd_device_get_version

Gets the device version.

since: 0.9.3

fwupd_device_get_version_bootloader

Gets the version of the bootloader.

since: 0.9.3

fwupd_device_get_version_bootloader_raw

Gets the bootloader version of firmware the device will accept in raw format.

since: 1.4.0

fwupd_device_get_version_build_date

Gets the date when the firmware was built.

since: 1.6.2

fwupd_device_get_version_format

Gets the version format.

since: 1.2.9

fwupd_device_get_version_lowest

Gets the lowest version of firmware the device will accept.

since: 0.9.3

fwupd_device_get_version_lowest_raw

Gets the lowest version of firmware the device will accept in raw format.

since: 1.4.0

fwupd_device_get_version_raw

Gets the raw version number from the hardware before converted to a string.

since: 1.3.6

fwupd_device_has_checksum

Finds out if the device has this specific checksum.

since: 1.8.7

fwupd_device_has_flag

Finds if the device has a specific device flag.

since: 0.9.3

fwupd_device_has_guid

Finds out if the device has this specific GUID.

since: 0.9.3

fwupd_device_has_icon

Finds out if the device has this specific icon.

since: 1.6.2

fwupd_device_has_instance_id

Finds out if the device has this specific instance ID.

since: 1.2.5

fwupd_device_has_problem

Finds if the device has a specific device problem kind.

since: 1.8.1

fwupd_device_has_protocol

Finds out if the device has this specific protocol name.

since: 1.5.8

fwupd_device_has_request_flag

Finds if the device has a specific device request flag.

since: 1.9.10

fwupd_device_has_vendor_id

Finds out if the device has this specific vendor ID.

since: 1.5.5

fwupd_device_incorporate

Copy all properties from the donor object if they have not already been set.

since: 1.1.0

fwupd_device_match_flags

Check if the device flags match.

since: 1.9.3

fwupd_device_remove_child

Removes a child device.

since: 1.6.2

fwupd_device_remove_flag

Removes a specific device flag from the device.

since: 0.9.3

fwupd_device_remove_problem

Removes a specific device problem kind from the device.

since: 1.8.1

fwupd_device_remove_request_flag

Removes a specific device request flag from the device.

since: 1.9.10

fwupd_device_set_battery_level

Sets the battery level, or FWUPD_BATTERY_LEVEL_INVALID.

since: 1.8.1

fwupd_device_set_battery_threshold

Sets the battery level, or FWUPD_BATTERY_LEVEL_INVALID for the default.

since: 1.8.1

fwupd_device_set_branch

Sets the current device branch.

since: 1.5.0

fwupd_device_set_composite_id

Sets the composite ID, which is usually a SHA1 hash of a grandparent or parent device.

since: 1.6.0

fwupd_device_set_created

Sets when the device was created.

since: 0.9.3

fwupd_device_set_description

Sets the device description.

since: 0.9.3

fwupd_device_set_flags

Sets device flags.

since: 0.9.3

fwupd_device_set_flashes_left

Sets the number of flash cycles left on the device.

since: 0.9.3

fwupd_device_set_id

Sets the ID.

since: 0.9.3

fwupd_device_set_install_duration

Sets the time estimate for firmware installation (in seconds)

since: 1.1.3

fwupd_device_set_modified

Sets when the device was modified.

since: 0.9.3

fwupd_device_set_name

Sets the device name.

since: 0.9.3

fwupd_device_set_parent

Sets the parent. Only used internally.

since: 1.0.8

fwupd_device_set_parent_id

Sets the parent ID.

since: 1.0.8

fwupd_device_set_percentage

Sets the percentage completion of the device.

since: 1.8.11

fwupd_device_set_plugin

Sets the plugin that created the device.

since: 1.0.0

fwupd_device_set_problems

Sets device problems.

since: 1.8.1

fwupd_device_set_protocol

Sets the protocol name that is used to update the device.

deprecated: 1.5.8 since: 1.3.6

fwupd_device_set_request_flags

Sets device request flags.

since: 1.9.10

fwupd_device_set_serial

Sets the serial number for the device.

since: 1.1.2

fwupd_device_set_status

Sets what the device is currently doing.

since: 1.4.0

fwupd_device_set_summary

Sets the device summary.

since: 0.9.3

fwupd_device_set_update_error

Sets the update error string.

since: 0.9.8

fwupd_device_set_update_image

Sets the update image URL.

since: 1.4.5

fwupd_device_set_update_message

Sets the update message string.

since: 1.2.4

fwupd_device_set_update_state

Sets the update state.

since: 0.9.8

fwupd_device_set_vendor

Sets the device vendor.

since: 0.9.3

fwupd_device_set_vendor_id

Sets the device vendor ID.

deprecated: 1.5.5 since: 0.9.4

fwupd_device_set_version

Sets the device version.

since: 0.9.3

fwupd_device_set_version_bootloader

Sets the bootloader version.

since: 0.9.3

fwupd_device_set_version_bootloader_raw

Sets the raw bootloader version number from the hardware before converted to a string.

since: 1.4.0

fwupd_device_set_version_build_date

Sets the date when the firmware was built.

since: 1.6.2

fwupd_device_set_version_format

Sets the version format.

since: 1.2.9

fwupd_device_set_version_lowest

Sets the lowest version of firmware the device will accept.

since: 0.9.3

fwupd_device_set_version_lowest_raw

Sets the raw lowest version number from the hardware before converted to a string.

since: 1.4.0

fwupd_device_set_version_raw

Sets the raw version number from the hardware before converted to a string.

since: 1.3.6

fwupd_device_to_json

Adds a fwupd device to a JSON builder.

since: 1.2.6

fwupd_device_to_json_full

Adds a fwupd device to a JSON builder Optionally provides additional data based upon flags.

since: 1.8.2

fwupd_device_to_string

Builds a text representation of the object.

since: 0.9.3

fwupd_device_to_variant

Serialize the device data omitting sensitive fields.

since: 1.0.0

fwupd_device_to_variant_full

Serialize the device data. Optionally provides additional data based upon flags.

since: 1.1.2

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Properties

Fwupd.Device:battery-level

The device battery level in percent.

since: 1.5.8

Fwupd.Device:battery-threshold

The device battery threshold in percent.

since: 1.5.8

Fwupd.Device:flags

The device flags.

since: 0.9.3

Fwupd.Device:parent

The device parent.

since: 1.0.8

Fwupd.Device:percentage

The current device percentage.

since: 1.8.11

Fwupd.Device:problems

The problems with the device that the user could fix, e.g. “lid open”.

since: 1.8.1

Fwupd.Device:protocol

The device protocol.

deprecated: 1.5.8 since: 1.3.6

Fwupd.Device:request-flags

The device request flags.

since: 1.9.10

Fwupd.Device:status

The current device status.

since: 1.4.0

Fwupd.Device:update-error

The device update error.

since: 0.9.8

Fwupd.Device:update-image

The update image for the device.

since: 1.4.5

Fwupd.Device:update-message

The device update message.

since: 1.2.4

Fwupd.Device:update-state

The device update state.

since: 0.9.8

Fwupd.Device:version

The device version.

since: 1.8.15

Fwupd.Device:version-format

The version format of the device.

since: 1.2.9

Signals

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct FwupdDeviceClass {
  GObjectClass parent_class;
  void (* _fwupd_reserved1) (
void
  );
  void (* _fwupd_reserved2) (
void
  );
  void (* _fwupd_reserved3) (
void
  );
  void (* _fwupd_reserved4) (
void
  );
  void (* _fwupd_reserved5) (
void
  );
  void (* _fwupd_reserved6) (
void
  );
  void (* _fwupd_reserved7) (
void
  );
  
}
No description available.
Class members
parent_class: GObjectClass
No description available.
_fwupd_reserved1: void (* _fwupd_reserved1) ( void )
No description available.
_fwupd_reserved2: void (* _fwupd_reserved2) ( void )
No description available.
_fwupd_reserved3: void (* _fwupd_reserved3) ( void )
No description available.
_fwupd_reserved4: void (* _fwupd_reserved4) ( void )
No description available.
_fwupd_reserved5: void (* _fwupd_reserved5) ( void )
No description available.
_fwupd_reserved6: void (* _fwupd_reserved6) ( void )
No description available.
_fwupd_reserved7: void (* _fwupd_reserved7) ( void )
No description available.