Class

FwupdPluginPlugin

Description [src]

class FwupdPlugin.Plugin : Fwupd.Plugin {
  parent_instance: FwupdPlugin
}

A plugin which is used by fwupd to enumerate and update devices.

See also: FuDevice, FwupdPlugin

Ancestors

  • FwupdPlugin
  • GObject

Constructors

fu_plugin_new

Creates a new FuPlugin.

Available since: 0.8.0

fu_plugin_new_from_gtype

Creates a new FuPlugin.

Available since: 1.8.6

Instance methods

fu_plugin_add_device_gtype

Adds the device GType which is used when creating devices.

Available since: 1.6.0

fu_plugin_add_device_udev_subsystem

Add this plugin as a possible handler of devices with this udev subsystem. Use fu_plugin_add_udev_subsystem() if you just want to ensure the subsystem is watched.

Available since: 1.9.3

fu_plugin_add_firmware_gtype

Adds a firmware GType which is used when creating devices. If id is not specified then it is guessed using the GType name.

Available since: 1.3.3

fu_plugin_add_report_metadata

Sets any additional metadata to be included in the firmware report to aid debugging problems.

Available since: 1.0.4

fu_plugin_add_rule

If the plugin name is found, the rule will be used to sort the plugin list, for example the plugin specified by name will be ordered after this plugin when FU_PLUGIN_RULE_RUN_AFTER is used.

Available since: 1.0.0

fu_plugin_add_string

Add daemon-specific device metadata to an existing string.

Available since: 1.8.4

fu_plugin_add_udev_subsystem

Registers the udev subsystem to be watched by the daemon.

Available since: 1.6.2

fu_plugin_alloc_data

Allocates the per-plugin allocated private data.

Available since: 0.8.0

fu_plugin_cache_add

Adds an object to the per-plugin cache.

Available since: 0.8.0

fu_plugin_cache_lookup

Finds an object in the per-plugin cache.

Available since: 0.8.0

fu_plugin_cache_remove

Removes an object from the per-plugin cache.

Available since: 0.8.0

fu_plugin_device_add

Asks the daemon to add a device to the exported list. If this device ID has already been added by a different plugin then this request will be ignored.

Available since: 0.8.0

fu_plugin_device_register

Registers the device with other plugins so they can set metadata.

Available since: 0.9.7

fu_plugin_device_remove

Asks the daemon to remove a device from the exported list.

Available since: 0.8.0

fu_plugin_get_config_value

Return the value of a key, falling back to the default value.

Available since: 1.0.6

fu_plugin_get_config_value_boolean

Return the boolean value of a key if it’s been configured.

Available since: 1.4.0

fu_plugin_get_context

Gets the context for a plugin.

Available since: 1.6.0

fu_plugin_get_data

Gets the per-plugin allocated private data. This will return NULL unless fu_plugin_alloc_data() has been called by the plugin.

Available since: 0.8.0

fu_plugin_get_device_gtype_default

Gets the default device GType.

Available since: 1.9.14

fu_plugin_get_devices

Returns all devices added by the plugin using fu_plugin_device_add() and not yet removed with fu_plugin_device_remove().

Available since: 1.5.6

fu_plugin_get_name

Gets the plugin name.

Available since: 0.8.0

fu_plugin_get_order

Gets the plugin order, where higher numbers are run after lower numbers.

Available since: 1.0.0

fu_plugin_get_priority

Gets the plugin priority, where higher numbers are better.

Available since: 1.1.1

fu_plugin_get_report_metadata

Returns the list of additional metadata to be added when filing a report.

Available since: 1.0.4

fu_plugin_get_rules

Gets the plugin IDs that should be run after this plugin.

Available since: 1.0.0

fu_plugin_has_rule

Gets the plugin IDs that should be run after this plugin.

Available since: 1.0.0

fu_plugin_is_open

Determines if the plugin is opened.

Available since: 1.3.5

fu_plugin_name_compare

Compares two plugins by their names.

Available since: 1.0.8

fu_plugin_open

Opens the plugin module, and calls ->load()“ on it.

Available since: 0.8.0

fu_plugin_order_compare

Compares two plugins by their depsolved order, and then by name.

Available since: 1.0.8

fu_plugin_runner_activate

Call into the plugin’s activate routine.

Available since: 1.2.6

fu_plugin_runner_add_security_attrs

Runs the add_security_attrs() routine for the plugin.

Available since: 1.5.0

fu_plugin_runner_attach

Runs the update_attach routine for the plugin.

Available since: 1.7.0

fu_plugin_runner_backend_device_added

Call the backend_device_added routine for the plugin.

Available since: 1.5.6

fu_plugin_runner_backend_device_changed

Call the backend_device_changed routine for the plugin.

Available since: 1.5.6

fu_plugin_runner_cleanup

Runs the update_cleanup routine for the plugin.

Available since: 1.7.0

fu_plugin_runner_clear_results

Call into the plugin’s clear results routine.

Available since: 0.8.0

fu_plugin_runner_coldplug

Runs the coldplug routine for the plugin.

Available since: 0.8.0

fu_plugin_runner_composite_cleanup

Runs the composite_cleanup routine for the plugin.

Available since: 1.0.9

fu_plugin_runner_composite_prepare

Runs the composite_prepare routine for the plugin.

Available since: 1.0.9

fu_plugin_runner_detach

Runs the update_detach routine for the plugin.

Available since: 1.7.0

fu_plugin_runner_device_added

Call the device_added routine for the plugin.

Available since: 1.5.0

fu_plugin_runner_device_created

Call the device_created routine for the plugin.

Available since: 1.4.0

fu_plugin_runner_device_register

Call the device_registered routine for the plugin.

Available since: 0.9.7

fu_plugin_runner_device_removed

Call the device_removed routine for the plugin.

Available since: 1.1.2

fu_plugin_runner_fix_host_security_attr

Fix the specific security attribute.

Available since: 1.9.6

fu_plugin_runner_get_results

Call into the plugin’s get results routine.

Available since: 0.8.0

fu_plugin_runner_init

Runs the constructed routine for the plugin, if enabled.

Available since: 1.8.1

fu_plugin_runner_prepare

Runs the update_prepare routine for the plugin.

Available since: 1.7.0

fu_plugin_runner_ready

Runs the ready routine for the plugin.

Available since: 1.9.6

fu_plugin_runner_reboot_cleanup

Performs cleanup actions after the reboot has been performed.

Available since: 1.9.7

fu_plugin_runner_reload

Runs reload routine for a device.

Available since: 1.7.0

fu_plugin_runner_startup

Runs the startup routine for the plugin.

Available since: 0.8.0

fu_plugin_runner_undo_host_security_attr

Fix the security issue of given security attribute.

Available since: 1.9.6

fu_plugin_runner_unlock

Call into the plugin’s unlock routine.

Available since: 0.8.0

fu_plugin_runner_verify

Call into the plugin’s verify routine.

Available since: 0.8.0

fu_plugin_runner_write_firmware

Call into the plugin’s write firmware routine.

Available since: 1.7.0

fu_plugin_security_attr_new

Creates a new FwupdSecurityAttr for this specific plugin.

Available since: 1.8.4

fu_plugin_set_config_default

Sets the config default value.

Available since: 2.0.0

fu_plugin_set_config_value

Sets a plugin config value.

Available since: 1.7.0

fu_plugin_set_context

Sets the context for this plugin.

Available since: 1.8.6

fu_plugin_set_device_gtype_default

Sets the default device GType.

Available since: 1.9.14

fu_plugin_set_name

Sets the plugin name.

Available since: 0.8.0

fu_plugin_set_order

Sets the plugin order, where higher numbers are run after lower numbers.

Available since: 1.0.0

fu_plugin_set_priority

Sets the plugin priority, where higher numbers are better.

Available since: 1.0.0

fu_plugin_to_string

This allows us to easily print the plugin metadata.

Available since: 1.8.4

Properties

FwupdPlugin.Plugin:context

The FuContext to use.

Available since: 1.8.6

Signals

FwupdPlugin.Plugin::check-supported

The ::check-supported signal is emitted when a plugin wants to ask the daemon if a specific device GUID is supported in the existing system metadata.

Available since: 1.0.0

FwupdPlugin.Plugin::device-added

The ::device-added signal is emitted when a device has been added by the plugin.

Available since: 0.8.0

FwupdPlugin.Plugin::device-register

The ::device-register signal is emitted when another plugin has added the device.

Available since: 0.9.7

FwupdPlugin.Plugin::device-removed

The ::device-removed signal is emitted when a device has been removed by the plugin.

Available since: 0.8.0

FwupdPlugin.Plugin::rules-changed
No description available.

Class structure

struct FwupdPluginPluginClass {
  FwupdPluginClass parent_class;
  void (* _device_added) (
    FuPlugin* self,
    FuDevice* device
  );
  void (* _device_removed) (
    FuPlugin* self,
    FuDevice* device
  );
  void (* _status_changed) (
    FuPlugin* self,
    FwupdStatus status
  );
  void (* _percentage_changed) (
    FuPlugin* self,
    guint percentage
  );
  void (* _device_register) (
    FuPlugin* self,
    FuDevice* device
  );
  gboolean (* _check_supported) (
    FuPlugin* self,
    const gchar* guid
  );
  void (* _rules_changed) (
    FuPlugin* self
  );
  void (* constructed) (
    GObject* obj
  );
  void (* finalize) (
    GObject* obj
  );
  gboolean (* startup) (
    FuPlugin* self,
    FuProgress* progress,
    GError** error
  );
  gboolean (* ready) (
    FuPlugin* self,
    FuProgress* progress,
    GError** error
  );
  gboolean (* coldplug) (
    FuPlugin* self,
    FuProgress* progress,
    GError** error
  );
  gboolean (* device_created) (
    FuPlugin* self,
    FuDevice* device,
    GError** error
  );
  void (* device_registered) (
    FuPlugin* self,
    FuDevice* device
  );
  void (* device_added) (
    FuPlugin* self,
    FuDevice* device
  );
  gboolean (* verify) (
    FuPlugin* self,
    FuDevice* device,
    FuProgress* progress,
    FuPluginVerifyFlags flags,
    GError** error
  );
  gboolean (* get_results) (
    FuPlugin* self,
    FuDevice* device,
    GError** error
  );
  gboolean (* clear_results) (
    FuPlugin* self,
    FuDevice* device,
    GError** error
  );
  gboolean (* backend_device_added) (
    FuPlugin* self,
    FuDevice* device,
    FuProgress* progress,
    GError** error
  );
  gboolean (* backend_device_changed) (
    FuPlugin* self,
    FuDevice* device,
    GError** error
  );
  gboolean (* backend_device_removed) (
    FuPlugin* self,
    FuDevice* device,
    GError** error
  );
  void (* add_security_attrs) (
    FuPlugin* self,
    FuSecurityAttrs* attrs
  );
  gboolean (* write_firmware) (
    FuPlugin* self,
    FuDevice* device,
    GBytes* blob_fw,
    FuProgress* progress,
    FwupdInstallFlags flags,
    GError** error
  );
  gboolean (* unlock) (
    FuPlugin* self,
    FuDevice* device,
    GError** error
  );
  gboolean (* activate) (
    FuPlugin* self,
    FuDevice* device,
    FuProgress* progress,
    GError** error
  );
  gboolean (* attach) (
    FuPlugin* self,
    FuDevice* device,
    FuProgress* progress,
    GError** error
  );
  gboolean (* detach) (
    FuPlugin* self,
    FuDevice* device,
    FuProgress* progress,
    GError** error
  );
  gboolean (* prepare) (
    FuPlugin* self,
    FuDevice* device,
    FuProgress* progress,
    FwupdInstallFlags flags,
    GError** error
  );
  gboolean (* cleanup) (
    FuPlugin* self,
    FuDevice* device,
    FuProgress* progress,
    FwupdInstallFlags flags,
    GError** error
  );
  gboolean (* composite_prepare) (
    FuPlugin* self,
    GPtrArray* devices,
    GError** error
  );
  gboolean (* composite_cleanup) (
    FuPlugin* self,
    GPtrArray* devices,
    GError** error
  );
  void (* load) (
    FuContext* ctx
  );
  void (* to_string) (
    FuPlugin* self,
    guint idt,
    GString* str
  );
  gboolean (* fix_host_security_attr) (
    FuPlugin* self,
    FwupdSecurityAttr* attr,
    GError** error
  );
  gboolean (* undo_host_security_attr) (
    FuPlugin* self,
    FwupdSecurityAttr* attr,
    GError** error
  );
  gboolean (* reboot_cleanup) (
    FuPlugin* self,
    FuDevice* device,
    GError** error
  );
  
}
Class members
parent_class
FwupdPluginClass
  No description available.
_device_added
void (* _device_added) (
    FuPlugin* self,
    FuDevice* device
  )
  No description available.
_device_removed
void (* _device_removed) (
    FuPlugin* self,
    FuDevice* device
  )
  No description available.
_status_changed
void (* _status_changed) (
    FuPlugin* self,
    FwupdStatus status
  )
  No description available.
_percentage_changed
void (* _percentage_changed) (
    FuPlugin* self,
    guint percentage
  )
  No description available.
_device_register
void (* _device_register) (
    FuPlugin* self,
    FuDevice* device
  )
  No description available.
_check_supported
gboolean (* _check_supported) (
    FuPlugin* self,
    const gchar* guid
  )
  No description available.
_rules_changed
void (* _rules_changed) (
    FuPlugin* self
  )
  No description available.
constructed
void (* constructed) (
    GObject* obj
  )
  No description available.
finalize
void (* finalize) (
    GObject* obj
  )
  No description available.
startup
gboolean (* startup) (
    FuPlugin* self,
    FuProgress* progress,
    GError** error
  )
  No description available.
ready
gboolean (* ready) (
    FuPlugin* self,
    FuProgress* progress,
    GError** error
  )
  No description available.
coldplug
gboolean (* coldplug) (
    FuPlugin* self,
    FuProgress* progress,
    GError** error
  )
  No description available.
device_created
gboolean (* device_created) (
    FuPlugin* self,
    FuDevice* device,
    GError** error
  )
  No description available.
device_registered
void (* device_registered) (
    FuPlugin* self,
    FuDevice* device
  )
  No description available.
device_added
void (* device_added) (
    FuPlugin* self,
    FuDevice* device
  )
  No description available.
verify
gboolean (* verify) (
    FuPlugin* self,
    FuDevice* device,
    FuProgress* progress,
    FuPluginVerifyFlags flags,
    GError** error
  )
  No description available.
get_results
gboolean (* get_results) (
    FuPlugin* self,
    FuDevice* device,
    GError** error
  )
  No description available.
clear_results
gboolean (* clear_results) (
    FuPlugin* self,
    FuDevice* device,
    GError** error
  )
  No description available.
backend_device_added
gboolean (* backend_device_added) (
    FuPlugin* self,
    FuDevice* device,
    FuProgress* progress,
    GError** error
  )
  No description available.
backend_device_changed
gboolean (* backend_device_changed) (
    FuPlugin* self,
    FuDevice* device,
    GError** error
  )
  No description available.
backend_device_removed
gboolean (* backend_device_removed) (
    FuPlugin* self,
    FuDevice* device,
    GError** error
  )
  No description available.
add_security_attrs
void (* add_security_attrs) (
    FuPlugin* self,
    FuSecurityAttrs* attrs
  )
  No description available.
write_firmware
gboolean (* write_firmware) (
    FuPlugin* self,
    FuDevice* device,
    GBytes* blob_fw,
    FuProgress* progress,
    FwupdInstallFlags flags,
    GError** error
  )
  No description available.
unlock
gboolean (* unlock) (
    FuPlugin* self,
    FuDevice* device,
    GError** error
  )
  No description available.
activate
gboolean (* activate) (
    FuPlugin* self,
    FuDevice* device,
    FuProgress* progress,
    GError** error
  )
  No description available.
attach
gboolean (* attach) (
    FuPlugin* self,
    FuDevice* device,
    FuProgress* progress,
    GError** error
  )
  No description available.
detach
gboolean (* detach) (
    FuPlugin* self,
    FuDevice* device,
    FuProgress* progress,
    GError** error
  )
  No description available.
prepare
gboolean (* prepare) (
    FuPlugin* self,
    FuDevice* device,
    FuProgress* progress,
    FwupdInstallFlags flags,
    GError** error
  )
  No description available.
cleanup
gboolean (* cleanup) (
    FuPlugin* self,
    FuDevice* device,
    FuProgress* progress,
    FwupdInstallFlags flags,
    GError** error
  )
  No description available.
composite_prepare
gboolean (* composite_prepare) (
    FuPlugin* self,
    GPtrArray* devices,
    GError** error
  )
  No description available.
composite_cleanup
gboolean (* composite_cleanup) (
    FuPlugin* self,
    GPtrArray* devices,
    GError** error
  )
  No description available.
load
void (* load) (
    FuContext* ctx
  )
  No description available.
to_string
void (* to_string) (
    FuPlugin* self,
    guint idt,
    GString* str
  )
  No description available.
fix_host_security_attr
gboolean (* fix_host_security_attr) (
    FuPlugin* self,
    FwupdSecurityAttr* attr,
    GError** error
  )
  No description available.
undo_host_security_attr
gboolean (* undo_host_security_attr) (
    FuPlugin* self,
    FwupdSecurityAttr* attr,
    GError** error
  )
  No description available.
reboot_cleanup
gboolean (* reboot_cleanup) (
    FuPlugin* self,
    FuDevice* device,
    GError** error
  )
  No description available.

Virtual methods

FwupdPlugin.PluginClass._check_supported
No description available.
FwupdPlugin.PluginClass._device_added
No description available.
FwupdPlugin.PluginClass._device_register
No description available.
FwupdPlugin.PluginClass._device_removed
No description available.
FwupdPlugin.PluginClass._rules_changed
No description available.
FwupdPlugin.PluginClass._status_changed
No description available.
FwupdPlugin.PluginClass.activate
No description available.
FwupdPlugin.PluginClass.add_security_attrs
No description available.
FwupdPlugin.PluginClass.attach
No description available.
FwupdPlugin.PluginClass.cleanup
No description available.
FwupdPlugin.PluginClass.clear_results
No description available.
FwupdPlugin.PluginClass.coldplug
No description available.
FwupdPlugin.PluginClass.composite_cleanup
No description available.
FwupdPlugin.PluginClass.composite_prepare
No description available.
FwupdPlugin.PluginClass.detach
No description available.
FwupdPlugin.PluginClass.device_added
No description available.
FwupdPlugin.PluginClass.device_created
No description available.
FwupdPlugin.PluginClass.device_registered
No description available.
FwupdPlugin.PluginClass.get_results
No description available.
FwupdPlugin.PluginClass.prepare
No description available.
FwupdPlugin.PluginClass.ready
No description available.
FwupdPlugin.PluginClass.reboot_cleanup
No description available.
FwupdPlugin.PluginClass.startup
No description available.
FwupdPlugin.PluginClass.to_string
No description available.
FwupdPlugin.PluginClass.unlock
No description available.
FwupdPlugin.PluginClass.verify
No description available.
FwupdPlugin.PluginClass.write_firmware
No description available.

Functions

fu_plugin_guess_name_from_fn

Tries to guess the name of the plugin from a filename.

Available since: 1.0.8