[gdm] greeter: port to libgdm



commit 1ec0665b631965b8c73277374dddde8b1d8b6d1e
Author: Ray Strode <rstrode redhat com>
Date:   Wed Jul 11 14:38:26 2012 -0400

    greeter: port to libgdm
    
    The simple-greeter is the fallback greeter shown if
    gnome-shell is unavailable.
    
    Right now it uses its own hardcoded D-Bus calls
    to interact with the GDM daemon.
    
    The D-Bus APIs have changed, though, and so now it
    no longer works.
    
    This commit changes simple-greeter to use libgdm
    instead.

 configure.ac                                       |    1 -
 gui/simple-greeter/Makefile.am                     |   29 +-
 gui/simple-greeter/gdm-greeter-client.c            | 1127 --------------------
 gui/simple-greeter/gdm-greeter-client.h            |  133 ---
 gui/simple-greeter/gdm-greeter-login-window.c      |    5 +-
 gui/simple-greeter/gdm-greeter-panel.c             |  155 ++--
 gui/simple-greeter/gdm-greeter-session.c           |  270 +++--
 gui/simple-greeter/greeter-main.c                  |  109 ++-
 .../org.gnome.SessionManager.ClientPrivate.xml     |  123 +++
 gui/simple-greeter/org.gnome.SessionManager.xml    |  392 +++++++
 10 files changed, 849 insertions(+), 1495 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index df47e46..af2e295 100644
--- a/configure.ac
+++ b/configure.ac
@@ -140,7 +140,6 @@ AC_SUBST(UPOWER_CFLAGS)
 AC_SUBST(UPOWER_LIBS)
 
 PKG_CHECK_MODULES(SIMPLE_GREETER,
-        dbus-glib-1 >= $DBUS_GLIB_REQUIRED_VERSION
         gtk+-3.0 >= $GTK_REQUIRED_VERSION
 	fontconfig >= $FONTCONFIG_REQUIRED_VERSION
         accountsservice >= $ACCOUNTS_SERVICE_REQUIRED_VERSION
diff --git a/gui/simple-greeter/Makefile.am b/gui/simple-greeter/Makefile.am
index f11e6cf..1cd5fab 100644
--- a/gui/simple-greeter/Makefile.am
+++ b/gui/simple-greeter/Makefile.am
@@ -7,6 +7,7 @@ SUBDIRS = 				\
 AM_CPPFLAGS = \
 	-I$(top_srcdir)/common				\
 	-I$(top_builddir)/common			\
+	-I$(top_srcdir)/gui/libgdm			\
 	-I$(top_srcdir)/gui/simple-greeter/libgdmsimplegreeter	\
 	-DDMCONFDIR=\""$(dmconfdir)"\"			\
 	-DGDMCONFDIR=\"$(gdmconfdir)\"                  \
@@ -36,6 +37,22 @@ noinst_PROGRAMS = 			\
 	test-user-manager		\
 	$(NULL)
 
+gsm-client-glue.c gsm-client-glue.h : org.gnome.SessionManager.ClientPrivate.xml Makefile.am
+	$(AM_V_GEN)gdbus-codegen 					\
+		--c-namespace Gsm				\
+		--interface-prefix=org.gnome.SessionManager		\
+		--generate-c-code=gsm-client-glue			\
+		org.gnome.SessionManager.ClientPrivate.xml
+
+gsm-manager-glue.c gsm-manager-glue.h : org.gnome.SessionManager.xml Makefile.am
+	$(AM_V_GEN)gdbus-codegen 					\
+		--c-namespace Gsm				\
+		--interface-prefix=org.gnome.SessionManager		\
+		--generate-c-code=gsm-manager-glue			\
+		--annotate "org.gnome.SessionManager"			\
+		           "org.gtk.GDBus.C.Name" Manager		\
+		org.gnome.SessionManager.xml
+
 test_greeter_login_window_SOURCES = 	\
 	test-greeter-login-window.c	\
 	gdm-timer.h			\
@@ -64,6 +81,7 @@ test_greeter_login_window_SOURCES = 	\
 
 test_greeter_login_window_LDADD =	\
 	$(top_builddir)/common/libgdmcommon.la	\
+	$(top_builddir)/gui/libgdm/libgdm.la	\
 	$(top_builddir)/gui/simple-greeter/libgdmsimplegreeter/libgdmsimplegreeter.la	\
 	$(top_builddir)/gui/simple-greeter/extensions/unified/libunified.la	\
 	$(COMMON_LIBS)			\
@@ -176,8 +194,6 @@ gdm_simple_greeter_SOURCES =  		\
 	gdm-scrollable-widget.c		\
 	gdm-chooser-widget.h		\
 	gdm-chooser-widget.c		\
-	gdm-greeter-client.h		\
-	gdm-greeter-client.c		\
 	gdm-greeter-session.h		\
 	gdm-greeter-session.c		\
 	gdm-greeter-login-window.c	\
@@ -202,6 +218,7 @@ gdm_simple_greeter_SOURCES =  		\
 
 gdm_simple_greeter_LDADD = 		\
 	$(top_builddir)/common/libgdmcommon.la	\
+	$(top_builddir)/gui/libgdm/libgdm.la	\
 	$(top_builddir)/gui/simple-greeter/libgdmsimplegreeter/libgdmsimplegreeter.la	\
 	$(top_builddir)/gui/simple-greeter/extensions/unified/libunified.la	\
 	$(COMMON_LIBS)			\
@@ -212,6 +229,14 @@ gdm_simple_greeter_LDADD = 		\
 	$(UPOWER_LIBS)		\
 	$(NULL)
 
+nodist_gdm_simple_greeter_SOURCES =     \
+	gsm-manager-glue.c		\
+	gsm-manager-glue.h		\
+	gsm-client-glue.c		\
+	gsm-client-glue.h
+
+BUILT_SOURCES = gsm-client-glue.h gsm-manager-glue.h
+
 uidir = $(pkgdatadir)
 ui_DATA = 					\
 	gdm-greeter-login-window.ui		\
diff --git a/gui/simple-greeter/gdm-greeter-login-window.c b/gui/simple-greeter/gdm-greeter-login-window.c
index 4ca83c7..f7b67b7 100644
--- a/gui/simple-greeter/gdm-greeter-login-window.c
+++ b/gui/simple-greeter/gdm-greeter-login-window.c
@@ -49,14 +49,11 @@
 
 #include <gtk/gtk.h>
 
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-lowlevel.h>
-
 #include "gdm-settings-client.h"
 #include "gdm-settings-keys.h"
 #include "gdm-profile.h"
 
-#include "gdm-greeter-client.h"
+#include "gdm-client.h"
 #include "gdm-greeter-login-window.h"
 #include "gdm-user-chooser-widget.h"
 #include "gdm-session-option-widget.h"
diff --git a/gui/simple-greeter/gdm-greeter-panel.c b/gui/simple-greeter/gdm-greeter-panel.c
index ba6f810..5c626fe 100644
--- a/gui/simple-greeter/gdm-greeter-panel.c
+++ b/gui/simple-greeter/gdm-greeter-panel.c
@@ -40,8 +40,6 @@
 #include <gdk/gdk.h>
 #include <gtk/gtk.h>
 
-#include <dbus/dbus-glib.h>
-
 #ifdef HAVE_UPOWER
 #include <upower.h>
 #endif
@@ -626,89 +624,100 @@ on_animation_tick (GdmGreeterPanel *panel,
 }
 
 static gboolean
-try_system_stop (DBusGConnection *connection,
+try_system_stop (GDBusConnection *connection,
                  GError         **error)
 {
-        DBusGProxy      *proxy;
-        gboolean         res;
+        GVariant  *reply;
+        gboolean   res;
+        GError    *call_error;
 
         g_debug ("GdmGreeterPanel: trying to stop system");
 
-        /* try systemd first */
-        proxy = dbus_g_proxy_new_for_name_owner (connection,
-                                                 LOGIN1_NAME,
-                                                 LOGIN1_PATH,
-                                                 LOGIN1_INTERFACE,
-                                                 error);
-        if (proxy) {
-                res = dbus_g_proxy_call_with_timeout (proxy,
-                                                      "PowerOff",
-                                                      INT_MAX,
-                                                      error,
-                                                      /* parameters: */
-                                                      G_TYPE_BOOLEAN,
-                                                      TRUE,
-                                                      G_TYPE_INVALID,
-                                                      /* return values: */
-                                                      G_TYPE_INVALID);
+        call_error = NULL;
+        reply = g_dbus_connection_call_sync (connection,
+                                             LOGIN1_NAME,
+                                             LOGIN1_PATH,
+                                             LOGIN1_INTERFACE,
+                                             "PowerOff",
+                                             g_variant_new ("(b)", TRUE),
+                                             NULL,
+                                             G_DBUS_CALL_FLAGS_NONE,
+                                             INT_MAX,
+                                             NULL,
+                                             &call_error);
+
+        if (reply == NULL && g_error_matches (call_error, G_DBUS_ERROR, G_DBUS_ERROR_NAME_HAS_NO_OWNER)) {
+                g_clear_error (&call_error);
+                reply = g_dbus_connection_call_sync (connection,
+                                                     CK_NAME,
+                                                     CK_MANAGER_PATH,
+                                                     CK_MANAGER_INTERFACE,
+                                                     "Stop",
+                                                     NULL,
+                                                     NULL,
+                                                     G_DBUS_CALL_FLAGS_NONE,
+                                                     INT_MAX,
+                                                     NULL,
+                                                     &call_error);
+        }
+
+        if (reply != NULL) {
+                res = TRUE;
+                g_variant_unref (reply);
         } else {
-                proxy = dbus_g_proxy_new_for_name (connection,
-                                                   CK_NAME,
-                                                   CK_MANAGER_PATH,
-                                                   CK_MANAGER_INTERFACE);
-                res = dbus_g_proxy_call_with_timeout (proxy,
-                                                      "Stop",
-                                                      INT_MAX,
-                                                      error,
-                                                      /* parameters: */
-                                                      G_TYPE_INVALID,
-                                                      /* return values: */
-                                                      G_TYPE_INVALID);
+                g_propagate_error (error, call_error);
+                res = FALSE;
         }
 
         return res;
 }
 
 static gboolean
-try_system_restart (DBusGConnection *connection,
+try_system_restart (GDBusConnection *connection,
                     GError         **error)
 {
-        DBusGProxy      *proxy;
-        gboolean         res;
+        GVariant  *reply;
+        gboolean   res;
+        GError    *call_error;
 
         g_debug ("GdmGreeterPanel: trying to restart system");
 
-        /* try systemd first */
-        proxy = dbus_g_proxy_new_for_name_owner (connection,
-                                                 LOGIN1_NAME,
-                                                 LOGIN1_PATH,
-                                                 LOGIN1_INTERFACE,
-                                                 error);
-        if (proxy) {
-                res = dbus_g_proxy_call_with_timeout (proxy,
-                                                      "Reboot",
-                                                      INT_MAX,
-                                                      error,
-                                                      /* parameters: */
-                                                      G_TYPE_BOOLEAN,
-                                                      TRUE,
-                                                      G_TYPE_INVALID,
-                                                      /* return values: */
-                                                      G_TYPE_INVALID);
+        call_error = NULL;
+        reply = g_dbus_connection_call_sync (connection,
+                                             LOGIN1_NAME,
+                                             LOGIN1_PATH,
+                                             LOGIN1_INTERFACE,
+                                             "Reboot",
+                                             g_variant_new ("(b)", TRUE),
+                                             NULL,
+                                             G_DBUS_CALL_FLAGS_NONE,
+                                             INT_MAX,
+                                             NULL,
+                                             &call_error);
+
+        if (reply == NULL && g_error_matches (call_error, G_DBUS_ERROR, G_DBUS_ERROR_NAME_HAS_NO_OWNER)) {
+                g_clear_error (&call_error);
+                reply = g_dbus_connection_call_sync (connection,
+                                                     CK_NAME,
+                                                     CK_MANAGER_PATH,
+                                                     CK_MANAGER_INTERFACE,
+                                                     "Restart",
+                                                     NULL,
+                                                     NULL,
+                                                     G_DBUS_CALL_FLAGS_NONE,
+                                                     INT_MAX,
+                                                     NULL,
+                                                     &call_error);
+        }
+
+        if (reply != NULL) {
+                res = TRUE;
+                g_variant_unref (reply);
         } else {
-                proxy = dbus_g_proxy_new_for_name (connection,
-                                                   CK_NAME,
-                                                   CK_MANAGER_PATH,
-                                                   CK_MANAGER_INTERFACE);
-                res = dbus_g_proxy_call_with_timeout (proxy,
-                                                      "Restart",
-                                                      INT_MAX,
-                                                      error,
-                                                      /* parameters: */
-                                                      G_TYPE_INVALID,
-                                                      /* return values: */
-                                                      G_TYPE_INVALID);
+                g_propagate_error (error, call_error);
+                res = FALSE;
         }
+
         return res;
 }
 
@@ -754,10 +763,10 @@ do_system_restart (void)
 {
         gboolean         res;
         GError          *error;
-        DBusGConnection *connection;
+        GDBusConnection *connection;
 
         error = NULL;
-        connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
+        connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
         if (connection == NULL) {
                 g_warning ("Unable to get system bus connection: %s", error->message);
                 g_error_free (error);
@@ -766,8 +775,7 @@ do_system_restart (void)
 
         res = try_system_restart (connection, &error);
         if (!res) {
-                g_debug ("GdmGreeterPanel: unable to restart system: %s: %s",
-                         dbus_g_error_get_name (error),
+                g_debug ("GdmGreeterPanel: unable to restart system: %s",
                          error->message);
                 g_error_free (error);
         }
@@ -778,10 +786,10 @@ do_system_stop (void)
 {
         gboolean         res;
         GError          *error;
-        DBusGConnection *connection;
+        GDBusConnection *connection;
 
         error = NULL;
-        connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
+        connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
         if (connection == NULL) {
                 g_warning ("Unable to get system bus connection: %s", error->message);
                 g_error_free (error);
@@ -790,8 +798,7 @@ do_system_stop (void)
 
         res = try_system_stop (connection, &error);
         if (!res) {
-                g_debug ("GdmGreeterPanel: unable to stop system: %s: %s",
-                         dbus_g_error_get_name (error),
+                g_debug ("GdmGreeterPanel: unable to stop system: %s",
                          error->message);
                 g_error_free (error);
         }
diff --git a/gui/simple-greeter/gdm-greeter-session.c b/gui/simple-greeter/gdm-greeter-session.c
index d0ce274..ac332c5 100644
--- a/gui/simple-greeter/gdm-greeter-session.c
+++ b/gui/simple-greeter/gdm-greeter-session.c
@@ -25,15 +25,13 @@
 #include <unistd.h>
 #include <string.h>
 
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-lowlevel.h>
-
 #include <glib.h>
 #include <glib/gi18n.h>
 #include <glib-object.h>
 
+#include "gdm-client.h"
+
 #include "gdm-greeter-session.h"
-#include "gdm-greeter-client.h"
 #include "gdm-greeter-panel.h"
 #include "gdm-greeter-login-window.h"
 #include "gdm-user-chooser-widget.h"
@@ -46,7 +44,11 @@
 
 struct GdmGreeterSessionPrivate
 {
-        GdmGreeterClient      *client;
+        GdmClient             *client;
+        GdmUserVerifier       *user_verifier;
+        GdmRemoteGreeter      *remote_greeter;
+        GdmGreeter            *greeter;
+
 
         GtkWidget             *login_window;
         GtkWidget             *panel;
@@ -67,7 +69,7 @@ G_DEFINE_TYPE (GdmGreeterSession, gdm_greeter_session, G_TYPE_OBJECT)
 static gpointer session_object = NULL;
 
 static void
-on_info (GdmGreeterClient  *client,
+on_info (GdmClient         *client,
          const char        *service_name,
          const char        *text,
          GdmGreeterSession *session)
@@ -78,7 +80,7 @@ on_info (GdmGreeterClient  *client,
 }
 
 static void
-on_problem (GdmGreeterClient  *client,
+on_problem (GdmClient         *client,
             const char        *service_name,
             const char        *text,
             GdmGreeterSession *session)
@@ -89,7 +91,7 @@ on_problem (GdmGreeterClient  *client,
 }
 
 static void
-on_service_unavailable (GdmGreeterClient  *client,
+on_service_unavailable (GdmClient         *client,
                         const char        *service_name,
                         GdmGreeterSession *session)
 {
@@ -99,9 +101,9 @@ on_service_unavailable (GdmGreeterClient  *client,
 }
 
 static void
-on_ready (GdmGreeterClient  *client,
-          const char        *service_name,
-          GdmGreeterSession *session)
+on_conversation_started (GdmClient         *client,
+                         const char        *service_name,
+                         GdmGreeterSession *session)
 {
         g_debug ("GdmGreeterSession: Ready");
 
@@ -110,7 +112,7 @@ on_ready (GdmGreeterClient  *client,
 }
 
 static void
-on_conversation_stopped (GdmGreeterClient  *client,
+on_conversation_stopped (GdmClient         *client,
                          const char        *service_name,
                          GdmGreeterSession *session)
 {
@@ -121,7 +123,7 @@ on_conversation_stopped (GdmGreeterClient  *client,
 }
 
 static void
-on_reset (GdmGreeterClient  *client,
+on_reset (GdmClient         *client,
           GdmGreeterSession *session)
 {
         g_debug ("GdmGreeterSession: Reset");
@@ -143,7 +145,7 @@ show_or_hide_user_options (GdmGreeterSession *session,
 }
 
 static void
-on_selected_user_changed (GdmGreeterClient  *client,
+on_selected_user_changed (GdmClient         *client,
                           const char        *text,
                           GdmGreeterSession *session)
 {
@@ -152,7 +154,7 @@ on_selected_user_changed (GdmGreeterClient  *client,
 }
 
 static void
-on_default_language_name_changed (GdmGreeterClient  *client,
+on_default_language_name_changed (GdmClient         *client,
                                   const char        *text,
                                   GdmGreeterSession *session)
 {
@@ -160,7 +162,7 @@ on_default_language_name_changed (GdmGreeterClient  *client,
 }
 
 static void
-on_default_session_name_changed (GdmGreeterClient  *client,
+on_default_session_name_changed (GdmClient         *client,
                                  const char        *text,
                                  GdmGreeterSession *session)
 {
@@ -169,7 +171,7 @@ on_default_session_name_changed (GdmGreeterClient  *client,
 }
 
 static void
-on_timed_login_requested (GdmGreeterClient  *client,
+on_timed_login_requested (GdmClient         *client,
                           const char        *text,
                           int                delay,
                           GdmGreeterSession *session)
@@ -179,7 +181,7 @@ on_timed_login_requested (GdmGreeterClient  *client,
 }
 
 static void
-on_session_opened (GdmGreeterClient  *client,
+on_session_opened (GdmClient         *client,
                    const char        *service_name,
                    GdmGreeterSession *session)
 {
@@ -188,7 +190,7 @@ on_session_opened (GdmGreeterClient  *client,
 }
 
 static void
-on_info_query (GdmGreeterClient  *client,
+on_info_query (GdmClient         *client,
                const char        *service_name,
                const char        *text,
                GdmGreeterSession *session)
@@ -199,7 +201,7 @@ on_info_query (GdmGreeterClient  *client,
 }
 
 static void
-on_secret_info_query (GdmGreeterClient  *client,
+on_secret_info_query (GdmClient         *client,
                       const char        *service_name,
                       const char        *text,
                       GdmGreeterSession *session)
@@ -210,20 +212,103 @@ on_secret_info_query (GdmGreeterClient  *client,
 }
 
 static void
-on_start_conversation (GdmGreeterLoginWindow *login_window,
-                       const char            *service_name,
-                       GdmGreeterSession     *session)
-{
-        gdm_greeter_client_call_start_conversation (session->priv->client,
-                                                    service_name);
-}
-static void
 on_begin_auto_login (GdmGreeterLoginWindow *login_window,
                      const char            *username,
                      GdmGreeterSession     *session)
 {
-        gdm_greeter_client_call_begin_auto_login (session->priv->client,
-                                                  username);
+        gdm_greeter_call_begin_auto_login_sync (session->priv->greeter,
+                                                username,
+                                                NULL,
+                                                NULL);
+}
+
+static void
+get_user_verifier (GdmGreeterSession     *session,
+                   const char            *username)
+{
+        GError *error = NULL;
+
+        g_clear_object (&session->priv->user_verifier);
+
+        if (username != NULL) {
+                session->priv->user_verifier = gdm_client_open_reauthentication_channel_sync (session->priv->client,
+                                                                                              username,
+                                                                                              NULL,
+                                                                                              &error);
+
+                if (error != NULL) {
+                        g_debug ("GdmGreeterSession: could not get reauthentication channel for user %s: %s", username, error->message);
+                        g_clear_error (&error);
+                }
+        }
+
+        if (session->priv->user_verifier == NULL) {
+                session->priv->user_verifier = gdm_client_get_user_verifier_sync (session->priv->client,
+                                                                                  NULL,
+                                                                                  &error);
+
+                if (error != NULL) {
+                        g_debug ("GdmGreeterSession: could not get user verifier %s", error->message);
+                        g_clear_error (&error);
+                }
+
+                if (session->priv->user_verifier == NULL) {
+
+                        return;
+                }
+        }
+        g_signal_connect (session->priv->user_verifier,
+                          "info-query",
+                          G_CALLBACK (on_info_query),
+                          session);
+        g_signal_connect (session->priv->user_verifier,
+                          "secret-info-query",
+                          G_CALLBACK (on_secret_info_query),
+                          session);
+        g_signal_connect (session->priv->user_verifier,
+                          "info",
+                          G_CALLBACK (on_info),
+                          session);
+        g_signal_connect (session->priv->user_verifier,
+                          "problem",
+                          G_CALLBACK (on_problem),
+                          session);
+        g_signal_connect (session->priv->user_verifier,
+                          "service-unavailable",
+                          G_CALLBACK (on_service_unavailable),
+                          session);
+        g_signal_connect (session->priv->user_verifier,
+                          "conversation-started",
+                          G_CALLBACK (on_conversation_started),
+                          session);
+        g_signal_connect (session->priv->user_verifier,
+                          "conversation-stopped",
+                          G_CALLBACK (on_conversation_stopped),
+                          session);
+        g_signal_connect (session->priv->user_verifier,
+                          "reset",
+                          G_CALLBACK (on_reset),
+                          session);
+        g_signal_connect (session->priv->greeter,
+                          "selected-user-changed",
+                          G_CALLBACK (on_selected_user_changed),
+                          session);
+        g_signal_connect (session->priv->greeter,
+                          "default-language-name-changed",
+                          G_CALLBACK (on_default_language_name_changed),
+                          session);
+        g_signal_connect (session->priv->greeter,
+                          "default-session-name-changed",
+                          G_CALLBACK (on_default_session_name_changed),
+                          session);
+        g_signal_connect (session->priv->greeter,
+                          "timed-login-requested",
+                          G_CALLBACK (on_timed_login_requested),
+                          session);
+        g_signal_connect (session->priv->greeter,
+                          "session-opened",
+                          G_CALLBACK (on_session_opened),
+                          session);
 }
 
 static void
@@ -231,8 +316,11 @@ on_begin_verification (GdmGreeterLoginWindow *login_window,
                        const char            *service_name,
                        GdmGreeterSession     *session)
 {
-        gdm_greeter_client_call_begin_verification (session->priv->client,
-                                                    service_name);
+        get_user_verifier (session, NULL);
+        gdm_user_verifier_call_begin_verification_sync (session->priv->user_verifier,
+                                                        service_name,
+                                                        NULL,
+                                                        NULL);
 }
 
 static void
@@ -241,9 +329,12 @@ on_begin_verification_for_user (GdmGreeterLoginWindow *login_window,
                                 const char            *username,
                                 GdmGreeterSession     *session)
 {
-        gdm_greeter_client_call_begin_verification_for_user (session->priv->client,
-                                                             service_name,
-                                                             username);
+        get_user_verifier (session, NULL);
+        gdm_user_verifier_call_begin_verification_for_user_sync (session->priv->user_verifier,
+                                                                 service_name,
+                                                                 username,
+                                                                 NULL,
+                                                                 NULL);
 }
 
 static void
@@ -252,9 +343,11 @@ on_query_answer (GdmGreeterLoginWindow *login_window,
                  const char            *text,
                  GdmGreeterSession     *session)
 {
-        gdm_greeter_client_call_answer_query (session->priv->client,
-                                              service_name,
-                                              text);
+        gdm_user_verifier_call_answer_query_sync (session->priv->user_verifier,
+                                                  service_name,
+                                                  text,
+                                                  NULL,
+                                                  NULL);
 }
 
 static void
@@ -262,8 +355,10 @@ on_select_session (GdmGreeterLoginWindow *login_window,
                    const char            *text,
                    GdmGreeterSession     *session)
 {
-        gdm_greeter_client_call_select_session (session->priv->client,
-                                                text);
+        gdm_greeter_call_select_session_sync (session->priv->greeter,
+                                              text,
+                                              NULL,
+                                              NULL);
 }
 
 static void
@@ -272,21 +367,25 @@ on_select_user (GdmGreeterLoginWindow *login_window,
                 GdmGreeterSession     *session)
 {
         show_or_hide_user_options (session, text);
-        gdm_greeter_client_call_select_user (session->priv->client,
-                                             text);
+        gdm_greeter_call_select_user_sync (session->priv->greeter,
+                                           text,
+                                           NULL,
+                                           NULL);
 }
 
 static void
 on_cancelled (GdmGreeterLoginWindow *login_window,
               GdmGreeterSession     *session)
 {
-        gdm_greeter_client_call_cancel (session->priv->client);
+        gdm_user_verifier_call_cancel_sync (session->priv->user_verifier, NULL, NULL);
 }
 
 static void
 on_disconnected (GdmGreeterSession     *session)
 {
-        gdm_greeter_client_call_disconnect (session->priv->client);
+        if (session->priv->remote_greeter != NULL) {
+                gdm_remote_greeter_call_disconnect_sync (session->priv->remote_greeter, NULL, NULL);
+        }
 }
 
 static void
@@ -294,7 +393,7 @@ on_start_session (GdmGreeterLoginWindow *login_window,
                   const char            *service_name,
                   GdmGreeterSession     *session)
 {
-        gdm_greeter_client_call_start_session_when_ready (session->priv->client, service_name, TRUE);
+        gdm_greeter_call_start_session_when_ready_sync (session->priv->greeter, service_name, TRUE, NULL, NULL);
 }
 
 static int
@@ -350,7 +449,7 @@ toggle_panel (GdmGreeterSession *session,
 
                 monitor = get_tallest_monitor_at_point (screen, x, y);
 
-                is_local = gdm_greeter_client_get_display_is_local (session->priv->client);
+                is_local = session->priv->remote_greeter != NULL;
                 session->priv->panel = gdm_greeter_panel_new (screen, monitor, is_local);
 
                 g_signal_connect_swapped (session->priv->panel,
@@ -376,14 +475,10 @@ toggle_login_window (GdmGreeterSession *session,
         if (enabled) {
                 gboolean is_local;
 
-                is_local = gdm_greeter_client_get_display_is_local (session->priv->client);
+                is_local = session->priv->remote_greeter != NULL;
                 g_debug ("GdmGreeterSession: Starting a login window local:%d", is_local);
                 session->priv->login_window = gdm_greeter_login_window_new (is_local);
                 g_signal_connect (session->priv->login_window,
-                                  "start-conversation",
-                                  G_CALLBACK (on_start_conversation),
-                                  session);
-                g_signal_connect (session->priv->login_window,
                                   "begin-auto-login",
                                   G_CALLBACK (on_begin_auto_login),
                                   session);
@@ -427,20 +522,30 @@ gboolean
 gdm_greeter_session_start (GdmGreeterSession *session,
                            GError           **error)
 {
-        gboolean res;
-
         g_return_val_if_fail (GDM_IS_GREETER_SESSION (session), FALSE);
 
         gdm_profile_start (NULL);
 
-        res = gdm_greeter_client_start (session->priv->client, error);
+
+        session->priv->greeter = gdm_client_get_greeter_sync (session->priv->client,
+                                                              NULL,
+                                                              error);
+
+        if (session->priv->greeter == NULL) {
+                return FALSE;
+        }
+
+        session->priv->remote_greeter = gdm_client_get_remote_greeter_sync (session->priv->client,
+                                                                            NULL,
+                                                                            error);
+
 
         toggle_panel (session, TRUE);
         toggle_login_window (session, TRUE);
 
         gdm_profile_end (NULL);
 
-        return res;
+        return TRUE;
 }
 
 void
@@ -553,60 +658,7 @@ gdm_greeter_session_init (GdmGreeterSession *session)
 
         session->priv = GDM_GREETER_SESSION_GET_PRIVATE (session);
 
-        session->priv->client = gdm_greeter_client_new ();
-        g_signal_connect (session->priv->client,
-                          "info-query",
-                          G_CALLBACK (on_info_query),
-                          session);
-        g_signal_connect (session->priv->client,
-                          "secret-info-query",
-                          G_CALLBACK (on_secret_info_query),
-                          session);
-        g_signal_connect (session->priv->client,
-                          "info",
-                          G_CALLBACK (on_info),
-                          session);
-        g_signal_connect (session->priv->client,
-                          "problem",
-                          G_CALLBACK (on_problem),
-                          session);
-        g_signal_connect (session->priv->client,
-                          "service-unavailable",
-                          G_CALLBACK (on_service_unavailable),
-                          session);
-        g_signal_connect (session->priv->client,
-                          "ready",
-                          G_CALLBACK (on_ready),
-                          session);
-        g_signal_connect (session->priv->client,
-                          "conversation-stopped",
-                          G_CALLBACK (on_conversation_stopped),
-                          session);
-        g_signal_connect (session->priv->client,
-                          "reset",
-                          G_CALLBACK (on_reset),
-                          session);
-        g_signal_connect (session->priv->client,
-                          "selected-user-changed",
-                          G_CALLBACK (on_selected_user_changed),
-                          session);
-        g_signal_connect (session->priv->client,
-                          "default-language-name-changed",
-                          G_CALLBACK (on_default_language_name_changed),
-                          session);
-        g_signal_connect (session->priv->client,
-                          "default-session-name-changed",
-                          G_CALLBACK (on_default_session_name_changed),
-                          session);
-        g_signal_connect (session->priv->client,
-                          "timed-login-requested",
-                          G_CALLBACK (on_timed_login_requested),
-                          session);
-        g_signal_connect (session->priv->client,
-                          "session-opened",
-                          G_CALLBACK (on_session_opened),
-                          session);
-
+        session->priv->client = gdm_client_new ();
         /* We want to listen for panel mnemonics even if the
          * login window is focused, so we intercept them here.
          */
diff --git a/gui/simple-greeter/greeter-main.c b/gui/simple-greeter/greeter-main.c
index ef54a7b..85d9603 100644
--- a/gui/simple-greeter/greeter-main.c
+++ b/gui/simple-greeter/greeter-main.c
@@ -30,8 +30,6 @@
 #include <gdk/gdkx.h>
 #include <gtk/gtk.h>
 
-#include <dbus/dbus-glib.h>
-
 #include "gdm-log.h"
 #include "gdm-common.h"
 #include "gdm-signal-handler.h"
@@ -41,16 +39,19 @@
 
 #include "gdm-greeter-session.h"
 
+#include "gsm-client-glue.h"
+#include "gsm-manager-glue.h"
+
 #define SM_DBUS_NAME      "org.gnome.SessionManager"
 #define SM_DBUS_PATH      "/org/gnome/SessionManager"
 #define SM_DBUS_INTERFACE "org.gnome.SessionManager"
 
 #define SM_CLIENT_DBUS_INTERFACE "org.gnome.SessionManager.ClientPrivate"
 
-static DBusGConnection *bus_connection = NULL;
-static DBusGProxy      *sm_proxy = NULL;
-static char            *client_id = NULL;
-static DBusGProxy      *client_proxy = NULL;
+static GDBusConnection  *bus_connection = NULL;
+static GsmManager       *sm_proxy = NULL;
+static char             *client_id = NULL;
+static GsmClientPrivate *client_proxy = NULL;
 
 static gboolean
 is_debug_set (void)
@@ -127,12 +128,12 @@ signal_cb (int      signo,
 static gboolean
 session_manager_connect (void)
 {
+        GError *error;
 
-        if (bus_connection == NULL) {
-                GError *error;
+        error = NULL;
 
-                error = NULL;
-                bus_connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
+        if (bus_connection == NULL) {
+                bus_connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error);
                 if (bus_connection == NULL) {
                         g_message ("Failed to connect to the session bus: %s",
                                    error->message);
@@ -141,15 +142,25 @@ session_manager_connect (void)
                 }
         }
 
-        sm_proxy = dbus_g_proxy_new_for_name (bus_connection,
-                                              SM_DBUS_NAME,
-                                              SM_DBUS_PATH,
-                                              SM_DBUS_INTERFACE);
+        sm_proxy = gsm_manager_proxy_new_sync (bus_connection,
+                                               G_DBUS_PROXY_FLAGS_NONE,
+                                               SM_DBUS_NAME,
+                                               SM_DBUS_PATH,
+                                               NULL,
+                                               &error);
+
+        if (sm_proxy == NULL) {
+                g_message ("Failed to connect to the session manager: %s",
+                           error->message);
+                g_error_free (error);
+        }
+
         return (sm_proxy != NULL);
 }
 
 static void
-stop_cb (gpointer data)
+stop_cb (GsmClientPrivate *client_private,
+         gpointer          data)
 {
         gtk_main_quit ();
 }
@@ -160,12 +171,11 @@ end_session_response (gboolean is_okay, const gchar *reason)
         gboolean ret;
         GError *error = NULL;
 
-        ret = dbus_g_proxy_call (client_proxy, "EndSessionResponse",
-                                 &error,
-                                 G_TYPE_BOOLEAN, is_okay,
-                                 G_TYPE_STRING, reason,
-                                 G_TYPE_INVALID,
-                                 G_TYPE_INVALID);
+        if (reason == NULL) {
+                reason = "";
+        }
+
+        ret = gsm_client_private_call_end_session_response_sync (client_proxy, is_okay, reason, NULL, &error);
 
         if (!ret) {
                 g_warning ("Failed to send session response %s", error->message);
@@ -176,7 +186,9 @@ end_session_response (gboolean is_okay, const gchar *reason)
 }
 
 static void
-query_end_session_cb (guint flags, gpointer data)
+query_end_session_cb (GsmClientPrivate *client_private,
+                      guint             flags,
+                      gpointer          data)
 {
         end_session_response (TRUE, NULL);
 }
@@ -200,14 +212,7 @@ register_client (void)
         app_id = "gdm-simple-greeter.desktop";
 
         error = NULL;
-        res = dbus_g_proxy_call (sm_proxy,
-                                 "RegisterClient",
-                                 &error,
-                                 G_TYPE_STRING, app_id,
-                                 G_TYPE_STRING, startup_id,
-                                 G_TYPE_INVALID,
-                                 DBUS_TYPE_G_OBJECT_PATH, &client_id,
-                                 G_TYPE_INVALID);
+        res = gsm_manager_call_register_client_sync (sm_proxy, app_id, startup_id, &client_id, NULL, &error);
         if (! res) {
                 g_warning ("Failed to register client: %s", error->message);
                 g_error_free (error);
@@ -215,22 +220,34 @@ register_client (void)
         }
 
         g_debug ("Client registered with session manager: %s", client_id);
-        client_proxy = dbus_g_proxy_new_for_name (bus_connection,
-                                                  SM_DBUS_NAME,
-                                                  client_id,
-                                                  SM_CLIENT_DBUS_INTERFACE);
+        client_proxy = gsm_client_private_proxy_new_sync (bus_connection,
+                                                          G_DBUS_PROXY_FLAGS_NONE,
+                                                          SM_DBUS_NAME,
+                                                          client_id,
+                                                          NULL,
+                                                          &error);
+
+        if (client_proxy == NULL) {
+                g_warning ("Failed to track client: %s", error->message);
+                g_error_free (error);
 
-        dbus_g_proxy_add_signal (client_proxy, "Stop", G_TYPE_INVALID);
-        dbus_g_proxy_connect_signal (client_proxy, "Stop",
-                                     G_CALLBACK (stop_cb), NULL, NULL);
+                return FALSE;
+        }
 
-        dbus_g_proxy_add_signal (client_proxy, "QueryEndSession", G_TYPE_UINT, G_TYPE_INVALID);
-        dbus_g_proxy_connect_signal (client_proxy, "QueryEndSession",
-                                     G_CALLBACK (query_end_session_cb), NULL, NULL);
+        g_signal_connect (client_proxy,
+                          "stop",
+                          G_CALLBACK (stop_cb),
+                          NULL);
 
-        dbus_g_proxy_add_signal (client_proxy, "EndSession", G_TYPE_UINT, G_TYPE_INVALID);
-        dbus_g_proxy_connect_signal (client_proxy, "EndSession",
-                                     G_CALLBACK (end_session_cb), NULL, NULL);
+        g_signal_connect (client_proxy,
+                          "query-end-session",
+                          G_CALLBACK (query_end_session_cb),
+                          NULL);
+
+        g_signal_connect (client_proxy,
+                          "end-session",
+                          G_CALLBACK (end_session_cb),
+                          NULL);
 
         g_unsetenv ("DESKTOP_AUTOSTART_ID");
 
@@ -292,8 +309,10 @@ main (int argc, char *argv[])
         error = NULL;
         res = gdm_greeter_session_start (session, &error);
         if (! res) {
-                g_warning ("Unable to start greeter session: %s", error->message);
-                g_error_free (error);
+                if (error != NULL) {
+                        g_warning ("Unable to start greeter session: %s", error->message);
+                        g_error_free (error);
+                }
                 exit (1);
         }
 
diff --git a/gui/simple-greeter/org.gnome.SessionManager.ClientPrivate.xml b/gui/simple-greeter/org.gnome.SessionManager.ClientPrivate.xml
new file mode 100644
index 0000000..a167065
--- /dev/null
+++ b/gui/simple-greeter/org.gnome.SessionManager.ClientPrivate.xml
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd";>
+<node xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd";>
+  <interface name="org.gnome.SessionManager.ClientPrivate">
+    <method name="EndSessionResponse">
+      <arg name="is_ok" type="b" direction="in">
+        <doc:doc>
+          <doc:summary>Whether or not it is OK to preceed</doc:summary>
+        </doc:doc>
+      </arg>
+      <arg name="reason" type="s" direction="in">
+        <doc:doc>
+          <doc:summary>The reason string</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:description>
+          <doc:para>This method should be used by the client in response to
+            the <doc:ref type="signal" to="org.gnome.SessionManager.ClientPrivate::QueryEndSession">QueryEndSession</doc:ref>
+            and <doc:ref type="signal" to="org.gnome.SessionManager.ClientPrivate::EndSession">EndSession</doc:ref> signals.
+          </doc:para>
+        </doc:description>
+      </doc:doc>
+    </method>
+
+    <signal name="Stop">
+      <doc:doc>
+        <doc:summary>Stop client</doc:summary>
+        <doc:description>
+          <doc:para>
+            The client should stop and remove itself from the session in
+            response to this signal.
+          </doc:para>
+        </doc:description>
+      </doc:doc>
+    </signal>
+
+    <signal name="QueryEndSession">
+      <arg name="flags" type="u">
+        <doc:doc>
+          <doc:summary>Flags</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:description>
+          <doc:para>This signal is used to inform the client that the
+            session is about to end.  The client must respond by
+            calling
+            <doc:ref type="method" to="org.gnome.SessionManager.ClientPrivate.EndSessionResponse">EndSessionResponse</doc:ref>
+            within one second of the signal emission.
+          </doc:para>
+          <doc:para>
+            The flags may include:
+            <doc:list>
+              <doc:item>
+                <doc:term>1</doc:term>
+                <doc:definition>Logout is forced.
+                  <doc:ref type="method" to="org.gnome.SessionManager.ClientPrivate.EndSessionResponse">EndSessionResponse</doc:ref>
+                reason and any inhibit from client will be
+                ignored.</doc:definition>
+              </doc:item>
+            </doc:list>
+          </doc:para>
+          <doc:para>
+            If the client responds with an EndSessionResponse is-ok
+            argument equal to FALSE and a reason then this reason may
+            be displayed to the user.
+          </doc:para>
+          <doc:para>
+            The client must not attempt to perform any actions or
+            interact with the user in response to this signal.  Any
+            actions required for a clean shutdown should take place in
+            response to the
+            <doc:ref type="signal" to="org.gnome.SessionManager.ClientPrivate::EndSession">EndSession</doc:ref> signal.
+          </doc:para>
+          <doc:para>
+            The client should limit operations until either a
+            <doc:ref type="signal" to="org.gnome.SessionManager.ClientPrivate::EndSession">EndSession</doc:ref>
+            <doc:ref type="signal" to="org.gnome.SessionManager.ClientPrivate::CancelEndSession">CancelEndSession</doc:ref>
+            signal is received.
+          </doc:para>
+        </doc:description>
+      </doc:doc>
+    </signal>
+
+    <signal name="EndSession">
+      <arg name="flags" type="u">
+        <doc:doc>
+          <doc:summary>Flags</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:description>
+          <doc:para>This signal is used to inform the client that the
+            session is about to end.  The client must respond by
+            calling
+            <doc:ref type="method" to="org.gnome.SessionManager.ClientPrivate.EndSessionResponse">EndSessionResponse</doc:ref>
+            within ten seconds of the signal emission.
+          </doc:para>
+          <doc:para>
+            The client must not attempt to interact with the user in
+            response to this signal.  The application will be given a
+            maxium of ten seconds to perform any actions required for
+            a clean shutdown.
+          </doc:para>
+        </doc:description>
+      </doc:doc>
+    </signal>
+
+    <signal name="CancelEndSession">
+      <doc:doc>
+        <doc:description>
+          <doc:para>
+            This signal indicates to the client that a previous emission of
+            <doc:ref type="signal" to="org.gnome.SessionManager.ClientPrivate::QueryEndSession">QueryEndSession</doc:ref>
+            has been cancelled.  The client should resume normal operations.
+          </doc:para>
+        </doc:description>
+      </doc:doc>
+    </signal>
+
+  </interface>
+</node>
diff --git a/gui/simple-greeter/org.gnome.SessionManager.xml b/gui/simple-greeter/org.gnome.SessionManager.xml
new file mode 100644
index 0000000..eaf1ef5
--- /dev/null
+++ b/gui/simple-greeter/org.gnome.SessionManager.xml
@@ -0,0 +1,392 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd";>
+<node xmlns:doc="http://www.freedesktop.org/dbus/1.0/doc.dtd";>
+  <interface name="org.gnome.SessionManager">
+
+    <!-- Initialization phase interfaces -->
+
+    <method name="Setenv">
+      <arg name="variable" type="s" direction="in">
+        <doc:doc>
+          <doc:summary>The variable name</doc:summary>
+        </doc:doc>
+      </arg>
+      <arg name="value" type="s" direction="in">
+        <doc:doc>
+          <doc:summary>The value</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:description>
+          <doc:para>Adds the variable name to the application launch environment with the specified value.  May only be used during the Session Manager initialization phase.</doc:para>
+        </doc:description>
+      </doc:doc>
+    </method>
+
+    <method name="InitializationError">
+      <arg name="message" type="s" direction="in">
+        <doc:doc>
+          <doc:summary>The error message</doc:summary>
+        </doc:doc>
+      </arg>
+      <arg name="fatal" type="b" direction="in">
+        <doc:doc>
+          <doc:summary>Whether the error should be treated as fatal</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:description>
+          <doc:para>May be used by applications launched during the Session Manager initialization phase to indicate there was a problem.</doc:para>
+        </doc:description>
+      </doc:doc>
+    </method>
+
+    <!-- Running phase interfaces -->
+
+    <method name="RegisterClient">
+      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+      <arg type="s" name="app_id" direction="in">
+        <doc:doc>
+          <doc:summary>The application identifier</doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="s" name="client_startup_id" direction="in">
+        <doc:doc>
+          <doc:summary>Client startup identifier</doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="o" name="client_id" direction="out">
+        <doc:doc>
+          <doc:summary>The object path of the newly registered client</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:description>
+          <doc:para>Register the caller as a Session Management client.</doc:para>
+        </doc:description>
+      </doc:doc>
+    </method>
+
+    <method name="UnregisterClient">
+      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+      <arg type="o" name="client_id" direction="in">
+        <doc:doc>
+          <doc:summary>The object path of the client</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:description>
+          <doc:para>Unregister the specified client from Session Management.</doc:para>
+        </doc:description>
+      </doc:doc>
+    </method>
+
+    <method name="Inhibit">
+      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+      <arg type="s" name="app_id" direction="in">
+        <doc:doc>
+          <doc:summary>The application identifier</doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="u" name="toplevel_xid" direction="in">
+        <doc:doc>
+          <doc:summary>The toplevel X window identifier</doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="s" name="reason" direction="in">
+        <doc:doc>
+          <doc:summary>The reason for the inhibit</doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="u" name="flags" direction="in">
+        <doc:doc>
+          <doc:summary>Flags that spefify what should be inhibited</doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="u" name="inhibit_cookie" direction="out">
+        <doc:doc>
+          <doc:summary>The cookie</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:summary>
+          Proactively indicates that the calling application is performing an action that should not be interrupted and sets a reason to be displayed to the user when an interruption is about to take placea.
+        </doc:summary>
+        <doc:description>
+          <doc:para>Applications should invoke this method when they begin an operation that
+            should not be interrupted, such as creating a CD or DVD.  The types of actions
+            that may be blocked are specified by the flags parameter.  When the application
+            completes the operation it should call <doc:ref type="method" to="org.gnome.SessionManager.Uninhibit">Uninhibit()</doc:ref>
+            or disconnect from the session bus.
+          </doc:para>
+          <doc:para>
+            Applications should not expect that they will always be able to block the
+            action.  In most cases, users will be given the option to force the action
+            to take place.
+          </doc:para>
+          <doc:para>
+            Reasons should be short and to the point.
+          </doc:para>
+          <doc:para>
+            The flags parameter must include at least one of the following:
+            <doc:list>
+              <doc:item>
+                <doc:term>1</doc:term>
+                <doc:definition>Inhibit logging out</doc:definition>
+              </doc:item>
+              <doc:item>
+                <doc:term>2</doc:term>
+                <doc:definition>Inhibit user switching</doc:definition>
+              </doc:item>
+              <doc:item>
+                <doc:term>4</doc:term>
+                <doc:definition>Inhibit suspending the session or computer</doc:definition>
+              </doc:item>
+              <doc:item>
+                <doc:term>8</doc:term>
+                <doc:definition>Inhibit the session being marked as idle</doc:definition>
+              </doc:item>
+            </doc:list>
+            Values for flags may be bitwise or'ed together.
+          </doc:para>
+          <doc:para>
+            The returned cookie is used to uniquely identify this request.  It should be used
+            as an argument to <doc:ref type="method" to="org.gnome.SessionManager.Uninhibit">Uninhibit()</doc:ref> in
+            order to remove the request.
+          </doc:para>
+        </doc:description>
+      </doc:doc>
+    </method>
+
+    <method name="Uninhibit">
+      <annotation name="org.freedesktop.DBus.GLib.Async" value=""/>
+      <arg type="u" name="inhibit_cookie" direction="in">
+        <doc:doc>
+          <doc:summary>The cookie</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:description>
+          <doc:para>Cancel a previous call to <doc:ref type="method" to="org.gnome.SessionManager.Inhibit">Inhibit()</doc:ref> identified by the cookie.</doc:para>
+        </doc:description>
+      </doc:doc>
+    </method>
+
+    <method name="IsInhibited">
+      <arg type="u" name="flags" direction="in">
+        <doc:doc>
+          <doc:summary>Flags that spefify what should be inhibited</doc:summary>
+        </doc:doc>
+      </arg>
+      <arg type="b" name="is_inhibited" direction="out">
+        <doc:doc>
+          <doc:summary>Returns TRUE if any of the operations in the bitfield flags are inhibited</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:description>
+          <doc:para>Determine if operation(s) specified by the flags
+            are currently inhibited.  Flags are same as those accepted
+            by the
+            <doc:ref type="method" to="org.gnome.SessionManager.Inhibit">Inhibit()</doc:ref>
+            method.</doc:para>
+        </doc:description>
+      </doc:doc>
+    </method>
+
+    <method name="GetClients">
+      <arg name="clients" direction="out" type="ao">
+        <doc:doc>
+          <doc:summary>an array of client IDs</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:description>
+          <doc:para>This gets a list of all the <doc:ref type="interface" to="org.gnome.SessionManager.Client">Clients</doc:ref>
+          that are currently known to the session manager.</doc:para>
+          <doc:para>Each Client ID is an D-Bus object path for the object that implements the
+          <doc:ref type="interface" to="org.gnome.SessionManager.Client">Client</doc:ref> interface.</doc:para>
+        </doc:description>
+        <doc:seealso><doc:ref type="interface" to="org.gnome.SessionManager.Client">org.gnome.SessionManager.Client</doc:ref></doc:seealso>
+      </doc:doc>
+    </method>
+
+    <method name="GetInhibitors">
+      <arg name="inhibitors" direction="out" type="ao">
+        <doc:doc>
+          <doc:summary>an array of inhibitor IDs</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:description>
+          <doc:para>This gets a list of all the <doc:ref type="interface" to="org.gnome.SessionManager.Inhibitor">Inhibitors</doc:ref>
+          that are currently known to the session manager.</doc:para>
+          <doc:para>Each Inhibitor ID is an D-Bus object path for the object that implements the
+          <doc:ref type="interface" to="org.gnome.SessionManager.Inhibitor">Inhibitor</doc:ref> interface.</doc:para>
+        </doc:description>
+        <doc:seealso><doc:ref type="interface" to="org.gnome.SessionManager.Inhibitor">org.gnome.SessionManager.Inhibitor</doc:ref></doc:seealso>
+      </doc:doc>
+    </method>
+
+
+    <method name="IsAutostartConditionHandled">
+      <arg name="condition" direction="in" type="s">
+        <doc:doc>
+          <doc:summary>The autostart condition string</doc:summary>
+        </doc:doc>
+      </arg>
+      <arg name="handled" direction="out" type="b">
+        <doc:doc>
+          <doc:summary>True if condition is handled, false otherwise</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:description>
+          <doc:para>Allows the caller to determine whether the session manager is
+          handling changes to the specified autostart condition.</doc:para>
+        </doc:description>
+      </doc:doc>
+    </method>
+
+    <method name="Shutdown">
+      <doc:doc>
+        <doc:description>
+          <doc:para>Request a shutdown dialog</doc:para>
+        </doc:description>
+      </doc:doc>
+    </method>
+
+    <method name="CanShutdown">
+      <arg name="is_available" direction="out" type="b">
+        <doc:doc>
+          <doc:summary>True if shutdown is available to the user, false otherwise</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:description>
+          <doc:para>Allows the caller to determine whether or not it's okay to show
+          a shutdown option in the UI</doc:para>
+        </doc:description>
+      </doc:doc>
+    </method>
+
+    <method name="Logout">
+      <arg name="mode" type="u" direction="in">
+        <doc:doc>
+          <doc:summary>The type of logout that is being requested</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:description>
+          <doc:para>Request a logout dialog</doc:para>
+          <doc:para>
+            Allowed values for the mode parameter are:
+            <doc:list>
+              <doc:item>
+                <doc:term>0</doc:term>
+                <doc:definition>Normal.</doc:definition>
+              </doc:item>
+              <doc:item>
+                <doc:term>1</doc:term>
+                <doc:definition>No confirmation inferface should be shown.</doc:definition>
+              </doc:item>
+              <doc:item>
+                <doc:term>2</doc:term>
+                <doc:definition>Forcefully logout.  No confirmation will be shown and any inhibitors will be ignored.</doc:definition>
+              </doc:item>
+            </doc:list>
+            Values for flags may be bitwise or'ed together.
+          </doc:para>
+        </doc:description>
+      </doc:doc>
+    </method>
+
+    <method name="IsSessionRunning">
+      <arg name="running" direction="out" type="b">
+        <doc:doc>
+          <doc:summary>True if the session has entered the Running phase, false otherwise</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:description>
+          <doc:para>Allows the caller to determine whether the session manager
+          has entered the Running phase, in case the client missed the
+          SessionRunning signal.</doc:para>
+        </doc:description>
+      </doc:doc>
+    </method>
+
+    <!-- Signals -->
+
+    <signal name="ClientAdded">
+      <arg name="id" type="o">
+        <doc:doc>
+          <doc:summary>The object path for the added client</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:description>
+          <doc:para>Emitted when a client has been added to the session manager.
+          </doc:para>
+        </doc:description>
+      </doc:doc>
+    </signal>
+    <signal name="ClientRemoved">
+      <arg name="id" type="o">
+        <doc:doc>
+          <doc:summary>The object path for the removed client</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:description>
+          <doc:para>Emitted when a client has been removed from the session manager.
+          </doc:para>
+        </doc:description>
+      </doc:doc>
+    </signal>
+
+    <signal name="InhibitorAdded">
+      <arg name="id" type="o">
+        <doc:doc>
+          <doc:summary>The object path for the added inhibitor</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:description>
+          <doc:para>Emitted when an inhibitor has been added to the session manager.
+          </doc:para>
+        </doc:description>
+      </doc:doc>
+    </signal>
+    <signal name="InhibitorRemoved">
+      <arg name="id" type="o">
+        <doc:doc>
+          <doc:summary>The object path for the removed inhibitor</doc:summary>
+        </doc:doc>
+      </arg>
+      <doc:doc>
+        <doc:description>
+          <doc:para>Emitted when an inhibitor has been removed from the session manager.
+          </doc:para>
+        </doc:description>
+      </doc:doc>
+    </signal>
+
+    <signal name="SessionRunning">
+      <doc:doc>
+        <doc:description>
+          <doc:para>Indicates the session has entered the Running phase.</doc:para>
+        </doc:description>
+      </doc:doc>
+    </signal>
+
+    <signal name="SessionOver">
+      <doc:doc>
+        <doc:description>
+          <doc:para>Indicates the session is about to end.</doc:para>
+        </doc:description>
+      </doc:doc>
+    </signal>
+
+  </interface>
+</node>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]