chiark / gitweb /
logind: after deserializatio readd systemd units to unit-to-object hashmap correctly
[elogind.git] / src / login / logind-user.h
index cffac3544725f87ead21f257bc04f1a73f077fa9..889f828c42bbdd64d4478ac196467fac44a0fb65 100644 (file)
@@ -1,7 +1,6 @@
 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
 
-#ifndef foologinduserhfoo
-#define foologinduserhfoo
+#pragma once
 
 /***
   This file is part of systemd.
@@ -31,6 +30,7 @@ typedef struct User User;
 
 typedef enum UserState {
         USER_OFFLINE,    /* Not logged in at all */
+        USER_OPENING,    /* Is logging in */
         USER_LINGERING,  /* Lingering has been enabled by the admin for this user */
         USER_ONLINE,     /* User logged in */
         USER_ACTIVE,     /* User logged in and has a session in the fg */
@@ -48,8 +48,12 @@ struct User {
 
         char *state_file;
         char *runtime_path;
+
         char *service;
-        char *cgroup_path;
+        char *slice;
+
+        char *service_job;
+        char *slice_job;
 
         Session *display;
 
@@ -57,6 +61,8 @@ struct User {
 
         bool in_gc_queue:1;
         bool started:1;
+        bool slice_created:1;
+        bool service_created:1;
 
         LIST_HEAD(Session, sessions);
         LIST_FIELDS(User, gc_queue);
@@ -81,7 +87,5 @@ extern const DBusObjectPathVTable bus_user_vtable;
 int user_send_signal(User *u, bool new_user);
 int user_send_changed(User *u, const char *properties);
 
-const char* user_state_to_string(UserState s);
-UserState user_state_from_string(const char *s);
-
-#endif
+const char* user_state_to_string(UserState s) _const_;
+UserState user_state_from_string(const char *s) _pure_;