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

/*
 * Copyright (C) 2012 Intel Corporation.
 *
 * Author: Jens Georg <jensg@openismus.com>
 *
 * 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.1 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 library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 */

#include "rygel-media-export.h"
#include <glib-object.h>
#include <gio/gio.h>
#include "rygel-server.h"
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <glib/gi18n-lib.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	RYGEL_MEDIA_EXPORT_TRACKABLE_DB_CONTAINER_0_PROPERTY,
	RYGEL_MEDIA_EXPORT_TRACKABLE_DB_CONTAINER_NUM_PROPERTIES
};
static GParamSpec* rygel_media_export_trackable_db_container_properties[RYGEL_MEDIA_EXPORT_TRACKABLE_DB_CONTAINER_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _RygelMediaExportTrackableDbContainerAddChildData RygelMediaExportTrackableDbContainerAddChildData;
typedef struct _RygelMediaExportTrackableDbContainerRemoveChildData RygelMediaExportTrackableDbContainerRemoveChildData;

struct _RygelMediaExportTrackableDbContainerAddChildData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	RygelMediaExportTrackableDbContainer* self;
	RygelMediaObject* object;
	RygelMediaExportMediaCache* _tmp0_;
	RygelMediaExportMediaCache* _tmp1_;
	GError* _error_;
	GError* _tmp2_;
	const gchar* _tmp3_;
	GError* _inner_error0_;
};

struct _RygelMediaExportTrackableDbContainerRemoveChildData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	RygelMediaExportTrackableDbContainer* self;
	RygelMediaObject* object;
	RygelMediaExportMediaCache* _tmp0_;
	GError* _error_;
	GError* _tmp1_;
	const gchar* _tmp2_;
	GError* _inner_error0_;
};

static gpointer rygel_media_export_trackable_db_container_parent_class = NULL;
static RygelTrackableContainerIface * rygel_media_export_trackable_db_container_rygel_trackable_container_parent_iface = NULL;

static void rygel_media_export_trackable_db_container_real_constructed (GObject* base);
static void rygel_media_export_trackable_db_container_on_child_added (RygelMediaExportTrackableDbContainer* self,
                                                               RygelMediaObject* object);
static void _rygel_media_export_trackable_db_container_on_child_added_rygel_trackable_container_child_added (RygelTrackableContainer* _sender,
                                                                                                      RygelMediaObject* object,
                                                                                                      gpointer self);
static void rygel_media_export_trackable_db_container_on_child_removed (RygelMediaExportTrackableDbContainer* self,
                                                                 RygelMediaObject* object);
static void _rygel_media_export_trackable_db_container_on_child_removed_rygel_trackable_container_child_removed (RygelTrackableContainer* _sender,
                                                                                                          RygelMediaObject* object,
                                                                                                          gpointer self);
static void rygel_media_export_trackable_db_container_real_add_child_data_free (gpointer _data);
static void rygel_media_export_trackable_db_container_real_add_child (RygelTrackableContainer* base,
                                                               RygelMediaObject* object,
                                                               GAsyncReadyCallback _callback_,
                                                               gpointer _user_data_);
static gboolean rygel_media_export_trackable_db_container_real_add_child_co (RygelMediaExportTrackableDbContainerAddChildData* _data_);
static void rygel_media_export_trackable_db_container_real_remove_child_data_free (gpointer _data);
static void rygel_media_export_trackable_db_container_real_remove_child (RygelMediaExportTrackableDbContainer* self,
                                                                  RygelMediaObject* object,
                                                                  GAsyncReadyCallback _callback_,
                                                                  gpointer _user_data_);
static gboolean rygel_media_export_trackable_db_container_real_remove_child_co (RygelMediaExportTrackableDbContainerRemoveChildData* _data_);
static gchar* rygel_media_export_trackable_db_container_real_get_service_reset_token (RygelMediaExportTrackableDbContainer* self);
static void rygel_media_export_trackable_db_container_real_set_service_reset_token (RygelMediaExportTrackableDbContainer* self,
                                                                             const gchar* token);
static guint32 rygel_media_export_trackable_db_container_real_get_system_update_id (RygelMediaExportTrackableDbContainer* self);
static GType rygel_media_export_trackable_db_container_get_type_once (void);

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

RygelMediaExportTrackableDbContainer*
rygel_media_export_trackable_db_container_new (const gchar* id,
                                               const gchar* title)
{
	return rygel_media_export_trackable_db_container_construct (RYGEL_MEDIA_EXPORT_TYPE_TRACKABLE_DB_CONTAINER, id, title);
}

static void
_rygel_media_export_trackable_db_container_on_child_added_rygel_trackable_container_child_added (RygelTrackableContainer* _sender,
                                                                                                 RygelMediaObject* object,
                                                                                                 gpointer self)
{
	rygel_media_export_trackable_db_container_on_child_added ((RygelMediaExportTrackableDbContainer*) self, object);
}

static void
_rygel_media_export_trackable_db_container_on_child_removed_rygel_trackable_container_child_removed (RygelTrackableContainer* _sender,
                                                                                                     RygelMediaObject* object,
                                                                                                     gpointer self)
{
	rygel_media_export_trackable_db_container_on_child_removed ((RygelMediaExportTrackableDbContainer*) self, object);
}

static void
rygel_media_export_trackable_db_container_real_constructed (GObject* base)
{
	RygelMediaExportTrackableDbContainer * self;
	self = (RygelMediaExportTrackableDbContainer*) base;
	G_OBJECT_CLASS (rygel_media_export_trackable_db_container_parent_class)->constructed ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (self, RYGEL_MEDIA_EXPORT_TYPE_DB_CONTAINER, RygelMediaExportDBContainer));
	g_signal_connect_object ((RygelTrackableContainer*) self, "child-added", (GCallback) _rygel_media_export_trackable_db_container_on_child_added_rygel_trackable_container_child_added, self, 0);
	g_signal_connect_object ((RygelTrackableContainer*) self, "child-removed", (GCallback) _rygel_media_export_trackable_db_container_on_child_removed_rygel_trackable_container_child_removed, self, 0);
}

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

static void
rygel_media_export_trackable_db_container_on_child_added (RygelMediaExportTrackableDbContainer* self,
                                                          RygelMediaObject* object)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	{
		RygelMediaExportMediaCache* cache = NULL;
		RygelMediaExportMediaCache* _tmp0_;
		RygelMediaExportMediaCache* _tmp1_;
		RygelMediaExportMediaCache* _tmp4_;
		_tmp0_ = ((RygelMediaExportDBContainer*) self)->media_db;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		cache = _tmp1_;
		if (G_TYPE_CHECK_INSTANCE_TYPE (object, RYGEL_TYPE_MEDIA_ITEM)) {
			RygelMediaExportMediaCache* _tmp2_;
			_tmp2_ = cache;
			rygel_media_export_media_cache_save_item (_tmp2_, G_TYPE_CHECK_INSTANCE_TYPE (object, RYGEL_TYPE_MEDIA_FILE_ITEM) ? ((RygelMediaFileItem*) object) : NULL, FALSE, &_inner_error0_);
			if (G_UNLIKELY (_inner_error0_ != NULL)) {
				_g_object_unref0 (cache);
				goto __catch0_g_error;
			}
		} else {
			if (G_TYPE_CHECK_INSTANCE_TYPE (object, RYGEL_TYPE_MEDIA_CONTAINER)) {
				RygelMediaExportMediaCache* _tmp3_;
				_tmp3_ = cache;
				rygel_media_export_media_cache_save_container (_tmp3_, G_TYPE_CHECK_INSTANCE_TYPE (object, RYGEL_TYPE_MEDIA_CONTAINER) ? ((RygelMediaContainer*) object) : NULL, &_inner_error0_);
				if (G_UNLIKELY (_inner_error0_ != NULL)) {
					_g_object_unref0 (cache);
					goto __catch0_g_error;
				}
			} else {
				g_assert_not_reached ();
			}
		}
		_tmp4_ = cache;
		rygel_media_export_media_cache_save_container (_tmp4_, (RygelMediaContainer*) self, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			_g_object_unref0 (cache);
			goto __catch0_g_error;
		}
		_g_object_unref0 (cache);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp5_;
		const gchar* _tmp6_;
		_error_ = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp5_ = _error_;
		_tmp6_ = _tmp5_->message;
		g_warning (_ ("Failed to save object: %s"), _tmp6_);
		_g_error_free0 (_error_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
rygel_media_export_trackable_db_container_on_child_removed (RygelMediaExportTrackableDbContainer* self,
                                                            RygelMediaObject* object)
{
	GError* _inner_error0_ = NULL;
	g_return_if_fail (self != NULL);
	g_return_if_fail (object != NULL);
	{
		RygelMediaExportMediaCache* _tmp0_;
		_tmp0_ = ((RygelMediaExportDBContainer*) self)->media_db;
		rygel_media_export_media_cache_save_container (_tmp0_, (RygelMediaContainer*) self, &_inner_error0_);
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* _error_ = NULL;
		GError* _tmp1_;
		const gchar* _tmp2_;
		_error_ = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp1_ = _error_;
		_tmp2_ = _tmp1_->message;
		g_warning (_ ("Failed to save object: %s"), _tmp2_);
		_g_error_free0 (_error_);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return;
	}
}

static void
rygel_media_export_trackable_db_container_real_add_child_data_free (gpointer _data)
{
	RygelMediaExportTrackableDbContainerAddChildData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->object);
	_g_object_unref0 (_data_->self);
	g_slice_free (RygelMediaExportTrackableDbContainerAddChildData, _data_);
}

static void
rygel_media_export_trackable_db_container_real_add_child (RygelTrackableContainer* base,
                                                          RygelMediaObject* object,
                                                          GAsyncReadyCallback _callback_,
                                                          gpointer _user_data_)
{
	RygelMediaExportTrackableDbContainer * self;
	RygelMediaExportTrackableDbContainerAddChildData* _data_;
	RygelMediaExportTrackableDbContainer* _tmp0_;
	RygelMediaObject* _tmp1_;
	g_return_if_fail (object != NULL);
	self = (RygelMediaExportTrackableDbContainer*) base;
	_data_ = g_slice_new0 (RygelMediaExportTrackableDbContainerAddChildData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, rygel_media_export_trackable_db_container_real_add_child_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (object);
	_g_object_unref0 (_data_->object);
	_data_->object = _tmp1_;
	rygel_media_export_trackable_db_container_real_add_child_co (_data_);
}

static void
rygel_media_export_trackable_db_container_add_child_finish (RygelTrackableContainer* base,
                                                            GAsyncResult* _res_)
{
	RygelMediaExportTrackableDbContainerAddChildData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static gboolean
rygel_media_export_trackable_db_container_real_add_child_co (RygelMediaExportTrackableDbContainerAddChildData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		if (G_TYPE_CHECK_INSTANCE_TYPE (_data_->object, RYGEL_TYPE_MEDIA_ITEM)) {
			_data_->_tmp0_ = ((RygelMediaExportDBContainer*) _data_->self)->media_db;
			rygel_media_export_media_cache_save_item (_data_->_tmp0_, G_TYPE_CHECK_INSTANCE_TYPE (_data_->object, RYGEL_TYPE_MEDIA_FILE_ITEM) ? ((RygelMediaFileItem*) _data_->object) : NULL, FALSE, &_data_->_inner_error0_);
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				goto __catch0_g_error;
			}
		} else {
			if (G_TYPE_CHECK_INSTANCE_TYPE (_data_->object, RYGEL_TYPE_MEDIA_CONTAINER)) {
				_data_->_tmp1_ = ((RygelMediaExportDBContainer*) _data_->self)->media_db;
				rygel_media_export_media_cache_save_container (_data_->_tmp1_, G_TYPE_CHECK_INSTANCE_TYPE (_data_->object, RYGEL_TYPE_MEDIA_CONTAINER) ? ((RygelMediaContainer*) _data_->object) : NULL, &_data_->_inner_error0_);
				if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
					goto __catch0_g_error;
				}
			} else {
				g_assert_not_reached ();
			}
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->_error_ = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp2_ = _data_->_error_;
		_data_->_tmp3_ = _data_->_tmp2_->message;
		g_warning (_ ("Failed to add object: %s"), _data_->_tmp3_);
		_g_error_free0 (_data_->_error_);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
rygel_media_export_trackable_db_container_real_remove_child_data_free (gpointer _data)
{
	RygelMediaExportTrackableDbContainerRemoveChildData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->object);
	_g_object_unref0 (_data_->self);
	g_slice_free (RygelMediaExportTrackableDbContainerRemoveChildData, _data_);
}

static void
rygel_media_export_trackable_db_container_real_remove_child (RygelMediaExportTrackableDbContainer* self,
                                                             RygelMediaObject* object,
                                                             GAsyncReadyCallback _callback_,
                                                             gpointer _user_data_)
{
	RygelMediaExportTrackableDbContainerRemoveChildData* _data_;
	RygelMediaExportTrackableDbContainer* _tmp0_;
	RygelMediaObject* _tmp1_;
	g_return_if_fail (object != NULL);
	_data_ = g_slice_new0 (RygelMediaExportTrackableDbContainerRemoveChildData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, rygel_media_export_trackable_db_container_real_remove_child_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_object_ref0 (object);
	_g_object_unref0 (_data_->object);
	_data_->object = _tmp1_;
	rygel_media_export_trackable_db_container_real_remove_child_co (_data_);
}

static void
rygel_media_export_trackable_db_container_real_remove_child_finish (RygelMediaExportTrackableDbContainer* self,
                                                                    GAsyncResult* _res_)
{
	RygelMediaExportTrackableDbContainerRemoveChildData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static gboolean
rygel_media_export_trackable_db_container_real_remove_child_co (RygelMediaExportTrackableDbContainerRemoveChildData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = ((RygelMediaExportDBContainer*) _data_->self)->media_db;
		rygel_media_export_media_cache_remove_object (_data_->_tmp0_, _data_->object, &_data_->_inner_error0_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->_error_ = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp1_ = _data_->_error_;
		_data_->_tmp2_ = _data_->_tmp1_->message;
		g_warning (_ ("Failed to remove object: %s"), _data_->_tmp2_);
		_g_error_free0 (_data_->_error_);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

void
rygel_media_export_trackable_db_container_remove_child (RygelMediaExportTrackableDbContainer* self,
                                                        RygelMediaObject* object,
                                                        GAsyncReadyCallback _callback_,
                                                        gpointer _user_data_)
{
	RygelMediaExportTrackableDbContainerClass* _klass_;
	_klass_ = RYGEL_MEDIA_EXPORT_TRACKABLE_DB_CONTAINER_GET_CLASS (self);
	if (_klass_->remove_child) {
		_klass_->remove_child (self, object, _callback_, _user_data_);
	}
}

void
rygel_media_export_trackable_db_container_remove_child_finish (RygelMediaExportTrackableDbContainer* self,
                                                               GAsyncResult* _res_)
{
	RygelMediaExportTrackableDbContainerClass* _klass_;
	_klass_ = RYGEL_MEDIA_EXPORT_TRACKABLE_DB_CONTAINER_GET_CLASS (self);
	if (_klass_->remove_child_finish) {
		_klass_->remove_child_finish (self, _res_);
	}
}

static gchar*
rygel_media_export_trackable_db_container_real_get_service_reset_token (RygelMediaExportTrackableDbContainer* self)
{
	RygelMediaExportMediaCache* _tmp0_;
	gchar* _tmp1_;
	gchar* result;
	_tmp0_ = ((RygelMediaExportDBContainer*) self)->media_db;
	_tmp1_ = rygel_media_export_media_cache_get_reset_token (_tmp0_);
	result = _tmp1_;
	return result;
}

gchar*
rygel_media_export_trackable_db_container_get_service_reset_token (RygelMediaExportTrackableDbContainer* self)
{
	RygelMediaExportTrackableDbContainerClass* _klass_;
	g_return_val_if_fail (self != NULL, NULL);
	_klass_ = RYGEL_MEDIA_EXPORT_TRACKABLE_DB_CONTAINER_GET_CLASS (self);
	if (_klass_->get_service_reset_token) {
		return _klass_->get_service_reset_token (self);
	}
	return NULL;
}

static void
rygel_media_export_trackable_db_container_real_set_service_reset_token (RygelMediaExportTrackableDbContainer* self,
                                                                        const gchar* token)
{
	RygelMediaExportMediaCache* _tmp0_;
	g_return_if_fail (token != NULL);
	_tmp0_ = ((RygelMediaExportDBContainer*) self)->media_db;
	rygel_media_export_media_cache_save_reset_token (_tmp0_, token);
}

void
rygel_media_export_trackable_db_container_set_service_reset_token (RygelMediaExportTrackableDbContainer* self,
                                                                   const gchar* token)
{
	RygelMediaExportTrackableDbContainerClass* _klass_;
	g_return_if_fail (self != NULL);
	_klass_ = RYGEL_MEDIA_EXPORT_TRACKABLE_DB_CONTAINER_GET_CLASS (self);
	if (_klass_->set_service_reset_token) {
		_klass_->set_service_reset_token (self, token);
	}
}

static guint32
rygel_media_export_trackable_db_container_real_get_system_update_id (RygelMediaExportTrackableDbContainer* self)
{
	guint32 id = 0U;
	RygelMediaExportMediaCache* _tmp0_;
	guint32 result;
	_tmp0_ = ((RygelMediaExportDBContainer*) self)->media_db;
	id = rygel_media_export_media_cache_get_update_id (_tmp0_);
	result = id;
	return result;
}

guint32
rygel_media_export_trackable_db_container_get_system_update_id (RygelMediaExportTrackableDbContainer* self)
{
	RygelMediaExportTrackableDbContainerClass* _klass_;
	g_return_val_if_fail (self != NULL, 0U);
	_klass_ = RYGEL_MEDIA_EXPORT_TRACKABLE_DB_CONTAINER_GET_CLASS (self);
	if (_klass_->get_system_update_id) {
		return _klass_->get_system_update_id (self);
	}
	return 0U;
}

static void
rygel_media_export_trackable_db_container_class_init (RygelMediaExportTrackableDbContainerClass * klass,
                                                      gpointer klass_data)
{
	rygel_media_export_trackable_db_container_parent_class = g_type_class_peek_parent (klass);
	((GObjectClass *) klass)->constructed = (void (*) (GObject*)) rygel_media_export_trackable_db_container_real_constructed;
	((RygelMediaExportTrackableDbContainerClass *) klass)->remove_child = (void (*) (RygelMediaExportTrackableDbContainer*, RygelMediaObject*, GAsyncReadyCallback, gpointer)) rygel_media_export_trackable_db_container_real_remove_child;
	((RygelMediaExportTrackableDbContainerClass *) klass)->remove_child_finish = (void (*) (RygelMediaExportTrackableDbContainer*, GAsyncResult*)) rygel_media_export_trackable_db_container_real_remove_child_finish;
	((RygelMediaExportTrackableDbContainerClass *) klass)->get_service_reset_token = (gchar* (*) (RygelMediaExportTrackableDbContainer*)) rygel_media_export_trackable_db_container_real_get_service_reset_token;
	((RygelMediaExportTrackableDbContainerClass *) klass)->set_service_reset_token = (void (*) (RygelMediaExportTrackableDbContainer*, const gchar*)) rygel_media_export_trackable_db_container_real_set_service_reset_token;
	((RygelMediaExportTrackableDbContainerClass *) klass)->get_system_update_id = (guint32 (*) (RygelMediaExportTrackableDbContainer*)) rygel_media_export_trackable_db_container_real_get_system_update_id;
}

static void
rygel_media_export_trackable_db_container_rygel_trackable_container_interface_init (RygelTrackableContainerIface * iface,
                                                                                    gpointer iface_data)
{
	rygel_media_export_trackable_db_container_rygel_trackable_container_parent_iface = g_type_interface_peek_parent (iface);
	iface->add_child = (void (*) (RygelTrackableContainer*, RygelMediaObject*, GAsyncReadyCallback, gpointer)) rygel_media_export_trackable_db_container_real_add_child;
	iface->add_child_finish = (void (*) (RygelTrackableContainer*, GAsyncResult*)) rygel_media_export_trackable_db_container_add_child_finish;
	iface->remove_child = (void (*) (RygelTrackableContainer*, RygelMediaObject*, GAsyncReadyCallback, gpointer)) rygel_media_export_trackable_db_container_remove_child;
	iface->remove_child_finish = (void (*) (RygelTrackableContainer*, GAsyncResult*)) rygel_media_export_trackable_db_container_remove_child_finish;
	iface->get_service_reset_token = (gchar* (*) (RygelTrackableContainer*)) rygel_media_export_trackable_db_container_get_service_reset_token;
	iface->set_service_reset_token = (void (*) (RygelTrackableContainer*, const gchar*)) rygel_media_export_trackable_db_container_set_service_reset_token;
	iface->get_system_update_id = (guint32 (*) (RygelTrackableContainer*)) rygel_media_export_trackable_db_container_get_system_update_id;
}

static void
rygel_media_export_trackable_db_container_instance_init (RygelMediaExportTrackableDbContainer * self,
                                                         gpointer klass)
{
}

/**
 * A DB container that is trackable.
 */
 G_GNUC_NO_INLINE static GType
rygel_media_export_trackable_db_container_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (RygelMediaExportTrackableDbContainerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_media_export_trackable_db_container_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelMediaExportTrackableDbContainer), 0, (GInstanceInitFunc) rygel_media_export_trackable_db_container_instance_init, NULL };
	static const GInterfaceInfo rygel_trackable_container_info = { (GInterfaceInitFunc) rygel_media_export_trackable_db_container_rygel_trackable_container_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType rygel_media_export_trackable_db_container_type_id;
	rygel_media_export_trackable_db_container_type_id = g_type_register_static (RYGEL_MEDIA_EXPORT_TYPE_DB_CONTAINER, "RygelMediaExportTrackableDbContainer", &g_define_type_info, 0);
	g_type_add_interface_static (rygel_media_export_trackable_db_container_type_id, RYGEL_TYPE_TRACKABLE_CONTAINER, &rygel_trackable_container_info);
	return rygel_media_export_trackable_db_container_type_id;
}

GType
rygel_media_export_trackable_db_container_get_type (void)
{
	static volatile gsize rygel_media_export_trackable_db_container_type_id__once = 0;
	if (g_once_init_enter (&rygel_media_export_trackable_db_container_type_id__once)) {
		GType rygel_media_export_trackable_db_container_type_id;
		rygel_media_export_trackable_db_container_type_id = rygel_media_export_trackable_db_container_get_type_once ();
		g_once_init_leave (&rygel_media_export_trackable_db_container_type_id__once, rygel_media_export_trackable_db_container_type_id);
	}
	return rygel_media_export_trackable_db_container_type_id__once;
}

