X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Flogin%2Flogind-user.h;h=8d5f119e66f6c198a6f7d7b4abdfb675c01f2594;hp=a679d43a30295bbd05449799548845e97117fab6;hb=ec202eae8e84a4c99f054f771cb832046cb8769f;hpb=c2f1db8f83618e60dcded8303d14656d7d26b436 diff --git a/src/login/logind-user.h b/src/login/logind-user.h index a679d43a3..8d5f119e6 100644 --- a/src/login/logind-user.h +++ b/src/login/logind-user.h @@ -30,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 */ @@ -47,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; @@ -56,6 +61,7 @@ struct User { bool in_gc_queue:1; bool started:1; + bool closing:1; LIST_HEAD(Session, sessions); LIST_FIELDS(User, gc_queue); @@ -63,22 +69,25 @@ struct User { User* user_new(Manager *m, uid_t uid, gid_t gid, const char *name); void user_free(User *u); -int user_check_gc(User *u, bool drop_not_started); +bool user_check_gc(User *u, bool drop_not_started); void user_add_to_gc_queue(User *u); int user_start(User *u); int user_stop(User *u); +int user_finalize(User *u); UserState user_get_state(User *u); int user_get_idle_hint(User *u, dual_timestamp *t); int user_save(User *u); int user_load(User *u); int user_kill(User *u, int signo); +int user_check_linger_file(User *u); +extern const sd_bus_vtable user_vtable[]; +int user_node_enumerator(sd_bus *bus, const char *path, void *userdata, char ***nodes, sd_bus_error *error); +int user_object_find(sd_bus *bus, const char *path, const char *interface, void *userdata, void **found, sd_bus_error *error); char *user_bus_path(User *s); -extern const DBusObjectPathVTable bus_user_vtable; - int user_send_signal(User *u, bool new_user); -int user_send_changed(User *u, const char *properties); +int user_send_changed(User *u, const char *properties, ...) _sentinel_; -const char* user_state_to_string(UserState s); -UserState user_state_from_string(const char *s); +const char* user_state_to_string(UserState s) _const_; +UserState user_state_from_string(const char *s) _pure_;