chiark / gitweb /
logind: check whether newly created session is active
[elogind.git] / src / logind.h
index 22eab55625b6ee9ac3d439a113ae8fa4a0e28a9d..5c513b4021028c2366e3f6d490c61ea428091114 100644 (file)
@@ -37,9 +37,9 @@
  * recreate VTs when disallocated
  * spawn user systemd
  * direct client API
- * subscribe to cgroup changes, fd HUP
- * D-Bus method: AttachDevice(seat, device);
- * D-Bus method: PermitLinger(user, bool b);
+ * D-Bus method: AttachDevices(seat, devices[]);
+ * D-Bus method: SetLinger(user, bool b);
+ * kill cgroup immediately when fd is EOF.
  *
  * non-local X11 server
  * reboot/shutdown halt management
@@ -84,6 +84,16 @@ struct Manager {
         bool kill_user_processes;
 
         unsigned long session_counter;
+
+        Hashmap *cgroups;
+        Hashmap *pipe_fds;
+};
+
+enum {
+        FD_UDEV,
+        FD_CONSOLE,
+        FD_BUS,
+        FD_PIPE_BASE
 };
 
 Manager *manager_new(void);
@@ -109,6 +119,8 @@ int manager_startup(Manager *m);
 int manager_run(Manager *m);
 int manager_spawn_autovt(Manager *m, int vtnr);
 
+void manager_cgroup_notify_empty(Manager *m, const char *cgroup);
+
 void manager_gc(Manager *m);
 
 int manager_get_idle_hint(Manager *m, dual_timestamp *t);
@@ -117,6 +129,8 @@ bool x11_display_is_local(const char *display);
 
 extern const DBusObjectPathVTable bus_manager_vtable;
 
+DBusHandlerResult bus_message_filter(DBusConnection *c, DBusMessage *message, void *userdata);
+
 int manager_send_changed(Manager *manager, const char *properties);
 
 #endif