1 /*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
3 #ifndef foologinduserhfoo
4 #define foologinduserhfoo
7 This file is part of systemd.
9 Copyright 2011 Lennart Poettering
11 systemd is free software; you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
16 systemd is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with systemd; If not, see <http://www.gnu.org/licenses/>.
25 typedef struct User User;
30 #include "logind-session.h"
32 typedef enum UserState {
38 _USER_STATE_INVALID = -1
55 dual_timestamp timestamp;
59 LIST_HEAD(Session, sessions);
60 LIST_FIELDS(User, gc_queue);
63 User* user_new(Manager *m, uid_t uid, gid_t gid, const char *name);
64 void user_free(User *u);
65 int user_check_gc(User *u);
66 void user_add_to_gc_queue(User *u);
67 int user_start(User *u);
68 int user_stop(User *u);
69 UserState user_get_state(User *u);
70 int user_save(User *u);
71 int user_load(User *u);
73 const char* user_state_to_string(UserState s);
74 UserState user_state_from_string(const char *s);