]>
Commit | Line | Data |
---|---|---|
23406ce5 LP |
1 | /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ |
2 | ||
05d3a176 | 3 | #pragma once |
23406ce5 LP |
4 | |
5 | /*** | |
6 | This file is part of systemd. | |
7 | ||
8 | Copyright 2012 Lennart Poettering | |
9 | ||
10 | systemd is free software; you can redistribute it and/or modify it | |
11 | under the terms of the GNU Lesser General Public License as published by | |
12 | the Free Software Foundation; either version 2.1 of the License, or | |
13 | (at your option) any later version. | |
14 | ||
15 | systemd is distributed in the hope that it will be useful, but | |
16 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 | Lesser General Public License for more details. | |
19 | ||
20 | You should have received a copy of the GNU Lesser General Public License | |
21 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
22 | ***/ | |
23 | ||
24 | typedef enum HandleAction { | |
25 | HANDLE_IGNORE, | |
26 | HANDLE_POWEROFF, | |
27 | HANDLE_REBOOT, | |
28 | HANDLE_HALT, | |
29 | HANDLE_KEXEC, | |
30 | HANDLE_SUSPEND, | |
31 | HANDLE_HIBERNATE, | |
32 | HANDLE_HYBRID_SLEEP, | |
33 | HANDLE_LOCK, | |
34 | _HANDLE_ACTION_MAX, | |
35 | _HANDLE_ACTION_INVALID = -1 | |
36 | } HandleAction; | |
37 | ||
38 | #include "logind.h" | |
39 | #include "logind-inhibit.h" | |
40 | ||
41 | int manager_handle_action( | |
42 | Manager *m, | |
43 | InhibitWhat inhibit_key, | |
44 | HandleAction handle, | |
45 | bool ignore_inhibited, | |
46 | bool is_edge); | |
47 | ||
44a6b1b6 ZJS |
48 | const char* handle_action_to_string(HandleAction h) _const_; |
49 | HandleAction handle_action_from_string(const char *s) _pure_; | |
23406ce5 | 50 | |
71a61510 | 51 | int config_parse_handle_action(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); |