/* rygel-media-export-writable-db-container.c generated by valac 0.20.1.2-ca5c2, the Vala compiler
 * generated from rygel-media-export-writable-db-container.vala, do not modify */

/*
 * Copyright (C) 2010 Jens Georg <mail@jensge.org>.
 *
 * Author: Jens Georg <mail@jensge.org>
 *
 * This file is part of Rygel.
 *
 * Rygel is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Rygel is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 */

#include <glib.h>
#include <glib-object.h>
#include <rygel-server.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>


#define RYGEL_MEDIA_EXPORT_TYPE_DB_CONTAINER (rygel_media_export_db_container_get_type ())
#define RYGEL_MEDIA_EXPORT_DB_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_MEDIA_EXPORT_TYPE_DB_CONTAINER, RygelMediaExportDBContainer))
#define RYGEL_MEDIA_EXPORT_DB_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_MEDIA_EXPORT_TYPE_DB_CONTAINER, RygelMediaExportDBContainerClass))
#define RYGEL_MEDIA_EXPORT_IS_DB_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_MEDIA_EXPORT_TYPE_DB_CONTAINER))
#define RYGEL_MEDIA_EXPORT_IS_DB_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_MEDIA_EXPORT_TYPE_DB_CONTAINER))
#define RYGEL_MEDIA_EXPORT_DB_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_MEDIA_EXPORT_TYPE_DB_CONTAINER, RygelMediaExportDBContainerClass))

typedef struct _RygelMediaExportDBContainer RygelMediaExportDBContainer;
typedef struct _RygelMediaExportDBContainerClass RygelMediaExportDBContainerClass;
typedef struct _RygelMediaExportDBContainerPrivate RygelMediaExportDBContainerPrivate;

#define RYGEL_MEDIA_EXPORT_TYPE_MEDIA_CACHE (rygel_media_export_media_cache_get_type ())
#define RYGEL_MEDIA_EXPORT_MEDIA_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_MEDIA_EXPORT_TYPE_MEDIA_CACHE, RygelMediaExportMediaCache))
#define RYGEL_MEDIA_EXPORT_MEDIA_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_MEDIA_EXPORT_TYPE_MEDIA_CACHE, RygelMediaExportMediaCacheClass))
#define RYGEL_MEDIA_EXPORT_IS_MEDIA_CACHE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_MEDIA_EXPORT_TYPE_MEDIA_CACHE))
#define RYGEL_MEDIA_EXPORT_IS_MEDIA_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_MEDIA_EXPORT_TYPE_MEDIA_CACHE))
#define RYGEL_MEDIA_EXPORT_MEDIA_CACHE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_MEDIA_EXPORT_TYPE_MEDIA_CACHE, RygelMediaExportMediaCacheClass))

typedef struct _RygelMediaExportMediaCache RygelMediaExportMediaCache;
typedef struct _RygelMediaExportMediaCacheClass RygelMediaExportMediaCacheClass;

#define RYGEL_MEDIA_EXPORT_TYPE_TRACKABLE_DB_CONTAINER (rygel_media_export_trackable_db_container_get_type ())
#define RYGEL_MEDIA_EXPORT_TRACKABLE_DB_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_MEDIA_EXPORT_TYPE_TRACKABLE_DB_CONTAINER, RygelMediaExportTrackableDbContainer))
#define RYGEL_MEDIA_EXPORT_TRACKABLE_DB_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_MEDIA_EXPORT_TYPE_TRACKABLE_DB_CONTAINER, RygelMediaExportTrackableDbContainerClass))
#define RYGEL_MEDIA_EXPORT_IS_TRACKABLE_DB_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_MEDIA_EXPORT_TYPE_TRACKABLE_DB_CONTAINER))
#define RYGEL_MEDIA_EXPORT_IS_TRACKABLE_DB_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_MEDIA_EXPORT_TYPE_TRACKABLE_DB_CONTAINER))
#define RYGEL_MEDIA_EXPORT_TRACKABLE_DB_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_MEDIA_EXPORT_TYPE_TRACKABLE_DB_CONTAINER, RygelMediaExportTrackableDbContainerClass))

typedef struct _RygelMediaExportTrackableDbContainer RygelMediaExportTrackableDbContainer;
typedef struct _RygelMediaExportTrackableDbContainerClass RygelMediaExportTrackableDbContainerClass;
typedef struct _RygelMediaExportTrackableDbContainerPrivate RygelMediaExportTrackableDbContainerPrivate;

#define RYGEL_MEDIA_EXPORT_TYPE_WRITABLE_DB_CONTAINER (rygel_media_export_writable_db_container_get_type ())
#define RYGEL_MEDIA_EXPORT_WRITABLE_DB_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_MEDIA_EXPORT_TYPE_WRITABLE_DB_CONTAINER, RygelMediaExportWritableDbContainer))
#define RYGEL_MEDIA_EXPORT_WRITABLE_DB_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_MEDIA_EXPORT_TYPE_WRITABLE_DB_CONTAINER, RygelMediaExportWritableDbContainerClass))
#define RYGEL_MEDIA_EXPORT_IS_WRITABLE_DB_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_MEDIA_EXPORT_TYPE_WRITABLE_DB_CONTAINER))
#define RYGEL_MEDIA_EXPORT_IS_WRITABLE_DB_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_MEDIA_EXPORT_TYPE_WRITABLE_DB_CONTAINER))
#define RYGEL_MEDIA_EXPORT_WRITABLE_DB_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_MEDIA_EXPORT_TYPE_WRITABLE_DB_CONTAINER, RygelMediaExportWritableDbContainerClass))

typedef struct _RygelMediaExportWritableDbContainer RygelMediaExportWritableDbContainer;
typedef struct _RygelMediaExportWritableDbContainerClass RygelMediaExportWritableDbContainerClass;
typedef struct _RygelMediaExportWritableDbContainerPrivate RygelMediaExportWritableDbContainerPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _RygelMediaExportWritableDbContainerAddItemData RygelMediaExportWritableDbContainerAddItemData;
typedef struct _RygelMediaExportWritableDbContainerAddContainerData RygelMediaExportWritableDbContainerAddContainerData;
typedef struct _RygelMediaExportWritableDbContainerRemoveItemData RygelMediaExportWritableDbContainerRemoveItemData;
typedef struct _RygelMediaExportWritableDbContainerRemoveContainerData RygelMediaExportWritableDbContainerRemoveContainerData;

struct _RygelMediaExportDBContainer {
	RygelMediaContainer parent_instance;
	RygelMediaExportDBContainerPrivate * priv;
	RygelMediaExportMediaCache* media_db;
};

struct _RygelMediaExportDBContainerClass {
	RygelMediaContainerClass parent_class;
	gint (*count_children) (RygelMediaExportDBContainer* self);
	void (*search) (RygelMediaExportDBContainer* self, RygelSearchExpression* expression, guint offset, guint max_count, const gchar* sort_criteria, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
	RygelMediaObjects* (*search_finish) (RygelMediaExportDBContainer* self, GAsyncResult* _res_, guint* total_matches, GError** error);
};

struct _RygelMediaExportTrackableDbContainer {
	RygelMediaExportDBContainer parent_instance;
	RygelMediaExportTrackableDbContainerPrivate * priv;
};

struct _RygelMediaExportTrackableDbContainerClass {
	RygelMediaExportDBContainerClass parent_class;
	gchar* (*get_service_reset_token) (RygelMediaExportTrackableDbContainer* self);
	void (*set_service_reset_token) (RygelMediaExportTrackableDbContainer* self, const gchar* token);
	guint32 (*get_system_update_id) (RygelMediaExportTrackableDbContainer* self);
};

struct _RygelMediaExportWritableDbContainer {
	RygelMediaExportTrackableDbContainer parent_instance;
	RygelMediaExportWritableDbContainerPrivate * priv;
};

struct _RygelMediaExportWritableDbContainerClass {
	RygelMediaExportTrackableDbContainerClass parent_class;
};

struct _RygelMediaExportWritableDbContainerPrivate {
	GeeArrayList* _create_classes;
};

struct _RygelMediaExportWritableDbContainerAddItemData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelMediaExportWritableDbContainer* self;
	RygelMediaItem* item;
	GCancellable* cancellable;
	RygelMediaItem* _tmp0_;
	RygelMediaItem* _tmp1_;
	GeeArrayList* _tmp2_;
	gpointer _tmp3_;
	gchar* _tmp4_;
	GFile* _tmp5_;
	GFile* _tmp6_;
	GFile* file;
	GFile* _tmp7_;
	gboolean _tmp8_;
	RygelMediaItem* _tmp9_;
	gint64 _tmp10_;
	RygelMediaItem* _tmp11_;
	GFile* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	RygelMediaItem* _tmp15_;
	RygelMediaExportMediaCache* _tmp16_;
	RygelMediaItem* _tmp17_;
};

struct _RygelMediaExportWritableDbContainerAddContainerData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelMediaExportWritableDbContainer* self;
	RygelMediaContainer* container;
	GCancellable* cancellable;
	RygelMediaContainer* _tmp0_;
	RygelMediaContainer* _tmp1_;
	const gchar* _tmp2_;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	GQuark _tmp6_;
	RygelMediaContainer* _tmp7_;
	GeeArrayList* _tmp8_;
	gpointer _tmp9_;
	gchar* _tmp10_;
	GFile* _tmp11_;
	GFile* _tmp12_;
	GFile* file;
	RygelMediaContainer* _tmp13_;
	GFile* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	GFile* _tmp17_;
	gboolean _tmp18_;
	GFile* _tmp19_;
	GCancellable* _tmp20_;
	RygelMediaContainer* _tmp21_;
	const gchar* _tmp22_;
	const gchar* _tmp23_;
	GError* _tmp24_;
	RygelMediaContainer* _tmp25_;
	RygelMediaExportMediaCache* _tmp26_;
	RygelMediaContainer* _tmp27_;
	GError * _inner_error_;
};

typedef enum  {
	RYGEL_MEDIA_EXPORT_DATABASE_ERROR_IO_ERROR,
	RYGEL_MEDIA_EXPORT_DATABASE_ERROR_SQLITE_ERROR
} RygelMediaExportDatabaseError;
#define RYGEL_MEDIA_EXPORT_DATABASE_ERROR rygel_media_export_database_error_quark ()
struct _RygelMediaExportWritableDbContainerRemoveItemData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelMediaExportWritableDbContainer* self;
	gchar* id;
	GCancellable* cancellable;
	RygelMediaExportMediaCache* _tmp0_;
	const gchar* _tmp1_;
	RygelMediaObject* _tmp2_;
	RygelMediaObject* object;
	GError * _inner_error_;
};

struct _RygelMediaExportWritableDbContainerRemoveContainerData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelMediaExportWritableDbContainer* self;
	gchar* id;
	GCancellable* cancellable;
	GError* _tmp0_;
	GError * _inner_error_;
};


static gpointer rygel_media_export_writable_db_container_parent_class = NULL;
static RygelWritableContainerIface* rygel_media_export_writable_db_container_rygel_writable_container_parent_iface = NULL;

GType rygel_media_export_db_container_get_type (void) G_GNUC_CONST;
GType rygel_media_export_media_cache_get_type (void) G_GNUC_CONST;
GType rygel_media_export_trackable_db_container_get_type (void) G_GNUC_CONST;
GType rygel_media_export_writable_db_container_get_type (void) G_GNUC_CONST;
#define RYGEL_MEDIA_EXPORT_WRITABLE_DB_CONTAINER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RYGEL_MEDIA_EXPORT_TYPE_WRITABLE_DB_CONTAINER, RygelMediaExportWritableDbContainerPrivate))
enum  {
	RYGEL_MEDIA_EXPORT_WRITABLE_DB_CONTAINER_DUMMY_PROPERTY,
	RYGEL_MEDIA_EXPORT_WRITABLE_DB_CONTAINER_CREATE_CLASSES
};
RygelMediaExportWritableDbContainer* rygel_media_export_writable_db_container_new (const gchar* id, const gchar* title);
RygelMediaExportWritableDbContainer* rygel_media_export_writable_db_container_construct (GType object_type, const gchar* id, const gchar* title);
static void rygel_media_export_writable_db_container_real_constructed (GObject* base);
static void rygel_media_export_writable_db_container_real_add_item_data_free (gpointer _data);
static void rygel_media_export_writable_db_container_real_add_item (RygelWritableContainer* base, RygelMediaItem* item, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean rygel_media_export_writable_db_container_real_add_item_co (RygelMediaExportWritableDbContainerAddItemData* _data_);
gchar* rygel_media_export_media_cache_get_id (GFile* file);
static void rygel_media_export_writable_db_container_add_item_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void rygel_media_export_media_cache_make_object_guarded (RygelMediaExportMediaCache* self, RygelMediaObject* object, gboolean guarded);
static void rygel_media_export_writable_db_container_real_add_container_data_free (gpointer _data);
static void rygel_media_export_writable_db_container_real_add_container (RygelWritableContainer* base, RygelMediaContainer* container, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean rygel_media_export_writable_db_container_real_add_container_co (RygelMediaExportWritableDbContainerAddContainerData* _data_);
static void rygel_media_export_writable_db_container_add_container_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void rygel_media_export_writable_db_container_real_remove_item_data_free (gpointer _data);
static void rygel_media_export_writable_db_container_real_remove_item (RygelWritableContainer* base, const gchar* id, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean rygel_media_export_writable_db_container_real_remove_item_co (RygelMediaExportWritableDbContainerRemoveItemData* _data_);
GQuark rygel_media_export_database_error_quark (void);
RygelMediaObject* rygel_media_export_media_cache_get_object (RygelMediaExportMediaCache* self, const gchar* object_id, GError** error);
static void rygel_media_export_writable_db_container_remove_item_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void rygel_media_export_writable_db_container_real_remove_container_data_free (gpointer _data);
static void rygel_media_export_writable_db_container_real_remove_container (RygelWritableContainer* base, const gchar* id, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean rygel_media_export_writable_db_container_real_remove_container_co (RygelMediaExportWritableDbContainerRemoveContainerData* _data_);
static void rygel_media_export_writable_db_container_finalize (GObject* obj);
static void _vala_rygel_media_export_writable_db_container_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_rygel_media_export_writable_db_container_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


RygelMediaExportWritableDbContainer* rygel_media_export_writable_db_container_construct (GType object_type, const gchar* id, const gchar* title) {
	RygelMediaExportWritableDbContainer * self = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	g_return_val_if_fail (id != NULL, NULL);
	g_return_val_if_fail (title != NULL, NULL);
	_tmp0_ = id;
	_tmp1_ = title;
	self = (RygelMediaExportWritableDbContainer*) g_object_new (object_type, "id", _tmp0_, "title", _tmp1_, "parent", NULL, "child-count", 0, NULL);
	return self;
}


RygelMediaExportWritableDbContainer* rygel_media_export_writable_db_container_new (const gchar* id, const gchar* title) {
	return rygel_media_export_writable_db_container_construct (RYGEL_MEDIA_EXPORT_TYPE_WRITABLE_DB_CONTAINER, id, title);
}


static void rygel_media_export_writable_db_container_real_constructed (GObject* base) {
	RygelMediaExportWritableDbContainer * self;
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp1_;
	GeeArrayList* _tmp2_;
	GeeArrayList* _tmp3_;
	GeeArrayList* _tmp4_;
	GeeArrayList* _tmp5_;
	GeeArrayList* _tmp6_;
	GeeArrayList* _tmp7_;
	GeeArrayList* _tmp8_;
	GeeArrayList* _tmp9_;
	GeeArrayList* _tmp10_;
	GeeArrayList* _tmp11_;
	GeeArrayList* _tmp12_;
	GeeArrayList* _tmp13_;
	GeeArrayList* _tmp14_;
	GeeArrayList* _tmp15_;
	self = (RygelMediaExportWritableDbContainer*) base;
	G_OBJECT_CLASS (rygel_media_export_writable_db_container_parent_class)->constructed ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (self, RYGEL_MEDIA_EXPORT_TYPE_TRACKABLE_DB_CONTAINER, RygelMediaExportTrackableDbContainer));
	_tmp0_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
	_tmp1_ = _tmp0_;
	rygel_writable_container_set_create_classes ((RygelWritableContainer*) self, _tmp1_);
	_g_object_unref0 (_tmp1_);
	_tmp2_ = rygel_writable_container_get_create_classes ((RygelWritableContainer*) self);
	_tmp3_ = _tmp2_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp3_, RYGEL_IMAGE_ITEM_UPNP_CLASS);
	_tmp4_ = rygel_writable_container_get_create_classes ((RygelWritableContainer*) self);
	_tmp5_ = _tmp4_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp5_, RYGEL_PHOTO_ITEM_UPNP_CLASS);
	_tmp6_ = rygel_writable_container_get_create_classes ((RygelWritableContainer*) self);
	_tmp7_ = _tmp6_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp7_, RYGEL_VIDEO_ITEM_UPNP_CLASS);
	_tmp8_ = rygel_writable_container_get_create_classes ((RygelWritableContainer*) self);
	_tmp9_ = _tmp8_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp9_, RYGEL_AUDIO_ITEM_UPNP_CLASS);
	_tmp10_ = rygel_writable_container_get_create_classes ((RygelWritableContainer*) self);
	_tmp11_ = _tmp10_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp11_, RYGEL_MUSIC_ITEM_UPNP_CLASS);
	_tmp12_ = rygel_writable_container_get_create_classes ((RygelWritableContainer*) self);
	_tmp13_ = _tmp12_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp13_, RYGEL_PLAYLIST_ITEM_UPNP_CLASS);
	_tmp14_ = rygel_writable_container_get_create_classes ((RygelWritableContainer*) self);
	_tmp15_ = _tmp14_;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp15_, RYGEL_MEDIA_CONTAINER_STORAGE_FOLDER);
}


static void rygel_media_export_writable_db_container_real_add_item_data_free (gpointer _data) {
	RygelMediaExportWritableDbContainerAddItemData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->item);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (RygelMediaExportWritableDbContainerAddItemData, _data_);
}


static gpointer _g_object_ref0 (gpointer self) {
	return self ? g_object_ref (self) : NULL;
}


static void rygel_media_export_writable_db_container_real_add_item (RygelWritableContainer* base, RygelMediaItem* item, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelMediaExportWritableDbContainer * self;
	RygelMediaExportWritableDbContainerAddItemData* _data_;
	RygelMediaExportWritableDbContainer* _tmp0_;
	RygelMediaItem* _tmp1_;
	RygelMediaItem* _tmp2_;
	GCancellable* _tmp3_;
	GCancellable* _tmp4_;
	self = (RygelMediaExportWritableDbContainer*) base;
	_data_ = g_slice_new0 (RygelMediaExportWritableDbContainerAddItemData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, rygel_media_export_writable_db_container_real_add_item);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_media_export_writable_db_container_real_add_item_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = item;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->item);
	_data_->item = _tmp2_;
	_tmp3_ = cancellable;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp4_;
	rygel_media_export_writable_db_container_real_add_item_co (_data_);
}


static void rygel_media_export_writable_db_container_real_add_item_finish (RygelWritableContainer* base, GAsyncResult* _res_, GError** error) {
	RygelMediaExportWritableDbContainerAddItemData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void rygel_media_export_writable_db_container_add_item_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	RygelMediaExportWritableDbContainerAddItemData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	rygel_media_export_writable_db_container_real_add_item_co (_data_);
}


static gboolean rygel_media_export_writable_db_container_real_add_item_co (RygelMediaExportWritableDbContainerAddItemData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->item;
	rygel_media_object_set_parent ((RygelMediaObject*) _data_->_tmp0_, (RygelMediaContainer*) _data_->self);
	_data_->_tmp1_ = _data_->item;
	_data_->_tmp2_ = ((RygelMediaObject*) _data_->_tmp1_)->uris;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp2_, 0);
	_data_->_tmp4_ = (gchar*) _data_->_tmp3_;
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = g_file_new_for_uri (_data_->_tmp4_);
	_data_->_tmp6_ = _data_->_tmp5_;
	_g_free0 (_data_->_tmp4_);
	_data_->file = _data_->_tmp6_;
	_data_->_tmp7_ = _data_->file;
	_data_->_tmp8_ = FALSE;
	_data_->_tmp8_ = g_file_is_native (_data_->_tmp7_);
	if (_data_->_tmp8_) {
		_data_->_tmp9_ = _data_->item;
		_data_->_tmp10_ = G_MAXINT64;
		rygel_media_object_set_modified ((RygelMediaObject*) _data_->_tmp9_, (guint64) _data_->_tmp10_);
	}
	_data_->_tmp11_ = _data_->item;
	_data_->_tmp12_ = _data_->file;
	_data_->_tmp13_ = NULL;
	_data_->_tmp13_ = rygel_media_export_media_cache_get_id (_data_->_tmp12_);
	_data_->_tmp14_ = _data_->_tmp13_;
	rygel_media_object_set_id ((RygelMediaObject*) _data_->_tmp11_, _data_->_tmp14_);
	_g_free0 (_data_->_tmp14_);
	_data_->_tmp15_ = _data_->item;
	_data_->_state_ = 1;
	rygel_trackable_container_add_child_tracked ((RygelTrackableContainer*) _data_->self, (RygelMediaObject*) _data_->_tmp15_, rygel_media_export_writable_db_container_add_item_ready, _data_);
	return FALSE;
	_state_1:
	rygel_trackable_container_add_child_tracked_finish ((RygelTrackableContainer*) _data_->self, _data_->_res_);
	_data_->_tmp16_ = ((RygelMediaExportDBContainer*) _data_->self)->media_db;
	_data_->_tmp17_ = _data_->item;
	rygel_media_export_media_cache_make_object_guarded (_data_->_tmp16_, (RygelMediaObject*) _data_->_tmp17_, TRUE);
	_g_object_unref0 (_data_->file);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void rygel_media_export_writable_db_container_real_add_container_data_free (gpointer _data) {
	RygelMediaExportWritableDbContainerAddContainerData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->container);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (RygelMediaExportWritableDbContainerAddContainerData, _data_);
}


static void rygel_media_export_writable_db_container_real_add_container (RygelWritableContainer* base, RygelMediaContainer* container, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelMediaExportWritableDbContainer * self;
	RygelMediaExportWritableDbContainerAddContainerData* _data_;
	RygelMediaExportWritableDbContainer* _tmp0_;
	RygelMediaContainer* _tmp1_;
	RygelMediaContainer* _tmp2_;
	GCancellable* _tmp3_;
	GCancellable* _tmp4_;
	self = (RygelMediaExportWritableDbContainer*) base;
	_data_ = g_slice_new0 (RygelMediaExportWritableDbContainerAddContainerData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, rygel_media_export_writable_db_container_real_add_container);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_media_export_writable_db_container_real_add_container_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = container;
	_tmp2_ = _g_object_ref0 (_tmp1_);
	_g_object_unref0 (_data_->container);
	_data_->container = _tmp2_;
	_tmp3_ = cancellable;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp4_;
	rygel_media_export_writable_db_container_real_add_container_co (_data_);
}


static void rygel_media_export_writable_db_container_real_add_container_finish (RygelWritableContainer* base, GAsyncResult* _res_, GError** error) {
	RygelMediaExportWritableDbContainerAddContainerData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void rygel_media_export_writable_db_container_add_container_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	RygelMediaExportWritableDbContainerAddContainerData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	rygel_media_export_writable_db_container_real_add_container_co (_data_);
}


static gboolean rygel_media_export_writable_db_container_real_add_container_co (RygelMediaExportWritableDbContainerAddContainerData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->container;
	rygel_media_object_set_parent ((RygelMediaObject*) _data_->_tmp0_, (RygelMediaContainer*) _data_->self);
	_data_->_tmp1_ = _data_->container;
	_data_->_tmp2_ = rygel_media_object_get_upnp_class ((RygelMediaObject*) _data_->_tmp1_);
	_data_->_tmp3_ = _data_->_tmp2_;
	_data_->_tmp6_ = 0U;
	_data_->_tmp4_ = _data_->_tmp3_;
	_data_->_tmp6_ = (NULL == _data_->_tmp4_) ? 0 : g_quark_from_string (_data_->_tmp4_);
	if (_data_->_tmp6_ == g_quark_from_string (RYGEL_MEDIA_CONTAINER_STORAGE_FOLDER)) {
		switch (0) {
			default:
			{
				_data_->_tmp7_ = _data_->container;
				_data_->_tmp8_ = ((RygelMediaObject*) _data_->_tmp7_)->uris;
				_data_->_tmp9_ = NULL;
				_data_->_tmp9_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp8_, 0);
				_data_->_tmp10_ = (gchar*) _data_->_tmp9_;
				_data_->_tmp11_ = NULL;
				_data_->_tmp11_ = g_file_new_for_uri (_data_->_tmp10_);
				_data_->_tmp12_ = _data_->_tmp11_;
				_g_free0 (_data_->_tmp10_);
				_data_->file = _data_->_tmp12_;
				_data_->_tmp13_ = _data_->container;
				_data_->_tmp14_ = _data_->file;
				_data_->_tmp15_ = NULL;
				_data_->_tmp15_ = rygel_media_export_media_cache_get_id (_data_->_tmp14_);
				_data_->_tmp16_ = _data_->_tmp15_;
				rygel_media_object_set_id ((RygelMediaObject*) _data_->_tmp13_, _data_->_tmp16_);
				_g_free0 (_data_->_tmp16_);
				_data_->_tmp17_ = _data_->file;
				_data_->_tmp18_ = FALSE;
				_data_->_tmp18_ = g_file_is_native (_data_->_tmp17_);
				if (_data_->_tmp18_) {
					_data_->_tmp19_ = _data_->file;
					_data_->_tmp20_ = _data_->cancellable;
					g_file_make_directory_with_parents (_data_->_tmp19_, _data_->_tmp20_, &_data_->_inner_error_);
					if (_data_->_inner_error_ != NULL) {
						g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
						g_error_free (_data_->_inner_error_);
						_g_object_unref0 (_data_->file);
						if (_data_->_state_ == 0) {
							g_simple_async_result_complete_in_idle (_data_->_async_result);
						} else {
							g_simple_async_result_complete (_data_->_async_result);
						}
						g_object_unref (_data_->_async_result);
						return FALSE;
					}
				}
				_g_object_unref0 (_data_->file);
				break;
			}
		}
	} else {
		switch (0) {
			default:
			{
				_data_->_tmp21_ = _data_->container;
				_data_->_tmp22_ = rygel_media_object_get_upnp_class ((RygelMediaObject*) _data_->_tmp21_);
				_data_->_tmp23_ = _data_->_tmp22_;
				_data_->_tmp24_ = g_error_new (RYGEL_WRITABLE_CONTAINER_ERROR, RYGEL_WRITABLE_CONTAINER_ERROR_NOT_IMPLEMENTED, "upnp:class %s not supported", _data_->_tmp23_);
				_data_->_inner_error_ = _data_->_tmp24_;
				g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
				g_error_free (_data_->_inner_error_);
				if (_data_->_state_ == 0) {
					g_simple_async_result_complete_in_idle (_data_->_async_result);
				} else {
					g_simple_async_result_complete (_data_->_async_result);
				}
				g_object_unref (_data_->_async_result);
				return FALSE;
			}
		}
	}
	_data_->_tmp25_ = _data_->container;
	_data_->_state_ = 1;
	rygel_trackable_container_add_child_tracked ((RygelTrackableContainer*) _data_->self, (RygelMediaObject*) _data_->_tmp25_, rygel_media_export_writable_db_container_add_container_ready, _data_);
	return FALSE;
	_state_1:
	rygel_trackable_container_add_child_tracked_finish ((RygelTrackableContainer*) _data_->self, _data_->_res_);
	_data_->_tmp26_ = ((RygelMediaExportDBContainer*) _data_->self)->media_db;
	_data_->_tmp27_ = _data_->container;
	rygel_media_export_media_cache_make_object_guarded (_data_->_tmp26_, (RygelMediaObject*) _data_->_tmp27_, TRUE);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void rygel_media_export_writable_db_container_real_remove_item_data_free (gpointer _data) {
	RygelMediaExportWritableDbContainerRemoveItemData* _data_;
	_data_ = _data;
	_g_free0 (_data_->id);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (RygelMediaExportWritableDbContainerRemoveItemData, _data_);
}


static void rygel_media_export_writable_db_container_real_remove_item (RygelWritableContainer* base, const gchar* id, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelMediaExportWritableDbContainer * self;
	RygelMediaExportWritableDbContainerRemoveItemData* _data_;
	RygelMediaExportWritableDbContainer* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	GCancellable* _tmp3_;
	GCancellable* _tmp4_;
	self = (RygelMediaExportWritableDbContainer*) base;
	_data_ = g_slice_new0 (RygelMediaExportWritableDbContainerRemoveItemData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, rygel_media_export_writable_db_container_real_remove_item);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_media_export_writable_db_container_real_remove_item_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = id;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->id);
	_data_->id = _tmp2_;
	_tmp3_ = cancellable;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp4_;
	rygel_media_export_writable_db_container_real_remove_item_co (_data_);
}


static void rygel_media_export_writable_db_container_real_remove_item_finish (RygelWritableContainer* base, GAsyncResult* _res_, GError** error) {
	RygelMediaExportWritableDbContainerRemoveItemData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void rygel_media_export_writable_db_container_remove_item_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	RygelMediaExportWritableDbContainerRemoveItemData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	rygel_media_export_writable_db_container_real_remove_item_co (_data_);
}


static gboolean rygel_media_export_writable_db_container_real_remove_item_co (RygelMediaExportWritableDbContainerRemoveItemData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = ((RygelMediaExportDBContainer*) _data_->self)->media_db;
	_data_->_tmp1_ = _data_->id;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = rygel_media_export_media_cache_get_object (_data_->_tmp0_, _data_->_tmp1_, &_data_->_inner_error_);
	_data_->object = _data_->_tmp2_;
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_state_ = 1;
	rygel_trackable_container_remove_child_tracked ((RygelTrackableContainer*) _data_->self, _data_->object, rygel_media_export_writable_db_container_remove_item_ready, _data_);
	return FALSE;
	_state_1:
	rygel_trackable_container_remove_child_tracked_finish ((RygelTrackableContainer*) _data_->self, _data_->_res_);
	_g_object_unref0 (_data_->object);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void rygel_media_export_writable_db_container_real_remove_container_data_free (gpointer _data) {
	RygelMediaExportWritableDbContainerRemoveContainerData* _data_;
	_data_ = _data;
	_g_free0 (_data_->id);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->self);
	g_slice_free (RygelMediaExportWritableDbContainerRemoveContainerData, _data_);
}


static void rygel_media_export_writable_db_container_real_remove_container (RygelWritableContainer* base, const gchar* id, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelMediaExportWritableDbContainer * self;
	RygelMediaExportWritableDbContainerRemoveContainerData* _data_;
	RygelMediaExportWritableDbContainer* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	GCancellable* _tmp3_;
	GCancellable* _tmp4_;
	self = (RygelMediaExportWritableDbContainer*) base;
	_data_ = g_slice_new0 (RygelMediaExportWritableDbContainerRemoveContainerData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, rygel_media_export_writable_db_container_real_remove_container);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_media_export_writable_db_container_real_remove_container_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = id;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->id);
	_data_->id = _tmp2_;
	_tmp3_ = cancellable;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp4_;
	rygel_media_export_writable_db_container_real_remove_container_co (_data_);
}


static void rygel_media_export_writable_db_container_real_remove_container_finish (RygelWritableContainer* base, GAsyncResult* _res_, GError** error) {
	RygelMediaExportWritableDbContainerRemoveContainerData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static gboolean rygel_media_export_writable_db_container_real_remove_container_co (RygelMediaExportWritableDbContainerRemoveContainerData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = g_error_new_literal (RYGEL_WRITABLE_CONTAINER_ERROR, RYGEL_WRITABLE_CONTAINER_ERROR_NOT_IMPLEMENTED, "Not supported");
	_data_->_inner_error_ = _data_->_tmp0_;
	g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
	g_error_free (_data_->_inner_error_);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static GeeArrayList* rygel_media_export_writable_db_container_real_get_create_classes (RygelWritableContainer* base) {
	GeeArrayList* result;
	RygelMediaExportWritableDbContainer* self;
	GeeArrayList* _tmp0_;
	self = (RygelMediaExportWritableDbContainer*) base;
	_tmp0_ = self->priv->_create_classes;
	result = _tmp0_;
	return result;
}


static void rygel_media_export_writable_db_container_real_set_create_classes (RygelWritableContainer* base, GeeArrayList* value) {
	RygelMediaExportWritableDbContainer* self;
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp1_;
	self = (RygelMediaExportWritableDbContainer*) base;
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_create_classes);
	self->priv->_create_classes = _tmp1_;
	g_object_notify ((GObject *) self, "create-classes");
}


static void rygel_media_export_writable_db_container_class_init (RygelMediaExportWritableDbContainerClass * klass) {
	rygel_media_export_writable_db_container_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (RygelMediaExportWritableDbContainerPrivate));
	G_OBJECT_CLASS (klass)->constructed = rygel_media_export_writable_db_container_real_constructed;
	G_OBJECT_CLASS (klass)->get_property = _vala_rygel_media_export_writable_db_container_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_rygel_media_export_writable_db_container_set_property;
	G_OBJECT_CLASS (klass)->finalize = rygel_media_export_writable_db_container_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), RYGEL_MEDIA_EXPORT_WRITABLE_DB_CONTAINER_CREATE_CLASSES, g_param_spec_object ("create-classes", "create-classes", "create-classes", GEE_TYPE_ARRAY_LIST, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void rygel_media_export_writable_db_container_rygel_writable_container_interface_init (RygelWritableContainerIface * iface) {
	rygel_media_export_writable_db_container_rygel_writable_container_parent_iface = g_type_interface_peek_parent (iface);
	iface->add_item = (void (*)(RygelWritableContainer*, RygelMediaItem*, GCancellable*, GError**)) rygel_media_export_writable_db_container_real_add_item;
	iface->add_item_finish = rygel_media_export_writable_db_container_real_add_item_finish;
	iface->add_container = (void (*)(RygelWritableContainer*, RygelMediaContainer*, GCancellable*, GError**)) rygel_media_export_writable_db_container_real_add_container;
	iface->add_container_finish = rygel_media_export_writable_db_container_real_add_container_finish;
	iface->remove_item = (void (*)(RygelWritableContainer*, const gchar*, GCancellable*, GError**)) rygel_media_export_writable_db_container_real_remove_item;
	iface->remove_item_finish = rygel_media_export_writable_db_container_real_remove_item_finish;
	iface->remove_container = (void (*)(RygelWritableContainer*, const gchar*, GCancellable*, GError**)) rygel_media_export_writable_db_container_real_remove_container;
	iface->remove_container_finish = rygel_media_export_writable_db_container_real_remove_container_finish;
	iface->get_create_classes = rygel_media_export_writable_db_container_real_get_create_classes;
	iface->set_create_classes = rygel_media_export_writable_db_container_real_set_create_classes;
}


static void rygel_media_export_writable_db_container_instance_init (RygelMediaExportWritableDbContainer * self) {
	self->priv = RYGEL_MEDIA_EXPORT_WRITABLE_DB_CONTAINER_GET_PRIVATE (self);
}


static void rygel_media_export_writable_db_container_finalize (GObject* obj) {
	RygelMediaExportWritableDbContainer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_MEDIA_EXPORT_TYPE_WRITABLE_DB_CONTAINER, RygelMediaExportWritableDbContainer);
	_g_object_unref0 (self->priv->_create_classes);
	G_OBJECT_CLASS (rygel_media_export_writable_db_container_parent_class)->finalize (obj);
}


/**
 * A DB container that is both Trackable and Writable.
 *
 * Clients can upload items to this container, causing
 * the items to be saved to the filesystem to be
 * served again subsequently.
 */
GType rygel_media_export_writable_db_container_get_type (void) {
	static volatile gsize rygel_media_export_writable_db_container_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_media_export_writable_db_container_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelMediaExportWritableDbContainerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_media_export_writable_db_container_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelMediaExportWritableDbContainer), 0, (GInstanceInitFunc) rygel_media_export_writable_db_container_instance_init, NULL };
		static const GInterfaceInfo rygel_writable_container_info = { (GInterfaceInitFunc) rygel_media_export_writable_db_container_rygel_writable_container_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType rygel_media_export_writable_db_container_type_id;
		rygel_media_export_writable_db_container_type_id = g_type_register_static (RYGEL_MEDIA_EXPORT_TYPE_TRACKABLE_DB_CONTAINER, "RygelMediaExportWritableDbContainer", &g_define_type_info, 0);
		g_type_add_interface_static (rygel_media_export_writable_db_container_type_id, RYGEL_TYPE_WRITABLE_CONTAINER, &rygel_writable_container_info);
		g_once_init_leave (&rygel_media_export_writable_db_container_type_id__volatile, rygel_media_export_writable_db_container_type_id);
	}
	return rygel_media_export_writable_db_container_type_id__volatile;
}


static void _vala_rygel_media_export_writable_db_container_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	RygelMediaExportWritableDbContainer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, RYGEL_MEDIA_EXPORT_TYPE_WRITABLE_DB_CONTAINER, RygelMediaExportWritableDbContainer);
	switch (property_id) {
		case RYGEL_MEDIA_EXPORT_WRITABLE_DB_CONTAINER_CREATE_CLASSES:
		g_value_set_object (value, rygel_writable_container_get_create_classes ((RygelWritableContainer*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_rygel_media_export_writable_db_container_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	RygelMediaExportWritableDbContainer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, RYGEL_MEDIA_EXPORT_TYPE_WRITABLE_DB_CONTAINER, RygelMediaExportWritableDbContainer);
	switch (property_id) {
		case RYGEL_MEDIA_EXPORT_WRITABLE_DB_CONTAINER_CREATE_CLASSES:
		rygel_writable_container_set_create_classes ((RygelWritableContainer*) self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}



