]>
Commit | Line | Data |
---|---|---|
90821c93 LP |
1 | /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ |
2 | ||
3 | #ifndef foologindseathfoo | |
4 | #define foologindseathfoo | |
5 | ||
6 | /*** | |
7 | This file is part of systemd. | |
8 | ||
9 | Copyright 2011 Lennart Poettering | |
10 | ||
11 | systemd is free software; you can redistribute it and/or modify it | |
12 | under the terms of the GNU General Public License as published by | |
13 | the Free Software Foundation; either version 2 of the License, or | |
14 | (at your option) any later version. | |
15 | ||
16 | systemd is distributed in the hope that it will be useful, but | |
17 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
19 | General Public License for more details. | |
20 | ||
21 | You should have received a copy of the GNU General Public License | |
22 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
23 | ***/ | |
24 | ||
25 | typedef struct Seat Seat; | |
26 | ||
27 | #include "list.h" | |
28 | #include "util.h" | |
29 | #include "logind.h" | |
30 | #include "logind-device.h" | |
31 | #include "logind-session.h" | |
32 | ||
33 | struct Seat { | |
34 | Manager *manager; | |
35 | char *id; | |
36 | ||
37 | char *state_file; | |
38 | ||
39 | LIST_HEAD(Device, devices); | |
40 | ||
41 | Session *active; | |
42 | LIST_HEAD(Session, sessions); | |
14c3baca LP |
43 | |
44 | bool in_gc_queue:1; | |
3f49d45a | 45 | bool started:1; |
14c3baca LP |
46 | |
47 | LIST_FIELDS(Seat, gc_queue); | |
90821c93 LP |
48 | }; |
49 | ||
50 | Seat *seat_new(Manager *m, const char *id); | |
51 | void seat_free(Seat *s); | |
14c3baca | 52 | |
90821c93 LP |
53 | int seat_save(Seat *s); |
54 | int seat_load(Seat *s); | |
55 | ||
14c3baca | 56 | int seat_apply_acls(Seat *s, Session *old_active); |
9418f147 | 57 | int seat_set_active(Seat *s, Session *session); |
14c3baca LP |
58 | int seat_active_vt_changed(Seat *s, int vtnr); |
59 | int seat_read_active_vt(Seat *s); | |
30ed21ce | 60 | int seat_preallocate_vts(Seat *s); |
14c3baca | 61 | |
a185c5aa LP |
62 | int seat_attach_session(Seat *s, Session *session); |
63 | ||
64 | bool seat_is_vtconsole(Seat *s); | |
addedec4 | 65 | bool seat_can_multi_session(Seat *s); |
a185c5aa LP |
66 | int seat_get_idle_hint(Seat *s, dual_timestamp *t); |
67 | ||
14c3baca LP |
68 | int seat_start(Seat *s); |
69 | int seat_stop(Seat *s); | |
a185c5aa | 70 | int seat_stop_sessions(Seat *s); |
14c3baca | 71 | |
4a4b033f | 72 | int seat_check_gc(Seat *s, bool drop_not_started); |
14c3baca LP |
73 | void seat_add_to_gc_queue(Seat *s); |
74 | ||
3f49d45a LP |
75 | bool seat_name_is_valid(const char *name); |
76 | char *seat_bus_path(Seat *s); | |
77 | ||
78 | extern const DBusObjectPathVTable bus_seat_vtable; | |
79 | ||
da119395 | 80 | int seat_send_signal(Seat *s, bool new_seat); |
9418f147 | 81 | int seat_send_changed(Seat *s, const char *properties); |
da119395 | 82 | |
90821c93 | 83 | #endif |