summaryrefslogtreecommitdiffstats
path: root/src/main.h
diff options
context:
space:
mode:
authorSimon Rettberg2019-05-13 14:43:35 +0200
committerSimon Rettberg2019-05-13 14:43:35 +0200
commit6053a358dd187fd56bdd1753fbc6b8285c35cd98 (patch)
treefd263b39de63d6c3bd4dc058fcddeef2a1003d64 /src/main.h
parentInitial commit (diff)
downloadidle-daemon-6053a358dd187fd56bdd1753fbc6b8285c35cd98.tar.gz
idle-daemon-6053a358dd187fd56bdd1753fbc6b8285c35cd98.tar.xz
idle-daemon-6053a358dd187fd56bdd1753fbc6b8285c35cd98.zip
Add reboot/kexec/poweroff via RPC
Diffstat (limited to 'src/main.h')
-rw-r--r--src/main.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/main.h b/src/main.h
index 1ff924a..2c792ac 100644
--- a/src/main.h
+++ b/src/main.h
@@ -3,8 +3,24 @@
#include <time.h>
+enum Shutdown {
+ REBOOT = 0,
+ POWEROFF,
+ KEXEC,
+ SUSPEND,
+ SHUTDOWN_ENUM_END,
+};
+
+struct time {
+ int hour;
+ int minute;
+ enum Shutdown action;
+};
+
void main_getStatus( const char **nextAction, time_t *deadline );
struct user* main_getUser( const char *terminal );
+void main_queueAction( enum Shutdown action, int seconds );
+
#endif