Commit a4680f10 authored by William Jon McCann's avatar William Jon McCann Committed by William Jon McCann

Rename GdmGreeterProxy->GdmGreeterSession

2007-09-10  William Jon McCann  <mccann@jhu.edu>

	* daemon/INTERNALS:
	* daemon/Makefile.am:
	* daemon/gdm-factory-slave.c: (on_greeter_start),
	(on_greeter_stop), (run_greeter), (gdm_factory_slave_stop):
	* daemon/gdm-greeter-proxy.c:
	* daemon/gdm-greeter-proxy.h:
	* daemon/gdm-greeter-session.c: (change_user),
	(greeter_session_child_setup), (open_greeter_session),
	(close_greeter_session), (get_greeter_environment),
	(gdm_slave_whack_temp_auth_file), (create_temp_auth_file),
	(greeter_session_child_watch), (gdm_greeter_session_spawn),
	(gdm_greeter_session_start), (greeter_session_died),
	(gdm_greeter_session_stop),
	(gdm_greeter_session_set_server_address),
	(_gdm_greeter_session_set_x11_display_name),
	(_gdm_greeter_session_set_x11_display_hostname),
	(_gdm_greeter_session_set_x11_display_device),
	(_gdm_greeter_session_set_x11_display_is_local),
	(_gdm_greeter_session_set_x11_authority_file),
	(_gdm_greeter_session_set_user_name),
	(_gdm_greeter_session_set_group_name),
	(gdm_greeter_session_set_property),
	(gdm_greeter_session_get_property),
	(gdm_greeter_session_constructor),
	(gdm_greeter_session_class_init), (gdm_greeter_session_init),
	(gdm_greeter_session_finalize), (gdm_greeter_session_new):
	* daemon/gdm-greeter-session.h:
	* daemon/gdm-simple-slave.c: (on_user_verified),
	(on_greeter_start), (on_greeter_stop), (run_greeter),
	(gdm_simple_slave_stop):
	* daemon/gdm-slave.c:
	Rename GdmGreeterProxy->GdmGreeterSession


svn path=/branches/mccann-gobject/; revision=5237
parent 729df8c4
2007-09-10 William Jon McCann <mccann@jhu.edu>
* daemon/INTERNALS:
* daemon/Makefile.am:
* daemon/gdm-factory-slave.c: (on_greeter_start),
(on_greeter_stop), (run_greeter), (gdm_factory_slave_stop):
* daemon/gdm-greeter-proxy.c:
* daemon/gdm-greeter-proxy.h:
* daemon/gdm-greeter-session.c: (change_user),
(greeter_session_child_setup), (open_greeter_session),
(close_greeter_session), (get_greeter_environment),
(gdm_slave_whack_temp_auth_file), (create_temp_auth_file),
(greeter_session_child_watch), (gdm_greeter_session_spawn),
(gdm_greeter_session_start), (greeter_session_died),
(gdm_greeter_session_stop),
(gdm_greeter_session_set_server_address),
(_gdm_greeter_session_set_x11_display_name),
(_gdm_greeter_session_set_x11_display_hostname),
(_gdm_greeter_session_set_x11_display_device),
(_gdm_greeter_session_set_x11_display_is_local),
(_gdm_greeter_session_set_x11_authority_file),
(_gdm_greeter_session_set_user_name),
(_gdm_greeter_session_set_group_name),
(gdm_greeter_session_set_property),
(gdm_greeter_session_get_property),
(gdm_greeter_session_constructor),
(gdm_greeter_session_class_init), (gdm_greeter_session_init),
(gdm_greeter_session_finalize), (gdm_greeter_session_new):
* daemon/gdm-greeter-session.h:
* daemon/gdm-simple-slave.c: (on_user_verified),
(on_greeter_start), (on_greeter_stop), (run_greeter),
(gdm_simple_slave_stop):
* daemon/gdm-slave.c:
Rename GdmGreeterProxy->GdmGreeterSession
2007-09-10 William Jon McCann <mccann@jhu.edu>
* gui/simple-greeter/gdm-simple-greeter.c: (set_focus),
......
......@@ -81,10 +81,10 @@ A class that manages running a local X Server.
A class that creates a D-Bus server on a private connection that is
used to command the greeter subprocess.
** GdmGreeterProxy
** GdmGreeterSession
A class that manages running an external greeter process. This will
provide the GdmGreeterServer D-Bus address to the subprocess.
A class that manages running an external greeter session. This will
provide the GdmGreeterServer D-Bus address to the subprocesses.
** GdmSession
......
......@@ -91,8 +91,8 @@ gdm_simple_slave_SOURCES = \
simple-slave-main.c \
gdm-greeter-server.c \
gdm-greeter-server.h \
gdm-greeter-proxy.c \
gdm-greeter-proxy.h \
gdm-greeter-session.c \
gdm-greeter-session.h \
ck-connector.h \
ck-connector.c \
gdm-server.c \
......@@ -136,8 +136,8 @@ gdm_factory_slave_SOURCES = \
factory-slave-main.c \
gdm-greeter-server.c \
gdm-greeter-server.h \
gdm-greeter-proxy.c \
gdm-greeter-proxy.h \
gdm-greeter-session.c \
gdm-greeter-session.h \
ck-connector.h \
ck-connector.c \
gdm-server.c \
......
......@@ -49,7 +49,7 @@
#include "gdm-factory-slave-glue.h"
#include "gdm-server.h"
#include "gdm-greeter-proxy.h"
#include "gdm-greeter-session.h"
#include "gdm-greeter-server.h"
#include "gdm-session-relay.h"
......@@ -64,21 +64,21 @@ extern char **environ;
struct GdmFactorySlavePrivate
{
char *id;
GPid pid;
guint output_watch_id;
guint error_watch_id;
GPid server_pid;
Display *server_display;
guint connection_attempts;
GdmServer *server;
GdmSessionRelay *session_relay;
GdmGreeterServer *greeter_server;
GdmGreeterProxy *greeter;
DBusGProxy *factory_display_proxy;
DBusGConnection *connection;
char *id;
GPid pid;
guint output_watch_id;
guint error_watch_id;
GPid server_pid;
Display *server_display;
guint connection_attempts;
GdmServer *server;
GdmSessionRelay *session_relay;
GdmGreeterServer *greeter_server;
GdmGreeterSession *greeter;
DBusGProxy *factory_display_proxy;
DBusGConnection *connection;
};
enum {
......@@ -357,15 +357,15 @@ gdm_factory_slave_exec_script (GdmFactorySlave *slave,
}
static void
on_greeter_start (GdmGreeterProxy *greeter,
GdmFactorySlave *slave)
on_greeter_start (GdmGreeterSession *greeter,
GdmFactorySlave *slave)
{
g_debug ("Greeter started");
}
static void
on_greeter_stop (GdmGreeterProxy *greeter,
GdmFactorySlave *slave)
on_greeter_stop (GdmGreeterSession *greeter,
GdmFactorySlave *slave)
{
g_debug ("Greeter stopped");
}
......@@ -627,10 +627,10 @@ run_greeter (GdmFactorySlave *slave)
address = gdm_greeter_server_get_address (slave->priv->greeter_server);
g_debug ("Creating greeter on %s %s", display_name, display_device);
slave->priv->greeter = gdm_greeter_proxy_new (display_name,
display_device,
display_hostname,
display_is_local);
slave->priv->greeter = gdm_greeter_session_new (display_name,
display_device,
display_hostname,
display_is_local);
g_signal_connect (slave->priv->greeter,
"started",
G_CALLBACK (on_greeter_start),
......@@ -642,8 +642,8 @@ run_greeter (GdmFactorySlave *slave)
g_object_set (slave->priv->greeter,
"x11-authority-file", auth_file,
NULL);
gdm_greeter_proxy_set_server_address (slave->priv->greeter, address);
gdm_greeter_proxy_start (slave->priv->greeter);
gdm_greeter_session_set_server_address (slave->priv->greeter, address);
gdm_greeter_session_start (slave->priv->greeter);
g_free (address);
......@@ -890,7 +890,7 @@ gdm_factory_slave_stop (GdmSlave *slave)
}
if (GDM_FACTORY_SLAVE (slave)->priv->greeter != NULL) {
gdm_greeter_proxy_stop (GDM_FACTORY_SLAVE (slave)->priv->greeter);
gdm_greeter_session_stop (GDM_FACTORY_SLAVE (slave)->priv->greeter);
g_object_unref (GDM_FACTORY_SLAVE (slave)->priv->greeter);
GDM_FACTORY_SLAVE (slave)->priv->greeter = NULL;
}
......
......@@ -19,46 +19,46 @@
*/
#ifndef __GDM_GREETER_PROXY_H
#define __GDM_GREETER_PROXY_H
#ifndef __GDM_GREETER_SESSION_H
#define __GDM_GREETER_SESSION_H
#include <glib-object.h>
G_BEGIN_DECLS
#define GDM_TYPE_GREETER_PROXY (gdm_greeter_proxy_get_type ())
#define GDM_GREETER_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDM_TYPE_GREETER_PROXY, GdmGreeterProxy))
#define GDM_GREETER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDM_TYPE_GREETER_PROXY, GdmGreeterProxyClass))
#define GDM_IS_GREETER_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDM_TYPE_GREETER_PROXY))
#define GDM_IS_GREETER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDM_TYPE_GREETER_PROXY))
#define GDM_GREETER_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDM_TYPE_GREETER_PROXY, GdmGreeterProxyClass))
#define GDM_TYPE_GREETER_SESSION (gdm_greeter_session_get_type ())
#define GDM_GREETER_SESSION(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDM_TYPE_GREETER_SESSION, GdmGreeterSession))
#define GDM_GREETER_SESSION_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDM_TYPE_GREETER_SESSION, GdmGreeterSessionClass))
#define GDM_IS_GREETER_SESSION(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDM_TYPE_GREETER_SESSION))
#define GDM_IS_GREETER_SESSION_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDM_TYPE_GREETER_SESSION))
#define GDM_GREETER_SESSION_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDM_TYPE_GREETER_SESSION, GdmGreeterSessionClass))
typedef struct GdmGreeterProxyPrivate GdmGreeterProxyPrivate;
typedef struct GdmGreeterSessionPrivate GdmGreeterSessionPrivate;
typedef struct
{
GObject parent;
GdmGreeterProxyPrivate *priv;
} GdmGreeterProxy;
GObject parent;
GdmGreeterSessionPrivate *priv;
} GdmGreeterSession;
typedef struct
{
GObjectClass parent_class;
void (* started) (GdmGreeterProxy *greeter_proxy);
void (* stopped) (GdmGreeterProxy *greeter_proxy);
} GdmGreeterProxyClass;
void (* started) (GdmGreeterSession *greeter_session);
void (* stopped) (GdmGreeterSession *greeter_session);
} GdmGreeterSessionClass;
GType gdm_greeter_proxy_get_type (void);
GdmGreeterProxy * gdm_greeter_proxy_new (const char *display_name,
const char *display_device,
const char *display_hostname,
gboolean display_is_local);
void gdm_greeter_proxy_set_server_address (GdmGreeterProxy *greeter_proxy,
const char *server_address);
gboolean gdm_greeter_proxy_start (GdmGreeterProxy *greeter_proxy);
gboolean gdm_greeter_proxy_stop (GdmGreeterProxy *greeter_proxy);
GType gdm_greeter_session_get_type (void);
GdmGreeterSession * gdm_greeter_session_new (const char *display_name,
const char *display_device,
const char *display_hostname,
gboolean display_is_local);
void gdm_greeter_session_set_server_address (GdmGreeterSession *greeter_session,
const char *server_address);
gboolean gdm_greeter_session_start (GdmGreeterSession *greeter_session);
gboolean gdm_greeter_session_stop (GdmGreeterSession *greeter_session);
G_END_DECLS
#endif /* __GDM_GREETER_PROXY_H */
#endif /* __GDM_GREETER_SESSION_H */
......@@ -51,7 +51,7 @@
#include "gdm-server.h"
#include "gdm-session.h"
#include "gdm-greeter-server.h"
#include "gdm-greeter-proxy.h"
#include "gdm-greeter-session.h"
#include "ck-connector.h"
......@@ -64,30 +64,30 @@
struct GdmSimpleSlavePrivate
{
char *id;
GPid pid;
guint output_watch_id;
guint error_watch_id;
char *id;
GPid pid;
guint output_watch_id;
guint error_watch_id;
guint greeter_reset_id;
guint greeter_reset_id;
int ping_interval;
int ping_interval;
GPid server_pid;
Display *server_display;
guint connection_attempts;
GPid server_pid;
Display *server_display;
guint connection_attempts;
/* user selected */
char *selected_session;
char *selected_language;
char *selected_user;
CkConnector *ckc;
GdmServer *server;
GdmGreeterServer *greeter_server;
GdmGreeterProxy *greeter;
GdmSession *session;
DBusGConnection *connection;
char *selected_session;
char *selected_language;
char *selected_user;
CkConnector *ckc;
GdmServer *server;
GdmGreeterServer *greeter_server;
GdmGreeterSession *greeter;
GdmSession *session;
DBusGConnection *connection;
};
enum {
......@@ -679,7 +679,7 @@ on_user_verified (GdmSession *session,
char *filename;
gboolean res;
gdm_greeter_proxy_stop (slave->priv->greeter);
gdm_greeter_session_stop (slave->priv->greeter);
gdm_greeter_server_stop (slave->priv->greeter_server);
username = gdm_session_get_username (session);
......@@ -858,15 +858,15 @@ create_new_session (GdmSimpleSlave *slave)
}
static void
on_greeter_start (GdmGreeterProxy *greeter,
GdmSimpleSlave *slave)
on_greeter_start (GdmGreeterSession *greeter,
GdmSimpleSlave *slave)
{
g_debug ("Greeter started");
}
static void
on_greeter_stop (GdmGreeterProxy *greeter,
GdmSimpleSlave *slave)
on_greeter_stop (GdmGreeterSession *greeter,
GdmSimpleSlave *slave)
{
g_debug ("Greeter stopped");
}
......@@ -1042,10 +1042,10 @@ run_greeter (GdmSimpleSlave *slave)
address = gdm_greeter_server_get_address (slave->priv->greeter_server);
g_debug ("Creating greeter on %s %s %s", display_name, display_device, display_hostname);
slave->priv->greeter = gdm_greeter_proxy_new (display_name,
display_device,
display_hostname,
display_is_local);
slave->priv->greeter = gdm_greeter_session_new (display_name,
display_device,
display_hostname,
display_is_local);
g_signal_connect (slave->priv->greeter,
"started",
G_CALLBACK (on_greeter_start),
......@@ -1057,8 +1057,8 @@ run_greeter (GdmSimpleSlave *slave)
g_object_set (slave->priv->greeter,
"x11-authority-file", auth_file,
NULL);
gdm_greeter_proxy_set_server_address (slave->priv->greeter, address);
gdm_greeter_proxy_start (slave->priv->greeter);
gdm_greeter_session_set_server_address (slave->priv->greeter, address);
gdm_greeter_session_start (slave->priv->greeter);
g_free (display_id);
g_free (display_name);
......@@ -1247,7 +1247,7 @@ gdm_simple_slave_stop (GdmSlave *slave)
res = GDM_SLAVE_CLASS (gdm_simple_slave_parent_class)->stop (slave);
if (GDM_SIMPLE_SLAVE (slave)->priv->greeter != NULL) {
gdm_greeter_proxy_stop (GDM_SIMPLE_SLAVE (slave)->priv->greeter);
gdm_greeter_session_stop (GDM_SIMPLE_SLAVE (slave)->priv->greeter);
g_object_unref (GDM_SIMPLE_SLAVE (slave)->priv->greeter);
GDM_SIMPLE_SLAVE (slave)->priv->greeter = NULL;
}
......
......@@ -50,7 +50,6 @@
#include "gdm-server.h"
#include "gdm-session.h"
#include "gdm-greeter-proxy.h"
#define GDM_SLAVE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GDM_TYPE_SLAVE, GdmSlavePrivate))
......@@ -66,14 +65,10 @@ struct GdmSlavePrivate
guint output_watch_id;
guint error_watch_id;
GPid server_pid;
Display *server_display;
guint connection_attempts;
/* cached display values */
char *display_id;
char *display_name;
int *display_number;
int display_number;
char *display_hostname;
gboolean display_is_local;
gboolean display_is_parented;
......@@ -86,9 +81,6 @@ struct GdmSlavePrivate
char *selected_session;
char *selected_language;
GdmServer *server;
GdmGreeterProxy *greeter;
GdmSession *session;
DBusGProxy *display_proxy;
DBusGConnection *connection;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment