Back to index

lightdm  1.3.2
greeter.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_GREETER_H_
00013 #define _LIGHTDM_GREETER_H_
00014 
00015 #include <glib-object.h>
00016 
00017 G_BEGIN_DECLS
00018 
00019 #define LIGHTDM_TYPE_GREETER            (lightdm_greeter_get_type())
00020 #define LIGHTDM_GREETER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIGHTDM_TYPE_GREETER, LightDMGreeter));
00021 #define LIGHTDM_GREETER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), LIGHTDM_TYPE_GREETER, LightDMGreeterClass))
00022 #define LIGHTDM_IS_GREETER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIGHTDM_TYPE_GREETER))
00023 #define LIGHTDM_IS_GREETER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIGHTDM_TYPE_GREETER))
00024 #define LIGHTDM_GREETER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), LIGHTDM_TYPE_GREETER, LightDMGreeterClass))
00025 
00031 typedef enum
00032 {
00033     LIGHTDM_PROMPT_TYPE_QUESTION,
00034     LIGHTDM_PROMPT_TYPE_SECRET
00035 } LightDMPromptType;
00036 
00042 typedef enum
00043 {
00044     LIGHTDM_MESSAGE_TYPE_INFO,
00045     LIGHTDM_MESSAGE_TYPE_ERROR
00046 } LightDMMessageType;
00047 
00048 typedef struct
00049 {
00050     GObject parent_instance;
00051 } LightDMGreeter;
00052 
00053 typedef struct
00054 {
00055     GObjectClass parent_class;
00056 
00057     void (*show_message)(LightDMGreeter *greeter, const gchar *text, LightDMMessageType type);
00058     void (*show_prompt)(LightDMGreeter *greeter, const gchar *text, LightDMPromptType type);
00059     void (*authentication_complete)(LightDMGreeter *greeter);
00060     void (*autologin_timer_expired)(LightDMGreeter *greeter);
00061 
00062        /* Reserved */
00063        void (*reserved1) (void);
00064        void (*reserved2) (void);
00065        void (*reserved3) (void);
00066        void (*reserved4) (void);
00067        void (*reserved5) (void);
00068        void (*reserved6) (void);
00069 } LightDMGreeterClass;
00070 
00071 GType lightdm_greeter_get_type (void);
00072 
00073 LightDMGreeter *lightdm_greeter_new (void);
00074 
00075 gboolean lightdm_greeter_connect_sync (LightDMGreeter *greeter, GError **error);
00076 
00077 const gchar *lightdm_greeter_get_hint (LightDMGreeter *greeter, const gchar *name);
00078 
00079 const gchar *lightdm_greeter_get_default_session_hint (LightDMGreeter *greeter);
00080 
00081 gboolean lightdm_greeter_get_hide_users_hint (LightDMGreeter *greeter);
00082 
00083 gboolean lightdm_greeter_get_show_manual_login_hint (LightDMGreeter *greeter);
00084 
00085 gboolean lightdm_greeter_get_lock_hint (LightDMGreeter *greeter);
00086 
00087 gboolean lightdm_greeter_get_has_guest_account_hint (LightDMGreeter *greeter);
00088 
00089 const gchar *lightdm_greeter_get_select_user_hint (LightDMGreeter *greeter);
00090 
00091 gboolean lightdm_greeter_get_select_guest_hint (LightDMGreeter *greeter);
00092 
00093 const gchar *lightdm_greeter_get_autologin_user_hint (LightDMGreeter *greeter);
00094 
00095 gboolean lightdm_greeter_get_autologin_guest_hint (LightDMGreeter *greeter);
00096 
00097 gint lightdm_greeter_get_autologin_timeout_hint (LightDMGreeter *greeter);
00098 
00099 void lightdm_greeter_cancel_autologin (LightDMGreeter *greeter);
00100 
00101 void lightdm_greeter_authenticate (LightDMGreeter *greeter, const char *username);
00102 
00103 void lightdm_greeter_authenticate_as_guest (LightDMGreeter *greeter);
00104 
00105 void lightdm_greeter_respond (LightDMGreeter *greeter, const gchar *response);
00106 
00107 void lightdm_greeter_cancel_authentication (LightDMGreeter *greeter);
00108 
00109 gboolean lightdm_greeter_get_in_authentication (LightDMGreeter *greeter);
00110 
00111 gboolean lightdm_greeter_get_is_authenticated (LightDMGreeter *greeter);
00112 
00113 const gchar *lightdm_greeter_get_authentication_user (LightDMGreeter *greeter);
00114 
00115 void lightdm_greeter_set_language (LightDMGreeter *greeter, const gchar *language);
00116 
00117 gboolean lightdm_greeter_start_session_sync (LightDMGreeter *greeter, const gchar *session, GError **error);
00118 
00119 G_END_DECLS
00120 
00121 #endif /* _LIGHTDM_GREETER_H_ */