[gdm/wip/slave-connection: 4/30] daemon: Don't put session objects on bus
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/wip/slave-connection: 4/30] daemon: Don't put session objects on bus
- Date: Mon, 9 Jul 2012 07:51:28 +0000 (UTC)
commit 13af41bd2a01f611a619237ca92c6662496ef892
Author: Ray Strode <rstrode redhat com>
Date: Fri Jul 6 22:58:26 2012 -0400
daemon: Don't put session objects on bus
The exported functions and objects don't do anything, they're just
dead code.
daemon/Makefile.am | 3 --
daemon/gdm-session-direct.c | 78 -----------------------------------------
daemon/gdm-session-direct.h | 8 ----
daemon/gdm-session-direct.xml | 12 ------
4 files changed, 0 insertions(+), 101 deletions(-)
---
diff --git a/daemon/Makefile.am b/daemon/Makefile.am
index a1c4c48..f7b9812 100644
--- a/daemon/Makefile.am
+++ b/daemon/Makefile.am
@@ -32,7 +32,6 @@ BUILT_SOURCES = \
gdm-slave-glue.h \
gdm-simple-slave-glue.h \
gdm-xdmcp-chooser-slave-glue.h \
- gdm-session-direct-glue.h \
gdm-manager-glue.h \
gdm-display-glue.h \
gdm-xdmcp-greeter-display-glue.h \
@@ -50,8 +49,6 @@ gdm-simple-slave-glue.h: gdm-simple-slave.xml Makefile.am
dbus-binding-tool --prefix=gdm_simple_slave --mode=glib-server --output=gdm-simple-slave-glue.h $(srcdir)/gdm-simple-slave.xml
gdm-xdmcp-chooser-slave-glue.h: gdm-xdmcp-chooser-slave.xml Makefile.am
dbus-binding-tool --prefix=gdm_xdmcp_chooser_slave --mode=glib-server --output=gdm-xdmcp-chooser-slave-glue.h $(srcdir)/gdm-xdmcp-chooser-slave.xml
-gdm-session-direct-glue.h: gdm-session-direct.xml Makefile.am
- dbus-binding-tool --prefix=gdm_session_direct --mode=glib-server --output=gdm-session-direct-glue.h $(srcdir)/gdm-session-direct.xml
gdm-display-glue.h: gdm-display.xml Makefile.am
dbus-binding-tool --prefix=gdm_display --mode=glib-server --output=gdm-display-glue.h $(srcdir)/gdm-display.xml
gdm-xdmcp-greeter-display-glue.h: gdm-xdmcp-greeter-display.xml Makefile.am
diff --git a/daemon/gdm-session-direct.c b/daemon/gdm-session-direct.c
index 9f750f2..e95c5e0 100644
--- a/daemon/gdm-session-direct.c
+++ b/daemon/gdm-session-direct.c
@@ -98,7 +98,6 @@ struct _GdmSessionDirectPrivate
GPid session_pid;
/* object lifetime scope */
- char *id;
char *display_id;
char *display_name;
char *display_hostname;
@@ -2954,8 +2953,6 @@ gdm_session_direct_finalize (GObject *object)
session = GDM_SESSION_DIRECT (object);
- g_free (session->priv->id);
-
g_free (session->priv->selected_user);
g_free (session->priv->selected_session);
g_free (session->priv->saved_session);
@@ -2970,26 +2967,6 @@ gdm_session_direct_finalize (GObject *object)
parent_class->finalize (object);
}
-static gboolean
-register_session (GdmSessionDirect *session)
-{
- GError *error;
-
- error = NULL;
- session->priv->connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
- if (session->priv->connection == NULL) {
- if (error != NULL) {
- g_critical ("error getting system bus: %s", error->message);
- g_error_free (error);
- }
- exit (1);
- }
-
- dbus_g_connection_register_g_object (session->priv->connection, session->priv->id, G_OBJECT (session));
-
- return TRUE;
-}
-
static GObject *
gdm_session_direct_constructor (GType type,
guint n_construct_properties,
@@ -3002,23 +2979,6 @@ gdm_session_direct_constructor (GType type,
session = GDM_SESSION_DIRECT (G_OBJECT_CLASS (gdm_session_direct_parent_class)->constructor (type,
n_construct_properties,
construct_properties));
- if (session->priv->display_id != NULL) {
- /* Always match the session id with the master */
- id = NULL;
- if (g_str_has_prefix (session->priv->display_id, "/org/gnome/DisplayManager/Display")) {
- id = session->priv->display_id + strlen ("/org/gnome/DisplayManager/Display");
- }
-
- g_assert (id != NULL);
-
- session->priv->id = g_strdup_printf ("/org/gnome/DisplayManager/Session%s", id);
- g_debug ("GdmSessionDirect: Registering %s", session->priv->id);
-
- res = register_session (session);
- if (! res) {
- g_warning ("Unable to register session with system bus");
- }
- }
return G_OBJECT (session);
}
@@ -3148,41 +3108,3 @@ gdm_session_direct_new (const char *display_id,
return session;
}
-
-gboolean
-gdm_session_direct_restart (GdmSessionDirect *session,
- GError **error)
-{
- gboolean ret;
-
- ret = TRUE;
- g_debug ("GdmSessionDirect: Request to restart session");
-
- return ret;
-}
-
-gboolean
-gdm_session_direct_stop (GdmSessionDirect *session,
- GError **error)
-{
- gboolean ret;
-
- ret = TRUE;
-
- g_debug ("GdmSessionDirect: Request to stop session");
-
- return ret;
-}
-
-gboolean
-gdm_session_direct_detach (GdmSessionDirect *session,
- GError **error)
-{
- gboolean ret;
-
- ret = TRUE;
-
- g_debug ("GdmSessionDirect: Request to detach session");
-
- return ret;
-}
diff --git a/daemon/gdm-session-direct.h b/daemon/gdm-session-direct.h
index e35fa35..254d668 100644
--- a/daemon/gdm-session-direct.h
+++ b/daemon/gdm-session-direct.h
@@ -61,14 +61,6 @@ char * gdm_session_direct_get_display_device (GdmSessionDirect
char * gdm_session_direct_get_display_seat_id (GdmSessionDirect *session_direct);
gboolean gdm_session_direct_bypasses_xsession (GdmSessionDirect *session_direct);
-/* Exported methods */
-gboolean gdm_session_direct_restart (GdmSessionDirect *session_direct,
- GError **error);
-gboolean gdm_session_direct_stop (GdmSessionDirect *session_direct,
- GError **error);
-gboolean gdm_session_direct_detach (GdmSessionDirect *session_direct,
- GError **error);
-
G_END_DECLS
#endif /* GDM_SESSION_DIRECT_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]