logind.h revision 5eda94dda25bccda928c4b33c790dbe748573a22
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
#ifndef foologindhfoo
#define foologindhfoo
/***
This file is part of systemd.
Copyright 2011 Lennart Poettering
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <stdbool.h>
#include <inttypes.h>
#include <libudev.h>
#include "util.h"
#include "list.h"
#include "hashmap.h"
#include "cgroup-util.h"
/* TODO:
*
* recreate VTs when disallocated
* udev rules
* PAM rewrite
* spawn user systemd
* dbus API
*
* non-local X11 server
*/
#include "logind-device.h"
#include "logind-seat.h"
#include "logind-session.h"
#include "logind-user.h"
struct Manager {
struct udev_monitor *udev_monitor;
int udev_fd;
int console_active_fd;
int bus_fd;
int epoll_fd;
int n_autovts;
char *cgroup_path;
char **controllers, **reset_controllers;
char **kill_only_users, **kill_exlude_users;
bool kill_user_processes;
};
Manager *manager_new(void);
void manager_free(Manager *m);
int manager_dispatch_udev(Manager *m);
int manager_dispatch_console(Manager *m);
int manager_enumerate_devices(Manager *m);
int manager_enumerate_seats(Manager *m);
int manager_enumerate_sessions(Manager *m);
int manager_enumerate_users(Manager *m);
int manager_start_linger_users(Manager *m);
int manager_startup(Manager *m);
int manager_run(Manager *m);
bool x11_display_is_local(const char *display);
#endif