]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/login/logind-dbus.c
logind: add .ScheduleShutdown and .CancelScheduledShutdown methods
authorDaniel Mack <daniel@zonque.org>
Mon, 20 Apr 2015 13:27:15 +0000 (15:27 +0200)
committerDaniel Mack <daniel@zonque.org>
Fri, 24 Apr 2015 15:48:12 +0000 (17:48 +0200)
commit8aaa023ae78f3cb28db3edd87f96b21486810b91
treed4ce5ef2429fc2fd42f750368d1ef8e9efb19332
parentb7aa9589e0bf37cd2682dee4528bd32a794d1363
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.
src/login/logind-dbus.c
src/login/logind.c
src/login/logind.h