chiark / gitweb /
Prep v239: Uncomment header inclusions that are new or needed now.
[elogind.git] / src / login / logind-action.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 #include "conf-parser.h"
5
6 typedef enum HandleAction {
7         HANDLE_IGNORE,
8         HANDLE_POWEROFF,
9         HANDLE_REBOOT,
10         HANDLE_HALT,
11         HANDLE_KEXEC,
12         HANDLE_SUSPEND,
13         HANDLE_HIBERNATE,
14         HANDLE_HYBRID_SLEEP,
15         HANDLE_SUSPEND_THEN_HIBERNATE,
16         HANDLE_LOCK,
17         _HANDLE_ACTION_MAX,
18         _HANDLE_ACTION_INVALID = -1
19 } HandleAction;
20
21 #include "logind-inhibit.h"
22 #include "logind.h"
23
24 int manager_handle_action(
25                 Manager *m,
26                 InhibitWhat inhibit_key,
27                 HandleAction handle,
28                 bool ignore_inhibited,
29                 bool is_edge);
30
31 const char* handle_action_to_string(HandleAction h) _const_;
32 HandleAction handle_action_from_string(const char *s) _pure_;
33
34 const char* manager_target_for_action(HandleAction handle);
35
36 CONFIG_PARSER_PROTOTYPE(config_parse_handle_action);