Commit ed6447ee authored by William Jon McCann's avatar William Jon McCann

Add stubs for factory and product displays

svn path=/branches/mccann-gobject/; revision=4992
parent 95b461fc
......@@ -29,12 +29,14 @@ INCLUDES = \
$(DBUS_CFLAGS) \
$(NULL)
BUILT_SOURCES = \
gdm-slave-glue.h \
gdm-manager-glue.h \
gdm-display-glue.h \
gdm-xdmcp-display-glue.h \
gdm-static-display-glue.h \
BUILT_SOURCES = \
gdm-slave-glue.h \
gdm-manager-glue.h \
gdm-display-glue.h \
gdm-xdmcp-display-glue.h \
gdm-static-display-glue.h \
gdm-static-factory-display-glue.h \
gdm-product-display-glue.h \
$(NULL)
gdm-manager-glue.h: gdm-manager.xml Makefile.am
......@@ -47,6 +49,10 @@ gdm-xdmcp-display-glue.h: gdm-xdmcp-display.xml Makefile.am
dbus-binding-tool --prefix=gdm_xdmcp_display --mode=glib-server --output=gdm-xdmcp-display-glue.h gdm-xdmcp-display.xml
gdm-static-display-glue.h: gdm-static-display.xml Makefile.am
dbus-binding-tool --prefix=gdm_static_display --mode=glib-server --output=gdm-static-display-glue.h gdm-static-display.xml
gdm-static-factory-display-glue.h: gdm-static-factory-display.xml Makefile.am
dbus-binding-tool --prefix=gdm_static_factory_display --mode=glib-server --output=gdm-static-factory-display-glue.h gdm-static-factory-display.xml
gdm-product-display-glue.h: gdm-product-display.xml Makefile.am
dbus-binding-tool --prefix=gdm_product_display --mode=glib-server --output=gdm-product-display-glue.h gdm-product-display.xml
noinst_PROGRAMS = \
test-session \
......@@ -118,6 +124,10 @@ gdm_binary_SOURCES = \
gdm-xdmcp-display.h \
gdm-static-display.c \
gdm-static-display.h \
gdm-static-factory-display.c \
gdm-static-factory-display.h \
gdm-product-display.c \
gdm-product-display.h \
gdm-manager.c \
gdm-manager.h \
gdm-slave-proxy.c \
......@@ -189,11 +199,13 @@ CLEANFILES = \
$(BUILT_SOURCES) \
$(NULL)
EXTRA_DIST = \
gdm.in \
gdm-slave.xml \
gdm-manager.xml \
gdm-display.xml \
gdm-xdmcp-display.xml \
gdm-static-display.xml \
EXTRA_DIST = \
gdm.in \
gdm-slave.xml \
gdm-manager.xml \
gdm-display.xml \
gdm-xdmcp-display.xml \
gdm-static-display.xml \
gdm-static-factory-display.xml \
gdm-product-display.xml \
$(NULL)
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
* Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <signal.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <glib.h>
#include <glib/gi18n.h>
#include <glib-object.h>
#include "gdm-display.h"
#include "gdm-product-display.h"
#include "gdm-product-display-glue.h"
#define GDM_PRODUCT_DISPLAY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GDM_TYPE_PRODUCT_DISPLAY, GdmProductDisplayPrivate))
struct GdmProductDisplayPrivate
{
gpointer dummy;
};
enum {
PROP_0,
};
static void gdm_product_display_class_init (GdmProductDisplayClass *klass);
static void gdm_product_display_init (GdmProductDisplay *product_display);
static void gdm_product_display_finalize (GObject *object);
G_DEFINE_TYPE (GdmProductDisplay, gdm_product_display, GDM_TYPE_DISPLAY)
static gboolean
gdm_product_display_create_authority (GdmDisplay *display)
{
g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
GDM_DISPLAY_CLASS (gdm_product_display_parent_class)->create_authority (display);
return TRUE;
}
static gboolean
gdm_product_display_manage (GdmDisplay *display)
{
g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
GDM_DISPLAY_CLASS (gdm_product_display_parent_class)->manage (display);
return TRUE;
}
static gboolean
gdm_product_display_unmanage (GdmDisplay *display)
{
g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
GDM_DISPLAY_CLASS (gdm_product_display_parent_class)->unmanage (display);
return TRUE;
}
static void
gdm_product_display_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GdmProductDisplay *self;
self = GDM_PRODUCT_DISPLAY (object);
switch (prop_id) {
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gdm_product_display_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GdmProductDisplay *self;
self = GDM_PRODUCT_DISPLAY (object);
switch (prop_id) {
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gdm_product_display_class_init (GdmProductDisplayClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GdmDisplayClass *display_class = GDM_DISPLAY_CLASS (klass);
object_class->get_property = gdm_product_display_get_property;
object_class->set_property = gdm_product_display_set_property;
object_class->finalize = gdm_product_display_finalize;
display_class->create_authority = gdm_product_display_create_authority;
display_class->manage = gdm_product_display_manage;
display_class->unmanage = gdm_product_display_unmanage;
g_type_class_add_private (klass, sizeof (GdmProductDisplayPrivate));
dbus_g_object_type_install_info (GDM_TYPE_PRODUCT_DISPLAY, &dbus_glib_gdm_product_display_object_info);
}
static void
gdm_product_display_init (GdmProductDisplay *product_display)
{
product_display->priv = GDM_PRODUCT_DISPLAY_GET_PRIVATE (product_display);
}
static void
gdm_product_display_finalize (GObject *object)
{
GdmProductDisplay *product_display;
g_return_if_fail (object != NULL);
g_return_if_fail (GDM_IS_PRODUCT_DISPLAY (object));
product_display = GDM_PRODUCT_DISPLAY (object);
g_return_if_fail (product_display->priv != NULL);
G_OBJECT_CLASS (gdm_product_display_parent_class)->finalize (object);
}
GdmDisplay *
gdm_product_display_new (int display_number)
{
GObject *object;
char *x11_display;
x11_display = g_strdup_printf (":%d", display_number);
object = g_object_new (GDM_TYPE_PRODUCT_DISPLAY,
"number", display_number,
"x11-display", x11_display,
NULL);
g_free (x11_display);
return GDM_DISPLAY (object);
}
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
* Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef __GDM_PRODUCT_DISPLAY_H
#define __GDM_PRODUCT_DISPLAY_H
#include <glib-object.h>
#include <dbus/dbus-glib.h>
#include "gdm-display.h"
G_BEGIN_DECLS
#define GDM_TYPE_PRODUCT_DISPLAY (gdm_product_display_get_type ())
#define GDM_PRODUCT_DISPLAY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDM_TYPE_PRODUCT_DISPLAY, GdmProductDisplay))
#define GDM_PRODUCT_DISPLAY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDM_TYPE_PRODUCT_DISPLAY, GdmProductDisplayClass))
#define GDM_IS_PRODUCT_DISPLAY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDM_TYPE_PRODUCT_DISPLAY))
#define GDM_IS_PRODUCT_DISPLAY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDM_TYPE_PRODUCT_DISPLAY))
#define GDM_PRODUCT_DISPLAY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDM_TYPE_PRODUCT_DISPLAY, GdmProductDisplayClass))
typedef struct GdmProductDisplayPrivate GdmProductDisplayPrivate;
typedef struct
{
GdmDisplay parent;
GdmProductDisplayPrivate *priv;
} GdmProductDisplay;
typedef struct
{
GdmDisplayClass parent_class;
} GdmProductDisplayClass;
GType gdm_product_display_get_type (void);
GdmDisplay * gdm_product_display_new (int display_number);
G_END_DECLS
#endif /* __GDM_PRODUCT_DISPLAY_H */
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.gnome.DisplayManager.ProductDisplay">
</interface>
</node>
......@@ -42,7 +42,7 @@
struct GdmStaticDisplayPrivate
{
struct sockaddr_storage addr;
gpointer dummy;
};
enum {
......
......@@ -25,8 +25,6 @@
#include <glib-object.h>
#include <dbus/dbus-glib.h>
#include "gdm-display.h"
#include <sys/types.h>
#include <sys/socket.h>
G_BEGIN_DECLS
......
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
* Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <signal.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <glib.h>
#include <glib/gi18n.h>
#include <glib-object.h>
#include "gdm-display.h"
#include "gdm-static-factory-display.h"
#include "gdm-static-factory-display-glue.h"
#define GDM_STATIC_FACTORY_DISPLAY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GDM_TYPE_STATIC_FACTORY_DISPLAY, GdmStaticFactoryDisplayPrivate))
struct GdmStaticFactoryDisplayPrivate
{
gpointer dummy;
};
enum {
PROP_0,
};
static void gdm_static_factory_display_class_init (GdmStaticFactoryDisplayClass *klass);
static void gdm_static_factory_display_init (GdmStaticFactoryDisplay *static_factory_display);
static void gdm_static_factory_display_finalize (GObject *object);
G_DEFINE_TYPE (GdmStaticFactoryDisplay, gdm_static_factory_display, GDM_TYPE_DISPLAY)
static gboolean
gdm_static_factory_display_create_authority (GdmDisplay *display)
{
g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
GDM_DISPLAY_CLASS (gdm_static_factory_display_parent_class)->create_authority (display);
return TRUE;
}
static gboolean
gdm_static_factory_display_manage (GdmDisplay *display)
{
g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
GDM_DISPLAY_CLASS (gdm_static_factory_display_parent_class)->manage (display);
return TRUE;
}
static gboolean
gdm_static_factory_display_unmanage (GdmDisplay *display)
{
g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
GDM_DISPLAY_CLASS (gdm_static_factory_display_parent_class)->unmanage (display);
return TRUE;
}
static void
gdm_static_factory_display_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GdmStaticFactoryDisplay *self;
self = GDM_STATIC_FACTORY_DISPLAY (object);
switch (prop_id) {
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gdm_static_factory_display_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GdmStaticFactoryDisplay *self;
self = GDM_STATIC_FACTORY_DISPLAY (object);
switch (prop_id) {
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gdm_static_factory_display_class_init (GdmStaticFactoryDisplayClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GdmDisplayClass *display_class = GDM_DISPLAY_CLASS (klass);
object_class->get_property = gdm_static_factory_display_get_property;
object_class->set_property = gdm_static_factory_display_set_property;
object_class->finalize = gdm_static_factory_display_finalize;
display_class->create_authority = gdm_static_factory_display_create_authority;
display_class->manage = gdm_static_factory_display_manage;
display_class->unmanage = gdm_static_factory_display_unmanage;
g_type_class_add_private (klass, sizeof (GdmStaticFactoryDisplayPrivate));
dbus_g_object_type_install_info (GDM_TYPE_STATIC_FACTORY_DISPLAY, &dbus_glib_gdm_static_factory_display_object_info);
}
static void
gdm_static_factory_display_init (GdmStaticFactoryDisplay *static_factory_display)
{
static_factory_display->priv = GDM_STATIC_FACTORY_DISPLAY_GET_PRIVATE (static_factory_display);
}
static void
gdm_static_factory_display_finalize (GObject *object)
{
GdmStaticFactoryDisplay *static_factory_display;
g_return_if_fail (object != NULL);
g_return_if_fail (GDM_IS_STATIC_FACTORY_DISPLAY (object));
static_factory_display = GDM_STATIC_FACTORY_DISPLAY (object);
g_return_if_fail (static_factory_display->priv != NULL);
G_OBJECT_CLASS (gdm_static_factory_display_parent_class)->finalize (object);
}
GdmDisplay *
gdm_static_factory_display_new (int display_number)
{
GObject *object;
char *x11_display;
x11_display = g_strdup_printf (":%d", display_number);
object = g_object_new (GDM_TYPE_STATIC_FACTORY_DISPLAY,
"number", display_number,
"x11-display", x11_display,
NULL);
g_free (x11_display);
return GDM_DISPLAY (object);
}
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
*
* Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef __GDM_STATIC_FACTORY_DISPLAY_H
#define __GDM_STATIC_FACTORY_DISPLAY_H
#include <glib-object.h>
#include <dbus/dbus-glib.h>
#include "gdm-display.h"
G_BEGIN_DECLS
#define GDM_TYPE_STATIC_FACTORY_DISPLAY (gdm_static_factory_display_get_type ())
#define GDM_STATIC_FACTORY_DISPLAY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDM_TYPE_STATIC_FACTORY_DISPLAY, GdmStaticFactoryDisplay))
#define GDM_STATIC_FACTORY_DISPLAY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDM_TYPE_STATIC_FACTORY_DISPLAY, GdmStaticFactoryDisplayClass))
#define GDM_IS_STATIC_FACTORY_DISPLAY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDM_TYPE_STATIC_FACTORY_DISPLAY))
#define GDM_IS_STATIC_FACTORY_DISPLAY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDM_TYPE_STATIC_FACTORY_DISPLAY))
#define GDM_STATIC_FACTORY_DISPLAY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDM_TYPE_STATIC_FACTORY_DISPLAY, GdmStaticFactoryDisplayClass))
typedef struct GdmStaticFactoryDisplayPrivate GdmStaticFactoryDisplayPrivate;
typedef struct
{
GdmDisplay parent;
GdmStaticFactoryDisplayPrivate *priv;
} GdmStaticFactoryDisplay;
typedef struct
{
GdmDisplayClass parent_class;
} GdmStaticFactoryDisplayClass;
GType gdm_static_factory_display_get_type (void);
GdmDisplay * gdm_static_factory_display_new (int display_number);
G_END_DECLS
#endif /* __GDM_STATIC_FACTORY_DISPLAY_H */
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.gnome.DisplayManager.StaticFactoryDisplay">
</interface>
</node>
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