]> rtime.felk.cvut.cz Git - sojka/lightdm.git/blob - src/accounts.h
03165b71c0f7c9e85a20aa6f3bf819718051d17e
[sojka/lightdm.git] / src / accounts.h
1 /* -*- Mode: C; indent-tabs-mode: nil; tab-width: 4 -*-
2  *
3  * Copyright (C) 2010-2011 Robert Ancell.
4  * Author: Robert Ancell <robert.ancell@canonical.com>
5  * 
6  * This program is free software: you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License as published by the Free Software
8  * Foundation, either version 3 of the License, or (at your option) any later
9  * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
10  * license.
11  */
12
13 #ifndef _USER_H_
14 #define _USER_H_
15
16 #include <glib-object.h>
17 #include <gio/gio.h>
18
19 G_BEGIN_DECLS
20
21 #define USER_TYPE (user_get_type())
22 #define USER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), USER_TYPE, User));
23
24 typedef struct UserPrivate UserPrivate;
25
26 typedef struct
27 {
28     GObject      parent_instance;
29     UserPrivate *priv;
30 } User;
31
32 typedef struct
33 {
34     GObjectClass parent_class;
35 } UserClass;
36
37 User *accounts_get_user_by_name (const gchar *username);
38
39 User *accounts_get_user_by_uid (uid_t uid);
40
41 User *accounts_get_current_user (void);
42
43 GType user_get_type (void);
44
45 const gchar *user_get_name (User *user);
46
47 uid_t user_get_uid (User *user);
48
49 gid_t user_get_gid (User *user);
50
51 const gchar *user_get_gecos (User *user);
52
53 const gchar *user_get_home_directory (User *user);
54
55 const gchar *user_get_shell (User *user);
56
57 const gchar *user_get_xsession (User *user);
58
59 void user_set_xsession (User *user, const gchar *session);
60
61 const gchar *user_get_locale (User *user);
62
63 void user_set_locale (User *user, const gchar *language);
64
65 G_END_DECLS
66
67 #endif /* _USER_H_ */