UPower 1.0 API changes
hadess at hadess.net
Thu Oct 17 06:44:45 PDT 2013
I'll be blogging shortly about the UPower changes that I've made on
master. Consider this a simple porting guide for your applications.
- up_client_get_display_device(), gets you a UpDevice that represents
the combination of all batteries and UPSes
- up_client_get_critical_action() which tells you whether the system
will switch off or hibernate on critically power.
- up_client_get_on_low_battery() (use the "warning-level" property on
the DisplayDevice object instead)
up_client_get_can_suspend(), all obsoleted by logind
- All of the QoS API
- notify_sleep and notify_resume
- changed (both UpClient and UpDevice), device-changed (connect to the
"notify" signal for the properties that interest you instead)
- device-removed now sends an object path, not a device (as we do not
keep an internal list of devices on the client side, to reduce wake-ups)
The D-Bus service changes pretty much match the libupower-glib API
changes. I invite you to read the included API documentation.
Support for non-Linux OSes
The new policy decision for low batteries is not implemented on the
non-Linux systems that have backends in UPower, namely FreeBSD and
OpenBSD. As legacy code in UPower used to do this for those systems, it
should be fairly straight forward to copy/paste from UPower 0.9 to bring
back hibernation in those systems. PowerOff might be a little bit more
Currently working on gnome-settings-daemon changes:
gnome-control-center is not done yet:
Which should not require
- Reduce wake-ups more, by coalescing battery polling together, and
increasing timeouts when battery power is high.
- Updating the test suite
- And obviously, fixing any bugs that we might encounter
Send in any questions you might have to this list, and I'll do my best
to answer questions and update the documentation to match.
: Somewhere on http://www.hadess.net soon
More information about the devkit-devel