soylent r194 - trunk/libsoylent
- From: svenp svn gnome org
- To: svn-commits-list gnome org
- Subject: soylent r194 - trunk/libsoylent
- Date: Wed, 9 Jul 2008 13:55:36 +0000 (UTC)
Author: svenp
Date: Wed Jul 9 13:55:36 2008
New Revision: 194
URL: http://svn.gnome.org/viewvc/soylent?rev=194&view=rev
Log:
added file entity-handler (stubs)
Added:
trunk/libsoylent/sl-entity-handler-file.c
trunk/libsoylent/sl-entity-handler-file.h
Added: trunk/libsoylent/sl-entity-handler-file.c
==============================================================================
--- (empty file)
+++ trunk/libsoylent/sl-entity-handler-file.c Wed Jul 9 13:55:36 2008
@@ -0,0 +1,141 @@
+/**/
+
+#include "sl-entity-handler.h"
+#include "sl-entity-handler-file.h"
+
+struct _SlEntityHandlerFilePriv
+{
+};
+
+static GObjectClass *parent_class = NULL;
+
+static void sl_entity_handler_file_class_init (gpointer g_class,
+ gpointer class_data);
+static void sl_entity_handler_file_interface_init (gpointer g_iface,
+ gpointer iface_data);
+static void sl_entity_handler_file_init (GTypeInstance *instance,
+ gpointer g_class);
+static void sl_entity_handler_file_dispose (GObject *object);
+static void sl_entity_handler_file_set_property (GObject *object,
+ guint property_id, const GValue *value, GParamSpec *pspec);
+static void sl_entity_handler_file_get_property (GObject *object,
+ guint property_id, GValue *value, GParamSpec *pspec);
+
+GType
+sl_entity_handler_file_get_type (void)
+{
+ static GType type = 0;
+ static const GTypeInfo info =
+ {
+ sizeof (SlEntityHandlerFileClass),
+ NULL,
+ NULL,
+ sl_entity_handler_file_class_init,
+ NULL,
+ NULL,
+ sizeof (SlEntityHandlerFile),
+ 0,
+ sl_entity_handler_file_init,
+ NULL
+ };
+ static const GInterfaceInfo iface_info =
+ {
+ sl_entity_handler_file_interface_init,
+ NULL,
+ NULL
+ };
+
+ if (type == 0)
+ {
+ type = g_type_register_static (G_TYPE_OBJECT, "SlEntityHandlerFile", &info, 0);
+ g_type_add_interface_static(type, SL_ENTITY_HANDLER_TYPE, &iface_info);
+ }
+ return type;
+}
+
+static void
+sl_entity_handler_file_class_init (gpointer g_class, gpointer class_data)
+{
+ parent_class = g_type_class_peek (g_type_parent
+ (SL_ENTITY_HANDLER_FILE_TYPE));
+ g_assert (parent_class != NULL);
+
+ GObjectClass *obj_class = G_OBJECT_CLASS (g_class);
+ obj_class->dispose = sl_entity_handler_file_dispose;
+ obj_class->get_property = sl_entity_handler_file_get_property;
+ obj_class->set_property = sl_entity_handler_file_set_property;
+}
+
+static void
+sl_entity_handler_file_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_file_get;
+ entity_handler_class->set = (void (*)(SlEntityHandler *self,
+ gchar *attrname, gchar *value)) sl_entity_handler_file_set;
+ }
+ else
+ {
+ g_assert_not_reached ();
+ }
+}
+
+static void
+sl_entity_handler_file_init (GTypeInstance *instance, gpointer g_class)
+{
+ SlEntityHandlerFile *self = SL_ENTITY_HANDLER_FILE (instance);
+ SlEntityHandlerFilePriv *priv = g_new (SlEntityHandlerFilePriv, 1);
+ self->priv = priv;
+ self->disposed = FALSE;
+}
+
+static void
+sl_entity_handler_file_dispose (GObject *object)
+{
+ SlEntityHandlerFile *self = SL_ENTITY_HANDLER_FILE (object);
+ g_return_if_fail (!self->disposed);
+
+ g_free (self->priv);
+ self->disposed = TRUE;
+
+ parent_class->dispose (object);
+}
+
+static void
+sl_entity_handler_file_set_property (GObject *object, guint property_id, const
+ GValue *value, GParamSpec *pspec)
+{
+ g_warning("%s not implemented", __FUNCTION__);
+}
+
+static void
+sl_entity_handler_file_get_property (GObject *object, guint property_id,
+ GValue *value, GParamSpec *pspec)
+{
+ g_warning("%s not implemented", __FUNCTION__);
+}
+
+SlEntityHandlerFile *
+sl_entity_handler_file_new (void)
+{
+ SlEntityHandlerFile *self = g_object_new (SL_ENTITY_HANDLER_FILE_TYPE, NULL);
+ return self;
+}
+
+gchar *
+sl_entity_handler_file_get(SlEntityHandlerFile *self, gchar *attrname)
+{
+ g_debug("file_get");
+ return NULL;
+}
+
+void
+sl_entity_handler_file_set(SlEntityHandlerFile *self, gchar *attrname,
+ gchar *value)
+{
+ g_debug("file_set");
+}
Added: trunk/libsoylent/sl-entity-handler-file.h
==============================================================================
--- (empty file)
+++ trunk/libsoylent/sl-entity-handler-file.h Wed Jul 9 13:55:36 2008
@@ -0,0 +1,45 @@
+/**/
+
+#ifndef SL_ENTITY_HANDLER_FILE_H
+#define SL_ENTITY_HANDLER_FILE_H
+
+#include <glib.h>
+#include <glib-object.h>
+
+#define SL_ENTITY_HANDLER_FILE_TYPE (sl_entity_handler_file_get_type \
+ ())
+#define SL_ENTITY_HANDLER_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST \
+ (obj, SL_ENTITY_HANDLER_FILE_TYPE, SlEntityHandlerFile))
+#define SL_ENTITY_HANDLER_FILE_CLASS(cls) (G_TYPE_CHECK_CLASS_CAST (cls, \
+ SL_ENTITY_HANDLER_FILE_TYPE, SlEntityHandlerFileClass))
+#define SL_IS_ENTITY_HANDLER_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE \
+ (obj, SL_ENTITY_HANDLER_FILE_TYPE))
+#define SL_IS_ENTITY_HANDLER_FILE_CLASS(cls) (G_TYPE_CHECK_CLASS_TYPE (cls, \
+ SL_ENTITY_HANDLER_FILE_TYPE))
+#define SL_ENTITY_HANDLER_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, \
+ SL_ENTITY_HANDLER_FILE_TYPE))
+
+typedef struct _SlEntityHandlerFile SlEntityHandlerFile;
+typedef struct _SlEntityHandlerFileClass SlEntityHandlerFileClass;
+typedef struct _SlEntityHandlerFilePriv SlEntityHandlerFilePriv;
+
+struct _SlEntityHandlerFile
+{
+ GObject parent;
+ gboolean disposed;
+ SlEntityHandlerFilePriv *priv;
+};
+
+struct _SlEntityHandlerFileClass
+{
+ GObjectClass parent;
+};
+
+GType sl_entity_handler_file_get_type (void);
+
+SlEntityHandlerFile *sl_entity_handler_file_new (void);
+gchar *sl_entity_handler_file_get(SlEntityHandlerFile *self, gchar *attrname);
+void sl_entity_handler_file_set(SlEntityHandlerFile *self, gchar *attrname,
+ gchar *value);
+
+#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]