summaryrefslogtreecommitdiff
path: root/src/login/logind.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-05-05 00:34:48 +0200
committerLennart Poettering <lennart@poettering.net>2012-05-05 00:36:08 +0200
commiteecd1362f7f4de432483b5d77c56726c3621a83a (patch)
treee8f1f3639121d317660cc6cc0d5ffe8f8731a39f /src/login/logind.h
parenta26336da875a6657d404d1e44b86ae067c34b110 (diff)
logind: implement delay inhibitor locks in addition to block inhibitor locks
This is useful to allow applications to synchronously save data before the system is suspended or shut down.
Diffstat (limited to 'src/login/logind.h')
-rw-r--r--src/login/logind.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/login/logind.h b/src/login/logind.h
index 4e9dcd5fed..2c0545206d 100644
--- a/src/login/logind.h
+++ b/src/login/logind.h
@@ -81,6 +81,14 @@ struct Manager {
Hashmap *cgroups;
Hashmap *session_fds;
Hashmap *inhibitor_fds;
+
+ /* If a shutdown was delayed due to a inhibitor this contains
+ the unit name we are supposed to start after the delay is
+ over */
+ const char *delayed_shutdown;
+ usec_t delayed_shutdown_timestamp;
+
+ usec_t inhibit_delay_max;
};
enum {
@@ -132,6 +140,8 @@ DBusHandlerResult bus_message_filter(DBusConnection *c, DBusMessage *message, vo
int manager_send_changed(Manager *manager, const char *properties);
+int manager_dispatch_delayed_shutdown(Manager *manager);
+
/* gperf lookup function */
const struct ConfigPerfItem* logind_gperf_lookup(const char *key, unsigned length);