Back to index

lightdm  1.3.2
accounts.h
Go to the documentation of this file.
00001 /* -*- Mode: C; indent-tabs-mode: nil; tab-width: 4 -*-
00002  *
00003  * Copyright (C) 2010-2011 Robert Ancell.
00004  * Author: Robert Ancell <robert.ancell@canonical.com>
00005  * 
00006  * This program is free software: you can redistribute it and/or modify it under
00007  * the terms of the GNU General Public License as published by the Free Software
00008  * Foundation, either version 3 of the License, or (at your option) any later
00009  * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
00010  * license.
00011  */
00012 
00013 #ifndef _USER_H_
00014 #define _USER_H_
00015 
00016 #include <glib-object.h>
00017 #include <gio/gio.h>
00018 
00019 G_BEGIN_DECLS
00020 
00021 #define USER_TYPE (user_get_type())
00022 #define USER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), USER_TYPE, User));
00023 
00024 typedef struct UserPrivate UserPrivate;
00025 
00026 typedef struct
00027 {
00028     GObject      parent_instance;
00029     UserPrivate *priv;
00030 } User;
00031 
00032 typedef struct
00033 {
00034     GObjectClass parent_class;
00035 } UserClass;
00036 
00037 User *accounts_get_user_by_name (const gchar *username);
00038 
00039 User *accounts_get_user_by_uid (uid_t uid);
00040 
00041 User *accounts_get_current_user (void);
00042 
00043 GType user_get_type (void);
00044 
00045 const gchar *user_get_name (User *user);
00046 
00047 uid_t user_get_uid (User *user);
00048 
00049 gid_t user_get_gid (User *user);
00050 
00051 const gchar *user_get_gecos (User *user);
00052 
00053 const gchar *user_get_home_directory (User *user);
00054 
00055 const gchar *user_get_shell (User *user);
00056 
00057 const gchar *user_get_xsession (User *user);
00058 
00059 void user_set_xsession (User *user, const gchar *session);
00060 
00061 const gchar *user_get_locale (User *user);
00062 
00063 void user_set_language (User *user, const gchar *language);
00064 
00065 G_END_DECLS
00066 
00067 #endif /* _USER_H_ */