]> rtime.felk.cvut.cz Git - sojka/lightdm.git/blobdiff - src/session.h
Merge with trunk
[sojka/lightdm.git] / src / session.h
index d7c4b0c517d2f0130536c129ba93450c023fe265..c62303e66b1b20781480b3df8f0696a3ffcea8e7 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (C) 2010-2011 Robert Ancell.
  * Author: Robert Ancell <robert.ancell@canonical.com>
- * 
+ *
  * This program is free software: you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
  * Foundation, either version 3 of the License, or (at your option) any later
 
 typedef struct Session Session;
 
+#include "session-config.h"
 #include "display-server.h"
 #include "accounts.h"
-#include "xauthority.h"
+#include "x-authority.h"
+#include "logger.h"
 
 G_BEGIN_DECLS
 
@@ -29,6 +31,10 @@ 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_GOT_MESSAGES            "got-messages"
+#define SESSION_SIGNAL_AUTHENTICATION_COMPLETE "authentication-complete"
+#define SESSION_SIGNAL_STOPPED                 "stopped"
+
 typedef struct SessionPrivate SessionPrivate;
 
 struct Session
@@ -56,15 +62,13 @@ typedef enum
     SESSION_TYPE_REMOTE
 } SessionType;
 
-#define XDG_SESSION_CLASS_USER        "user"
-#define XDG_SESSION_CLASS_GREETER     "greeter"
-#define XDG_SESSION_CLASS_LOCK_SCREEN "lock-screen"
-
 GType session_get_type (void);
 
 Session *session_new (void);
 
-void session_set_session_type (Session *session, const gchar *session_type);
+void session_set_config (Session *session, SessionConfig *config);
+
+SessionConfig *session_get_config (Session *session);
 
 const gchar *session_get_session_type (Session *session);
 
@@ -82,8 +86,6 @@ gboolean session_get_is_guest (Session *session);
 
 void session_set_log_file (Session *session, const gchar *filename);
 
-void session_set_class (Session *session, const gchar *class);
-
 void session_set_display_server (Session *session, DisplayServer *display_server);
 
 DisplayServer *session_get_display_server (Session *session);
@@ -92,12 +94,16 @@ void session_set_tty (Session *session, const gchar *tty);
 
 void session_set_xdisplay (Session *session, const gchar *xdisplay);
 
-void session_set_xauthority (Session *session, XAuthority *authority, gboolean use_system_location);
+void session_set_x_authority (Session *session, XAuthority *authority, gboolean use_system_location);
 
 void session_set_remote_host_name (Session *session, const gchar *remote_host_name);
 
 void session_set_env (Session *session, const gchar *name, const gchar *value);
 
+const gchar *session_get_env (Session *session, const gchar *name);
+
+void session_unset_env (Session *session, const gchar *name);
+
 void session_set_argv (Session *session, gchar **argv);
 
 // FIXME: Remove
@@ -109,6 +115,8 @@ gboolean session_get_is_started (Session *session);
 
 const gchar *session_get_username (Session *session);
 
+const gchar *session_get_login1_session_id (Session *session);
+
 const gchar *session_get_console_kit_cookie (Session *session);
 
 void session_respond (Session *session, struct pam_response *response);
@@ -131,6 +139,8 @@ void session_lock (Session *session);
 
 void session_unlock (Session *session);
 
+void session_activate (Session *session);
+
 void session_stop (Session *session);
 
 gboolean session_get_is_stopping (Session *session);