soylent r208 - in branches/libsoylent_v0.1.0/libsoylent: . test



Author: svenp
Date: Sun Jul 13 15:28:51 2008
New Revision: 208
URL: http://svn.gnome.org/viewvc/soylent?rev=208&view=rev

Log:
merged with newest version of libsoylent

Added:
   branches/libsoylent_v0.1.0/libsoylent/AUTHORS
      - copied unchanged from r207, /trunk/libsoylent/AUTHORS
   branches/libsoylent_v0.1.0/libsoylent/COPYING
      - copied unchanged from r207, /trunk/libsoylent/COPYING
   branches/libsoylent_v0.1.0/libsoylent/MAINTAINERS
      - copied unchanged from r207, /trunk/libsoylent/MAINTAINERS
   branches/libsoylent_v0.1.0/libsoylent/NEWS
      - copied unchanged from r207, /trunk/libsoylent/NEWS
   branches/libsoylent_v0.1.0/libsoylent/README
      - copied unchanged from r207, /trunk/libsoylent/README
   branches/libsoylent_v0.1.0/libsoylent/blogdraft.txt
      - copied unchanged from r207, /trunk/libsoylent/blogdraft.txt
   branches/libsoylent_v0.1.0/libsoylent/header.txt
      - copied unchanged from r207, /trunk/libsoylent/header.txt
   branches/libsoylent_v0.1.0/libsoylent/newsdraft.txt
      - copied unchanged from r207, /trunk/libsoylent/newsdraft.txt
   branches/libsoylent_v0.1.0/libsoylent/sl-entity-handler-eds.c
      - copied unchanged from r207, /trunk/libsoylent/sl-entity-handler-eds.c
   branches/libsoylent_v0.1.0/libsoylent/sl-entity-handler-eds.h
      - copied unchanged from r207, /trunk/libsoylent/sl-entity-handler-eds.h
   branches/libsoylent_v0.1.0/libsoylent/sl-entity-handler-file.c
      - copied unchanged from r207, /trunk/libsoylent/sl-entity-handler-file.c
   branches/libsoylent_v0.1.0/libsoylent/sl-entity-handler-file.h
      - copied unchanged from r207, /trunk/libsoylent/sl-entity-handler-file.h
   branches/libsoylent_v0.1.0/libsoylent/sl-entity-handler.c
      - copied unchanged from r207, /trunk/libsoylent/sl-entity-handler.c
   branches/libsoylent_v0.1.0/libsoylent/sl-entity-handler.h
      - copied unchanged from r207, /trunk/libsoylent/sl-entity-handler.h
Modified:
   branches/libsoylent_v0.1.0/libsoylent/Makefile.am
   branches/libsoylent_v0.1.0/libsoylent/sl-book.c
   branches/libsoylent_v0.1.0/libsoylent/sl-book.h
   branches/libsoylent_v0.1.0/libsoylent/sl-entity.c
   branches/libsoylent_v0.1.0/libsoylent/sl-entity.h
   branches/libsoylent_v0.1.0/libsoylent/sl-group.c
   branches/libsoylent_v0.1.0/libsoylent/sl-group.h
   branches/libsoylent_v0.1.0/libsoylent/sl-person.c
   branches/libsoylent_v0.1.0/libsoylent/sl-person.h
   branches/libsoylent_v0.1.0/libsoylent/sl-priv-util.c
   branches/libsoylent_v0.1.0/libsoylent/sl-priv-util.h
   branches/libsoylent_v0.1.0/libsoylent/soylent.c
   branches/libsoylent_v0.1.0/libsoylent/soylent.h
   branches/libsoylent_v0.1.0/libsoylent/test/init.c
   branches/libsoylent_v0.1.0/libsoylent/test/test-book.c
   branches/libsoylent_v0.1.0/libsoylent/test/test-playground.c
   branches/libsoylent_v0.1.0/libsoylent/test/test.c
   branches/libsoylent_v0.1.0/libsoylent/test/test.h

Modified: branches/libsoylent_v0.1.0/libsoylent/Makefile.am
==============================================================================
--- branches/libsoylent_v0.1.0/libsoylent/Makefile.am	(original)
+++ branches/libsoylent_v0.1.0/libsoylent/Makefile.am	Sun Jul 13 15:28:51 2008
@@ -7,11 +7,17 @@
 libsoylent_la_SOURCES = \
 	soylent.h \
 	sl-entity.h \
+	sl-entity-handler.h \
+	sl-entity-handler-eds.h \
+	sl-entity-handler-file.h \
 	sl-book.h \
 	sl-group.h \
 	sl-person.h \
 	soylent.c \
 	sl-entity.c \
+	sl-entity-handler.c \
+	sl-entity-handler-eds.c \
+	sl-entity-handler-file.c \
 	sl-book.c \
 	sl-group.c \
 	sl-person.c \

Modified: branches/libsoylent_v0.1.0/libsoylent/sl-book.c
==============================================================================
--- branches/libsoylent_v0.1.0/libsoylent/sl-book.c	(original)
+++ branches/libsoylent_v0.1.0/libsoylent/sl-book.c	Sun Jul 13 15:28:51 2008
@@ -1,4 +1,25 @@
-/**/
+/*
+ * libsoylent - people management
+ * 
+ * Copyright (C) 2008 Sven Pfaller, Noya <kalterregen gmx net>
+ * Copyright (C) 2008 Travis Reitter <treitter-dev netdrain com>
+ * Copyright (C) 2008 Rob Taylor <rob taylor codethink co uk>
+ * Copyright (C) 2008 Chris Lord <chris o-hand com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
 
 #include "sl-book.h"
 #include "sl-priv-util.h"

Modified: branches/libsoylent_v0.1.0/libsoylent/sl-book.h
==============================================================================
--- branches/libsoylent_v0.1.0/libsoylent/sl-book.h	(original)
+++ branches/libsoylent_v0.1.0/libsoylent/sl-book.h	Sun Jul 13 15:28:51 2008
@@ -1,4 +1,25 @@
-/**/
+/*
+ * libsoylent - people management
+ * 
+ * Copyright (C) 2008 Sven Pfaller, Noya <kalterregen gmx net>
+ * Copyright (C) 2008 Travis Reitter <treitter-dev netdrain com>
+ * Copyright (C) 2008 Rob Taylor <rob taylor codethink co uk>
+ * Copyright (C) 2008 Chris Lord <chris o-hand com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
 
 #ifndef SL_BOOK_H
 #define SL_BOOK_H

Modified: branches/libsoylent_v0.1.0/libsoylent/sl-entity.c
==============================================================================
--- branches/libsoylent_v0.1.0/libsoylent/sl-entity.c	(original)
+++ branches/libsoylent_v0.1.0/libsoylent/sl-entity.c	Sun Jul 13 15:28:51 2008
@@ -1,4 +1,25 @@
-/**/
+/*
+ * libsoylent - people management
+ * 
+ * Copyright (C) 2008 Sven Pfaller, Noya <kalterregen gmx net>
+ * Copyright (C) 2008 Travis Reitter <treitter-dev netdrain com>
+ * Copyright (C) 2008 Rob Taylor <rob taylor codethink co uk>
+ * Copyright (C) 2008 Chris Lord <chris o-hand com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
 
 #include "sl-entity.h"
 
@@ -6,11 +27,28 @@
 
 struct _SlEntityPriv
 {
-	gchar *foo;
+  SlEntityHandler *entity_handler;
+  GList *attributes;
+};
+
+struct _SlAttributePriv
+{
+  SlEntity *entity;
+  gchar *name;
+  GList *values;
+};
+
+struct _SlAttributeHandler
+{
+  SlAttributeHandlerType type;
+  gpointer (*writer)(const gchar *attrname, gpointer value);
+  gpointer (*reader)(const gchar *attrname, gpointer value);
 };
 
 static GObjectClass *parent_class = NULL;
 
+static GObjectClass *attribute_parent_class = NULL;
+
 static void sl_entity_class_init (gpointer g_class, gpointer class_data);
 static void sl_entity_init (GTypeInstance *instance, gpointer g_class);
 static void sl_entity_dispose (GObject *object);
@@ -19,29 +57,76 @@
 static void sl_entity_get_property (GObject *object, guint property_id,
 	GValue *value, GParamSpec *pspec);
 
+static void sl_attribute_class_init (gpointer g_class, gpointer class_data);
+static void sl_attribute_init (GTypeInstance *instance, gpointer g_class);
+static void sl_attribute_dispose (GObject *object);
+static void sl_attribute_set_property (GObject *object, guint property_id,
+  const GValue *value, GParamSpec *pspec);
+static void sl_attribute_get_property (GObject *object, guint property_id,
+  GValue *value, GParamSpec *pspec);
+
 GType
 sl_entity_get_type (void)
 {
-	static GType type = 0;
-	static const GTypeInfo info =
+  static GType type = 0;
+  static const GTypeInfo info =
     {
-  		sizeof (SlEntityClass),
-  		NULL,
-  		NULL,
-  		sl_entity_class_init,
-  		NULL,
-  		NULL,
-  		sizeof (SlEntity),
-  		0,
-  		sl_entity_init,
-  		NULL
-	 };
-	
-	if (type == 0)
+      sizeof (SlEntityClass),
+      NULL,
+      NULL,
+      sl_entity_class_init,
+      NULL,
+      NULL,
+      sizeof (SlEntity),
+      0,
+      sl_entity_init,
+      NULL
+   };
+  
+  if (type == 0)
+    {
+      type = g_type_register_static(G_TYPE_OBJECT, "SlEntity", &info, 0);
+    }
+  return type;
+}
+
+GType
+sl_attribute_get_type (void)
+{
+  static GType type = 0;
+  static const GTypeInfo info =
+    {
+      sizeof (SlAttributeClass),
+      NULL,
+      NULL,
+      sl_attribute_class_init,
+      NULL,
+      NULL,
+      sizeof (SlAttribute),
+      0,
+      sl_attribute_init,
+      NULL
+   };
+  
+  if (type == 0)
     {
-		  type = g_type_register_static(G_TYPE_OBJECT, "SlEntity", &info, 0);
+      type = g_type_register_static(G_TYPE_OBJECT, "SlAttribute", &info, 0);
     }
-	return type;
+  return type;
+}
+
+void
+sl_entity_install_attribute_handler (const gchar *attrname,
+  SlAttributeHandlerType type, gpointer (*writer)(const gchar *attrname,
+   gpointer value), gpointer (*reader)(const gchar *attrname, gpointer value))
+{
+  g_warning ("%s not implemented", __FUNCTION__);
+}
+
+void
+sl_entity_remove_attribute_handler (const gchar *attrname)
+{
+  g_warning ("%s not implemented", __FUNCTION__);
 }
 
 static void
@@ -62,7 +147,7 @@
 	SlEntity *self = SL_ENTITY (instance);
 	SlEntityPriv *priv = g_new (SlEntityPriv, 1);
 	self->priv = priv;
-	self->priv->foo = "FOO";
+	self->priv->attributes = NULL;
 	self->disposed = FALSE;
 }
 
@@ -71,6 +156,7 @@
 	SlEntity *self = SL_ENTITY (object);
 	g_return_if_fail (!self->disposed);
 	
+  g_list_free (self->priv->attributes);
 	g_free (self->priv);
 	self->disposed = TRUE;
   
@@ -98,8 +184,206 @@
 	return entity;
 }
 
+SlEntityHandler *sl_entity_get_handler (SlEntity *self)
+{
+  return self->priv->entity_handler;
+}
+
+SlAttribute *sl_entity_get_attribute (SlEntity *self, gchar *attrname)
+{
+  /* TODO: use hashtable? I think yes... */
+  GList *iter = self->priv->attributes;
+  for (; iter != NULL; iter = iter->next)
+    {
+      SlAttribute *attr = iter->data;
+      if (g_str_equal (sl_attribute_get_name (attr), attrname))
+        {
+          return attr;
+        }
+    }
+  return NULL;
+}
+
+GList *sl_entity_get_attributes (SlEntity *self)
+{
+  g_warning("%s not implemented", __FUNCTION__);
+  return NULL;
+}
+
+void
+sl_entity_set (SlEntity *self, gchar *attrname, gpointer value)
+{
+  SlAttribute *attr = sl_entity_get_attribute (self, attrname);
+  if (!attr) return;
+  sl_attribute_set (attr, value);
+}
+
 gpointer
-sl_entity_get (SlEntity *self, const gchar *attrname)
+sl_entity_get (SlEntity *self, gchar *attrname)
+{
+  SlAttribute *attr = sl_entity_get_attribute (self, attrname);
+  if (!attr) return NULL;
+  return sl_attribute_get (attr);
+}
+
+void
+sl_entity_remove (SlEntity *self, gchar *attrname)
+{
+  g_warning("%s not implemented", __FUNCTION__);
+}
+
+void
+sl_entity_set_at (SlEntity *self, gchar *attrname, gint index, gpointer value)
+{
+  g_warning("%s not implemented", __FUNCTION__);
+}
+
+gpointer
+sl_entity_get_at (SlEntity *self, gchar *attrname, gint index)
+{
+  g_warning("%s not implemented", __FUNCTION__);
+  return NULL;
+}
+
+void
+sl_entity_remove_at (SlEntity *self, gchar *attrname, gint index)
+{
+  g_warning("%s not implemented", __FUNCTION__);
+}
+
+void
+sl_entity_set_values (SlEntity *self, gchar *attrname, GList *values)
+{
+  g_warning("%s not implemented", __FUNCTION__);
+}
+
+GList *
+sl_entity_get_values (SlEntity *self, gchar *attrname)
+{
+  g_warning("%s not implemented", __FUNCTION__);
+  return NULL;
+}
+
+void
+sl_entity_remove_values (SlEntity *self, gchar *attrname)
+{
+  g_warning("%s not implemented", __FUNCTION__);
+}
+
+static void
+sl_attribute_class_init (gpointer g_class, gpointer class_data)
+{
+  attribute_parent_class = g_type_class_peek (g_type_parent
+    (SL_ATTRIBUTE_TYPE));
+  g_assert (attribute_parent_class != NULL);
+  
+  GObjectClass *obj_class = G_OBJECT_CLASS (g_class);
+  obj_class->dispose = sl_attribute_dispose;
+  obj_class->get_property = sl_attribute_get_property;
+  obj_class->set_property = sl_attribute_set_property;
+}
+
+static void
+sl_attribute_init (GTypeInstance *instance, gpointer g_class)
+{
+  SlAttribute *self = SL_ATTRIBUTE (instance);
+  SlAttributePriv *priv = g_new (SlAttributePriv, 1);
+  self->priv = priv;
+  self->disposed = FALSE;
+}
+
+static void
+sl_attribute_dispose (GObject *object)
+{
+  SlAttribute *self = SL_ATTRIBUTE (object);
+  g_return_if_fail (!self->disposed);
+  
+  g_free (self->priv);
+  self->disposed = TRUE;
+  
+  attribute_parent_class->dispose (object);
+}
+
+static void
+sl_attribute_set_property (GObject *object, guint property_id,
+  const GValue *value, GParamSpec *pspec)
+{
+  g_warning("%s not implemented", __FUNCTION__);
+}
+
+static void
+sl_attribute_get_property (GObject *object, guint property_id,
+  GValue *value, GParamSpec *pspec)
+{
+  g_warning("%s not implemented", __FUNCTION__);
+}
+
+SlAttribute *
+sl_attribute_new (const gchar *name)
+{
+  /* TODO: add constr-param name and values */
+  SlAttribute *self = g_object_new (SL_ATTRIBUTE_TYPE, NULL);
+  return self;
+}
+
+void sl_attribute_set (SlAttribute *self, gpointer value)
+{
+  g_warning("%s not implemented", __FUNCTION__);
+}
+
+gpointer sl_attribute_get (SlAttribute *self)
+{
+  g_warning("%s not implemented", __FUNCTION__);
+  return NULL;
+}
+
+void sl_attribute_remove (SlAttribute *self)
+{
+  g_warning("%s not implemented", __FUNCTION__);
+}
+
+void sl_attribute_set_at (SlAttribute *self, gint index, gpointer value)
+{
+  /*SlEntityHandler *entity_handler = sl_entity_get_handler (self->priv->entity);
+   *sl_entity_handler_set_at (entity_handler, self->name, index, value);
+   * TODO: behind the scenes in EDS-handler:
+   * GList *values = vcard_attribute_get_values (attrname);
+   * for (... look for value
+   * modify value in list
+   * if direct list manipulation is not possible: set_at not possible at the
+   * moment */
+  g_warning("%s not implemented", __FUNCTION__);
+}
+
+gpointer sl_attribute_get_at (SlAttribute *self, gint index)
+{
+  g_warning("%s not implemented", __FUNCTION__);
+  return NULL;
+}
+
+void sl_attribute_remove_at (SlAttribute *self, gint index)
+{
+  g_warning("%s not implemented", __FUNCTION__);
+}
+
+void sl_attribute_set_values (SlAttribute *self, GList *values)
+{
+  g_warning("%s not implemented", __FUNCTION__);
+}
+
+GList *sl_attribute_get_values (SlAttribute *self)
+{
+  g_warning("%s not implemented", __FUNCTION__);
+  return NULL;
+}
+
+void sl_attribute_remove_values (SlAttribute *self)
+{
+  g_warning("%s not implemented", __FUNCTION__);
+}
+
+const gchar *sl_attribute_get_name (SlAttribute *self)
 {
-	return self->priv->foo;
+  g_warning("%s not implemented", __FUNCTION__);
+  return NULL;
 }

Modified: branches/libsoylent_v0.1.0/libsoylent/sl-entity.h
==============================================================================
--- branches/libsoylent_v0.1.0/libsoylent/sl-entity.h	(original)
+++ branches/libsoylent_v0.1.0/libsoylent/sl-entity.h	Sun Jul 13 15:28:51 2008
@@ -1,41 +1,133 @@
-/**/
+/*
+ * libsoylent - people management
+ * 
+ * Copyright (C) 2008 Sven Pfaller, Noya <kalterregen gmx net>
+ * Copyright (C) 2008 Travis Reitter <treitter-dev netdrain com>
+ * Copyright (C) 2008 Rob Taylor <rob taylor codethink co uk>
+ * Copyright (C) 2008 Chris Lord <chris o-hand com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
 
 #ifndef SL_ENTITY_H
 #define SL_ENTITY_H
 
+#include "sl-entity-handler.h"
+
 #include <glib.h>
 #include <glib-object.h>
 
 #define SL_ENTITY_TYPE			 	    (sl_entity_get_type ())
-#define SL_ENTITY(obj)				    (G_TYPE_CHECK_INSTANCE_CAST(obj, \
+#define SL_ENTITY(obj)				    (G_TYPE_CHECK_INSTANCE_CAST (obj, \
 	SL_ENTITY_TYPE, SlEntity))
-#define SL_ENTITY_CLASS(cls)		  (G_TYPE_CHECK_CLASS_CAST(cls, \
+#define SL_ENTITY_CLASS(cls)		  (G_TYPE_CHECK_CLASS_CAST (cls, \
 	SL_ENTITY_TYPE, SlEntityClass))
-#define SL_IS_ENTITY(obj)         (G_TYPE_CHECK_INSTANCE_TYPE(obj, \
+#define SL_IS_ENTITY(obj)         (G_TYPE_CHECK_INSTANCE_TYPE (obj, \
 	SL_ENTITY_TYPE))
-#define SL_IS_ENTITY_CLASS(cls)	  (G_TYPE_CHECK_CLASS_TYPE(cls, SL_ENTITY_TYPE))
+#define SL_IS_ENTITY_CLASS(cls)	  (G_TYPE_CHECK_CLASS_TYPE (cls, \
+  SL_ENTITY_TYPE))
 #define SL_ENTITY_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS(obj, \
 	SL_ENTITY_TYPE))
 
+#define SL_ATTRIBUTE_TYPE           (sl_attribute_get_type ())
+#define SL_ATTRIBUTE(obj)           (G_TYPE_CHECK_INSTANCE_CAST (obj, \
+  SL_ATTRIBUTE_TYPE, SlAttribute))
+#define SL_ATTRIBUTE_CLASS(cls)     (G_TYPE_CHECK_CLASS_CAST (cls, \
+  SL_ATTRIBUTE_TYPE, SlAttributeClass))
+#define SL_IS_ATTRIBUTE(obj)        (G_TYPE_CHECK_INSTANCE_TYPE (obj, \
+  SL_ATTRIBUTE_TYPE))
+#define SL_IS_ATTRIBUTE_CLASS(cls)  (G_TYPE_CHECK_CLASS_TYPE (cls, \
+  SL_ATTRIBUTE_TYPE))
+#define SL_ATTRIBUTE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, \
+  SL_ATTRIBUTE_TYPE))
+
 typedef struct _SlEntity      SlEntity;
 typedef struct _SlEntityClass SlEntityClass;
 typedef struct _SlEntityPriv  SlEntityPriv;
 
+typedef struct _SlAttribute      SlAttribute;
+typedef struct _SlAttributeClass SlAttributeClass;
+typedef struct _SlAttributePriv  SlAttributePriv;
+
+typedef struct _SlAttributeHandler SlAttributeHandler;
+
+typedef enum _SlAttributeHandlerType SlAttributeHandlerType;
+
+enum _SlAttributeHandlerType
+{
+  SL_ATTRIBUTE_HANDLER_TYPE_STRING,
+  SL_ATTRIBUTE_HANDLER_TYPE_BIN
+};
+
 struct _SlEntity
 {
-	GObject parent;
-	gboolean disposed;
-	SlEntityPriv *priv;
+  GObject parent;
+  gboolean disposed;
+  SlEntityPriv *priv;
 };
 
 struct _SlEntityClass
 {
-	GObjectClass parent;
+  GObjectClass parent;
+};
+
+struct _SlAttribute
+{
+  GObject parent;
+  gboolean disposed;
+  SlAttributePriv *priv;
+};
+
+struct _SlAttributeClass
+{
+  GObjectClass parent;
 };
 
 GType sl_entity_get_type (void);
+GType sl_attribute_get_type (void);
+
+void sl_entity_install_attribute_handler (const gchar *attrname, SlAttributeHandlerType type, gpointer (*writer)(const gchar *attrname, gpointer value), gpointer (*reader)(const gchar *attrname, gpointer value));
+void sl_entity_remove_attribute_handler (const gchar *attrname);
 
 SlEntity *sl_entity_new (void);
-gpointer sl_entity_get (SlEntity *self, const gchar *attrname);
+SlEntityHandler *sl_entity_get_handler (SlEntity *self);
+SlAttribute *sl_entity_get_attribute (SlEntity *self, gchar *attrname);
+GList *sl_entity_get_attributes (SlEntity *self);
+
+void sl_entity_set (SlEntity *self, gchar *attrname, gpointer value);
+gpointer sl_entity_get (SlEntity *self, gchar *attrname);
+void sl_entity_remove (SlEntity *self, gchar *attrname);
+void sl_entity_set_at (SlEntity *self, gchar *attrname, gint index, gpointer value);
+gpointer sl_entity_get_at (SlEntity *self, gchar *attrname, gint index);
+void sl_entity_remove_at (SlEntity *self, gchar *attrname, gint index);
+void sl_entity_set_values (SlEntity *self, gchar *attrname, GList *values);
+GList *sl_entity_get_values (SlEntity *self, gchar *attrname);
+void sl_entity_remove_values (SlEntity *self, gchar *attrname);
+/* TODO: perhaps gboolean instead of void to indicate that an attrname doesn't
+ * exist */
+
+SlAttribute *sl_attribute_new (const gchar *name);
+void sl_attribute_set (SlAttribute *self, gpointer value);
+gpointer sl_attribute_get (SlAttribute *self);
+void sl_attribute_remove (SlAttribute *self);
+void sl_attribute_set_at (SlAttribute *self, gint index, gpointer value);
+gpointer sl_attribute_get_at (SlAttribute *self, gint index);
+void sl_attribute_remove_at (SlAttribute *self, gint index);
+void sl_attribute_set_values (SlAttribute *self, GList *values);
+GList *sl_attribute_get_values (SlAttribute *self);
+void sl_attribute_remove_values (SlAttribute *self);
+const gchar *sl_attribute_get_name (SlAttribute *self);
 
 #endif

Modified: branches/libsoylent_v0.1.0/libsoylent/sl-group.c
==============================================================================
--- branches/libsoylent_v0.1.0/libsoylent/sl-group.c	(original)
+++ branches/libsoylent_v0.1.0/libsoylent/sl-group.c	Sun Jul 13 15:28:51 2008
@@ -1,4 +1,25 @@
-/**/
+/*
+ * libsoylent - people management
+ * 
+ * Copyright (C) 2008 Sven Pfaller, Noya <kalterregen gmx net>
+ * Copyright (C) 2008 Travis Reitter <treitter-dev netdrain com>
+ * Copyright (C) 2008 Rob Taylor <rob taylor codethink co uk>
+ * Copyright (C) 2008 Chris Lord <chris o-hand com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
 
 #include "sl-group.h"
 
@@ -9,7 +30,7 @@
   gpointer foo;
 };
 
-GObjectClass *parent_class = NULL;
+static GObjectClass *parent_class = NULL;
 
 static void sl_group_class_init (gpointer g_class, gpointer class_data);
 static void sl_group_init (GTypeInstance *instance, gpointer g_class);

Modified: branches/libsoylent_v0.1.0/libsoylent/sl-group.h
==============================================================================
--- branches/libsoylent_v0.1.0/libsoylent/sl-group.h	(original)
+++ branches/libsoylent_v0.1.0/libsoylent/sl-group.h	Sun Jul 13 15:28:51 2008
@@ -1,4 +1,25 @@
-/**/
+/*
+ * libsoylent - people management
+ * 
+ * Copyright (C) 2008 Sven Pfaller, Noya <kalterregen gmx net>
+ * Copyright (C) 2008 Travis Reitter <treitter-dev netdrain com>
+ * Copyright (C) 2008 Rob Taylor <rob taylor codethink co uk>
+ * Copyright (C) 2008 Chris Lord <chris o-hand com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
 
 #ifndef SL_GROUP_H
 #define SL_GROUP_H
@@ -9,13 +30,14 @@
 #include <glib-object.h>
 
 #define SL_GROUP_TYPE           (sl_group_get_type ())
-#define SL_GROUP(obj)           (G_TYPE_CHECK_INSTANCE_CAST(obj, \
+#define SL_GROUP(obj)           (G_TYPE_CHECK_INSTANCE_CAST (obj, \
   SL_GROUP_TYPE, SlGroup))
-#define SL_GROUP_CLASS(cls)     (G_TPYE_CHECK_CLASS_CAST(cls, SL_GROUP_TYPE, \
+#define SL_GROUP_CLASS(cls)     (G_TPYE_CHECK_CLASS_CAST (cls, SL_GROUP_TYPE, \
   SlGroupClass))
-#define SL_IS_GROUP(obj)        (G_TYPE_CHECK_INSTANCE_TYPE(obj, SL_GROUP_TYPE))
-#define SL_IS_GROUP_CLASS(cls)  (G_TYPE_CHECK_CLASS_TYPE(cls, SL_GROUP_TYPE))
-#define SL_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS(obj, SL_GROUP_TYPE))
+#define SL_IS_GROUP(obj)        (G_TYPE_CHECK_INSTANCE_TYPE (obj, \
+  SL_GROUP_TYPE))
+#define SL_IS_GROUP_CLASS(cls)  (G_TYPE_CHECK_CLASS_TYPE (cls, SL_GROUP_TYPE))
+#define SL_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS (obj, SL_GROUP_TYPE))
 
 typedef struct _SlGroup       SlGroup;
 typedef struct _SlGroupClass  SlGroupClass;

Modified: branches/libsoylent_v0.1.0/libsoylent/sl-person.c
==============================================================================
--- branches/libsoylent_v0.1.0/libsoylent/sl-person.c	(original)
+++ branches/libsoylent_v0.1.0/libsoylent/sl-person.c	Sun Jul 13 15:28:51 2008
@@ -1,11 +1,118 @@
-//
+/*
+ * libsoylent - people management
+ * 
+ * Copyright (C) 2008 Sven Pfaller, Noya <kalterregen gmx net>
+ * Copyright (C) 2008 Travis Reitter <treitter-dev netdrain com>
+ * Copyright (C) 2008 Rob Taylor <rob taylor codethink co uk>
+ * Copyright (C) 2008 Chris Lord <chris o-hand com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
 
 #include "sl-person.h"
 
-gint
-sl_person_foo (const gchar *bar)
+/* private structs and fields */
+
+struct _SlPersonPriv
+{
+};
+
+static GObjectClass *parent_class = NULL;
+
+static void sl_person_class_init (gpointer g_class, gpointer class_data);
+static void sl_person_init (GTypeInstance *instance, gpointer g_class);
+static void sl_person_dispose (GObject *object);
+static void sl_person_get_property (GObject *object, guint property_id,
+  GValue *value, GParamSpec *pspec);
+static void sl_person_set_property (GObject *object, guint property_id,
+  const GValue *value, GParamSpec *pspec);
+
+GType
+sl_person_get_type (void)
+{
+  static GType type = 0;
+  static const GTypeInfo info =
+    {
+      sizeof (SlPersonClass),
+      NULL,
+      NULL,
+      sl_person_class_init,
+      NULL,
+      NULL,
+      sizeof (SlPerson),
+      0,
+      sl_person_init,
+      NULL
+    };
+  
+  if (type == 0)
+    {
+      type = g_type_register_static (SL_ENTITY_TYPE, "SlPerson", &info, 0);
+    }
+  return type;
+}
+
+static void
+sl_person_class_init (gpointer g_class, gpointer class_data)
+{
+  parent_class = g_type_class_peek (g_type_parent (SL_PERSON_TYPE));
+  g_assert (parent_class != NULL);
+  
+  GObjectClass *obj_class = G_OBJECT_CLASS (g_class);
+  obj_class->dispose = sl_person_dispose;
+  obj_class->get_property = sl_person_get_property;
+  obj_class->set_property = sl_person_set_property;
+}
+
+static void
+sl_person_init (GTypeInstance *instance, gpointer g_class)
+{
+  SlPerson *self = SL_PERSON (instance);
+  SlPersonPriv *priv = g_new (SlPersonPriv, 1);
+  self->priv = priv;
+  SL_ENTITY (self)->disposed = FALSE;
+}
+
+static void
+sl_person_dispose (GObject *object)
+{
+  SlPerson *self = SL_PERSON (object);
+  g_return_if_fail (!SL_ENTITY (self)->disposed);
+  
+  g_free (self->priv);
+  
+  parent_class->dispose (object);
+}
+
+static void
+sl_person_get_property (GObject *object, guint property_id, GValue *value,
+  GParamSpec *pspec)
+{
+  g_warning("%s not implemented", __FUNCTION__);
+}
+
+static void
+sl_person_set_property (GObject *object, guint property_id, const GValue *value,
+  GParamSpec *pspec)
+{
+  g_warning("%s not implemented", __FUNCTION__);
+}
+
+SlPerson *
+sl_person_new (void)
 {
-	g_return_val_if_fail (bar != NULL, -1);
-	
-	return g_str_hash (bar);
+  SlPerson *self = g_object_new (SL_PERSON_TYPE, NULL);
+  return self;
 }

Modified: branches/libsoylent_v0.1.0/libsoylent/sl-person.h
==============================================================================
--- branches/libsoylent_v0.1.0/libsoylent/sl-person.h	(original)
+++ branches/libsoylent_v0.1.0/libsoylent/sl-person.h	Sun Jul 13 15:28:51 2008
@@ -1,11 +1,63 @@
-//
+/*
+ * libsoylent - people management
+ * 
+ * Copyright (C) 2008 Sven Pfaller, Noya <kalterregen gmx net>
+ * Copyright (C) 2008 Travis Reitter <treitter-dev netdrain com>
+ * Copyright (C) 2008 Rob Taylor <rob taylor codethink co uk>
+ * Copyright (C) 2008 Chris Lord <chris o-hand com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
 
 #ifndef SL_PERSON_H
 #define SL_PERSON_H
 
+#include "sl-entity.h"
+
 #include <glib.h>
 #include <glib-object.h>
 
-gint sl_person_foo (const gchar *bar);
+#define SL_PERSON_TYPE            (sl_person_get_type ())
+#define SL_PERSON(obj)            (G_TYPE_CHECK_INSTANCE_CAST (obj, \
+  SL_PERSON_TYPE, SlPerson))
+#define SL_PERSON_CLASS(cls)      (G_TPYE_CHECK_CLASS_CAST (cls, \
+  SL_PERSON_TYPE, SlPersonClass))
+#define SL_IS_PERSON(obj)         (G_TYPE_CHECK_INSTANCE_TYPE (obj, \
+  SL_PERSON_TYPE))
+#define SL_IS_PERSON_CLASS(cls)   (G_TYPE_CHECK_CLASS_TYPE (cls, \
+  SL_PERSON_TYPE))
+#define SL_PERSON_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS (obj, \
+  SL_PERSON_TYPE))
+
+typedef struct _SlPerson      SlPerson;
+typedef struct _SlPersonClass SlPersonClass;
+typedef struct _SlPersonPriv  SlPersonPriv;
+
+struct _SlPerson
+{
+  SlEntity parent;
+  SlPersonPriv *priv;
+};
+
+struct _SlPersonClass
+{
+  SlEntityClass parent;
+};
+
+GType sl_person_get_type (void);
+
+SlPerson *sl_person_new (void);
 
 #endif

Modified: branches/libsoylent_v0.1.0/libsoylent/sl-priv-util.c
==============================================================================
--- branches/libsoylent_v0.1.0/libsoylent/sl-priv-util.c	(original)
+++ branches/libsoylent_v0.1.0/libsoylent/sl-priv-util.c	Sun Jul 13 15:28:51 2008
@@ -1,4 +1,25 @@
-/**/
+/*
+ * libsoylent - people management
+ * 
+ * Copyright (C) 2008 Sven Pfaller, Noya <kalterregen gmx net>
+ * Copyright (C) 2008 Travis Reitter <treitter-dev netdrain com>
+ * Copyright (C) 2008 Rob Taylor <rob taylor codethink co uk>
+ * Copyright (C) 2008 Chris Lord <chris o-hand com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
 
 #include "sl-priv-util.h"
 

Modified: branches/libsoylent_v0.1.0/libsoylent/sl-priv-util.h
==============================================================================
--- branches/libsoylent_v0.1.0/libsoylent/sl-priv-util.h	(original)
+++ branches/libsoylent_v0.1.0/libsoylent/sl-priv-util.h	Sun Jul 13 15:28:51 2008
@@ -1,4 +1,25 @@
-/**/
+/*
+ * libsoylent - people management
+ * 
+ * Copyright (C) 2008 Sven Pfaller, Noya <kalterregen gmx net>
+ * Copyright (C) 2008 Travis Reitter <treitter-dev netdrain com>
+ * Copyright (C) 2008 Rob Taylor <rob taylor codethink co uk>
+ * Copyright (C) 2008 Chris Lord <chris o-hand com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
 
 #ifndef SL_PRIVUTIL_H
 #define SL_PRIVUTIL_H

Modified: branches/libsoylent_v0.1.0/libsoylent/soylent.c
==============================================================================
--- branches/libsoylent_v0.1.0/libsoylent/soylent.c	(original)
+++ branches/libsoylent_v0.1.0/libsoylent/soylent.c	Sun Jul 13 15:28:51 2008
@@ -1,4 +1,25 @@
-/**/
+/*
+ * libsoylent - people management
+ * 
+ * Copyright (C) 2008 Sven Pfaller, Noya <kalterregen gmx net>
+ * Copyright (C) 2008 Travis Reitter <treitter-dev netdrain com>
+ * Copyright (C) 2008 Rob Taylor <rob taylor codethink co uk>
+ * Copyright (C) 2008 Chris Lord <chris o-hand com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
 
 #include "config.h"
 #include "soylent.h"

Modified: branches/libsoylent_v0.1.0/libsoylent/soylent.h
==============================================================================
--- branches/libsoylent_v0.1.0/libsoylent/soylent.h	(original)
+++ branches/libsoylent_v0.1.0/libsoylent/soylent.h	Sun Jul 13 15:28:51 2008
@@ -1,10 +1,35 @@
-/**/
+/*
+ * libsoylent - people management
+ * 
+ * Copyright (C) 2008 Sven Pfaller, Noya <kalterregen gmx net>
+ * Copyright (C) 2008 Travis Reitter <treitter-dev netdrain com>
+ * Copyright (C) 2008 Rob Taylor <rob taylor codethink co uk>
+ * Copyright (C) 2008 Chris Lord <chris o-hand com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
 
 #ifndef SOYLENT_H
 #define SOYLENT_H
 
 #include "sl-entity.h"
+#include "sl-entity-handler.h"
+#include "sl-entity-handler-eds.h"
+#include "sl-entity-handler-file.h"
 #include "sl-person.h"
+#include "sl-group.h"
 #include "sl-book.h"
 
 void sl_init (void);

Modified: branches/libsoylent_v0.1.0/libsoylent/test/init.c
==============================================================================
--- branches/libsoylent_v0.1.0/libsoylent/test/init.c	(original)
+++ branches/libsoylent_v0.1.0/libsoylent/test/init.c	Sun Jul 13 15:28:51 2008
@@ -1,4 +1,25 @@
-/**/
+/*
+ * libsoylent - people management
+ * 
+ * Copyright (C) 2008 Sven Pfaller, Noya <kalterregen gmx net>
+ * Copyright (C) 2008 Travis Reitter <treitter-dev netdrain com>
+ * Copyright (C) 2008 Rob Taylor <rob taylor codethink co uk>
+ * Copyright (C) 2008 Chris Lord <chris o-hand com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
 
 #include "test.h"
 

Modified: branches/libsoylent_v0.1.0/libsoylent/test/test-book.c
==============================================================================
--- branches/libsoylent_v0.1.0/libsoylent/test/test-book.c	(original)
+++ branches/libsoylent_v0.1.0/libsoylent/test/test-book.c	Sun Jul 13 15:28:51 2008
@@ -1,4 +1,25 @@
-/**/
+/*
+ * libsoylent - people management
+ * 
+ * Copyright (C) 2008 Sven Pfaller, Noya <kalterregen gmx net>
+ * Copyright (C) 2008 Travis Reitter <treitter-dev netdrain com>
+ * Copyright (C) 2008 Rob Taylor <rob taylor codethink co uk>
+ * Copyright (C) 2008 Chris Lord <chris o-hand com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
 
 #include "test.h"
 
@@ -9,6 +30,10 @@
   
   test_init ("Book");
   
+  /* workaround: creating books twice will damage database, so wait with the
+   * test until sl_book_delete works */
+  test_success ();
+  
   sl_book_get_books ();
   
   test_print ("creating addressbook krank\n");

Modified: branches/libsoylent_v0.1.0/libsoylent/test/test-playground.c
==============================================================================
--- branches/libsoylent_v0.1.0/libsoylent/test/test-playground.c	(original)
+++ branches/libsoylent_v0.1.0/libsoylent/test/test-playground.c	Sun Jul 13 15:28:51 2008
@@ -1,4 +1,25 @@
-/**/
+/*
+ * libsoylent - people management
+ * 
+ * Copyright (C) 2008 Sven Pfaller, Noya <kalterregen gmx net>
+ * Copyright (C) 2008 Travis Reitter <treitter-dev netdrain com>
+ * Copyright (C) 2008 Rob Taylor <rob taylor codethink co uk>
+ * Copyright (C) 2008 Chris Lord <chris o-hand com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
 
 #include "test.h"
 
@@ -11,7 +32,11 @@
   
   test_print ("foo\n");
   SlEntity *entity = sl_entity_new ();
-  g_print ("%s\n", (gchar *) sl_entity_get (entity, "x"));
+  test_print ("%s\n", (gchar *) sl_entity_get (entity, "x"));
+  
+  SlEntityHandlerEDS *entity_handler = sl_entity_handler_eds_new ();
+  sl_entity_handler_eds_get (entity_handler, "foo");
+  sl_entity_handler_get (SL_ENTITY_HANDLER (entity_handler), "foo");
   
   test_success ();
 }

Modified: branches/libsoylent_v0.1.0/libsoylent/test/test.c
==============================================================================
--- branches/libsoylent_v0.1.0/libsoylent/test/test.c	(original)
+++ branches/libsoylent_v0.1.0/libsoylent/test/test.c	Sun Jul 13 15:28:51 2008
@@ -1,4 +1,25 @@
-/**/
+/*
+ * libsoylent - people management
+ * 
+ * Copyright (C) 2008 Sven Pfaller, Noya <kalterregen gmx net>
+ * Copyright (C) 2008 Travis Reitter <treitter-dev netdrain com>
+ * Copyright (C) 2008 Rob Taylor <rob taylor codethink co uk>
+ * Copyright (C) 2008 Chris Lord <chris o-hand com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
 
 #include "config.h"
 #include "test.h"

Modified: branches/libsoylent_v0.1.0/libsoylent/test/test.h
==============================================================================
--- branches/libsoylent_v0.1.0/libsoylent/test/test.h	(original)
+++ branches/libsoylent_v0.1.0/libsoylent/test/test.h	Sun Jul 13 15:28:51 2008
@@ -1,4 +1,25 @@
-/**/
+/*
+ * libsoylent - people management
+ * 
+ * Copyright (C) 2008 Sven Pfaller, Noya <kalterregen gmx net>
+ * Copyright (C) 2008 Travis Reitter <treitter-dev netdrain com>
+ * Copyright (C) 2008 Rob Taylor <rob taylor codethink co uk>
+ * Copyright (C) 2008 Chris Lord <chris o-hand com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
 
 #ifndef TEST_H
 #define TEST_H
@@ -7,6 +28,7 @@
 #include <stdlib.h>
 #include <libsoylent/soylent.h>
 
+/* TODO: would this work without multiple g_prints? */
 #define test_init(name) test_name = name; \
                         g_print ("running test %s...\n", test_name)
 #define test_success()  g_print ("test %s succeded\n", test_name); \



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]