summaryrefslogtreecommitdiff
path: root/daemon/gdm-session.h
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2012-05-18 21:04:21 +0200
committerRay Strode <rstrode@redhat.com>2012-07-17 04:14:55 -0400
commite0a3c565625e7ef6cfa6082e25699b8bc1fbe39f (patch)
treeacf7455270c7b0b435269bb13177713f0d9c2613 /daemon/gdm-session.h
parent5d319617aa66e285d0f7f248d4bd589500af6ba9 (diff)
downloadgdm-e0a3c565625e7ef6cfa6082e25699b8bc1fbe39f.tar.gz
daemon: Add an interface for communicating with GDM via D-Bus
One goal for GNOME 3.6, is to replace the screen locking functionality provided by gnome-screensaver with redesigned functionality provided by gnome-shell. At the same time, it makes sense to consolidate the yucky PAM authentication code to one place (GDM). Right now only greeters can talk to GDM. At the time the greeter is started, the slave sets up a private communication channel which the greeter then connects to for initiating communication. This commit adds a new method to the org.gnome.DisplayManager.Manager interface that allows opening a private connection to the slave that is associated with the currently running session. That slave exports the session object over the bus that greeters can interact with the session as appropriate. This interface replaces the GDM_GREETER_DBUS_ADDRESS environment variable that used to to be used for connecting the greeter to the slave. This commit also drops gdm-greeter-server and gdm-chooser-server which don't fit the new model, and are really just thin middle men that don't do anything important. Furthermore, this commit splits GdmSession interfaces 3 orthogonal parts up into 3 separate interfaces on the session object. A future commit will make this interface work for screensavers/reauthentication. Based on work by Giovanni Campagna <gcampagna@src.gnome.org> https://bugzilla.gnome.org/show_bug.cgi?id=676381
Diffstat (limited to 'daemon/gdm-session.h')
-rw-r--r--daemon/gdm-session.h77
1 files changed, 27 insertions, 50 deletions
diff --git a/daemon/gdm-session.h b/daemon/gdm-session.h
index 2810c89b..ad5f8852 100644
--- a/daemon/gdm-session.h
+++ b/daemon/gdm-session.h
@@ -34,6 +34,12 @@ G_BEGIN_DECLS
typedef struct _GdmSessionPrivate GdmSessionPrivate;
+typedef enum
+{
+ GDM_SESSION_VERIFICATION_MODE_LOGIN,
+ GDM_SESSION_VERIFICATION_MODE_CHOOSER
+} GdmSessionVerificationMode;
+
typedef struct
{
GObject parent;
@@ -45,49 +51,20 @@ typedef struct
GObjectClass parent_class;
/* Signals */
- void (* setup_complete) (GdmSession *session,
- const char *service_name);
- void (* setup_failed) (GdmSession *session,
- const char *service_name,
- const char *message);
- void (* reset_complete) (GdmSession *session);
- void (* reset_failed) (GdmSession *session,
- const char *message);
- void (* authenticated) (GdmSession *session,
- const char *service_name);
- void (* authentication_failed) (GdmSession *session,
- const char *service_name,
- const char *message);
- void (* authorized) (GdmSession *session,
- const char *service_name);
- void (* authorization_failed) (GdmSession *session,
- const char *service_name,
- const char *message);
- void (* accredited) (GdmSession *session,
- const char *service_name);
- void (* accreditation_failed) (GdmSession *session,
- const char *service_name,
- const char *message);
-
- void (* info_query) (GdmSession *session,
- const char *service_name,
- const char *query_text);
- void (* secret_info_query) (GdmSession *session,
- const char *service_name,
- const char *query_text);
- void (* info) (GdmSession *session,
- const char *service_name,
- const char *info);
- void (* problem) (GdmSession *session,
- const char *service_name,
- const char *problem);
+ void (* client_ready_for_session_to_start) (GdmSession *session,
+ const char *service_name,
+ gboolean client_is_ready);
+
+ void (* cancelled) (GdmSession *session);
+ void (* client_connected) (GdmSession *session);
+ void (* client_disconnected) (GdmSession *session);
+ void (* disconnected) (GdmSession *session);
void (* session_opened) (GdmSession *session,
- const char *service_name);
- void (* session_open_failed) (GdmSession *session,
const char *service_name,
- const char *message);
+ const char *session_id);
void (* session_started) (GdmSession *session,
const char *service_name,
+ const char *session_id,
int pid);
void (* session_start_failed) (GdmSession *session,
const char *service_name,
@@ -100,29 +77,25 @@ typedef struct
const char *service_name);
void (* conversation_stopped) (GdmSession *session,
const char *service_name);
- void (* service_unavailable) (GdmSession *session,
+ void (* setup_complete) (GdmSession *session,
const char *service_name);
- void (* selected_user_changed) (GdmSession *session,
- const char *text);
-
- void (* default_language_name_changed) (GdmSession *session,
- const char *text);
- void (* default_session_name_changed) (GdmSession *session,
- const char *text);
} GdmSessionClass;
GType gdm_session_get_type (void);
-GdmSession *gdm_session_new (const char *display_name,
+GdmSession *gdm_session_new (GdmSessionVerificationMode verification_mode,
+ const char *display_name,
const char *display_hostname,
const char *display_device,
const char *display_seat_id,
const char *display_x11_authority_file,
gboolean display_is_local);
+char *gdm_session_get_server_address (GdmSession *session);
char *gdm_session_get_username (GdmSession *session);
char *gdm_session_get_display_device (GdmSession *session);
char *gdm_session_get_display_seat_id (GdmSession *session);
+char *gdm_session_get_session_id (GdmSession *session);
gboolean gdm_session_bypasses_xsession (GdmSession *session);
void gdm_session_start_conversation (GdmSession *session,
@@ -146,8 +119,7 @@ void gdm_session_authenticate (GdmSession *session,
void gdm_session_authorize (GdmSession *session,
const char *service_name);
void gdm_session_accredit (GdmSession *session,
- const char *service_name,
- int cred_flag);
+ const char *service_name);
void gdm_session_open_session (GdmSession *session,
const char *service_name);
void gdm_session_start_session (GdmSession *session,
@@ -168,6 +140,11 @@ void gdm_session_select_language (GdmSession *session,
void gdm_session_select_user (GdmSession *session,
const char *username);
void gdm_session_cancel (GdmSession *session);
+void gdm_session_reset (GdmSession *session);
+void gdm_session_request_timed_login (GdmSession *session,
+ const char *username,
+ int delay);
+gboolean gdm_session_client_is_connected (GdmSession *session);
G_END_DECLS