| Top |
| #define | fu_plugin_get_flags() |
| #define | fu_plugin_has_flag() |
| #define | fu_plugin_add_flag() |
| #define | fu_plugin_remove_flag() |
| const gchar * | fu_plugin_get_name () |
| FuPluginData * | fu_plugin_get_data () |
| FuPluginData * | fu_plugin_alloc_data () |
| FuContext * | fu_plugin_get_context () |
| void | fu_plugin_set_build_hash () |
| void | fu_plugin_device_add () |
| void | fu_plugin_device_remove () |
| void | fu_plugin_device_register () |
| void | fu_plugin_add_device_gtype () |
| void | fu_plugin_add_firmware_gtype () |
| void | fu_plugin_add_udev_subsystem () |
| gpointer | fu_plugin_cache_lookup () |
| void | fu_plugin_cache_remove () |
| void | fu_plugin_cache_add () |
| GPtrArray * | fu_plugin_get_devices () |
| void | fu_plugin_add_rule () |
| void | fu_plugin_add_report_metadata () |
| gchar * | fu_plugin_get_config_value () |
| gboolean | fu_plugin_get_config_value_boolean () |
| gboolean | fu_plugin_set_config_value () |
| gboolean | fu_plugin_has_custom_flag () |
| #define | FU_TYPE_PLUGIN |
| struct | FuPluginClass |
| enum | FuPluginVerifyFlags |
| enum | FuPluginRule |
| typedef | FuPluginData |
| FuPlugin |
#define fu_plugin_remove_flag(p, f) fwupd_plugin_remove_flag(FWUPD_PLUGIN(p), f)
const gchar *
fu_plugin_get_name (FuPlugin *self);
Gets the plugin name.
Since: 0.8.0
FuPluginData *
fu_plugin_get_data (FuPlugin *self);
Gets the per-plugin allocated private data. This will return NULL unless
fu_plugin_alloc_data() has been called by the plugin.
Since: 0.8.0
FuContext *
fu_plugin_get_context (FuPlugin *self);
Gets the context for a plugin.
Since: 1.6.0
void fu_plugin_set_build_hash (FuPlugin *self,const gchar *build_hash);
Sets the plugin build hash, typically a SHA256 checksum. All plugins must set the correct checksum to avoid the daemon being marked as tainted.
Since: 1.2.4
void fu_plugin_device_add (FuPlugin *self,FuDevice *device);
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.
Plugins should use fu_plugin_device_add_delay() if they are not capable of
actually flashing an image to the hardware so that higher-priority plugins
can add the device themselves.
Since: 0.8.0
void fu_plugin_device_remove (FuPlugin *self,FuDevice *device);
Asks the daemon to remove a device from the exported list.
Since: 0.8.0
void fu_plugin_device_register (FuPlugin *self,FuDevice *device);
Registers the device with other plugins so they can set metadata.
Plugins do not have to call this manually as this is done automatically
when using fu_plugin_device_add(). They may wish to use this manually
if for instance the coldplug should be ignored based on the metadata
set from other plugins.
Since: 0.9.7
void fu_plugin_add_device_gtype (FuPlugin *self,GType device_gtype);
Adds the device GType which is used when creating devices.
If this method is used then fu_plugin_backend_device_added() is not called, and
instead the object is created in the daemon for the plugin.
Plugins can use this method only in fu_plugin_init()
Since: 1.6.0
void fu_plugin_add_firmware_gtype (FuPlugin *self,const gchar *id,GType gtype);
Adds a firmware GType which is used when creating devices. If id
is not
specified then it is guessed using the GType name.
Plugins can use this method only in fu_plugin_init()
Since: 1.3.3
void fu_plugin_add_udev_subsystem (FuPlugin *self,const gchar *subsystem);
Registers the udev subsystem to be watched by the daemon.
Plugins can use this method only in fu_plugin_init()
Since: 1.6.2
gpointer fu_plugin_cache_lookup (FuPlugin *self,const gchar *id);
Finds an object in the per-plugin cache.
Since: 0.8.0
void fu_plugin_cache_remove (FuPlugin *self,const gchar *id);
Removes an object from the per-plugin cache.
Since: 0.8.0
void fu_plugin_cache_add (FuPlugin *self,const gchar *id,gpointer dev);
Adds an object to the per-plugin cache.
Since: 0.8.0
GPtrArray *
fu_plugin_get_devices (FuPlugin *self);
Returns all devices added by the plugin using fu_plugin_device_add() and
not yet removed with fu_plugin_device_remove().
Since: 1.5.6
void fu_plugin_add_rule (FuPlugin *self,FuPluginRule rule,const gchar *name);
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.
NOTE: The depsolver is iterative and may not solve overly-complicated rules; If depsolving fails then fwupd will not start.
self |
a FuPlugin |
|
rule |
a plugin rule, e.g. |
|
name |
a plugin name, e.g. |
Since: 1.0.0
void fu_plugin_add_report_metadata (FuPlugin *self,const gchar *key,const gchar *value);
Sets any additional metadata to be included in the firmware report to aid debugging problems.
Any data included here will be sent to the metadata server after user confirmation.
Since: 1.0.4
gchar * fu_plugin_get_config_value (FuPlugin *self,const gchar *key);
Return the value of a key if it's been configured
Since: 1.0.6
gboolean fu_plugin_get_config_value_boolean (FuPlugin *self,const gchar *key);
Return the boolean value of a key if it's been configured
Since: 1.4.0
gboolean fu_plugin_set_config_value (FuPlugin *self,const gchar *key,const gchar *value,GError **error);
Sets a plugin config value.
self |
a FuPlugin |
|
key |
a settings key |
|
value |
a settings value. |
[nullable] |
error |
optional return location for an error. |
[nullable] |
Since: 1.7.0
struct FuPluginClass {
FwupdPluginClass parent_class;
/* signals */
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 (*config_changed)(FuPlugin *self);
};
The rules used for ordering plugins.
Plugins are expected to add rules in fu_plugin_initialize().