diff options
author | Daniel Mack <daniel@zonque.org> | 2015-04-20 15:27:15 +0200 |
---|---|---|
committer | Daniel Mack <daniel@zonque.org> | 2015-04-24 17:48:12 +0200 |
commit | 8aaa023ae78f3cb28db3edd87f96b21486810b91 (patch) | |
tree | d4ce5ef2429fc2fd42f750368d1ef8e9efb19332 /src/login/logind.h | |
parent | b7aa9589e0bf37cd2682dee4528bd32a794d1363 (diff) |
logind: add .ScheduleShutdown and .CancelScheduledShutdown methods
Add a method called ScheduleShutdown in org.freedesktop.login1.Manager
which adds a timer to shut down the system at a later point in time.
The first argument holds the type of the schedule that is about to
happen, and must be one of 'reboot', 'halt' or 'poweroff'.
The second argument specifies the absolute time, based on
CLOCK_REALTIME in nanoseconds, at which the the operation should be
executed.
To cancel a previously scheduled shutdown, the CancelScheduledShutdown()
can be called, which returns a bool, indicating whether a scheduled
timeout was cancelled.
Also add a new property called ScheduledShutdown which returns the
equivalent to what was passed in via ScheduleShutdown, as '(st)' type.
Diffstat (limited to 'src/login/logind.h')
-rw-r--r-- | src/login/logind.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/login/logind.h b/src/login/logind.h index 2cb19caeea..cd2bdc05d2 100644 --- a/src/login/logind.h +++ b/src/login/logind.h @@ -97,6 +97,10 @@ struct Manager { char *action_job; sd_event_source *inhibit_timeout_source; + char *scheduled_shutdown_type; + usec_t scheduled_shutdown_timeout; + sd_event_source *scheduled_shutdown_timeout_source; + sd_event_source *idle_action_event_source; usec_t idle_action_usec; usec_t idle_action_not_before_usec; |