X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flogin%2Flogind.h;h=fe6ea0fd3476231bd2fbd5739c881e1923ab8d8a;hb=af9792ac7f39354f80e9006c42c2400c5e41c447;hp=5e828bf0197404fcffd16f6d384828302eee5d6b;hpb=8c8c43515cee56dfc2298998a9e5958308c46f99;p=elogind.git diff --git a/src/login/logind.h b/src/login/logind.h index 5e828bf01..fe6ea0fd3 100644 --- a/src/login/logind.h +++ b/src/login/logind.h @@ -1,7 +1,6 @@ /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -#ifndef foologindhfoo -#define foologindhfoo +#pragma once /*** This file is part of systemd. @@ -41,6 +40,7 @@ typedef struct Manager Manager; #include "logind-user.h" #include "logind-inhibit.h" #include "logind-button.h" +#include "logind-action.h" struct Manager { DBusConnection *bus; @@ -69,6 +69,9 @@ struct Manager { unsigned n_autovts; + unsigned reserve_vt; + int reserve_vt_fd; + Seat *vtconsole; char *cgroup_path; @@ -97,9 +100,22 @@ struct Manager { usec_t inhibit_delay_max; - HandleButton handle_power_key; - HandleButton handle_sleep_key; - HandleButton handle_lid_switch; + char* action_job; + + int idle_action_fd; /* the timer_fd */ + usec_t idle_action_usec; + usec_t idle_action_not_before_usec; + HandleAction idle_action; + + HandleAction handle_power_key; + HandleAction handle_suspend_key; + HandleAction handle_hibernate_key; + HandleAction handle_lid_switch; + + bool power_key_ignore_inhibited; + bool suspend_key_ignore_inhibited; + bool hibernate_key_ignore_inhibited; + bool lid_switch_ignore_inhibited; }; enum { @@ -108,6 +124,7 @@ enum { FD_BUTTON_UDEV, FD_CONSOLE, FD_BUS, + FD_IDLE_ACTION, FD_OTHER_BASE }; @@ -130,6 +147,7 @@ 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_dispatch_idle_action(Manager *m); int manager_enumerate_devices(Manager *m); int manager_enumerate_buttons(Manager *m); @@ -164,5 +182,3 @@ int manager_dispatch_delayed(Manager *manager); /* gperf lookup function */ const struct ConfigPerfItem* logind_gperf_lookup(const char *key, unsigned length); - -#endif