soylent r193 - trunk/libsoylent
- From: svenp svn gnome org
- To: svn-commits-list gnome org
- Subject: soylent r193 - trunk/libsoylent
- Date: Wed, 9 Jul 2008 13:55:16 +0000 (UTC)
Author: svenp
Date: Wed Jul 9 13:55:15 2008
New Revision: 193
URL: http://svn.gnome.org/viewvc/soylent?rev=193&view=rev
Log:
added EDS entity-handler (stubs)
Added:
trunk/libsoylent/sl-entity-handler-eds.c
trunk/libsoylent/sl-entity-handler-eds.h
Added: trunk/libsoylent/sl-entity-handler-eds.c
==============================================================================
--- (empty file)
+++ trunk/libsoylent/sl-entity-handler-eds.c Wed Jul 9 13:55:15 2008
@@ -0,0 +1,137 @@
+/**/
+
+#include "sl-entity-handler.h"
+#include "sl-entity-handler-eds.h"
+
+struct _SlEntityHandlerEDSPriv
+{
+};
+
+static GObjectClass *parent_class = NULL;
+
+static void sl_entity_handler_eds_class_init (gpointer g_class, gpointer class_data);
+static void sl_entity_handler_eds_interface_init (gpointer g_iface, gpointer
+ iface_data);
+static void sl_entity_handler_eds_init (GTypeInstance *instance, gpointer g_class);
+static void sl_entity_handler_eds_dispose (GObject *object);
+static void sl_entity_handler_eds_set_property (GObject *object, guint
+ property_id, const GValue *value, GParamSpec *pspec);
+static void sl_entity_handler_eds_get_property (GObject *object, guint
+ property_id, GValue *value, GParamSpec *pspec);
+
+GType
+sl_entity_handler_eds_get_type (void)
+{
+ static GType type = 0;
+ static const GTypeInfo info =
+ {
+ sizeof (SlEntityHandlerEDSClass),
+ NULL,
+ NULL,
+ sl_entity_handler_eds_class_init,
+ NULL,
+ NULL,
+ sizeof (SlEntityHandlerEDS),
+ 0,
+ sl_entity_handler_eds_init,
+ NULL
+ };
+ static const GInterfaceInfo iface_info =
+ {
+ sl_entity_handler_eds_interface_init,
+ NULL,
+ NULL
+ };
+
+ if (type == 0)
+ {
+ type = g_type_register_static (G_TYPE_OBJECT, "SlEntityHandlerEDS", &info, 0);
+ g_type_add_interface_static(type, SL_ENTITY_HANDLER_TYPE, &iface_info);
+ }
+ return type;
+}
+
+static void
+sl_entity_handler_eds_class_init (gpointer g_class, gpointer class_data)
+{
+ parent_class = g_type_class_peek (g_type_parent (SL_ENTITY_HANDLER_EDS_TYPE));
+ g_assert (parent_class != NULL);
+
+ GObjectClass *obj_class = G_OBJECT_CLASS (g_class);
+ obj_class->dispose = sl_entity_handler_eds_dispose;
+ obj_class->get_property = sl_entity_handler_eds_get_property;
+ obj_class->set_property = sl_entity_handler_eds_set_property;
+}
+
+static void
+sl_entity_handler_eds_interface_init (gpointer g_iface, gpointer iface_data)
+{
+ if (SL_IS_ENTITY_HANDLER_CLASS (g_iface))
+ {
+ SlEntityHandlerClass *entity_handler_class = (SlEntityHandlerClass *) g_iface;
+ entity_handler_class->get = (gchar *(*)(SlEntityHandler *self,
+ gchar *attrname)) sl_entity_handler_eds_get;
+ entity_handler_class->set = (void (*)(SlEntityHandler *self,
+ gchar *attrname, gchar *value)) sl_entity_handler_eds_set;
+ }
+ else
+ {
+ g_assert_not_reached ();
+ }
+}
+
+static void
+sl_entity_handler_eds_init (GTypeInstance *instance, gpointer g_class)
+{
+ SlEntityHandlerEDS *self = SL_ENTITY_HANDLER_EDS (instance);
+ SlEntityHandlerEDSPriv *priv = g_new (SlEntityHandlerEDSPriv, 1);
+ self->priv = priv;
+ self->disposed = FALSE;
+}
+
+static void
+sl_entity_handler_eds_dispose (GObject *object)
+{
+ SlEntityHandlerEDS *self = SL_ENTITY_HANDLER_EDS (object);
+ g_return_if_fail (!self->disposed);
+
+ g_free (self->priv);
+ self->disposed = TRUE;
+
+ parent_class->dispose (object);
+}
+
+static void
+sl_entity_handler_eds_set_property (GObject *object, guint property_id, const
+ GValue *value, GParamSpec *pspec)
+{
+ g_warning("%s not implemented", __FUNCTION__);
+}
+
+static void
+sl_entity_handler_eds_get_property (GObject *object, guint property_id,
+ GValue *value, GParamSpec *pspec)
+{
+ g_warning("%s not implemented", __FUNCTION__);
+}
+
+SlEntityHandlerEDS *
+sl_entity_handler_eds_new (void)
+{
+ SlEntityHandlerEDS *self = g_object_new (SL_ENTITY_HANDLER_EDS_TYPE, NULL);
+ return self;
+}
+
+gchar *
+sl_entity_handler_eds_get(SlEntityHandlerEDS *self, gchar *attrname)
+{
+ g_debug("eds_get");
+ return NULL;
+}
+
+void
+sl_entity_handler_eds_set(SlEntityHandlerEDS *self, gchar *attrname,
+ gchar *value)
+{
+ g_debug("eds_set");
+}
Added: trunk/libsoylent/sl-entity-handler-eds.h
==============================================================================
--- (empty file)
+++ trunk/libsoylent/sl-entity-handler-eds.h Wed Jul 9 13:55:15 2008
@@ -0,0 +1,45 @@
+/**/
+
+#ifndef SL_ENTITY_HANDLER_EDS_H
+#define SL_ENTITY_HANDLER_EDS_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#define SL_ENTITY_HANDLER_EDS_TYPE (sl_entity_handler_eds_get_type \
+ ())
+#define SL_ENTITY_HANDLER_EDS(obj) (G_TYPE_CHECK_INSTANCE_CAST \
+ (obj, SL_ENTITY_HANDLER_EDS_TYPE, SlEntityHandlerEDS))
+#define SL_ENTITY_HANDLER_EDS_CLASS(cls) (G_TYPE_CHECK_CLASS_CAST (cls, \
+ SL_ENTITY_HANDLER_EDS_TYPE, SlEntityHandlerEDSClass))
+#define SL_IS_ENTITY_HANDLER_EDS(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
+ (obj, SL_ENTITY_HANDLER_EDS_TYPE))
+#define SL_IS_ENTITY_HANDLER_EDS_CLASS(cls) (G_TYPE_CHECK_CLASS_TYPE (cls, \
+ SL_ENTITY_HANDLER_EDS_TYPE))
+#define SL_ENTITY_HANDLER_EDS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, \
+ SL_ENTITY_HANDLER_EDS_TYPE))
+
+typedef struct _SlEntityHandlerEDS SlEntityHandlerEDS;
+typedef struct _SlEntityHandlerEDSClass SlEntityHandlerEDSClass;
+typedef struct _SlEntityHandlerEDSPriv SlEntityHandlerEDSPriv;
+
+struct _SlEntityHandlerEDS
+{
+ GObject parent;
+ gboolean disposed;
+ SlEntityHandlerEDSPriv *priv;
+};
+
+struct _SlEntityHandlerEDSClass
+{
+ GObjectClass parent;
+};
+
+GType sl_entity_handler_eds_get_type (void);
+
+SlEntityHandlerEDS *sl_entity_handler_eds_new (void);
+gchar *sl_entity_handler_eds_get(SlEntityHandlerEDS *self, gchar *attrname);
+void sl_entity_handler_eds_set(SlEntityHandlerEDS *self, gchar *attrname,
+ gchar *value);
+
+#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]