logind.h revision c2f1db8f83618e60dcded8303d14656d7d26b436
/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
#pragma once
/***
This file is part of systemd.
Copyright 2011 Lennart Poettering
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser 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 "audit.h"
#include "list.h"
#include "hashmap.h"
#include "cgroup-util.h"
#include "logind-device.h"
#include "logind-seat.h"
#include "logind-session.h"
#include "logind-user.h"
#include "logind-inhibit.h"
#include "logind-button.h"
struct Manager {
int udev_seat_fd;
int udev_vcsa_fd;
int udev_button_fd;
int console_active_fd;
int bus_fd;
int epoll_fd;
unsigned n_autovts;
char *cgroup_path;
char **controllers, **reset_controllers;
char **kill_only_users, **kill_exclude_users;
bool kill_user_processes;
unsigned long session_counter;
unsigned long inhibit_counter;
/* If a shutdown was delayed due to a inhibitor this contains
the unit name we are supposed to start after the delay is
over */
const char *delayed_unit;
};
enum {
};
Manager *manager_new(void);
void manager_free(Manager *m);
int manager_dispatch_seat_udev(Manager *m);
int manager_dispatch_vcsa_udev(Manager *m);
int manager_dispatch_button_udev(Manager *m);
int manager_dispatch_console(Manager *m);
int manager_enumerate_devices(Manager *m);
int manager_enumerate_buttons(Manager *m);
int manager_enumerate_seats(Manager *m);
int manager_enumerate_sessions(Manager *m);
int manager_enumerate_users(Manager *m);
int manager_enumerate_inhibitors(Manager *m);
int manager_startup(Manager *m);
int manager_run(Manager *m);
extern const DBusObjectPathVTable bus_manager_vtable;
int bus_manager_shutdown_or_sleep_now_or_later(Manager *m, const char *unit_name, InhibitWhat w, DBusError *error);
/* gperf lookup function */