Commit Graph

20 Commits

Author SHA1 Message Date
Richard Hughes
89064bf410 trivial: Downgrade a warning to avoid a lot of extra code 2021-07-12 19:01:55 +01:00
Richard Hughes
e64ebe8a7c trivial: Allow setting device inhibits from quirk files 2021-06-15 14:15:34 +01:00
Mario Limonciello
1e17457b16 Allow building the documentation with gi-docgen and gtk-doc
Until gi-docgen is declared stable support either of them.
This effectively means that hand builds and CI builds will use
gi-docgen, but distro builds use gtk-doc-tools.
2021-06-09 22:21:53 +01:00
Richard Hughes
20ef071b3c trivial: Style fixes to lots of gtk-doc 2021-05-10 14:35:10 +01:00
Richard Hughes
89d45a0d91 trivial: Standardize on introspection for @error and @cancellable
Also standarize on `Returns:` for the result.
2021-04-28 16:19:50 +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
0d4255b589 vli: Remove deprecated quirk prefixes 2021-04-01 18:40:14 +01:00
Richard Hughes
62a8b0c288
Add fu_device_set_battery_threshold() (#3086)
This allows a device to set a custom 'check battery level is X%' value from
either the plugin or from a quirk.
2021-03-31 16:43:36 +01: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
Richard Hughes
7d132b728c Simplify the quirk file format
The best way of not getting something wrong is to not require it in the first
place...

All plugins now use DeviceInstanceId-style quirk matches and we can just drop
the prefix in all files. We were treating HwId=, Guid= and DeviceInstanceId= in
exactly the same way -- they're just converted to GUIDs when building the silo!
2021-03-03 08:30:34 +00:00
Richard Hughes
6122034a19 Show a warning when parsing invalid quirk files
I just wasted more than two hours of my life over `DeviceID`.
2021-03-02 06:31:55 +00:00
Richard Hughes
5c9b1fcc81 Only include the start year in the copyright header
The end year is legally and functionally redundant, and more importantly causes
cherry-pick conflicts when trying to maintain old branches. Use git for history.
2021-01-07 14:48:16 +00:00
Richard Hughes
6a489a9eaf trivial: Add missing calls to g_return_val_if_fail() 2021-01-04 15:24:35 +00:00
Philip Withnall
aa48b6b0e3 libfwupdplugin: Support new libxmlb query binding API
See https://github.com/hughsie/libxmlb/pull/67. This doesn’t bump the
hard version dependency.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-12-08 14:39:40 +00:00
Richard Hughes
203ed841da trivial: Codespell fixes 2020-11-02 14:26:26 +00:00
Mario Limonciello
39bd45f4f7 trivial: don't show quirk directories skipped 2020-10-03 06:58:13 -05:00
Richard Hughes
c46aa815ea trivial: Do not show the libxmlb debugging by default 2020-09-28 16:43:12 +01:00
Daniel Campello
227cefb74f Use xb_builder_source_add_simple_adapter
Use xb_builder_source_add_simple_adapter instead
xb_builder_source_add_adapter to avoid sniffing MIME type for output xml
contents

Signed-off-by: Daniel Campello <campello@chromium.org>
Change-Id: I123c37339720b5844351f85a5aeb9cec4928785c
2020-02-27 19:01:28 +00:00
Richard Hughes
45a00738d8 Allow building on Windows with MinGW
Add various fixes to enable us to build a selection of useful USB plugins.
Also, skip tests that don't make sense on WIN32 or that will not work.

With much help from Mario Limonciello <mario.limonciello@dell.com> -- Thanks!
2019-12-03 16:33:43 +00:00
Mario Limonciello
6b0e66354b Convert libfwupdprivate to a shared library libfwupdplugin 2019-11-27 11:32:43 +00:00