diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2010-02-08 17:46:11 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2010-02-09 10:42:36 +0000 |
commit | b93915a377c9acbd26fb3c1f7bd9b41d76e4b578 (patch) | |
tree | dce50d0897ecc5b724985076207d9d744044e25c /src/up-daemon.h | |
parent | a057e36751aa7885c9ce9fc43cad4e975498fc60 (diff) | |
download | upower-b93915a377c9acbd26fb3c1f7bd9b41d76e4b578.tar.gz |
Add {Suspend,Hibernate}Allowed D-Bus methods
Add two D-Bus server methods to check whether the caller has the privilege to
suspend or hibernate.
This enables us to check for PK privileges in UpClient's
can_{suspend,hibernate} properties, so that clients like gnome-session or
gnome-power-manager hide the suspend/hibernate related actions if the admin or
OEM disabled suspend/hibernate through a PolicyKit .pkla file.
https://bugs.freedesktop.org/show_bug.cgi?id=26473
Diffstat (limited to 'src/up-daemon.h')
-rw-r--r-- | src/up-daemon.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/up-daemon.h b/src/up-daemon.h index c919a91..d2bcf91 100644 --- a/src/up-daemon.h +++ b/src/up-daemon.h @@ -85,8 +85,12 @@ gboolean up_daemon_suspend (UpDaemon *daemon, DBusGMethodInvocation *context); gboolean up_daemon_about_to_sleep (UpDaemon *daemon, DBusGMethodInvocation *context); +gboolean up_daemon_suspend_allowed (UpDaemon *daemon, + DBusGMethodInvocation *context); gboolean up_daemon_hibernate (UpDaemon *daemon, DBusGMethodInvocation *context); +gboolean up_daemon_hibernate_allowed (UpDaemon *daemon, + DBusGMethodInvocation *context); gboolean up_daemon_can_suspend (UpDaemon *daemon, gboolean interactive, DBusGMethodInvocation *context); |