/* vala-dpap-record.c generated by valac 0.10.2, 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 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 {
	char* _location;
	char* _filename;
	char* _aspect_ratio;
	char* _format;
	char* _comments;
	guint8* _thumbnail;
	gint _thumbnail_length1;
	gint __thumbnail_size_;
	gint _filesize;
	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_COMMENTS,
	VALA_DPAP_RECORD_FILESIZE,
	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 char* vala_dpap_record_get_location (ValaDPAPRecord* self);
void vala_dpap_record_set_location (ValaDPAPRecord* self, const char* value);
const char* vala_dpap_record_get_filename (ValaDPAPRecord* self);
void vala_dpap_record_set_filename (ValaDPAPRecord* self, const char* value);
const char* vala_dpap_record_get_aspect_ratio (ValaDPAPRecord* self);
void vala_dpap_record_set_aspect_ratio (ValaDPAPRecord* self, const char* value);
const char* vala_dpap_record_get_format (ValaDPAPRecord* self);
void vala_dpap_record_set_format (ValaDPAPRecord* self, const char* value);
guint8* vala_dpap_record_get_thumbnail (ValaDPAPRecord* self, int* result_length1);
void vala_dpap_record_set_thumbnail (ValaDPAPRecord* self, guint8* value, int value_length1);
static guint8* _vala_array_dup1 (guint8* self, int length);
const char* vala_dpap_record_get_comments (ValaDPAPRecord* self);
void vala_dpap_record_set_comments (ValaDPAPRecord* self, const char* value);
gint vala_dpap_record_get_filesize (ValaDPAPRecord* self);
void vala_dpap_record_set_filesize (ValaDPAPRecord* self, gint 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_dpap_record_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void 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:98: 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:102: 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:106: to_blob not implemented");
	return result;
}


ValaDPAPRecord* vala_dpap_record_construct (GType object_type) {
	ValaDPAPRecord * self = NULL;
	char* _tmp0_;
	char* _tmp1_;
	char* _tmp2_;
	char* _tmp3_;
	char* _tmp4_;
	char* _tmp5_;
	char* _tmp6_;
	char* _tmp7_;
	char* _tmp8_;
	char* path;
	size_t _tmp9_;
	gboolean _tmp10_;
	GError * _inner_error_ = NULL;
	self = (ValaDPAPRecord*) g_object_new (object_type, NULL);
	self->priv->_location = (_tmp2_ = g_strconcat (_tmp1_ = g_strconcat ("file://", _tmp0_ = g_get_current_dir (), NULL), "/media/test.jpeg", NULL), _g_free0 (self->priv->_location), _tmp2_);
	_g_free0 (_tmp1_);
	_g_free0 (_tmp0_);
	self->priv->_aspect_ratio = (_tmp3_ = g_strdup ("1.333"), _g_free0 (self->priv->_aspect_ratio), _tmp3_);
	self->priv->_filename = (_tmp4_ = g_path_get_basename (self->priv->_location), _g_free0 (self->priv->_filename), _tmp4_);
	self->priv->_format = (_tmp5_ = g_strdup ("JPEG"), _g_free0 (self->priv->_format), _tmp5_);
	self->priv->_comments = (_tmp6_ = g_strdup ("Comments"), _g_free0 (self->priv->_comments), _tmp6_);
	self->priv->_large_filesize = 13953;
	self->priv->_pixel_height = 480;
	self->priv->_pixel_width = 640;
	self->priv->_rating = 5;
	self->priv->_creation_date = 0;
	path = (_tmp8_ = g_strconcat (_tmp7_ = g_get_current_dir (), "/media/test.jpeg", NULL), _g_free0 (_tmp7_), _tmp8_);
	_tmp10_ = g_file_get_contents (path, (gchar**) (&self->priv->_thumbnail), &_tmp9_, &_inner_error_);
	this._thumbnail_length1 = (gint) _tmp9_;
	_tmp10_;
	if (_inner_error_ != 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;
	}
	self->priv->_filesize = self->priv->_thumbnail_length1;
	_g_free0 (path);
	return self;
}


ValaDPAPRecord* vala_dpap_record_new (void) {
	return vala_dpap_record_construct (TYPE_VALA_DPAP_RECORD);
}


const char* vala_dpap_record_get_location (ValaDPAPRecord* self) {
	const char* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self->priv->_location;
	return result;
}


void vala_dpap_record_set_location (ValaDPAPRecord* self, const char* value) {
	char* _tmp0_;
	g_return_if_fail (self != NULL);
	self->priv->_location = (_tmp0_ = g_strdup (value), _g_free0 (self->priv->_location), _tmp0_);
	g_object_notify ((GObject *) self, "location");
}


const char* vala_dpap_record_get_filename (ValaDPAPRecord* self) {
	const char* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self->priv->_filename;
	return result;
}


void vala_dpap_record_set_filename (ValaDPAPRecord* self, const char* value) {
	char* _tmp0_;
	g_return_if_fail (self != NULL);
	self->priv->_filename = (_tmp0_ = g_strdup (value), _g_free0 (self->priv->_filename), _tmp0_);
	g_object_notify ((GObject *) self, "filename");
}


const char* vala_dpap_record_get_aspect_ratio (ValaDPAPRecord* self) {
	const char* 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 char* value) {
	char* _tmp0_;
	g_return_if_fail (self != NULL);
	self->priv->_aspect_ratio = (_tmp0_ = g_strdup (value), _g_free0 (self->priv->_aspect_ratio), _tmp0_);
	g_object_notify ((GObject *) self, "aspect-ratio");
}


const char* vala_dpap_record_get_format (ValaDPAPRecord* self) {
	const char* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self->priv->_format;
	return result;
}


void vala_dpap_record_set_format (ValaDPAPRecord* self, const char* value) {
	char* _tmp0_;
	g_return_if_fail (self != NULL);
	self->priv->_format = (_tmp0_ = g_strdup (value), _g_free0 (self->priv->_format), _tmp0_);
	g_object_notify ((GObject *) self, "format");
}


guint8* vala_dpap_record_get_thumbnail (ValaDPAPRecord* self, int* result_length1) {
	guint8* result;
	guint8* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	result = (_tmp0_ = self->priv->_thumbnail, *result_length1 = self->priv->_thumbnail_length1, _tmp0_);
	return result;
}


static guint8* _vala_array_dup1 (guint8* self, int length) {
	return g_memdup (self, length * sizeof (guint8));
}


void vala_dpap_record_set_thumbnail (ValaDPAPRecord* self, guint8* value, int value_length1) {
	guint8* _tmp0_;
	guint8* _tmp1_;
	g_return_if_fail (self != NULL);
	self->priv->_thumbnail = (_tmp1_ = (_tmp0_ = value, (_tmp0_ == NULL) ? ((gpointer) _tmp0_) : _vala_array_dup1 (_tmp0_, value_length1)), self->priv->_thumbnail = (g_free (self->priv->_thumbnail), NULL), self->priv->_thumbnail_length1 = value_length1, self->priv->__thumbnail_size_ = self->priv->_thumbnail_length1, _tmp1_);
}


const char* vala_dpap_record_get_comments (ValaDPAPRecord* self) {
	const char* result;
	g_return_val_if_fail (self != NULL, NULL);
	result = self->priv->_comments;
	return result;
}


void vala_dpap_record_set_comments (ValaDPAPRecord* self, const char* value) {
	char* _tmp0_;
	g_return_if_fail (self != NULL);
	self->priv->_comments = (_tmp0_ = g_strdup (value), _g_free0 (self->priv->_comments), _tmp0_);
	g_object_notify ((GObject *) self, "comments");
}


gint vala_dpap_record_get_filesize (ValaDPAPRecord* self) {
	gint result;
	g_return_val_if_fail (self != NULL, 0);
	result = self->priv->_filesize;
	return result;
}


void vala_dpap_record_set_filesize (ValaDPAPRecord* self, gint value) {
	g_return_if_fail (self != NULL);
	self->priv->_filesize = value;
	g_object_notify ((GObject *) self, "filesize");
}


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_dpap_record_get_property;
	G_OBJECT_CLASS (klass)->set_property = 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_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_FILESIZE, g_param_spec_int ("filesize", "filesize", "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_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 = vala_dpap_record_real_set_from_blob;
	iface->to_blob = 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 = 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);
	self->priv->_thumbnail = (g_free (self->priv->_thumbnail), NULL);
	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_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_COMMENTS:
		g_value_set_string (value, vala_dpap_record_get_comments (self));
		break;
		case VALA_DPAP_RECORD_FILESIZE:
		g_value_set_int (value, vala_dpap_record_get_filesize (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_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_COMMENTS:
		vala_dpap_record_set_comments (self, g_value_get_string (value));
		break;
		case VALA_DPAP_RECORD_FILESIZE:
		vala_dpap_record_set_filesize (self, g_value_get_int (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;
	self = (ValaDPAPRecordFactory*) base;
	result = (DMAPRecord*) vala_dpap_record_new ();
	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 = 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;
}




