chiark / gitweb /
tree-wide: drop 'This file is part of systemd' blurb
[elogind.git] / src / login / logind-action.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 /***
5   Copyright 2012 Lennart Poettering
6 ***/
7
8 //#include "conf-parser.h"
9
10 typedef enum HandleAction {
11         HANDLE_IGNORE,
12         HANDLE_POWEROFF,
13         HANDLE_REBOOT,
14         HANDLE_HALT,
15         HANDLE_KEXEC,
16         HANDLE_SUSPEND,
17         HANDLE_HIBERNATE,
18         HANDLE_HYBRID_SLEEP,
19         HANDLE_SUSPEND_THEN_HIBERNATE,
20         HANDLE_LOCK,
21         _HANDLE_ACTION_MAX,
22         _HANDLE_ACTION_INVALID = -1
23 } HandleAction;
24
25 #include "logind-inhibit.h"
26 #include "logind.h"
27
28 int manager_handle_action(
29                 Manager *m,
30                 InhibitWhat inhibit_key,
31                 HandleAction handle,
32                 bool ignore_inhibited,
33                 bool is_edge);
34
35 const char* handle_action_to_string(HandleAction h) _const_;
36 HandleAction handle_action_from_string(const char *s) _pure_;
37
38 const char* manager_target_for_action(HandleAction handle);
39
40 CONFIG_PARSER_PROTOTYPE(config_parse_handle_action);