GNOME Power Manager already has quite a comprehensive DBUS API to allow it to interface with stuff like the brightness applet and gnome-logout screens.
Brightness applet working hand-in-hand with g-p-m
I think this is something that should be cross-desktop compatible, so that XFCE, KDE and GNOME applications can all play nicely. Something like a session service name of org.freedesktop.PowerManagement would be lovely. Of course, this requires standardization of a set API, which traditionally has been hard to agree on.
I've put up a list of the new DBUS API that gnome-power-manager presents, but before anyone stresses out about API compatibility the old API is present as well, except not documented there.
Please have a look through and tell me about any method or signal naming funnies, or areas that don't look right – or even descriptions that don't make sense to mere mortals. When I've got some initial feedback, I'll make the important changes to the new API, and suggest just the “required” DBUS methods to xdg-list for comments about using a org.freedesktop namespace.
p.s. Don't comment too much about the Register() and UnRegister() methods yet, they are just stub functions at the moment, and not tested by gnome-power-self-test at all.
Thanks for any help,
Richard.
A method to retrieve the system idle time would definitely be useful, right now you have to poke X to provide this. I'd also include more options for device powermanagement, for example CPU, harddisks, wireless card and others as you already included with display. And while at it, shouldn't the screensaver be able to told to lock the display?