[libdmapsharing] Add C files that are generated by Vala to Git for now Signed-off-by: W. Michael Petullo <mike flyn o



commit 680eb8473e17707be3a6140c2b11593628225705
Author: W. Michael Petullo <mike flyn org>
Date:   Thu Jan 27 08:29:34 2011 -0600

    Add C files that are generated by Vala to Git for now
    Signed-off-by: W. Michael Petullo <mike flyn org>

 tests/dacplisten.c             |  377 ++++++++++++++++++++++
 tests/dmapcopy.c               |  438 ++++++++++++++++++++++++++
 tests/dmapserve.c              |  383 +++++++++++++++++++++++
 tests/dpapview.c               |  541 ++++++++++++++++++++++++++++++++
 tests/vala-dmap-container-db.c |  179 +++++++++++
 tests/vala-dpap-record.c       |  672 ++++++++++++++++++++++++++++++++++++++++
 6 files changed, 2590 insertions(+), 0 deletions(-)
---
diff --git a/tests/dacplisten.c b/tests/dacplisten.c
new file mode 100644
index 0000000..c1b285b
--- /dev/null
+++ b/tests/dacplisten.c
@@ -0,0 +1,377 @@
+/* dacplisten.c generated by valac 0.11.4, the Vala compiler
+ * generated from dacplisten.vala, do not modify */
+
+/*   FILE: dacplisten.vala -- Listen to DACP remotes
+ * AUTHOR: W. Michael Petullo <mike flyn org>
+ *   DATE: 06 January 2011 
+ *
+ * Copyright (c) 2011 W. Michael Petullo <new flyn org>
+ * All rights reserved.
+ *
+ * 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 <glib.h>
+#include <glib-object.h>
+#include <libdmapsharing/dmap.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+#define TYPE_VALA_DACP_PLAYER (vala_dacp_player_get_type ())
+#define VALA_DACP_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DACP_PLAYER, ValaDACPPlayer))
+#define VALA_DACP_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DACP_PLAYER, ValaDACPPlayerClass))
+#define IS_VALA_DACP_PLAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DACP_PLAYER))
+#define IS_VALA_DACP_PLAYER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DACP_PLAYER))
+#define VALA_DACP_PLAYER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DACP_PLAYER, ValaDACPPlayerClass))
+
+typedef struct _ValaDACPPlayer ValaDACPPlayer;
+typedef struct _ValaDACPPlayerClass ValaDACPPlayerClass;
+typedef struct _ValaDACPPlayerPrivate ValaDACPPlayerPrivate;
+
+#define TYPE_DACP_LISTENER (dacp_listener_get_type ())
+#define DACP_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DACP_LISTENER, DACPListener))
+#define DACP_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DACP_LISTENER, DACPListenerClass))
+#define IS_DACP_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DACP_LISTENER))
+#define IS_DACP_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DACP_LISTENER))
+#define DACP_LISTENER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DACP_LISTENER, DACPListenerClass))
+
+typedef struct _DACPListener DACPListener;
+typedef struct _DACPListenerClass DACPListenerClass;
+typedef struct _DACPListenerPrivate DACPListenerPrivate;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+
+#define TYPE_VALA_DMAP_DB (vala_dmap_db_get_type ())
+#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDb))
+#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+#define IS_VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_DB))
+#define IS_VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_DB))
+#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+
+typedef struct _ValaDMAPDb ValaDMAPDb;
+typedef struct _ValaDMAPDbClass ValaDMAPDbClass;
+
+#define TYPE_VALA_DMAP_CONTAINER_DB (vala_dmap_container_db_get_type ())
+#define VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDb))
+#define VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbClass))
+#define IS_VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_CONTAINER_DB))
+#define IS_VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_CONTAINER_DB))
+#define VALA_DMAP_CONTAINER_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbClass))
+
+typedef struct _ValaDMAPContainerDb ValaDMAPContainerDb;
+typedef struct _ValaDMAPContainerDbClass ValaDMAPContainerDbClass;
+#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
+
+struct _ValaDACPPlayer {
+	GObject parent_instance;
+	ValaDACPPlayerPrivate * priv;
+};
+
+struct _ValaDACPPlayerClass {
+	GObjectClass parent_class;
+};
+
+struct _DACPListener {
+	GObject parent_instance;
+	DACPListenerPrivate * priv;
+};
+
+struct _DACPListenerClass {
+	GObjectClass parent_class;
+};
+
+struct _DACPListenerPrivate {
+	DMAPDb* db;
+	DMAPContainerDb* container_db;
+	DACPPlayer* player;
+	DACPShare* share;
+};
+
+
+static gpointer vala_dacp_player_parent_class = NULL;
+static DACPPlayerIface* vala_dacp_player_dacp_player_parent_iface = NULL;
+static gpointer dacp_listener_parent_class = NULL;
+
+GType vala_dacp_player_get_type (void) G_GNUC_CONST;
+enum  {
+	VALA_DACP_PLAYER_DUMMY_PROPERTY
+};
+static DAAPRecord* vala_dacp_player_real_now_playing_record (DACPPlayer* base);
+static guchar* vala_dacp_player_real_now_playing_artwork (DACPPlayer* base, guint width, guint heigth, int* result_length1);
+static void vala_dacp_player_real_play_pause (DACPPlayer* base);
+static void vala_dacp_player_real_pause (DACPPlayer* base);
+static void vala_dacp_player_real_next_item (DACPPlayer* base);
+static void vala_dacp_player_real_prev_item (DACPPlayer* base);
+static void vala_dacp_player_real_cue_clear (DACPPlayer* base);
+static void vala_dacp_player_real_cue_play (DACPPlayer* base, GList* records, guint index);
+ValaDACPPlayer* vala_dacp_player_new (void);
+ValaDACPPlayer* vala_dacp_player_construct (GType object_type);
+GType dacp_listener_get_type (void) G_GNUC_CONST;
+#define DACP_LISTENER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DACP_LISTENER, DACPListenerPrivate))
+enum  {
+	DACP_LISTENER_DUMMY_PROPERTY
+};
+DACPListener* dacp_listener_new (void);
+DACPListener* dacp_listener_construct (GType object_type);
+ValaDMAPDb* vala_dmap_db_new (void);
+ValaDMAPDb* vala_dmap_db_construct (GType object_type);
+GType vala_dmap_db_get_type (void) G_GNUC_CONST;
+ValaDMAPContainerDb* vala_dmap_container_db_new (void);
+ValaDMAPContainerDb* vala_dmap_container_db_construct (GType object_type);
+GType vala_dmap_container_db_get_type (void) G_GNUC_CONST;
+static void _lambda0_ (const gchar* service_name, const gchar* display_name, DACPListener* self);
+static void __lambda0__dacp_share_remote_found (DACPShare* _sender, const gchar* service_name, const gchar* remote_name, gpointer self);
+static void _lambda1_ (const gchar* guid, DACPListener* self);
+static void __lambda1__dacp_share_add_guid (DACPShare* _sender, const gchar* guid, gpointer self);
+static void dacp_listener_finalize (GObject* obj);
+gint _vala_main (gchar** args, int args_length1);
+
+
+static DAAPRecord* vala_dacp_player_real_now_playing_record (DACPPlayer* base) {
+	ValaDACPPlayer * self;
+	DAAPRecord* result = NULL;
+	self = (ValaDACPPlayer*) base;
+	fprintf (stdout, "Now playing record request received\n");
+	result = NULL;
+	return result;
+}
+
+
+static guchar* vala_dacp_player_real_now_playing_artwork (DACPPlayer* base, guint width, guint heigth, int* result_length1) {
+	ValaDACPPlayer * self;
+	guchar* result = NULL;
+	gpointer _tmp0_;
+	self = (ValaDACPPlayer*) base;
+	fprintf (stdout, "Now playing artwork request received\n");
+	_tmp0_ = NULL;
+	*result_length1 = 0;
+	result = _tmp0_;
+	return result;
+}
+
+
+static void vala_dacp_player_real_play_pause (DACPPlayer* base) {
+	ValaDACPPlayer * self;
+	self = (ValaDACPPlayer*) base;
+	fprintf (stdout, "Play/pause request received\n");
+}
+
+
+static void vala_dacp_player_real_pause (DACPPlayer* base) {
+	ValaDACPPlayer * self;
+	self = (ValaDACPPlayer*) base;
+	fprintf (stdout, "Pause request received\n");
+}
+
+
+static void vala_dacp_player_real_next_item (DACPPlayer* base) {
+	ValaDACPPlayer * self;
+	self = (ValaDACPPlayer*) base;
+	fprintf (stdout, "Next item request received\n");
+}
+
+
+static void vala_dacp_player_real_prev_item (DACPPlayer* base) {
+	ValaDACPPlayer * self;
+	self = (ValaDACPPlayer*) base;
+	fprintf (stdout, "Previous item request received\n");
+}
+
+
+static void vala_dacp_player_real_cue_clear (DACPPlayer* base) {
+	ValaDACPPlayer * self;
+	self = (ValaDACPPlayer*) base;
+	fprintf (stdout, "Cue clear request received\n");
+}
+
+
+static void vala_dacp_player_real_cue_play (DACPPlayer* base, GList* records, guint index) {
+	ValaDACPPlayer * self;
+	self = (ValaDACPPlayer*) base;
+	fprintf (stdout, "Cue play request received\n");
+}
+
+
+ValaDACPPlayer* vala_dacp_player_construct (GType object_type) {
+	ValaDACPPlayer * self = NULL;
+	self = (ValaDACPPlayer*) g_object_new (object_type, NULL);
+	return self;
+}
+
+
+ValaDACPPlayer* vala_dacp_player_new (void) {
+	return vala_dacp_player_construct (TYPE_VALA_DACP_PLAYER);
+}
+
+
+static void vala_dacp_player_class_init (ValaDACPPlayerClass * klass) {
+	vala_dacp_player_parent_class = g_type_class_peek_parent (klass);
+}
+
+
+static void vala_dacp_player_dacp_player_interface_init (DACPPlayerIface * iface) {
+	vala_dacp_player_dacp_player_parent_iface = g_type_interface_peek_parent (iface);
+	iface->now_playing_record = (DAAPRecord* (*)(DACPPlayer*)) vala_dacp_player_real_now_playing_record;
+	iface->now_playing_artwork = (guchar* (*)(DACPPlayer* ,guint ,guint ,int*)) vala_dacp_player_real_now_playing_artwork;
+	iface->play_pause = (void (*)(DACPPlayer*)) vala_dacp_player_real_play_pause;
+	iface->pause = (void (*)(DACPPlayer*)) vala_dacp_player_real_pause;
+	iface->next_item = (void (*)(DACPPlayer*)) vala_dacp_player_real_next_item;
+	iface->prev_item = (void (*)(DACPPlayer*)) vala_dacp_player_real_prev_item;
+	iface->cue_clear = (void (*)(DACPPlayer*)) vala_dacp_player_real_cue_clear;
+	iface->cue_play = (void (*)(DACPPlayer* ,GList* ,guint)) vala_dacp_player_real_cue_play;
+}
+
+
+static void vala_dacp_player_instance_init (ValaDACPPlayer * self) {
+}
+
+
+GType vala_dacp_player_get_type (void) {
+	static volatile gsize vala_dacp_player_type_id__volatile = 0;
+	if (g_once_init_enter (&vala_dacp_player_type_id__volatile)) {
+		static const GTypeInfo g_define_type_info = { sizeof (ValaDACPPlayerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dacp_player_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaDACPPlayer), 0, (GInstanceInitFunc) vala_dacp_player_instance_init, NULL };
+		static const GInterfaceInfo dacp_player_info = { (GInterfaceInitFunc) vala_dacp_player_dacp_player_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
+		GType vala_dacp_player_type_id;
+		vala_dacp_player_type_id = g_type_register_static (G_TYPE_OBJECT, "ValaDACPPlayer", &g_define_type_info, 0);
+		g_type_add_interface_static (vala_dacp_player_type_id, DACP_TYPE_PLAYER, &dacp_player_info);
+		g_once_init_leave (&vala_dacp_player_type_id__volatile, vala_dacp_player_type_id);
+	}
+	return vala_dacp_player_type_id__volatile;
+}
+
+
+static void _lambda0_ (const gchar* service_name, const gchar* display_name, DACPListener* self) {
+	g_return_if_fail (service_name != NULL);
+	g_return_if_fail (display_name != NULL);
+	fprintf (stdout, "Found remote: %s, %s\n", service_name, display_name);
+}
+
+
+static void __lambda0__dacp_share_remote_found (DACPShare* _sender, const gchar* service_name, const gchar* remote_name, gpointer self) {
+	_lambda0_ (service_name, remote_name, self);
+}
+
+
+static void _lambda1_ (const gchar* guid, DACPListener* self) {
+	g_return_if_fail (guid != NULL);
+	fprintf (stdout, "Add GUID request received\n");
+}
+
+
+static void __lambda1__dacp_share_add_guid (DACPShare* _sender, const gchar* guid, gpointer self) {
+	_lambda1_ (guid, self);
+}
+
+
+DACPListener* dacp_listener_construct (GType object_type) {
+	DACPListener * self = NULL;
+	ValaDMAPDb* _tmp0_ = NULL;
+	DMAPDb* _tmp1_;
+	ValaDMAPContainerDb* _tmp2_ = NULL;
+	DMAPContainerDb* _tmp3_;
+	ValaDACPPlayer* _tmp4_ = NULL;
+	DACPPlayer* _tmp5_;
+	DACPShare* _tmp6_ = NULL;
+	DACPShare* _tmp7_;
+	self = (DACPListener*) g_object_new (object_type, NULL);
+	_tmp0_ = vala_dmap_db_new ();
+	_tmp1_ = (DMAPDb*) _tmp0_;
+	_g_object_unref0 (self->priv->db);
+	self->priv->db = _tmp1_;
+	_tmp2_ = vala_dmap_container_db_new ();
+	_tmp3_ = (DMAPContainerDb*) _tmp2_;
+	_g_object_unref0 (self->priv->container_db);
+	self->priv->container_db = _tmp3_;
+	_tmp4_ = vala_dacp_player_new ();
+	_tmp5_ = (DACPPlayer*) _tmp4_;
+	_g_object_unref0 (self->priv->player);
+	self->priv->player = _tmp5_;
+	_tmp6_ = dacp_share_new ("dacplisten", self->priv->player, self->priv->db, self->priv->container_db);
+	_tmp7_ = _tmp6_;
+	_g_object_unref0 (self->priv->share);
+	self->priv->share = _tmp7_;
+	g_signal_connect_object (self->priv->share, "remote-found", (GCallback) __lambda0__dacp_share_remote_found, self, 0);
+	g_signal_connect_object (self->priv->share, "add-guid", (GCallback) __lambda1__dacp_share_add_guid, self, 0);
+	dacp_share_start_lookup (self->priv->share);
+	return self;
+}
+
+
+DACPListener* dacp_listener_new (void) {
+	return dacp_listener_construct (TYPE_DACP_LISTENER);
+}
+
+
+static void dacp_listener_class_init (DACPListenerClass * klass) {
+	dacp_listener_parent_class = g_type_class_peek_parent (klass);
+	g_type_class_add_private (klass, sizeof (DACPListenerPrivate));
+	G_OBJECT_CLASS (klass)->finalize = dacp_listener_finalize;
+}
+
+
+static void dacp_listener_instance_init (DACPListener * self) {
+	self->priv = DACP_LISTENER_GET_PRIVATE (self);
+}
+
+
+static void dacp_listener_finalize (GObject* obj) {
+	DACPListener * self;
+	self = DACP_LISTENER (obj);
+	_g_object_unref0 (self->priv->db);
+	_g_object_unref0 (self->priv->container_db);
+	_g_object_unref0 (self->priv->player);
+	_g_object_unref0 (self->priv->share);
+	G_OBJECT_CLASS (dacp_listener_parent_class)->finalize (obj);
+}
+
+
+GType dacp_listener_get_type (void) {
+	static volatile gsize dacp_listener_type_id__volatile = 0;
+	if (g_once_init_enter (&dacp_listener_type_id__volatile)) {
+		static const GTypeInfo g_define_type_info = { sizeof (DACPListenerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dacp_listener_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DACPListener), 0, (GInstanceInitFunc) dacp_listener_instance_init, NULL };
+		GType dacp_listener_type_id;
+		dacp_listener_type_id = g_type_register_static (G_TYPE_OBJECT, "DACPListener", &g_define_type_info, 0);
+		g_once_init_leave (&dacp_listener_type_id__volatile, dacp_listener_type_id);
+	}
+	return dacp_listener_type_id__volatile;
+}
+
+
+gint _vala_main (gchar** args, int args_length1) {
+	gint result = 0;
+	GMainLoop* _tmp0_ = NULL;
+	GMainLoop* loop;
+	DACPListener* _tmp1_ = NULL;
+	DACPListener* dacplistener;
+	_tmp0_ = g_main_loop_new (NULL, FALSE);
+	loop = _tmp0_;
+	_tmp1_ = dacp_listener_new ();
+	dacplistener = _tmp1_;
+	g_main_loop_run (loop);
+	result = 0;
+	_g_object_unref0 (dacplistener);
+	_g_main_loop_unref0 (loop);
+	return result;
+}
+
+
+int main (int argc, char ** argv) {
+	g_type_init ();
+	return _vala_main (argv, argc);
+}
+
+
+
diff --git a/tests/dmapcopy.c b/tests/dmapcopy.c
new file mode 100644
index 0000000..b78be9b
--- /dev/null
+++ b/tests/dmapcopy.c
@@ -0,0 +1,438 @@
+/* dmapcopy.c generated by valac 0.11.4, the Vala compiler
+ * generated from dmapcopy.vala, do not modify */
+
+/*   FILE: dmapcopy.vala -- Copy files from a DMAP server
+ * AUTHOR: W. Michael Petullo <mike flyn org>
+ *   DATE: 20 December 2010 
+ *
+ * Copyright (c) 2010 W. Michael Petullo <new flyn org>
+ * All rights reserved.
+ *
+ * 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 <glib.h>
+#include <glib-object.h>
+#include <libdmapsharing/dmap.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <gobject/gvaluecollector.h>
+
+
+#define TYPE_DPAP_COPY (dpap_copy_get_type ())
+#define DPAP_COPY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DPAP_COPY, DPAPCopy))
+#define DPAP_COPY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DPAP_COPY, DPAPCopyClass))
+#define IS_DPAP_COPY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DPAP_COPY))
+#define IS_DPAP_COPY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DPAP_COPY))
+#define DPAP_COPY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DPAP_COPY, DPAPCopyClass))
+
+typedef struct _DPAPCopy DPAPCopy;
+typedef struct _DPAPCopyClass DPAPCopyClass;
+typedef struct _DPAPCopyPrivate DPAPCopyPrivate;
+
+#define TYPE_VALA_DMAP_DB (vala_dmap_db_get_type ())
+#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDb))
+#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+#define IS_VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_DB))
+#define IS_VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_DB))
+#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+
+typedef struct _ValaDMAPDb ValaDMAPDb;
+typedef struct _ValaDMAPDbClass ValaDMAPDbClass;
+
+#define TYPE_VALA_DPAP_RECORD_FACTORY (vala_dpap_record_factory_get_type ())
+#define VALA_DPAP_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactory))
+#define VALA_DPAP_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactoryClass))
+#define IS_VALA_DPAP_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD_FACTORY))
+#define IS_VALA_DPAP_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD_FACTORY))
+#define VALA_DPAP_RECORD_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactoryClass))
+
+typedef struct _ValaDPAPRecordFactory ValaDPAPRecordFactory;
+typedef struct _ValaDPAPRecordFactoryClass ValaDPAPRecordFactoryClass;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+
+#define TYPE_VALA_DPAP_RECORD (vala_dpap_record_get_type ())
+#define VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecord))
+#define VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
+#define IS_VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD))
+#define IS_VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD))
+#define VALA_DPAP_RECORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
+
+typedef struct _ValaDPAPRecord ValaDPAPRecord;
+typedef struct _ValaDPAPRecordClass ValaDPAPRecordClass;
+#define _dpap_copy_unref0(var) ((var == NULL) ? NULL : (var = (dpap_copy_unref (var), NULL)))
+typedef struct _ParamSpecDPAPCopy ParamSpecDPAPCopy;
+#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
+
+struct _DPAPCopy {
+	GTypeInstance parent_instance;
+	volatile int ref_count;
+	DPAPCopyPrivate * priv;
+};
+
+struct _DPAPCopyClass {
+	GTypeClass parent_class;
+	void (*finalize) (DPAPCopy *self);
+};
+
+struct _DPAPCopyPrivate {
+	DMAPMdnsBrowser* browser;
+	DMAPConnection* connection;
+	ValaDMAPDb* db;
+	ValaDPAPRecordFactory* factory;
+};
+
+struct _ParamSpecDPAPCopy {
+	GParamSpec parent_instance;
+};
+
+
+static gpointer dpap_copy_parent_class = NULL;
+
+gpointer dpap_copy_ref (gpointer instance);
+void dpap_copy_unref (gpointer instance);
+GParamSpec* param_spec_dpap_copy (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_dpap_copy (GValue* value, gpointer v_object);
+void value_take_dpap_copy (GValue* value, gpointer v_object);
+gpointer value_get_dpap_copy (const GValue* value);
+GType dpap_copy_get_type (void) G_GNUC_CONST;
+GType vala_dmap_db_get_type (void) G_GNUC_CONST;
+GType vala_dpap_record_factory_get_type (void) G_GNUC_CONST;
+#define DPAP_COPY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DPAP_COPY, DPAPCopyPrivate))
+enum  {
+	DPAP_COPY_DUMMY_PROPERTY
+};
+static gboolean dpap_copy_connected_cb (DPAPCopy* self, DMAPConnection* connection, gboolean _result_, const gchar* reason);
+static void _lambda0_ (gconstpointer k, gconstpointer v, DPAPCopy* self);
+GType vala_dpap_record_get_type (void) G_GNUC_CONST;
+const gchar* vala_dpap_record_get_location (ValaDPAPRecord* self);
+static void __lambda0__gh_func (gconstpointer key, gconstpointer value, gpointer self);
+static void dpap_copy_service_added_cb (DPAPCopy* self, DMAPMdnsBrowserService* service);
+static gboolean _dpap_copy_connected_cb_dmap_connection_callback (DMAPConnection* connection, gboolean _result_, const gchar* reason, gpointer self);
+DPAPCopy* dpap_copy_new (GError** error);
+DPAPCopy* dpap_copy_construct (GType object_type, GError** error);
+ValaDMAPDb* vala_dmap_db_new (void);
+ValaDMAPDb* vala_dmap_db_construct (GType object_type);
+ValaDPAPRecordFactory* vala_dpap_record_factory_new (void);
+ValaDPAPRecordFactory* vala_dpap_record_factory_construct (GType object_type);
+static void _dpap_copy_service_added_cb_dmap_mdns_browser_service_added (DMAPMdnsBrowser* _sender, void* service, gpointer self);
+static void dpap_copy_finalize (DPAPCopy* obj);
+void debug_printf (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message);
+void debug_null (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message);
+gint _vala_main (gchar** args, int args_length1);
+static void _debug_null_glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self);
+
+
+static void _lambda0_ (gconstpointer k, gconstpointer v, DPAPCopy* self) {
+	const gchar* _tmp0_ = NULL;
+	_tmp0_ = vala_dpap_record_get_location (VALA_DPAP_RECORD (v));
+	fprintf (stdout, "%s\n", _tmp0_);
+}
+
+
+static void __lambda0__gh_func (gconstpointer key, gconstpointer value, gpointer self) {
+	_lambda0_ (key, value, self);
+}
+
+
+static gboolean dpap_copy_connected_cb (DPAPCopy* self, DMAPConnection* connection, gboolean _result_, const gchar* reason) {
+	gboolean result = FALSE;
+	gint64 _tmp0_;
+	g_return_val_if_fail (self != NULL, FALSE);
+	g_return_val_if_fail (connection != NULL, FALSE);
+	_tmp0_ = dmap_db_count ((DMAPDb*) self->priv->db);
+	g_debug ("dmapcopy.vala:30: %lld entries\n", _tmp0_);
+	dmap_db_foreach ((DMAPDb*) self->priv->db, __lambda0__gh_func, self);
+	result = TRUE;
+	return result;
+}
+
+
+static gboolean _dpap_copy_connected_cb_dmap_connection_callback (DMAPConnection* connection, gboolean _result_, const gchar* reason, gpointer self) {
+	gboolean result;
+	result = dpap_copy_connected_cb (self, connection, _result_, reason);
+	return result;
+}
+
+
+static void dpap_copy_service_added_cb (DPAPCopy* self, DMAPMdnsBrowserService* service) {
+	DPAPConnection* _tmp0_ = NULL;
+	DMAPConnection* _tmp1_;
+	g_return_if_fail (self != NULL);
+	_tmp0_ = dpap_connection_new (service->service_name, service->host, service->port, FALSE, (DMAPDb*) self->priv->db, (DMAPRecordFactory*) self->priv->factory);
+	_tmp1_ = DMAP_CONNECTION (_tmp0_);
+	_g_object_unref0 (self->priv->connection);
+	self->priv->connection = _tmp1_;
+	dmap_connection_connect (self->priv->connection, _dpap_copy_connected_cb_dmap_connection_callback, self);
+}
+
+
+static void _dpap_copy_service_added_cb_dmap_mdns_browser_service_added (DMAPMdnsBrowser* _sender, void* service, gpointer self) {
+	dpap_copy_service_added_cb (self, service);
+}
+
+
+DPAPCopy* dpap_copy_construct (GType object_type, GError** error) {
+	DPAPCopy* self = NULL;
+	ValaDMAPDb* _tmp0_ = NULL;
+	ValaDMAPDb* _tmp1_;
+	ValaDPAPRecordFactory* _tmp2_ = NULL;
+	ValaDPAPRecordFactory* _tmp3_;
+	DMAPMdnsBrowser* _tmp4_ = NULL;
+	DMAPMdnsBrowser* _tmp5_;
+	GError * _inner_error_ = NULL;
+	self = (DPAPCopy*) g_type_create_instance (object_type);
+	_tmp0_ = vala_dmap_db_new ();
+	_tmp1_ = _tmp0_;
+	_g_object_unref0 (self->priv->db);
+	self->priv->db = _tmp1_;
+	_tmp2_ = vala_dpap_record_factory_new ();
+	_tmp3_ = _tmp2_;
+	_g_object_unref0 (self->priv->factory);
+	self->priv->factory = _tmp3_;
+	_tmp4_ = dmap_mdns_browser_new (DMAP_MDNS_BROWSER_SERVICE_TYPE_DPAP);
+	_tmp5_ = _tmp4_;
+	_g_object_unref0 (self->priv->browser);
+	self->priv->browser = _tmp5_;
+	g_signal_connect (self->priv->browser, "service-added", (GCallback) _dpap_copy_service_added_cb_dmap_mdns_browser_service_added, self);
+	dmap_mdns_browser_start (self->priv->browser, &_inner_error_);
+	if (_inner_error_ != NULL) {
+		g_propagate_error (error, _inner_error_);
+		_dpap_copy_unref0 (self);
+		return NULL;
+	}
+	return self;
+}
+
+
+DPAPCopy* dpap_copy_new (GError** error) {
+	return dpap_copy_construct (TYPE_DPAP_COPY, error);
+}
+
+
+static void value_dpap_copy_init (GValue* value) {
+	value->data[0].v_pointer = NULL;
+}
+
+
+static void value_dpap_copy_free_value (GValue* value) {
+	if (value->data[0].v_pointer) {
+		dpap_copy_unref (value->data[0].v_pointer);
+	}
+}
+
+
+static void value_dpap_copy_copy_value (const GValue* src_value, GValue* dest_value) {
+	if (src_value->data[0].v_pointer) {
+		dest_value->data[0].v_pointer = dpap_copy_ref (src_value->data[0].v_pointer);
+	} else {
+		dest_value->data[0].v_pointer = NULL;
+	}
+}
+
+
+static gpointer value_dpap_copy_peek_pointer (const GValue* value) {
+	return value->data[0].v_pointer;
+}
+
+
+static gchar* value_dpap_copy_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+	if (collect_values[0].v_pointer) {
+		DPAPCopy* object;
+		object = collect_values[0].v_pointer;
+		if (object->parent_instance.g_class == NULL) {
+			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+		}
+		value->data[0].v_pointer = dpap_copy_ref (object);
+	} else {
+		value->data[0].v_pointer = NULL;
+	}
+	return NULL;
+}
+
+
+static gchar* value_dpap_copy_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+	DPAPCopy** object_p;
+	object_p = collect_values[0].v_pointer;
+	if (!object_p) {
+		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+	}
+	if (!value->data[0].v_pointer) {
+		*object_p = NULL;
+	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+		*object_p = value->data[0].v_pointer;
+	} else {
+		*object_p = dpap_copy_ref (value->data[0].v_pointer);
+	}
+	return NULL;
+}
+
+
+GParamSpec* param_spec_dpap_copy (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+	ParamSpecDPAPCopy* spec;
+	g_return_val_if_fail (g_type_is_a (object_type, TYPE_DPAP_COPY), NULL);
+	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+	G_PARAM_SPEC (spec)->value_type = object_type;
+	return G_PARAM_SPEC (spec);
+}
+
+
+gpointer value_get_dpap_copy (const GValue* value) {
+	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DPAP_COPY), NULL);
+	return value->data[0].v_pointer;
+}
+
+
+void value_set_dpap_copy (GValue* value, gpointer v_object) {
+	DPAPCopy* old;
+	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DPAP_COPY));
+	old = value->data[0].v_pointer;
+	if (v_object) {
+		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_DPAP_COPY));
+		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+		value->data[0].v_pointer = v_object;
+		dpap_copy_ref (value->data[0].v_pointer);
+	} else {
+		value->data[0].v_pointer = NULL;
+	}
+	if (old) {
+		dpap_copy_unref (old);
+	}
+}
+
+
+void value_take_dpap_copy (GValue* value, gpointer v_object) {
+	DPAPCopy* old;
+	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DPAP_COPY));
+	old = value->data[0].v_pointer;
+	if (v_object) {
+		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_DPAP_COPY));
+		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+		value->data[0].v_pointer = v_object;
+	} else {
+		value->data[0].v_pointer = NULL;
+	}
+	if (old) {
+		dpap_copy_unref (old);
+	}
+}
+
+
+static void dpap_copy_class_init (DPAPCopyClass * klass) {
+	dpap_copy_parent_class = g_type_class_peek_parent (klass);
+	DPAP_COPY_CLASS (klass)->finalize = dpap_copy_finalize;
+	g_type_class_add_private (klass, sizeof (DPAPCopyPrivate));
+}
+
+
+static void dpap_copy_instance_init (DPAPCopy * self) {
+	self->priv = DPAP_COPY_GET_PRIVATE (self);
+	self->ref_count = 1;
+}
+
+
+static void dpap_copy_finalize (DPAPCopy* obj) {
+	DPAPCopy * self;
+	self = DPAP_COPY (obj);
+	_g_object_unref0 (self->priv->browser);
+	_g_object_unref0 (self->priv->connection);
+	_g_object_unref0 (self->priv->db);
+	_g_object_unref0 (self->priv->factory);
+}
+
+
+GType dpap_copy_get_type (void) {
+	static volatile gsize dpap_copy_type_id__volatile = 0;
+	if (g_once_init_enter (&dpap_copy_type_id__volatile)) {
+		static const GTypeValueTable g_define_type_value_table = { value_dpap_copy_init, value_dpap_copy_free_value, value_dpap_copy_copy_value, value_dpap_copy_peek_pointer, "p", value_dpap_copy_collect_value, "p", value_dpap_copy_lcopy_value };
+		static const GTypeInfo g_define_type_info = { sizeof (DPAPCopyClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dpap_copy_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DPAPCopy), 0, (GInstanceInitFunc) dpap_copy_instance_init, &g_define_type_value_table };
+		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
+		GType dpap_copy_type_id;
+		dpap_copy_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DPAPCopy", &g_define_type_info, &g_define_type_fundamental_info, 0);
+		g_once_init_leave (&dpap_copy_type_id__volatile, dpap_copy_type_id);
+	}
+	return dpap_copy_type_id__volatile;
+}
+
+
+gpointer dpap_copy_ref (gpointer instance) {
+	DPAPCopy* self;
+	self = instance;
+	g_atomic_int_inc (&self->ref_count);
+	return instance;
+}
+
+
+void dpap_copy_unref (gpointer instance) {
+	DPAPCopy* self;
+	self = instance;
+	if (g_atomic_int_dec_and_test (&self->ref_count)) {
+		DPAP_COPY_GET_CLASS (self)->finalize (self);
+		g_type_free_instance ((GTypeInstance *) self);
+	}
+}
+
+
+void debug_printf (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message) {
+	fprintf (stdout, "%s\n", message);
+}
+
+
+void debug_null (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message) {
+}
+
+
+static void _debug_null_glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self) {
+	debug_null (log_domain, log_levels, message);
+}
+
+
+gint _vala_main (gchar** args, int args_length1) {
+	gint result = 0;
+	GMainLoop* _tmp0_ = NULL;
+	GMainLoop* loop;
+	DPAPCopy* _tmp1_ = NULL;
+	DPAPCopy* dmapcopy;
+	GError * _inner_error_ = NULL;
+	_tmp0_ = g_main_loop_new (NULL, FALSE);
+	loop = _tmp0_;
+	g_log_set_handler ("libdmapsharing", G_LOG_LEVEL_DEBUG, _debug_null_glog_func, NULL);
+	g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, _debug_null_glog_func, NULL);
+	_tmp1_ = dpap_copy_new (&_inner_error_);
+	dmapcopy = _tmp1_;
+	if (_inner_error_ != NULL) {
+		_g_main_loop_unref0 (loop);
+		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+		g_clear_error (&_inner_error_);
+		return 0;
+	}
+	g_main_loop_run (loop);
+	result = 0;
+	_dpap_copy_unref0 (dmapcopy);
+	_g_main_loop_unref0 (loop);
+	return result;
+}
+
+
+int main (int argc, char ** argv) {
+	g_type_init ();
+	return _vala_main (argv, argc);
+}
+
+
+
diff --git a/tests/dmapserve.c b/tests/dmapserve.c
new file mode 100644
index 0000000..052f030
--- /dev/null
+++ b/tests/dmapserve.c
@@ -0,0 +1,383 @@
+/* dmapserve.c generated by valac 0.11.4, the Vala compiler
+ * generated from dmapserve.vala, do not modify */
+
+/*   FILE: dmapserve.vala -- Serve media using DMAP
+ * AUTHOR: W. Michael Petullo <mike flyn org>
+ *   DATE: 21 December 2010 
+ *
+ * Copyright (c) 2010 W. Michael Petullo <new flyn org>
+ * All rights reserved.
+ *
+ * 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 <glib.h>
+#include <glib-object.h>
+#include <libdmapsharing/dmap.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <gobject/gvaluecollector.h>
+
+
+#define TYPE_DPAP_SERVE (dpap_serve_get_type ())
+#define DPAP_SERVE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DPAP_SERVE, DPAPServe))
+#define DPAP_SERVE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DPAP_SERVE, DPAPServeClass))
+#define IS_DPAP_SERVE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DPAP_SERVE))
+#define IS_DPAP_SERVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DPAP_SERVE))
+#define DPAP_SERVE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DPAP_SERVE, DPAPServeClass))
+
+typedef struct _DPAPServe DPAPServe;
+typedef struct _DPAPServeClass DPAPServeClass;
+typedef struct _DPAPServePrivate DPAPServePrivate;
+
+#define TYPE_VALA_DPAP_RECORD (vala_dpap_record_get_type ())
+#define VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecord))
+#define VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
+#define IS_VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD))
+#define IS_VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD))
+#define VALA_DPAP_RECORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
+
+typedef struct _ValaDPAPRecord ValaDPAPRecord;
+typedef struct _ValaDPAPRecordClass ValaDPAPRecordClass;
+
+#define TYPE_VALA_DMAP_DB (vala_dmap_db_get_type ())
+#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDb))
+#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+#define IS_VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_DB))
+#define IS_VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_DB))
+#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+
+typedef struct _ValaDMAPDb ValaDMAPDb;
+typedef struct _ValaDMAPDbClass ValaDMAPDbClass;
+
+#define TYPE_VALA_DMAP_CONTAINER_DB (vala_dmap_container_db_get_type ())
+#define VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDb))
+#define VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbClass))
+#define IS_VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_CONTAINER_DB))
+#define IS_VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_CONTAINER_DB))
+#define VALA_DMAP_CONTAINER_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbClass))
+
+typedef struct _ValaDMAPContainerDb ValaDMAPContainerDb;
+typedef struct _ValaDMAPContainerDbClass ValaDMAPContainerDbClass;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+typedef struct _ParamSpecDPAPServe ParamSpecDPAPServe;
+#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
+#define _dpap_serve_unref0(var) ((var == NULL) ? NULL : (var = (dpap_serve_unref (var), NULL)))
+
+struct _DPAPServe {
+	GTypeInstance parent_instance;
+	volatile int ref_count;
+	DPAPServePrivate * priv;
+};
+
+struct _DPAPServeClass {
+	GTypeClass parent_class;
+	void (*finalize) (DPAPServe *self);
+};
+
+struct _DPAPServePrivate {
+	ValaDPAPRecord* record;
+	ValaDMAPDb* db;
+	ValaDMAPContainerDb* container_db;
+	DPAPShare* share;
+};
+
+struct _ParamSpecDPAPServe {
+	GParamSpec parent_instance;
+};
+
+
+static gpointer dpap_serve_parent_class = NULL;
+
+gpointer dpap_serve_ref (gpointer instance);
+void dpap_serve_unref (gpointer instance);
+GParamSpec* param_spec_dpap_serve (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_dpap_serve (GValue* value, gpointer v_object);
+void value_take_dpap_serve (GValue* value, gpointer v_object);
+gpointer value_get_dpap_serve (const GValue* value);
+GType dpap_serve_get_type (void) G_GNUC_CONST;
+GType vala_dpap_record_get_type (void) G_GNUC_CONST;
+GType vala_dmap_db_get_type (void) G_GNUC_CONST;
+GType vala_dmap_container_db_get_type (void) G_GNUC_CONST;
+#define DPAP_SERVE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DPAP_SERVE, DPAPServePrivate))
+enum  {
+	DPAP_SERVE_DUMMY_PROPERTY
+};
+DPAPServe* dpap_serve_new (GError** error);
+DPAPServe* dpap_serve_construct (GType object_type, GError** error);
+ValaDPAPRecord* vala_dpap_record_new (void);
+ValaDPAPRecord* vala_dpap_record_construct (GType object_type);
+ValaDMAPDb* vala_dmap_db_new (void);
+ValaDMAPDb* vala_dmap_db_construct (GType object_type);
+ValaDMAPContainerDb* vala_dmap_container_db_new (void);
+ValaDMAPContainerDb* vala_dmap_container_db_construct (GType object_type);
+static void dpap_serve_finalize (DPAPServe* obj);
+void debug_printf (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message);
+void debug_null (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message);
+gint _vala_main (gchar** args, int args_length1);
+static void _debug_printf_glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self);
+
+
+DPAPServe* dpap_serve_construct (GType object_type, GError** error) {
+	DPAPServe* self = NULL;
+	ValaDPAPRecord* _tmp0_ = NULL;
+	ValaDPAPRecord* _tmp1_;
+	ValaDMAPDb* _tmp2_ = NULL;
+	ValaDMAPDb* _tmp3_;
+	ValaDMAPContainerDb* _tmp4_ = NULL;
+	ValaDMAPContainerDb* _tmp5_;
+	DPAPShare* _tmp6_ = NULL;
+	DPAPShare* _tmp7_;
+	self = (DPAPServe*) g_type_create_instance (object_type);
+	_tmp0_ = vala_dpap_record_new ();
+	_tmp1_ = _tmp0_;
+	_g_object_unref0 (self->priv->record);
+	self->priv->record = _tmp1_;
+	_tmp2_ = vala_dmap_db_new ();
+	_tmp3_ = _tmp2_;
+	_g_object_unref0 (self->priv->db);
+	self->priv->db = _tmp3_;
+	dmap_db_add ((DMAPDb*) self->priv->db, (DMAPRecord*) self->priv->record);
+	_tmp4_ = vala_dmap_container_db_new ();
+	_tmp5_ = _tmp4_;
+	_g_object_unref0 (self->priv->container_db);
+	self->priv->container_db = _tmp5_;
+	_tmp6_ = dpap_share_new ("dmapserve", NULL, self->priv->db, self->priv->container_db, NULL);
+	_tmp7_ = _tmp6_;
+	_g_object_unref0 (self->priv->share);
+	self->priv->share = _tmp7_;
+	return self;
+}
+
+
+DPAPServe* dpap_serve_new (GError** error) {
+	return dpap_serve_construct (TYPE_DPAP_SERVE, error);
+}
+
+
+static void value_dpap_serve_init (GValue* value) {
+	value->data[0].v_pointer = NULL;
+}
+
+
+static void value_dpap_serve_free_value (GValue* value) {
+	if (value->data[0].v_pointer) {
+		dpap_serve_unref (value->data[0].v_pointer);
+	}
+}
+
+
+static void value_dpap_serve_copy_value (const GValue* src_value, GValue* dest_value) {
+	if (src_value->data[0].v_pointer) {
+		dest_value->data[0].v_pointer = dpap_serve_ref (src_value->data[0].v_pointer);
+	} else {
+		dest_value->data[0].v_pointer = NULL;
+	}
+}
+
+
+static gpointer value_dpap_serve_peek_pointer (const GValue* value) {
+	return value->data[0].v_pointer;
+}
+
+
+static gchar* value_dpap_serve_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+	if (collect_values[0].v_pointer) {
+		DPAPServe* object;
+		object = collect_values[0].v_pointer;
+		if (object->parent_instance.g_class == NULL) {
+			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+		}
+		value->data[0].v_pointer = dpap_serve_ref (object);
+	} else {
+		value->data[0].v_pointer = NULL;
+	}
+	return NULL;
+}
+
+
+static gchar* value_dpap_serve_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+	DPAPServe** object_p;
+	object_p = collect_values[0].v_pointer;
+	if (!object_p) {
+		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+	}
+	if (!value->data[0].v_pointer) {
+		*object_p = NULL;
+	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+		*object_p = value->data[0].v_pointer;
+	} else {
+		*object_p = dpap_serve_ref (value->data[0].v_pointer);
+	}
+	return NULL;
+}
+
+
+GParamSpec* param_spec_dpap_serve (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+	ParamSpecDPAPServe* spec;
+	g_return_val_if_fail (g_type_is_a (object_type, TYPE_DPAP_SERVE), NULL);
+	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+	G_PARAM_SPEC (spec)->value_type = object_type;
+	return G_PARAM_SPEC (spec);
+}
+
+
+gpointer value_get_dpap_serve (const GValue* value) {
+	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DPAP_SERVE), NULL);
+	return value->data[0].v_pointer;
+}
+
+
+void value_set_dpap_serve (GValue* value, gpointer v_object) {
+	DPAPServe* old;
+	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DPAP_SERVE));
+	old = value->data[0].v_pointer;
+	if (v_object) {
+		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_DPAP_SERVE));
+		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+		value->data[0].v_pointer = v_object;
+		dpap_serve_ref (value->data[0].v_pointer);
+	} else {
+		value->data[0].v_pointer = NULL;
+	}
+	if (old) {
+		dpap_serve_unref (old);
+	}
+}
+
+
+void value_take_dpap_serve (GValue* value, gpointer v_object) {
+	DPAPServe* old;
+	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DPAP_SERVE));
+	old = value->data[0].v_pointer;
+	if (v_object) {
+		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_DPAP_SERVE));
+		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+		value->data[0].v_pointer = v_object;
+	} else {
+		value->data[0].v_pointer = NULL;
+	}
+	if (old) {
+		dpap_serve_unref (old);
+	}
+}
+
+
+static void dpap_serve_class_init (DPAPServeClass * klass) {
+	dpap_serve_parent_class = g_type_class_peek_parent (klass);
+	DPAP_SERVE_CLASS (klass)->finalize = dpap_serve_finalize;
+	g_type_class_add_private (klass, sizeof (DPAPServePrivate));
+}
+
+
+static void dpap_serve_instance_init (DPAPServe * self) {
+	self->priv = DPAP_SERVE_GET_PRIVATE (self);
+	self->ref_count = 1;
+}
+
+
+static void dpap_serve_finalize (DPAPServe* obj) {
+	DPAPServe * self;
+	self = DPAP_SERVE (obj);
+	_g_object_unref0 (self->priv->record);
+	_g_object_unref0 (self->priv->db);
+	_g_object_unref0 (self->priv->container_db);
+	_g_object_unref0 (self->priv->share);
+}
+
+
+GType dpap_serve_get_type (void) {
+	static volatile gsize dpap_serve_type_id__volatile = 0;
+	if (g_once_init_enter (&dpap_serve_type_id__volatile)) {
+		static const GTypeValueTable g_define_type_value_table = { value_dpap_serve_init, value_dpap_serve_free_value, value_dpap_serve_copy_value, value_dpap_serve_peek_pointer, "p", value_dpap_serve_collect_value, "p", value_dpap_serve_lcopy_value };
+		static const GTypeInfo g_define_type_info = { sizeof (DPAPServeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dpap_serve_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DPAPServe), 0, (GInstanceInitFunc) dpap_serve_instance_init, &g_define_type_value_table };
+		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
+		GType dpap_serve_type_id;
+		dpap_serve_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DPAPServe", &g_define_type_info, &g_define_type_fundamental_info, 0);
+		g_once_init_leave (&dpap_serve_type_id__volatile, dpap_serve_type_id);
+	}
+	return dpap_serve_type_id__volatile;
+}
+
+
+gpointer dpap_serve_ref (gpointer instance) {
+	DPAPServe* self;
+	self = instance;
+	g_atomic_int_inc (&self->ref_count);
+	return instance;
+}
+
+
+void dpap_serve_unref (gpointer instance) {
+	DPAPServe* self;
+	self = instance;
+	if (g_atomic_int_dec_and_test (&self->ref_count)) {
+		DPAP_SERVE_GET_CLASS (self)->finalize (self);
+		g_type_free_instance ((GTypeInstance *) self);
+	}
+}
+
+
+void debug_printf (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message) {
+	fprintf (stdout, "%s\n", message);
+}
+
+
+void debug_null (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message) {
+}
+
+
+static void _debug_printf_glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self) {
+	debug_printf (log_domain, log_levels, message);
+}
+
+
+gint _vala_main (gchar** args, int args_length1) {
+	gint result = 0;
+	GMainLoop* _tmp0_ = NULL;
+	GMainLoop* loop;
+	DPAPServe* _tmp1_ = NULL;
+	DPAPServe* dmapcopy;
+	GError * _inner_error_ = NULL;
+	_tmp0_ = g_main_loop_new (NULL, FALSE);
+	loop = _tmp0_;
+	g_log_set_handler ("libdmapsharing", G_LOG_LEVEL_DEBUG, _debug_printf_glog_func, NULL);
+	g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, _debug_printf_glog_func, NULL);
+	_tmp1_ = dpap_serve_new (&_inner_error_);
+	dmapcopy = _tmp1_;
+	if (_inner_error_ != NULL) {
+		_g_main_loop_unref0 (loop);
+		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+		g_clear_error (&_inner_error_);
+		return 0;
+	}
+	g_main_loop_run (loop);
+	result = 0;
+	_dpap_serve_unref0 (dmapcopy);
+	_g_main_loop_unref0 (loop);
+	return result;
+}
+
+
+int main (int argc, char ** argv) {
+	g_type_init ();
+	return _vala_main (argv, argc);
+}
+
+
+
diff --git a/tests/dpapview.c b/tests/dpapview.c
new file mode 100644
index 0000000..6f19dd7
--- /dev/null
+++ b/tests/dpapview.c
@@ -0,0 +1,541 @@
+/* dpapview.c generated by valac 0.11.4, the Vala compiler
+ * generated from dpapview.vala, do not modify */
+
+/*   FILE: dpapviewer.vala -- View DPAP data
+ * AUTHOR: W. Michael Petullo <mike flyn org>
+ *   DATE: 24 November 2010
+ *
+ * Copyright (c) 2010 W. Michael Petullo <new flyn org>
+ * All rights reserved.
+ *
+ * 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 <glib.h>
+#include <glib-object.h>
+#include <libdmapsharing/dmap.h>
+#include <gtk/gtk.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gdk-pixbuf/gdk-pixdata.h>
+#include <glib/gstdio.h>
+#include <unistd.h>
+#include <stdio.h>
+#include <gobject/gvaluecollector.h>
+
+
+#define TYPE_DPAP_VIEWER (dpap_viewer_get_type ())
+#define DPAP_VIEWER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DPAP_VIEWER, DPAPViewer))
+#define DPAP_VIEWER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DPAP_VIEWER, DPAPViewerClass))
+#define IS_DPAP_VIEWER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DPAP_VIEWER))
+#define IS_DPAP_VIEWER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DPAP_VIEWER))
+#define DPAP_VIEWER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DPAP_VIEWER, DPAPViewerClass))
+
+typedef struct _DPAPViewer DPAPViewer;
+typedef struct _DPAPViewerClass DPAPViewerClass;
+typedef struct _DPAPViewerPrivate DPAPViewerPrivate;
+
+#define TYPE_VALA_DMAP_DB (vala_dmap_db_get_type ())
+#define VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDb))
+#define VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+#define IS_VALA_DMAP_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_DB))
+#define IS_VALA_DMAP_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_DB))
+#define VALA_DMAP_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_DB, ValaDMAPDbClass))
+
+typedef struct _ValaDMAPDb ValaDMAPDb;
+typedef struct _ValaDMAPDbClass ValaDMAPDbClass;
+
+#define TYPE_VALA_DPAP_RECORD_FACTORY (vala_dpap_record_factory_get_type ())
+#define VALA_DPAP_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactory))
+#define VALA_DPAP_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactoryClass))
+#define IS_VALA_DPAP_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD_FACTORY))
+#define IS_VALA_DPAP_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD_FACTORY))
+#define VALA_DPAP_RECORD_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactoryClass))
+
+typedef struct _ValaDPAPRecordFactory ValaDPAPRecordFactory;
+typedef struct _ValaDPAPRecordFactoryClass ValaDPAPRecordFactoryClass;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+
+#define TYPE_VALA_DPAP_RECORD (vala_dpap_record_get_type ())
+#define VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecord))
+#define VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
+#define IS_VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD))
+#define IS_VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD))
+#define VALA_DPAP_RECORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
+
+typedef struct _ValaDPAPRecord ValaDPAPRecord;
+typedef struct _ValaDPAPRecordClass ValaDPAPRecordClass;
+#define _g_free0(var) (var = (g_free (var), NULL))
+#define _dpap_viewer_unref0(var) ((var == NULL) ? NULL : (var = (dpap_viewer_unref (var), NULL)))
+typedef struct _ParamSpecDPAPViewer ParamSpecDPAPViewer;
+#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
+
+struct _DPAPViewer {
+	GTypeInstance parent_instance;
+	volatile int ref_count;
+	DPAPViewerPrivate * priv;
+};
+
+struct _DPAPViewerClass {
+	GTypeClass parent_class;
+	void (*finalize) (DPAPViewer *self);
+};
+
+struct _DPAPViewerPrivate {
+	DMAPMdnsBrowser* browser;
+	DMAPConnection* connection;
+	GtkListStore* liststore;
+	ValaDMAPDb* db;
+	ValaDPAPRecordFactory* factory;
+};
+
+struct _ParamSpecDPAPViewer {
+	GParamSpec parent_instance;
+};
+
+
+static gpointer dpap_viewer_parent_class = NULL;
+
+gpointer dpap_viewer_ref (gpointer instance);
+void dpap_viewer_unref (gpointer instance);
+GParamSpec* param_spec_dpap_viewer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
+void value_set_dpap_viewer (GValue* value, gpointer v_object);
+void value_take_dpap_viewer (GValue* value, gpointer v_object);
+gpointer value_get_dpap_viewer (const GValue* value);
+GType dpap_viewer_get_type (void) G_GNUC_CONST;
+GType vala_dmap_db_get_type (void) G_GNUC_CONST;
+GType vala_dpap_record_factory_get_type (void) G_GNUC_CONST;
+#define DPAP_VIEWER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_DPAP_VIEWER, DPAPViewerPrivate))
+enum  {
+	DPAP_VIEWER_DUMMY_PROPERTY
+};
+static gboolean dpap_viewer_connected_cb (DPAPViewer* self, DMAPConnection* connection, gboolean _result_, const gchar* reason);
+static void _lambda0_ (gconstpointer k, gconstpointer v, DPAPViewer* self);
+GType vala_dpap_record_get_type (void) G_GNUC_CONST;
+GByteArray* vala_dpap_record_get_thumbnail (ValaDPAPRecord* self);
+const gchar* vala_dpap_record_get_filename (ValaDPAPRecord* self);
+static void __lambda0__gh_func (gconstpointer key, gconstpointer value, gpointer self);
+static void dpap_viewer_service_added_cb (DPAPViewer* self, DMAPMdnsBrowserService* service);
+static gboolean _dpap_viewer_connected_cb_dmap_connection_callback (DMAPConnection* connection, gboolean _result_, const gchar* reason, gpointer self);
+DPAPViewer* dpap_viewer_new (GtkBuilder* builder, GError** error);
+DPAPViewer* dpap_viewer_construct (GType object_type, GtkBuilder* builder, GError** error);
+ValaDMAPDb* vala_dmap_db_new (void);
+ValaDMAPDb* vala_dmap_db_construct (GType object_type);
+ValaDPAPRecordFactory* vala_dpap_record_factory_new (void);
+ValaDPAPRecordFactory* vala_dpap_record_factory_construct (GType object_type);
+static void _dpap_viewer_service_added_cb_dmap_mdns_browser_service_added (DMAPMdnsBrowser* _sender, void* service, gpointer self);
+static void dpap_viewer_finalize (DPAPViewer* obj);
+gint _vala_main (gchar** args, int args_length1);
+
+
+static void _lambda0_ (gconstpointer k, gconstpointer v, DPAPViewer* self) {
+	GdkPixbuf* pixbuf;
+	GByteArray* _tmp0_ = NULL;
+	GtkTreeIter iter = {0};
+	GtkTreeIter _tmp7_ = {0};
+	const gchar* _tmp8_ = NULL;
+	GError * _inner_error_ = NULL;
+	pixbuf = NULL;
+	_tmp0_ = vala_dpap_record_get_thumbnail (VALA_DPAP_RECORD (v));
+	if (_tmp0_ != NULL) {
+		gchar* path;
+		gchar* _tmp1_ = NULL;
+		gint _tmp2_;
+		gint fd;
+		GByteArray* _tmp3_ = NULL;
+		GdkPixbuf* _tmp4_ = NULL;
+		GdkPixbuf* _tmp5_;
+		GdkPixbuf* _tmp6_;
+		path = NULL;
+		_tmp2_ = g_file_open_tmp ("dpapview.XXXXXX", &_tmp1_, &_inner_error_);
+		_g_free0 (path);
+		path = _tmp1_;
+		fd = _tmp2_;
+		if (_inner_error_ != NULL) {
+			_g_free0 (path);
+			_g_object_unref0 (pixbuf);
+			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+			g_clear_error (&_inner_error_);
+			return;
+		}
+		_tmp3_ = vala_dpap_record_get_thumbnail (VALA_DPAP_RECORD (v));
+		g_file_set_contents (path, (const char*) _tmp3_->data, (size_t) ((gint) _tmp3_->len), &_inner_error_);
+		if (_inner_error_ != NULL) {
+			_g_free0 (path);
+			_g_object_unref0 (pixbuf);
+			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+			g_clear_error (&_inner_error_);
+			return;
+		}
+		close (fd);
+		_tmp4_ = gdk_pixbuf_new_from_file (path, &_inner_error_);
+		_tmp5_ = _tmp4_;
+		if (_inner_error_ != NULL) {
+			_g_free0 (path);
+			_g_object_unref0 (pixbuf);
+			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+			g_clear_error (&_inner_error_);
+			return;
+		}
+		_tmp6_ = _tmp5_;
+		_g_object_unref0 (pixbuf);
+		pixbuf = _tmp6_;
+		g_unlink (path);
+		_g_free0 (path);
+	}
+	gtk_list_store_append (self->priv->liststore, &_tmp7_);
+	iter = _tmp7_;
+	_tmp8_ = vala_dpap_record_get_filename (VALA_DPAP_RECORD (v));
+	gtk_list_store_set (self->priv->liststore, &iter, 0, pixbuf, 1, _tmp8_, -1);
+	_g_object_unref0 (pixbuf);
+}
+
+
+static void __lambda0__gh_func (gconstpointer key, gconstpointer value, gpointer self) {
+	_lambda0_ (key, value, self);
+}
+
+
+static gboolean dpap_viewer_connected_cb (DPAPViewer* self, DMAPConnection* connection, gboolean _result_, const gchar* reason) {
+	gboolean result = FALSE;
+	gint64 _tmp0_;
+	g_return_val_if_fail (self != NULL, FALSE);
+	g_return_val_if_fail (connection != NULL, FALSE);
+	_tmp0_ = dmap_db_count ((DMAPDb*) self->priv->db);
+	g_debug ("dpapview.vala:31: %lld entries\n", _tmp0_);
+	dmap_db_foreach ((DMAPDb*) self->priv->db, __lambda0__gh_func, self);
+	result = TRUE;
+	return result;
+}
+
+
+static gboolean _dpap_viewer_connected_cb_dmap_connection_callback (DMAPConnection* connection, gboolean _result_, const gchar* reason, gpointer self) {
+	gboolean result;
+	result = dpap_viewer_connected_cb (self, connection, _result_, reason);
+	return result;
+}
+
+
+static void dpap_viewer_service_added_cb (DPAPViewer* self, DMAPMdnsBrowserService* service) {
+	DPAPConnection* _tmp0_ = NULL;
+	DMAPConnection* _tmp1_;
+	g_return_if_fail (self != NULL);
+	_tmp0_ = dpap_connection_new (service->service_name, service->host, service->port, FALSE, (DMAPDb*) self->priv->db, (DMAPRecordFactory*) self->priv->factory);
+	_tmp1_ = DMAP_CONNECTION (_tmp0_);
+	_g_object_unref0 (self->priv->connection);
+	self->priv->connection = _tmp1_;
+	dmap_connection_connect (self->priv->connection, _dpap_viewer_connected_cb_dmap_connection_callback, self);
+}
+
+
+static gpointer _g_object_ref0 (gpointer self) {
+	return self ? g_object_ref (self) : NULL;
+}
+
+
+static void _dpap_viewer_service_added_cb_dmap_mdns_browser_service_added (DMAPMdnsBrowser* _sender, void* service, gpointer self) {
+	dpap_viewer_service_added_cb (self, service);
+}
+
+
+DPAPViewer* dpap_viewer_construct (GType object_type, GtkBuilder* builder, GError** error) {
+	DPAPViewer* self = NULL;
+	GObject* _tmp0_ = NULL;
+	GObject* _tmp1_;
+	GtkWidget* _tmp2_;
+	GtkWidget* widget;
+	GObject* _tmp3_ = NULL;
+	GObject* _tmp4_;
+	GtkIconView* _tmp5_;
+	GtkIconView* iconview;
+	GObject* _tmp6_ = NULL;
+	GObject* _tmp7_;
+	GtkListStore* _tmp8_;
+	GtkListStore* _tmp9_;
+	ValaDMAPDb* _tmp10_ = NULL;
+	ValaDMAPDb* _tmp11_;
+	ValaDPAPRecordFactory* _tmp12_ = NULL;
+	ValaDPAPRecordFactory* _tmp13_;
+	DMAPMdnsBrowser* _tmp14_ = NULL;
+	DMAPMdnsBrowser* _tmp15_;
+	GError * _inner_error_ = NULL;
+	g_return_val_if_fail (builder != NULL, NULL);
+	self = (DPAPViewer*) g_type_create_instance (object_type);
+	gtk_builder_connect_signals (builder, self);
+	_tmp0_ = gtk_builder_get_object (builder, "window");
+	_tmp2_ = _g_object_ref0 ((_tmp1_ = _tmp0_, GTK_IS_WIDGET (_tmp1_) ? ((GtkWidget*) _tmp1_) : NULL));
+	widget = _tmp2_;
+	_tmp3_ = gtk_builder_get_object (builder, "iconview");
+	_tmp5_ = _g_object_ref0 ((_tmp4_ = _tmp3_, GTK_IS_ICON_VIEW (_tmp4_) ? ((GtkIconView*) _tmp4_) : NULL));
+	iconview = _tmp5_;
+	_tmp6_ = gtk_builder_get_object (builder, "liststore");
+	_tmp8_ = _g_object_ref0 ((_tmp7_ = _tmp6_, GTK_IS_LIST_STORE (_tmp7_) ? ((GtkListStore*) _tmp7_) : NULL));
+	_tmp9_ = _tmp8_;
+	_g_object_unref0 (self->priv->liststore);
+	self->priv->liststore = _tmp9_;
+	_tmp10_ = vala_dmap_db_new ();
+	_tmp11_ = _tmp10_;
+	_g_object_unref0 (self->priv->db);
+	self->priv->db = _tmp11_;
+	_tmp12_ = vala_dpap_record_factory_new ();
+	_tmp13_ = _tmp12_;
+	_g_object_unref0 (self->priv->factory);
+	self->priv->factory = _tmp13_;
+	gtk_icon_view_set_pixbuf_column (iconview, 0);
+	gtk_icon_view_set_text_column (iconview, 1);
+	gtk_widget_show_all (widget);
+	_tmp14_ = dmap_mdns_browser_new (DMAP_MDNS_BROWSER_SERVICE_TYPE_DPAP);
+	_tmp15_ = _tmp14_;
+	_g_object_unref0 (self->priv->browser);
+	self->priv->browser = _tmp15_;
+	g_signal_connect (self->priv->browser, "service-added", (GCallback) _dpap_viewer_service_added_cb_dmap_mdns_browser_service_added, self);
+	dmap_mdns_browser_start (self->priv->browser, &_inner_error_);
+	if (_inner_error_ != NULL) {
+		g_propagate_error (error, _inner_error_);
+		_g_object_unref0 (iconview);
+		_g_object_unref0 (widget);
+		_dpap_viewer_unref0 (self);
+		return NULL;
+	}
+	_g_object_unref0 (iconview);
+	_g_object_unref0 (widget);
+	return self;
+}
+
+
+DPAPViewer* dpap_viewer_new (GtkBuilder* builder, GError** error) {
+	return dpap_viewer_construct (TYPE_DPAP_VIEWER, builder, error);
+}
+
+
+static void value_dpap_viewer_init (GValue* value) {
+	value->data[0].v_pointer = NULL;
+}
+
+
+static void value_dpap_viewer_free_value (GValue* value) {
+	if (value->data[0].v_pointer) {
+		dpap_viewer_unref (value->data[0].v_pointer);
+	}
+}
+
+
+static void value_dpap_viewer_copy_value (const GValue* src_value, GValue* dest_value) {
+	if (src_value->data[0].v_pointer) {
+		dest_value->data[0].v_pointer = dpap_viewer_ref (src_value->data[0].v_pointer);
+	} else {
+		dest_value->data[0].v_pointer = NULL;
+	}
+}
+
+
+static gpointer value_dpap_viewer_peek_pointer (const GValue* value) {
+	return value->data[0].v_pointer;
+}
+
+
+static gchar* value_dpap_viewer_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+	if (collect_values[0].v_pointer) {
+		DPAPViewer* object;
+		object = collect_values[0].v_pointer;
+		if (object->parent_instance.g_class == NULL) {
+			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
+			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
+		}
+		value->data[0].v_pointer = dpap_viewer_ref (object);
+	} else {
+		value->data[0].v_pointer = NULL;
+	}
+	return NULL;
+}
+
+
+static gchar* value_dpap_viewer_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
+	DPAPViewer** object_p;
+	object_p = collect_values[0].v_pointer;
+	if (!object_p) {
+		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
+	}
+	if (!value->data[0].v_pointer) {
+		*object_p = NULL;
+	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
+		*object_p = value->data[0].v_pointer;
+	} else {
+		*object_p = dpap_viewer_ref (value->data[0].v_pointer);
+	}
+	return NULL;
+}
+
+
+GParamSpec* param_spec_dpap_viewer (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
+	ParamSpecDPAPViewer* spec;
+	g_return_val_if_fail (g_type_is_a (object_type, TYPE_DPAP_VIEWER), NULL);
+	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
+	G_PARAM_SPEC (spec)->value_type = object_type;
+	return G_PARAM_SPEC (spec);
+}
+
+
+gpointer value_get_dpap_viewer (const GValue* value) {
+	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DPAP_VIEWER), NULL);
+	return value->data[0].v_pointer;
+}
+
+
+void value_set_dpap_viewer (GValue* value, gpointer v_object) {
+	DPAPViewer* old;
+	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DPAP_VIEWER));
+	old = value->data[0].v_pointer;
+	if (v_object) {
+		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_DPAP_VIEWER));
+		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+		value->data[0].v_pointer = v_object;
+		dpap_viewer_ref (value->data[0].v_pointer);
+	} else {
+		value->data[0].v_pointer = NULL;
+	}
+	if (old) {
+		dpap_viewer_unref (old);
+	}
+}
+
+
+void value_take_dpap_viewer (GValue* value, gpointer v_object) {
+	DPAPViewer* old;
+	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_DPAP_VIEWER));
+	old = value->data[0].v_pointer;
+	if (v_object) {
+		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_DPAP_VIEWER));
+		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
+		value->data[0].v_pointer = v_object;
+	} else {
+		value->data[0].v_pointer = NULL;
+	}
+	if (old) {
+		dpap_viewer_unref (old);
+	}
+}
+
+
+static void dpap_viewer_class_init (DPAPViewerClass * klass) {
+	dpap_viewer_parent_class = g_type_class_peek_parent (klass);
+	DPAP_VIEWER_CLASS (klass)->finalize = dpap_viewer_finalize;
+	g_type_class_add_private (klass, sizeof (DPAPViewerPrivate));
+}
+
+
+static void dpap_viewer_instance_init (DPAPViewer * self) {
+	self->priv = DPAP_VIEWER_GET_PRIVATE (self);
+	self->ref_count = 1;
+}
+
+
+static void dpap_viewer_finalize (DPAPViewer* obj) {
+	DPAPViewer * self;
+	self = DPAP_VIEWER (obj);
+	_g_object_unref0 (self->priv->browser);
+	_g_object_unref0 (self->priv->connection);
+	_g_object_unref0 (self->priv->liststore);
+	_g_object_unref0 (self->priv->db);
+	_g_object_unref0 (self->priv->factory);
+}
+
+
+GType dpap_viewer_get_type (void) {
+	static volatile gsize dpap_viewer_type_id__volatile = 0;
+	if (g_once_init_enter (&dpap_viewer_type_id__volatile)) {
+		static const GTypeValueTable g_define_type_value_table = { value_dpap_viewer_init, value_dpap_viewer_free_value, value_dpap_viewer_copy_value, value_dpap_viewer_peek_pointer, "p", value_dpap_viewer_collect_value, "p", value_dpap_viewer_lcopy_value };
+		static const GTypeInfo g_define_type_info = { sizeof (DPAPViewerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) dpap_viewer_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DPAPViewer), 0, (GInstanceInitFunc) dpap_viewer_instance_init, &g_define_type_value_table };
+		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
+		GType dpap_viewer_type_id;
+		dpap_viewer_type_id = g_type_register_fundamental (g_type_fundamental_next (), "DPAPViewer", &g_define_type_info, &g_define_type_fundamental_info, 0);
+		g_once_init_leave (&dpap_viewer_type_id__volatile, dpap_viewer_type_id);
+	}
+	return dpap_viewer_type_id__volatile;
+}
+
+
+gpointer dpap_viewer_ref (gpointer instance) {
+	DPAPViewer* self;
+	self = instance;
+	g_atomic_int_inc (&self->ref_count);
+	return instance;
+}
+
+
+void dpap_viewer_unref (gpointer instance) {
+	DPAPViewer* self;
+	self = instance;
+	if (g_atomic_int_dec_and_test (&self->ref_count)) {
+		DPAP_VIEWER_GET_CLASS (self)->finalize (self);
+		g_type_free_instance ((GTypeInstance *) self);
+	}
+}
+
+
+gint _vala_main (gchar** args, int args_length1) {
+	gint result = 0;
+	GtkBuilder* _tmp0_ = NULL;
+	GtkBuilder* builder;
+	DPAPViewer* _tmp1_ = NULL;
+	DPAPViewer* dpapviewer;
+	GError * _inner_error_ = NULL;
+	gtk_init (&args_length1, &args);
+	_tmp0_ = gtk_builder_new ();
+	builder = _tmp0_;
+	gtk_builder_add_from_file (builder, "tests/dpapview.ui", &_inner_error_);
+	if (_inner_error_ != NULL) {
+		_g_object_unref0 (builder);
+		goto __catch0_g_error;
+	}
+	_tmp1_ = dpap_viewer_new (builder, &_inner_error_);
+	dpapviewer = _tmp1_;
+	if (_inner_error_ != NULL) {
+		_g_object_unref0 (builder);
+		goto __catch0_g_error;
+	}
+	gtk_main ();
+	_dpap_viewer_unref0 (dpapviewer);
+	_g_object_unref0 (builder);
+	goto __finally0;
+	__catch0_g_error:
+	{
+		GError * e;
+		e = _inner_error_;
+		_inner_error_ = NULL;
+		fprintf (stderr, "Error: %s\n", e->message);
+		result = 1;
+		_g_error_free0 (e);
+		return result;
+	}
+	__finally0:
+	if (_inner_error_ != NULL) {
+		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+		g_clear_error (&_inner_error_);
+		return 0;
+	}
+	result = 0;
+	return result;
+}
+
+
+int main (int argc, char ** argv) {
+	g_type_init ();
+	return _vala_main (argv, argc);
+}
+
+
+
diff --git a/tests/vala-dmap-container-db.c b/tests/vala-dmap-container-db.c
new file mode 100644
index 0000000..36fbc70
--- /dev/null
+++ b/tests/vala-dmap-container-db.c
@@ -0,0 +1,179 @@
+/* vala-dmap-container-db.c generated by valac 0.11.4, the Vala compiler
+ * generated from vala-dmap-container-db.vala, do not modify */
+
+/*   FILE: vala-dmap-db.vala -- A DMAPContainerDb implementation in Vala
+ * AUTHOR: W. Michael Petullo <mike flyn org>
+ *   DATE: 21 December 2010 
+ *
+ * Copyright (c) 2010 W. Michael Petullo <new flyn org>
+ * All rights reserved.
+ *
+ * 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 <glib.h>
+#include <glib-object.h>
+#include <libdmapsharing/dmap.h>
+#include <gee.h>
+
+
+#define TYPE_VALA_DMAP_CONTAINER_DB (vala_dmap_container_db_get_type ())
+#define VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDb))
+#define VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbClass))
+#define IS_VALA_DMAP_CONTAINER_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DMAP_CONTAINER_DB))
+#define IS_VALA_DMAP_CONTAINER_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DMAP_CONTAINER_DB))
+#define VALA_DMAP_CONTAINER_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbClass))
+
+typedef struct _ValaDMAPContainerDb ValaDMAPContainerDb;
+typedef struct _ValaDMAPContainerDbClass ValaDMAPContainerDbClass;
+typedef struct _ValaDMAPContainerDbPrivate ValaDMAPContainerDbPrivate;
+#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
+
+struct _ValaDMAPContainerDb {
+	GObject parent_instance;
+	ValaDMAPContainerDbPrivate * priv;
+};
+
+struct _ValaDMAPContainerDbClass {
+	GObjectClass parent_class;
+};
+
+struct _ValaDMAPContainerDbPrivate {
+	GeeArrayList* db;
+};
+
+
+static gpointer vala_dmap_container_db_parent_class = NULL;
+static DMAPContainerDbIface* vala_dmap_container_db_dmap_container_db_parent_iface = NULL;
+
+GType vala_dmap_container_db_get_type (void) G_GNUC_CONST;
+#define VALA_DMAP_CONTAINER_DB_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_VALA_DMAP_CONTAINER_DB, ValaDMAPContainerDbPrivate))
+enum  {
+	VALA_DMAP_CONTAINER_DB_DUMMY_PROPERTY
+};
+static gint64 vala_dmap_container_db_real_count (DMAPContainerDb* base);
+static void vala_dmap_container_db_real_foreach (DMAPContainerDb* base, GHFunc func, void* func_target);
+static DMAPContainerRecord* vala_dmap_container_db_real_lookup_by_id (DMAPContainerDb* base, guint id);
+ValaDMAPContainerDb* vala_dmap_container_db_new (void);
+ValaDMAPContainerDb* vala_dmap_container_db_construct (GType object_type);
+static void vala_dmap_container_db_finalize (GObject* obj);
+
+
+static gint64 vala_dmap_container_db_real_count (DMAPContainerDb* base) {
+	ValaDMAPContainerDb * self;
+	gint64 result = 0LL;
+	gint _tmp0_;
+	self = (ValaDMAPContainerDb*) base;
+	_tmp0_ = gee_collection_get_size ((GeeCollection*) self->priv->db);
+	result = (gint64) _tmp0_;
+	return result;
+}
+
+
+static void vala_dmap_container_db_real_foreach (DMAPContainerDb* base, GHFunc func, void* func_target) {
+	ValaDMAPContainerDb * self;
+	gint i = 0;
+	self = (ValaDMAPContainerDb*) base;
+	{
+		gboolean _tmp0_;
+		i = 0;
+		_tmp0_ = TRUE;
+		while (TRUE) {
+			gint _tmp1_;
+			void* _tmp2_ = NULL;
+			gpointer _tmp3_ = NULL;
+			if (!_tmp0_) {
+				i++;
+			}
+			_tmp0_ = FALSE;
+			_tmp1_ = gee_collection_get_size ((GeeCollection*) self->priv->db);
+			if (!(i < _tmp1_)) {
+				break;
+			}
+			_tmp2_ = GINT_TO_POINTER (i);
+			_tmp3_ = gee_abstract_list_get ((GeeAbstractList*) self->priv->db, i);
+			func (_tmp2_, (DMAPRecord*) _tmp3_, func_target);
+		}
+	}
+}
+
+
+static DMAPContainerRecord* vala_dmap_container_db_real_lookup_by_id (DMAPContainerDb* base, guint id) {
+	ValaDMAPContainerDb * self;
+	DMAPContainerRecord* result = NULL;
+	self = (ValaDMAPContainerDb*) base;
+	g_error ("vala-dmap-container-db.vala:41: lookup_by_id not implemented");
+	return result;
+}
+
+
+ValaDMAPContainerDb* vala_dmap_container_db_construct (GType object_type) {
+	ValaDMAPContainerDb * self = NULL;
+	self = (ValaDMAPContainerDb*) g_object_new (object_type, NULL);
+	return self;
+}
+
+
+ValaDMAPContainerDb* vala_dmap_container_db_new (void) {
+	return vala_dmap_container_db_construct (TYPE_VALA_DMAP_CONTAINER_DB);
+}
+
+
+static void vala_dmap_container_db_class_init (ValaDMAPContainerDbClass * klass) {
+	vala_dmap_container_db_parent_class = g_type_class_peek_parent (klass);
+	g_type_class_add_private (klass, sizeof (ValaDMAPContainerDbPrivate));
+	G_OBJECT_CLASS (klass)->finalize = vala_dmap_container_db_finalize;
+}
+
+
+static void vala_dmap_container_db_dmap_container_db_interface_init (DMAPContainerDbIface * iface) {
+	vala_dmap_container_db_dmap_container_db_parent_iface = g_type_interface_peek_parent (iface);
+	iface->count = (gint64 (*)(DMAPContainerDb*)) vala_dmap_container_db_real_count;
+	iface->foreach = (void (*)(DMAPContainerDb* ,GHFunc ,void*)) vala_dmap_container_db_real_foreach;
+	iface->lookup_by_id = (DMAPContainerRecord* (*)(DMAPContainerDb* ,guint)) vala_dmap_container_db_real_lookup_by_id;
+}
+
+
+static void vala_dmap_container_db_instance_init (ValaDMAPContainerDb * self) {
+	GeeArrayList* _tmp0_ = NULL;
+	self->priv = VALA_DMAP_CONTAINER_DB_GET_PRIVATE (self);
+	_tmp0_ = gee_array_list_new (DMAP_TYPE_RECORD, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL);
+	self->priv->db = _tmp0_;
+}
+
+
+static void vala_dmap_container_db_finalize (GObject* obj) {
+	ValaDMAPContainerDb * self;
+	self = VALA_DMAP_CONTAINER_DB (obj);
+	_g_object_unref0 (self->priv->db);
+	G_OBJECT_CLASS (vala_dmap_container_db_parent_class)->finalize (obj);
+}
+
+
+GType vala_dmap_container_db_get_type (void) {
+	static volatile gsize vala_dmap_container_db_type_id__volatile = 0;
+	if (g_once_init_enter (&vala_dmap_container_db_type_id__volatile)) {
+		static const GTypeInfo g_define_type_info = { sizeof (ValaDMAPContainerDbClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dmap_container_db_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaDMAPContainerDb), 0, (GInstanceInitFunc) vala_dmap_container_db_instance_init, NULL };
+		static const GInterfaceInfo dmap_container_db_info = { (GInterfaceInitFunc) vala_dmap_container_db_dmap_container_db_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
+		GType vala_dmap_container_db_type_id;
+		vala_dmap_container_db_type_id = g_type_register_static (G_TYPE_OBJECT, "ValaDMAPContainerDb", &g_define_type_info, 0);
+		g_type_add_interface_static (vala_dmap_container_db_type_id, DMAP_TYPE_CONTAINER_DB, &dmap_container_db_info);
+		g_once_init_leave (&vala_dmap_container_db_type_id__volatile, vala_dmap_container_db_type_id);
+	}
+	return vala_dmap_container_db_type_id__volatile;
+}
+
+
+
diff --git a/tests/vala-dpap-record.c b/tests/vala-dpap-record.c
new file mode 100644
index 0000000..879ac3e
--- /dev/null
+++ b/tests/vala-dpap-record.c
@@ -0,0 +1,672 @@
+/* vala-dpap-record.c generated by valac 0.11.4, the Vala compiler
+ * generated from vala-dpap-record.vala, do not modify */
+
+/*   FILE: vala-dpap-record.vala -- A DPAPRecord implementation in Vala
+ * AUTHOR: W. Michael Petullo <mike flyn org>
+ *   DATE: 21 December 2010
+ *
+ * Copyright (c) 2010 W. Michael Petullo <new flyn org>
+ * All rights reserved.
+ *
+ * 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 <glib.h>
+#include <glib-object.h>
+#include <libdmapsharing/dmap.h>
+#include <stdlib.h>
+#include <string.h>
+#include <gio/gio.h>
+#include <glib/gstdio.h>
+
+
+#define TYPE_VALA_DPAP_RECORD (vala_dpap_record_get_type ())
+#define VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecord))
+#define VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
+#define IS_VALA_DPAP_RECORD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD))
+#define IS_VALA_DPAP_RECORD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD))
+#define VALA_DPAP_RECORD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordClass))
+
+typedef struct _ValaDPAPRecord ValaDPAPRecord;
+typedef struct _ValaDPAPRecordClass ValaDPAPRecordClass;
+typedef struct _ValaDPAPRecordPrivate ValaDPAPRecordPrivate;
+#define _g_free0(var) (var = (g_free (var), NULL))
+#define _g_byte_array_free0(var) ((var == NULL) ? NULL : (var = (g_byte_array_free (var, TRUE), NULL)))
+
+#define TYPE_VALA_DPAP_RECORD_FACTORY (vala_dpap_record_factory_get_type ())
+#define VALA_DPAP_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactory))
+#define VALA_DPAP_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactoryClass))
+#define IS_VALA_DPAP_RECORD_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VALA_DPAP_RECORD_FACTORY))
+#define IS_VALA_DPAP_RECORD_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VALA_DPAP_RECORD_FACTORY))
+#define VALA_DPAP_RECORD_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VALA_DPAP_RECORD_FACTORY, ValaDPAPRecordFactoryClass))
+
+typedef struct _ValaDPAPRecordFactory ValaDPAPRecordFactory;
+typedef struct _ValaDPAPRecordFactoryClass ValaDPAPRecordFactoryClass;
+typedef struct _ValaDPAPRecordFactoryPrivate ValaDPAPRecordFactoryPrivate;
+
+struct _ValaDPAPRecord {
+	GObject parent_instance;
+	ValaDPAPRecordPrivate * priv;
+};
+
+struct _ValaDPAPRecordClass {
+	GObjectClass parent_class;
+};
+
+struct _ValaDPAPRecordPrivate {
+	gchar* _location;
+	gchar* _filename;
+	gchar* _aspect_ratio;
+	gchar* _format;
+	gchar* _comments;
+	GByteArray* _thumbnail;
+	gint _large_filesize;
+	gint _pixel_height;
+	gint _pixel_width;
+	gint _rating;
+	gint _creation_date;
+};
+
+struct _ValaDPAPRecordFactory {
+	GObject parent_instance;
+	ValaDPAPRecordFactoryPrivate * priv;
+};
+
+struct _ValaDPAPRecordFactoryClass {
+	GObjectClass parent_class;
+};
+
+
+static gpointer vala_dpap_record_parent_class = NULL;
+static DMAPRecordIface* vala_dpap_record_dmap_record_parent_iface = NULL;
+static DPAPRecordIface* vala_dpap_record_dpap_record_parent_iface = NULL;
+static gpointer vala_dpap_record_factory_parent_class = NULL;
+static DMAPRecordFactoryIface* vala_dpap_record_factory_dmap_record_factory_parent_iface = NULL;
+
+GType vala_dpap_record_get_type (void) G_GNUC_CONST;
+#define VALA_DPAP_RECORD_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_VALA_DPAP_RECORD, ValaDPAPRecordPrivate))
+enum  {
+	VALA_DPAP_RECORD_DUMMY_PROPERTY,
+	VALA_DPAP_RECORD_LOCATION,
+	VALA_DPAP_RECORD_FILENAME,
+	VALA_DPAP_RECORD_ASPECT_RATIO,
+	VALA_DPAP_RECORD_FORMAT,
+	VALA_DPAP_RECORD_THUMBNAIL,
+	VALA_DPAP_RECORD_COMMENTS,
+	VALA_DPAP_RECORD_LARGE_FILESIZE,
+	VALA_DPAP_RECORD_PIXEL_HEIGHT,
+	VALA_DPAP_RECORD_PIXEL_WIDTH,
+	VALA_DPAP_RECORD_RATING,
+	VALA_DPAP_RECORD_CREATION_DATE
+};
+static GInputStream* vala_dpap_record_real_read (DPAPRecord* base, GError** error);
+static DMAPRecord* vala_dpap_record_real_set_from_blob (DMAPRecord* base, GByteArray* blob);
+static GByteArray* vala_dpap_record_real_to_blob (DMAPRecord* base);
+ValaDPAPRecord* vala_dpap_record_new (void);
+ValaDPAPRecord* vala_dpap_record_construct (GType object_type);
+const gchar* vala_dpap_record_get_location (ValaDPAPRecord* self);
+void vala_dpap_record_set_location (ValaDPAPRecord* self, const gchar* value);
+const gchar* vala_dpap_record_get_filename (ValaDPAPRecord* self);
+void vala_dpap_record_set_filename (ValaDPAPRecord* self, const gchar* value);
+const gchar* vala_dpap_record_get_aspect_ratio (ValaDPAPRecord* self);
+void vala_dpap_record_set_aspect_ratio (ValaDPAPRecord* self, const gchar* value);
+const gchar* vala_dpap_record_get_format (ValaDPAPRecord* self);
+void vala_dpap_record_set_format (ValaDPAPRecord* self, const gchar* value);
+GByteArray* vala_dpap_record_get_thumbnail (ValaDPAPRecord* self);
+void vala_dpap_record_set_thumbnail (ValaDPAPRecord* self, GByteArray* value);
+const gchar* vala_dpap_record_get_comments (ValaDPAPRecord* self);
+void vala_dpap_record_set_comments (ValaDPAPRecord* self, const gchar* value);
+gint vala_dpap_record_get_large_filesize (ValaDPAPRecord* self);
+void vala_dpap_record_set_large_filesize (ValaDPAPRecord* self, gint value);
+gint vala_dpap_record_get_pixel_height (ValaDPAPRecord* self);
+void vala_dpap_record_set_pixel_height (ValaDPAPRecord* self, gint value);
+gint vala_dpap_record_get_pixel_width (ValaDPAPRecord* self);
+void vala_dpap_record_set_pixel_width (ValaDPAPRecord* self, gint value);
+gint vala_dpap_record_get_rating (ValaDPAPRecord* self);
+void vala_dpap_record_set_rating (ValaDPAPRecord* self, gint value);
+gint vala_dpap_record_get_creation_date (ValaDPAPRecord* self);
+void vala_dpap_record_set_creation_date (ValaDPAPRecord* self, gint value);
+static void vala_dpap_record_finalize (GObject* obj);
+static void _vala_vala_dpap_record_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
+static void _vala_vala_dpap_record_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
+GType vala_dpap_record_factory_get_type (void) G_GNUC_CONST;
+enum  {
+	VALA_DPAP_RECORD_FACTORY_DUMMY_PROPERTY
+};
+static DMAPRecord* vala_dpap_record_factory_real_create (DMAPRecordFactory* base, void* user_data);
+ValaDPAPRecordFactory* vala_dpap_record_factory_new (void);
+ValaDPAPRecordFactory* vala_dpap_record_factory_construct (GType object_type);
+
+
+static GInputStream* vala_dpap_record_real_read (DPAPRecord* base, GError** error) {
+	ValaDPAPRecord * self;
+	GInputStream* result = NULL;
+	self = (ValaDPAPRecord*) base;
+	g_error ("vala-dpap-record.vala:95: read not implemented");
+	return result;
+}
+
+
+static DMAPRecord* vala_dpap_record_real_set_from_blob (DMAPRecord* base, GByteArray* blob) {
+	ValaDPAPRecord * self;
+	DMAPRecord* result = NULL;
+	self = (ValaDPAPRecord*) base;
+	g_return_val_if_fail (blob != NULL, NULL);
+	g_error ("vala-dpap-record.vala:99: set_from_blob not implemented");
+	return result;
+}
+
+
+static GByteArray* vala_dpap_record_real_to_blob (DMAPRecord* base) {
+	ValaDPAPRecord * self;
+	GByteArray* result = NULL;
+	self = (ValaDPAPRecord*) base;
+	g_error ("vala-dpap-record.vala:103: to_blob not implemented");
+	return result;
+}
+
+
+ValaDPAPRecord* vala_dpap_record_construct (GType object_type) {
+	ValaDPAPRecord * self = NULL;
+	gchar* _tmp0_ = NULL;
+	gchar* _tmp1_;
+	gchar* _tmp2_;
+	gchar* _tmp3_;
+	gchar* _tmp4_;
+	gchar* _tmp5_;
+	gchar* _tmp6_ = NULL;
+	gchar* _tmp7_;
+	gchar* _tmp8_;
+	gchar* _tmp9_;
+	gchar* _tmp10_;
+	gchar* _tmp11_;
+	gchar* _tmp12_ = NULL;
+	gchar* _tmp13_;
+	gchar* _tmp14_;
+	gchar* path;
+	gint data_length1;
+	gint _data_size_;
+	guint8* data;
+	guint8* _tmp15_ = NULL;
+	size_t _tmp16_;
+	GByteArray* _tmp17_ = NULL;
+	GByteArray* _tmp18_;
+	GError * _inner_error_ = NULL;
+	self = (ValaDPAPRecord*) g_object_new (object_type, NULL);
+	_tmp0_ = g_get_current_dir ();
+	_tmp1_ = _tmp0_;
+	_tmp2_ = g_strconcat ("file://", _tmp1_, NULL);
+	_tmp3_ = g_strconcat (_tmp2_, "/media/test.jpeg", NULL);
+	_g_free0 (self->priv->_location);
+	self->priv->_location = _tmp3_;
+	_g_free0 (_tmp2_);
+	_g_free0 (_tmp1_);
+	_tmp4_ = g_strdup ("1.333");
+	_tmp5_ = _tmp4_;
+	_g_free0 (self->priv->_aspect_ratio);
+	self->priv->_aspect_ratio = _tmp5_;
+	_tmp6_ = g_path_get_basename (self->priv->_location);
+	_tmp7_ = _tmp6_;
+	_g_free0 (self->priv->_filename);
+	self->priv->_filename = _tmp7_;
+	_tmp8_ = g_strdup ("JPEG");
+	_tmp9_ = _tmp8_;
+	_g_free0 (self->priv->_format);
+	self->priv->_format = _tmp9_;
+	_tmp10_ = g_strdup ("Comments");
+	_tmp11_ = _tmp10_;
+	_g_free0 (self->priv->_comments);
+	self->priv->_comments = _tmp11_;
+	self->priv->_large_filesize = 13953;
+	self->priv->_pixel_height = 480;
+	self->priv->_pixel_width = 640;
+	self->priv->_rating = 5;
+	self->priv->_creation_date = 0;
+	_tmp12_ = g_get_current_dir ();
+	_tmp13_ = _tmp12_;
+	path = (_tmp14_ = g_strconcat (_tmp13_, "/media/test.jpeg", NULL), _g_free0 (_tmp13_), _tmp14_);
+	data_length1 = 0;
+	data = NULL;
+	g_file_get_contents (path, (gchar**) (&_tmp15_), &_tmp16_, &_inner_error_);
+	data = (g_free (data), NULL);
+	data = _tmp15_;
+	data_length1 = _tmp16_;
+	if (_inner_error_ != NULL) {
+		data = (g_free (data), NULL);
+		_g_free0 (path);
+		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
+		g_clear_error (&_inner_error_);
+		return NULL;
+	}
+	_tmp17_ = g_byte_array_new ();
+	_tmp18_ = _tmp17_;
+	_g_byte_array_free0 (self->priv->_thumbnail);
+	self->priv->_thumbnail = _tmp18_;
+	g_byte_array_append (self->priv->_thumbnail, data, data_length1);
+	data = (g_free (data), NULL);
+	_g_free0 (path);
+	return self;
+}
+
+
+ValaDPAPRecord* vala_dpap_record_new (void) {
+	return vala_dpap_record_construct (TYPE_VALA_DPAP_RECORD);
+}
+
+
+const gchar* vala_dpap_record_get_location (ValaDPAPRecord* self) {
+	const gchar* result;
+	g_return_val_if_fail (self != NULL, NULL);
+	result = self->priv->_location;
+	return result;
+}
+
+
+void vala_dpap_record_set_location (ValaDPAPRecord* self, const gchar* value) {
+	gchar* _tmp0_;
+	gchar* _tmp1_;
+	g_return_if_fail (self != NULL);
+	_tmp0_ = g_strdup (value);
+	_tmp1_ = _tmp0_;
+	_g_free0 (self->priv->_location);
+	self->priv->_location = _tmp1_;
+	g_object_notify ((GObject *) self, "location");
+}
+
+
+const gchar* vala_dpap_record_get_filename (ValaDPAPRecord* self) {
+	const gchar* result;
+	g_return_val_if_fail (self != NULL, NULL);
+	result = self->priv->_filename;
+	return result;
+}
+
+
+void vala_dpap_record_set_filename (ValaDPAPRecord* self, const gchar* value) {
+	gchar* _tmp0_;
+	gchar* _tmp1_;
+	g_return_if_fail (self != NULL);
+	_tmp0_ = g_strdup (value);
+	_tmp1_ = _tmp0_;
+	_g_free0 (self->priv->_filename);
+	self->priv->_filename = _tmp1_;
+	g_object_notify ((GObject *) self, "filename");
+}
+
+
+const gchar* vala_dpap_record_get_aspect_ratio (ValaDPAPRecord* self) {
+	const gchar* result;
+	g_return_val_if_fail (self != NULL, NULL);
+	result = self->priv->_aspect_ratio;
+	return result;
+}
+
+
+void vala_dpap_record_set_aspect_ratio (ValaDPAPRecord* self, const gchar* value) {
+	gchar* _tmp0_;
+	gchar* _tmp1_;
+	g_return_if_fail (self != NULL);
+	_tmp0_ = g_strdup (value);
+	_tmp1_ = _tmp0_;
+	_g_free0 (self->priv->_aspect_ratio);
+	self->priv->_aspect_ratio = _tmp1_;
+	g_object_notify ((GObject *) self, "aspect-ratio");
+}
+
+
+const gchar* vala_dpap_record_get_format (ValaDPAPRecord* self) {
+	const gchar* result;
+	g_return_val_if_fail (self != NULL, NULL);
+	result = self->priv->_format;
+	return result;
+}
+
+
+void vala_dpap_record_set_format (ValaDPAPRecord* self, const gchar* value) {
+	gchar* _tmp0_;
+	gchar* _tmp1_;
+	g_return_if_fail (self != NULL);
+	_tmp0_ = g_strdup (value);
+	_tmp1_ = _tmp0_;
+	_g_free0 (self->priv->_format);
+	self->priv->_format = _tmp1_;
+	g_object_notify ((GObject *) self, "format");
+}
+
+
+GByteArray* vala_dpap_record_get_thumbnail (ValaDPAPRecord* self) {
+	GByteArray* result;
+	g_return_val_if_fail (self != NULL, NULL);
+	result = self->priv->_thumbnail;
+	return result;
+}
+
+
+void vala_dpap_record_set_thumbnail (ValaDPAPRecord* self, GByteArray* value) {
+	GByteArray* _tmp0_ = NULL;
+	GByteArray* _tmp1_;
+	g_return_if_fail (self != NULL);
+	_tmp0_ = g_byte_array_new ();
+	_tmp1_ = _tmp0_;
+	_g_byte_array_free0 (self->priv->_thumbnail);
+	self->priv->_thumbnail = _tmp1_;
+	g_byte_array_append (self->priv->_thumbnail, value->data, (gint) value->len);
+	g_object_notify ((GObject *) self, "thumbnail");
+}
+
+
+const gchar* vala_dpap_record_get_comments (ValaDPAPRecord* self) {
+	const gchar* result;
+	g_return_val_if_fail (self != NULL, NULL);
+	result = self->priv->_comments;
+	return result;
+}
+
+
+void vala_dpap_record_set_comments (ValaDPAPRecord* self, const gchar* value) {
+	gchar* _tmp0_;
+	gchar* _tmp1_;
+	g_return_if_fail (self != NULL);
+	_tmp0_ = g_strdup (value);
+	_tmp1_ = _tmp0_;
+	_g_free0 (self->priv->_comments);
+	self->priv->_comments = _tmp1_;
+	g_object_notify ((GObject *) self, "comments");
+}
+
+
+gint vala_dpap_record_get_large_filesize (ValaDPAPRecord* self) {
+	gint result;
+	g_return_val_if_fail (self != NULL, 0);
+	result = self->priv->_large_filesize;
+	return result;
+}
+
+
+void vala_dpap_record_set_large_filesize (ValaDPAPRecord* self, gint value) {
+	g_return_if_fail (self != NULL);
+	self->priv->_large_filesize = value;
+	g_object_notify ((GObject *) self, "large-filesize");
+}
+
+
+gint vala_dpap_record_get_pixel_height (ValaDPAPRecord* self) {
+	gint result;
+	g_return_val_if_fail (self != NULL, 0);
+	result = self->priv->_pixel_height;
+	return result;
+}
+
+
+void vala_dpap_record_set_pixel_height (ValaDPAPRecord* self, gint value) {
+	g_return_if_fail (self != NULL);
+	self->priv->_pixel_height = value;
+	g_object_notify ((GObject *) self, "pixel-height");
+}
+
+
+gint vala_dpap_record_get_pixel_width (ValaDPAPRecord* self) {
+	gint result;
+	g_return_val_if_fail (self != NULL, 0);
+	result = self->priv->_pixel_width;
+	return result;
+}
+
+
+void vala_dpap_record_set_pixel_width (ValaDPAPRecord* self, gint value) {
+	g_return_if_fail (self != NULL);
+	self->priv->_pixel_width = value;
+	g_object_notify ((GObject *) self, "pixel-width");
+}
+
+
+gint vala_dpap_record_get_rating (ValaDPAPRecord* self) {
+	gint result;
+	g_return_val_if_fail (self != NULL, 0);
+	result = self->priv->_rating;
+	return result;
+}
+
+
+void vala_dpap_record_set_rating (ValaDPAPRecord* self, gint value) {
+	g_return_if_fail (self != NULL);
+	self->priv->_rating = value;
+	g_object_notify ((GObject *) self, "rating");
+}
+
+
+gint vala_dpap_record_get_creation_date (ValaDPAPRecord* self) {
+	gint result;
+	g_return_val_if_fail (self != NULL, 0);
+	result = self->priv->_creation_date;
+	return result;
+}
+
+
+void vala_dpap_record_set_creation_date (ValaDPAPRecord* self, gint value) {
+	g_return_if_fail (self != NULL);
+	self->priv->_creation_date = value;
+	g_object_notify ((GObject *) self, "creation-date");
+}
+
+
+static void vala_dpap_record_class_init (ValaDPAPRecordClass * klass) {
+	vala_dpap_record_parent_class = g_type_class_peek_parent (klass);
+	g_type_class_add_private (klass, sizeof (ValaDPAPRecordPrivate));
+	G_OBJECT_CLASS (klass)->get_property = _vala_vala_dpap_record_get_property;
+	G_OBJECT_CLASS (klass)->set_property = _vala_vala_dpap_record_set_property;
+	G_OBJECT_CLASS (klass)->finalize = vala_dpap_record_finalize;
+	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_LOCATION, g_param_spec_string ("location", "location", "location", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_FILENAME, g_param_spec_string ("filename", "filename", "filename", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_ASPECT_RATIO, g_param_spec_string ("aspect-ratio", "aspect-ratio", "aspect-ratio", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_FORMAT, g_param_spec_string ("format", "format", "format", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_THUMBNAIL, g_param_spec_pointer ("thumbnail", "thumbnail", "thumbnail", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_COMMENTS, g_param_spec_string ("comments", "comments", "comments", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_LARGE_FILESIZE, g_param_spec_int ("large-filesize", "large-filesize", "large-filesize", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_PIXEL_HEIGHT, g_param_spec_int ("pixel-height", "pixel-height", "pixel-height", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_PIXEL_WIDTH, g_param_spec_int ("pixel-width", "pixel-width", "pixel-width", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_RATING, g_param_spec_int ("rating", "rating", "rating", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+	g_object_class_install_property (G_OBJECT_CLASS (klass), VALA_DPAP_RECORD_CREATION_DATE, g_param_spec_int ("creation-date", "creation-date", "creation-date", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
+}
+
+
+static void vala_dpap_record_dmap_record_interface_init (DMAPRecordIface * iface) {
+	vala_dpap_record_dmap_record_parent_iface = g_type_interface_peek_parent (iface);
+	iface->set_from_blob = (DMAPRecord* (*)(DMAPRecord* ,GByteArray*)) vala_dpap_record_real_set_from_blob;
+	iface->to_blob = (GByteArray* (*)(DMAPRecord*)) vala_dpap_record_real_to_blob;
+}
+
+
+static void vala_dpap_record_dpap_record_interface_init (DPAPRecordIface * iface) {
+	vala_dpap_record_dpap_record_parent_iface = g_type_interface_peek_parent (iface);
+	iface->read = (GInputStream* (*)(DPAPRecord* ,GError**)) vala_dpap_record_real_read;
+}
+
+
+static void vala_dpap_record_instance_init (ValaDPAPRecord * self) {
+	self->priv = VALA_DPAP_RECORD_GET_PRIVATE (self);
+}
+
+
+static void vala_dpap_record_finalize (GObject* obj) {
+	ValaDPAPRecord * self;
+	self = VALA_DPAP_RECORD (obj);
+	_g_free0 (self->priv->_location);
+	_g_free0 (self->priv->_filename);
+	_g_free0 (self->priv->_aspect_ratio);
+	_g_free0 (self->priv->_format);
+	_g_free0 (self->priv->_comments);
+	_g_byte_array_free0 (self->priv->_thumbnail);
+	G_OBJECT_CLASS (vala_dpap_record_parent_class)->finalize (obj);
+}
+
+
+GType vala_dpap_record_get_type (void) {
+	static volatile gsize vala_dpap_record_type_id__volatile = 0;
+	if (g_once_init_enter (&vala_dpap_record_type_id__volatile)) {
+		static const GTypeInfo g_define_type_info = { sizeof (ValaDPAPRecordClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dpap_record_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaDPAPRecord), 0, (GInstanceInitFunc) vala_dpap_record_instance_init, NULL };
+		static const GInterfaceInfo dmap_record_info = { (GInterfaceInitFunc) vala_dpap_record_dmap_record_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
+		static const GInterfaceInfo dpap_record_info = { (GInterfaceInitFunc) vala_dpap_record_dpap_record_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
+		GType vala_dpap_record_type_id;
+		vala_dpap_record_type_id = g_type_register_static (G_TYPE_OBJECT, "ValaDPAPRecord", &g_define_type_info, 0);
+		g_type_add_interface_static (vala_dpap_record_type_id, DMAP_TYPE_RECORD, &dmap_record_info);
+		g_type_add_interface_static (vala_dpap_record_type_id, DPAP_TYPE_RECORD, &dpap_record_info);
+		g_once_init_leave (&vala_dpap_record_type_id__volatile, vala_dpap_record_type_id);
+	}
+	return vala_dpap_record_type_id__volatile;
+}
+
+
+static void _vala_vala_dpap_record_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
+	ValaDPAPRecord * self;
+	self = VALA_DPAP_RECORD (object);
+	switch (property_id) {
+		case VALA_DPAP_RECORD_LOCATION:
+		g_value_set_string (value, vala_dpap_record_get_location (self));
+		break;
+		case VALA_DPAP_RECORD_FILENAME:
+		g_value_set_string (value, vala_dpap_record_get_filename (self));
+		break;
+		case VALA_DPAP_RECORD_ASPECT_RATIO:
+		g_value_set_string (value, vala_dpap_record_get_aspect_ratio (self));
+		break;
+		case VALA_DPAP_RECORD_FORMAT:
+		g_value_set_string (value, vala_dpap_record_get_format (self));
+		break;
+		case VALA_DPAP_RECORD_THUMBNAIL:
+		g_value_set_pointer (value, vala_dpap_record_get_thumbnail (self));
+		break;
+		case VALA_DPAP_RECORD_COMMENTS:
+		g_value_set_string (value, vala_dpap_record_get_comments (self));
+		break;
+		case VALA_DPAP_RECORD_LARGE_FILESIZE:
+		g_value_set_int (value, vala_dpap_record_get_large_filesize (self));
+		break;
+		case VALA_DPAP_RECORD_PIXEL_HEIGHT:
+		g_value_set_int (value, vala_dpap_record_get_pixel_height (self));
+		break;
+		case VALA_DPAP_RECORD_PIXEL_WIDTH:
+		g_value_set_int (value, vala_dpap_record_get_pixel_width (self));
+		break;
+		case VALA_DPAP_RECORD_RATING:
+		g_value_set_int (value, vala_dpap_record_get_rating (self));
+		break;
+		case VALA_DPAP_RECORD_CREATION_DATE:
+		g_value_set_int (value, vala_dpap_record_get_creation_date (self));
+		break;
+		default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+		break;
+	}
+}
+
+
+static void _vala_vala_dpap_record_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
+	ValaDPAPRecord * self;
+	self = VALA_DPAP_RECORD (object);
+	switch (property_id) {
+		case VALA_DPAP_RECORD_LOCATION:
+		vala_dpap_record_set_location (self, g_value_get_string (value));
+		break;
+		case VALA_DPAP_RECORD_FILENAME:
+		vala_dpap_record_set_filename (self, g_value_get_string (value));
+		break;
+		case VALA_DPAP_RECORD_ASPECT_RATIO:
+		vala_dpap_record_set_aspect_ratio (self, g_value_get_string (value));
+		break;
+		case VALA_DPAP_RECORD_FORMAT:
+		vala_dpap_record_set_format (self, g_value_get_string (value));
+		break;
+		case VALA_DPAP_RECORD_THUMBNAIL:
+		vala_dpap_record_set_thumbnail (self, g_value_get_pointer (value));
+		break;
+		case VALA_DPAP_RECORD_COMMENTS:
+		vala_dpap_record_set_comments (self, g_value_get_string (value));
+		break;
+		case VALA_DPAP_RECORD_LARGE_FILESIZE:
+		vala_dpap_record_set_large_filesize (self, g_value_get_int (value));
+		break;
+		case VALA_DPAP_RECORD_PIXEL_HEIGHT:
+		vala_dpap_record_set_pixel_height (self, g_value_get_int (value));
+		break;
+		case VALA_DPAP_RECORD_PIXEL_WIDTH:
+		vala_dpap_record_set_pixel_width (self, g_value_get_int (value));
+		break;
+		case VALA_DPAP_RECORD_RATING:
+		vala_dpap_record_set_rating (self, g_value_get_int (value));
+		break;
+		case VALA_DPAP_RECORD_CREATION_DATE:
+		vala_dpap_record_set_creation_date (self, g_value_get_int (value));
+		break;
+		default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
+		break;
+	}
+}
+
+
+static DMAPRecord* vala_dpap_record_factory_real_create (DMAPRecordFactory* base, void* user_data) {
+	ValaDPAPRecordFactory * self;
+	DMAPRecord* result = NULL;
+	ValaDPAPRecord* _tmp0_ = NULL;
+	self = (ValaDPAPRecordFactory*) base;
+	_tmp0_ = vala_dpap_record_new ();
+	result = (DMAPRecord*) _tmp0_;
+	return result;
+}
+
+
+ValaDPAPRecordFactory* vala_dpap_record_factory_construct (GType object_type) {
+	ValaDPAPRecordFactory * self = NULL;
+	self = (ValaDPAPRecordFactory*) g_object_new (object_type, NULL);
+	return self;
+}
+
+
+ValaDPAPRecordFactory* vala_dpap_record_factory_new (void) {
+	return vala_dpap_record_factory_construct (TYPE_VALA_DPAP_RECORD_FACTORY);
+}
+
+
+static void vala_dpap_record_factory_class_init (ValaDPAPRecordFactoryClass * klass) {
+	vala_dpap_record_factory_parent_class = g_type_class_peek_parent (klass);
+}
+
+
+static void vala_dpap_record_factory_dmap_record_factory_interface_init (DMAPRecordFactoryIface * iface) {
+	vala_dpap_record_factory_dmap_record_factory_parent_iface = g_type_interface_peek_parent (iface);
+	iface->create = (DMAPRecord* (*)(DMAPRecordFactory* ,void*)) vala_dpap_record_factory_real_create;
+}
+
+
+static void vala_dpap_record_factory_instance_init (ValaDPAPRecordFactory * self) {
+}
+
+
+GType vala_dpap_record_factory_get_type (void) {
+	static volatile gsize vala_dpap_record_factory_type_id__volatile = 0;
+	if (g_once_init_enter (&vala_dpap_record_factory_type_id__volatile)) {
+		static const GTypeInfo g_define_type_info = { sizeof (ValaDPAPRecordFactoryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) vala_dpap_record_factory_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ValaDPAPRecordFactory), 0, (GInstanceInitFunc) vala_dpap_record_factory_instance_init, NULL };
+		static const GInterfaceInfo dmap_record_factory_info = { (GInterfaceInitFunc) vala_dpap_record_factory_dmap_record_factory_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
+		GType vala_dpap_record_factory_type_id;
+		vala_dpap_record_factory_type_id = g_type_register_static (G_TYPE_OBJECT, "ValaDPAPRecordFactory", &g_define_type_info, 0);
+		g_type_add_interface_static (vala_dpap_record_factory_type_id, DMAP_TYPE_RECORD_FACTORY, &dmap_record_factory_info);
+		g_once_init_leave (&vala_dpap_record_factory_type_id__volatile, vala_dpap_record_factory_type_id);
+	}
+	return vala_dpap_record_factory_type_id__volatile;
+}
+
+
+



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