chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
logind: remove spurious include of <sys/capability.h>
[elogind.git]
/
src
/
login
/
logind-inhibit.h
diff --git
a/src/login/logind-inhibit.h
b/src/login/logind-inhibit.h
index f5cfb9b9f5d2d25d5c7a9693b2ffda12c642f429..f767876a4c8d72abe203a7487ae2d7ace9cfcd97 100644
(file)
--- a/
src/login/logind-inhibit.h
+++ b/
src/login/logind-inhibit.h
@@
-1,7
+1,6
@@
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-#ifndef foologindinhibithfoo
-#define foologindinhibithfoo
+#pragma once
/***
This file is part of systemd.
/***
This file is part of systemd.
@@
-32,9
+31,10
@@
typedef enum InhibitWhat {
INHIBIT_SLEEP = 2,
INHIBIT_IDLE = 4,
INHIBIT_HANDLE_POWER_KEY = 8,
INHIBIT_SLEEP = 2,
INHIBIT_IDLE = 4,
INHIBIT_HANDLE_POWER_KEY = 8,
- INHIBIT_HANDLE_SLEEP_KEY = 16,
- INHIBIT_HANDLE_LID_SWITCH = 32,
- _INHIBIT_WHAT_MAX = 64,
+ INHIBIT_HANDLE_SUSPEND_KEY = 16,
+ INHIBIT_HANDLE_HIBERNATE_KEY = 32,
+ INHIBIT_HANDLE_LID_SWITCH = 64,
+ _INHIBIT_WHAT_MAX = 128,
_INHIBIT_WHAT_INVALID = -1
} InhibitWhat;
_INHIBIT_WHAT_INVALID = -1
} InhibitWhat;
@@
-51,6
+51,8
@@
typedef enum InhibitMode {
struct Inhibitor {
Manager *manager;
struct Inhibitor {
Manager *manager;
+ sd_event_source *event_source;
+
char *id;
char *state_file;
char *id;
char *state_file;
@@
-83,12
+85,10
@@
int inhibitor_create_fifo(Inhibitor *i);
void inhibitor_remove_fifo(Inhibitor *i);
InhibitWhat manager_inhibit_what(Manager *m, InhibitMode mm);
void inhibitor_remove_fifo(Inhibitor *i);
InhibitWhat manager_inhibit_what(Manager *m, InhibitMode mm);
-bool manager_is_inhibited(Manager *m, InhibitWhat w, InhibitMode mm, dual_timestamp *since, bool ignore_inactive, bool ignore_uid, uid_t uid);
+bool manager_is_inhibited(Manager *m, InhibitWhat w, InhibitMode mm, dual_timestamp *since, bool ignore_inactive, bool ignore_uid, uid_t uid
, Inhibitor **offending
);
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);
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