Commit Graph

57 Commits

Author SHA1 Message Date
Richard Hughes
0bc65b5e97 Export the device state as part of the D-Bus interface 2020-04-07 15:04:01 +01:00
Mario Limonciello
96117d19df trivial: 1.3.9->1.4.0
We decided to branch at 1.3.8 and backport fix only things for 1_3_X.
So bump all the new stuff to 1.4.0 (which will be next release)
2020-02-28 10:17:56 -06:00
Mario Limonciello
c1776c9ad4 Add raw versions for bootloader and lowest
The assumption is that same version format is used for all 3 of these
versions.
2020-02-25 12:20:51 +00:00
Richard Hughes
30ef455d50 Allow the client to get the list of FwupdDevice children
These can only be assigned using fwupd_device_set_parent(), typically from
fwupd_device_array_ensure_parents().
2020-01-06 15:16:48 +00:00
Richard Hughes
0ef47201eb Set the FwupdDevice parents in fwupdtool
This requires splitting out a helper function as a new symbol so it can be used
without fwupd_device_array_from_variant().
2020-01-06 15:16:48 +00:00
Richard Hughes
0731b825f4 trivial: Render large values of VersionRaw in a more portable way 2019-12-05 10:56:41 -06:00
Richard Hughes
da80c1bda3 trivial: Convert the VersionRaw value to a uint64_t for future use
This has not been in any tarball release and so isn't a ABI break.
2019-12-03 10:46:17 -06:00
Richard Hughes
10079e6b8c Export the raw device version to the client --verbose output
It turns out this is really useful for debugging UEFI firmware updates which
typically use the 0x-prefixed version numbers without a version format.
2019-12-02 06:51:25 +00:00
Richard Hughes
4f023420c6 Export the device protocol to the client --verbose output
It turns out this is useful for debugging.
2019-12-01 06:31:05 -06:00
Richard Hughes
be956bdb66 Allow setting the device flags using GObject properties 2019-11-25 18:10:38 -06:00
Richard Hughes
33cb526248 Print the instance IDs if the GUIDs are unconverted
This caused some head scratching about the 'missing' values when doing
fu_device_to_string() before fu_device_convert_instance_ids() had been called.
2019-09-18 17:07:39 +01:00
Richard Hughes
dd71b729e8 Export functionality to build an array of objects
This makes it possible to call GetDevices in an async D-Bus call, and easily
construct an array of objects from the return value.
2019-07-03 11:44:31 +01:00
Richard Hughes
c84b36c541 Export the version-format to clients
This allows a vendor to verify the VersionFormat of a device without running
the daemon in verbose mode.
2019-04-30 09:25:41 +01:00
Richard Hughes
8356a83c4a trivial: Fix potential critical when converting empty object to GVariant 2019-03-21 17:15:43 +00:00
Richard Hughes
56c9c797e2 trivial: Do not print the display checksum in the JSON output
We're only guessing the format from the length, and not adding the wrapper
means it can be consumed more easily from other APIs.
2019-03-05 19:05:19 +00:00
Richard Hughes
d9f1f3ce7c trivial: Export the FwupdDevice flags as readable JSON
Rather than displaying:

    "Flags" : 9,

Use the more understandable:

    "Flags" : [
      "updatable",
      "require-ac"
    ],
2019-03-04 13:16:09 +00:00
Richard Hughes
b111ae3b5d trivial: Use JSON arrays properly 2019-03-01 12:49:20 +00:00
Mario Limonciello
3143bad0f5 fu-tool: Save device state to @LOCALSTATEDIR@/lib/fwupd/state.json on actions
This feature is turned on with the new fwupdtool option `--enable-json-state`

The intended use case is for ChromeOS to be able to save information about
devices on the system when `fwupdtool update` was run to display in the UX at
a later time.
2019-02-28 10:32:45 -06:00
Richard Hughes
6b78d64987 Add fwupd_guid_from_string() to drop dep on uuid
This also allows us to write mixed-endian structures and adds tests. As part of
this commit we've also changed the API of something that's not yet been in any
tarball release, so no pitchforks please.
2019-02-06 14:48:04 +00:00
Richard Hughes
297055c9d8 Report the DeviceInstanceIDs to fwupdmgr get-updates
This makes it much easier to write metainfo files as we don't have to ask OEMs
or ODMs to run fwupdtool or fwupd with --verbose and then sort through hundreds
of debugging statements.

The fwupdmgr get-devices output also now prints output like this:

    20EQS64N0C System Firmware
      Guid:                 ddc0ee61-e7f0-4e7d-acc5-c070a398838e
      Guid:                 40ce5954-bfa8-5762-926b-f4848cb28bc8 <- UEFI\RES_{DDC0EE61-E7F0-4E7D-ACC5-C070A398838E}

We're deliberately not showing the InstanceId lines in the get-updates command
as the instance IDs are not useful in this case. It will also only show the
InstanceID lines when run as a trusted user, for instance root.
2019-02-04 15:19:57 +00:00
Mario Limonciello
32241f4256 Add support for an UpdateMessage and display it in tools
The idea is that if the user should know something about the device update
"after" it's succesfully completed then the plugin can set `UpdateMessage`
for the device and a client can show it.

An example would be a device that doesn't reboot on its own and the user
needs to power cycle it manually.
2019-01-29 13:59:07 -06:00
Mario Limonciello
83a8aab034 trivial: libfwupd: correct documentation for fwupd_device_set_install_duration 2018-10-10 14:31:58 -05:00
Mario Limonciello
7c10696690 Add support for devices to show an estimated flash time (Closes: #765)
This time is provided to frontends to be able to show estimates
before a user would agree to flash the device.
2018-09-26 11:35:59 +01:00
Mario Limonciello
e3016602f8 Include serial number in daemon device output when trusted
This moves the storing of the serial number into the daemon and
when the calling process is UID 0 includes it in device output
2018-09-06 13:34:28 -05:00
Richard Hughes
49a56a4436 trivial: Add exported fwupd_device_compare() for future use 2018-08-10 14:50:43 +01:00
Richard Hughes
02c90d8a03 Remove the unused Emacs indenting headers from all source files
Fixes https://github.com/hughsie/fwupd/issues/636
2018-08-09 12:48:04 +01:00
Richard Hughes
e0cd6e0667 Add fwupd_device_incorporate()
This allows us to copy properties from a donor object.
2018-06-28 15:51:11 +01:00
Richard Hughes
eeb8017a29 trivial: Remove unused variable in private struct 2018-06-21 21:43:21 +01:00
Mario Limonciello
51308e648a Adjust all licensing to LGPL 2.1+ (Closes: #526) 2018-05-29 09:03:13 +01:00
Richard Hughes
5e447293fa Add the concept of logical mappings between different devices
This allows us to find out the logical parent device, for instance in composite
devices with more than one firmware image for a single device.

We also allow lazily specifying the device parent using a GUID and the engine
then automatically sets the parent object when the GUIDs match, which allows
children and parents to exist in different plugins.
2018-05-03 08:07:04 +01:00
Richard Hughes
86fdd975ad Prevent a client crash if the daemon somehow sends invalid data
Fixes: https://bugs.launchpad.net/ubuntu/+source/fwupd/+bug/1762617
2018-04-10 11:59:36 +01:00
Richard Hughes
e9c0a3c8cd trivial: Fix up some gtk-doc introspection issues in libfwupd 2017-10-05 10:32:05 +01:00
Richard Hughes
e0bd53e439 trivial: Use standard _to_variant() and _from_variant() forms 2017-09-28 09:23:52 +01:00
Richard Hughes
9e79223ecf trivial: C99ify more for-loops 2017-09-28 09:23:52 +01:00
Richard Hughes
603e42d527 trivial: Include the releases as part of the device a{sv} array 2017-09-28 09:23:52 +01:00
Richard Hughes
9e1b14067c trivial: Always use a a{sv} type to return value
Mixing sa{sv} and a{sv} made everything very confusing...
2017-09-28 09:23:52 +01:00
Richard Hughes
10c6a89563 trivial: Do not use 'provider' in the public API 2017-09-28 09:23:52 +01:00
Richard Hughes
80893e29fe trivial: Remove FwupdResult from libfwupd 2017-09-28 09:23:52 +01:00
Richard Hughes
8880cd09e4 trivial: Fix up some introspection issues 2017-09-19 09:54:16 +01:00
Richard Hughes
fe09a0010f trivial: Allow adding more than one FwupdRelease to a FwupdDevice 2017-09-15 20:09:03 +01:00
Richard Hughes
93b1576bef trivial: Add helpers that can be used for returning local files
This also allows us to drop the use of FwupdResult in the daemon.
2017-09-15 14:12:18 +01:00
Richard Hughes
cc3de2efa4 Do not store the newest release as part of the FuDevice object 2017-09-15 14:12:18 +01:00
Richard Hughes
8cee383f65 trivial: Add the missing functionality to proxy the update error string 2017-09-13 14:59:32 +01:00
Richard Hughes
a1aab517d1 Move the update state to FwupdDevice
It only remained on FwupdResult because I couldn't make up my mind about whether
it was a property of the device, or the firmware release. It's more logically
the former, and that's how plugins are using it.
2017-09-13 14:59:32 +01:00
Richard Hughes
d3b93f83ed trivial: Fix a small memory leak in fwupd_device_to_string() 2017-09-12 19:57:08 +01:00
Richard Hughes
539a830a36 trivial: Fix a tiny memory leak when setting the summary 2017-09-12 19:34:51 +01:00
Richard Hughes
c1c2fec6f5 Add optional icons to each device
This allows us to show the devices in a GUI with a nice icon. Some of the icon
mappings are not perfect and I'll be asking the GNOME designers for some
additions to the icon specification.

Custom vendor icons can also be specified, and /usr/share/fwupd/icons would be
a good place to put them. If vendor icons are used they should show a physical
device with the branding, rather than just the vendor logo.
2017-09-11 17:27:35 +01:00
Richard Hughes
6c6e8d3ab8 Add an 'Summary' property to each device
This was already exported in the libfwupd API, but it had no way of being set
from devices or passed from daemon to client.
2017-09-11 09:30:06 +01:00
Mario Limonciello
790701f32b trivial: adjust get-details and get-devices output Display Name output
This returns them back to the more readable 0.8.x behavior where
devices have the name first and then all the details indented.
2017-07-13 16:22:19 -05:00
Mario Limonciello
7e9924d7a7 trivial: Adjust get-devices output order
Since changing how the data was shuffled from earlier fwupd versions
the device name is no longer output at the top of the list, fix that.
2017-07-05 17:16:18 -05:00