]> git.proxmox.com Git - systemd.git/blame - src/login/logind-action.h
Merge tag 'upstream/229'
[systemd.git] / src / login / logind-action.h
CommitLineData
60f067b4 1#pragma once
663996b3
MS
2
3/***
4 This file is part of systemd.
5
6 Copyright 2012 Lennart Poettering
7
8 systemd is free software; you can redistribute it and/or modify it
9 under the terms of the GNU Lesser General Public License as published by
10 the Free Software Foundation; either version 2.1 of the License, or
11 (at your option) any later version.
12
13 systemd is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public License
19 along with systemd; If not, see <http://www.gnu.org/licenses/>.
20***/
21
22typedef enum HandleAction {
23 HANDLE_IGNORE,
24 HANDLE_POWEROFF,
25 HANDLE_REBOOT,
26 HANDLE_HALT,
27 HANDLE_KEXEC,
28 HANDLE_SUSPEND,
29 HANDLE_HIBERNATE,
30 HANDLE_HYBRID_SLEEP,
31 HANDLE_LOCK,
32 _HANDLE_ACTION_MAX,
33 _HANDLE_ACTION_INVALID = -1
34} HandleAction;
35
db2df898 36#include "logind-inhibit.h"
4c89c718 37#include "logind.h"
663996b3
MS
38
39int manager_handle_action(
40 Manager *m,
41 InhibitWhat inhibit_key,
42 HandleAction handle,
43 bool ignore_inhibited,
44 bool is_edge);
45
46const char* handle_action_to_string(HandleAction h) _const_;
47HandleAction handle_action_from_string(const char *s) _pure_;
48
60f067b4 49int 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);