From db31456921f9977d8fef8ed1dcee6517107358ff Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Thu, 17 Oct 2013 09:04:03 +0200 Subject: 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. --- src/freebsd/up-backend.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/freebsd') diff --git a/src/freebsd/up-backend.c b/src/freebsd/up-backend.c index 949f3cd..433c331 100644 --- a/src/freebsd/up-backend.c +++ b/src/freebsd/up-backend.c @@ -293,6 +293,19 @@ up_backend_coldplug (UpBackend *backend, UpDaemon *daemon) return TRUE; } +/** + * up_backend_get_critical_action: + * @backend: The %UpBackend class instance + * + * Which action will be taken when %UP_DEVICE_LEVEL_ACTION + * warning-level occurs. + **/ +const char * +up_backend_get_critical_action (UpBackend *backend) +{ + return "PowerOff"; +} + /** * up_backend_take_action: * @backend: The %UpBackend class instance -- cgit v1.2.1