chiark / gitweb /
logind: add support for automatic suspend/hibernate/shutdown on idle
[elogind.git] / src / login / logind-button.h
index 0378211325c1a7e9dcef56e815d02799be77ec90..1c5a84553d21ca7dc6322fdec083b255cbb45a85 100644 (file)
 
 typedef struct Button Button;
 
-typedef enum HandleButton {
-        HANDLE_NO,
-        HANDLE_YES, /* only if no inhibitor is taken/no session is around */
-        HANDLE_ALWAYS, /* regardless if inhibitor is taken/session is around */
-        _HANDLE_BUTTON_MAX,
-        _HANDLE_BUTTON_INVALID = -1
-} HandleButton;
-
 #include "list.h"
 #include "util.h"
 #include "logind.h"
@@ -42,17 +34,15 @@ struct Button {
         char *name;
         char *seat;
         int fd;
+
+        bool lid_close_queued;
 };
 
 Button* button_new(Manager *m, const char *name);
 void button_free(Button*b);
 int button_open(Button *b);
 int button_process(Button *b);
+int button_recheck(Button *b);
 int button_set_seat(Button *b, const char *sn);
 
-const char* handle_button_to_string(HandleButton h);
-HandleButton handle_button_from_string(const char *s);
-
-int config_parse_handle_button(const char *filename, unsigned line, const char *section, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
-
 #endif