logind-seat.h revision bf7825ae69f53a7e80a740547919833e49ed1df4
1556N/A/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
1556N/A
1556N/A#pragma once
1556N/A
1556N/A/***
1556N/A This file is part of systemd.
1556N/A
1556N/A Copyright 2011 Lennart Poettering
1556N/A
1556N/A systemd is free software; you can redistribute it and/or modify it
1556N/A under the terms of the GNU Lesser General Public License as published by
1556N/A the Free Software Foundation; either version 2.1 of the License, or
1556N/A (at your option) any later version.
1556N/A
1556N/A systemd is distributed in the hope that it will be useful, but
1556N/A WITHOUT ANY WARRANTY; without even the implied warranty of
1556N/A MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1556N/A Lesser General Public License for more details.
1556N/A
1556N/A You should have received a copy of the GNU Lesser General Public License
2899N/A along with systemd; If not, see <http://www.gnu.org/licenses/>.
1556N/A***/
1556N/A
1556N/Atypedef struct Seat Seat;
1556N/A
3433N/A#include "list.h"
1556N/A#include "util.h"
1556N/A#include "logind.h"
1556N/A#include "logind-device.h"
1556N/A#include "logind-session.h"
3433N/A
3433N/Astruct Seat {
1556N/A Manager *manager;
1556N/A char *id;
3433N/A
2899N/A char *state_file;
1556N/A
1556N/A LIST_HEAD(Device, devices);
1556N/A
1556N/A Session *active;
1768N/A LIST_HEAD(Session, sessions);
1768N/A
1768N/A bool in_gc_queue:1;
1768N/A bool started:1;
1768N/A
1556N/A LIST_FIELDS(Seat, gc_queue);
1556N/A};
1556N/A
3433N/ASeat *seat_new(Manager *m, const char *id);
1556N/Avoid seat_free(Seat *s);
1768N/A
1556N/Aint seat_save(Seat *s);
1938N/Aint seat_load(Seat *s);
1556N/A
1556N/Aint seat_apply_acls(Seat *s, Session *old_active);
1556N/Aint seat_set_active(Seat *s, Session *session);
1556N/Aint seat_active_vt_changed(Seat *s, int vtnr);
1556N/Aint seat_read_active_vt(Seat *s);
1556N/Aint seat_preallocate_vts(Seat *s);
1556N/A
1556N/Aint seat_attach_session(Seat *s, Session *session);
1556N/A
1556N/Abool seat_has_vts(Seat *s);
1556N/Abool seat_is_seat0(Seat *s);
bool seat_can_multi_session(Seat *s);
bool seat_can_tty(Seat *s);
bool seat_has_master_device(Seat *s);
bool seat_can_graphical(Seat *s);
int seat_get_idle_hint(Seat *s, dual_timestamp *t);
int seat_start(Seat *s);
int seat_stop(Seat *s);
int seat_stop_sessions(Seat *s);
int seat_check_gc(Seat *s, bool drop_not_started);
void seat_add_to_gc_queue(Seat *s);
bool seat_name_is_valid(const char *name);
char *seat_bus_path(Seat *s);
extern const DBusObjectPathVTable bus_seat_vtable;
int seat_send_signal(Seat *s, bool new_seat);
int seat_send_changed(Seat *s, const char *properties);