fwupd/plugins
George Popoola 357bfd07da powerd: DBus Connection and Parsing
A series of changes are made to the powerd skeleton
plugin in order to reach two goals: ensuring that it handles cases correctly, given certain
information about the battery and/or certain return types and that it
successfully retrieves battery information from powerd to be used later.

Logic is then added to ensure updates are only performed
when that battery level is at or above the minimum threshold.
Then logic is added that checks if the device being updating requires
AC power. Along with this, specific
error statements are added for each scenario where an update is blocked.

To address the next goal, within fu_plugin_startup(), a GDBus connection
is established. However, instead of a direct connection to
powerd, the connection is changed to link to the general system bus with
g_bus_get_sync(). From there, a proxy is created to represent the
connection to powerd. A test call is made for the name of the service that the
proxy represents to check for successful communication.

Then, in fu_plugin_update_prepare(), the existing proxy is called and in the call,
the "GetBatteryState" is passed to make a method call method. The
response is filled into a GVariant, whose entries are initialized in new variables to use
for battery checks. And checks are added to make sure every step was
successful.
2021-07-19 13:40:11 -07:00
..
acpi-dmar trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
acpi-facp trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
acpi-phat trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
altos trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
amt trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
analogix trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
ata trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
bcm57xx trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
bios trivial: fixup includes for a variety of plugins 2021-06-14 10:12:45 +01:00
ccgx trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
colorhug trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
cpu trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
cros-ec trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
dell trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
dell-dock trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
dell-esrt trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
dfu trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
dfu-csr trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
ebitdo trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
elantp trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
emmc trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
ep963x trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
fastboot trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
flashrom trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
fresco-pd trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
goodix-moc trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
hailuck trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
intel-spi trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
iommu trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
jabra trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
lenovo-thinklmi trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
linux-lockdown trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
linux-sleep trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
linux-swap trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
linux-tainted trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
logind trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
logitech-hidpp trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
modem-manager trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
msr trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
nitrokey trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
nvme trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
optionrom trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
parade-lspcon trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
pci-bcr trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
pci-mei trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
pixart-rf trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
platform-integrity trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
powerd powerd: DBus Connection and Parsing 2021-07-19 13:40:11 -07:00
realtek-mst trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
redfish trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
rts54hid trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
rts54hub trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
solokey trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
steelseries trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
superio trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
synaptics-cxaudio trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
synaptics-mst trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
synaptics-prometheus trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
synaptics-rmi trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
system76-launch trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
test trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
thelio-io trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
thunderbolt trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
tpm trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
tpm-eventlog trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
uefi-capsule trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
uefi-dbx trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
uefi-pk trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
uefi-recovery trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
upower trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
vli trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
wacom-raw trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
wacom-usb trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00
meson.build Skeleton plugin for powerd 2021-07-19 13:40:11 -07:00
README.md trivial: update markdown for pre-commit style 2021-07-18 14:42:47 -05:00

Adding a new plugin

An extensible architecture allows for providing new plugin types (for reading and writing different firmware) as well as ways quirk their behavior.

You can find more information about the architecture in the developers section of the fwupd website.

You can use the fwupd developer documentation to assist with APIs available to write the plugin.

If you have a firmware specification and would like to see support in this project, please file an issue and share the spec. Patches are also welcome.

We will not accept plugins that upgrade hardware using a proprietary Linux executable, proprietary UEFI executable, proprietary library, or DBus interface.

Plugin interaction

Some plugins may be able to influence the behavior of other plugins. This includes things like one plugin turning on a device, or providing missing metadata to another plugin.

The ABI for these interactions is defined in: https://github.com/fwupd/fwupd/blob/master/src/fu-device-metadata.h

All interactions between plugins should have the interface defined in that file.