]> rtime.felk.cvut.cz Git - sojka/lightdm.git/blobdiff - src/session.h
Allow greeters to run in-session
[sojka/lightdm.git] / src / session.h
index c62303e66b1b20781480b3df8f0696a3ffcea8e7..320ac4963f988bd7a23e91ad6da5d64ac4a61bbc 100644 (file)
 
 typedef struct Session Session;
 
+typedef enum
+{
+    SESSION_TYPE_LOCAL,
+    SESSION_TYPE_REMOTE
+} SessionType;
+
 #include "session-config.h"
 #include "display-server.h"
 #include "accounts.h"
 #include "x-authority.h"
 #include "logger.h"
+#include "log-file.h"
+#include "greeter.h"
 
 G_BEGIN_DECLS
 
@@ -31,6 +39,7 @@ G_BEGIN_DECLS
 #define SESSION_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), SESSION_TYPE, SessionClass))
 #define SESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SESSION_TYPE, SessionClass))
 
+#define SESSION_SIGNAL_CREATE_GREETER          "create-greeter"
 #define SESSION_SIGNAL_GOT_MESSAGES            "got-messages"
 #define SESSION_SIGNAL_AUTHENTICATION_COMPLETE "authentication-complete"
 #define SESSION_SIGNAL_STOPPED                 "stopped"
@@ -51,17 +60,12 @@ typedef struct
     void (*run)(Session *session);
     void (*stop)(Session *session);
 
+    Greeter *(*create_greeter)(Session *session);
     void (*got_messages)(Session *session);
     void (*authentication_complete)(Session *session);
     void (*stopped)(Session *session);
 } SessionClass;
 
-typedef enum
-{
-    SESSION_TYPE_LOCAL,
-    SESSION_TYPE_REMOTE
-} SessionType;
-
 GType session_get_type (void);
 
 Session *session_new (void);
@@ -84,7 +88,7 @@ void session_set_is_guest (Session *session, gboolean is_guest);
 
 gboolean session_get_is_guest (Session *session);
 
-void session_set_log_file (Session *session, const gchar *filename);
+void session_set_log_file (Session *session, const gchar *filename, LogMode log_mode);
 
 void session_set_display_server (Session *session, DisplayServer *display_server);
 
@@ -135,6 +139,8 @@ const gchar *session_get_authentication_result_string (Session *session);
 
 void session_run (Session *session);
 
+gboolean session_get_is_run (Session *session);
+
 void session_lock (Session *session);
 
 void session_unlock (Session *session);