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