/* rygel-meta-config.c generated by valac 0.17.2.19-5f50d, the Vala compiler
 * generated from rygel-meta-config.vala, do not modify */

/*
 * Copyright (C) 2008,2009 Nokia Corporation.
 * Copyright (C) 2008,2009 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>.
 * Copyright (C) 2012 Openismus GmbH.
 *
 * Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
 *                               <zeeshan.ali@nokia.com>
 *         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 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 <stdlib.h>
#include <string.h>
#include <gee.h>
#include <glib/gi18n-lib.h>


#define RYGEL_TYPE_CONFIGURATION (rygel_configuration_get_type ())
#define RYGEL_CONFIGURATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_CONFIGURATION, RygelConfiguration))
#define RYGEL_IS_CONFIGURATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_CONFIGURATION))
#define RYGEL_CONFIGURATION_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), RYGEL_TYPE_CONFIGURATION, RygelConfigurationIface))

typedef struct _RygelConfiguration RygelConfiguration;
typedef struct _RygelConfigurationIface RygelConfigurationIface;

#define RYGEL_TYPE_META_CONFIG (rygel_meta_config_get_type ())
#define RYGEL_META_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_META_CONFIG, RygelMetaConfig))
#define RYGEL_META_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_META_CONFIG, RygelMetaConfigClass))
#define RYGEL_IS_META_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_META_CONFIG))
#define RYGEL_IS_META_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_META_CONFIG))
#define RYGEL_META_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_META_CONFIG, RygelMetaConfigClass))

typedef struct _RygelMetaConfig RygelMetaConfig;
typedef struct _RygelMetaConfigClass RygelMetaConfigClass;
typedef struct _RygelMetaConfigPrivate RygelMetaConfigPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define RYGEL_TYPE_CMDLINE_CONFIG (rygel_cmdline_config_get_type ())
#define RYGEL_CMDLINE_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_CMDLINE_CONFIG, RygelCmdlineConfig))
#define RYGEL_CMDLINE_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_CMDLINE_CONFIG, RygelCmdlineConfigClass))
#define RYGEL_IS_CMDLINE_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_CMDLINE_CONFIG))
#define RYGEL_IS_CMDLINE_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_CMDLINE_CONFIG))
#define RYGEL_CMDLINE_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_CMDLINE_CONFIG, RygelCmdlineConfigClass))

typedef struct _RygelCmdlineConfig RygelCmdlineConfig;
typedef struct _RygelCmdlineConfigClass RygelCmdlineConfigClass;

#define RYGEL_TYPE_ENVIRONMENT_CONFIG (rygel_environment_config_get_type ())
#define RYGEL_ENVIRONMENT_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_ENVIRONMENT_CONFIG, RygelEnvironmentConfig))
#define RYGEL_ENVIRONMENT_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_ENVIRONMENT_CONFIG, RygelEnvironmentConfigClass))
#define RYGEL_IS_ENVIRONMENT_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_ENVIRONMENT_CONFIG))
#define RYGEL_IS_ENVIRONMENT_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_ENVIRONMENT_CONFIG))
#define RYGEL_ENVIRONMENT_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_ENVIRONMENT_CONFIG, RygelEnvironmentConfigClass))

typedef struct _RygelEnvironmentConfig RygelEnvironmentConfig;
typedef struct _RygelEnvironmentConfigClass RygelEnvironmentConfigClass;

#define RYGEL_TYPE_USER_CONFIG (rygel_user_config_get_type ())
#define RYGEL_USER_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_USER_CONFIG, RygelUserConfig))
#define RYGEL_USER_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_USER_CONFIG, RygelUserConfigClass))
#define RYGEL_IS_USER_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_USER_CONFIG))
#define RYGEL_IS_USER_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_USER_CONFIG))
#define RYGEL_USER_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_USER_CONFIG, RygelUserConfigClass))

typedef struct _RygelUserConfig RygelUserConfig;
typedef struct _RygelUserConfigClass RygelUserConfigClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _g_regex_unref0(var) ((var == NULL) ? NULL : (var = (g_regex_unref (var), NULL)))

struct _RygelConfigurationIface {
	GTypeInterface parent_iface;
	gboolean (*get_upnp_enabled) (RygelConfiguration* self, GError** error);
	gchar* (*get_interface) (RygelConfiguration* self, GError** error);
	gint (*get_port) (RygelConfiguration* self, GError** error);
	gboolean (*get_transcoding) (RygelConfiguration* self, GError** error);
	gboolean (*get_mp3_transcoder) (RygelConfiguration* self, GError** error);
	gboolean (*get_mp2ts_transcoder) (RygelConfiguration* self, GError** error);
	gboolean (*get_lpcm_transcoder) (RygelConfiguration* self, GError** error);
	gboolean (*get_wmv_transcoder) (RygelConfiguration* self, GError** error);
	gboolean (*get_aac_transcoder) (RygelConfiguration* self, GError** error);
	gboolean (*get_avc_transcoder) (RygelConfiguration* self, GError** error);
	gboolean (*get_allow_upload) (RygelConfiguration* self, GError** error);
	gboolean (*get_allow_deletion) (RygelConfiguration* self, GError** error);
	gchar* (*get_log_levels) (RygelConfiguration* self, GError** error);
	gchar* (*get_plugin_path) (RygelConfiguration* self, GError** error);
	gchar* (*get_video_upload_folder) (RygelConfiguration* self, GError** error);
	gchar* (*get_music_upload_folder) (RygelConfiguration* self, GError** error);
	gchar* (*get_picture_upload_folder) (RygelConfiguration* self, GError** error);
	gboolean (*get_enabled) (RygelConfiguration* self, const gchar* section, GError** error);
	gchar* (*get_title) (RygelConfiguration* self, const gchar* section, GError** error);
	gchar* (*get_string) (RygelConfiguration* self, const gchar* section, const gchar* key, GError** error);
	GeeArrayList* (*get_string_list) (RygelConfiguration* self, const gchar* section, const gchar* key, GError** error);
	gint (*get_int) (RygelConfiguration* self, const gchar* section, const gchar* key, gint min, gint max, GError** error);
	GeeArrayList* (*get_int_list) (RygelConfiguration* self, const gchar* section, const gchar* key, GError** error);
	gboolean (*get_bool) (RygelConfiguration* self, const gchar* section, const gchar* key, GError** error);
};

struct _RygelMetaConfig {
	GObject parent_instance;
	RygelMetaConfigPrivate * priv;
};

struct _RygelMetaConfigClass {
	GObjectClass parent_class;
};

typedef enum  {
	RYGEL_CONFIGURATION_ERROR_NO_VALUE_SET,
	RYGEL_CONFIGURATION_ERROR_VALUE_OUT_OF_RANGE
} RygelConfigurationError;
#define RYGEL_CONFIGURATION_ERROR rygel_configuration_error_quark ()

static gpointer rygel_meta_config_parent_class = NULL;
static RygelMetaConfig* rygel_meta_config_meta_config;
static RygelMetaConfig* rygel_meta_config_meta_config = NULL;
static GeeArrayList* rygel_meta_config_configs;
static GeeArrayList* rygel_meta_config_configs = NULL;
static RygelConfigurationIface* rygel_meta_config_rygel_configuration_parent_iface = NULL;

GType rygel_configuration_get_type (void) G_GNUC_CONST;
GType rygel_meta_config_get_type (void) G_GNUC_CONST;
enum  {
	RYGEL_META_CONFIG_DUMMY_PROPERTY
};
RygelMetaConfig* rygel_meta_config_get_default (void);
RygelMetaConfig* rygel_meta_config_new (void);
RygelMetaConfig* rygel_meta_config_construct (GType object_type);
void rygel_meta_config_register_configuration (RygelConfiguration* config);
void rygel_meta_config_register_default_configurations (void);
GType rygel_cmdline_config_get_type (void) G_GNUC_CONST;
RygelCmdlineConfig* rygel_cmdline_config_get_default (void);
GType rygel_environment_config_get_type (void) G_GNUC_CONST;
RygelEnvironmentConfig* rygel_environment_config_get_default (void);
gchar* rygel_cmdline_config_get_config_file (RygelCmdlineConfig* self, GError** error);
RygelUserConfig* rygel_user_config_new (const gchar* file, GError** error);
RygelUserConfig* rygel_user_config_construct (GType object_type, const gchar* file, GError** error);
GType rygel_user_config_get_type (void) G_GNUC_CONST;
RygelUserConfig* rygel_user_config_get_default (GError** error);
static gboolean rygel_meta_config_real_get_upnp_enabled (RygelConfiguration* base, GError** error);
gboolean rygel_configuration_get_upnp_enabled (RygelConfiguration* self, GError** error);
GQuark rygel_configuration_error_quark (void);
static gchar* rygel_meta_config_real_get_interface (RygelConfiguration* base, GError** error);
gchar* rygel_configuration_get_interface (RygelConfiguration* self, GError** error);
static gint rygel_meta_config_real_get_port (RygelConfiguration* base, GError** error);
gint rygel_configuration_get_port (RygelConfiguration* self, GError** error);
static gboolean rygel_meta_config_real_get_transcoding (RygelConfiguration* base, GError** error);
gboolean rygel_configuration_get_transcoding (RygelConfiguration* self, GError** error);
static gboolean rygel_meta_config_real_get_mp3_transcoder (RygelConfiguration* base, GError** error);
gboolean rygel_configuration_get_mp3_transcoder (RygelConfiguration* self, GError** error);
static gboolean rygel_meta_config_real_get_mp2ts_transcoder (RygelConfiguration* base, GError** error);
gboolean rygel_configuration_get_mp2ts_transcoder (RygelConfiguration* self, GError** error);
static gboolean rygel_meta_config_real_get_lpcm_transcoder (RygelConfiguration* base, GError** error);
gboolean rygel_configuration_get_lpcm_transcoder (RygelConfiguration* self, GError** error);
static gboolean rygel_meta_config_real_get_wmv_transcoder (RygelConfiguration* base, GError** error);
gboolean rygel_configuration_get_wmv_transcoder (RygelConfiguration* self, GError** error);
static gboolean rygel_meta_config_real_get_aac_transcoder (RygelConfiguration* base, GError** error);
gboolean rygel_configuration_get_aac_transcoder (RygelConfiguration* self, GError** error);
static gboolean rygel_meta_config_real_get_avc_transcoder (RygelConfiguration* base, GError** error);
gboolean rygel_configuration_get_avc_transcoder (RygelConfiguration* self, GError** error);
static gboolean rygel_meta_config_real_get_allow_upload (RygelConfiguration* base, GError** error);
gboolean rygel_configuration_get_allow_upload (RygelConfiguration* self, GError** error);
static gboolean rygel_meta_config_real_get_allow_deletion (RygelConfiguration* base, GError** error);
gboolean rygel_configuration_get_allow_deletion (RygelConfiguration* self, GError** error);
static gchar* rygel_meta_config_real_get_log_levels (RygelConfiguration* base, GError** error);
gchar* rygel_configuration_get_log_levels (RygelConfiguration* self, GError** error);
static gchar* rygel_meta_config_real_get_plugin_path (RygelConfiguration* base, GError** error);
gchar* rygel_configuration_get_plugin_path (RygelConfiguration* self, GError** error);
static gchar* rygel_meta_config_real_get_video_upload_folder (RygelConfiguration* base, GError** error);
gchar* rygel_configuration_get_video_upload_folder (RygelConfiguration* self, GError** error);
static gchar* rygel_meta_config_real_get_music_upload_folder (RygelConfiguration* base, GError** error);
gchar* rygel_configuration_get_music_upload_folder (RygelConfiguration* self, GError** error);
static gchar* rygel_meta_config_real_get_picture_upload_folder (RygelConfiguration* base, GError** error);
gchar* rygel_configuration_get_picture_upload_folder (RygelConfiguration* self, GError** error);
static gboolean rygel_meta_config_real_get_enabled (RygelConfiguration* base, const gchar* section, GError** error);
gboolean rygel_configuration_get_enabled (RygelConfiguration* self, const gchar* section, GError** error);
static gchar* rygel_meta_config_real_get_title (RygelConfiguration* base, const gchar* section, GError** error);
gchar* rygel_configuration_get_title (RygelConfiguration* self, const gchar* section, GError** error);
static gchar* rygel_meta_config_real_get_string (RygelConfiguration* base, const gchar* section, const gchar* key, GError** error);
gchar* rygel_configuration_get_string (RygelConfiguration* self, const gchar* section, const gchar* key, GError** error);
static GeeArrayList* rygel_meta_config_real_get_string_list (RygelConfiguration* base, const gchar* section, const gchar* key, GError** error);
GeeArrayList* rygel_configuration_get_string_list (RygelConfiguration* self, const gchar* section, const gchar* key, GError** error);
static gint rygel_meta_config_real_get_int (RygelConfiguration* base, const gchar* section, const gchar* key, gint min, gint max, GError** error);
gint rygel_configuration_get_int (RygelConfiguration* self, const gchar* section, const gchar* key, gint min, gint max, GError** error);
static GeeArrayList* rygel_meta_config_real_get_int_list (RygelConfiguration* base, const gchar* section, const gchar* key, GError** error);
GeeArrayList* rygel_configuration_get_int_list (RygelConfiguration* self, const gchar* section, const gchar* key, GError** error);
static gboolean rygel_meta_config_real_get_bool (RygelConfiguration* base, const gchar* section, const gchar* key, GError** error);
gboolean rygel_configuration_get_bool (RygelConfiguration* self, const gchar* section, const gchar* key, GError** error);
static void rygel_meta_config_finalize (GObject* obj);


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


RygelMetaConfig* rygel_meta_config_get_default (void) {
	RygelMetaConfig* result = NULL;
	GeeArrayList* _tmp0_;
	RygelMetaConfig* _tmp2_;
	RygelMetaConfig* _tmp4_;
	RygelMetaConfig* _tmp5_;
	_tmp0_ = rygel_meta_config_configs;
	if (_tmp0_ == NULL) {
		GeeArrayList* _tmp1_;
		_tmp1_ = gee_array_list_new (RYGEL_TYPE_CONFIGURATION, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL);
		_g_object_unref0 (rygel_meta_config_configs);
		rygel_meta_config_configs = _tmp1_;
	}
	_tmp2_ = rygel_meta_config_meta_config;
	if (_tmp2_ == NULL) {
		RygelMetaConfig* _tmp3_;
		_tmp3_ = rygel_meta_config_new ();
		_g_object_unref0 (rygel_meta_config_meta_config);
		rygel_meta_config_meta_config = _tmp3_;
	}
	_tmp4_ = rygel_meta_config_meta_config;
	_tmp5_ = _g_object_ref0 (_tmp4_);
	result = _tmp5_;
	return result;
}


void rygel_meta_config_register_configuration (RygelConfiguration* config) {
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp2_;
	RygelConfiguration* _tmp3_;
	g_return_if_fail (config != NULL);
	_tmp0_ = rygel_meta_config_configs;
	if (_tmp0_ == NULL) {
		GeeArrayList* _tmp1_;
		_tmp1_ = gee_array_list_new (RYGEL_TYPE_CONFIGURATION, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL);
		_g_object_unref0 (rygel_meta_config_configs);
		rygel_meta_config_configs = _tmp1_;
	}
	_tmp2_ = rygel_meta_config_configs;
	_tmp3_ = config;
	gee_abstract_collection_add ((GeeAbstractCollection*) _tmp2_, _tmp3_);
}


void rygel_meta_config_register_default_configurations (void) {
	RygelCmdlineConfig* _tmp0_ = NULL;
	RygelCmdlineConfig* cmdline_config;
	RygelCmdlineConfig* _tmp1_;
	RygelEnvironmentConfig* _tmp2_ = NULL;
	RygelEnvironmentConfig* _tmp3_;
	GError * _inner_error_ = NULL;
	_tmp0_ = rygel_cmdline_config_get_default ();
	cmdline_config = _tmp0_;
	_tmp1_ = cmdline_config;
	rygel_meta_config_register_configuration ((RygelConfiguration*) _tmp1_);
	_tmp2_ = rygel_environment_config_get_default ();
	_tmp3_ = _tmp2_;
	rygel_meta_config_register_configuration ((RygelConfiguration*) _tmp3_);
	_g_object_unref0 (_tmp3_);
	{
		RygelCmdlineConfig* _tmp4_;
		gchar* _tmp5_ = NULL;
		gchar* config_file;
		const gchar* _tmp6_;
		RygelUserConfig* _tmp7_;
		RygelUserConfig* user_config;
		RygelUserConfig* _tmp8_;
		_tmp4_ = cmdline_config;
		_tmp5_ = rygel_cmdline_config_get_config_file (_tmp4_, &_inner_error_);
		config_file = _tmp5_;
		if (_inner_error_ != NULL) {
			goto __catch7_g_error;
		}
		_tmp6_ = config_file;
		_tmp7_ = rygel_user_config_new (_tmp6_, &_inner_error_);
		user_config = _tmp7_;
		if (_inner_error_ != NULL) {
			_g_free0 (config_file);
			goto __catch7_g_error;
		}
		_tmp8_ = user_config;
		rygel_meta_config_register_configuration ((RygelConfiguration*) _tmp8_);
		_g_object_unref0 (user_config);
		_g_free0 (config_file);
	}
	goto __finally7;
	__catch7_g_error:
	{
		GError* _error_ = NULL;
		_error_ = _inner_error_;
		_inner_error_ = NULL;
		{
			RygelUserConfig* _tmp9_ = NULL;
			RygelUserConfig* user_config;
			RygelUserConfig* _tmp10_;
			_tmp9_ = rygel_user_config_get_default (&_inner_error_);
			user_config = _tmp9_;
			if (_inner_error_ != NULL) {
				goto __catch8_g_error;
			}
			_tmp10_ = user_config;
			rygel_meta_config_register_configuration ((RygelConfiguration*) _tmp10_);
			_g_object_unref0 (user_config);
		}
		goto __finally8;
		__catch8_g_error:
		{
			GError* err = NULL;
			const gchar* _tmp11_ = NULL;
			GError* _tmp12_;
			const gchar* _tmp13_;
			err = _inner_error_;
			_inner_error_ = NULL;
			_tmp11_ = _ ("Failed to load user configuration: %s");
			_tmp12_ = err;
			_tmp13_ = _tmp12_->message;
			g_warning (_tmp11_, _tmp13_);
			_g_error_free0 (err);
		}
		__finally8:
		if (_inner_error_ != NULL) {
			_g_error_free0 (_error_);
			_g_error_free0 (_error_);
			_g_object_unref0 (cmdline_config);
			g_critical ("file %s: line %d: unexpected 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;
		}
		_g_error_free0 (_error_);
	}
	__finally7:
	if (_inner_error_ != NULL) {
		_g_object_unref0 (cmdline_config);
		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;
	}
	_g_object_unref0 (cmdline_config);
}


static gboolean rygel_meta_config_real_get_upnp_enabled (RygelConfiguration* base, GError** error) {
	RygelMetaConfig * self;
	gboolean result = FALSE;
	gboolean val;
	gboolean unavailable;
	gboolean _tmp14_;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	val = TRUE;
	unavailable = TRUE;
	{
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _config_size;
		gint _config_index;
		_tmp0_ = rygel_meta_config_configs;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_config_list = _tmp1_;
		_tmp2_ = _config_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_config_size = _tmp4_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			RygelConfiguration* config;
			_tmp5_ = _config_index;
			_config_index = _tmp5_ + 1;
			_tmp6_ = _config_index;
			_tmp7_ = _config_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _config_list;
			_tmp9_ = _config_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			config = (RygelConfiguration*) _tmp10_;
			{
				RygelConfiguration* _tmp11_;
				gboolean _tmp12_ = FALSE;
				gboolean _tmp13_;
				_tmp11_ = config;
				_tmp12_ = rygel_configuration_get_upnp_enabled (_tmp11_, &_inner_error_);
				_tmp13_ = _tmp12_;
				if (_inner_error_ != NULL) {
					goto __catch9_g_error;
				}
				val = _tmp13_;
				unavailable = FALSE;
				_g_object_unref0 (config);
				break;
			}
			goto __finally9;
			__catch9_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally9:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				return FALSE;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp14_ = unavailable;
	if (_tmp14_) {
		const gchar* _tmp15_ = NULL;
		GError* _tmp16_;
		_tmp15_ = _ ("No value available");
		_tmp16_ = g_error_new_literal (RYGEL_CONFIGURATION_ERROR, RYGEL_CONFIGURATION_ERROR_NO_VALUE_SET, _tmp15_);
		_inner_error_ = _tmp16_;
		g_propagate_error (error, _inner_error_);
		return FALSE;
	}
	result = val;
	return result;
}


static gchar* rygel_meta_config_real_get_interface (RygelConfiguration* base, GError** error) {
	RygelMetaConfig * self;
	gchar* result = NULL;
	gchar* val;
	gboolean unavailable;
	gboolean _tmp14_;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	val = NULL;
	unavailable = TRUE;
	{
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _config_size;
		gint _config_index;
		_tmp0_ = rygel_meta_config_configs;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_config_list = _tmp1_;
		_tmp2_ = _config_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_config_size = _tmp4_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			RygelConfiguration* config;
			_tmp5_ = _config_index;
			_config_index = _tmp5_ + 1;
			_tmp6_ = _config_index;
			_tmp7_ = _config_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _config_list;
			_tmp9_ = _config_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			config = (RygelConfiguration*) _tmp10_;
			{
				RygelConfiguration* _tmp11_;
				gchar* _tmp12_ = NULL;
				gchar* _tmp13_;
				_tmp11_ = config;
				_tmp12_ = rygel_configuration_get_interface (_tmp11_, &_inner_error_);
				_tmp13_ = _tmp12_;
				if (_inner_error_ != NULL) {
					goto __catch10_g_error;
				}
				_g_free0 (val);
				val = _tmp13_;
				unavailable = FALSE;
				_g_object_unref0 (config);
				break;
			}
			goto __finally10;
			__catch10_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally10:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				_g_free0 (val);
				return NULL;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp14_ = unavailable;
	if (_tmp14_) {
		const gchar* _tmp15_ = NULL;
		GError* _tmp16_;
		_tmp15_ = _ ("No value available");
		_tmp16_ = g_error_new_literal (RYGEL_CONFIGURATION_ERROR, RYGEL_CONFIGURATION_ERROR_NO_VALUE_SET, _tmp15_);
		_inner_error_ = _tmp16_;
		g_propagate_error (error, _inner_error_);
		_g_free0 (val);
		return NULL;
	}
	result = val;
	return result;
}


static gint rygel_meta_config_real_get_port (RygelConfiguration* base, GError** error) {
	RygelMetaConfig * self;
	gint result = 0;
	gint val;
	gboolean unavailable;
	gboolean _tmp14_;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	val = 0;
	unavailable = TRUE;
	{
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _config_size;
		gint _config_index;
		_tmp0_ = rygel_meta_config_configs;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_config_list = _tmp1_;
		_tmp2_ = _config_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_config_size = _tmp4_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			RygelConfiguration* config;
			_tmp5_ = _config_index;
			_config_index = _tmp5_ + 1;
			_tmp6_ = _config_index;
			_tmp7_ = _config_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _config_list;
			_tmp9_ = _config_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			config = (RygelConfiguration*) _tmp10_;
			{
				RygelConfiguration* _tmp11_;
				gint _tmp12_ = 0;
				gint _tmp13_;
				_tmp11_ = config;
				_tmp12_ = rygel_configuration_get_port (_tmp11_, &_inner_error_);
				_tmp13_ = _tmp12_;
				if (_inner_error_ != NULL) {
					goto __catch11_g_error;
				}
				val = _tmp13_;
				unavailable = FALSE;
				_g_object_unref0 (config);
				break;
			}
			goto __finally11;
			__catch11_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally11:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				return 0;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp14_ = unavailable;
	if (_tmp14_) {
		const gchar* _tmp15_ = NULL;
		GError* _tmp16_;
		_tmp15_ = _ ("No value available");
		_tmp16_ = g_error_new_literal (RYGEL_CONFIGURATION_ERROR, RYGEL_CONFIGURATION_ERROR_NO_VALUE_SET, _tmp15_);
		_inner_error_ = _tmp16_;
		g_propagate_error (error, _inner_error_);
		return 0;
	}
	result = val;
	return result;
}


static gboolean rygel_meta_config_real_get_transcoding (RygelConfiguration* base, GError** error) {
	RygelMetaConfig * self;
	gboolean result = FALSE;
	gboolean val;
	gboolean unavailable;
	gboolean _tmp14_;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	val = TRUE;
	unavailable = TRUE;
	{
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _config_size;
		gint _config_index;
		_tmp0_ = rygel_meta_config_configs;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_config_list = _tmp1_;
		_tmp2_ = _config_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_config_size = _tmp4_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			RygelConfiguration* config;
			_tmp5_ = _config_index;
			_config_index = _tmp5_ + 1;
			_tmp6_ = _config_index;
			_tmp7_ = _config_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _config_list;
			_tmp9_ = _config_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			config = (RygelConfiguration*) _tmp10_;
			{
				RygelConfiguration* _tmp11_;
				gboolean _tmp12_ = FALSE;
				gboolean _tmp13_;
				_tmp11_ = config;
				_tmp12_ = rygel_configuration_get_transcoding (_tmp11_, &_inner_error_);
				_tmp13_ = _tmp12_;
				if (_inner_error_ != NULL) {
					goto __catch12_g_error;
				}
				val = _tmp13_;
				unavailable = FALSE;
				_g_object_unref0 (config);
				break;
			}
			goto __finally12;
			__catch12_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally12:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				return FALSE;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp14_ = unavailable;
	if (_tmp14_) {
		const gchar* _tmp15_ = NULL;
		GError* _tmp16_;
		_tmp15_ = _ ("No value available");
		_tmp16_ = g_error_new_literal (RYGEL_CONFIGURATION_ERROR, RYGEL_CONFIGURATION_ERROR_NO_VALUE_SET, _tmp15_);
		_inner_error_ = _tmp16_;
		g_propagate_error (error, _inner_error_);
		return FALSE;
	}
	result = val;
	return result;
}


static gboolean rygel_meta_config_real_get_mp3_transcoder (RygelConfiguration* base, GError** error) {
	RygelMetaConfig * self;
	gboolean result = FALSE;
	gboolean val;
	gboolean unavailable;
	gboolean _tmp14_;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	val = TRUE;
	unavailable = TRUE;
	{
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _config_size;
		gint _config_index;
		_tmp0_ = rygel_meta_config_configs;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_config_list = _tmp1_;
		_tmp2_ = _config_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_config_size = _tmp4_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			RygelConfiguration* config;
			_tmp5_ = _config_index;
			_config_index = _tmp5_ + 1;
			_tmp6_ = _config_index;
			_tmp7_ = _config_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _config_list;
			_tmp9_ = _config_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			config = (RygelConfiguration*) _tmp10_;
			{
				RygelConfiguration* _tmp11_;
				gboolean _tmp12_ = FALSE;
				gboolean _tmp13_;
				_tmp11_ = config;
				_tmp12_ = rygel_configuration_get_mp3_transcoder (_tmp11_, &_inner_error_);
				_tmp13_ = _tmp12_;
				if (_inner_error_ != NULL) {
					goto __catch13_g_error;
				}
				val = _tmp13_;
				unavailable = FALSE;
				_g_object_unref0 (config);
				break;
			}
			goto __finally13;
			__catch13_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally13:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				return FALSE;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp14_ = unavailable;
	if (_tmp14_) {
		const gchar* _tmp15_ = NULL;
		GError* _tmp16_;
		_tmp15_ = _ ("No value available");
		_tmp16_ = g_error_new_literal (RYGEL_CONFIGURATION_ERROR, RYGEL_CONFIGURATION_ERROR_NO_VALUE_SET, _tmp15_);
		_inner_error_ = _tmp16_;
		g_propagate_error (error, _inner_error_);
		return FALSE;
	}
	result = val;
	return result;
}


static gboolean rygel_meta_config_real_get_mp2ts_transcoder (RygelConfiguration* base, GError** error) {
	RygelMetaConfig * self;
	gboolean result = FALSE;
	gboolean val;
	gboolean unavailable;
	gboolean _tmp14_;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	val = TRUE;
	unavailable = TRUE;
	{
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _config_size;
		gint _config_index;
		_tmp0_ = rygel_meta_config_configs;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_config_list = _tmp1_;
		_tmp2_ = _config_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_config_size = _tmp4_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			RygelConfiguration* config;
			_tmp5_ = _config_index;
			_config_index = _tmp5_ + 1;
			_tmp6_ = _config_index;
			_tmp7_ = _config_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _config_list;
			_tmp9_ = _config_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			config = (RygelConfiguration*) _tmp10_;
			{
				RygelConfiguration* _tmp11_;
				gboolean _tmp12_ = FALSE;
				gboolean _tmp13_;
				_tmp11_ = config;
				_tmp12_ = rygel_configuration_get_mp2ts_transcoder (_tmp11_, &_inner_error_);
				_tmp13_ = _tmp12_;
				if (_inner_error_ != NULL) {
					goto __catch14_g_error;
				}
				val = _tmp13_;
				unavailable = FALSE;
				_g_object_unref0 (config);
				break;
			}
			goto __finally14;
			__catch14_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally14:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				return FALSE;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp14_ = unavailable;
	if (_tmp14_) {
		const gchar* _tmp15_ = NULL;
		GError* _tmp16_;
		_tmp15_ = _ ("No value available");
		_tmp16_ = g_error_new_literal (RYGEL_CONFIGURATION_ERROR, RYGEL_CONFIGURATION_ERROR_NO_VALUE_SET, _tmp15_);
		_inner_error_ = _tmp16_;
		g_propagate_error (error, _inner_error_);
		return FALSE;
	}
	result = val;
	return result;
}


static gboolean rygel_meta_config_real_get_lpcm_transcoder (RygelConfiguration* base, GError** error) {
	RygelMetaConfig * self;
	gboolean result = FALSE;
	gboolean val;
	gboolean unavailable;
	gboolean _tmp14_;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	val = TRUE;
	unavailable = TRUE;
	{
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _config_size;
		gint _config_index;
		_tmp0_ = rygel_meta_config_configs;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_config_list = _tmp1_;
		_tmp2_ = _config_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_config_size = _tmp4_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			RygelConfiguration* config;
			_tmp5_ = _config_index;
			_config_index = _tmp5_ + 1;
			_tmp6_ = _config_index;
			_tmp7_ = _config_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _config_list;
			_tmp9_ = _config_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			config = (RygelConfiguration*) _tmp10_;
			{
				RygelConfiguration* _tmp11_;
				gboolean _tmp12_ = FALSE;
				gboolean _tmp13_;
				_tmp11_ = config;
				_tmp12_ = rygel_configuration_get_lpcm_transcoder (_tmp11_, &_inner_error_);
				_tmp13_ = _tmp12_;
				if (_inner_error_ != NULL) {
					goto __catch15_g_error;
				}
				val = _tmp13_;
				unavailable = FALSE;
				_g_object_unref0 (config);
				break;
			}
			goto __finally15;
			__catch15_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally15:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				return FALSE;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp14_ = unavailable;
	if (_tmp14_) {
		const gchar* _tmp15_ = NULL;
		GError* _tmp16_;
		_tmp15_ = _ ("No value available");
		_tmp16_ = g_error_new_literal (RYGEL_CONFIGURATION_ERROR, RYGEL_CONFIGURATION_ERROR_NO_VALUE_SET, _tmp15_);
		_inner_error_ = _tmp16_;
		g_propagate_error (error, _inner_error_);
		return FALSE;
	}
	result = val;
	return result;
}


static gboolean rygel_meta_config_real_get_wmv_transcoder (RygelConfiguration* base, GError** error) {
	RygelMetaConfig * self;
	gboolean result = FALSE;
	gboolean val;
	gboolean unavailable;
	gboolean _tmp14_;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	val = TRUE;
	unavailable = TRUE;
	{
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _config_size;
		gint _config_index;
		_tmp0_ = rygel_meta_config_configs;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_config_list = _tmp1_;
		_tmp2_ = _config_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_config_size = _tmp4_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			RygelConfiguration* config;
			_tmp5_ = _config_index;
			_config_index = _tmp5_ + 1;
			_tmp6_ = _config_index;
			_tmp7_ = _config_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _config_list;
			_tmp9_ = _config_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			config = (RygelConfiguration*) _tmp10_;
			{
				RygelConfiguration* _tmp11_;
				gboolean _tmp12_ = FALSE;
				gboolean _tmp13_;
				_tmp11_ = config;
				_tmp12_ = rygel_configuration_get_wmv_transcoder (_tmp11_, &_inner_error_);
				_tmp13_ = _tmp12_;
				if (_inner_error_ != NULL) {
					goto __catch16_g_error;
				}
				val = _tmp13_;
				unavailable = FALSE;
				_g_object_unref0 (config);
				break;
			}
			goto __finally16;
			__catch16_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally16:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				return FALSE;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp14_ = unavailable;
	if (_tmp14_) {
		const gchar* _tmp15_ = NULL;
		GError* _tmp16_;
		_tmp15_ = _ ("No value available");
		_tmp16_ = g_error_new_literal (RYGEL_CONFIGURATION_ERROR, RYGEL_CONFIGURATION_ERROR_NO_VALUE_SET, _tmp15_);
		_inner_error_ = _tmp16_;
		g_propagate_error (error, _inner_error_);
		return FALSE;
	}
	result = val;
	return result;
}


static gboolean rygel_meta_config_real_get_aac_transcoder (RygelConfiguration* base, GError** error) {
	RygelMetaConfig * self;
	gboolean result = FALSE;
	gboolean val;
	gboolean unavailable;
	gboolean _tmp14_;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	val = TRUE;
	unavailable = TRUE;
	{
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _config_size;
		gint _config_index;
		_tmp0_ = rygel_meta_config_configs;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_config_list = _tmp1_;
		_tmp2_ = _config_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_config_size = _tmp4_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			RygelConfiguration* config;
			_tmp5_ = _config_index;
			_config_index = _tmp5_ + 1;
			_tmp6_ = _config_index;
			_tmp7_ = _config_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _config_list;
			_tmp9_ = _config_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			config = (RygelConfiguration*) _tmp10_;
			{
				RygelConfiguration* _tmp11_;
				gboolean _tmp12_ = FALSE;
				gboolean _tmp13_;
				_tmp11_ = config;
				_tmp12_ = rygel_configuration_get_aac_transcoder (_tmp11_, &_inner_error_);
				_tmp13_ = _tmp12_;
				if (_inner_error_ != NULL) {
					goto __catch17_g_error;
				}
				val = _tmp13_;
				unavailable = FALSE;
				_g_object_unref0 (config);
				break;
			}
			goto __finally17;
			__catch17_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally17:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				return FALSE;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp14_ = unavailable;
	if (_tmp14_) {
		const gchar* _tmp15_ = NULL;
		GError* _tmp16_;
		_tmp15_ = _ ("No value available");
		_tmp16_ = g_error_new_literal (RYGEL_CONFIGURATION_ERROR, RYGEL_CONFIGURATION_ERROR_NO_VALUE_SET, _tmp15_);
		_inner_error_ = _tmp16_;
		g_propagate_error (error, _inner_error_);
		return FALSE;
	}
	result = val;
	return result;
}


static gboolean rygel_meta_config_real_get_avc_transcoder (RygelConfiguration* base, GError** error) {
	RygelMetaConfig * self;
	gboolean result = FALSE;
	gboolean val;
	gboolean unavailable;
	gboolean _tmp14_;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	val = TRUE;
	unavailable = TRUE;
	{
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _config_size;
		gint _config_index;
		_tmp0_ = rygel_meta_config_configs;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_config_list = _tmp1_;
		_tmp2_ = _config_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_config_size = _tmp4_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			RygelConfiguration* config;
			_tmp5_ = _config_index;
			_config_index = _tmp5_ + 1;
			_tmp6_ = _config_index;
			_tmp7_ = _config_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _config_list;
			_tmp9_ = _config_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			config = (RygelConfiguration*) _tmp10_;
			{
				RygelConfiguration* _tmp11_;
				gboolean _tmp12_ = FALSE;
				gboolean _tmp13_;
				_tmp11_ = config;
				_tmp12_ = rygel_configuration_get_avc_transcoder (_tmp11_, &_inner_error_);
				_tmp13_ = _tmp12_;
				if (_inner_error_ != NULL) {
					goto __catch18_g_error;
				}
				val = _tmp13_;
				unavailable = FALSE;
				_g_object_unref0 (config);
				break;
			}
			goto __finally18;
			__catch18_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally18:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				return FALSE;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp14_ = unavailable;
	if (_tmp14_) {
		const gchar* _tmp15_ = NULL;
		GError* _tmp16_;
		_tmp15_ = _ ("No value available");
		_tmp16_ = g_error_new_literal (RYGEL_CONFIGURATION_ERROR, RYGEL_CONFIGURATION_ERROR_NO_VALUE_SET, _tmp15_);
		_inner_error_ = _tmp16_;
		g_propagate_error (error, _inner_error_);
		return FALSE;
	}
	result = val;
	return result;
}


static gboolean rygel_meta_config_real_get_allow_upload (RygelConfiguration* base, GError** error) {
	RygelMetaConfig * self;
	gboolean result = FALSE;
	gboolean val;
	gboolean unavailable;
	gboolean _tmp14_;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	val = TRUE;
	unavailable = TRUE;
	{
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _config_size;
		gint _config_index;
		_tmp0_ = rygel_meta_config_configs;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_config_list = _tmp1_;
		_tmp2_ = _config_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_config_size = _tmp4_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			RygelConfiguration* config;
			_tmp5_ = _config_index;
			_config_index = _tmp5_ + 1;
			_tmp6_ = _config_index;
			_tmp7_ = _config_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _config_list;
			_tmp9_ = _config_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			config = (RygelConfiguration*) _tmp10_;
			{
				RygelConfiguration* _tmp11_;
				gboolean _tmp12_ = FALSE;
				gboolean _tmp13_;
				_tmp11_ = config;
				_tmp12_ = rygel_configuration_get_allow_upload (_tmp11_, &_inner_error_);
				_tmp13_ = _tmp12_;
				if (_inner_error_ != NULL) {
					goto __catch19_g_error;
				}
				val = _tmp13_;
				unavailable = FALSE;
				_g_object_unref0 (config);
				break;
			}
			goto __finally19;
			__catch19_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally19:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				return FALSE;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp14_ = unavailable;
	if (_tmp14_) {
		const gchar* _tmp15_ = NULL;
		GError* _tmp16_;
		_tmp15_ = _ ("No value available");
		_tmp16_ = g_error_new_literal (RYGEL_CONFIGURATION_ERROR, RYGEL_CONFIGURATION_ERROR_NO_VALUE_SET, _tmp15_);
		_inner_error_ = _tmp16_;
		g_propagate_error (error, _inner_error_);
		return FALSE;
	}
	result = val;
	return result;
}


static gboolean rygel_meta_config_real_get_allow_deletion (RygelConfiguration* base, GError** error) {
	RygelMetaConfig * self;
	gboolean result = FALSE;
	gboolean val;
	gboolean unavailable;
	gboolean _tmp14_;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	val = TRUE;
	unavailable = TRUE;
	{
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _config_size;
		gint _config_index;
		_tmp0_ = rygel_meta_config_configs;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_config_list = _tmp1_;
		_tmp2_ = _config_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_config_size = _tmp4_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			RygelConfiguration* config;
			_tmp5_ = _config_index;
			_config_index = _tmp5_ + 1;
			_tmp6_ = _config_index;
			_tmp7_ = _config_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _config_list;
			_tmp9_ = _config_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			config = (RygelConfiguration*) _tmp10_;
			{
				RygelConfiguration* _tmp11_;
				gboolean _tmp12_ = FALSE;
				gboolean _tmp13_;
				_tmp11_ = config;
				_tmp12_ = rygel_configuration_get_allow_deletion (_tmp11_, &_inner_error_);
				_tmp13_ = _tmp12_;
				if (_inner_error_ != NULL) {
					goto __catch20_g_error;
				}
				val = _tmp13_;
				unavailable = FALSE;
				_g_object_unref0 (config);
				break;
			}
			goto __finally20;
			__catch20_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally20:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				return FALSE;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp14_ = unavailable;
	if (_tmp14_) {
		const gchar* _tmp15_ = NULL;
		GError* _tmp16_;
		_tmp15_ = _ ("No value available");
		_tmp16_ = g_error_new_literal (RYGEL_CONFIGURATION_ERROR, RYGEL_CONFIGURATION_ERROR_NO_VALUE_SET, _tmp15_);
		_inner_error_ = _tmp16_;
		g_propagate_error (error, _inner_error_);
		return FALSE;
	}
	result = val;
	return result;
}


static gchar* rygel_meta_config_real_get_log_levels (RygelConfiguration* base, GError** error) {
	RygelMetaConfig * self;
	gchar* result = NULL;
	gchar* val;
	gboolean unavailable;
	gboolean _tmp14_;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	val = NULL;
	unavailable = TRUE;
	{
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _config_size;
		gint _config_index;
		_tmp0_ = rygel_meta_config_configs;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_config_list = _tmp1_;
		_tmp2_ = _config_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_config_size = _tmp4_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			RygelConfiguration* config;
			_tmp5_ = _config_index;
			_config_index = _tmp5_ + 1;
			_tmp6_ = _config_index;
			_tmp7_ = _config_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _config_list;
			_tmp9_ = _config_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			config = (RygelConfiguration*) _tmp10_;
			{
				RygelConfiguration* _tmp11_;
				gchar* _tmp12_ = NULL;
				gchar* _tmp13_;
				_tmp11_ = config;
				_tmp12_ = rygel_configuration_get_log_levels (_tmp11_, &_inner_error_);
				_tmp13_ = _tmp12_;
				if (_inner_error_ != NULL) {
					goto __catch21_g_error;
				}
				_g_free0 (val);
				val = _tmp13_;
				unavailable = FALSE;
				_g_object_unref0 (config);
				break;
			}
			goto __finally21;
			__catch21_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally21:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				_g_free0 (val);
				return NULL;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp14_ = unavailable;
	if (_tmp14_) {
		const gchar* _tmp15_ = NULL;
		GError* _tmp16_;
		_tmp15_ = _ ("No value available");
		_tmp16_ = g_error_new_literal (RYGEL_CONFIGURATION_ERROR, RYGEL_CONFIGURATION_ERROR_NO_VALUE_SET, _tmp15_);
		_inner_error_ = _tmp16_;
		g_propagate_error (error, _inner_error_);
		_g_free0 (val);
		return NULL;
	}
	result = val;
	return result;
}


static gchar* rygel_meta_config_real_get_plugin_path (RygelConfiguration* base, GError** error) {
	RygelMetaConfig * self;
	gchar* result = NULL;
	gchar* val;
	gboolean unavailable;
	gboolean _tmp14_;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	val = NULL;
	unavailable = TRUE;
	{
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _config_size;
		gint _config_index;
		_tmp0_ = rygel_meta_config_configs;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_config_list = _tmp1_;
		_tmp2_ = _config_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_config_size = _tmp4_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			RygelConfiguration* config;
			_tmp5_ = _config_index;
			_config_index = _tmp5_ + 1;
			_tmp6_ = _config_index;
			_tmp7_ = _config_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _config_list;
			_tmp9_ = _config_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			config = (RygelConfiguration*) _tmp10_;
			{
				RygelConfiguration* _tmp11_;
				gchar* _tmp12_ = NULL;
				gchar* _tmp13_;
				_tmp11_ = config;
				_tmp12_ = rygel_configuration_get_plugin_path (_tmp11_, &_inner_error_);
				_tmp13_ = _tmp12_;
				if (_inner_error_ != NULL) {
					goto __catch22_g_error;
				}
				_g_free0 (val);
				val = _tmp13_;
				unavailable = FALSE;
				_g_object_unref0 (config);
				break;
			}
			goto __finally22;
			__catch22_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally22:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				_g_free0 (val);
				return NULL;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp14_ = unavailable;
	if (_tmp14_) {
		GError* _tmp15_;
		_tmp15_ = g_error_new_literal (RYGEL_CONFIGURATION_ERROR, RYGEL_CONFIGURATION_ERROR_NO_VALUE_SET, "No value available");
		_inner_error_ = _tmp15_;
		g_propagate_error (error, _inner_error_);
		_g_free0 (val);
		return NULL;
	}
	result = val;
	return result;
}


static gchar* string_replace (const gchar* self, const gchar* old, const gchar* replacement) {
	gchar* result = NULL;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (old != NULL, NULL);
	g_return_val_if_fail (replacement != NULL, NULL);
	{
		const gchar* _tmp0_;
		gchar* _tmp1_ = NULL;
		gchar* _tmp2_;
		GRegex* _tmp3_;
		GRegex* _tmp4_;
		GRegex* regex;
		GRegex* _tmp5_;
		const gchar* _tmp6_;
		gchar* _tmp7_ = NULL;
		gchar* _tmp8_;
		_tmp0_ = old;
		_tmp1_ = g_regex_escape_string (_tmp0_, -1);
		_tmp2_ = _tmp1_;
		_tmp3_ = g_regex_new (_tmp2_, 0, 0, &_inner_error_);
		_tmp4_ = _tmp3_;
		_g_free0 (_tmp2_);
		regex = _tmp4_;
		if (_inner_error_ != NULL) {
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch24_g_regex_error;
			}
			g_critical ("file %s: line %d: unexpected 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;
		}
		_tmp5_ = regex;
		_tmp6_ = replacement;
		_tmp7_ = g_regex_replace_literal (_tmp5_, self, (gssize) (-1), 0, _tmp6_, 0, &_inner_error_);
		_tmp8_ = _tmp7_;
		if (_inner_error_ != NULL) {
			_g_regex_unref0 (regex);
			if (_inner_error_->domain == G_REGEX_ERROR) {
				goto __catch24_g_regex_error;
			}
			_g_regex_unref0 (regex);
			g_critical ("file %s: line %d: unexpected 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;
		}
		result = _tmp8_;
		_g_regex_unref0 (regex);
		return result;
	}
	goto __finally24;
	__catch24_g_regex_error:
	{
		GError* e = NULL;
		e = _inner_error_;
		_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (e);
	}
	__finally24:
	if (_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
		g_clear_error (&_inner_error_);
		return NULL;
	}
}


static gchar* rygel_meta_config_real_get_video_upload_folder (RygelConfiguration* base, GError** error) {
	RygelMetaConfig * self;
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	const gchar* _default_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* value;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	gchar* _tmp19_ = NULL;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	_tmp0_ = g_get_user_special_dir (G_USER_DIRECTORY_VIDEOS);
	_default_ = _tmp0_;
	_tmp1_ = _default_;
	_tmp2_ = g_strdup (_tmp1_);
	value = _tmp2_;
	{
		GeeArrayList* _tmp3_;
		GeeArrayList* _tmp4_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		gint _config_size;
		gint _config_index;
		_tmp3_ = rygel_meta_config_configs;
		_tmp4_ = _g_object_ref0 (_tmp3_);
		_config_list = _tmp4_;
		_tmp5_ = _config_list;
		_tmp6_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp5_);
		_tmp7_ = _tmp6_;
		_config_size = _tmp7_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp8_;
			gint _tmp9_;
			gint _tmp10_;
			GeeArrayList* _tmp11_;
			gint _tmp12_;
			gpointer _tmp13_ = NULL;
			RygelConfiguration* config;
			_tmp8_ = _config_index;
			_config_index = _tmp8_ + 1;
			_tmp9_ = _config_index;
			_tmp10_ = _config_size;
			if (!(_tmp9_ < _tmp10_)) {
				break;
			}
			_tmp11_ = _config_list;
			_tmp12_ = _config_index;
			_tmp13_ = gee_abstract_list_get ((GeeAbstractList*) _tmp11_, _tmp12_);
			config = (RygelConfiguration*) _tmp13_;
			{
				RygelConfiguration* _tmp14_;
				gchar* _tmp15_ = NULL;
				gchar* _tmp16_;
				_tmp14_ = config;
				_tmp15_ = rygel_configuration_get_video_upload_folder (_tmp14_, &_inner_error_);
				_tmp16_ = _tmp15_;
				if (_inner_error_ != NULL) {
					goto __catch23_g_error;
				}
				_g_free0 (value);
				value = _tmp16_;
			}
			goto __finally23;
			__catch23_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally23:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				_g_free0 (value);
				return NULL;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp17_ = value;
	_tmp18_ = _default_;
	_tmp19_ = string_replace (_tmp17_, "@VIDEOS@", _tmp18_);
	result = _tmp19_;
	_g_free0 (value);
	return result;
}


static gchar* rygel_meta_config_real_get_music_upload_folder (RygelConfiguration* base, GError** error) {
	RygelMetaConfig * self;
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	const gchar* _default_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* value;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	gchar* _tmp19_ = NULL;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	_tmp0_ = g_get_user_special_dir (G_USER_DIRECTORY_MUSIC);
	_default_ = _tmp0_;
	_tmp1_ = _default_;
	_tmp2_ = g_strdup (_tmp1_);
	value = _tmp2_;
	{
		GeeArrayList* _tmp3_;
		GeeArrayList* _tmp4_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		gint _config_size;
		gint _config_index;
		_tmp3_ = rygel_meta_config_configs;
		_tmp4_ = _g_object_ref0 (_tmp3_);
		_config_list = _tmp4_;
		_tmp5_ = _config_list;
		_tmp6_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp5_);
		_tmp7_ = _tmp6_;
		_config_size = _tmp7_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp8_;
			gint _tmp9_;
			gint _tmp10_;
			GeeArrayList* _tmp11_;
			gint _tmp12_;
			gpointer _tmp13_ = NULL;
			RygelConfiguration* config;
			_tmp8_ = _config_index;
			_config_index = _tmp8_ + 1;
			_tmp9_ = _config_index;
			_tmp10_ = _config_size;
			if (!(_tmp9_ < _tmp10_)) {
				break;
			}
			_tmp11_ = _config_list;
			_tmp12_ = _config_index;
			_tmp13_ = gee_abstract_list_get ((GeeAbstractList*) _tmp11_, _tmp12_);
			config = (RygelConfiguration*) _tmp13_;
			{
				RygelConfiguration* _tmp14_;
				gchar* _tmp15_ = NULL;
				gchar* _tmp16_;
				_tmp14_ = config;
				_tmp15_ = rygel_configuration_get_music_upload_folder (_tmp14_, &_inner_error_);
				_tmp16_ = _tmp15_;
				if (_inner_error_ != NULL) {
					goto __catch25_g_error;
				}
				_g_free0 (value);
				value = _tmp16_;
			}
			goto __finally25;
			__catch25_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally25:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				_g_free0 (value);
				return NULL;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp17_ = value;
	_tmp18_ = _default_;
	_tmp19_ = string_replace (_tmp17_, "@MUSIC@", _tmp18_);
	result = _tmp19_;
	_g_free0 (value);
	return result;
}


static gchar* rygel_meta_config_real_get_picture_upload_folder (RygelConfiguration* base, GError** error) {
	RygelMetaConfig * self;
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	const gchar* _default_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* value;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	gchar* _tmp19_ = NULL;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	_tmp0_ = g_get_user_special_dir (G_USER_DIRECTORY_PICTURES);
	_default_ = _tmp0_;
	_tmp1_ = _default_;
	_tmp2_ = g_strdup (_tmp1_);
	value = _tmp2_;
	{
		GeeArrayList* _tmp3_;
		GeeArrayList* _tmp4_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp5_;
		gint _tmp6_;
		gint _tmp7_;
		gint _config_size;
		gint _config_index;
		_tmp3_ = rygel_meta_config_configs;
		_tmp4_ = _g_object_ref0 (_tmp3_);
		_config_list = _tmp4_;
		_tmp5_ = _config_list;
		_tmp6_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp5_);
		_tmp7_ = _tmp6_;
		_config_size = _tmp7_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp8_;
			gint _tmp9_;
			gint _tmp10_;
			GeeArrayList* _tmp11_;
			gint _tmp12_;
			gpointer _tmp13_ = NULL;
			RygelConfiguration* config;
			_tmp8_ = _config_index;
			_config_index = _tmp8_ + 1;
			_tmp9_ = _config_index;
			_tmp10_ = _config_size;
			if (!(_tmp9_ < _tmp10_)) {
				break;
			}
			_tmp11_ = _config_list;
			_tmp12_ = _config_index;
			_tmp13_ = gee_abstract_list_get ((GeeAbstractList*) _tmp11_, _tmp12_);
			config = (RygelConfiguration*) _tmp13_;
			{
				RygelConfiguration* _tmp14_;
				gchar* _tmp15_ = NULL;
				gchar* _tmp16_;
				_tmp14_ = config;
				_tmp15_ = rygel_configuration_get_picture_upload_folder (_tmp14_, &_inner_error_);
				_tmp16_ = _tmp15_;
				if (_inner_error_ != NULL) {
					goto __catch26_g_error;
				}
				_g_free0 (value);
				value = _tmp16_;
			}
			goto __finally26;
			__catch26_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally26:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				_g_free0 (value);
				return NULL;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp17_ = value;
	_tmp18_ = _default_;
	_tmp19_ = string_replace (_tmp17_, "@PICTURES@", _tmp18_);
	result = _tmp19_;
	_g_free0 (value);
	return result;
}


static gboolean rygel_meta_config_real_get_enabled (RygelConfiguration* base, const gchar* section, GError** error) {
	RygelMetaConfig * self;
	gboolean result = FALSE;
	gboolean val;
	gboolean unavailable;
	gboolean _tmp15_;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	g_return_val_if_fail (section != NULL, FALSE);
	val = TRUE;
	unavailable = TRUE;
	{
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _config_size;
		gint _config_index;
		_tmp0_ = rygel_meta_config_configs;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_config_list = _tmp1_;
		_tmp2_ = _config_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_config_size = _tmp4_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			RygelConfiguration* config;
			_tmp5_ = _config_index;
			_config_index = _tmp5_ + 1;
			_tmp6_ = _config_index;
			_tmp7_ = _config_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _config_list;
			_tmp9_ = _config_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			config = (RygelConfiguration*) _tmp10_;
			{
				RygelConfiguration* _tmp11_;
				const gchar* _tmp12_;
				gboolean _tmp13_ = FALSE;
				gboolean _tmp14_;
				_tmp11_ = config;
				_tmp12_ = section;
				_tmp13_ = rygel_configuration_get_enabled (_tmp11_, _tmp12_, &_inner_error_);
				_tmp14_ = _tmp13_;
				if (_inner_error_ != NULL) {
					goto __catch27_g_error;
				}
				val = _tmp14_;
				unavailable = FALSE;
				_g_object_unref0 (config);
				break;
			}
			goto __finally27;
			__catch27_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally27:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				return FALSE;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp15_ = unavailable;
	if (_tmp15_) {
		const gchar* _tmp16_ = NULL;
		const gchar* _tmp17_;
		GError* _tmp18_;
		_tmp16_ = _ ("No value set for '%s/enabled'");
		_tmp17_ = section;
		_tmp18_ = g_error_new (RYGEL_CONFIGURATION_ERROR, RYGEL_CONFIGURATION_ERROR_NO_VALUE_SET, _tmp16_, _tmp17_);
		_inner_error_ = _tmp18_;
		g_propagate_error (error, _inner_error_);
		return FALSE;
	}
	result = val;
	return result;
}


static gchar* rygel_meta_config_real_get_title (RygelConfiguration* base, const gchar* section, GError** error) {
	RygelMetaConfig * self;
	gchar* result = NULL;
	gchar* val;
	const gchar* _tmp15_;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	g_return_val_if_fail (section != NULL, NULL);
	val = NULL;
	{
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _config_size;
		gint _config_index;
		_tmp0_ = rygel_meta_config_configs;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_config_list = _tmp1_;
		_tmp2_ = _config_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_config_size = _tmp4_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			RygelConfiguration* config;
			_tmp5_ = _config_index;
			_config_index = _tmp5_ + 1;
			_tmp6_ = _config_index;
			_tmp7_ = _config_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _config_list;
			_tmp9_ = _config_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			config = (RygelConfiguration*) _tmp10_;
			{
				RygelConfiguration* _tmp11_;
				const gchar* _tmp12_;
				gchar* _tmp13_ = NULL;
				gchar* _tmp14_;
				_tmp11_ = config;
				_tmp12_ = section;
				_tmp13_ = rygel_configuration_get_title (_tmp11_, _tmp12_, &_inner_error_);
				_tmp14_ = _tmp13_;
				if (_inner_error_ != NULL) {
					goto __catch28_g_error;
				}
				_g_free0 (val);
				val = _tmp14_;
				_g_object_unref0 (config);
				break;
			}
			goto __finally28;
			__catch28_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally28:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				_g_free0 (val);
				return NULL;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp15_ = val;
	if (_tmp15_ == NULL) {
		const gchar* _tmp16_ = NULL;
		const gchar* _tmp17_;
		GError* _tmp18_;
		_tmp16_ = _ ("No value set for '%s/enabled'");
		_tmp17_ = section;
		_tmp18_ = g_error_new (RYGEL_CONFIGURATION_ERROR, RYGEL_CONFIGURATION_ERROR_NO_VALUE_SET, _tmp16_, _tmp17_);
		_inner_error_ = _tmp18_;
		g_propagate_error (error, _inner_error_);
		_g_free0 (val);
		return NULL;
	}
	result = val;
	return result;
}


static gchar* rygel_meta_config_real_get_string (RygelConfiguration* base, const gchar* section, const gchar* key, GError** error) {
	RygelMetaConfig * self;
	gchar* result = NULL;
	gchar* val;
	const gchar* _tmp16_;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	g_return_val_if_fail (section != NULL, NULL);
	g_return_val_if_fail (key != NULL, NULL);
	val = NULL;
	{
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _config_size;
		gint _config_index;
		_tmp0_ = rygel_meta_config_configs;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_config_list = _tmp1_;
		_tmp2_ = _config_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_config_size = _tmp4_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			RygelConfiguration* config;
			_tmp5_ = _config_index;
			_config_index = _tmp5_ + 1;
			_tmp6_ = _config_index;
			_tmp7_ = _config_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _config_list;
			_tmp9_ = _config_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			config = (RygelConfiguration*) _tmp10_;
			{
				RygelConfiguration* _tmp11_;
				const gchar* _tmp12_;
				const gchar* _tmp13_;
				gchar* _tmp14_ = NULL;
				gchar* _tmp15_;
				_tmp11_ = config;
				_tmp12_ = section;
				_tmp13_ = key;
				_tmp14_ = rygel_configuration_get_string (_tmp11_, _tmp12_, _tmp13_, &_inner_error_);
				_tmp15_ = _tmp14_;
				if (_inner_error_ != NULL) {
					goto __catch29_g_error;
				}
				_g_free0 (val);
				val = _tmp15_;
				_g_object_unref0 (config);
				break;
			}
			goto __finally29;
			__catch29_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally29:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				_g_free0 (val);
				return NULL;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp16_ = val;
	if (_tmp16_ == NULL) {
		const gchar* _tmp17_ = NULL;
		const gchar* _tmp18_;
		const gchar* _tmp19_;
		GError* _tmp20_;
		_tmp17_ = _ ("No value available for '%s/%s'");
		_tmp18_ = section;
		_tmp19_ = key;
		_tmp20_ = g_error_new (RYGEL_CONFIGURATION_ERROR, RYGEL_CONFIGURATION_ERROR_NO_VALUE_SET, _tmp17_, _tmp18_, _tmp19_);
		_inner_error_ = _tmp20_;
		g_propagate_error (error, _inner_error_);
		_g_free0 (val);
		return NULL;
	}
	result = val;
	return result;
}


static GeeArrayList* rygel_meta_config_real_get_string_list (RygelConfiguration* base, const gchar* section, const gchar* key, GError** error) {
	RygelMetaConfig * self;
	GeeArrayList* result = NULL;
	GeeArrayList* val;
	GeeArrayList* _tmp16_;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	g_return_val_if_fail (section != NULL, NULL);
	g_return_val_if_fail (key != NULL, NULL);
	val = NULL;
	{
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _config_size;
		gint _config_index;
		_tmp0_ = rygel_meta_config_configs;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_config_list = _tmp1_;
		_tmp2_ = _config_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_config_size = _tmp4_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			RygelConfiguration* config;
			_tmp5_ = _config_index;
			_config_index = _tmp5_ + 1;
			_tmp6_ = _config_index;
			_tmp7_ = _config_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _config_list;
			_tmp9_ = _config_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			config = (RygelConfiguration*) _tmp10_;
			{
				RygelConfiguration* _tmp11_;
				const gchar* _tmp12_;
				const gchar* _tmp13_;
				GeeArrayList* _tmp14_ = NULL;
				GeeArrayList* _tmp15_;
				_tmp11_ = config;
				_tmp12_ = section;
				_tmp13_ = key;
				_tmp14_ = rygel_configuration_get_string_list (_tmp11_, _tmp12_, _tmp13_, &_inner_error_);
				_tmp15_ = _tmp14_;
				if (_inner_error_ != NULL) {
					goto __catch30_g_error;
				}
				_g_object_unref0 (val);
				val = _tmp15_;
				_g_object_unref0 (config);
				break;
			}
			goto __finally30;
			__catch30_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally30:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				_g_object_unref0 (val);
				return NULL;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp16_ = val;
	if (_tmp16_ == NULL) {
		const gchar* _tmp17_ = NULL;
		const gchar* _tmp18_;
		const gchar* _tmp19_;
		GError* _tmp20_;
		_tmp17_ = _ ("No value available for '%s/%s'");
		_tmp18_ = section;
		_tmp19_ = key;
		_tmp20_ = g_error_new (RYGEL_CONFIGURATION_ERROR, RYGEL_CONFIGURATION_ERROR_NO_VALUE_SET, _tmp17_, _tmp18_, _tmp19_);
		_inner_error_ = _tmp20_;
		g_propagate_error (error, _inner_error_);
		_g_object_unref0 (val);
		return NULL;
	}
	result = val;
	return result;
}


static gint rygel_meta_config_real_get_int (RygelConfiguration* base, const gchar* section, const gchar* key, gint min, gint max, GError** error) {
	RygelMetaConfig * self;
	gint result = 0;
	gint val;
	gboolean unavailable;
	gboolean _tmp18_;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	g_return_val_if_fail (section != NULL, 0);
	g_return_val_if_fail (key != NULL, 0);
	val = 0;
	unavailable = TRUE;
	{
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _config_size;
		gint _config_index;
		_tmp0_ = rygel_meta_config_configs;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_config_list = _tmp1_;
		_tmp2_ = _config_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_config_size = _tmp4_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			RygelConfiguration* config;
			_tmp5_ = _config_index;
			_config_index = _tmp5_ + 1;
			_tmp6_ = _config_index;
			_tmp7_ = _config_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _config_list;
			_tmp9_ = _config_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			config = (RygelConfiguration*) _tmp10_;
			{
				RygelConfiguration* _tmp11_;
				const gchar* _tmp12_;
				const gchar* _tmp13_;
				gint _tmp14_;
				gint _tmp15_;
				gint _tmp16_ = 0;
				gint _tmp17_;
				_tmp11_ = config;
				_tmp12_ = section;
				_tmp13_ = key;
				_tmp14_ = min;
				_tmp15_ = max;
				_tmp16_ = rygel_configuration_get_int (_tmp11_, _tmp12_, _tmp13_, _tmp14_, _tmp15_, &_inner_error_);
				_tmp17_ = _tmp16_;
				if (_inner_error_ != NULL) {
					goto __catch31_g_error;
				}
				val = _tmp17_;
				unavailable = FALSE;
				_g_object_unref0 (config);
				break;
			}
			goto __finally31;
			__catch31_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally31:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				return 0;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp18_ = unavailable;
	if (_tmp18_) {
		const gchar* _tmp19_ = NULL;
		const gchar* _tmp20_;
		const gchar* _tmp21_;
		GError* _tmp22_;
		_tmp19_ = _ ("No value available for '%s/%s'");
		_tmp20_ = section;
		_tmp21_ = key;
		_tmp22_ = g_error_new (RYGEL_CONFIGURATION_ERROR, RYGEL_CONFIGURATION_ERROR_NO_VALUE_SET, _tmp19_, _tmp20_, _tmp21_);
		_inner_error_ = _tmp22_;
		g_propagate_error (error, _inner_error_);
		return 0;
	}
	result = val;
	return result;
}


static GeeArrayList* rygel_meta_config_real_get_int_list (RygelConfiguration* base, const gchar* section, const gchar* key, GError** error) {
	RygelMetaConfig * self;
	GeeArrayList* result = NULL;
	GeeArrayList* val;
	GeeArrayList* _tmp16_;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	g_return_val_if_fail (section != NULL, NULL);
	g_return_val_if_fail (key != NULL, NULL);
	val = NULL;
	{
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _config_size;
		gint _config_index;
		_tmp0_ = rygel_meta_config_configs;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_config_list = _tmp1_;
		_tmp2_ = _config_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_config_size = _tmp4_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			RygelConfiguration* config;
			_tmp5_ = _config_index;
			_config_index = _tmp5_ + 1;
			_tmp6_ = _config_index;
			_tmp7_ = _config_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _config_list;
			_tmp9_ = _config_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			config = (RygelConfiguration*) _tmp10_;
			{
				RygelConfiguration* _tmp11_;
				const gchar* _tmp12_;
				const gchar* _tmp13_;
				GeeArrayList* _tmp14_ = NULL;
				GeeArrayList* _tmp15_;
				_tmp11_ = config;
				_tmp12_ = section;
				_tmp13_ = key;
				_tmp14_ = rygel_configuration_get_int_list (_tmp11_, _tmp12_, _tmp13_, &_inner_error_);
				_tmp15_ = _tmp14_;
				if (_inner_error_ != NULL) {
					goto __catch32_g_error;
				}
				_g_object_unref0 (val);
				val = _tmp15_;
				_g_object_unref0 (config);
				break;
			}
			goto __finally32;
			__catch32_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally32:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				_g_object_unref0 (val);
				return NULL;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp16_ = val;
	if (_tmp16_ == NULL) {
		const gchar* _tmp17_ = NULL;
		const gchar* _tmp18_;
		const gchar* _tmp19_;
		GError* _tmp20_;
		_tmp17_ = _ ("No value available for '%s/%s'");
		_tmp18_ = section;
		_tmp19_ = key;
		_tmp20_ = g_error_new (RYGEL_CONFIGURATION_ERROR, RYGEL_CONFIGURATION_ERROR_NO_VALUE_SET, _tmp17_, _tmp18_, _tmp19_);
		_inner_error_ = _tmp20_;
		g_propagate_error (error, _inner_error_);
		_g_object_unref0 (val);
		return NULL;
	}
	result = val;
	return result;
}


static gboolean rygel_meta_config_real_get_bool (RygelConfiguration* base, const gchar* section, const gchar* key, GError** error) {
	RygelMetaConfig * self;
	gboolean result = FALSE;
	gboolean val;
	gboolean unavailable;
	gboolean _tmp16_;
	GError * _inner_error_ = NULL;
	self = (RygelMetaConfig*) base;
	g_return_val_if_fail (section != NULL, FALSE);
	g_return_val_if_fail (key != NULL, FALSE);
	val = FALSE;
	unavailable = TRUE;
	{
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _config_list;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _config_size;
		gint _config_index;
		_tmp0_ = rygel_meta_config_configs;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_config_list = _tmp1_;
		_tmp2_ = _config_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_config_size = _tmp4_;
		_config_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			RygelConfiguration* config;
			_tmp5_ = _config_index;
			_config_index = _tmp5_ + 1;
			_tmp6_ = _config_index;
			_tmp7_ = _config_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _config_list;
			_tmp9_ = _config_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			config = (RygelConfiguration*) _tmp10_;
			{
				RygelConfiguration* _tmp11_;
				const gchar* _tmp12_;
				const gchar* _tmp13_;
				gboolean _tmp14_ = FALSE;
				gboolean _tmp15_;
				_tmp11_ = config;
				_tmp12_ = section;
				_tmp13_ = key;
				_tmp14_ = rygel_configuration_get_bool (_tmp11_, _tmp12_, _tmp13_, &_inner_error_);
				_tmp15_ = _tmp14_;
				if (_inner_error_ != NULL) {
					goto __catch33_g_error;
				}
				val = _tmp15_;
				unavailable = FALSE;
				_g_object_unref0 (config);
				break;
			}
			goto __finally33;
			__catch33_g_error:
			{
				GError* err = NULL;
				err = _inner_error_;
				_inner_error_ = NULL;
				_g_error_free0 (err);
			}
			__finally33:
			if (_inner_error_ != NULL) {
				g_propagate_error (error, _inner_error_);
				_g_object_unref0 (config);
				_g_object_unref0 (_config_list);
				return FALSE;
			}
			_g_object_unref0 (config);
		}
		_g_object_unref0 (_config_list);
	}
	_tmp16_ = unavailable;
	if (_tmp16_) {
		const gchar* _tmp17_ = NULL;
		const gchar* _tmp18_;
		const gchar* _tmp19_;
		GError* _tmp20_;
		_tmp17_ = _ ("No value available for '%s/%s'");
		_tmp18_ = section;
		_tmp19_ = key;
		_tmp20_ = g_error_new (RYGEL_CONFIGURATION_ERROR, RYGEL_CONFIGURATION_ERROR_NO_VALUE_SET, _tmp17_, _tmp18_, _tmp19_);
		_inner_error_ = _tmp20_;
		g_propagate_error (error, _inner_error_);
		return FALSE;
	}
	result = val;
	return result;
}


RygelMetaConfig* rygel_meta_config_construct (GType object_type) {
	RygelMetaConfig * self = NULL;
	self = (RygelMetaConfig*) g_object_new (object_type, NULL);
	return self;
}


RygelMetaConfig* rygel_meta_config_new (void) {
	return rygel_meta_config_construct (RYGEL_TYPE_META_CONFIG);
}


static void rygel_meta_config_class_init (RygelMetaConfigClass * klass) {
	rygel_meta_config_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = rygel_meta_config_finalize;
}


static void rygel_meta_config_rygel_configuration_interface_init (RygelConfigurationIface * iface) {
	rygel_meta_config_rygel_configuration_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_upnp_enabled = (gboolean (*)(RygelConfiguration*, GError**)) rygel_meta_config_real_get_upnp_enabled;
	iface->get_interface = (gchar* (*)(RygelConfiguration*, GError**)) rygel_meta_config_real_get_interface;
	iface->get_port = (gint (*)(RygelConfiguration*, GError**)) rygel_meta_config_real_get_port;
	iface->get_transcoding = (gboolean (*)(RygelConfiguration*, GError**)) rygel_meta_config_real_get_transcoding;
	iface->get_mp3_transcoder = (gboolean (*)(RygelConfiguration*, GError**)) rygel_meta_config_real_get_mp3_transcoder;
	iface->get_mp2ts_transcoder = (gboolean (*)(RygelConfiguration*, GError**)) rygel_meta_config_real_get_mp2ts_transcoder;
	iface->get_lpcm_transcoder = (gboolean (*)(RygelConfiguration*, GError**)) rygel_meta_config_real_get_lpcm_transcoder;
	iface->get_wmv_transcoder = (gboolean (*)(RygelConfiguration*, GError**)) rygel_meta_config_real_get_wmv_transcoder;
	iface->get_aac_transcoder = (gboolean (*)(RygelConfiguration*, GError**)) rygel_meta_config_real_get_aac_transcoder;
	iface->get_avc_transcoder = (gboolean (*)(RygelConfiguration*, GError**)) rygel_meta_config_real_get_avc_transcoder;
	iface->get_allow_upload = (gboolean (*)(RygelConfiguration*, GError**)) rygel_meta_config_real_get_allow_upload;
	iface->get_allow_deletion = (gboolean (*)(RygelConfiguration*, GError**)) rygel_meta_config_real_get_allow_deletion;
	iface->get_log_levels = (gchar* (*)(RygelConfiguration*, GError**)) rygel_meta_config_real_get_log_levels;
	iface->get_plugin_path = (gchar* (*)(RygelConfiguration*, GError**)) rygel_meta_config_real_get_plugin_path;
	iface->get_video_upload_folder = (gchar* (*)(RygelConfiguration*, GError**)) rygel_meta_config_real_get_video_upload_folder;
	iface->get_music_upload_folder = (gchar* (*)(RygelConfiguration*, GError**)) rygel_meta_config_real_get_music_upload_folder;
	iface->get_picture_upload_folder = (gchar* (*)(RygelConfiguration*, GError**)) rygel_meta_config_real_get_picture_upload_folder;
	iface->get_enabled = (gboolean (*)(RygelConfiguration*, const gchar*, GError**)) rygel_meta_config_real_get_enabled;
	iface->get_title = (gchar* (*)(RygelConfiguration*, const gchar*, GError**)) rygel_meta_config_real_get_title;
	iface->get_string = (gchar* (*)(RygelConfiguration*, const gchar*, const gchar*, GError**)) rygel_meta_config_real_get_string;
	iface->get_string_list = (GeeArrayList* (*)(RygelConfiguration*, const gchar*, const gchar*, GError**)) rygel_meta_config_real_get_string_list;
	iface->get_int = (gint (*)(RygelConfiguration*, const gchar*, const gchar*, gint, gint, GError**)) rygel_meta_config_real_get_int;
	iface->get_int_list = (GeeArrayList* (*)(RygelConfiguration*, const gchar*, const gchar*, GError**)) rygel_meta_config_real_get_int_list;
	iface->get_bool = (gboolean (*)(RygelConfiguration*, const gchar*, const gchar*, GError**)) rygel_meta_config_real_get_bool;
}


static void rygel_meta_config_instance_init (RygelMetaConfig * self) {
}


static void rygel_meta_config_finalize (GObject* obj) {
	RygelMetaConfig * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_TYPE_META_CONFIG, RygelMetaConfig);
	G_OBJECT_CLASS (rygel_meta_config_parent_class)->finalize (obj);
}


/**
 * Manages all the configuration sources for Rygel.
 *
 * Abstracts Rygel and it's plugins from Configuration implementations. It keeps
 * all real configuration sources in a list and returns the value provided by
 * the first one. If none of them provides the value, it emits an error.
 */
GType rygel_meta_config_get_type (void) {
	static volatile gsize rygel_meta_config_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_meta_config_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelMetaConfigClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_meta_config_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelMetaConfig), 0, (GInstanceInitFunc) rygel_meta_config_instance_init, NULL };
		static const GInterfaceInfo rygel_configuration_info = { (GInterfaceInitFunc) rygel_meta_config_rygel_configuration_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType rygel_meta_config_type_id;
		rygel_meta_config_type_id = g_type_register_static (G_TYPE_OBJECT, "RygelMetaConfig", &g_define_type_info, 0);
		g_type_add_interface_static (rygel_meta_config_type_id, RYGEL_TYPE_CONFIGURATION, &rygel_configuration_info);
		g_once_init_leave (&rygel_meta_config_type_id__volatile, rygel_meta_config_type_id);
	}
	return rygel_meta_config_type_id__volatile;
}



