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

/*
 * Copyright (C) 2009 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>.
 * Copyright (C) 2009 Nokia Corporation.
 *
 * Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
 *                               <zeeshan.ali@nokia.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 <gio/gio.h>
#include <rygel-core.h>
#include <gobject/gvaluecollector.h>


#define RYGEL_EXTERNAL_TYPE_ICON_FACTORY (rygel_external_icon_factory_get_type ())
#define RYGEL_EXTERNAL_ICON_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_EXTERNAL_TYPE_ICON_FACTORY, RygelExternalIconFactory))
#define RYGEL_EXTERNAL_ICON_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_EXTERNAL_TYPE_ICON_FACTORY, RygelExternalIconFactoryClass))
#define RYGEL_EXTERNAL_IS_ICON_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_EXTERNAL_TYPE_ICON_FACTORY))
#define RYGEL_EXTERNAL_IS_ICON_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_EXTERNAL_TYPE_ICON_FACTORY))
#define RYGEL_EXTERNAL_ICON_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_EXTERNAL_TYPE_ICON_FACTORY, RygelExternalIconFactoryClass))

typedef struct _RygelExternalIconFactory RygelExternalIconFactory;
typedef struct _RygelExternalIconFactoryClass RygelExternalIconFactoryClass;
typedef struct _RygelExternalIconFactoryPrivate RygelExternalIconFactoryPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
#define _rygel_icon_info_unref0(var) ((var == NULL) ? NULL : (var = (rygel_icon_info_unref (var), NULL)))
#define _rygel_external_icon_factory_unref0(var) ((var == NULL) ? NULL : (var = (rygel_external_icon_factory_unref (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _RygelExternalIconFactoryCreateData RygelExternalIconFactoryCreateData;
typedef struct _RygelExternalParamSpecIconFactory RygelExternalParamSpecIconFactory;

struct _RygelExternalIconFactory {
	GTypeInstance parent_instance;
	volatile int ref_count;
	RygelExternalIconFactoryPrivate * priv;
};

struct _RygelExternalIconFactoryClass {
	GTypeClass parent_class;
	void (*finalize) (RygelExternalIconFactory *self);
};

struct _RygelExternalIconFactoryCreateData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelExternalIconFactory* self;
	gchar* service_name;
	GHashTable* container_props;
	RygelIconInfo* result;
	GHashTable* _tmp0_;
	gconstpointer _tmp1_;
	GVariant* _tmp2_;
	GVariant* value;
	GVariant* _tmp3_;
	GVariant* _tmp4_;
	gchar* _tmp5_;
	gchar* icon_path;
	const gchar* _tmp6_;
	const gchar* _tmp7_;
	FreeDesktopProperties* _tmp8_;
	FreeDesktopProperties* props;
	FreeDesktopProperties* _tmp9_;
	const gchar* _tmp10_;
	GHashTable* _tmp11_;
	GHashTable* item_props;
	GHashTable* _tmp12_;
	RygelIconInfo* _tmp13_;
	GError * _inner_error_;
};

struct _RygelExternalParamSpecIconFactory {
	GParamSpec parent_instance;
};


static gpointer rygel_external_icon_factory_parent_class = NULL;
static gchar* rygel_external_icon_factory_ITEM_IFACE;
static gchar* rygel_external_icon_factory_ITEM_IFACE = NULL;

gpointer rygel_external_icon_factory_ref (gpointer instance);
void rygel_external_icon_factory_unref (gpointer instance);
GParamSpec* rygel_external_param_spec_icon_factory (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void rygel_external_value_set_icon_factory (GValue* value, gpointer v_object);
void rygel_external_value_take_icon_factory (GValue* value, gpointer v_object);
gpointer rygel_external_value_get_icon_factory (const GValue* value);
GType rygel_external_icon_factory_get_type (void) G_GNUC_CONST;
enum  {
	RYGEL_EXTERNAL_ICON_FACTORY_DUMMY_PROPERTY
};
static void rygel_external_icon_factory_create_data_free (gpointer _data);
void rygel_external_icon_factory_create (RygelExternalIconFactory* self, const gchar* service_name, GHashTable* container_props, GAsyncReadyCallback _callback_, gpointer _user_data_);
RygelIconInfo* rygel_external_icon_factory_create_finish (RygelExternalIconFactory* self, GAsyncResult* _res_, GError** error);
static gboolean rygel_external_icon_factory_create_co (RygelExternalIconFactoryCreateData* _data_);
static gchar* _variant_get28 (GVariant* value);
static void rygel_external_icon_factory_create_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static RygelIconInfo* rygel_external_icon_factory_create_from_props (RygelExternalIconFactory* self, GHashTable* props);
static gchar* _variant_get29 (GVariant* value);
static gchar* rygel_external_icon_factory_get_ext_for_mime (RygelExternalIconFactory* self, const gchar* mime_type);
static gchar** _variant_get30 (GVariant* value, int* result_length1);
static gint64 _variant_get31 (GVariant* value);
static gint rygel_external_icon_factory_get_int (RygelExternalIconFactory* self, GHashTable* props, const gchar* prop);
static gint _variant_get32 (GVariant* value);
RygelExternalIconFactory* rygel_external_icon_factory_new (void);
RygelExternalIconFactory* rygel_external_icon_factory_construct (GType object_type);
static void rygel_external_icon_factory_finalize (RygelExternalIconFactory* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


static void rygel_external_icon_factory_create_data_free (gpointer _data) {
	RygelExternalIconFactoryCreateData* _data_;
	_data_ = _data;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_g_free0 (_data_->service_name);
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_g_hash_table_unref0 (_data_->container_props);
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_rygel_icon_info_unref0 (_data_->result);
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_rygel_external_icon_factory_unref0 (_data_->self);
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	g_slice_free (RygelExternalIconFactoryCreateData, _data_);
#line 150 "rygel-external-icon-factory.c"
}


static gpointer _rygel_external_icon_factory_ref0 (gpointer self) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	return self ? rygel_external_icon_factory_ref (self) : NULL;
#line 157 "rygel-external-icon-factory.c"
}


static gpointer _g_hash_table_ref0 (gpointer self) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	return self ? g_hash_table_ref (self) : NULL;
#line 164 "rygel-external-icon-factory.c"
}


void rygel_external_icon_factory_create (RygelExternalIconFactory* self, const gchar* service_name, GHashTable* container_props, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelExternalIconFactoryCreateData* _data_;
	RygelExternalIconFactory* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	GHashTable* _tmp3_;
	GHashTable* _tmp4_;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_ = g_slice_new0 (RygelExternalIconFactoryCreateData);
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_async_result = g_simple_async_result_new (NULL, _callback_, _user_data_, rygel_external_icon_factory_create);
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_external_icon_factory_create_data_free);
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp0_ = _rygel_external_icon_factory_ref0 (self);
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->self = _tmp0_;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp1_ = service_name;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->service_name = _tmp2_;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp3_ = container_props;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp4_ = _g_hash_table_ref0 (_tmp3_);
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->container_props = _tmp4_;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	rygel_external_icon_factory_create_co (_data_);
#line 199 "rygel-external-icon-factory.c"
}


RygelIconInfo* rygel_external_icon_factory_create_finish (RygelExternalIconFactory* self, GAsyncResult* _res_, GError** error) {
	RygelIconInfo* result;
	RygelExternalIconFactoryCreateData* _data_;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		return NULL;
#line 210 "rygel-external-icon-factory.c"
	}
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	result = _data_->result;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->result = NULL;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	return result;
#line 220 "rygel-external-icon-factory.c"
}


static gpointer _g_variant_ref0 (gpointer self) {
#line 33 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	return self ? g_variant_ref (self) : NULL;
#line 227 "rygel-external-icon-factory.c"
}


static gchar* _variant_get28 (GVariant* value) {
#line 39 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	return g_variant_dup_string (value, NULL);
#line 234 "rygel-external-icon-factory.c"
}


static void rygel_external_icon_factory_create_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	RygelExternalIconFactoryCreateData* _data_;
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_ = _user_data_;
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_source_object_ = source_object;
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_res_ = _res_;
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	rygel_external_icon_factory_create_co (_data_);
#line 248 "rygel-external-icon-factory.c"
}


static gboolean rygel_external_icon_factory_create_co (RygelExternalIconFactoryCreateData* _data_) {
#line 30 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	switch (_data_->_state_) {
#line 30 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		case 0:
#line 257 "rygel-external-icon-factory.c"
		goto _state_0;
#line 30 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		case 1:
#line 261 "rygel-external-icon-factory.c"
		goto _state_1;
#line 30 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		case 2:
#line 265 "rygel-external-icon-factory.c"
		goto _state_2;
		default:
#line 30 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		g_assert_not_reached ();
#line 270 "rygel-external-icon-factory.c"
	}
	_state_0:
#line 33 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_tmp0_ = _data_->container_props;
#line 33 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_tmp1_ = NULL;
#line 33 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_tmp1_ = g_hash_table_lookup (_data_->_tmp0_, "Icon");
#line 33 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_tmp2_ = _g_variant_ref0 ((GVariant*) _data_->_tmp1_);
#line 33 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->value = _data_->_tmp2_;
#line 34 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_tmp3_ = _data_->value;
#line 34 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	if (_data_->_tmp3_ == NULL) {
#line 36 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_data_->result = NULL;
#line 36 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_g_variant_unref0 (_data_->value);
#line 36 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		if (_data_->_state_ == 0) {
#line 36 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 295 "rygel-external-icon-factory.c"
		} else {
#line 36 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 299 "rygel-external-icon-factory.c"
		}
#line 36 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		g_object_unref (_data_->_async_result);
#line 36 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		return FALSE;
#line 305 "rygel-external-icon-factory.c"
	}
#line 39 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_tmp4_ = _data_->value;
#line 39 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_tmp5_ = _variant_get28 (_data_->_tmp4_);
#line 39 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->icon_path = _data_->_tmp5_;
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_tmp6_ = _data_->service_name;
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_tmp7_ = _data_->icon_path;
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_state_ = 1;
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	g_async_initable_new_async (FREE_DESKTOP_TYPE_PROPERTIES_PROXY, 0, NULL, rygel_external_icon_factory_create_ready, _data_, "g-flags", G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, "g-name", _data_->_tmp6_, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", _data_->_tmp7_, "g-interface-name", "org.freedesktop.DBus.Properties", NULL);
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	return FALSE;
#line 323 "rygel-external-icon-factory.c"
	_state_1:
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_tmp8_ = NULL;
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_tmp8_ = g_async_initable_new_finish (_data_->_source_object_, _data_->_res_, &_data_->_inner_error_);
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->props = (FreeDesktopProperties*) _data_->_tmp8_;
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	if (_data_->_inner_error_ != NULL) {
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		if ((_data_->_inner_error_->domain == G_IO_ERROR) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) {
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			g_error_free (_data_->_inner_error_);
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			_g_free0 (_data_->icon_path);
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			_g_variant_unref0 (_data_->value);
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			if (_data_->_state_ == 0) {
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 347 "rygel-external-icon-factory.c"
			} else {
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 351 "rygel-external-icon-factory.c"
			}
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			g_object_unref (_data_->_async_result);
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			return FALSE;
#line 357 "rygel-external-icon-factory.c"
		} else {
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			_g_free0 (_data_->icon_path);
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			_g_variant_unref0 (_data_->value);
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.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 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			g_clear_error (&_data_->_inner_error_);
#line 40 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			return FALSE;
#line 369 "rygel-external-icon-factory.c"
		}
	}
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_tmp9_ = _data_->props;
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_tmp10_ = rygel_external_icon_factory_ITEM_IFACE;
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_state_ = 2;
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	free_desktop_properties_get_all (_data_->_tmp9_, _data_->_tmp10_, rygel_external_icon_factory_create_ready, _data_);
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	return FALSE;
#line 382 "rygel-external-icon-factory.c"
	_state_2:
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_tmp11_ = NULL;
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_tmp11_ = free_desktop_properties_get_all_finish (_data_->_tmp9_, _data_->_res_, &_data_->_inner_error_);
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->item_props = _data_->_tmp11_;
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	if (_data_->_inner_error_ != NULL) {
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		if ((_data_->_inner_error_->domain == G_IO_ERROR) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) {
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			g_error_free (_data_->_inner_error_);
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			_g_object_unref0 (_data_->props);
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			_g_free0 (_data_->icon_path);
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			_g_variant_unref0 (_data_->value);
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			if (_data_->_state_ == 0) {
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 408 "rygel-external-icon-factory.c"
			} else {
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 412 "rygel-external-icon-factory.c"
			}
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			g_object_unref (_data_->_async_result);
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			return FALSE;
#line 418 "rygel-external-icon-factory.c"
		} else {
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			_g_object_unref0 (_data_->props);
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			_g_free0 (_data_->icon_path);
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			_g_variant_unref0 (_data_->value);
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.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 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			g_clear_error (&_data_->_inner_error_);
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			return FALSE;
#line 432 "rygel-external-icon-factory.c"
		}
	}
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_tmp12_ = _data_->item_props;
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_tmp13_ = NULL;
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->_tmp13_ = rygel_external_icon_factory_create_from_props (_data_->self, _data_->_tmp12_);
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_data_->result = _data_->_tmp13_;
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_g_hash_table_unref0 (_data_->item_props);
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_g_object_unref0 (_data_->props);
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_g_free0 (_data_->icon_path);
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_g_variant_unref0 (_data_->value);
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	if (_data_->_state_ == 0) {
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 455 "rygel-external-icon-factory.c"
	} else {
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 459 "rygel-external-icon-factory.c"
	}
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	g_object_unref (_data_->_async_result);
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	return FALSE;
#line 30 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_g_hash_table_unref0 (_data_->item_props);
#line 30 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_g_object_unref0 (_data_->props);
#line 30 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_g_free0 (_data_->icon_path);
#line 30 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_g_variant_unref0 (_data_->value);
#line 30 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	if (_data_->_state_ == 0) {
#line 30 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 477 "rygel-external-icon-factory.c"
	} else {
#line 30 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 481 "rygel-external-icon-factory.c"
	}
#line 30 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	g_object_unref (_data_->_async_result);
#line 30 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	return FALSE;
#line 487 "rygel-external-icon-factory.c"
}


static gchar* _variant_get29 (GVariant* value) {
#line 52 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	return g_variant_dup_string (value, NULL);
#line 494 "rygel-external-icon-factory.c"
}


static gchar** _variant_get30 (GVariant* value, int* result_length1) {
	gchar** _tmp12_;
	int _tmp12__length;
	int _tmp12__size;
	int _tmp12__length1;
	GVariantIter _tmp13_;
	GVariant* _tmp14_;
	_tmp12_ = g_new (gchar*, 5);
	_tmp12__length = 0;
	_tmp12__size = 4;
	_tmp12__length1 = 0;
#line 55 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	g_variant_iter_init (&_tmp13_, value);
#line 55 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	for (; (_tmp14_ = g_variant_iter_next_value (&_tmp13_)) != NULL; _tmp12__length1++) {
#line 55 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		if (_tmp12__size == _tmp12__length) {
#line 55 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			_tmp12__size = 2 * _tmp12__size;
#line 55 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			_tmp12_ = g_renew (gchar*, _tmp12_, _tmp12__size + 1);
#line 519 "rygel-external-icon-factory.c"
		}
#line 55 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_tmp12_[_tmp12__length++] = g_variant_dup_string (_tmp14_, NULL);
#line 55 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		g_variant_unref (_tmp14_);
#line 525 "rygel-external-icon-factory.c"
	}
#line 55 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	*result_length1 = _tmp12__length1;
#line 55 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp12_[_tmp12__length] = NULL;
#line 55 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	return _tmp12_;
#line 533 "rygel-external-icon-factory.c"
}


static gint64 _variant_get31 (GVariant* value) {
#line 62 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	return g_variant_get_int64 (value);
#line 540 "rygel-external-icon-factory.c"
}


static RygelIconInfo* rygel_external_icon_factory_create_from_props (RygelExternalIconFactory* self, GHashTable* props) {
	RygelIconInfo* result = NULL;
	GHashTable* _tmp0_;
	gconstpointer _tmp1_ = NULL;
	gchar* _tmp2_;
	gchar* mime_type;
	const gchar* _tmp3_;
	const gchar* _tmp4_;
	gchar* _tmp5_ = NULL;
	gchar* _tmp6_;
	RygelIconInfo* _tmp7_;
	RygelIconInfo* _tmp8_;
	RygelIconInfo* icon;
	GHashTable* _tmp9_;
	gconstpointer _tmp10_ = NULL;
	gchar** _tmp11_;
	gint _tmp11__length1;
	gchar** uris;
	gint uris_length1;
	gint _uris_size_;
	gboolean _tmp15_ = FALSE;
	gchar** _tmp16_;
	gint _tmp16__length1;
	gboolean _tmp19_;
	GHashTable* _tmp24_;
	gconstpointer _tmp25_ = NULL;
	GVariant* _tmp26_;
	GVariant* value;
	GVariant* _tmp27_;
	RygelIconInfo* _tmp31_;
	GHashTable* _tmp32_;
	gint _tmp33_ = 0;
	RygelIconInfo* _tmp34_;
	GHashTable* _tmp35_;
	gint _tmp36_ = 0;
	RygelIconInfo* _tmp37_;
	GHashTable* _tmp38_;
	gint _tmp39_ = 0;
#line 51 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 51 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	g_return_val_if_fail (props != NULL, NULL);
#line 52 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp0_ = props;
#line 52 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp1_ = g_hash_table_lookup (_tmp0_, "MIMEType");
#line 52 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp2_ = _variant_get29 ((GVariant*) _tmp1_);
#line 52 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	mime_type = _tmp2_;
#line 53 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp3_ = mime_type;
#line 53 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp4_ = mime_type;
#line 53 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp5_ = rygel_external_icon_factory_get_ext_for_mime (self, _tmp4_);
#line 53 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp6_ = _tmp5_;
#line 53 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp7_ = rygel_icon_info_new (_tmp3_, _tmp6_);
#line 53 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp8_ = _tmp7_;
#line 53 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_g_free0 (_tmp6_);
#line 53 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	icon = _tmp8_;
#line 55 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp9_ = props;
#line 55 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp10_ = g_hash_table_lookup (_tmp9_, "URLs");
#line 55 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp11_ = _variant_get30 ((GVariant*) _tmp10_, &_tmp11__length1);
#line 55 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	uris = _tmp11_;
#line 55 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	uris_length1 = _tmp11__length1;
#line 55 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_uris_size_ = uris_length1;
#line 56 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp16_ = uris;
#line 56 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp16__length1 = uris_length1;
#line 56 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	if (_tmp16_ != NULL) {
#line 628 "rygel-external-icon-factory.c"
		gchar** _tmp17_;
		gint _tmp17__length1;
		const gchar* _tmp18_;
#line 56 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_tmp17_ = uris;
#line 56 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_tmp17__length1 = uris_length1;
#line 56 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_tmp18_ = _tmp17_[0];
#line 56 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_tmp15_ = _tmp18_ != NULL;
#line 640 "rygel-external-icon-factory.c"
	} else {
#line 56 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_tmp15_ = FALSE;
#line 644 "rygel-external-icon-factory.c"
	}
#line 56 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp19_ = _tmp15_;
#line 56 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	if (_tmp19_) {
#line 650 "rygel-external-icon-factory.c"
		RygelIconInfo* _tmp20_;
		gchar** _tmp21_;
		gint _tmp21__length1;
		const gchar* _tmp22_;
		gchar* _tmp23_;
#line 57 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_tmp20_ = icon;
#line 57 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_tmp21_ = uris;
#line 57 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_tmp21__length1 = uris_length1;
#line 57 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_tmp22_ = _tmp21_[0];
#line 57 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_tmp23_ = g_strdup (_tmp22_);
#line 57 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_g_free0 (_tmp20_->uri);
#line 57 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_tmp20_->uri = _tmp23_;
#line 670 "rygel-external-icon-factory.c"
	}
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp24_ = props;
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp25_ = g_hash_table_lookup (_tmp24_, "Size");
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp26_ = _g_variant_ref0 ((GVariant*) _tmp25_);
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	value = _tmp26_;
#line 61 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp27_ = value;
#line 61 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	if (_tmp27_ != NULL) {
#line 684 "rygel-external-icon-factory.c"
		RygelIconInfo* _tmp28_;
		GVariant* _tmp29_;
		gint64 _tmp30_;
#line 62 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_tmp28_ = icon;
#line 62 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_tmp29_ = value;
#line 62 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_tmp30_ = _variant_get31 (_tmp29_);
#line 62 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_tmp28_->size = _tmp30_;
#line 696 "rygel-external-icon-factory.c"
	}
#line 65 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp31_ = icon;
#line 65 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp32_ = props;
#line 65 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp33_ = rygel_external_icon_factory_get_int (self, _tmp32_, "Width");
#line 65 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp31_->width = _tmp33_;
#line 66 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp34_ = icon;
#line 66 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp35_ = props;
#line 66 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp36_ = rygel_external_icon_factory_get_int (self, _tmp35_, "Height");
#line 66 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp34_->height = _tmp36_;
#line 67 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp37_ = icon;
#line 67 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp38_ = props;
#line 67 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp39_ = rygel_external_icon_factory_get_int (self, _tmp38_, "ColorDepth");
#line 67 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp37_->depth = _tmp39_;
#line 69 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	result = icon;
#line 69 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_g_variant_unref0 (value);
#line 69 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	uris = (_vala_array_free (uris, uris_length1, (GDestroyNotify) g_free), NULL);
#line 69 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_g_free0 (mime_type);
#line 69 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	return result;
#line 732 "rygel-external-icon-factory.c"
}


static gchar* rygel_external_icon_factory_get_ext_for_mime (RygelExternalIconFactory* self, const gchar* mime_type) {
	gchar* result = NULL;
	const gchar* _tmp0_;
#line 72 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 72 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	g_return_val_if_fail (mime_type != NULL, NULL);
#line 73 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp0_ = mime_type;
#line 73 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	if (g_strcmp0 (_tmp0_, "image/jpeg") == 0) {
#line 747 "rygel-external-icon-factory.c"
		gchar* _tmp1_;
#line 74 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_tmp1_ = g_strdup ("jpg");
#line 74 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		result = _tmp1_;
#line 74 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		return result;
#line 755 "rygel-external-icon-factory.c"
	} else {
		const gchar* _tmp2_;
#line 75 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_tmp2_ = mime_type;
#line 75 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		if (g_strcmp0 (_tmp2_, "image/gif") == 0) {
#line 762 "rygel-external-icon-factory.c"
			gchar* _tmp3_;
#line 76 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			_tmp3_ = g_strdup ("gif");
#line 76 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			result = _tmp3_;
#line 76 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			return result;
#line 770 "rygel-external-icon-factory.c"
		} else {
			gchar* _tmp4_;
#line 78 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			_tmp4_ = g_strdup ("png");
#line 78 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			result = _tmp4_;
#line 78 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			return result;
#line 779 "rygel-external-icon-factory.c"
		}
	}
}


static gint _variant_get32 (GVariant* value) {
#line 86 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	return g_variant_get_int32 (value);
#line 788 "rygel-external-icon-factory.c"
}


static gint rygel_external_icon_factory_get_int (RygelExternalIconFactory* self, GHashTable* props, const gchar* prop) {
	gint result = 0;
	GHashTable* _tmp0_;
	const gchar* _tmp1_;
	gconstpointer _tmp2_ = NULL;
	GVariant* _tmp3_;
	GVariant* value;
	GVariant* _tmp4_;
#line 82 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 82 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	g_return_val_if_fail (props != NULL, 0);
#line 82 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	g_return_val_if_fail (prop != NULL, 0);
#line 83 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp0_ = props;
#line 83 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp1_ = prop;
#line 83 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp2_ = g_hash_table_lookup (_tmp0_, _tmp1_);
#line 83 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp3_ = _g_variant_ref0 ((GVariant*) _tmp2_);
#line 83 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	value = _tmp3_;
#line 85 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp4_ = value;
#line 85 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	if (_tmp4_ != NULL) {
#line 820 "rygel-external-icon-factory.c"
		GVariant* _tmp5_;
		gint _tmp6_;
#line 86 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_tmp5_ = value;
#line 86 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_tmp6_ = _variant_get32 (_tmp5_);
#line 86 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		result = _tmp6_;
#line 86 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_g_variant_unref0 (value);
#line 86 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		return result;
#line 833 "rygel-external-icon-factory.c"
	} else {
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		result = -1;
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		_g_variant_unref0 (value);
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		return result;
#line 841 "rygel-external-icon-factory.c"
	}
#line 82 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_g_variant_unref0 (value);
#line 845 "rygel-external-icon-factory.c"
}


RygelExternalIconFactory* rygel_external_icon_factory_construct (GType object_type) {
	RygelExternalIconFactory* self = NULL;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	self = (RygelExternalIconFactory*) g_type_create_instance (object_type);
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	return self;
#line 855 "rygel-external-icon-factory.c"
}


RygelExternalIconFactory* rygel_external_icon_factory_new (void) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	return rygel_external_icon_factory_construct (RYGEL_EXTERNAL_TYPE_ICON_FACTORY);
#line 862 "rygel-external-icon-factory.c"
}


static void rygel_external_value_icon_factory_init (GValue* value) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	value->data[0].v_pointer = NULL;
#line 869 "rygel-external-icon-factory.c"
}


static void rygel_external_value_icon_factory_free_value (GValue* value) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	if (value->data[0].v_pointer) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		rygel_external_icon_factory_unref (value->data[0].v_pointer);
#line 878 "rygel-external-icon-factory.c"
	}
}


static void rygel_external_value_icon_factory_copy_value (const GValue* src_value, GValue* dest_value) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	if (src_value->data[0].v_pointer) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		dest_value->data[0].v_pointer = rygel_external_icon_factory_ref (src_value->data[0].v_pointer);
#line 888 "rygel-external-icon-factory.c"
	} else {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		dest_value->data[0].v_pointer = NULL;
#line 892 "rygel-external-icon-factory.c"
	}
}


static gpointer rygel_external_value_icon_factory_peek_pointer (const GValue* value) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	return value->data[0].v_pointer;
#line 900 "rygel-external-icon-factory.c"
}


static gchar* rygel_external_value_icon_factory_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	if (collect_values[0].v_pointer) {
#line 907 "rygel-external-icon-factory.c"
		RygelExternalIconFactory* object;
		object = collect_values[0].v_pointer;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		if (object->parent_instance.g_class == NULL) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 914 "rygel-external-icon-factory.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.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 918 "rygel-external-icon-factory.c"
		}
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		value->data[0].v_pointer = rygel_external_icon_factory_ref (object);
#line 922 "rygel-external-icon-factory.c"
	} else {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		value->data[0].v_pointer = NULL;
#line 926 "rygel-external-icon-factory.c"
	}
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	return NULL;
#line 930 "rygel-external-icon-factory.c"
}


static gchar* rygel_external_value_icon_factory_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	RygelExternalIconFactory** object_p;
	object_p = collect_values[0].v_pointer;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	if (!object_p) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 941 "rygel-external-icon-factory.c"
	}
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	if (!value->data[0].v_pointer) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		*object_p = NULL;
#line 947 "rygel-external-icon-factory.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		*object_p = value->data[0].v_pointer;
#line 951 "rygel-external-icon-factory.c"
	} else {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		*object_p = rygel_external_icon_factory_ref (value->data[0].v_pointer);
#line 955 "rygel-external-icon-factory.c"
	}
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	return NULL;
#line 959 "rygel-external-icon-factory.c"
}


GParamSpec* rygel_external_param_spec_icon_factory (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	RygelExternalParamSpecIconFactory* spec;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	g_return_val_if_fail (g_type_is_a (object_type, RYGEL_EXTERNAL_TYPE_ICON_FACTORY), NULL);
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	return G_PARAM_SPEC (spec);
#line 973 "rygel-external-icon-factory.c"
}


gpointer rygel_external_value_get_icon_factory (const GValue* value) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, RYGEL_EXTERNAL_TYPE_ICON_FACTORY), NULL);
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	return value->data[0].v_pointer;
#line 982 "rygel-external-icon-factory.c"
}


void rygel_external_value_set_icon_factory (GValue* value, gpointer v_object) {
	RygelExternalIconFactory* old;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, RYGEL_EXTERNAL_TYPE_ICON_FACTORY));
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	old = value->data[0].v_pointer;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	if (v_object) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, RYGEL_EXTERNAL_TYPE_ICON_FACTORY));
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		value->data[0].v_pointer = v_object;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		rygel_external_icon_factory_ref (value->data[0].v_pointer);
#line 1002 "rygel-external-icon-factory.c"
	} else {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		value->data[0].v_pointer = NULL;
#line 1006 "rygel-external-icon-factory.c"
	}
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	if (old) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		rygel_external_icon_factory_unref (old);
#line 1012 "rygel-external-icon-factory.c"
	}
}


void rygel_external_value_take_icon_factory (GValue* value, gpointer v_object) {
	RygelExternalIconFactory* old;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, RYGEL_EXTERNAL_TYPE_ICON_FACTORY));
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	old = value->data[0].v_pointer;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	if (v_object) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, RYGEL_EXTERNAL_TYPE_ICON_FACTORY));
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		value->data[0].v_pointer = v_object;
#line 1031 "rygel-external-icon-factory.c"
	} else {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		value->data[0].v_pointer = NULL;
#line 1035 "rygel-external-icon-factory.c"
	}
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	if (old) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		rygel_external_icon_factory_unref (old);
#line 1041 "rygel-external-icon-factory.c"
	}
}


static void rygel_external_icon_factory_class_init (RygelExternalIconFactoryClass * klass) {
	gchar* _tmp0_;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	rygel_external_icon_factory_parent_class = g_type_class_peek_parent (klass);
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	RYGEL_EXTERNAL_ICON_FACTORY_CLASS (klass)->finalize = rygel_external_icon_factory_finalize;
#line 28 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	_tmp0_ = g_strdup ("org.gnome.UPnP.MediaItem2");
#line 28 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	rygel_external_icon_factory_ITEM_IFACE = _tmp0_;
#line 1056 "rygel-external-icon-factory.c"
}


static void rygel_external_icon_factory_instance_init (RygelExternalIconFactory * self) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	self->ref_count = 1;
#line 1063 "rygel-external-icon-factory.c"
}


static void rygel_external_icon_factory_finalize (RygelExternalIconFactory* obj) {
	RygelExternalIconFactory * self;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_EXTERNAL_TYPE_ICON_FACTORY, RygelExternalIconFactory);
#line 1071 "rygel-external-icon-factory.c"
}


GType rygel_external_icon_factory_get_type (void) {
	static volatile gsize rygel_external_icon_factory_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_external_icon_factory_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { rygel_external_value_icon_factory_init, rygel_external_value_icon_factory_free_value, rygel_external_value_icon_factory_copy_value, rygel_external_value_icon_factory_peek_pointer, "p", rygel_external_value_icon_factory_collect_value, "p", rygel_external_value_icon_factory_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (RygelExternalIconFactoryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_external_icon_factory_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelExternalIconFactory), 0, (GInstanceInitFunc) rygel_external_icon_factory_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_external_icon_factory_type_id;
		rygel_external_icon_factory_type_id = g_type_register_fundamental (g_type_fundamental_next (), "RygelExternalIconFactory", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&rygel_external_icon_factory_type_id__volatile, rygel_external_icon_factory_type_id);
	}
	return rygel_external_icon_factory_type_id__volatile;
}


gpointer rygel_external_icon_factory_ref (gpointer instance) {
	RygelExternalIconFactory* self;
	self = instance;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	g_atomic_int_inc (&self->ref_count);
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	return instance;
#line 1096 "rygel-external-icon-factory.c"
}


void rygel_external_icon_factory_unref (gpointer instance) {
	RygelExternalIconFactory* self;
	self = instance;
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		RYGEL_EXTERNAL_ICON_FACTORY_GET_CLASS (self)->finalize (self);
#line 27 "/home/jens/Source/rygel/src/plugins/external/rygel-external-icon-factory.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 1109 "rygel-external-icon-factory.c"
	}
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}



