]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/login/logind-button.h
update TODO
[thirdparty/systemd.git] / src / login / logind-button.h
CommitLineData
e9d21f24
LP
1/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
2
05d3a176 3#pragma once
e9d21f24
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
24typedef struct Button Button;
25
e9d21f24
LP
26#include "list.h"
27#include "util.h"
28#include "logind.h"
29
30struct Button {
31 Manager *manager;
32
ed4ba7e4
LP
33 sd_event_source *io_event_source;
34 sd_event_source *check_event_source;
cc377381 35
e9d21f24
LP
36 char *name;
37 char *seat;
38 int fd;
65b51162 39
ed4ba7e4 40 bool lid_closed;
2d62c530 41 bool docked;
e9d21f24
LP
42};
43
44Button* button_new(Manager *m, const char *name);
45void button_free(Button*b);
46int button_open(Button *b);
e9d21f24 47int button_set_seat(Button *b, const char *sn);
2d62c530 48int button_check_switches(Button *b);