Commit Graph

21 Commits

Author SHA1 Message Date
Richard Hughes
dfaae2e837 Move amdgpu safety check into the plugin
There are now multiple plugins using drm_dp_aux_dev interface which
may potentially be combined with an amdgpu. Prevent exercising this
interface with any plugin using DP aux unless a new enough kernel is
installed.
2021-07-04 17:49:36 +01:00
Richard Hughes
e9cc87d740 trivial: Add some more missing GObjectIntrospection markup 2021-05-11 16:55:53 +01:00
Richard Hughes
faa35e430b Show a warning if the device has no GType and the plugin has no default
This also renames a symbol to make it clear that you can call it more than once.

Fixes https://github.com/fwupd/fwupd/issues/3148
2021-04-15 16:52:56 +01:00
Richard Hughes
b333e0045c Split out a shared system context
There is a lot of code in fwupd that just assigns a shared object type to
a FuPlugin, and then for each device on that plugin assigns that same shared
object to each FuDevice.

Rather than proxy several kinds of information stores over two different levels
of abstraction create a 'context' which contains the shared *system* state
between the daemon, the plugins and the daemon.

This will allow us to hold other per-machine state in the future, for instance
the system battery level or AC state.
2021-04-01 21:11:29 +01:00
Richard Hughes
c6569eff67 Remvoe the unused fu_plugin_set_coldplug_delay() 2021-04-01 16:01:06 +01:00
Richard Hughes
4ae7b5e837 Remove the unused fu_plugin_recoldplug() 2021-04-01 16:01:06 +01:00
Richard Hughes
250f30ceb9 trivial: Remove more deprecated API because we can
We bumped soversion, so lets clean up the API.
2021-04-01 13:12:45 +01:00
Richard Hughes
2d84386034 Remove unused, unsafe and deprecated functions from libfwupdplugin
Keeping *internal* API and ABI compatibility makes working with an already
complex codebase more mentally demanding than it needs to be.

Remember: plugins should be in-tree and upstream! If your out of tree plugin
stops working then it should be upstream.

The public-facing libfwupd will remain API and ABI stable for obvious reasons.
2021-03-09 15:47:56 +00:00
Richard Hughes
c81b755872 Be more strict for custom quirk keys
Rather than trying to guess typos, force each plugin to register the quirk
keys it supports, so we can show a sensible warning if required at startup on
the console.
2021-03-03 08:30:34 +00:00
Ricardo Cañuelo
536fb85e21 Add initial support for Bluez bluetooth devices
Bare skeleton for what will be the Bluez backend and the base bluetooth
device class.
2021-02-22 16:53:41 +01:00
Mario Limonciello
1313f23307 trivial: correct includes for fu-plugin.h
Needed for working "out of tree" compilation.
2021-01-22 14:01:25 -06:00
Richard Hughes
68ab1e44fd trivial: Add fu_plugin_get_devices() for general plugin use 2021-01-14 21:13:38 +00:00
Richard Hughes
1a3d3b338e Make GUsb optional for fuzzing 2021-01-14 14:23:12 +00:00
Richard Hughes
b19e05156e trivial: Allow plugins to call fu_plugin_remove_flag() 2021-01-13 09:13:12 +00:00
Richard Hughes
a2abc42760 libfwupdplugin: Use G_GNUC_WARN_UNUSED_RESULT for methods that should be checked 2021-01-04 15:24:35 +00:00
Richard Hughes
7bcb8d4385 Export FwupdPlugin so we can convey enumerated system errors to the end user
For instance, we can tell the user that UEFI UpdateCapsule is disabled in the
system firmware, or that efivarfs is not mounted. This is much better than
creating "dummy" devices which are really just hacks around the problem because
no better API existed. THe dummy devices cause as many problems as they solve.

Plugins have to set FWUPD_PLUGIN_FLAG_USER_WARNING if a warning should be shown
to the user, and only one warning will be shown of each failure type.

It is expected that GUI clients like gnome-software and gnome-firmware would use
this API to notify the user the localized message for why firmware updates are
not being shown.

Fixes https://github.com/fwupd/fwupd/issues/2456
2020-10-13 15:56:49 +01:00
Richard Hughes
399859e48b trivial: Allow plugins to signal that the security status has changed 2020-05-11 22:11:49 +01:00
Richard Hughes
c04f5a3e15 Add FuHidDevice abstraction
Quite a few plugins use HID commands to communicate with the hardware. At the
mement we have ~6 implementations of SET_REPORT and are soon to add one more.

Move this into common code.
2020-03-19 17:02:07 +00:00
Richard Hughes
334ba7994c trivial: Add helper fu_plugin_get_config_value_boolean() 2020-02-20 14:55:10 +00:00
Richard Hughes
dad3597e76 Allow other plugins to contribute report metadata 2019-12-06 15:05:16 +00:00
Mario Limonciello
6b0e66354b Convert libfwupdprivate to a shared library libfwupdplugin 2019-11-27 11:32:43 +00:00