[gdm/wip/slave-connection: 8/37] 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: 8/37] daemon: Don't put session objects on bus
- Date: Fri, 13 Jul 2012 06:59:03 +0000 (UTC)
commit b47da594c586a6a184aa7d6de02ceddb86b582a8
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 | 83 -----------------------------------------
daemon/gdm-session-direct.h | 8 ----
daemon/gdm-session-direct.xml | 12 ------
4 files changed, 0 insertions(+), 106 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..579da94 100644
--- a/daemon/gdm-session-direct.c
+++ b/daemon/gdm-session-direct.c
@@ -53,7 +53,6 @@
#include "gdm-session-direct.h"
#include "gdm-session.h"
#include "gdm-session-private.h"
-#include "gdm-session-direct-glue.h"
#include "gdm-session-record.h"
#include "gdm-session-worker-job.h"
@@ -98,7 +97,6 @@ struct _GdmSessionDirectPrivate
GPid session_pid;
/* object lifetime scope */
- char *id;
char *display_id;
char *display_name;
char *display_hostname;
@@ -2954,8 +2952,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,55 +2966,16 @@ 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,
GObjectConstructParam *construct_properties)
{
GdmSessionDirect *session;
- gboolean res;
- const char *id;
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);
}
@@ -3121,8 +3078,6 @@ gdm_session_direct_class_init (GdmSessionDirectClass *session_class)
"display seat id",
NULL,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
-
- dbus_g_object_type_install_info (GDM_TYPE_SESSION_DIRECT, &dbus_glib_gdm_session_direct_object_info);
}
GdmSessionDirect *
@@ -3148,41 +3103,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]