Class
FwupdPluginDevice
Description [src]
class FwupdPlugin.Device : Fwupd.Device {
parent_instance: FwupdDevice
}
A physical or logical device that is exported to the daemon.
See also: FuDeviceLocker
, FwupdDevice
Instance methods
fu_device_activate
Activates up a device, which normally means the device switches to a new firmware version. This should only be called when data loss cannot occur.
since: 1.2.6
fu_device_add_child
Sets any child device. An child device is logically linked to the primary device in some way.
since: 1.0.8
fu_device_add_counterpart_guid
Adds a GUID to the device. If the guid
argument is not a valid GUID then it
is converted to a GUID using fwupd_guid_hash_string().
since: 1.1.2
fu_device_add_guid
Adds a GUID to the device. If the guid
argument is not a valid GUID then it
is converted to a GUID using fwupd_guid_hash_string().
since: 0.7.2
fu_device_add_guid_full
Adds a GUID to the device. If the guid
argument is not a valid GUID then it
is converted to a GUID using fwupd_guid_hash_string().
since: 1.6.2
fu_device_add_instance_id
Adds an instance ID to the device. If the instance_id
argument is already a
valid GUID then fu_device_add_guid()
should be used instead.
since: 1.2.5
fu_device_add_internal_flag
Adds a private flag that stays internal to the engine and is not leaked to the client.
since: 1.5.5
fu_device_add_parent_guid
Sets any parent device using a GUID. An parent device is logically linked to
the primary device in some way and can be added before or after self
.
since: 1.0.8
fu_device_add_parent_physical_id
Sets any parent device using the physical ID. An parent device is logically
linked to the primary device in some way and can be added before or after self
.
since: 1.6.2
fu_device_add_possible_plugin
Adds a plugin name to the list of plugins that might be able to handle this device. This is typically called from a quirk handler.
since: 1.5.1
fu_device_add_private_flag
Adds a private flag that can be used by the plugin for any purpose.
since: 1.6.2
fu_device_add_problem
Prevent the device from being updated, changing it from FWUPD_DEVICE_FLAG_UPDATABLE
to FWUPD_DEVICE_FLAG_UPDATABLE_HIDDEN
if not already inhibited.
since: 1.8.1
fu_device_bind_driver
Binds a driver to the device, which normally means the kernel driver takes control of the hardware.
since: 1.5.0
fu_device_build_instance_id
Creates an instance ID from a prefix and some key values. If the key value cannot be found, the parent and then proxy is also queried.
since: 1.7.7
fu_device_build_instance_id_quirk
Creates an quirk-only instance ID from a prefix and some key values. If any of the key values are unset then no instance ID is added.
since: 1.7.7
fu_device_cleanup
Cleans up a device after an update. A different plugin can handle each of FuDevice->write_firmware(), FuDevice->attach() and FuDevice->cleanup().
since: 1.3.3
fu_device_convert_instance_ids
Converts all the Device instance IDs added using fu_device_add_instance_id()
into actual GUIDs, unless FU_DEVICE_INTERNAL_FLAG_NO_AUTO_INSTANCE_IDS
has
been set.
since: 1.2.5
fu_device_dump_firmware
Reads the raw firmware image from the device by calling a plugin-specific vfunc. This raw firmware image may contain serial numbers or device-specific configuration but should be a byte-for-byte match compared to using an external SPI programmer.
since: 1.5.0
fu_device_ensure_id
If not already set, generates a device ID with the optional physical and logical IDs.
since: 1.1.2
fu_device_get_acquiesce_delay
Returns the time the daemon should wait for devices to finish hotplugging after the update has completed.
since: 1.8.3
fu_device_get_alternate
Gets any alternate device. An alternate device may be linked to the primary device in some way.
since: 0.7.2
fu_device_get_alternate_id
Gets any alternate device ID. An alternate device may be linked to the primary device in some way.
since: 1.1.0
fu_device_get_backend_id
Gets the ID set for the device as recognized by the backend. This is typically a Linux sysfs path or USB platform ID. If unset, it also falls back to the physical ID as this may be the same value.
since: 1.5.8
fu_device_get_battery_threshold
Returns the battery threshold under which a firmware update cannot be performed.
since: 1.6.0
fu_device_get_children
Gets any child devices. A child device is logically “below” the current device and this may be reflected in client tools.
since: 1.0.8
fu_device_get_guids_as_str
Gets the device GUIDs as a joined string, which may be useful for error messages.
since: 1.0.8
fu_device_get_logical_id
Gets the logical ID set for the device, which disambiguates devices with the same physical ID.
since: 1.1.2
fu_device_get_order
Gets the device order, where higher numbers are installed after lower numbers.
since: 1.0.8
fu_device_get_parent
Gets any parent device. An parent device is logically “above” the current device and this may be reflected in client tools.
since: 1.0.8
fu_device_get_parent_guids
Gets any parent device GUIDs. If a device is added to the daemon that matches
any GUIDs added from fu_device_add_parent_guid()
then this device is marked the parent of self
.
since: 1.0.8
fu_device_get_parent_physical_ids
Gets any parent device IDs. If a device is added to the daemon that matches
the physical ID added from fu_device_add_parent_physical_id()
then this
device is marked the parent of self
.
since: 1.6.2
fu_device_get_physical_id
Gets the physical ID set for the device, which represents the electrical connection used to compare devices.
since: 1.1.2
fu_device_get_possible_plugins
Gets the list of possible plugin names, typically added from quirk files.
since: 1.3.3
fu_device_get_private_flags
Returns all the private flags that can be used by the plugin for any purpose.
since: 1.6.2
fu_device_get_proxy
Gets any proxy device. A proxy device can be used to perform an action on behalf of another device, for instance attach()ing it after a successful update.
since: 1.4.1
fu_device_get_proxy_guid
Gets the proxy GUID device, which is set to let the engine match up the proxy between plugins.
since: 1.4.1
fu_device_get_proxy_with_fallback
Gets the proxy device if FU_DEVICE_INTERNAL_FLAG_USE_PROXY_FALLBACK
is set, falling back to the
device itself.
since: 1.6.2
fu_device_get_remove_delay
Returns the maximum delay expected when replugging the device going into bootloader mode.
since: 1.0.2
fu_device_get_request_cnt
Returns the number of requests of a specific kind. This function is only
useful to the daemon, which uses it to synthesize artificial events for
plugins not yet ported to FwupdRequest
.
since: 1.6.2
fu_device_get_results
Gets the results of the last update operation on the device by calling a vfunc.
since: 1.6.2
fu_device_get_root
Gets the root parent device. A parent device is logically “above” the current device and this may be reflected in client tools.
since: 1.4.0
fu_device_get_update_request_id
Gets the update request ID as specified from LVFS::UpdateRequestId
.
since: 1.8.6
fu_device_has_internal_flag
Tests for a private flag that stays internal to the engine and is not leaked to the client.
since: 1.5.5
fu_device_has_private_flag
Tests for a private flag that can be used by the plugin for any purpose.
since: 1.6.2
fu_device_incorporate
Copy all properties from the donor object if they have not already been set.
since: 1.1.0
fu_device_inhibit
Prevent the device from being updated, changing it from FWUPD_DEVICE_FLAG_UPDATABLE
to FWUPD_DEVICE_FLAG_UPDATABLE_HIDDEN
if not already inhibited.
since: 1.6.0
fu_device_poll_locker_new
Returns a device locker that prevents polling on the device. If there are no open poll lockers then the poll callback will be called.
since: 1.8.1
fu_device_prepare
Prepares a device for update. A different plugin can handle each of FuDevice->prepare(), FuDevice->detach() and FuDevice->write_firmware().
since: 1.3.3
fu_device_prepare_firmware
Prepares the firmware by calling an optional device-specific vfunc for the device, which can do things like decompressing or parsing of the firmware data.
since: 1.1.2
fu_device_probe
Probes a device, setting parameters on the object that does not need the device open or the interface claimed. If the device is not compatible then an error should be returned.
since: 1.1.2
fu_device_probe_complete
Tell the device that all probing has finished. This allows it to release any resources that are only valid during coldplug or hotplug.
since: 1.8.12
fu_device_probe_invalidate
Normally when calling fu_device_probe()
multiple times it is only done once.
Calling this method causes the next requests to fu_device_probe()
and
fu_device_setup()
actually probe the hardware.
since: 1.1.2
fu_device_read_firmware
Reads firmware from the device by calling a plugin-specific vfunc. The device subclass should try to ensure the firmware does not contain any serial numbers or user-configuration values and can be used to calculate the device checksum.
since: 1.0.8
fu_device_register_private_flag
Registers a private device flag so that it can be set from quirk files.
since: 1.6.2
fu_device_reload
Reloads a device that has just gone from bootloader into application mode.
since: 1.3.3
fu_device_remove_internal_flag
Removes a private flag that stays internal to the engine and is not leaked to the client.
since: 1.5.5
fu_device_remove_private_flag
Removes a private flag that can be used by the plugin for any purpose.
since: 1.6.2
fu_device_remove_problem
Allow the device from being updated if there are no other inhibitors,
changing it from FWUPD_DEVICE_FLAG_UPDATABLE_HIDDEN
to FWUPD_DEVICE_FLAG_UPDATABLE
.
since: 1.8.1
fu_device_report_metadata_post
Collects metadata that would be useful for debugging a failed update report.
since: 1.5.0
fu_device_report_metadata_pre
Collects metadata that would be useful for debugging a failed update report.
since: 1.5.0
fu_device_rescan
Rescans a device, re-adding GUIDs or flags based on some hardware change.
since: 1.3.1
fu_device_retry
Calls a specific function a number of times, optionally handling the error with a reset action.
since: 1.4.0
fu_device_retry_add_recovery
Sets the optional function to be called when fu_device_retry()
fails, which
is possibly a device reset.
since: 1.4.0
fu_device_retry_full
Calls a specific function a number of times, optionally handling the error with a reset action.
since: 1.5.5
fu_device_set_acquiesce_delay
Sets the time the daemon should wait for devices to finish hotplugging after the update has completed.
since: 1.8.3
fu_device_set_alternate
Sets any alternate device. An alternate device may be linked to the primary device in some way.
since: 0.7.2
fu_device_set_alternate_id
Sets any alternate device ID. An alternate device may be linked to the primary device in some way.
since: 1.1.0
fu_device_set_backend_id
Sets the backend ID on the device. This is designed to disambiguate devices with the same physical ID. This is typically a Linux sysfs path or USB platform ID.
since: 1.5.8
fu_device_set_battery_threshold
Sets the battery level, or FWUPD_BATTERY_LEVEL_INVALID
for the default.
since: 1.6.0
fu_device_set_context
Sets the optional context which may be useful to this device. This is typically set after the device has been created, but before the device has been opened or probed.
since: 1.6.0
fu_device_set_custom_flags
Sets the custom flags from the quirk system that can be used to affect device matching. The actual string format is defined by the plugin.
since: 1.1.0
fu_device_set_id
Sets the ID on the device. The ID should represent the connection of the
device, so that any similar device plugged into a different slot will
have a different id
string.
since: 0.7.1
fu_device_set_logical_id
Sets the logical ID on the device. This is designed to disambiguate devices with the same physical ID.
since: 1.1.2
fu_device_set_metadata_boolean
Sets an item of metadata on the device. When value
is set to TRUE
the actual stored value is true
.
since: 0.9.7
fu_device_set_metadata_integer
Sets an item of metadata on the device. The integer is stored as a base-10 string internally.
since: 0.9.7
fu_device_set_name
Sets the name on the device. Any invalid parts will be converted or removed.
since: 0.7.1
fu_device_set_order
Sets the device order, where higher numbers are installed after lower numbers.
since: 1.0.8
fu_device_set_parent
Sets any parent device. An parent device is logically “above” the current device and this may be reflected in client tools.
since: 1.0.8
fu_device_set_physical_id
Sets the physical ID on the device which represents the electrical connection
of the device to the system. Multiple FuDevices
can share a physical ID.
since: 1.1.2
fu_device_set_poll_interval
Polls the hardware every interval period. If the subclassed ->poll()
method
returns FALSE
then a warning is printed to the console and the poll is
disabled until the next call to fu_device_set_poll_interval().
since: 1.1.2
fu_device_set_private_flags
Sets private flags that can be used by the plugin for any purpose.
since: 1.6.2
fu_device_set_proxy
Sets any proxy device. A proxy device can be used to perform an action on behalf of another device, for instance attach()ing it after a successful update.
since: 1.4.1
fu_device_set_proxy_guid
Sets the GUID of the proxy device. The proxy device may update self
.
since: 1.4.1
fu_device_set_remove_delay
Sets the amount of time a device is allowed to return in bootloader mode.
since: 1.0.2
fu_device_set_update_request_id
Sets the update request ID as specified in LVFS::UpdateRequestId
.
since: 1.8.6
fu_device_set_update_state
Sets the update state, clearing the update error as required.
since: 1.6.2
fu_device_set_version_bootloader
Sets the device bootloader version, sanitizing the string if required.
since: 1.4.0
fu_device_set_version_from_uint16
Sets the device version from a integer value and the device version format.
since: 1.8.9
fu_device_set_version_from_uint32
Sets the device version from a integer value and the device version format.
since: 1.8.9
fu_device_set_version_from_uint64
Sets the device version from a integer value and the device version format.
since: 1.8.9
fu_device_set_version_lowest
Sets the device lowest version, sanitizing the string if required.
since: 1.4.0
fu_device_setup
Sets up a device, setting parameters on the object that requires the device to be open and have the interface claimed. If the device is not compatible then an error should be returned.
since: 1.1.2
fu_device_sleep
Delays program execution up to 100 seconds, unless the device is emulated where no delays is performed.
since: 1.8.11
fu_device_sleep_full
Delays program execution up to 1000 seconds, unless the device is emulated where no delays is performed.
since: 1.8.11
fu_device_to_string
This allows us to easily print the device, the release and the daemon-specific metadata.
since: 0.9.8
fu_device_unbind_driver
Unbinds the driver from the device, which normally means the kernel releases the hardware so it can be used from userspace.
since: 1.5.0
fu_device_uninhibit
Allow the device from being updated if there are no other inhibitors,
changing it from FWUPD_DEVICE_FLAG_UPDATABLE_HIDDEN
to FWUPD_DEVICE_FLAG_UPDATABLE
.
since: 1.6.0
fu_device_write_firmware
Writes firmware to the device by calling a plugin-specific vfunc.
since: 1.0.8
Methods inherited from FwupdDevice (112)
Please see FwupdDevice for a full list of methods.
Properties
Properties inherited from FwupdDevice (13)
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: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-format
The version format of the device.
since: 1.2.9
Signals
FwupdPlugin.Device::child-added
The ::child-added signal is emitted when a device has been added as a child.
since: 1.0.8
FwupdPlugin.Device::child-removed
The ::child-removed signal is emitted when a device has been removed as a child.
since: 1.0.8
FwupdPlugin.Device::request
The ::request signal is emitted when the device needs interactive action from the user.
since: 1.6.2
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.