Commit Graph

79 Commits

Author SHA1 Message Date
Richard Hughes
87f8a4a284 Add a waiting-for-auth daemon state
Using IDLE for this isn't right as we're basically blocked on the user.
2017-10-02 14:50:26 +01:00
Richard Hughes
b73ff8a346 trivial: Use FwupdStatus in the dfu plugin 2017-09-28 09:23:52 +01:00
Richard Hughes
94110f5983 Remove some deprecated #define names and bump the soname
Also, bump soname as we're going to clean up a lot of things now.

Many thanks to Mario Limonciello for all the Debian-specific changes.
2017-09-28 09:23:52 +01:00
Richard Hughes
b4fd0dfd7d Move deprecated symbols to a new header
This does two things:

 * Allows new users of the library to see only the supported symbols
 * Allows us to ensure we're not using deprecated API internally

I can also use this in gnome-software in CI to make sure we're not using
deprecated API too. I don't think we're ready for a soname bump so we have to
hang on to the deprecated code for now.
2017-09-08 13:31:01 +01:00
Richard Hughes
a785a1c2f6 Remove the confusing ALLOW_OFFLINE and ALLOW_ONLINE flags
Over the months the original meaning of ALLOW_OFFLINE and ALLOW_ONLINE have be
lost, and there is now a confusing mixture of uses in the source tree. With this
commit we make it clear the UPDATABLE flag is used to specify when the device is
updatable (e.g. from the desktop live session, or from the systemd offline
updates mode, or both) and the NEEDS_REBOOT flag lets us know when the update
is actually going to be done.

For instance, a UEFI UpdateCapsule can be *scheduled* from either the desktop
or from the update mode (but the latter would be a bit weird), but does require
a reboot. Some devices might only be updatable outside the live session, for
instance a hard drive update or a GPU update -- there's just too much going on
with a live session and we want to tightly control what's running during the
firmware flash.

This also means we don't have to "retry" the update when scheduling an update
that really can be scheduled whenever, but just requires a reboot to apply.
2017-08-26 18:09:21 +01:00
Richard Hughes
e1fd34d5f1 Allow plugins to set metadata on devices created by other plugins
This could be used, for instance, to set a property on ThunderBolt controllers
inside Dell computers saying that they support forcing the power level during
coldplug. It could also be used to set the dock type for the synapticsmst hub.

Adding this level of complexity allows us to avoid the creep of HAVE_DELL and
HAVE_LENOVO into seemingly unrelated plugins, and also allows us to have
multiple vendor plugins providing the same end result with two different
vendor-specific mechanisms.
2017-08-24 16:15:11 +01:00
Richard Hughes
7403dc505f Optionally use GnuTLS to verify PKCS7 certificates
We can use this as an alternative for GPG. No PKCS7 certificates are currently
installed by fwupd and it's expected that the LVFS will still only provide GPG
detached signatures.

If an OEM distributor wants to sign firmware with a PKCS7 and the corresponding
certificate is provided then the firmware will be marked as valid.

Only firmware shipping with a .p7b file will use the PKCS7 functionality,
similarly remote metadata validation will default to GPG unless Keyring=pkcs7
is specified in the config file.
2017-08-14 09:42:48 +01:00
Richard Hughes
2899cb28d5 Show progress download when refreshing metadata 2017-06-13 16:31:18 +01:00
Richard Hughes
812d1b708d trivial: Spit out non-enum functionality into a common file 2017-06-06 16:27:47 +01:00
Richard Hughes
644562e291 Use the correct define prefix for FwupdDeviceFlags
Also, add the compat flags so we don't break API.
2016-08-22 10:30:24 +01:00
Richard Hughes
adb7a4979b Add FU_DEVICE_FLAG_NEEDS_BOOTLOADER 2016-08-17 17:46:15 +01:00
Richard Hughes
33a518a615 Add another compile warning and fix up any build failures 2016-07-27 16:57:36 +01:00
Richard Hughes
2c553607e3 trivial: Fix gtk-doc wording of the device flags 2016-05-17 16:05:49 +01:00
Mario Limonciello
71a5b98d30 Add support for a --force flag to override provider warnings
Under some circumstances a provider may want to prevent a user from
performing a flash without additional user interaction.

Providers can opt into this behavior by checking for
FWUPD_INSTALL_FLAG_FORCE in the update routine.
2016-05-10 15:41:16 -05:00
Richard Hughes
4f4e1f3478 Add a 'supported' flag to the FuDevice
This is TRUE when the device has been found in the LVFS metadata.
2016-04-28 16:56:23 +01:00
Richard Hughes
5ac25f32e0 Generate gtk-doc documentation for libfwupd 2016-04-01 11:22:31 +01:00
Richard Hughes
2d6e186800 Rename some of the new libfwupd API to align with the D-Bus names 2016-03-18 09:20:40 +00:00
Richard Hughes
b94f2f0488 Export FwupdUpdateFlags in libfwupd 2016-03-17 09:52:00 +00:00
Richard Hughes
a475eecda2 Export FwupdUpdateState in libfwupd 2016-03-17 09:48:34 +00:00
Richard Hughes
c1e3ded9a3 Add fwupd_trust_flag_to_string() 2016-03-17 09:43:04 +00:00
Richard Hughes
da887df142 trivial: Add note for next API break 2016-03-17 09:42:52 +00:00
Richard Hughes
23583f9d0b Add fwupd_device_flag_to_string() 2016-03-15 16:31:47 +00:00
Richard Hughes
9a410ce459 Add an unlock method for devices
This is based on an idea from Mario Limonciello which can be used to enable a
PCI OptionROM read, or possibly enable ESRT functionality.
2016-03-02 10:17:02 +00:00
Richard Hughes
b75c92db47 Require AC power before scheduling some types of firmware update
Fixes half of https://github.com/hughsie/fwupd/issues/42
2016-02-20 20:25:56 +00:00
Richard Hughes
441785d215 trivial: Fix up some harmless lint, no code changes 2015-07-28 14:56:19 +01:00
Richard Hughes
d7dba98e68 Move boolean properties on the device to a set of flags
This is much less boilerplate and allows us to expand in the future.
2015-05-05 16:02:20 +01:00
Richard Hughes
046db72555 Add an UNKNOWN status so we can return meaningful enum values 2015-04-24 12:33:16 +01:00
Richard Hughes
8a08f9d8f3 Verify firmware if a detached signature is present 2015-04-14 15:41:44 +01:00
Richard Hughes
f910ac9541 trivial: Also export the status enum codes 2015-03-19 10:54:06 +00:00