X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flogin%2Flogind-user.h;h=16d798541a4297c00be2710b37a7e87a990f0a98;hb=9444b1f;hp=93e5fd934a0ad40ae886c8780aeadac07b4bacc6;hpb=e96cd586c5195b73af74791280d8461510258b48;p=elogind.git diff --git a/src/login/logind-user.h b/src/login/logind-user.h index 93e5fd934..16d798541 100644 --- a/src/login/logind-user.h +++ b/src/login/logind-user.h @@ -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. @@ -30,11 +29,11 @@ typedef struct User User; #include "logind-session.h" typedef enum UserState { - USER_OFFLINE, - USER_LINGERING, - USER_ONLINE, - USER_ACTIVE, - USER_CLOSING, + USER_OFFLINE, /* Not logged in at all */ + 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 */ + USER_CLOSING, /* User logged out, but processes still remain and lingering is not enabled */ _USER_STATE_MAX, _USER_STATE_INVALID = -1 } UserState; @@ -50,6 +49,7 @@ struct User { char *runtime_path; char *service; char *cgroup_path; + char *slice; Session *display; @@ -81,7 +81,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_;