chiark / gitweb /
logind: add .ScheduleShutdown and .CancelScheduledShutdown methods
authorDaniel Mack <daniel@zonque.org>
Mon, 20 Apr 2015 13:27:15 +0000 (15:27 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 07:07:01 +0000 (08:07 +0100)
commitedda707302d7c5138291c0ff4e9c43db9fba51d8
tree3305f1d255345d62f96bbeb4dc75c68959efb0e8
parentb9db6972db2353eb26744c46e30e7f6d1d56e037
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