summaryrefslogtreecommitdiff
path: root/src/up-daemon.c
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2013-10-17 09:04:03 +0200
committerBastien Nocera <hadess@hadess.net>2013-10-17 09:04:03 +0200
commitdb31456921f9977d8fef8ed1dcee6517107358ff (patch)
treedcd098e7365d3d1b2fb8bc2170a4cf29c1a92a3c /src/up-daemon.c
parenta7870229ee32616ac9e55edbab1045d1dac171be (diff)
downloadupower-db31456921f9977d8fef8ed1dcee6517107358ff.tar.gz
all: Add GetCriticalAction daemon method
This allows desktop front-ends to get which action will actually be taken when we hit critical battery. This is not a property as availability of actions might change over the course of the run of the system, and we didn't want to make unnecessary D-Bus calls on startup.
Diffstat (limited to 'src/up-daemon.c')
-rw-r--r--src/up-daemon.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/up-daemon.c b/src/up-daemon.c
index 22e9116..5068f47 100644
--- a/src/up-daemon.c
+++ b/src/up-daemon.c
@@ -449,6 +449,17 @@ up_daemon_get_display_device (UpDaemon *daemon,
}
/**
+ * up_daemon_get_critical_action:
+ **/
+gboolean
+up_daemon_get_critical_action (UpDaemon *daemon,
+ DBusGMethodInvocation *context)
+{
+ dbus_g_method_return (context, up_backend_get_critical_action (daemon->priv->backend));
+ return TRUE;
+}
+
+/**
* up_daemon_register_power_daemon:
**/
static gboolean