chiark / gitweb /
logind: introduce session-devices
[elogind.git] / src / login / logind-session.h
index edaae8d20ac43bbacbaf62aa00eb89ce49f77dd5..f175a8995ee4e29509626bacfe21ab130e874fc6 100644 (file)
@@ -28,7 +28,9 @@ typedef enum KillWho KillWho;
 #include "util.h"
 #include "logind.h"
 #include "logind-seat.h"
+#include "logind-session-device.h"
 #include "logind-user.h"
+#include "login-shared.h"
 
 typedef enum SessionState {
         SESSION_OPENING,  /* Session scope is being created */
@@ -105,6 +107,9 @@ struct Session {
 
         DBusMessage *create_message;
 
+        char *controller;
+        Hashmap *devices;
+
         LIST_FIELDS(Session, sessions_by_user);
         LIST_FIELDS(Session, sessions_by_seat);
 
@@ -153,3 +158,7 @@ SessionClass session_class_from_string(const char *s) _pure_;
 
 const char *kill_who_to_string(KillWho k) _const_;
 KillWho kill_who_from_string(const char *s) _pure_;
+
+bool session_is_controller(Session *s, const char *sender);
+int session_set_controller(Session *s, const char *sender, bool force);
+void session_drop_controller(Session *s);