fwupd/libfwupdplugin/README.md
Richard Hughes 40cd18fa97 Allow using a per-device global percentage completion
It's actually quite hard to build a front-end for fwupd at the moment
as you're never sure when the progress bar is going to zip back to 0%
and start all over again. Some plugins go 0..100% for write, others
go 0..100% for erase, then again for write, then *again* for verify.

By creating a helper object we can easily split up the progress of the
specific task, e.g. write_firmware().

We can encode at the plugin level "the erase takes 50% of the time, the
write takes 40% and the read takes 10%". This means we can have a
progressbar which goes up just once at a consistent speed.
2021-09-13 14:28:15 +01:00

1.9 KiB

libfwupdplugin

This library is only partially API and ABI stable. Keeping unused, unsafe and deprecated functions around forever is a maintenance burden and so symbols are removed when branching for new minor versions.

Remember: Plugins should be upstream!

Migrating from older API

  • Migrate from fu_common_is_cpu_intel() to fu_common_get_cpu_vendor()
  • Migrate from fu_firmware_strparse_uintXX() to fu_firmware_strparse_uintXX_safe()
  • Remove calls to fu_plugin_get_usb_context() and fu_plugin_set_usb_context()
  • Migrate from fu_plugin_runner_usb_device_added(), fu_plugin_runner_udev_device_added() and fu_plugin_runner_udev_device_changed() to fu_plugin_runner_backend_device_added()
  • Migrate from FuHidDevice->open() and FuHidDevice->close() to using the superclass helpers
  • Migrate from FuUsbDevice->probe(), FuUsbDevice->open() and FuUsbDevice->close() to using the superclass helpers
  • Migrate from FuUdevDevice->to_string(), FuUdevDevice->probe(), FuUdevDevice->open() and FuUdevDevice->close() to using the superclass helpers
  • Migrate from fu_device_get_protocol() to fu_device_get_protocols() and fu_device_set_protocol() to fu_device_add_protocol()
  • Migrate from fu_device_has_custom_flag() to fu_device_has_private_flag()
  • Migrate from fu_udev_device_set_readonly() to fu_udev_device_set_flags()
  • Migrate from fu_device_sleep_with_progress() to fu_progress_sleep() -- but be aware the unit of time has changed from seconds to milliseconds
  • Migrate from fu_device_get_status() to fu_progress_get_status()
  • Migrate from fu_device_set_status() to fu_progress_set_status()
  • Migrate from fu_device_get_progress() to fu_progress_get_percentage()
  • Migrate from fu_device_set_progress_full() to fu_progress_set_percentage_full()
  • Migrate from fu_device_set_progress() to fu_progress_set_steps(), fu_progress_add_step() and fu_progress_done -- see the FuProgress docs for more details!

Planned API/ABI changes for next release

  • Nothing yet.