diff options
author | William Jon McCann <mccann@jhu.edu> | 2007-08-03 17:07:36 +0000 |
---|---|---|
committer | William Jon McCann <mccann@src.gnome.org> | 2007-08-03 17:07:36 +0000 |
commit | 9d0888fedf2ee1ff59e5d47789b01d960c7e804c (patch) | |
tree | d5ee1378bca2c28c0f6de1979ac25916368b5cfb /daemon | |
parent | bbf43b5b0fb83fd80ffaeb5b4191a88319b409af (diff) | |
download | gdm-9d0888fedf2ee1ff59e5d47789b01d960c7e804c.tar.gz |
Fix up inheritance.
2007-08-03 William Jon McCann <mccann@jhu.edu>
* daemon/gdm-display-factory.c: (gdm_display_factory_start),
(gdm_display_factory_stop):
* daemon/gdm-display-factory.h:
* daemon/gdm-local-display-factory.c:
(gdm_local_display_factory_start),
(gdm_local_display_factory_stop),
(gdm_local_display_factory_class_init):
* daemon/gdm-local-display-factory.h:
* daemon/gdm-manager.c: (gdm_manager_start),
(gdm_manager_set_wait_for_go):
* daemon/gdm-xdmcp-display-factory.c:
(gdm_xdmcp_display_factory_start),
(gdm_xdmcp_display_factory_stop),
(gdm_xdmcp_display_factory_class_init):
* daemon/gdm-xdmcp-display-factory.h:
Fix up inheritance.
svn path=/branches/mccann-gobject/; revision=5133
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/gdm-display-factory.c | 6 | ||||
-rw-r--r-- | daemon/gdm-display-factory.h | 6 | ||||
-rw-r--r-- | daemon/gdm-local-display-factory.c | 21 | ||||
-rw-r--r-- | daemon/gdm-local-display-factory.h | 9 | ||||
-rw-r--r-- | daemon/gdm-manager.c | 8 | ||||
-rw-r--r-- | daemon/gdm-xdmcp-display-factory.c | 25 | ||||
-rw-r--r-- | daemon/gdm-xdmcp-display-factory.h | 4 |
7 files changed, 40 insertions, 39 deletions
diff --git a/daemon/gdm-display-factory.c b/daemon/gdm-display-factory.c index d21746ef..2a55171d 100644 --- a/daemon/gdm-display-factory.c +++ b/daemon/gdm-display-factory.c @@ -74,8 +74,7 @@ gdm_display_factory_get_display_store (GdmDisplayFactory *factory) } gboolean -gdm_display_factory_start (GdmDisplayFactory *factory, - GError **error) +gdm_display_factory_start (GdmDisplayFactory *factory) { gboolean ret; @@ -89,8 +88,7 @@ gdm_display_factory_start (GdmDisplayFactory *factory, } gboolean -gdm_display_factory_stop (GdmDisplayFactory *factory, - GError **error) +gdm_display_factory_stop (GdmDisplayFactory *factory) { gboolean ret; diff --git a/daemon/gdm-display-factory.h b/daemon/gdm-display-factory.h index 8d22b276..f743e75a 100644 --- a/daemon/gdm-display-factory.h +++ b/daemon/gdm-display-factory.h @@ -61,10 +61,8 @@ typedef enum GQuark gdm_display_factory_error_quark (void); GType gdm_display_factory_get_type (void); -gboolean gdm_display_factory_start (GdmDisplayFactory *manager, - GError **error); -gboolean gdm_display_factory_stop (GdmDisplayFactory *manager, - GError **error); +gboolean gdm_display_factory_start (GdmDisplayFactory *manager); +gboolean gdm_display_factory_stop (GdmDisplayFactory *manager); GdmDisplayStore * gdm_display_factory_get_display_store (GdmDisplayFactory *manager); G_END_DECLS diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c index 6def9859..c8d01e11 100644 --- a/daemon/gdm-local-display-factory.c +++ b/daemon/gdm-local-display-factory.c @@ -165,11 +165,11 @@ create_displays_for_pci_devices (GdmLocalDisplayFactory *factory) g_strfreev (devices); } -gboolean -gdm_local_display_factory_start (GdmLocalDisplayFactory *factory, - GError **error) +static gboolean +gdm_local_display_factory_start (GdmDisplayFactory *base_factory) { - gboolean ret; + gboolean ret; + GdmLocalDisplayFactory *factory = GDM_LOCAL_DISPLAY_FACTORY (base_factory); g_return_val_if_fail (GDM_IS_LOCAL_DISPLAY_FACTORY (factory), FALSE); @@ -181,10 +181,11 @@ gdm_local_display_factory_start (GdmLocalDisplayFactory *factory, return ret; } -gboolean -gdm_local_display_factory_stop (GdmLocalDisplayFactory *factory, - GError **error) +static gboolean +gdm_local_display_factory_stop (GdmDisplayFactory *base_factory) { + GdmLocalDisplayFactory *factory = GDM_LOCAL_DISPLAY_FACTORY (base_factory); + g_return_val_if_fail (GDM_IS_LOCAL_DISPLAY_FACTORY (factory), FALSE); return TRUE; @@ -227,12 +228,16 @@ gdm_local_display_factory_get_property (GObject *object, static void gdm_local_display_factory_class_init (GdmLocalDisplayFactoryClass *klass) { - GObjectClass *object_class = G_OBJECT_CLASS (klass); + GObjectClass *object_class = G_OBJECT_CLASS (klass); + GdmDisplayFactoryClass *factory_class = GDM_DISPLAY_FACTORY_CLASS (klass); object_class->get_property = gdm_local_display_factory_get_property; object_class->set_property = gdm_local_display_factory_set_property; object_class->finalize = gdm_local_display_factory_finalize; + factory_class->start = gdm_local_display_factory_start; + factory_class->stop = gdm_local_display_factory_stop; + g_type_class_add_private (klass, sizeof (GdmLocalDisplayFactoryPrivate)); } diff --git a/daemon/gdm-local-display-factory.h b/daemon/gdm-local-display-factory.h index 0344f6ca..a3b8dac9 100644 --- a/daemon/gdm-local-display-factory.h +++ b/daemon/gdm-local-display-factory.h @@ -40,13 +40,13 @@ typedef struct GdmLocalDisplayFactoryPrivate GdmLocalDisplayFactoryPrivate; typedef struct { - GObject parent; + GdmDisplayFactory parent; GdmLocalDisplayFactoryPrivate *priv; } GdmLocalDisplayFactory; typedef struct { - GObjectClass parent_class; + GdmDisplayFactoryClass parent_class; } GdmLocalDisplayFactoryClass; typedef enum @@ -61,11 +61,6 @@ GType gdm_local_display_factory_get_type (void); GdmLocalDisplayFactory * gdm_local_display_factory_new (GdmDisplayStore *display_store); -gboolean gdm_local_display_factory_start (GdmLocalDisplayFactory *manager, - GError **error); -gboolean gdm_local_display_factory_stop (GdmLocalDisplayFactory *manager, - GError **error); - G_END_DECLS #endif /* __GDM_LOCAL_DISPLAY_FACTORY_H */ diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c index dea9e5a6..d0cfab1f 100644 --- a/daemon/gdm-manager.c +++ b/daemon/gdm-manager.c @@ -174,14 +174,14 @@ gdm_manager_start (GdmManager *manager) g_debug ("GDM starting to manage"); if (! manager->priv->wait_for_go) { - gdm_display_factory_start (manager->priv->local_factory, NULL); + gdm_display_factory_start (GDM_DISPLAY_FACTORY (manager->priv->local_factory)); } /* Accept remote connections */ if (manager->priv->xdmcp_enabled && ! manager->priv->wait_for_go) { if (manager->priv->xdmcp_factory != NULL) { g_debug ("Accepting XDMCP connections..."); - gdm_display_factory_start (manager->priv->xdmcp_factory, NULL); + gdm_display_factory_start (GDM_DISPLAY_FACTORY (manager->priv->xdmcp_factory)); } } @@ -196,11 +196,11 @@ gdm_manager_set_wait_for_go (GdmManager *manager, if (! wait_for_go) { /* we got a go */ - gdm_display_factory_start (manager->priv->local_factory, NULL); + gdm_display_factory_start (GDM_DISPLAY_FACTORY (manager->priv->local_factory)); if (manager->priv->xdmcp_enabled && manager->priv->xdmcp_factory != NULL) { g_debug ("Accepting XDMCP connections..."); - gdm_display_factory_start (manager->priv->xdmcp_factory, NULL); + gdm_display_factory_start (GDM_DISPLAY_FACTORY (manager->priv->xdmcp_factory)); } } } diff --git a/daemon/gdm-xdmcp-display-factory.c b/daemon/gdm-xdmcp-display-factory.c index 09dfced1..69ec0f76 100644 --- a/daemon/gdm-xdmcp-display-factory.c +++ b/daemon/gdm-xdmcp-display-factory.c @@ -205,7 +205,7 @@ static void gdm_xdmcp_display_factory_finalize (GObject *object); static gpointer xdmcp_display_factory_object = NULL; -G_DEFINE_TYPE (GdmXdmcpDisplayFactory, gdm_xdmcp_display_factory, G_TYPE_OBJECT) +G_DEFINE_TYPE (GdmXdmcpDisplayFactory, gdm_xdmcp_display_factory, GDM_TYPE_DISPLAY_FACTORY) /* Theory of operation: * @@ -2678,12 +2678,12 @@ decode_packet (GIOChannel *source, return TRUE; } -gboolean -gdm_xdmcp_display_factory_start (GdmXdmcpDisplayFactory *factory, - GError **error) +static gboolean +gdm_xdmcp_display_factory_start (GdmDisplayFactory *base_factory) { - gboolean ret; - GIOChannel *ioc; + gboolean ret; + GIOChannel *ioc; + GdmXdmcpDisplayFactory *factory = GDM_XDMCP_DISPLAY_FACTORY (base_factory); g_return_val_if_fail (GDM_IS_XDMCP_DISPLAY_FACTORY (factory), FALSE); g_return_val_if_fail (factory->priv->socket_fd == -1, FALSE); @@ -2711,10 +2711,11 @@ gdm_xdmcp_display_factory_start (GdmXdmcpDisplayFactory *factory, return ret; } -gboolean -gdm_xdmcp_display_factory_stop (GdmXdmcpDisplayFactory *factory, - GError **error) +static gboolean +gdm_xdmcp_display_factory_stop (GdmDisplayFactory *base_factory) { + GdmXdmcpDisplayFactory *factory = GDM_XDMCP_DISPLAY_FACTORY (base_factory); + g_return_val_if_fail (GDM_IS_XDMCP_DISPLAY_FACTORY (factory), FALSE); g_return_val_if_fail (factory->priv->socket_fd != -1, FALSE); @@ -2905,12 +2906,16 @@ gdm_xdmcp_display_factory_get_property (GObject *object, static void gdm_xdmcp_display_factory_class_init (GdmXdmcpDisplayFactoryClass *klass) { - GObjectClass *object_class = G_OBJECT_CLASS (klass); + GObjectClass *object_class = G_OBJECT_CLASS (klass); + GdmDisplayFactoryClass *factory_class = GDM_DISPLAY_FACTORY_CLASS (klass); object_class->get_property = gdm_xdmcp_display_factory_get_property; object_class->set_property = gdm_xdmcp_display_factory_set_property; object_class->finalize = gdm_xdmcp_display_factory_finalize; + factory_class->start = gdm_xdmcp_display_factory_start; + factory_class->stop = gdm_xdmcp_display_factory_stop; + g_object_class_install_property (object_class, PROP_PORT, g_param_spec_uint ("port", diff --git a/daemon/gdm-xdmcp-display-factory.h b/daemon/gdm-xdmcp-display-factory.h index bcf7099d..5d515b0a 100644 --- a/daemon/gdm-xdmcp-display-factory.h +++ b/daemon/gdm-xdmcp-display-factory.h @@ -40,13 +40,13 @@ typedef struct GdmXdmcpDisplayFactoryPrivate GdmXdmcpDisplayFactoryPrivate; typedef struct { - GObject parent; + GdmDisplayFactory parent; GdmXdmcpDisplayFactoryPrivate *priv; } GdmXdmcpDisplayFactory; typedef struct { - GObjectClass parent_class; + GdmDisplayFactoryClass parent_class; } GdmXdmcpDisplayFactoryClass; typedef enum |