X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=sidebyside;f=src%2Flogin%2Flogind.h;h=fe6ea0fd3476231bd2fbd5739c881e1923ab8d8a;hb=af9792ac7f39354f80e9006c42c2400c5e41c447;hp=0b52bf7b099039c4b5b99606e583e5b1795c606b;hpb=beaafb2ea6be591882aef21fe19b88e3b2461087;p=elogind.git diff --git a/src/login/logind.h b/src/login/logind.h index 0b52bf7b0..fe6ea0fd3 100644 --- a/src/login/logind.h +++ b/src/login/logind.h @@ -40,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; @@ -99,12 +100,21 @@ 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 sleep_key_ignore_inhibited; + bool suspend_key_ignore_inhibited; + bool hibernate_key_ignore_inhibited; bool lid_switch_ignore_inhibited; }; @@ -114,6 +124,7 @@ enum { FD_BUTTON_UDEV, FD_CONSOLE, FD_BUS, + FD_IDLE_ACTION, FD_OTHER_BASE }; @@ -136,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);