chiark / gitweb /
elogind --user: call pam_loginuid when creating user@.service (#3120)
[elogind.git] / src / login / logind-device.h
1 #pragma once
2
3 /***
4   This file is part of systemd.
5
6   Copyright 2011 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
22 typedef struct Device Device;
23
24 #include "list.h"
25 #include "logind-seat.h"
26 #include "logind-session-device.h"
27
28 struct Device {
29         Manager *manager;
30
31         char *sysfs;
32         Seat *seat;
33         bool master;
34
35         dual_timestamp timestamp;
36
37         LIST_FIELDS(struct Device, devices);
38         LIST_HEAD(SessionDevice, session_devices);
39 };
40
41 Device* device_new(Manager *m, const char *sysfs, bool master);
42 void device_free(Device *d);
43 void device_attach(Device *d, Seat *s);