/* rygel-regression.c generated by valac 0.24.0.112-bbf5, 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* container;
	RygelSimpleContainer* _tmp0_;
	RygelImageItem* item_1;
	RygelSimpleContainer* _tmp1_;
	RygelImageItem* _tmp2_;
	RygelImageItem* item_2;
	RygelSimpleContainer* _tmp3_;
	RygelImageItem* _tmp4_;
	RygelImageItem* item_3;
	RygelSimpleContainer* _tmp5_;
	RygelImageItem* _tmp6_;
	RygelSimpleContainer* _tmp7_;
	RygelImageItem* _tmp8_;
	RygelSimpleContainer* _tmp9_;
	RygelImageItem* _tmp10_;
	RygelSimpleContainer* _tmp11_;
	RygelImageItem* _tmp12_;
	RygelMediaObjects* list;
	RygelSimpleContainer* _tmp13_;
	RygelMediaObjects* _tmp14_;
	gint i;
	gboolean _tmp15_;
	gint _tmp16_;
	gint _tmp17_;
	RygelMediaObjects* children;
	RygelSimpleContainer* _tmp18_;
	gint _tmp19_;
	RygelMediaObjects* _tmp20_;
	RygelMediaObjects* _tmp21_;
	gpointer _tmp22_;
	RygelMediaObject* _tmp23_;
	const gchar* _tmp24_;
	const gchar* _tmp25_;
	RygelMediaObjects* _tmp26_;
	gint _tmp27_;
	gpointer _tmp28_;
	RygelMediaObject* _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	GError* _error_;
	GMainLoop* _tmp32_;
	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* test = NULL;
	RygelRegression* _tmp0_ = NULL;
	_tmp0_ = rygel_regression_new ();
	test = _tmp0_;
	rygel_regression_run (test);
	result = 0;
	_rygel_regression_unref0 (test);
	return result;
}


int main (int argc, char ** argv) {
#if !GLIB_CHECK_VERSION (2,35,0)
	g_type_init ();
#endif
	return rygel_regression_main (argv, argc);
}


void rygel_regression_run (RygelRegression* self) {
	GMainLoop* _tmp0_ = NULL;
	GMainLoop* _tmp1_ = NULL;
	g_return_if_fail (self != NULL);
	_tmp0_ = g_main_loop_new (NULL, FALSE);
	_g_main_loop_unref0 (self->priv->loop);
	self->priv->loop = _tmp0_;
	rygel_regression_test_661482 (self, NULL, NULL);
	_tmp1_ = self->priv->loop;
	g_main_loop_run (_tmp1_);
}


static void rygel_regression_test_661482_data_free (gpointer _data) {
	RygelRegressionTest661482Data* _data_;
	_data_ = _data;
	_rygel_regression_unref0 (_data_->self);
	g_slice_free (RygelRegressionTest661482Data, _data_);
}


static gpointer _rygel_regression_ref0 (gpointer self) {
	return self ? rygel_regression_ref (self) : NULL;
}


void rygel_regression_test_661482 (RygelRegression* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelRegressionTest661482Data* _data_;
	RygelRegression* _tmp0_ = NULL;
	_data_ = g_slice_new0 (RygelRegressionTest661482Data);
	_data_->_async_result = g_simple_async_result_new (NULL, _callback_, _user_data_, rygel_regression_test_661482);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_regression_test_661482_data_free);
	_tmp0_ = _rygel_regression_ref0 (self);
	_data_->self = _tmp0_;
	rygel_regression_test_661482_co (_data_);
}


void rygel_regression_test_661482_finish (RygelRegression* self, GAsyncResult* _res_) {
	RygelRegressionTest661482Data* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void rygel_regression_test_661482_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	RygelRegressionTest661482Data* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	rygel_regression_test_661482_co (_data_);
}


static gboolean rygel_regression_test_661482_co (RygelRegressionTest661482Data* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = rygel_simple_container_new ("0", NULL, "0");
	_data_->container = _data_->_tmp0_;
	_data_->_tmp1_ = NULL;
	_data_->_tmp1_ = _data_->container;
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = rygel_image_item_new ("Z", (RygelMediaContainer*) _data_->_tmp1_, "Z", RYGEL_IMAGE_ITEM_UPNP_CLASS);
	_data_->item_1 = _data_->_tmp2_;
	_data_->_tmp3_ = NULL;
	_data_->_tmp3_ = _data_->container;
	_data_->_tmp4_ = NULL;
	_data_->_tmp4_ = rygel_image_item_new ("M", (RygelMediaContainer*) _data_->_tmp3_, "M", RYGEL_IMAGE_ITEM_UPNP_CLASS);
	_data_->item_2 = _data_->_tmp4_;
	_data_->_tmp5_ = NULL;
	_data_->_tmp5_ = _data_->container;
	_data_->_tmp6_ = NULL;
	_data_->_tmp6_ = rygel_image_item_new ("A", (RygelMediaContainer*) _data_->_tmp5_, "A", RYGEL_IMAGE_ITEM_UPNP_CLASS);
	_data_->item_3 = _data_->_tmp6_;
	_data_->_tmp7_ = NULL;
	_data_->_tmp7_ = _data_->container;
	_data_->_tmp8_ = NULL;
	_data_->_tmp8_ = _data_->item_1;
	rygel_simple_container_add_child_item (_data_->_tmp7_, (RygelMediaItem*) _data_->_tmp8_);
	_data_->_tmp9_ = NULL;
	_data_->_tmp9_ = _data_->container;
	_data_->_tmp10_ = NULL;
	_data_->_tmp10_ = _data_->item_2;
	rygel_simple_container_add_child_item (_data_->_tmp9_, (RygelMediaItem*) _data_->_tmp10_);
	_data_->_tmp11_ = NULL;
	_data_->_tmp11_ = _data_->container;
	_data_->_tmp12_ = NULL;
	_data_->_tmp12_ = _data_->item_3;
	rygel_simple_container_add_child_item (_data_->_tmp11_, (RygelMediaItem*) _data_->_tmp12_);
	{
		_data_->_tmp13_ = NULL;
		_data_->_tmp13_ = _data_->container;
		_data_->_state_ = 1;
		rygel_media_container_get_children ((RygelMediaContainer*) _data_->_tmp13_, (guint) 0, (guint) 3, "+dc:title", NULL, rygel_regression_test_661482_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp14_ = NULL;
		_data_->_tmp14_ = rygel_media_container_get_children_finish ((RygelMediaContainer*) _data_->_tmp13_, _data_->_res_, &_data_->_inner_error_);
		_data_->list = _data_->_tmp14_;
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
			goto __catch0_g_error;
		}
		{
			_data_->i = 0;
			{
				_data_->_tmp15_ = TRUE;
				while (TRUE) {
					if (!_data_->_tmp15_) {
						_data_->_tmp16_ = 0;
						_data_->_tmp16_ = _data_->i;
						_data_->i = _data_->_tmp16_ + 1;
					}
					_data_->_tmp15_ = FALSE;
					_data_->_tmp17_ = 0;
					_data_->_tmp17_ = _data_->i;
					if (!(_data_->_tmp17_ < 3)) {
						break;
					}
					_data_->_tmp18_ = NULL;
					_data_->_tmp18_ = _data_->container;
					_data_->_tmp19_ = 0;
					_data_->_tmp19_ = _data_->i;
					_data_->_state_ = 2;
					rygel_media_container_get_children ((RygelMediaContainer*) _data_->_tmp18_, (guint) _data_->_tmp19_, (guint) 1, "+dc:title", NULL, rygel_regression_test_661482_ready, _data_);
					return FALSE;
					_state_2:
					_data_->_tmp20_ = NULL;
					_data_->_tmp20_ = rygel_media_container_get_children_finish ((RygelMediaContainer*) _data_->_tmp18_, _data_->_res_, &_data_->_inner_error_);
					_data_->children = _data_->_tmp20_;
					if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
						_g_object_unref0 (_data_->list);
						goto __catch0_g_error;
					}
					_data_->_tmp21_ = NULL;
					_data_->_tmp21_ = _data_->children;
					_data_->_tmp22_ = NULL;
					_data_->_tmp22_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp21_, 0);
					_data_->_tmp23_ = NULL;
					_data_->_tmp23_ = (RygelMediaObject*) _data_->_tmp22_;
					_data_->_tmp24_ = NULL;
					_data_->_tmp24_ = rygel_media_object_get_title (_data_->_tmp23_);
					_data_->_tmp25_ = NULL;
					_data_->_tmp25_ = _data_->_tmp24_;
					_data_->_tmp26_ = NULL;
					_data_->_tmp26_ = _data_->list;
					_data_->_tmp27_ = 0;
					_data_->_tmp27_ = _data_->i;
					_data_->_tmp28_ = NULL;
					_data_->_tmp28_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp26_, _data_->_tmp27_);
					_data_->_tmp29_ = NULL;
					_data_->_tmp29_ = (RygelMediaObject*) _data_->_tmp28_;
					_data_->_tmp30_ = NULL;
					_data_->_tmp30_ = rygel_media_object_get_title (_data_->_tmp29_);
					_data_->_tmp31_ = NULL;
					_data_->_tmp31_ = _data_->_tmp30_;
					_vala_assert (g_strcmp0 (_data_->_tmp25_, _data_->_tmp31_) == 0, "children[0].title == list[i].title");
					_g_object_unref0 (_data_->_tmp29_);
					_g_object_unref0 (_data_->_tmp23_);
					_g_object_unref0 (_data_->children);
				}
			}
		}
		_g_object_unref0 (_data_->list);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->_error_ = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		g_assert_not_reached ();
		_g_error_free0 (_data_->_error_);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
		_g_object_unref0 (_data_->item_3);
		_g_object_unref0 (_data_->item_2);
		_g_object_unref0 (_data_->item_1);
		_g_object_unref0 (_data_->container);
		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);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	_data_->_tmp32_ = NULL;
	_data_->_tmp32_ = _data_->self->priv->loop;
	g_main_loop_quit (_data_->_tmp32_);
	_g_object_unref0 (_data_->item_3);
	_g_object_unref0 (_data_->item_2);
	_g_object_unref0 (_data_->item_1);
	_g_object_unref0 (_data_->container);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


RygelRegression* rygel_regression_construct (GType object_type) {
	RygelRegression* self = NULL;
	self = (RygelRegression*) g_type_create_instance (object_type);
	return self;
}


RygelRegression* rygel_regression_new (void) {
	return rygel_regression_construct (RYGEL_TYPE_REGRESSION);
}


static void rygel_value_regression_init (GValue* value) {
	value->data[0].v_pointer = NULL;
}


static void rygel_value_regression_free_value (GValue* value) {
	if (value->data[0].v_pointer) {
		rygel_regression_unref (value->data[0].v_pointer);
	}
}


static void rygel_value_regression_copy_value (const GValue* src_value, GValue* dest_value) {
	if (src_value->data[0].v_pointer) {
		dest_value->data[0].v_pointer = rygel_regression_ref (src_value->data[0].v_pointer);
	} else {
		dest_value->data[0].v_pointer = NULL;
	}
}


static gpointer rygel_value_regression_peek_pointer (const GValue* value) {
	return value->data[0].v_pointer;
}


static gchar* rygel_value_regression_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	if (collect_values[0].v_pointer) {
		RygelRegression* object;
		object = collect_values[0].v_pointer;
		if (object->parent_instance.g_class == NULL) {
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
		}
		value->data[0].v_pointer = rygel_regression_ref (object);
	} else {
		value->data[0].v_pointer = NULL;
	}
	return NULL;
}


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;
	if (!object_p) {
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
	}
	if (!value->data[0].v_pointer) {
		*object_p = NULL;
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
		*object_p = value->data[0].v_pointer;
	} else {
		*object_p = rygel_regression_ref (value->data[0].v_pointer);
	}
	return NULL;
}


GParamSpec* rygel_param_spec_regression (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	RygelParamSpecRegression* spec;
	g_return_val_if_fail (g_type_is_a (object_type, RYGEL_TYPE_REGRESSION), NULL);
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
	G_PARAM_SPEC (spec)->value_type = object_type;
	return G_PARAM_SPEC (spec);
}


gpointer rygel_value_get_regression (const GValue* value) {
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, RYGEL_TYPE_REGRESSION), NULL);
	return value->data[0].v_pointer;
}


void rygel_value_set_regression (GValue* value, gpointer v_object) {
	RygelRegression* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, RYGEL_TYPE_REGRESSION));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, RYGEL_TYPE_REGRESSION));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
		rygel_regression_ref (value->data[0].v_pointer);
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		rygel_regression_unref (old);
	}
}


void rygel_value_take_regression (GValue* value, gpointer v_object) {
	RygelRegression* old;
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, RYGEL_TYPE_REGRESSION));
	old = value->data[0].v_pointer;
	if (v_object) {
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, RYGEL_TYPE_REGRESSION));
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
		value->data[0].v_pointer = v_object;
	} else {
		value->data[0].v_pointer = NULL;
	}
	if (old) {
		rygel_regression_unref (old);
	}
}


static void rygel_regression_class_init (RygelRegressionClass * klass) {
	rygel_regression_parent_class = g_type_class_peek_parent (klass);
	RYGEL_REGRESSION_CLASS (klass)->finalize = rygel_regression_finalize;
	g_type_class_add_private (klass, sizeof (RygelRegressionPrivate));
}


static void rygel_regression_instance_init (RygelRegression * self) {
	self->priv = RYGEL_REGRESSION_GET_PRIVATE (self);
	self->ref_count = 1;
}


static void rygel_regression_finalize (RygelRegression* obj) {
	RygelRegression * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_TYPE_REGRESSION, RygelRegression);
	_g_main_loop_unref0 (self->priv->loop);
}


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;
	g_atomic_int_inc (&self->ref_count);
	return instance;
}


void rygel_regression_unref (gpointer instance) {
	RygelRegression* self;
	self = instance;
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
		RYGEL_REGRESSION_GET_CLASS (self)->finalize (self);
		g_type_free_instance ((GTypeInstance *) self);
	}
}



