]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/login/logind-action.h
Merge pull request #653 from dvdhrm/bus-gold
[thirdparty/systemd.git] / src / login / logind-action.h
CommitLineData
05d3a176 1#pragma once
23406ce5
LP
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
07630cea 36#include "logind-inhibit.h"
71d35b6b 37#include "logind.h"
23406ce5
LP
38
39int manager_handle_action(
40 Manager *m,
41 InhibitWhat inhibit_key,
42 HandleAction handle,
43 bool ignore_inhibited,
44 bool is_edge);
45
44a6b1b6
ZJS
46const char* handle_action_to_string(HandleAction h) _const_;
47HandleAction handle_action_from_string(const char *s) _pure_;
23406ce5 48
71a61510 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);