Back to index

lightdm  1.3.2
user.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2010 Robert Ancell.
00003  * Author: Robert Ancell <robert.ancell@canonical.com>
00004  * 
00005  * This library is free software; you can redistribute it and/or modify it under
00006  * the terms of the GNU Lesser General Public License as published by the Free
00007  * Software Foundation; either version 3 of the License, or (at your option) any
00008  * later version. See http://www.gnu.org/copyleft/lgpl.html the full text of the
00009  * license.
00010  */
00011 
00012 #ifndef _LIGHTDM_USER_H_
00013 #define _LIGHTDM_USER_H_
00014 
00015 #include <glib-object.h>
00016 
00017 G_BEGIN_DECLS
00018 
00019 #define LIGHTDM_TYPE_USER_LIST            (lightdm_user_list_get_type())
00020 #define LIGHTDM_USER_LIST(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIGHTDM_TYPE_USER_LIST, LightDMUserList));
00021 #define LIGHTDM_USER_LIST_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), LIGHTDM_TYPE_USER_LIST, LightDMUserListClass))
00022 #define LIGHTDM_IS_USER_LIST(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIGHTDM_TYPE_USER_LIST))
00023 #define LIGHTDM_IS_USER_LIST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIGHTDM_TYPE_USER_LIST))
00024 #define LIGHTDM_USER_LIST_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), LIGHTDM_TYPE_USER_LIST, LightDMUserListClass))
00025 
00026 #define LIGHTDM_TYPE_USER            (lightdm_user_get_type())
00027 #define LIGHTDM_USER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIGHTDM_TYPE_USER, LightDMUser));
00028 #define LIGHTDM_USER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), LIGHTDM_TYPE_USER, LightDMUserClass))
00029 #define LIGHTDM_IS_USER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIGHTDM_TYPE_USER))
00030 #define LIGHTDM_IS_USER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIGHTDM_TYPE_USER))
00031 #define LIGHTDM_USER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), LIGHTDM_TYPE_USER, LightDMUserClass))
00032 
00033 typedef struct
00034 {
00035     GObject parent_instance;
00036 } LightDMUser;
00037 
00038 typedef struct
00039 {
00040     GObjectClass parent_class;
00041     void (*changed)(LightDMUser *user);
00042 
00043        /* Reserved */
00044        void (*reserved1) (void);
00045        void (*reserved2) (void);
00046        void (*reserved3) (void);
00047        void (*reserved4) (void);
00048        void (*reserved5) (void);
00049        void (*reserved6) (void);
00050 } LightDMUserClass;
00051 
00052 typedef struct
00053 {
00054     GObject parent_instance;
00055 } LightDMUserList;
00056 
00057 typedef struct
00058 {
00059     GObjectClass parent_class;
00060 
00061     void (*user_added)(LightDMUserList *user_list, LightDMUser *user);
00062     void (*user_changed)(LightDMUserList *user_list, LightDMUser *user);
00063     void (*user_removed)(LightDMUserList *user_list, LightDMUser *user);
00064 
00065        /* Reserved */
00066        void (*reserved1) (void);
00067        void (*reserved2) (void);
00068        void (*reserved3) (void);
00069        void (*reserved4) (void);
00070        void (*reserved5) (void);
00071        void (*reserved6) (void);
00072 } LightDMUserListClass;
00073 
00074 GType lightdm_user_list_get_type (void);
00075 
00076 GType lightdm_user_get_type (void);
00077 
00078 LightDMUserList *lightdm_user_list_get_instance (void);
00079 
00080 gint lightdm_user_list_get_length (LightDMUserList *user_list);
00081 
00082 LightDMUser *lightdm_user_list_get_user_by_name (LightDMUserList *user_list, const gchar *username);
00083 
00084 GList *lightdm_user_list_get_users (LightDMUserList *user_list);
00085 
00086 const gchar *lightdm_user_get_name (LightDMUser *user);
00087 
00088 const gchar *lightdm_user_get_real_name (LightDMUser *user);
00089 
00090 const gchar *lightdm_user_get_display_name (LightDMUser *user);
00091 
00092 const gchar *lightdm_user_get_home_directory (LightDMUser *user);
00093 
00094 const gchar *lightdm_user_get_image (LightDMUser *user);
00095 
00096 const gchar *lightdm_user_get_background (LightDMUser *user);
00097 
00098 const gchar *lightdm_user_get_language (LightDMUser *user);
00099 
00100 const gchar *lightdm_user_get_layout (LightDMUser *user);
00101 
00102 const gchar * const *lightdm_user_get_layouts (LightDMUser *user);
00103 
00104 const gchar *lightdm_user_get_session (LightDMUser *user);
00105 
00106 gboolean lightdm_user_get_logged_in (LightDMUser *user);
00107 
00108 gboolean lightdm_user_get_has_messages (LightDMUser *user);
00109 
00110 G_END_DECLS
00111 
00112 #endif /* _LIGHTDM_USER_H_ */