summaryrefslogtreecommitdiff
path: root/src/login/logind-inhibit.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/login/logind-inhibit.h')
-rw-r--r--src/login/logind-inhibit.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/login/logind-inhibit.h b/src/login/logind-inhibit.h
index 1d47cfc68d..823af39918 100644
--- a/src/login/logind-inhibit.h
+++ b/src/login/logind-inhibit.h
@@ -37,6 +37,13 @@ typedef enum InhibitWhat {
_INHIBIT_WHAT_INVALID = -1
} InhibitWhat;
+typedef enum InhibitMode {
+ INHIBIT_BLOCK,
+ INHIBIT_DELAY,
+ _INHIBIT_MODE_MAX,
+ _INHIBIT_MODE_INVALID = -1
+} InhibitMode;
+
struct Inhibitor {
Manager *manager;
@@ -48,6 +55,7 @@ struct Inhibitor {
InhibitWhat what;
char *who;
char *why;
+ InhibitMode mode;
pid_t pid;
uid_t uid;
@@ -70,10 +78,13 @@ int inhibitor_stop(Inhibitor *i);
int inhibitor_create_fifo(Inhibitor *i);
void inhibitor_remove_fifo(Inhibitor *i);
-InhibitWhat manager_inhibit_what(Manager *m);
-bool manager_is_inhibited(Manager *m, InhibitWhat w, dual_timestamp *since);
+InhibitWhat manager_inhibit_what(Manager *m, InhibitMode mm);
+bool manager_is_inhibited(Manager *m, InhibitWhat w, InhibitMode mm, dual_timestamp *since);
const char *inhibit_what_to_string(InhibitWhat k);
InhibitWhat inhibit_what_from_string(const char *s);
+const char *inhibit_mode_to_string(InhibitMode k);
+InhibitMode inhibit_mode_from_string(const char *s);
+
#endif