/* rygel-regression.c generated by valac 0.17.4.16-52707, the Vala compiler
 * generated from rygel-regression.vala, do not modify */

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

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


#define RYGEL_TYPE_REGRESSION (rygel_regression_get_type ())
#define RYGEL_REGRESSION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_TYPE_REGRESSION, RygelRegression))
#define RYGEL_REGRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_TYPE_REGRESSION, RygelRegressionClass))
#define RYGEL_IS_REGRESSION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_TYPE_REGRESSION))
#define RYGEL_IS_REGRESSION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_TYPE_REGRESSION))
#define RYGEL_REGRESSION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_TYPE_REGRESSION, RygelRegressionClass))

typedef struct _RygelRegression RygelRegression;
typedef struct _RygelRegressionClass RygelRegressionClass;
typedef struct _RygelRegressionPrivate RygelRegressionPrivate;
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
#define _rygel_regression_unref0(var) ((var == NULL) ? NULL : (var = (rygel_regression_unref (var), NULL)))
#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 _RygelRegressionTest661482Data RygelRegressionTest661482Data;
typedef struct _RygelParamSpecRegression RygelParamSpecRegression;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _RygelRegression {
	GTypeInstance parent_instance;
	volatile int ref_count;
	RygelRegressionPrivate * priv;
};

struct _RygelRegressionClass {
	GTypeClass parent_class;
	void (*finalize) (RygelRegression *self);
};

struct _RygelRegressionPrivate {
	GMainLoop* loop;
};

struct _RygelRegressionTest661482Data {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelRegression* self;
	RygelSimpleContainer* _tmp0_;
	RygelSimpleContainer* container;
	RygelSimpleContainer* _tmp1_;
	RygelImageItem* _tmp2_;
	RygelImageItem* item_1;
	RygelSimpleContainer* _tmp3_;
	RygelImageItem* _tmp4_;
	RygelImageItem* item_2;
	RygelSimpleContainer* _tmp5_;
	RygelImageItem* _tmp6_;
	RygelImageItem* item_3;
	RygelSimpleContainer* _tmp7_;
	RygelImageItem* _tmp8_;
	RygelSimpleContainer* _tmp9_;
	RygelImageItem* _tmp10_;
	RygelSimpleContainer* _tmp11_;
	RygelImageItem* _tmp12_;
	RygelSimpleContainer* _tmp13_;
	RygelMediaObjects* _tmp14_;
	RygelMediaObjects* list;
	gint i;
	gboolean _tmp15_;
	gboolean _tmp16_;
	gint _tmp17_;
	gint _tmp18_;
	RygelSimpleContainer* _tmp19_;
	gint _tmp20_;
	RygelMediaObjects* _tmp21_;
	RygelMediaObjects* children;
	RygelMediaObjects* _tmp22_;
	gpointer _tmp23_;
	RygelMediaObject* _tmp24_;
	const gchar* _tmp25_;
	const gchar* _tmp26_;
	RygelMediaObjects* _tmp27_;
	gint _tmp28_;
	gpointer _tmp29_;
	RygelMediaObject* _tmp30_;
	const gchar* _tmp31_;
	const gchar* _tmp32_;
	GError* _error_;
	GMainLoop* _tmp33_;
	GError * _inner_error_;
};

struct _RygelParamSpecRegression {
	GParamSpec parent_instance;
};


static gpointer rygel_regression_parent_class = NULL;

gpointer rygel_regression_ref (gpointer instance);
void rygel_regression_unref (gpointer instance);
GParamSpec* rygel_param_spec_regression (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void rygel_value_set_regression (GValue* value, gpointer v_object);
void rygel_value_take_regression (GValue* value, gpointer v_object);
gpointer rygel_value_get_regression (const GValue* value);
GType rygel_regression_get_type (void) G_GNUC_CONST;
#define RYGEL_REGRESSION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RYGEL_TYPE_REGRESSION, RygelRegressionPrivate))
enum  {
	RYGEL_REGRESSION_DUMMY_PROPERTY
};
gint rygel_regression_main (gchar** args, int args_length1);
RygelRegression* rygel_regression_new (void);
RygelRegression* rygel_regression_construct (GType object_type);
void rygel_regression_run (RygelRegression* self);
void rygel_regression_test_661482 (RygelRegression* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
void rygel_regression_test_661482_finish (RygelRegression* self, GAsyncResult* _res_);
static void rygel_regression_test_661482_data_free (gpointer _data);
static gboolean rygel_regression_test_661482_co (RygelRegressionTest661482Data* _data_);
static void rygel_regression_test_661482_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void rygel_regression_finalize (RygelRegression* obj);


gint rygel_regression_main (gchar** args, int args_length1) {
	gint result = 0;
	RygelRegression* _tmp0_;
	RygelRegression* test;
#line 27 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_tmp0_ = rygel_regression_new ();
#line 27 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	test = _tmp0_;
#line 29 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	rygel_regression_run (test);
#line 31 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	result = 0;
#line 31 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_rygel_regression_unref0 (test);
#line 31 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	return result;
#line 167 "rygel-regression.c"
}


int main (int argc, char ** argv) {
#line 26 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	g_thread_init (NULL);
#line 26 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	g_type_init ();
#line 26 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	return rygel_regression_main (argv, argc);
#line 178 "rygel-regression.c"
}


void rygel_regression_run (RygelRegression* self) {
	GMainLoop* _tmp0_;
	GMainLoop* _tmp1_;
#line 34 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	g_return_if_fail (self != NULL);
#line 35 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_tmp0_ = g_main_loop_new (NULL, FALSE);
#line 35 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_g_main_loop_unref0 (self->priv->loop);
#line 35 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	self->priv->loop = _tmp0_;
#line 36 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	rygel_regression_test_661482 (self, NULL, NULL);
#line 37 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_tmp1_ = self->priv->loop;
#line 37 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	g_main_loop_run (_tmp1_);
#line 199 "rygel-regression.c"
}


static void rygel_regression_test_661482_data_free (gpointer _data) {
	RygelRegressionTest661482Data* _data_;
	_data_ = _data;
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_rygel_regression_unref0 (_data_->self);
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	g_slice_free (RygelRegressionTest661482Data, _data_);
#line 210 "rygel-regression.c"
}


static gpointer _rygel_regression_ref0 (gpointer self) {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	return self ? rygel_regression_ref (self) : NULL;
#line 217 "rygel-regression.c"
}


void rygel_regression_test_661482 (RygelRegression* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelRegressionTest661482Data* _data_;
	RygelRegression* _tmp0_;
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_ = g_slice_new0 (RygelRegressionTest661482Data);
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_->_async_result = g_simple_async_result_new (NULL, _callback_, _user_data_, rygel_regression_test_661482);
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_regression_test_661482_data_free);
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_tmp0_ = _rygel_regression_ref0 (self);
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_->self = _tmp0_;
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	rygel_regression_test_661482_co (_data_);
#line 236 "rygel-regression.c"
}


void rygel_regression_test_661482_finish (RygelRegression* self, GAsyncResult* _res_) {
	RygelRegressionTest661482Data* _data_;
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 244 "rygel-regression.c"
}


static void rygel_regression_test_661482_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	RygelRegressionTest661482Data* _data_;
#line 51 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_ = _user_data_;
#line 51 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_->_source_object_ = source_object;
#line 51 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_->_res_ = _res_;
#line 51 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	rygel_regression_test_661482_co (_data_);
#line 258 "rygel-regression.c"
}


static gboolean rygel_regression_test_661482_co (RygelRegressionTest661482Data* _data_) {
#line 40 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	switch (_data_->_state_) {
#line 40 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		case 0:
#line 267 "rygel-regression.c"
		goto _state_0;
#line 40 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		case 1:
#line 271 "rygel-regression.c"
		goto _state_1;
#line 40 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		case 2:
#line 275 "rygel-regression.c"
		goto _state_2;
		default:
#line 40 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		g_assert_not_reached ();
#line 280 "rygel-regression.c"
	}
	_state_0:
#line 41 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_->_tmp0_ = rygel_simple_container_new ("0", NULL, "0");
#line 41 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_->container = _data_->_tmp0_;
#line 42 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_->_tmp1_ = _data_->container;
#line 42 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_->_tmp2_ = rygel_image_item_new ("Z", (RygelMediaContainer*) _data_->_tmp1_, "Z", RYGEL_IMAGE_ITEM_UPNP_CLASS);
#line 42 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_->item_1 = _data_->_tmp2_;
#line 43 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_->_tmp3_ = _data_->container;
#line 43 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_->_tmp4_ = rygel_image_item_new ("M", (RygelMediaContainer*) _data_->_tmp3_, "M", RYGEL_IMAGE_ITEM_UPNP_CLASS);
#line 43 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_->item_2 = _data_->_tmp4_;
#line 44 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_->_tmp5_ = _data_->container;
#line 44 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_->_tmp6_ = rygel_image_item_new ("A", (RygelMediaContainer*) _data_->_tmp5_, "A", RYGEL_IMAGE_ITEM_UPNP_CLASS);
#line 44 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_->item_3 = _data_->_tmp6_;
#line 46 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_->_tmp7_ = _data_->container;
#line 46 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_->_tmp8_ = _data_->item_1;
#line 46 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	rygel_simple_container_add_child_item (_data_->_tmp7_, (RygelMediaItem*) _data_->_tmp8_);
#line 47 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_->_tmp9_ = _data_->container;
#line 47 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_->_tmp10_ = _data_->item_2;
#line 47 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	rygel_simple_container_add_child_item (_data_->_tmp9_, (RygelMediaItem*) _data_->_tmp10_);
#line 48 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_->_tmp11_ = _data_->container;
#line 48 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_->_tmp12_ = _data_->item_3;
#line 48 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	rygel_simple_container_add_child_item (_data_->_tmp11_, (RygelMediaItem*) _data_->_tmp12_);
#line 323 "rygel-regression.c"
	{
#line 51 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		_data_->_tmp13_ = _data_->container;
#line 51 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		_data_->_state_ = 1;
#line 51 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		rygel_media_container_get_children ((RygelMediaContainer*) _data_->_tmp13_, (guint) 0, (guint) 3, "+dc:title", NULL, rygel_regression_test_661482_ready, _data_);
#line 51 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		return FALSE;
#line 333 "rygel-regression.c"
		_state_1:
#line 51 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		_data_->_tmp14_ = NULL;
#line 51 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		_data_->_tmp14_ = rygel_media_container_get_children_finish ((RygelMediaContainer*) _data_->_tmp13_, _data_->_res_, &_data_->_inner_error_);
#line 51 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		_data_->list = _data_->_tmp14_;
#line 51 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		if (_data_->_inner_error_ != NULL) {
#line 343 "rygel-regression.c"
			goto __catch0_g_error;
		}
		{
#line 52 "/home/jens/Source/rygel/tests/rygel-regression.vala"
			_data_->i = 0;
#line 349 "rygel-regression.c"
			{
#line 52 "/home/jens/Source/rygel/tests/rygel-regression.vala"
				_data_->_tmp15_ = TRUE;
#line 52 "/home/jens/Source/rygel/tests/rygel-regression.vala"
				while (TRUE) {
#line 52 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_data_->_tmp16_ = _data_->_tmp15_;
#line 52 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					if (!_data_->_tmp16_) {
#line 52 "/home/jens/Source/rygel/tests/rygel-regression.vala"
						_data_->_tmp17_ = _data_->i;
#line 52 "/home/jens/Source/rygel/tests/rygel-regression.vala"
						_data_->i = _data_->_tmp17_ + 1;
#line 363 "rygel-regression.c"
					}
#line 52 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_data_->_tmp15_ = FALSE;
#line 52 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_data_->_tmp18_ = _data_->i;
#line 52 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					if (!(_data_->_tmp18_ < 3)) {
#line 52 "/home/jens/Source/rygel/tests/rygel-regression.vala"
						break;
#line 373 "rygel-regression.c"
					}
#line 53 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_data_->_tmp19_ = _data_->container;
#line 53 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_data_->_tmp20_ = _data_->i;
#line 53 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_data_->_state_ = 2;
#line 53 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					rygel_media_container_get_children ((RygelMediaContainer*) _data_->_tmp19_, (guint) _data_->_tmp20_, (guint) 1, "+dc:title", NULL, rygel_regression_test_661482_ready, _data_);
#line 53 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					return FALSE;
#line 385 "rygel-regression.c"
					_state_2:
#line 53 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_data_->_tmp21_ = NULL;
#line 53 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_data_->_tmp21_ = rygel_media_container_get_children_finish ((RygelMediaContainer*) _data_->_tmp19_, _data_->_res_, &_data_->_inner_error_);
#line 53 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_data_->children = _data_->_tmp21_;
#line 53 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					if (_data_->_inner_error_ != NULL) {
#line 53 "/home/jens/Source/rygel/tests/rygel-regression.vala"
						_g_object_unref0 (_data_->list);
#line 397 "rygel-regression.c"
						goto __catch0_g_error;
					}
#line 57 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_data_->_tmp22_ = _data_->children;
#line 57 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_data_->_tmp23_ = NULL;
#line 57 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_data_->_tmp23_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp22_, 0);
#line 57 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_data_->_tmp24_ = (RygelMediaObject*) _data_->_tmp23_;
#line 57 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_data_->_tmp25_ = rygel_media_object_get_title (_data_->_tmp24_);
#line 57 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_data_->_tmp26_ = _data_->_tmp25_;
#line 57 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_data_->_tmp27_ = _data_->list;
#line 57 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_data_->_tmp28_ = _data_->i;
#line 57 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_data_->_tmp29_ = NULL;
#line 57 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_data_->_tmp29_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp27_, _data_->_tmp28_);
#line 57 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_data_->_tmp30_ = (RygelMediaObject*) _data_->_tmp29_;
#line 57 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_data_->_tmp31_ = rygel_media_object_get_title (_data_->_tmp30_);
#line 57 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_data_->_tmp32_ = _data_->_tmp31_;
#line 57 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_vala_assert (g_strcmp0 (_data_->_tmp26_, _data_->_tmp32_) == 0, "children[0].title == list[i].title");
#line 57 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_g_object_unref0 (_data_->_tmp30_);
#line 57 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_g_object_unref0 (_data_->_tmp24_);
#line 52 "/home/jens/Source/rygel/tests/rygel-regression.vala"
					_g_object_unref0 (_data_->children);
#line 434 "rygel-regression.c"
				}
			}
		}
#line 50 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		_g_object_unref0 (_data_->list);
#line 440 "rygel-regression.c"
	}
	goto __finally0;
	__catch0_g_error:
	{
#line 50 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		_data_->_error_ = _data_->_inner_error_;
#line 50 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		_data_->_inner_error_ = NULL;
#line 60 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		g_assert_not_reached ();
#line 50 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		_g_error_free0 (_data_->_error_);
#line 453 "rygel-regression.c"
	}
	__finally0:
#line 50 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	if (_data_->_inner_error_ != NULL) {
#line 50 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		_g_object_unref0 (_data_->item_3);
#line 50 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		_g_object_unref0 (_data_->item_2);
#line 50 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		_g_object_unref0 (_data_->item_1);
#line 50 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		_g_object_unref0 (_data_->container);
#line 50 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 50 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		g_clear_error (&_data_->_inner_error_);
#line 50 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		return FALSE;
#line 472 "rygel-regression.c"
	}
#line 62 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_data_->_tmp33_ = _data_->self->priv->loop;
#line 62 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	g_main_loop_quit (_data_->_tmp33_);
#line 40 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_g_object_unref0 (_data_->item_3);
#line 40 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_g_object_unref0 (_data_->item_2);
#line 40 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_g_object_unref0 (_data_->item_1);
#line 40 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_g_object_unref0 (_data_->container);
#line 40 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	if (_data_->_state_ == 0) {
#line 40 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 490 "rygel-regression.c"
	} else {
#line 40 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 494 "rygel-regression.c"
	}
#line 40 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	g_object_unref (_data_->_async_result);
#line 40 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	return FALSE;
#line 500 "rygel-regression.c"
}


RygelRegression* rygel_regression_construct (GType object_type) {
	RygelRegression* self = NULL;
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	self = (RygelRegression*) g_type_create_instance (object_type);
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	return self;
#line 510 "rygel-regression.c"
}


RygelRegression* rygel_regression_new (void) {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	return rygel_regression_construct (RYGEL_TYPE_REGRESSION);
#line 517 "rygel-regression.c"
}


static void rygel_value_regression_init (GValue* value) {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	value->data[0].v_pointer = NULL;
#line 524 "rygel-regression.c"
}


static void rygel_value_regression_free_value (GValue* value) {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	if (value->data[0].v_pointer) {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		rygel_regression_unref (value->data[0].v_pointer);
#line 533 "rygel-regression.c"
	}
}


static void rygel_value_regression_copy_value (const GValue* src_value, GValue* dest_value) {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	if (src_value->data[0].v_pointer) {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		dest_value->data[0].v_pointer = rygel_regression_ref (src_value->data[0].v_pointer);
#line 543 "rygel-regression.c"
	} else {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		dest_value->data[0].v_pointer = NULL;
#line 547 "rygel-regression.c"
	}
}


static gpointer rygel_value_regression_peek_pointer (const GValue* value) {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	return value->data[0].v_pointer;
#line 555 "rygel-regression.c"
}


static gchar* rygel_value_regression_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	if (collect_values[0].v_pointer) {
#line 562 "rygel-regression.c"
		RygelRegression* object;
		object = collect_values[0].v_pointer;
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		if (object->parent_instance.g_class == NULL) {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 569 "rygel-regression.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 573 "rygel-regression.c"
		}
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		value->data[0].v_pointer = rygel_regression_ref (object);
#line 577 "rygel-regression.c"
	} else {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		value->data[0].v_pointer = NULL;
#line 581 "rygel-regression.c"
	}
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	return NULL;
#line 585 "rygel-regression.c"
}


static gchar* rygel_value_regression_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	RygelRegression** object_p;
	object_p = collect_values[0].v_pointer;
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	if (!object_p) {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 596 "rygel-regression.c"
	}
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	if (!value->data[0].v_pointer) {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		*object_p = NULL;
#line 602 "rygel-regression.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		*object_p = value->data[0].v_pointer;
#line 606 "rygel-regression.c"
	} else {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		*object_p = rygel_regression_ref (value->data[0].v_pointer);
#line 610 "rygel-regression.c"
	}
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	return NULL;
#line 614 "rygel-regression.c"
}


GParamSpec* rygel_param_spec_regression (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	RygelParamSpecRegression* spec;
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	g_return_val_if_fail (g_type_is_a (object_type, RYGEL_TYPE_REGRESSION), NULL);
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	return G_PARAM_SPEC (spec);
#line 628 "rygel-regression.c"
}


gpointer rygel_value_get_regression (const GValue* value) {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, RYGEL_TYPE_REGRESSION), NULL);
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	return value->data[0].v_pointer;
#line 637 "rygel-regression.c"
}


void rygel_value_set_regression (GValue* value, gpointer v_object) {
	RygelRegression* old;
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, RYGEL_TYPE_REGRESSION));
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	old = value->data[0].v_pointer;
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	if (v_object) {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, RYGEL_TYPE_REGRESSION));
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		value->data[0].v_pointer = v_object;
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		rygel_regression_ref (value->data[0].v_pointer);
#line 657 "rygel-regression.c"
	} else {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		value->data[0].v_pointer = NULL;
#line 661 "rygel-regression.c"
	}
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	if (old) {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		rygel_regression_unref (old);
#line 667 "rygel-regression.c"
	}
}


void rygel_value_take_regression (GValue* value, gpointer v_object) {
	RygelRegression* old;
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, RYGEL_TYPE_REGRESSION));
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	old = value->data[0].v_pointer;
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	if (v_object) {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, RYGEL_TYPE_REGRESSION));
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		value->data[0].v_pointer = v_object;
#line 686 "rygel-regression.c"
	} else {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		value->data[0].v_pointer = NULL;
#line 690 "rygel-regression.c"
	}
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	if (old) {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		rygel_regression_unref (old);
#line 696 "rygel-regression.c"
	}
}


static void rygel_regression_class_init (RygelRegressionClass * klass) {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	rygel_regression_parent_class = g_type_class_peek_parent (klass);
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	RYGEL_REGRESSION_CLASS (klass)->finalize = rygel_regression_finalize;
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	g_type_class_add_private (klass, sizeof (RygelRegressionPrivate));
#line 708 "rygel-regression.c"
}


static void rygel_regression_instance_init (RygelRegression * self) {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	self->priv = RYGEL_REGRESSION_GET_PRIVATE (self);
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	self->ref_count = 1;
#line 717 "rygel-regression.c"
}


static void rygel_regression_finalize (RygelRegression* obj) {
	RygelRegression * self;
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_TYPE_REGRESSION, RygelRegression);
#line 24 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	_g_main_loop_unref0 (self->priv->loop);
#line 727 "rygel-regression.c"
}


GType rygel_regression_get_type (void) {
	static volatile gsize rygel_regression_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_regression_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { rygel_value_regression_init, rygel_value_regression_free_value, rygel_value_regression_copy_value, rygel_value_regression_peek_pointer, "p", rygel_value_regression_collect_value, "p", rygel_value_regression_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (RygelRegressionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_regression_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelRegression), 0, (GInstanceInitFunc) rygel_regression_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType rygel_regression_type_id;
		rygel_regression_type_id = g_type_register_fundamental (g_type_fundamental_next (), "RygelRegression", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&rygel_regression_type_id__volatile, rygel_regression_type_id);
	}
	return rygel_regression_type_id__volatile;
}


gpointer rygel_regression_ref (gpointer instance) {
	RygelRegression* self;
	self = instance;
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	g_atomic_int_inc (&self->ref_count);
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	return instance;
#line 752 "rygel-regression.c"
}


void rygel_regression_unref (gpointer instance) {
	RygelRegression* self;
	self = instance;
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		RYGEL_REGRESSION_GET_CLASS (self)->finalize (self);
#line 23 "/home/jens/Source/rygel/tests/rygel-regression.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 765 "rygel-regression.c"
	}
}



