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

/*
 * Copyright (C) 2009 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>.
 * Copyright (C) 2009,2010 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 <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <rygel-server.h>
#include <gee.h>
#include <gobject/gvaluecollector.h>


#define RYGEL_EXTERNAL_TYPE_ITEM_FACTORY (rygel_external_item_factory_get_type ())
#define RYGEL_EXTERNAL_ITEM_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_EXTERNAL_TYPE_ITEM_FACTORY, RygelExternalItemFactory))
#define RYGEL_EXTERNAL_ITEM_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_EXTERNAL_TYPE_ITEM_FACTORY, RygelExternalItemFactoryClass))
#define RYGEL_EXTERNAL_IS_ITEM_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_EXTERNAL_TYPE_ITEM_FACTORY))
#define RYGEL_EXTERNAL_IS_ITEM_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_EXTERNAL_TYPE_ITEM_FACTORY))
#define RYGEL_EXTERNAL_ITEM_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_EXTERNAL_TYPE_ITEM_FACTORY, RygelExternalItemFactoryClass))

typedef struct _RygelExternalItemFactory RygelExternalItemFactory;
typedef struct _RygelExternalItemFactoryClass RygelExternalItemFactoryClass;
typedef struct _RygelExternalItemFactoryPrivate RygelExternalItemFactoryPrivate;
#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 _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _rygel_external_item_factory_unref0(var) ((var == NULL) ? NULL : (var = (rygel_external_item_factory_unref (var), NULL)))

#define RYGEL_EXTERNAL_TYPE_DUMMY_CONTAINER (rygel_external_dummy_container_get_type ())
#define RYGEL_EXTERNAL_DUMMY_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_EXTERNAL_TYPE_DUMMY_CONTAINER, RygelExternalDummyContainer))
#define RYGEL_EXTERNAL_DUMMY_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_EXTERNAL_TYPE_DUMMY_CONTAINER, RygelExternalDummyContainerClass))
#define RYGEL_EXTERNAL_IS_DUMMY_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_EXTERNAL_TYPE_DUMMY_CONTAINER))
#define RYGEL_EXTERNAL_IS_DUMMY_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_EXTERNAL_TYPE_DUMMY_CONTAINER))
#define RYGEL_EXTERNAL_DUMMY_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_EXTERNAL_TYPE_DUMMY_CONTAINER, RygelExternalDummyContainerClass))

typedef struct _RygelExternalDummyContainer RygelExternalDummyContainer;
typedef struct _RygelExternalDummyContainerClass RygelExternalDummyContainerClass;
typedef struct _RygelExternalItemFactoryCreateData RygelExternalItemFactoryCreateData;

#define RYGEL_EXTERNAL_TYPE_ALBUM_ART_FACTORY (rygel_external_album_art_factory_get_type ())
#define RYGEL_EXTERNAL_ALBUM_ART_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_EXTERNAL_TYPE_ALBUM_ART_FACTORY, RygelExternalAlbumArtFactory))
#define RYGEL_EXTERNAL_ALBUM_ART_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_EXTERNAL_TYPE_ALBUM_ART_FACTORY, RygelExternalAlbumArtFactoryClass))
#define RYGEL_EXTERNAL_IS_ALBUM_ART_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_EXTERNAL_TYPE_ALBUM_ART_FACTORY))
#define RYGEL_EXTERNAL_IS_ALBUM_ART_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_EXTERNAL_TYPE_ALBUM_ART_FACTORY))
#define RYGEL_EXTERNAL_ALBUM_ART_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_EXTERNAL_TYPE_ALBUM_ART_FACTORY, RygelExternalAlbumArtFactoryClass))

typedef struct _RygelExternalAlbumArtFactory RygelExternalAlbumArtFactory;
typedef struct _RygelExternalAlbumArtFactoryClass RygelExternalAlbumArtFactoryClass;
#define _rygel_external_album_art_factory_unref0(var) ((var == NULL) ? NULL : (var = (rygel_external_album_art_factory_unref (var), NULL)))
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
#define _rygel_icon_info_unref0(var) ((var == NULL) ? NULL : (var = (rygel_icon_info_unref (var), NULL)))
typedef struct _RygelExternalItemFactorySetMusicMetadataData RygelExternalItemFactorySetMusicMetadataData;

#define RYGEL_EXTERNAL_TYPE_THUMBNAIL_FACTORY (rygel_external_thumbnail_factory_get_type ())
#define RYGEL_EXTERNAL_THUMBNAIL_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_EXTERNAL_TYPE_THUMBNAIL_FACTORY, RygelExternalThumbnailFactory))
#define RYGEL_EXTERNAL_THUMBNAIL_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_EXTERNAL_TYPE_THUMBNAIL_FACTORY, RygelExternalThumbnailFactoryClass))
#define RYGEL_EXTERNAL_IS_THUMBNAIL_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_EXTERNAL_TYPE_THUMBNAIL_FACTORY))
#define RYGEL_EXTERNAL_IS_THUMBNAIL_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_EXTERNAL_TYPE_THUMBNAIL_FACTORY))
#define RYGEL_EXTERNAL_THUMBNAIL_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_EXTERNAL_TYPE_THUMBNAIL_FACTORY, RygelExternalThumbnailFactoryClass))

typedef struct _RygelExternalThumbnailFactory RygelExternalThumbnailFactory;
typedef struct _RygelExternalThumbnailFactoryClass RygelExternalThumbnailFactoryClass;
#define _rygel_external_thumbnail_factory_unref0(var) ((var == NULL) ? NULL : (var = (rygel_external_thumbnail_factory_unref (var), NULL)))
typedef struct _RygelExternalItemFactorySetVisualMetadataData RygelExternalItemFactorySetVisualMetadataData;
typedef struct _RygelExternalItemFactorySetVideoMetadataData RygelExternalItemFactorySetVideoMetadataData;
typedef struct _RygelExternalParamSpecItemFactory RygelExternalParamSpecItemFactory;

struct _RygelExternalItemFactory {
	GTypeInstance parent_instance;
	volatile int ref_count;
	RygelExternalItemFactoryPrivate * priv;
};

struct _RygelExternalItemFactoryClass {
	GTypeClass parent_class;
	void (*finalize) (RygelExternalItemFactory *self);
};

struct _RygelExternalItemFactoryCreateData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelExternalItemFactory* self;
	gchar* id;
	gchar* type;
	gchar* title;
	GHashTable* props;
	gchar* service_name;
	RygelMediaContainer* parent;
	RygelMediaItem* result;
	RygelMediaItem* item;
	const gchar* _tmp0_;
	gboolean _tmp1_;
	const gchar* _tmp2_;
	RygelMediaContainer* _tmp3_;
	const gchar* _tmp4_;
	RygelAudioItem* _tmp5_;
	RygelMediaItem* _tmp6_;
	GHashTable* _tmp7_;
	const gchar* _tmp8_;
	const gchar* _tmp9_;
	gboolean _tmp10_;
	const gchar* _tmp11_;
	RygelMediaContainer* _tmp12_;
	const gchar* _tmp13_;
	RygelMusicItem* _tmp14_;
	RygelMediaItem* _tmp15_;
	GHashTable* _tmp16_;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	gboolean _tmp19_;
	const gchar* _tmp20_;
	RygelMediaContainer* _tmp21_;
	const gchar* _tmp22_;
	RygelVideoItem* _tmp23_;
	RygelMediaItem* _tmp24_;
	GHashTable* _tmp25_;
	const gchar* _tmp26_;
	const gchar* _tmp27_;
	RygelMediaContainer* _tmp28_;
	const gchar* _tmp29_;
	RygelImageItem* _tmp30_;
	RygelMediaItem* _tmp31_;
	GHashTable* _tmp32_;
	const gchar* _tmp33_;
	RygelMediaItem* _tmp34_;
	GHashTable* _tmp35_;
	const gchar* _tmp36_;
	RygelMediaContainer* _tmp37_;
	RygelMediaItem* _tmp38_;
	RygelMediaContainer* _tmp39_;
	GError * _inner_error_;
};

struct _RygelExternalItemFactorySetMusicMetadataData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelExternalItemFactory* self;
	RygelMusicItem* music;
	GHashTable* props;
	gchar* service_name;
	RygelMusicItem* _tmp0_;
	GHashTable* _tmp1_;
	gchar* _tmp2_;
	RygelMusicItem* _tmp3_;
	GHashTable* _tmp4_;
	gchar* _tmp5_;
	RygelMusicItem* _tmp6_;
	GHashTable* _tmp7_;
	gchar* _tmp8_;
	RygelMusicItem* _tmp9_;
	GHashTable* _tmp10_;
	gint _tmp11_;
	GHashTable* _tmp12_;
	gconstpointer _tmp13_;
	GVariant* _tmp14_;
	GVariant* value;
	GVariant* _tmp15_;
	RygelExternalAlbumArtFactory* _tmp16_;
	RygelExternalAlbumArtFactory* cover_factory;
	RygelExternalAlbumArtFactory* _tmp17_;
	GVariant* _tmp18_;
	gchar* _tmp19_;
	gchar* _tmp20_;
	const gchar* _tmp21_;
	RygelThumbnail* _tmp22_;
	RygelThumbnail* _tmp23_;
	RygelThumbnail* _tmp24_;
	RygelMusicItem* _tmp25_;
	RygelMusicItem* _tmp26_;
	GHashTable* _tmp27_;
	const gchar* _tmp28_;
	GError * _inner_error_;
};

struct _RygelExternalItemFactorySetVisualMetadataData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelExternalItemFactory* self;
	RygelVisualItem* visual;
	GHashTable* props;
	gchar* service_name;
	RygelVisualItem* _tmp0_;
	GHashTable* _tmp1_;
	gint _tmp2_;
	RygelVisualItem* _tmp3_;
	GHashTable* _tmp4_;
	gint _tmp5_;
	RygelVisualItem* _tmp6_;
	GHashTable* _tmp7_;
	gint _tmp8_;
	RygelVisualItem* _tmp9_;
	GHashTable* _tmp10_;
	gint _tmp11_;
	RygelVisualItem* _tmp12_;
	GHashTable* _tmp13_;
	gint _tmp14_;
	GHashTable* _tmp15_;
	gconstpointer _tmp16_;
	GVariant* _tmp17_;
	GVariant* value;
	GVariant* _tmp18_;
	RygelExternalThumbnailFactory* _tmp19_;
	RygelExternalThumbnailFactory* factory;
	RygelExternalThumbnailFactory* _tmp20_;
	GVariant* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	const gchar* _tmp24_;
	RygelThumbnail* _tmp25_;
	RygelThumbnail* _tmp26_;
	RygelThumbnail* thumbnail;
	RygelVisualItem* _tmp27_;
	GeeArrayList* _tmp28_;
	GeeArrayList* _tmp29_;
	RygelThumbnail* _tmp30_;
	GError * _inner_error_;
};

struct _RygelExternalItemFactorySetVideoMetadataData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelExternalItemFactory* self;
	RygelVideoItem* video;
	GHashTable* props;
	gchar* service_name;
	RygelVideoItem* _tmp0_;
	GHashTable* _tmp1_;
	const gchar* _tmp2_;
	RygelVideoItem* _tmp3_;
	GHashTable* _tmp4_;
	const gchar* _tmp5_;
	GError * _inner_error_;
};

struct _RygelExternalParamSpecItemFactory {
	GParamSpec parent_instance;
};


static gpointer rygel_external_item_factory_parent_class = NULL;

gpointer rygel_external_item_factory_ref (gpointer instance);
void rygel_external_item_factory_unref (gpointer instance);
GParamSpec* rygel_external_param_spec_item_factory (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void rygel_external_value_set_item_factory (GValue* value, gpointer v_object);
void rygel_external_value_take_item_factory (GValue* value, gpointer v_object);
gpointer rygel_external_value_get_item_factory (const GValue* value);
GType rygel_external_item_factory_get_type (void) G_GNUC_CONST;
enum  {
	RYGEL_EXTERNAL_ITEM_FACTORY_DUMMY_PROPERTY
};
static void rygel_external_item_factory_create_data_free (gpointer _data);
void rygel_external_item_factory_create (RygelExternalItemFactory* self, const gchar* id, const gchar* type, const gchar* title, GHashTable* props, const gchar* service_name, RygelMediaContainer* parent, GAsyncReadyCallback _callback_, gpointer _user_data_);
RygelMediaItem* rygel_external_item_factory_create_finish (RygelExternalItemFactory* self, GAsyncResult* _res_, GError** error);
static gboolean rygel_external_item_factory_create_co (RygelExternalItemFactoryCreateData* _data_);
static void rygel_external_item_factory_set_audio_metadata (RygelExternalItemFactory* self, RygelAudioItem* audio, GHashTable* props, const gchar* service_name, GError** error);
static void rygel_external_item_factory_set_music_metadata (RygelExternalItemFactory* self, RygelMusicItem* music, GHashTable* props, const gchar* service_name, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void rygel_external_item_factory_set_music_metadata_finish (RygelExternalItemFactory* self, GAsyncResult* _res_, GError** error);
static void rygel_external_item_factory_create_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void rygel_external_item_factory_set_video_metadata (RygelExternalItemFactory* self, RygelVideoItem* video, GHashTable* props, const gchar* service_name, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void rygel_external_item_factory_set_video_metadata_finish (RygelExternalItemFactory* self, GAsyncResult* _res_, GError** error);
static void rygel_external_item_factory_set_visual_metadata (RygelExternalItemFactory* self, RygelVisualItem* visual, GHashTable* props, const gchar* service_name, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void rygel_external_item_factory_set_visual_metadata_finish (RygelExternalItemFactory* self, GAsyncResult* _res_, GError** error);
static void rygel_external_item_factory_set_generic_metadata (RygelExternalItemFactory* self, RygelMediaItem* item, GHashTable* props, const gchar* service_name);
GType rygel_external_dummy_container_get_type (void) G_GNUC_CONST;
static void rygel_external_item_factory_set_music_metadata_data_free (gpointer _data);
static gboolean rygel_external_item_factory_set_music_metadata_co (RygelExternalItemFactorySetMusicMetadataData* _data_);
static gchar* rygel_external_item_factory_get_string (RygelExternalItemFactory* self, GHashTable* props, const gchar* prop);
static gint rygel_external_item_factory_get_int (RygelExternalItemFactory* self, GHashTable* props, const gchar* prop);
RygelExternalAlbumArtFactory* rygel_external_album_art_factory_new (void);
RygelExternalAlbumArtFactory* rygel_external_album_art_factory_construct (GType object_type);
gpointer rygel_external_album_art_factory_ref (gpointer instance);
void rygel_external_album_art_factory_unref (gpointer instance);
GParamSpec* rygel_external_param_spec_album_art_factory (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void rygel_external_value_set_album_art_factory (GValue* value, gpointer v_object);
void rygel_external_value_take_album_art_factory (GValue* value, gpointer v_object);
gpointer rygel_external_value_get_album_art_factory (const GValue* value);
GType rygel_external_album_art_factory_get_type (void) G_GNUC_CONST;
void rygel_external_album_art_factory_create (RygelExternalAlbumArtFactory* self, const gchar* service_name, const gchar* object_path, GAsyncReadyCallback _callback_, gpointer _user_data_);
RygelThumbnail* rygel_external_album_art_factory_create_finish (RygelExternalAlbumArtFactory* self, GAsyncResult* _res_, GError** error);
static gchar* _variant_get13 (GVariant* value);
static void rygel_external_item_factory_set_music_metadata_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void rygel_external_item_factory_set_visual_metadata_data_free (gpointer _data);
static gboolean rygel_external_item_factory_set_visual_metadata_co (RygelExternalItemFactorySetVisualMetadataData* _data_);
RygelExternalThumbnailFactory* rygel_external_thumbnail_factory_new (void);
RygelExternalThumbnailFactory* rygel_external_thumbnail_factory_construct (GType object_type);
gpointer rygel_external_thumbnail_factory_ref (gpointer instance);
void rygel_external_thumbnail_factory_unref (gpointer instance);
GParamSpec* rygel_external_param_spec_thumbnail_factory (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void rygel_external_value_set_thumbnail_factory (GValue* value, gpointer v_object);
void rygel_external_value_take_thumbnail_factory (GValue* value, gpointer v_object);
gpointer rygel_external_value_get_thumbnail_factory (const GValue* value);
GType rygel_external_thumbnail_factory_get_type (void) G_GNUC_CONST;
void rygel_external_thumbnail_factory_create (RygelExternalThumbnailFactory* self, const gchar* service_name, const gchar* object_path, GAsyncReadyCallback _callback_, gpointer _user_data_);
RygelThumbnail* rygel_external_thumbnail_factory_create_finish (RygelExternalThumbnailFactory* self, GAsyncResult* _res_, GError** error);
static gchar* _variant_get14 (GVariant* value);
static void rygel_external_item_factory_set_visual_metadata_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void rygel_external_item_factory_set_video_metadata_data_free (gpointer _data);
static gboolean rygel_external_item_factory_set_video_metadata_co (RygelExternalItemFactorySetVideoMetadataData* _data_);
static void rygel_external_item_factory_set_video_metadata_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
gchar* rygel_external_get_mandatory_string_value (GHashTable* props, const gchar* key, const gchar* _default_, const gchar* service_name);
gchar** rygel_external_get_mandatory_string_list_value (GHashTable* props, const gchar* key, gchar** _default_, int _default__length1, const gchar* service_name, int* result_length1);
static gint64 _variant_get15 (GVariant* value);
static gchar* _variant_get16 (GVariant* value);
static gint _variant_get17 (GVariant* value);
RygelExternalItemFactory* rygel_external_item_factory_new (void);
RygelExternalItemFactory* rygel_external_item_factory_construct (GType object_type);
static void rygel_external_item_factory_finalize (RygelExternalItemFactory* 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_item_factory_create_data_free (gpointer _data) {
	RygelExternalItemFactoryCreateData* _data_;
	_data_ = _data;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_free0 (_data_->id);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_free0 (_data_->type);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_free0 (_data_->title);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_hash_table_unref0 (_data_->props);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_free0 (_data_->service_name);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_object_unref0 (_data_->parent);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_object_unref0 (_data_->result);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_rygel_external_item_factory_unref0 (_data_->self);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_slice_free (RygelExternalItemFactoryCreateData, _data_);
#line 367 "rygel-external-item-factory.c"
}


static gpointer _rygel_external_item_factory_ref0 (gpointer self) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	return self ? rygel_external_item_factory_ref (self) : NULL;
#line 374 "rygel-external-item-factory.c"
}


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


static gpointer _g_object_ref0 (gpointer self) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	return self ? g_object_ref (self) : NULL;
#line 388 "rygel-external-item-factory.c"
}


void rygel_external_item_factory_create (RygelExternalItemFactory* self, const gchar* id, const gchar* type, const gchar* title, GHashTable* props, const gchar* service_name, RygelMediaContainer* parent, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelExternalItemFactoryCreateData* _data_;
	RygelExternalItemFactory* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	GHashTable* _tmp7_;
	GHashTable* _tmp8_;
	const gchar* _tmp9_;
	gchar* _tmp10_;
	RygelMediaContainer* _tmp11_;
	RygelMediaContainer* _tmp12_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_ = g_slice_new0 (RygelExternalItemFactoryCreateData);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_async_result = g_simple_async_result_new (NULL, _callback_, _user_data_, rygel_external_item_factory_create);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_external_item_factory_create_data_free);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp0_ = _rygel_external_item_factory_ref0 (self);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->self = _tmp0_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp1_ = id;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->id = _tmp2_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp3_ = type;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp4_ = g_strdup (_tmp3_);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->type = _tmp4_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp5_ = title;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp6_ = g_strdup (_tmp5_);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->title = _tmp6_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp7_ = props;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp8_ = _g_hash_table_ref0 (_tmp7_);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->props = _tmp8_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp9_ = service_name;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp10_ = g_strdup (_tmp9_);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->service_name = _tmp10_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp11_ = parent;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp12_ = _g_object_ref0 (_tmp11_);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->parent = _tmp12_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	rygel_external_item_factory_create_co (_data_);
#line 455 "rygel-external-item-factory.c"
}


RygelMediaItem* rygel_external_item_factory_create_finish (RygelExternalItemFactory* self, GAsyncResult* _res_, GError** error) {
	RygelMediaItem* result;
	RygelExternalItemFactoryCreateData* _data_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		return NULL;
#line 466 "rygel-external-item-factory.c"
	}
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	result = _data_->result;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->result = NULL;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	return result;
#line 476 "rygel-external-item-factory.c"
}


static void rygel_external_item_factory_create_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	RygelExternalItemFactoryCreateData* _data_;
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_ = _user_data_;
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_source_object_ = source_object;
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_res_ = _res_;
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	rygel_external_item_factory_create_co (_data_);
#line 490 "rygel-external-item-factory.c"
}


static gboolean rygel_external_item_factory_create_co (RygelExternalItemFactoryCreateData* _data_) {
#line 32 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	switch (_data_->_state_) {
#line 32 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		case 0:
#line 499 "rygel-external-item-factory.c"
		goto _state_0;
#line 32 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		case 1:
#line 503 "rygel-external-item-factory.c"
		goto _state_1;
#line 32 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		case 2:
#line 507 "rygel-external-item-factory.c"
		goto _state_2;
#line 32 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		case 3:
#line 511 "rygel-external-item-factory.c"
		goto _state_3;
		default:
#line 32 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		g_assert_not_reached ();
#line 516 "rygel-external-item-factory.c"
	}
	_state_0:
#line 41 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp0_ = _data_->type;
#line 41 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp1_ = FALSE;
#line 41 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp1_ = g_str_has_prefix (_data_->_tmp0_, "audio");
#line 41 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (_data_->_tmp1_) {
#line 42 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp2_ = _data_->id;
#line 42 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp3_ = _data_->parent;
#line 42 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp4_ = _data_->title;
#line 42 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp5_ = rygel_audio_item_new (_data_->_tmp2_, _data_->_tmp3_, _data_->_tmp4_, RYGEL_AUDIO_ITEM_UPNP_CLASS);
#line 42 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_g_object_unref0 (_data_->item);
#line 42 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->item = (RygelMediaItem*) _data_->_tmp5_;
#line 44 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp6_ = _data_->item;
#line 44 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp7_ = _data_->props;
#line 44 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp8_ = _data_->service_name;
#line 44 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		rygel_external_item_factory_set_audio_metadata (_data_->self, G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp6_, RYGEL_TYPE_AUDIO_ITEM) ? ((RygelAudioItem*) _data_->_tmp6_) : NULL, _data_->_tmp7_, _data_->_tmp8_, &_data_->_inner_error_);
#line 44 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		if (_data_->_inner_error_ != NULL) {
#line 44 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			if ((_data_->_inner_error_->domain == G_IO_ERROR) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) {
#line 44 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 44 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				g_error_free (_data_->_inner_error_);
#line 44 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_g_object_unref0 (_data_->item);
#line 44 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				if (_data_->_state_ == 0) {
#line 44 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 561 "rygel-external-item-factory.c"
				} else {
#line 44 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					g_simple_async_result_complete (_data_->_async_result);
#line 565 "rygel-external-item-factory.c"
				}
#line 44 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				g_object_unref (_data_->_async_result);
#line 44 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				return FALSE;
#line 571 "rygel-external-item-factory.c"
			} else {
#line 44 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_g_object_unref0 (_data_->item);
#line 44 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-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 44 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				g_clear_error (&_data_->_inner_error_);
#line 44 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				return FALSE;
#line 581 "rygel-external-item-factory.c"
			}
		}
	} else {
#line 45 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp9_ = _data_->type;
#line 45 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp10_ = FALSE;
#line 45 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp10_ = g_str_has_prefix (_data_->_tmp9_, "music");
#line 45 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		if (_data_->_tmp10_) {
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			_data_->_tmp11_ = _data_->id;
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			_data_->_tmp12_ = _data_->parent;
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			_data_->_tmp13_ = _data_->title;
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			_data_->_tmp14_ = rygel_music_item_new (_data_->_tmp11_, _data_->_tmp12_, _data_->_tmp13_, RYGEL_MUSIC_ITEM_UPNP_CLASS);
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			_g_object_unref0 (_data_->item);
#line 46 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			_data_->item = (RygelMediaItem*) _data_->_tmp14_;
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			_data_->_tmp15_ = _data_->item;
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			_data_->_tmp16_ = _data_->props;
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			_data_->_tmp17_ = _data_->service_name;
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			_data_->_state_ = 1;
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			rygel_external_item_factory_set_music_metadata (_data_->self, G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp15_, RYGEL_TYPE_MUSIC_ITEM) ? ((RygelMusicItem*) _data_->_tmp15_) : NULL, _data_->_tmp16_, _data_->_tmp17_, rygel_external_item_factory_create_ready, _data_);
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			return FALSE;
#line 617 "rygel-external-item-factory.c"
			_state_1:
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			rygel_external_item_factory_set_music_metadata_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			if (_data_->_inner_error_ != NULL) {
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				if ((_data_->_inner_error_->domain == G_IO_ERROR) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) {
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					g_error_free (_data_->_inner_error_);
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					_g_object_unref0 (_data_->item);
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					if (_data_->_state_ == 0) {
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 635 "rygel-external-item-factory.c"
					} else {
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						g_simple_async_result_complete (_data_->_async_result);
#line 639 "rygel-external-item-factory.c"
					}
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					g_object_unref (_data_->_async_result);
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					return FALSE;
#line 645 "rygel-external-item-factory.c"
				} else {
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					_g_object_unref0 (_data_->item);
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-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 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					g_clear_error (&_data_->_inner_error_);
#line 48 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					return FALSE;
#line 655 "rygel-external-item-factory.c"
				}
			}
		} else {
#line 51 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			_data_->_tmp18_ = _data_->type;
#line 51 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			_data_->_tmp19_ = FALSE;
#line 51 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			_data_->_tmp19_ = g_str_has_prefix (_data_->_tmp18_, "video");
#line 51 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			if (_data_->_tmp19_) {
#line 52 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_data_->_tmp20_ = _data_->id;
#line 52 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_data_->_tmp21_ = _data_->parent;
#line 52 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_data_->_tmp22_ = _data_->title;
#line 52 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_data_->_tmp23_ = rygel_video_item_new (_data_->_tmp20_, _data_->_tmp21_, _data_->_tmp22_, RYGEL_VIDEO_ITEM_UPNP_CLASS);
#line 52 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_g_object_unref0 (_data_->item);
#line 52 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_data_->item = (RygelMediaItem*) _data_->_tmp23_;
#line 54 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_data_->_tmp24_ = _data_->item;
#line 54 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_data_->_tmp25_ = _data_->props;
#line 54 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_data_->_tmp26_ = _data_->service_name;
#line 54 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_data_->_state_ = 2;
#line 54 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				rygel_external_item_factory_set_video_metadata (_data_->self, G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp24_, RYGEL_TYPE_VIDEO_ITEM) ? ((RygelVideoItem*) _data_->_tmp24_) : NULL, _data_->_tmp25_, _data_->_tmp26_, rygel_external_item_factory_create_ready, _data_);
#line 54 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				return FALSE;
#line 691 "rygel-external-item-factory.c"
				_state_2:
#line 54 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				rygel_external_item_factory_set_video_metadata_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 54 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				if (_data_->_inner_error_ != NULL) {
#line 54 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					if ((_data_->_inner_error_->domain == G_IO_ERROR) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) {
#line 54 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 54 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						g_error_free (_data_->_inner_error_);
#line 54 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						_g_object_unref0 (_data_->item);
#line 54 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						if (_data_->_state_ == 0) {
#line 54 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
							g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 709 "rygel-external-item-factory.c"
						} else {
#line 54 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
							g_simple_async_result_complete (_data_->_async_result);
#line 713 "rygel-external-item-factory.c"
						}
#line 54 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						g_object_unref (_data_->_async_result);
#line 54 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						return FALSE;
#line 719 "rygel-external-item-factory.c"
					} else {
#line 54 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						_g_object_unref0 (_data_->item);
#line 54 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-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 54 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						g_clear_error (&_data_->_inner_error_);
#line 54 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						return FALSE;
#line 729 "rygel-external-item-factory.c"
					}
				}
			} else {
#line 58 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_data_->_tmp27_ = _data_->id;
#line 58 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_data_->_tmp28_ = _data_->parent;
#line 58 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_data_->_tmp29_ = _data_->title;
#line 58 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_data_->_tmp30_ = rygel_image_item_new (_data_->_tmp27_, _data_->_tmp28_, _data_->_tmp29_, RYGEL_IMAGE_ITEM_UPNP_CLASS);
#line 58 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_g_object_unref0 (_data_->item);
#line 58 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_data_->item = (RygelMediaItem*) _data_->_tmp30_;
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_data_->_tmp31_ = _data_->item;
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_data_->_tmp32_ = _data_->props;
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_data_->_tmp33_ = _data_->service_name;
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_data_->_state_ = 3;
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				rygel_external_item_factory_set_visual_metadata (_data_->self, G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp31_, RYGEL_TYPE_VISUAL_ITEM) ? ((RygelVisualItem*) _data_->_tmp31_) : NULL, _data_->_tmp32_, _data_->_tmp33_, rygel_external_item_factory_create_ready, _data_);
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				return FALSE;
#line 757 "rygel-external-item-factory.c"
				_state_3:
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				rygel_external_item_factory_set_visual_metadata_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				if (_data_->_inner_error_ != NULL) {
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					if ((_data_->_inner_error_->domain == G_IO_ERROR) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) {
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						g_error_free (_data_->_inner_error_);
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						_g_object_unref0 (_data_->item);
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						if (_data_->_state_ == 0) {
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
							g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 775 "rygel-external-item-factory.c"
						} else {
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
							g_simple_async_result_complete (_data_->_async_result);
#line 779 "rygel-external-item-factory.c"
						}
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						g_object_unref (_data_->_async_result);
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						return FALSE;
#line 785 "rygel-external-item-factory.c"
					} else {
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						_g_object_unref0 (_data_->item);
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-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 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						g_clear_error (&_data_->_inner_error_);
#line 60 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						return FALSE;
#line 795 "rygel-external-item-factory.c"
					}
				}
			}
		}
	}
#line 65 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp34_ = _data_->item;
#line 65 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp35_ = _data_->props;
#line 65 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp36_ = _data_->service_name;
#line 65 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	rygel_external_item_factory_set_generic_metadata (_data_->self, _data_->_tmp34_, _data_->_tmp35_, _data_->_tmp36_);
#line 67 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp37_ = _data_->parent;
#line 67 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (_data_->_tmp37_, RYGEL_EXTERNAL_TYPE_DUMMY_CONTAINER)) {
#line 68 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp38_ = _data_->item;
#line 68 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp39_ = _data_->parent;
#line 68 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		rygel_media_object_set_parent_ref ((RygelMediaObject*) _data_->_tmp38_, _data_->_tmp39_);
#line 819 "rygel-external-item-factory.c"
	}
#line 71 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->result = _data_->item;
#line 71 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (_data_->_state_ == 0) {
#line 71 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 827 "rygel-external-item-factory.c"
	} else {
#line 71 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 831 "rygel-external-item-factory.c"
	}
#line 71 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_object_unref (_data_->_async_result);
#line 71 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	return FALSE;
#line 32 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_object_unref0 (_data_->item);
#line 32 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (_data_->_state_ == 0) {
#line 32 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 843 "rygel-external-item-factory.c"
	} else {
#line 32 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 847 "rygel-external-item-factory.c"
	}
#line 32 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_object_unref (_data_->_async_result);
#line 32 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	return FALSE;
#line 853 "rygel-external-item-factory.c"
}


static void rygel_external_item_factory_set_music_metadata_data_free (gpointer _data) {
	RygelExternalItemFactorySetMusicMetadataData* _data_;
	_data_ = _data;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_object_unref0 (_data_->music);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_hash_table_unref0 (_data_->props);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_free0 (_data_->service_name);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_rygel_external_item_factory_unref0 (_data_->self);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_slice_free (RygelExternalItemFactorySetMusicMetadataData, _data_);
#line 870 "rygel-external-item-factory.c"
}


static void rygel_external_item_factory_set_music_metadata (RygelExternalItemFactory* self, RygelMusicItem* music, GHashTable* props, const gchar* service_name, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelExternalItemFactorySetMusicMetadataData* _data_;
	RygelExternalItemFactory* _tmp0_;
	RygelMusicItem* _tmp1_;
	RygelMusicItem* _tmp2_;
	GHashTable* _tmp3_;
	GHashTable* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_ = g_slice_new0 (RygelExternalItemFactorySetMusicMetadataData);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_async_result = g_simple_async_result_new (NULL, _callback_, _user_data_, rygel_external_item_factory_set_music_metadata);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_external_item_factory_set_music_metadata_data_free);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp0_ = _rygel_external_item_factory_ref0 (self);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->self = _tmp0_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp1_ = music;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->music = _tmp2_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp3_ = props;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp4_ = _g_hash_table_ref0 (_tmp3_);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->props = _tmp4_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp5_ = service_name;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp6_ = g_strdup (_tmp5_);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->service_name = _tmp6_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	rygel_external_item_factory_set_music_metadata_co (_data_);
#line 913 "rygel-external-item-factory.c"
}


static void rygel_external_item_factory_set_music_metadata_finish (RygelExternalItemFactory* self, GAsyncResult* _res_, GError** error) {
	RygelExternalItemFactorySetMusicMetadataData* _data_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		return;
#line 923 "rygel-external-item-factory.c"
	}
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 927 "rygel-external-item-factory.c"
}


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


static gchar* _variant_get13 (GVariant* value) {
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	return g_variant_dup_string (value, NULL);
#line 941 "rygel-external-item-factory.c"
}


static void rygel_external_item_factory_set_music_metadata_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	RygelExternalItemFactorySetMusicMetadataData* _data_;
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_ = _user_data_;
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_source_object_ = source_object;
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_res_ = _res_;
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	rygel_external_item_factory_set_music_metadata_co (_data_);
#line 955 "rygel-external-item-factory.c"
}


static gboolean rygel_external_item_factory_set_music_metadata_co (RygelExternalItemFactorySetMusicMetadataData* _data_) {
#line 74 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	switch (_data_->_state_) {
#line 74 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		case 0:
#line 964 "rygel-external-item-factory.c"
		goto _state_0;
#line 74 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		case 1:
#line 968 "rygel-external-item-factory.c"
		goto _state_1;
		default:
#line 74 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		g_assert_not_reached ();
#line 973 "rygel-external-item-factory.c"
	}
	_state_0:
#line 79 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp0_ = _data_->music;
#line 79 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp1_ = _data_->props;
#line 79 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp2_ = NULL;
#line 79 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp2_ = rygel_external_item_factory_get_string (_data_->self, _data_->_tmp1_, "Artist");
#line 79 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_free0 (_data_->_tmp0_->artist);
#line 79 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp0_->artist = _data_->_tmp2_;
#line 80 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp3_ = _data_->music;
#line 80 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp4_ = _data_->props;
#line 80 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp5_ = NULL;
#line 80 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp5_ = rygel_external_item_factory_get_string (_data_->self, _data_->_tmp4_, "Album");
#line 80 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_free0 (_data_->_tmp3_->album);
#line 80 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp3_->album = _data_->_tmp5_;
#line 81 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp6_ = _data_->music;
#line 81 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp7_ = _data_->props;
#line 81 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp8_ = NULL;
#line 81 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp8_ = rygel_external_item_factory_get_string (_data_->self, _data_->_tmp7_, "Genre");
#line 81 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_free0 (_data_->_tmp6_->genre);
#line 81 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp6_->genre = _data_->_tmp8_;
#line 82 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp9_ = _data_->music;
#line 82 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp10_ = _data_->props;
#line 82 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp11_ = 0;
#line 82 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp11_ = rygel_external_item_factory_get_int (_data_->self, _data_->_tmp10_, "TrackNumber");
#line 82 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp9_->track_number = _data_->_tmp11_;
#line 84 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp12_ = _data_->props;
#line 84 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp13_ = NULL;
#line 84 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp13_ = g_hash_table_lookup (_data_->_tmp12_, "AlbumArt");
#line 84 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp14_ = _g_variant_ref0 ((GVariant*) _data_->_tmp13_);
#line 84 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->value = _data_->_tmp14_;
#line 85 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp15_ = _data_->value;
#line 85 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (_data_->_tmp15_ != NULL) {
#line 86 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp16_ = rygel_external_album_art_factory_new ();
#line 86 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->cover_factory = _data_->_tmp16_;
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp17_ = _data_->cover_factory;
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp18_ = _data_->value;
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp19_ = _variant_get13 (_data_->_tmp18_);
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp20_ = _data_->_tmp19_;
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp21_ = _data_->service_name;
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_state_ = 1;
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		rygel_external_album_art_factory_create (_data_->_tmp17_, _data_->_tmp20_, _data_->_tmp21_, rygel_external_item_factory_set_music_metadata_ready, _data_);
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		return FALSE;
#line 1056 "rygel-external-item-factory.c"
		_state_1:
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp22_ = NULL;
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp22_ = rygel_external_album_art_factory_create_finish (_data_->_tmp17_, _data_->_res_, &_data_->_inner_error_);
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp23_ = _data_->_tmp22_;
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_g_free0 (_data_->_tmp20_);
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp24_ = _data_->_tmp23_;
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		if (_data_->_inner_error_ != NULL) {
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			if ((_data_->_inner_error_->domain == G_IO_ERROR) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) {
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				g_error_free (_data_->_inner_error_);
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_rygel_external_album_art_factory_unref0 (_data_->cover_factory);
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_g_variant_unref0 (_data_->value);
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				if (_data_->_state_ == 0) {
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1084 "rygel-external-item-factory.c"
				} else {
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					g_simple_async_result_complete (_data_->_async_result);
#line 1088 "rygel-external-item-factory.c"
				}
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				g_object_unref (_data_->_async_result);
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				return FALSE;
#line 1094 "rygel-external-item-factory.c"
			} else {
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_rygel_external_album_art_factory_unref0 (_data_->cover_factory);
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_g_variant_unref0 (_data_->value);
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-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 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				g_clear_error (&_data_->_inner_error_);
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				return FALSE;
#line 1106 "rygel-external-item-factory.c"
			}
		}
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp25_ = _data_->music;
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_rygel_icon_info_unref0 (_data_->_tmp25_->album_art);
#line 88 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp25_->album_art = _data_->_tmp24_;
#line 85 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_rygel_external_album_art_factory_unref0 (_data_->cover_factory);
#line 1117 "rygel-external-item-factory.c"
	}
#line 92 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp26_ = _data_->music;
#line 92 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp27_ = _data_->props;
#line 92 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp28_ = _data_->service_name;
#line 92 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	rygel_external_item_factory_set_audio_metadata (_data_->self, (RygelAudioItem*) _data_->_tmp26_, _data_->_tmp27_, _data_->_tmp28_, &_data_->_inner_error_);
#line 92 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (_data_->_inner_error_ != NULL) {
#line 92 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		if ((_data_->_inner_error_->domain == G_IO_ERROR) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) {
#line 92 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 92 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			g_error_free (_data_->_inner_error_);
#line 92 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			_g_variant_unref0 (_data_->value);
#line 92 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			if (_data_->_state_ == 0) {
#line 92 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1141 "rygel-external-item-factory.c"
			} else {
#line 92 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 1145 "rygel-external-item-factory.c"
			}
#line 92 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			g_object_unref (_data_->_async_result);
#line 92 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			return FALSE;
#line 1151 "rygel-external-item-factory.c"
		} else {
#line 92 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			_g_variant_unref0 (_data_->value);
#line 92 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-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 92 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			g_clear_error (&_data_->_inner_error_);
#line 92 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			return FALSE;
#line 1161 "rygel-external-item-factory.c"
		}
	}
#line 74 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_variant_unref0 (_data_->value);
#line 74 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (_data_->_state_ == 0) {
#line 74 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1170 "rygel-external-item-factory.c"
	} else {
#line 74 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1174 "rygel-external-item-factory.c"
	}
#line 74 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_object_unref (_data_->_async_result);
#line 74 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	return FALSE;
#line 1180 "rygel-external-item-factory.c"
}


static void rygel_external_item_factory_set_audio_metadata (RygelExternalItemFactory* self, RygelAudioItem* audio, GHashTable* props, const gchar* service_name, GError** error) {
	RygelAudioItem* _tmp0_;
	GHashTable* _tmp1_;
	gint _tmp2_ = 0;
	RygelAudioItem* _tmp3_;
	GHashTable* _tmp4_;
	gint _tmp5_ = 0;
	RygelAudioItem* _tmp6_;
	GHashTable* _tmp7_;
	gint _tmp8_ = 0;
	RygelAudioItem* _tmp9_;
	GHashTable* _tmp10_;
	gint _tmp11_ = 0;
#line 95 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_return_if_fail (self != NULL);
#line 95 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_return_if_fail (audio != NULL);
#line 95 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_return_if_fail (props != NULL);
#line 95 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_return_if_fail (service_name != NULL);
#line 99 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp0_ = audio;
#line 99 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp1_ = props;
#line 99 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp2_ = rygel_external_item_factory_get_int (self, _tmp1_, "Duration");
#line 99 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp0_->duration = (glong) _tmp2_;
#line 100 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp3_ = audio;
#line 100 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp4_ = props;
#line 100 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp5_ = rygel_external_item_factory_get_int (self, _tmp4_, "Bitrate");
#line 100 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp3_->bitrate = _tmp5_;
#line 101 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp6_ = audio;
#line 101 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp7_ = props;
#line 101 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp8_ = rygel_external_item_factory_get_int (self, _tmp7_, "SampleRate");
#line 101 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp6_->sample_freq = _tmp8_;
#line 102 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp9_ = audio;
#line 102 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp10_ = props;
#line 102 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp11_ = rygel_external_item_factory_get_int (self, _tmp10_, "BitsPerSample");
#line 102 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp9_->bits_per_sample = _tmp11_;
#line 1237 "rygel-external-item-factory.c"
}


static void rygel_external_item_factory_set_visual_metadata_data_free (gpointer _data) {
	RygelExternalItemFactorySetVisualMetadataData* _data_;
	_data_ = _data;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_object_unref0 (_data_->visual);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_hash_table_unref0 (_data_->props);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_free0 (_data_->service_name);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_rygel_external_item_factory_unref0 (_data_->self);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_slice_free (RygelExternalItemFactorySetVisualMetadataData, _data_);
#line 1254 "rygel-external-item-factory.c"
}


static void rygel_external_item_factory_set_visual_metadata (RygelExternalItemFactory* self, RygelVisualItem* visual, GHashTable* props, const gchar* service_name, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelExternalItemFactorySetVisualMetadataData* _data_;
	RygelExternalItemFactory* _tmp0_;
	RygelVisualItem* _tmp1_;
	RygelVisualItem* _tmp2_;
	GHashTable* _tmp3_;
	GHashTable* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_ = g_slice_new0 (RygelExternalItemFactorySetVisualMetadataData);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_async_result = g_simple_async_result_new (NULL, _callback_, _user_data_, rygel_external_item_factory_set_visual_metadata);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_external_item_factory_set_visual_metadata_data_free);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp0_ = _rygel_external_item_factory_ref0 (self);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->self = _tmp0_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp1_ = visual;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->visual = _tmp2_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp3_ = props;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp4_ = _g_hash_table_ref0 (_tmp3_);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->props = _tmp4_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp5_ = service_name;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp6_ = g_strdup (_tmp5_);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->service_name = _tmp6_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	rygel_external_item_factory_set_visual_metadata_co (_data_);
#line 1297 "rygel-external-item-factory.c"
}


static void rygel_external_item_factory_set_visual_metadata_finish (RygelExternalItemFactory* self, GAsyncResult* _res_, GError** error) {
	RygelExternalItemFactorySetVisualMetadataData* _data_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		return;
#line 1307 "rygel-external-item-factory.c"
	}
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 1311 "rygel-external-item-factory.c"
}


static gchar* _variant_get14 (GVariant* value) {
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	return g_variant_dup_string (value, NULL);
#line 1318 "rygel-external-item-factory.c"
}


static void rygel_external_item_factory_set_visual_metadata_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	RygelExternalItemFactorySetVisualMetadataData* _data_;
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_ = _user_data_;
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_source_object_ = source_object;
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_res_ = _res_;
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	rygel_external_item_factory_set_visual_metadata_co (_data_);
#line 1332 "rygel-external-item-factory.c"
}


static gboolean rygel_external_item_factory_set_visual_metadata_co (RygelExternalItemFactorySetVisualMetadataData* _data_) {
#line 105 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	switch (_data_->_state_) {
#line 105 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		case 0:
#line 1341 "rygel-external-item-factory.c"
		goto _state_0;
#line 105 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		case 1:
#line 1345 "rygel-external-item-factory.c"
		goto _state_1;
		default:
#line 105 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		g_assert_not_reached ();
#line 1350 "rygel-external-item-factory.c"
	}
	_state_0:
#line 110 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp0_ = _data_->visual;
#line 110 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp1_ = _data_->props;
#line 110 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp2_ = 0;
#line 110 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp2_ = rygel_external_item_factory_get_int (_data_->self, _data_->_tmp1_, "Width");
#line 110 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	rygel_visual_item_set_width (_data_->_tmp0_, _data_->_tmp2_);
#line 111 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp3_ = _data_->visual;
#line 111 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp4_ = _data_->props;
#line 111 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp5_ = 0;
#line 111 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp5_ = rygel_external_item_factory_get_int (_data_->self, _data_->_tmp4_, "Height");
#line 111 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	rygel_visual_item_set_height (_data_->_tmp3_, _data_->_tmp5_);
#line 112 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp6_ = _data_->visual;
#line 112 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp7_ = _data_->props;
#line 112 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp8_ = 0;
#line 112 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp8_ = rygel_external_item_factory_get_int (_data_->self, _data_->_tmp7_, "ColorDepth");
#line 112 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	rygel_visual_item_set_color_depth (_data_->_tmp6_, _data_->_tmp8_);
#line 113 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp9_ = _data_->visual;
#line 113 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp10_ = _data_->props;
#line 113 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp11_ = 0;
#line 113 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp11_ = rygel_external_item_factory_get_int (_data_->self, _data_->_tmp10_, "PixelWidth");
#line 113 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	rygel_visual_item_set_pixel_width (_data_->_tmp9_, _data_->_tmp11_);
#line 114 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp12_ = _data_->visual;
#line 114 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp13_ = _data_->props;
#line 114 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp14_ = 0;
#line 114 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp14_ = rygel_external_item_factory_get_int (_data_->self, _data_->_tmp13_, "PixelHeight");
#line 114 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	rygel_visual_item_set_pixel_height (_data_->_tmp12_, _data_->_tmp14_);
#line 116 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp15_ = _data_->props;
#line 116 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp16_ = NULL;
#line 116 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp16_ = g_hash_table_lookup (_data_->_tmp15_, "Thumbnail");
#line 116 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp17_ = _g_variant_ref0 ((GVariant*) _data_->_tmp16_);
#line 116 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->value = _data_->_tmp17_;
#line 117 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp18_ = _data_->value;
#line 117 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (_data_->_tmp18_ != NULL) {
#line 118 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp19_ = rygel_external_thumbnail_factory_new ();
#line 118 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->factory = _data_->_tmp19_;
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp20_ = _data_->factory;
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp21_ = _data_->value;
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp22_ = _variant_get14 (_data_->_tmp21_);
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp23_ = _data_->_tmp22_;
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp24_ = _data_->service_name;
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_state_ = 1;
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		rygel_external_thumbnail_factory_create (_data_->_tmp20_, _data_->_tmp23_, _data_->_tmp24_, rygel_external_item_factory_set_visual_metadata_ready, _data_);
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		return FALSE;
#line 1437 "rygel-external-item-factory.c"
		_state_1:
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp25_ = NULL;
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp25_ = rygel_external_thumbnail_factory_create_finish (_data_->_tmp20_, _data_->_res_, &_data_->_inner_error_);
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp26_ = _data_->_tmp25_;
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_g_free0 (_data_->_tmp23_);
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->thumbnail = _data_->_tmp26_;
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		if (_data_->_inner_error_ != NULL) {
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			if ((_data_->_inner_error_->domain == G_IO_ERROR) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) {
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				g_error_free (_data_->_inner_error_);
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_rygel_external_thumbnail_factory_unref0 (_data_->factory);
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_g_variant_unref0 (_data_->value);
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				if (_data_->_state_ == 0) {
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1465 "rygel-external-item-factory.c"
				} else {
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					g_simple_async_result_complete (_data_->_async_result);
#line 1469 "rygel-external-item-factory.c"
				}
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				g_object_unref (_data_->_async_result);
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				return FALSE;
#line 1475 "rygel-external-item-factory.c"
			} else {
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_rygel_external_thumbnail_factory_unref0 (_data_->factory);
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_g_variant_unref0 (_data_->value);
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-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 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				g_clear_error (&_data_->_inner_error_);
#line 119 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				return FALSE;
#line 1487 "rygel-external-item-factory.c"
			}
		}
#line 121 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp27_ = _data_->visual;
#line 121 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp28_ = rygel_visual_item_get_thumbnails (_data_->_tmp27_);
#line 121 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp29_ = _data_->_tmp28_;
#line 121 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_data_->_tmp30_ = _data_->thumbnail;
#line 121 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp29_, _data_->_tmp30_);
#line 117 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_rygel_icon_info_unref0 (_data_->thumbnail);
#line 117 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_rygel_external_thumbnail_factory_unref0 (_data_->factory);
#line 1504 "rygel-external-item-factory.c"
	}
#line 105 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_variant_unref0 (_data_->value);
#line 105 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (_data_->_state_ == 0) {
#line 105 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1512 "rygel-external-item-factory.c"
	} else {
#line 105 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1516 "rygel-external-item-factory.c"
	}
#line 105 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_object_unref (_data_->_async_result);
#line 105 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	return FALSE;
#line 1522 "rygel-external-item-factory.c"
}


static void rygel_external_item_factory_set_video_metadata_data_free (gpointer _data) {
	RygelExternalItemFactorySetVideoMetadataData* _data_;
	_data_ = _data;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_object_unref0 (_data_->video);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_hash_table_unref0 (_data_->props);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_free0 (_data_->service_name);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_rygel_external_item_factory_unref0 (_data_->self);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_slice_free (RygelExternalItemFactorySetVideoMetadataData, _data_);
#line 1539 "rygel-external-item-factory.c"
}


static void rygel_external_item_factory_set_video_metadata (RygelExternalItemFactory* self, RygelVideoItem* video, GHashTable* props, const gchar* service_name, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelExternalItemFactorySetVideoMetadataData* _data_;
	RygelExternalItemFactory* _tmp0_;
	RygelVideoItem* _tmp1_;
	RygelVideoItem* _tmp2_;
	GHashTable* _tmp3_;
	GHashTable* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_ = g_slice_new0 (RygelExternalItemFactorySetVideoMetadataData);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_async_result = g_simple_async_result_new (NULL, _callback_, _user_data_, rygel_external_item_factory_set_video_metadata);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_external_item_factory_set_video_metadata_data_free);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp0_ = _rygel_external_item_factory_ref0 (self);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->self = _tmp0_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp1_ = video;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->video = _tmp2_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp3_ = props;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp4_ = _g_hash_table_ref0 (_tmp3_);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->props = _tmp4_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp5_ = service_name;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp6_ = g_strdup (_tmp5_);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->service_name = _tmp6_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	rygel_external_item_factory_set_video_metadata_co (_data_);
#line 1582 "rygel-external-item-factory.c"
}


static void rygel_external_item_factory_set_video_metadata_finish (RygelExternalItemFactory* self, GAsyncResult* _res_, GError** error) {
	RygelExternalItemFactorySetVideoMetadataData* _data_;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		return;
#line 1592 "rygel-external-item-factory.c"
	}
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 1596 "rygel-external-item-factory.c"
}


static void rygel_external_item_factory_set_video_metadata_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	RygelExternalItemFactorySetVideoMetadataData* _data_;
#line 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_ = _user_data_;
#line 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_source_object_ = source_object;
#line 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_res_ = _res_;
#line 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	rygel_external_item_factory_set_video_metadata_co (_data_);
#line 1610 "rygel-external-item-factory.c"
}


static gboolean rygel_external_item_factory_set_video_metadata_co (RygelExternalItemFactorySetVideoMetadataData* _data_) {
#line 125 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	switch (_data_->_state_) {
#line 125 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		case 0:
#line 1619 "rygel-external-item-factory.c"
		goto _state_0;
#line 125 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		case 1:
#line 1623 "rygel-external-item-factory.c"
		goto _state_1;
		default:
#line 125 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		g_assert_not_reached ();
#line 1628 "rygel-external-item-factory.c"
	}
	_state_0:
#line 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp0_ = _data_->video;
#line 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp1_ = _data_->props;
#line 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp2_ = _data_->service_name;
#line 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_state_ = 1;
#line 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	rygel_external_item_factory_set_visual_metadata (_data_->self, (RygelVisualItem*) _data_->_tmp0_, _data_->_tmp1_, _data_->_tmp2_, rygel_external_item_factory_set_video_metadata_ready, _data_);
#line 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	return FALSE;
#line 1643 "rygel-external-item-factory.c"
	_state_1:
#line 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	rygel_external_item_factory_set_visual_metadata_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
#line 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (_data_->_inner_error_ != NULL) {
#line 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		if ((_data_->_inner_error_->domain == G_IO_ERROR) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) {
#line 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			g_error_free (_data_->_inner_error_);
#line 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			if (_data_->_state_ == 0) {
#line 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1659 "rygel-external-item-factory.c"
			} else {
#line 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 1663 "rygel-external-item-factory.c"
			}
#line 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			g_object_unref (_data_->_async_result);
#line 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			return FALSE;
#line 1669 "rygel-external-item-factory.c"
		} else {
#line 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-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 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			g_clear_error (&_data_->_inner_error_);
#line 130 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			return FALSE;
#line 1677 "rygel-external-item-factory.c"
		}
	}
#line 131 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp3_ = _data_->video;
#line 131 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp4_ = _data_->props;
#line 131 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_data_->_tmp5_ = _data_->service_name;
#line 131 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	rygel_external_item_factory_set_audio_metadata (_data_->self, (RygelAudioItem*) _data_->_tmp3_, _data_->_tmp4_, _data_->_tmp5_, &_data_->_inner_error_);
#line 131 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (_data_->_inner_error_ != NULL) {
#line 131 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		if ((_data_->_inner_error_->domain == G_IO_ERROR) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) {
#line 131 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 131 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			g_error_free (_data_->_inner_error_);
#line 131 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			if (_data_->_state_ == 0) {
#line 131 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1700 "rygel-external-item-factory.c"
			} else {
#line 131 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				g_simple_async_result_complete (_data_->_async_result);
#line 1704 "rygel-external-item-factory.c"
			}
#line 131 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			g_object_unref (_data_->_async_result);
#line 131 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			return FALSE;
#line 1710 "rygel-external-item-factory.c"
		} else {
#line 131 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-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 131 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			g_clear_error (&_data_->_inner_error_);
#line 131 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			return FALSE;
#line 1718 "rygel-external-item-factory.c"
		}
	}
#line 125 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (_data_->_state_ == 0) {
#line 125 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1725 "rygel-external-item-factory.c"
	} else {
#line 125 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1729 "rygel-external-item-factory.c"
	}
#line 125 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_object_unref (_data_->_async_result);
#line 125 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	return FALSE;
#line 1735 "rygel-external-item-factory.c"
}


static gint64 _variant_get15 (GVariant* value) {
#line 157 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	return g_variant_get_int64 (value);
#line 1742 "rygel-external-item-factory.c"
}


static void rygel_external_item_factory_set_generic_metadata (RygelExternalItemFactory* self, RygelMediaItem* item, GHashTable* props, const gchar* service_name) {
	RygelMediaItem* _tmp0_;
	GHashTable* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_ = NULL;
	GHashTable* _tmp4_;
	const gchar* _tmp5_;
	gint _tmp6_ = 0;
	gchar** _tmp7_ = NULL;
	gchar** uris;
	gint uris_length1;
	gint _uris_size_;
	gchar** _tmp8_;
	gint _tmp8__length1;
	RygelMediaItem* _tmp19_;
	GHashTable* _tmp20_;
	gchar* _tmp21_ = NULL;
	GHashTable* _tmp22_;
	gconstpointer _tmp23_ = NULL;
	GVariant* _tmp24_;
	GVariant* value;
	GVariant* _tmp25_;
	RygelMediaItem* _tmp29_;
	GHashTable* _tmp30_;
	gchar* _tmp31_ = NULL;
#line 134 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_return_if_fail (self != NULL);
#line 134 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_return_if_fail (item != NULL);
#line 134 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_return_if_fail (props != NULL);
#line 134 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_return_if_fail (service_name != NULL);
#line 137 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp0_ = item;
#line 137 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp1_ = props;
#line 137 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp2_ = service_name;
#line 137 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp3_ = rygel_external_get_mandatory_string_value (_tmp1_, "MIMEType", "image/jpeg", _tmp2_);
#line 137 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_free0 (_tmp0_->mime_type);
#line 137 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp0_->mime_type = _tmp3_;
#line 141 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp4_ = props;
#line 141 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp5_ = service_name;
#line 141 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp7_ = rygel_external_get_mandatory_string_list_value (_tmp4_, "URLs", NULL, 0, _tmp5_, &_tmp6_);
#line 141 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	uris = _tmp7_;
#line 141 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	uris_length1 = _tmp6_;
#line 141 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_uris_size_ = uris_length1;
#line 145 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp8_ = uris;
#line 145 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp8__length1 = uris_length1;
#line 145 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (_tmp8_ != NULL) {
#line 1809 "rygel-external-item-factory.c"
		{
			gint i;
#line 146 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			i = 0;
#line 1814 "rygel-external-item-factory.c"
			{
				gboolean _tmp9_;
#line 146 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				_tmp9_ = TRUE;
#line 146 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
				while (TRUE) {
#line 1821 "rygel-external-item-factory.c"
					gboolean _tmp10_;
					gchar** _tmp12_;
					gint _tmp12__length1;
					gint _tmp13_;
					const gchar* _tmp14_;
					RygelMediaItem* _tmp15_;
					gchar** _tmp16_;
					gint _tmp16__length1;
					gint _tmp17_;
					const gchar* _tmp18_;
#line 146 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					_tmp10_ = _tmp9_;
#line 146 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					if (!_tmp10_) {
#line 1836 "rygel-external-item-factory.c"
						gint _tmp11_;
#line 146 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						_tmp11_ = i;
#line 146 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						i = _tmp11_ + 1;
#line 1842 "rygel-external-item-factory.c"
					}
#line 146 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					_tmp9_ = FALSE;
#line 146 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					_tmp12_ = uris;
#line 146 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					_tmp12__length1 = uris_length1;
#line 146 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					_tmp13_ = i;
#line 146 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					_tmp14_ = _tmp12_[_tmp13_];
#line 146 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					if (!(_tmp14_ != NULL)) {
#line 146 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
						break;
#line 1858 "rygel-external-item-factory.c"
					}
#line 147 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					_tmp15_ = item;
#line 147 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					_tmp16_ = uris;
#line 147 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					_tmp16__length1 = uris_length1;
#line 147 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					_tmp17_ = i;
#line 147 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					_tmp18_ = _tmp16_[_tmp17_];
#line 147 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
					rygel_media_item_add_uri (_tmp15_, _tmp18_);
#line 1872 "rygel-external-item-factory.c"
				}
			}
		}
	}
#line 153 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp19_ = item;
#line 153 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp20_ = props;
#line 153 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp21_ = rygel_external_item_factory_get_string (self, _tmp20_, "DLNAProfile");
#line 153 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_free0 (_tmp19_->dlna_profile);
#line 153 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp19_->dlna_profile = _tmp21_;
#line 155 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp22_ = props;
#line 155 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp23_ = g_hash_table_lookup (_tmp22_, "Size");
#line 155 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp24_ = _g_variant_ref0 ((GVariant*) _tmp23_);
#line 155 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	value = _tmp24_;
#line 156 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp25_ = value;
#line 156 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (_tmp25_ != NULL) {
#line 1899 "rygel-external-item-factory.c"
		RygelMediaItem* _tmp26_;
		GVariant* _tmp27_;
		gint64 _tmp28_;
#line 157 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_tmp26_ = item;
#line 157 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_tmp27_ = value;
#line 157 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_tmp28_ = _variant_get15 (_tmp27_);
#line 157 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		rygel_media_item_set_size (_tmp26_, _tmp28_);
#line 1911 "rygel-external-item-factory.c"
	}
#line 160 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp29_ = item;
#line 160 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp30_ = props;
#line 160 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp31_ = rygel_external_item_factory_get_string (self, _tmp30_, "Date");
#line 160 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_free0 (_tmp29_->date);
#line 160 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp29_->date = _tmp31_;
#line 134 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_variant_unref0 (value);
#line 134 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	uris = (_vala_array_free (uris, uris_length1, (GDestroyNotify) g_free), NULL);
#line 1927 "rygel-external-item-factory.c"
}


static gchar* _variant_get16 (GVariant* value) {
#line 167 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	return g_variant_dup_string (value, NULL);
#line 1934 "rygel-external-item-factory.c"
}


static gchar* rygel_external_item_factory_get_string (RygelExternalItemFactory* self, GHashTable* props, const gchar* prop) {
	gchar* result = NULL;
	GHashTable* _tmp0_;
	const gchar* _tmp1_;
	gconstpointer _tmp2_ = NULL;
	GVariant* _tmp3_;
	GVariant* value;
	GVariant* _tmp4_;
#line 163 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 163 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_return_val_if_fail (props != NULL, NULL);
#line 163 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_return_val_if_fail (prop != NULL, NULL);
#line 164 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp0_ = props;
#line 164 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp1_ = prop;
#line 164 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp2_ = g_hash_table_lookup (_tmp0_, _tmp1_);
#line 164 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp3_ = _g_variant_ref0 ((GVariant*) _tmp2_);
#line 164 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	value = _tmp3_;
#line 166 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp4_ = value;
#line 166 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (_tmp4_ != NULL) {
#line 1966 "rygel-external-item-factory.c"
		GVariant* _tmp5_;
		gchar* _tmp6_;
#line 167 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_tmp5_ = value;
#line 167 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_tmp6_ = _variant_get16 (_tmp5_);
#line 167 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		result = _tmp6_;
#line 167 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_g_variant_unref0 (value);
#line 167 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		return result;
#line 1979 "rygel-external-item-factory.c"
	} else {
#line 169 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		result = NULL;
#line 169 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_g_variant_unref0 (value);
#line 169 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		return result;
#line 1987 "rygel-external-item-factory.c"
	}
#line 163 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_variant_unref0 (value);
#line 1991 "rygel-external-item-factory.c"
}


static gint _variant_get17 (GVariant* value) {
#line 177 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	return g_variant_get_int32 (value);
#line 1998 "rygel-external-item-factory.c"
}


static gint rygel_external_item_factory_get_int (RygelExternalItemFactory* self, GHashTable* props, const gchar* prop) {
	gint result = 0;
	GHashTable* _tmp0_;
	const gchar* _tmp1_;
	gconstpointer _tmp2_ = NULL;
	GVariant* _tmp3_;
	GVariant* value;
	GVariant* _tmp4_;
#line 173 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 173 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_return_val_if_fail (props != NULL, 0);
#line 173 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_return_val_if_fail (prop != NULL, 0);
#line 174 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp0_ = props;
#line 174 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp1_ = prop;
#line 174 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp2_ = g_hash_table_lookup (_tmp0_, _tmp1_);
#line 174 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp3_ = _g_variant_ref0 ((GVariant*) _tmp2_);
#line 174 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	value = _tmp3_;
#line 176 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_tmp4_ = value;
#line 176 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (_tmp4_ != NULL) {
#line 2030 "rygel-external-item-factory.c"
		GVariant* _tmp5_;
		gint _tmp6_;
#line 177 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_tmp5_ = value;
#line 177 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_tmp6_ = _variant_get17 (_tmp5_);
#line 177 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		result = _tmp6_;
#line 177 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_g_variant_unref0 (value);
#line 177 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		return result;
#line 2043 "rygel-external-item-factory.c"
	} else {
#line 179 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		result = -1;
#line 179 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		_g_variant_unref0 (value);
#line 179 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		return result;
#line 2051 "rygel-external-item-factory.c"
	}
#line 173 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	_g_variant_unref0 (value);
#line 2055 "rygel-external-item-factory.c"
}


RygelExternalItemFactory* rygel_external_item_factory_construct (GType object_type) {
	RygelExternalItemFactory* self = NULL;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	self = (RygelExternalItemFactory*) g_type_create_instance (object_type);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	return self;
#line 2065 "rygel-external-item-factory.c"
}


RygelExternalItemFactory* rygel_external_item_factory_new (void) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	return rygel_external_item_factory_construct (RYGEL_EXTERNAL_TYPE_ITEM_FACTORY);
#line 2072 "rygel-external-item-factory.c"
}


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


static void rygel_external_value_item_factory_free_value (GValue* value) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (value->data[0].v_pointer) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		rygel_external_item_factory_unref (value->data[0].v_pointer);
#line 2088 "rygel-external-item-factory.c"
	}
}


static void rygel_external_value_item_factory_copy_value (const GValue* src_value, GValue* dest_value) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (src_value->data[0].v_pointer) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		dest_value->data[0].v_pointer = rygel_external_item_factory_ref (src_value->data[0].v_pointer);
#line 2098 "rygel-external-item-factory.c"
	} else {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		dest_value->data[0].v_pointer = NULL;
#line 2102 "rygel-external-item-factory.c"
	}
}


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


static gchar* rygel_external_value_item_factory_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (collect_values[0].v_pointer) {
#line 2117 "rygel-external-item-factory.c"
		RygelExternalItemFactory* object;
		object = collect_values[0].v_pointer;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		if (object->parent_instance.g_class == NULL) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 2124 "rygel-external-item-factory.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-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 2128 "rygel-external-item-factory.c"
		}
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		value->data[0].v_pointer = rygel_external_item_factory_ref (object);
#line 2132 "rygel-external-item-factory.c"
	} else {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		value->data[0].v_pointer = NULL;
#line 2136 "rygel-external-item-factory.c"
	}
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	return NULL;
#line 2140 "rygel-external-item-factory.c"
}


static gchar* rygel_external_value_item_factory_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	RygelExternalItemFactory** object_p;
	object_p = collect_values[0].v_pointer;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (!object_p) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 2151 "rygel-external-item-factory.c"
	}
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (!value->data[0].v_pointer) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		*object_p = NULL;
#line 2157 "rygel-external-item-factory.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		*object_p = value->data[0].v_pointer;
#line 2161 "rygel-external-item-factory.c"
	} else {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		*object_p = rygel_external_item_factory_ref (value->data[0].v_pointer);
#line 2165 "rygel-external-item-factory.c"
	}
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	return NULL;
#line 2169 "rygel-external-item-factory.c"
}


GParamSpec* rygel_external_param_spec_item_factory (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	RygelExternalParamSpecItemFactory* spec;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_return_val_if_fail (g_type_is_a (object_type, RYGEL_EXTERNAL_TYPE_ITEM_FACTORY), NULL);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	return G_PARAM_SPEC (spec);
#line 2183 "rygel-external-item-factory.c"
}


gpointer rygel_external_value_get_item_factory (const GValue* value) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, RYGEL_EXTERNAL_TYPE_ITEM_FACTORY), NULL);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	return value->data[0].v_pointer;
#line 2192 "rygel-external-item-factory.c"
}


void rygel_external_value_set_item_factory (GValue* value, gpointer v_object) {
	RygelExternalItemFactory* old;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, RYGEL_EXTERNAL_TYPE_ITEM_FACTORY));
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	old = value->data[0].v_pointer;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (v_object) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, RYGEL_EXTERNAL_TYPE_ITEM_FACTORY));
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		value->data[0].v_pointer = v_object;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		rygel_external_item_factory_ref (value->data[0].v_pointer);
#line 2212 "rygel-external-item-factory.c"
	} else {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		value->data[0].v_pointer = NULL;
#line 2216 "rygel-external-item-factory.c"
	}
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (old) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		rygel_external_item_factory_unref (old);
#line 2222 "rygel-external-item-factory.c"
	}
}


void rygel_external_value_take_item_factory (GValue* value, gpointer v_object) {
	RygelExternalItemFactory* old;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, RYGEL_EXTERNAL_TYPE_ITEM_FACTORY));
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	old = value->data[0].v_pointer;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (v_object) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, RYGEL_EXTERNAL_TYPE_ITEM_FACTORY));
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		value->data[0].v_pointer = v_object;
#line 2241 "rygel-external-item-factory.c"
	} else {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		value->data[0].v_pointer = NULL;
#line 2245 "rygel-external-item-factory.c"
	}
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (old) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		rygel_external_item_factory_unref (old);
#line 2251 "rygel-external-item-factory.c"
	}
}


static void rygel_external_item_factory_class_init (RygelExternalItemFactoryClass * klass) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	rygel_external_item_factory_parent_class = g_type_class_peek_parent (klass);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	RYGEL_EXTERNAL_ITEM_FACTORY_CLASS (klass)->finalize = rygel_external_item_factory_finalize;
#line 2261 "rygel-external-item-factory.c"
}


static void rygel_external_item_factory_instance_init (RygelExternalItemFactory * self) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	self->ref_count = 1;
#line 2268 "rygel-external-item-factory.c"
}


static void rygel_external_item_factory_finalize (RygelExternalItemFactory* obj) {
	RygelExternalItemFactory * self;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_EXTERNAL_TYPE_ITEM_FACTORY, RygelExternalItemFactory);
#line 2276 "rygel-external-item-factory.c"
}


/**
 * Creates item for external plugins.
 */
GType rygel_external_item_factory_get_type (void) {
	static volatile gsize rygel_external_item_factory_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_external_item_factory_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { rygel_external_value_item_factory_init, rygel_external_value_item_factory_free_value, rygel_external_value_item_factory_copy_value, rygel_external_value_item_factory_peek_pointer, "p", rygel_external_value_item_factory_collect_value, "p", rygel_external_value_item_factory_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (RygelExternalItemFactoryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_external_item_factory_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelExternalItemFactory), 0, (GInstanceInitFunc) rygel_external_item_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_item_factory_type_id;
		rygel_external_item_factory_type_id = g_type_register_fundamental (g_type_fundamental_next (), "RygelExternalItemFactory", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&rygel_external_item_factory_type_id__volatile, rygel_external_item_factory_type_id);
	}
	return rygel_external_item_factory_type_id__volatile;
}


gpointer rygel_external_item_factory_ref (gpointer instance) {
	RygelExternalItemFactory* self;
	self = instance;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	g_atomic_int_inc (&self->ref_count);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	return instance;
#line 2304 "rygel-external-item-factory.c"
}


void rygel_external_item_factory_unref (gpointer instance) {
	RygelExternalItemFactory* self;
	self = instance;
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		RYGEL_EXTERNAL_ITEM_FACTORY_GET_CLASS (self)->finalize (self);
#line 31 "/home/jens/Source/rygel/src/plugins/external/rygel-external-item-factory.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 2317 "rygel-external-item-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);
}



