/* rygel-external-container.c generated by valac 0.20.1.2-ca5c2, the Vala compiler
 * generated from rygel-external-container.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 <rygel-server.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <rygel-core.h>
#include <libgupnp-av/gupnp-av.h>


#define RYGEL_EXTERNAL_TYPE_CONTAINER (rygel_external_container_get_type ())
#define RYGEL_EXTERNAL_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_EXTERNAL_TYPE_CONTAINER, RygelExternalContainer))
#define RYGEL_EXTERNAL_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RYGEL_EXTERNAL_TYPE_CONTAINER, RygelExternalContainerClass))
#define RYGEL_EXTERNAL_IS_CONTAINER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_EXTERNAL_TYPE_CONTAINER))
#define RYGEL_EXTERNAL_IS_CONTAINER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RYGEL_EXTERNAL_TYPE_CONTAINER))
#define RYGEL_EXTERNAL_CONTAINER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RYGEL_EXTERNAL_TYPE_CONTAINER, RygelExternalContainerClass))

typedef struct _RygelExternalContainer RygelExternalContainer;
typedef struct _RygelExternalContainerClass RygelExternalContainerClass;
typedef struct _RygelExternalContainerPrivate RygelExternalContainerPrivate;

#define RYGEL_EXTERNAL_TYPE_MEDIA_OBJECT_PROXY (rygel_external_media_object_proxy_get_type ())
#define RYGEL_EXTERNAL_MEDIA_OBJECT_PROXY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_EXTERNAL_TYPE_MEDIA_OBJECT_PROXY, RygelExternalMediaObjectProxy))
#define RYGEL_EXTERNAL_IS_MEDIA_OBJECT_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_EXTERNAL_TYPE_MEDIA_OBJECT_PROXY))
#define RYGEL_EXTERNAL_MEDIA_OBJECT_PROXY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), RYGEL_EXTERNAL_TYPE_MEDIA_OBJECT_PROXY, RygelExternalMediaObjectProxyIface))

typedef struct _RygelExternalMediaObjectProxy RygelExternalMediaObjectProxy;
typedef struct _RygelExternalMediaObjectProxyIface RygelExternalMediaObjectProxyIface;

#define RYGEL_EXTERNAL_TYPE_MEDIA_OBJECT_PROXY_PROXY (rygel_external_media_object_proxy_proxy_get_type ())

#define RYGEL_EXTERNAL_TYPE_MEDIA_CONTAINER_PROXY (rygel_external_media_container_proxy_get_type ())
#define RYGEL_EXTERNAL_MEDIA_CONTAINER_PROXY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RYGEL_EXTERNAL_TYPE_MEDIA_CONTAINER_PROXY, RygelExternalMediaContainerProxy))
#define RYGEL_EXTERNAL_IS_MEDIA_CONTAINER_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RYGEL_EXTERNAL_TYPE_MEDIA_CONTAINER_PROXY))
#define RYGEL_EXTERNAL_MEDIA_CONTAINER_PROXY_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), RYGEL_EXTERNAL_TYPE_MEDIA_CONTAINER_PROXY, RygelExternalMediaContainerProxyIface))

typedef struct _RygelExternalMediaContainerProxy RygelExternalMediaContainerProxy;
typedef struct _RygelExternalMediaContainerProxyIface RygelExternalMediaContainerProxyIface;

#define RYGEL_EXTERNAL_TYPE_MEDIA_CONTAINER_PROXY_PROXY (rygel_external_media_container_proxy_proxy_get_type ())

#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;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _rygel_external_item_factory_unref0(var) ((var == NULL) ? NULL : (var = (rygel_external_item_factory_unref (var), NULL)))
typedef struct _RygelExternalContainerGetChildrenData RygelExternalContainerGetChildrenData;
#define _rygel_search_expression_unref0(var) ((var == NULL) ? NULL : (var = (rygel_search_expression_unref (var), NULL)))
typedef struct _RygelExternalContainerSearchData RygelExternalContainerSearchData;
#define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_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 _RygelExternalContainerFindObjectData RygelExternalContainerFindObjectData;
typedef struct _RygelExternalContainerCreateMediaObjectsData RygelExternalContainerCreateMediaObjectsData;
typedef struct _RygelExternalContainerRefreshChildContainersData RygelExternalContainerRefreshChildContainersData;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _RygelExternalContainerUpdateContainerData RygelExternalContainerUpdateContainerData;

struct _RygelExternalMediaObjectProxyIface {
	GTypeInterface parent_iface;
	char* (*get_parent) (RygelExternalMediaObjectProxy* self);
	void (*set_parent) (RygelExternalMediaObjectProxy* self, const char* value);
	gchar* (*get_display_name) (RygelExternalMediaObjectProxy* self);
	void (*set_display_name) (RygelExternalMediaObjectProxy* self, const gchar* value);
	gchar* (*get_object_type) (RygelExternalMediaObjectProxy* self);
	void (*set_object_type) (RygelExternalMediaObjectProxy* self, const gchar* value);
};

struct _RygelExternalMediaContainerProxyIface {
	GTypeInterface parent_iface;
	void (*list_children) (RygelExternalMediaContainerProxy* self, guint offset, guint max_count, gchar** filter, int filter_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GHashTable** (*list_children_finish) (RygelExternalMediaContainerProxy* self, GAsyncResult* _res_, int* result_length1, GError** error);
	void (*list_containers) (RygelExternalMediaContainerProxy* self, guint offset, guint max_count, gchar** filter, int filter_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GHashTable** (*list_containers_finish) (RygelExternalMediaContainerProxy* self, GAsyncResult* _res_, int* result_length1, GError** error);
	void (*list_items) (RygelExternalMediaContainerProxy* self, guint offset, guint max_count, gchar** filter, int filter_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GHashTable** (*list_items_finish) (RygelExternalMediaContainerProxy* self, GAsyncResult* _res_, int* result_length1, GError** error);
	void (*search_objects) (RygelExternalMediaContainerProxy* self, const gchar* query, guint offset, guint max_count, gchar** filter, int filter_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
	GHashTable** (*search_objects_finish) (RygelExternalMediaContainerProxy* self, GAsyncResult* _res_, int* result_length1, GError** error);
	guint (*get_child_count) (RygelExternalMediaContainerProxy* self);
	void (*set_child_count) (RygelExternalMediaContainerProxy* self, guint value);
	guint (*get_item_count) (RygelExternalMediaContainerProxy* self);
	void (*set_item_count) (RygelExternalMediaContainerProxy* self, guint value);
	guint (*get_container_count) (RygelExternalMediaContainerProxy* self);
	void (*set_container_count) (RygelExternalMediaContainerProxy* self, guint value);
	gboolean (*get_searchable) (RygelExternalMediaContainerProxy* self);
	void (*set_searchable) (RygelExternalMediaContainerProxy* self, gboolean value);
	char* (*get_icon) (RygelExternalMediaContainerProxy* self);
	void (*set_icon) (RygelExternalMediaContainerProxy* self, const char* value);
};

struct _RygelExternalContainer {
	RygelMediaContainer parent_instance;
	RygelExternalContainerPrivate * priv;
	RygelExternalMediaContainerProxy* actual_container;
	gchar* service_name;
};

struct _RygelExternalContainerClass {
	RygelMediaContainerClass parent_class;
};

struct _RygelExternalContainerPrivate {
	RygelExternalItemFactory* item_factory;
	GeeArrayList* containers;
	GeeArrayList* _search_classes;
	gboolean searchable;
};

struct _RygelExternalContainerGetChildrenData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelExternalContainer* self;
	guint offset;
	guint max_count;
	gchar* sort_criteria;
	GCancellable* cancellable;
	RygelMediaObjects* result;
	gchar** _tmp0_;
	gchar** filter;
	gint filter_length1;
	gint _filter_size_;
	const gchar** object_prop_collection;
	gint object_prop_collection_length1;
	gint _object_prop_collection_size_;
	gint object_prop_it;
	const gchar* object_prop;
	gchar** _tmp1_;
	gint _tmp1__length1;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar** container_prop_collection;
	gint container_prop_collection_length1;
	gint _container_prop_collection_size_;
	gint container_prop_it;
	const gchar* container_prop;
	gchar** _tmp4_;
	gint _tmp4__length1;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	const gchar** item_prop_collection;
	gint item_prop_collection_length1;
	gint _item_prop_collection_size_;
	gint item_prop_it;
	const gchar* item_prop;
	gchar** _tmp7_;
	gint _tmp7__length1;
	const gchar* _tmp8_;
	gchar* _tmp9_;
	RygelExternalMediaContainerProxy* _tmp10_;
	guint _tmp11_;
	guint _tmp12_;
	gchar** _tmp13_;
	gint _tmp13__length1;
	gint _tmp14_;
	GHashTable** _tmp15_;
	GHashTable** children_props;
	gint children_props_length1;
	gint _children_props_size_;
	GHashTable** _tmp16_;
	gint _tmp16__length1;
	RygelMediaObjects* _tmp17_;
	RygelMediaObjects* _result_;
	RygelMediaObjects* _tmp18_;
	const gchar* _tmp19_;
	GError * _inner_error_;
};

struct _RygelExternalContainerSearchData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelExternalContainer* self;
	RygelSearchExpression* expression;
	guint offset;
	guint max_count;
	guint total_matches;
	gchar* sort_criteria;
	GCancellable* cancellable;
	RygelMediaObjects* result;
	gboolean _tmp0_;
	RygelSearchExpression* _tmp1_;
	gboolean _tmp2_;
	gboolean _tmp3_;
	RygelSearchExpression* _tmp4_;
	guint _tmp5_;
	guint _tmp6_;
	const gchar* _tmp7_;
	GCancellable* _tmp8_;
	guint _tmp9_;
	RygelMediaObjects* _tmp10_;
	RygelMediaObjects* _tmp11_;
	gchar** _tmp12_;
	gchar** filter;
	gint filter_length1;
	gint _filter_size_;
	const gchar** object_prop_collection;
	gint object_prop_collection_length1;
	gint _object_prop_collection_size_;
	gint object_prop_it;
	const gchar* object_prop;
	gchar** _tmp13_;
	gint _tmp13__length1;
	const gchar* _tmp14_;
	gchar* _tmp15_;
	const gchar** container_prop_collection;
	gint container_prop_collection_length1;
	gint _container_prop_collection_size_;
	gint container_prop_it;
	const gchar* container_prop;
	gchar** _tmp16_;
	gint _tmp16__length1;
	const gchar* _tmp17_;
	gchar* _tmp18_;
	const gchar** item_prop_collection;
	gint item_prop_collection_length1;
	gint _item_prop_collection_size_;
	gint item_prop_it;
	const gchar* item_prop;
	gchar** _tmp19_;
	gint _tmp19__length1;
	const gchar* _tmp20_;
	gchar* _tmp21_;
	RygelSearchExpression* _tmp22_;
	RygelSearchExpression* _tmp23_;
	RygelSearchExpression* ext_expression;
	RygelExternalMediaContainerProxy* _tmp24_;
	RygelSearchExpression* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	guint _tmp28_;
	guint _tmp29_;
	gchar** _tmp30_;
	gint _tmp30__length1;
	gint _tmp31_;
	GHashTable** _tmp32_;
	GHashTable** _tmp33_;
	gint _tmp33__length1;
	GHashTable** _result_;
	gint _result__length1;
	gint __result__size_;
	GHashTable** _tmp34_;
	gint _tmp34__length1;
	GHashTable** _tmp35_;
	gint _tmp35__length1;
	RygelMediaObjects* _tmp36_;
	RygelMediaObjects* objects;
	RygelMediaObjects* _tmp37_;
	const gchar* _tmp38_;
	GError * _inner_error_;
};

struct _RygelExternalContainerFindObjectData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelExternalContainer* self;
	gchar* id;
	GCancellable* cancellable;
	RygelMediaObject* result;
	RygelMediaObject* media_object;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	RygelExternalMediaObjectProxy* _tmp2_;
	RygelExternalMediaObjectProxy* actual_object;
	RygelExternalMediaObjectProxy* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gboolean _tmp7_;
	const gchar* _tmp8_;
	RygelMediaContainer* _tmp9_;
	RygelMediaObject* _tmp10_;
	GeeArrayList* _tmp11_;
	GeeArrayList* _tmp12_;
	GeeArrayList* _container_list;
	GeeArrayList* _tmp13_;
	gint _tmp14_;
	gint _tmp15_;
	gint _container_size;
	gint _container_index;
	gint _tmp16_;
	gint _tmp17_;
	gint _tmp18_;
	GeeArrayList* _tmp19_;
	gint _tmp20_;
	gpointer _tmp21_;
	RygelExternalContainer* container;
	RygelExternalContainer* _tmp22_;
	const gchar* _tmp23_;
	GCancellable* _tmp24_;
	RygelMediaObject* _tmp25_;
	RygelMediaObject* _tmp26_;
	RygelMediaObject* _tmp27_;
	const gchar* _tmp28_;
	const gchar* _tmp29_;
	FreeDesktopProperties* _tmp30_;
	FreeDesktopProperties* props_iface;
	FreeDesktopProperties* _tmp31_;
	GHashTable* _tmp32_;
	GHashTable* props;
	GHashTable* _tmp33_;
	gconstpointer _tmp34_;
	guint _tmp35_;
	guint child_count;
	GHashTable* _tmp36_;
	gconstpointer _tmp37_;
	gboolean _tmp38_;
	gboolean searchable;
	FreeDesktopProperties* _tmp39_;
	GHashTable* _tmp40_;
	GHashTable* _tmp41_;
	GHashTable* _tmp42_;
	gconstpointer _tmp43_;
	gchar* _tmp44_;
	gchar* path;
	GHashTable* _tmp45_;
	const gchar* _tmp46_;
	const gchar* _tmp47_;
	gchar* _tmp48_;
	gchar* _tmp49_;
	const gchar* _tmp50_;
	const gchar* _tmp51_;
	const gchar* _tmp52_;
	guint _tmp53_;
	gboolean _tmp54_;
	const gchar* _tmp55_;
	const gchar* _tmp56_;
	RygelExternalContainer* _tmp57_;
	RygelExternalContainer* _tmp58_;
	RygelExternalMediaObjectProxy* _tmp59_;
	char* _tmp60_;
	char* _tmp61_;
	gchar* _tmp62_;
	RygelExternalDummyContainer* _tmp63_;
	RygelExternalDummyContainer* _tmp64_;
	RygelExternalDummyContainer* parent_container;
	const gchar* _tmp65_;
	const gchar* _tmp66_;
	FreeDesktopProperties* _tmp67_;
	FreeDesktopProperties* _vala1_props_iface;
	FreeDesktopProperties* _tmp68_;
	GHashTable* _tmp69_;
	GHashTable* _vala1_props;
	RygelExternalItemFactory* _tmp70_;
	const gchar* _tmp71_;
	RygelExternalMediaObjectProxy* _tmp72_;
	gchar* _tmp73_;
	gchar* _tmp74_;
	gchar* _tmp75_;
	RygelExternalMediaObjectProxy* _tmp76_;
	gchar* _tmp77_;
	gchar* _tmp78_;
	gchar* _tmp79_;
	GHashTable* _tmp80_;
	const gchar* _tmp81_;
	RygelExternalDummyContainer* _tmp82_;
	RygelMediaItem* _tmp83_;
	RygelMediaItem* _tmp84_;
	RygelMediaItem* _tmp85_;
	GError * _inner_error_;
};

struct _RygelExternalContainerCreateMediaObjectsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelExternalContainer* self;
	GHashTable** all_props;
	gint all_props_length1;
	RygelMediaContainer* parent;
	RygelMediaObjects* result;
	RygelMediaObjects* _tmp0_;
	RygelMediaObjects* media_objects;
	GHashTable** _tmp1_;
	gint _tmp1__length1;
	GHashTable** props_collection;
	gint props_collection_length1;
	gint _props_collection_size_;
	gint props_it;
	GHashTable* _tmp2_;
	GHashTable* props;
	GHashTable* _tmp3_;
	gconstpointer _tmp4_;
	gchar* _tmp5_;
	gchar* id;
	GHashTable* _tmp6_;
	gconstpointer _tmp7_;
	gchar* _tmp8_;
	gchar* type;
	RygelMediaContainer* parent_container;
	RygelMediaContainer* _tmp9_;
	RygelMediaContainer* _tmp10_;
	RygelMediaContainer* _tmp11_;
	GHashTable* _tmp12_;
	gconstpointer _tmp13_;
	gchar* _tmp14_;
	gchar* parent_id;
	const gchar* _tmp15_;
	RygelExternalDummyContainer* _tmp16_;
	RygelMediaObject* media_object;
	const gchar* _tmp17_;
	const gchar* _tmp18_;
	RygelMediaContainer* _tmp19_;
	RygelMediaObject* _tmp20_;
	GHashTable* _tmp21_;
	const gchar* _tmp22_;
	const gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	const gchar* _tmp26_;
	GHashTable* _tmp27_;
	gconstpointer _tmp28_;
	guint _tmp29_;
	guint child_count;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	const gchar* _tmp32_;
	guint _tmp33_;
	RygelMediaContainer* _tmp34_;
	RygelExternalDummyContainer* _tmp35_;
	RygelExternalItemFactory* _tmp36_;
	const gchar* _tmp37_;
	const gchar* _tmp38_;
	const gchar* _tmp39_;
	const gchar* _tmp40_;
	GHashTable* _tmp41_;
	const gchar* _tmp42_;
	RygelMediaContainer* _tmp43_;
	RygelMediaItem* _tmp44_;
	RygelMediaItem* _tmp45_;
	RygelMediaObjects* _tmp46_;
	RygelMediaObject* _tmp47_;
	GError * _inner_error_;
};

struct _RygelExternalContainerRefreshChildContainersData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelExternalContainer* self;
	gchar** _tmp0_;
	gchar** filter;
	gint filter_length1;
	gint _filter_size_;
	const gchar** object_prop_collection;
	gint object_prop_collection_length1;
	gint _object_prop_collection_size_;
	gint object_prop_it;
	const gchar* object_prop;
	gchar** _tmp1_;
	gint _tmp1__length1;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	const gchar** container_prop_collection;
	gint container_prop_collection_length1;
	gint _container_prop_collection_size_;
	gint container_prop_it;
	const gchar* container_prop;
	gchar** _tmp4_;
	gint _tmp4__length1;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	RygelExternalMediaContainerProxy* _tmp7_;
	gchar** _tmp8_;
	gint _tmp8__length1;
	gint _tmp9_;
	GHashTable** _tmp10_;
	GHashTable** children_props;
	gint children_props_length1;
	gint _children_props_size_;
	GeeArrayList* _tmp11_;
	GHashTable** _tmp12_;
	gint _tmp12__length1;
	GHashTable** props_collection;
	gint props_collection_length1;
	gint _props_collection_size_;
	gint props_it;
	GHashTable* _tmp13_;
	GHashTable* props;
	GHashTable* _tmp14_;
	gconstpointer _tmp15_;
	gchar* _tmp16_;
	gchar* path;
	GHashTable* _tmp17_;
	gconstpointer _tmp18_;
	gchar* _tmp19_;
	gchar* title;
	GHashTable* _tmp20_;
	gconstpointer _tmp21_;
	guint _tmp22_;
	guint child_count;
	GHashTable* _tmp23_;
	gconstpointer _tmp24_;
	gboolean _tmp25_;
	gboolean searchable;
	const gchar* _tmp26_;
	const gchar* _tmp27_;
	guint _tmp28_;
	gboolean _tmp29_;
	const gchar* _tmp30_;
	const gchar* _tmp31_;
	RygelExternalContainer* _tmp32_;
	RygelExternalContainer* container;
	GeeArrayList* _tmp33_;
	RygelExternalContainer* _tmp34_;
	GError * _inner_error_;
};

struct _RygelExternalContainerUpdateContainerData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	RygelExternalContainer* self;
	gboolean connect_signal;
	const gchar* _tmp0_;
	RygelExternalMediaContainerProxy* _tmp1_;
	const gchar* _tmp2_;
	FreeDesktopProperties* _tmp3_;
	FreeDesktopProperties* props_iface;
	FreeDesktopProperties* _tmp4_;
	GHashTable* _tmp5_;
	GHashTable* props;
	GHashTable* _tmp6_;
	gconstpointer _tmp7_;
	guint _tmp8_;
	guint child_count;
	guint _tmp9_;
	FreeDesktopProperties* _tmp10_;
	GHashTable* _tmp11_;
	GHashTable* _tmp12_;
	GHashTable* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	const gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	GError* property_error;
	RygelExternalMediaContainerProxy* _tmp19_;
	const gchar* _tmp20_;
	GError* _tmp21_;
	const gchar* _tmp22_;
	gint _tmp23_;
	gint _tmp24_;
	gint _tmp25_;
	GError* err;
	RygelExternalMediaContainerProxy* _tmp26_;
	const gchar* _tmp27_;
	GError* _tmp28_;
	const gchar* _tmp29_;
	gboolean _tmp30_;
	RygelExternalMediaContainerProxy* _tmp31_;
	GError * _inner_error_;
};


static gpointer rygel_external_container_parent_class = NULL;
static RygelSearchableContainerIface* rygel_external_container_rygel_searchable_container_parent_iface = NULL;

GType rygel_external_container_get_type (void) G_GNUC_CONST;
GType rygel_external_media_object_proxy_get_type (void) G_GNUC_CONST;
GType rygel_external_media_object_proxy_proxy_get_type (void) G_GNUC_CONST;
guint rygel_external_media_object_proxy_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
GType rygel_external_media_container_proxy_proxy_get_type (void) G_GNUC_CONST;
guint rygel_external_media_container_proxy_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
GType rygel_external_media_container_proxy_get_type (void) G_GNUC_CONST;
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;
#define RYGEL_EXTERNAL_CONTAINER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RYGEL_EXTERNAL_TYPE_CONTAINER, RygelExternalContainerPrivate))
enum  {
	RYGEL_EXTERNAL_CONTAINER_DUMMY_PROPERTY,
	RYGEL_EXTERNAL_CONTAINER_SEARCH_CLASSES
};
RygelExternalContainer* rygel_external_container_new (const gchar* id, const gchar* title, guint child_count, gboolean searchable, const gchar* service_name, const gchar* path, RygelExternalContainer* parent, GError** error);
RygelExternalContainer* rygel_external_container_construct (GType object_type, const gchar* id, const gchar* title, guint child_count, gboolean searchable, const gchar* service_name, const gchar* path, RygelExternalContainer* parent, GError** error);
RygelExternalItemFactory* rygel_external_item_factory_new (void);
RygelExternalItemFactory* rygel_external_item_factory_construct (GType object_type);
static void rygel_external_container_update_container (RygelExternalContainer* self, gboolean connect_signal, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void rygel_external_container_update_container_finish (RygelExternalContainer* self, GAsyncResult* _res_);
static void rygel_external_container_real_get_children_data_free (gpointer _data);
static void rygel_external_container_real_get_children (RygelMediaContainer* base, guint offset, guint max_count, const gchar* sort_criteria, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean rygel_external_container_real_get_children_co (RygelExternalContainerGetChildrenData* _data_);
static void _vala_array_add1 (gchar*** array, int* length, int* size, gchar* value);
static void _vala_array_add2 (gchar*** array, int* length, int* size, gchar* value);
static void _vala_array_add3 (gchar*** array, int* length, int* size, gchar* value);
void rygel_external_media_container_proxy_list_children (RygelExternalMediaContainerProxy* self, guint offset, guint max_count, gchar** filter, int filter_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
GHashTable** rygel_external_media_container_proxy_list_children_finish (RygelExternalMediaContainerProxy* self, GAsyncResult* _res_, int* result_length1, GError** error);
static void rygel_external_container_get_children_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void rygel_external_container_create_media_objects (RygelExternalContainer* self, GHashTable** all_props, int all_props_length1, RygelMediaContainer* parent, GAsyncReadyCallback _callback_, gpointer _user_data_);
static RygelMediaObjects* rygel_external_container_create_media_objects_finish (RygelExternalContainer* self, GAsyncResult* _res_, GError** error);
static void rygel_external_container_real_search_data_free (gpointer _data);
static void rygel_external_container_real_search (RygelSearchableContainer* base, RygelSearchExpression* expression, guint offset, guint max_count, const gchar* sort_criteria, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean rygel_external_container_real_search_co (RygelExternalContainerSearchData* _data_);
static void rygel_external_container_search_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void _vala_array_add4 (gchar*** array, int* length, int* size, gchar* value);
static void _vala_array_add5 (gchar*** array, int* length, int* size, gchar* value);
static void _vala_array_add6 (gchar*** array, int* length, int* size, gchar* value);
static RygelSearchExpression* rygel_external_container_translate_expression (RygelExternalContainer* self, RygelSearchExpression* upnp_expression);
void rygel_external_media_container_proxy_search_objects (RygelExternalMediaContainerProxy* self, const gchar* query, guint offset, guint max_count, gchar** filter, int filter_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
GHashTable** rygel_external_media_container_proxy_search_objects_finish (RygelExternalMediaContainerProxy* self, GAsyncResult* _res_, int* result_length1, GError** error);
static void rygel_external_container_real_find_object_data_free (gpointer _data);
static void rygel_external_container_real_find_object (RygelMediaContainer* base, const gchar* id, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean rygel_external_container_real_find_object_co (RygelExternalContainerFindObjectData* _data_);
static void rygel_external_container_find_object_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
gchar* rygel_external_media_object_proxy_get_object_type (RygelExternalMediaObjectProxy* self);
static RygelMediaContainer* rygel_external_container_find_container_by_id (RygelExternalContainer* self, const gchar* id);
#define RYGEL_EXTERNAL_MEDIA_CONTAINER_PROXY_IFACE "org.gnome.UPnP.MediaContainer2"
static guint _variant_get1 (GVariant* value);
static gboolean _variant_get2 (GVariant* value);
#define RYGEL_EXTERNAL_MEDIA_OBJECT_PROXY_IFACE "org.gnome.UPnP.MediaObject2"
static gchar* _variant_get3 (GVariant* value);
gchar* rygel_external_get_mandatory_string_value (GHashTable* props, const gchar* key, const gchar* _default_, const gchar* service_name);
char* rygel_external_media_object_proxy_get_parent (RygelExternalMediaObjectProxy* self);
RygelExternalDummyContainer* rygel_external_dummy_container_new (const gchar* id, const gchar* title, guint child_count, RygelMediaContainer* parent);
RygelExternalDummyContainer* rygel_external_dummy_container_construct (GType object_type, const gchar* id, const gchar* title, guint child_count, RygelMediaContainer* parent);
GType rygel_external_dummy_container_get_type (void) G_GNUC_CONST;
#define RYGEL_EXTERNAL_MEDIA_ITEM_PROXY_IFACE "org.gnome.UPnP.MediaItem2"
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);
gchar* rygel_external_media_object_proxy_get_display_name (RygelExternalMediaObjectProxy* self);
static void rygel_external_container_create_media_objects_data_free (gpointer _data);
static gboolean rygel_external_container_create_media_objects_co (RygelExternalContainerCreateMediaObjectsData* _data_);
static gchar* _variant_get4 (GVariant* value);
static gchar* _variant_get5 (GVariant* value);
static gchar* _variant_get6 (GVariant* value);
static guint _variant_get7 (GVariant* value);
static void rygel_external_container_create_media_objects_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void rygel_external_container_refresh_child_containers_data_free (gpointer _data);
static void rygel_external_container_refresh_child_containers (RygelExternalContainer* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void rygel_external_container_refresh_child_containers_finish (RygelExternalContainer* self, GAsyncResult* _res_, GError** error);
static gboolean rygel_external_container_refresh_child_containers_co (RygelExternalContainerRefreshChildContainersData* _data_);
static void _vala_array_add7 (gchar*** array, int* length, int* size, gchar* value);
static void _vala_array_add8 (gchar*** array, int* length, int* size, gchar* value);
void rygel_external_media_container_proxy_list_containers (RygelExternalMediaContainerProxy* self, guint offset, guint max_count, gchar** filter, int filter_length1, GAsyncReadyCallback _callback_, gpointer _user_data_);
GHashTable** rygel_external_media_container_proxy_list_containers_finish (RygelExternalMediaContainerProxy* self, GAsyncResult* _res_, int* result_length1, GError** error);
static void rygel_external_container_refresh_child_containers_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static gchar* _variant_get8 (GVariant* value);
static gchar* _variant_get9 (GVariant* value);
static guint _variant_get10 (GVariant* value);
static gboolean _variant_get11 (GVariant* value);
static void rygel_external_container_update_container_data_free (gpointer _data);
static gboolean rygel_external_container_update_container_co (RygelExternalContainerUpdateContainerData* _data_);
static void rygel_external_container_update_container_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static guint _variant_get12 (GVariant* value);
static void rygel_external_container_on_updated (RygelExternalContainer* self, RygelExternalMediaContainerProxy* actual_container);
static void _rygel_external_container_on_updated_rygel_external_media_container_proxy_updated (RygelExternalMediaContainerProxy* _sender, gpointer self);
gchar* rygel_external_container_translate_property (RygelExternalContainer* self, const gchar* property);
static void rygel_external_container_finalize (GObject* obj);
static void _vala_rygel_external_container_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_rygel_external_container_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
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);

extern const gchar* RYGEL_EXTERNAL_MEDIA_OBJECT_PROXY_PROPERTIES[4];
extern const gchar* RYGEL_EXTERNAL_MEDIA_CONTAINER_PROXY_PROPERTIES[2];
extern const gchar* RYGEL_EXTERNAL_MEDIA_ITEM_PROXY_PROPERTIES[19];

RygelExternalContainer* rygel_external_container_construct (GType object_type, const gchar* id, const gchar* title, guint child_count, gboolean searchable, const gchar* service_name, const gchar* path, RygelExternalContainer* parent, GError** error) {
	RygelExternalContainer * self = NULL;
	const gchar* _tmp0_;
	RygelExternalContainer* _tmp1_;
	const gchar* _tmp2_;
	guint _tmp3_;
	gint _tmp4_;
	guint _tmp5_ = 0U;
	const gchar* _tmp6_;
	gchar* _tmp7_;
	RygelExternalItemFactory* _tmp8_;
	GeeArrayList* _tmp9_;
	GeeArrayList* _tmp10_;
	GeeArrayList* _tmp11_;
	const gchar* _tmp12_;
	const gchar* _tmp13_;
	RygelExternalMediaContainerProxy* _tmp14_ = NULL;
	RygelExternalMediaContainerProxy* _tmp15_;
	RygelExternalContainer* _tmp16_;
	GError * _inner_error_ = NULL;
	g_return_val_if_fail (id != NULL, NULL);
	g_return_val_if_fail (title != NULL, NULL);
	g_return_val_if_fail (service_name != NULL, NULL);
	g_return_val_if_fail (path != NULL, NULL);
	_tmp0_ = id;
	_tmp1_ = parent;
	_tmp2_ = title;
	_tmp3_ = child_count;
	_tmp4_ = G_MAXINT;
	_tmp5_ = CLAMP (_tmp3_, (guint) 0, (guint) _tmp4_);
	self = (RygelExternalContainer*) rygel_media_container_construct (object_type, _tmp0_, (RygelMediaContainer*) _tmp1_, _tmp2_, (gint) _tmp5_);
	_tmp6_ = service_name;
	_tmp7_ = g_strdup (_tmp6_);
	_g_free0 (self->service_name);
	self->service_name = _tmp7_;
	_tmp8_ = rygel_external_item_factory_new ();
	_rygel_external_item_factory_unref0 (self->priv->item_factory);
	self->priv->item_factory = _tmp8_;
	_tmp9_ = gee_array_list_new (RYGEL_EXTERNAL_TYPE_CONTAINER, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
	_g_object_unref0 (self->priv->containers);
	self->priv->containers = _tmp9_;
	_tmp10_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
	_tmp11_ = _tmp10_;
	rygel_searchable_container_set_search_classes ((RygelSearchableContainer*) self, _tmp11_);
	_g_object_unref0 (_tmp11_);
	_tmp12_ = self->service_name;
	_tmp13_ = path;
	_tmp14_ = g_initable_new (RYGEL_EXTERNAL_TYPE_MEDIA_CONTAINER_PROXY_PROXY, NULL, &_inner_error_, "g-flags", G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, "g-name", _tmp12_, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", _tmp13_, "g-interface-name", "org.gnome.UPnP.MediaContainer2", NULL);
	_tmp15_ = (RygelExternalMediaContainerProxy*) _tmp14_;
	if (_inner_error_ != NULL) {
		if (_inner_error_->domain == G_IO_ERROR) {
			g_propagate_error (error, _inner_error_);
			_g_object_unref0 (self);
			return NULL;
		} else {
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
			g_clear_error (&_inner_error_);
			return NULL;
		}
	}
	_g_object_unref0 (self->actual_container);
	self->actual_container = _tmp15_;
	rygel_external_container_update_container (self, TRUE, NULL, NULL);
	_tmp16_ = parent;
	if (_tmp16_ != NULL) {
		RygelExternalContainer* _tmp17_;
		_tmp17_ = parent;
		g_object_add_weak_pointer ((GObject*) _tmp17_, &((RygelMediaObject*) self)->parent_ptr);
	}
	return self;
}


RygelExternalContainer* rygel_external_container_new (const gchar* id, const gchar* title, guint child_count, gboolean searchable, const gchar* service_name, const gchar* path, RygelExternalContainer* parent, GError** error) {
	return rygel_external_container_construct (RYGEL_EXTERNAL_TYPE_CONTAINER, id, title, child_count, searchable, service_name, path, parent, error);
}


static void rygel_external_container_real_get_children_data_free (gpointer _data) {
	RygelExternalContainerGetChildrenData* _data_;
	_data_ = _data;
	_g_free0 (_data_->sort_criteria);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (RygelExternalContainerGetChildrenData, _data_);
}


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


static void rygel_external_container_real_get_children (RygelMediaContainer* base, guint offset, guint max_count, const gchar* sort_criteria, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelExternalContainer * self;
	RygelExternalContainerGetChildrenData* _data_;
	RygelExternalContainer* _tmp0_;
	guint _tmp1_;
	guint _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_;
	GCancellable* _tmp5_;
	GCancellable* _tmp6_;
	self = (RygelExternalContainer*) base;
	_data_ = g_slice_new0 (RygelExternalContainerGetChildrenData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, rygel_external_container_real_get_children);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_external_container_real_get_children_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = offset;
	_data_->offset = _tmp1_;
	_tmp2_ = max_count;
	_data_->max_count = _tmp2_;
	_tmp3_ = sort_criteria;
	_tmp4_ = g_strdup (_tmp3_);
	_g_free0 (_data_->sort_criteria);
	_data_->sort_criteria = _tmp4_;
	_tmp5_ = cancellable;
	_tmp6_ = _g_object_ref0 (_tmp5_);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp6_;
	rygel_external_container_real_get_children_co (_data_);
}


static RygelMediaObjects* rygel_external_container_real_get_children_finish (RygelMediaContainer* base, GAsyncResult* _res_, GError** error) {
	RygelMediaObjects* result;
	RygelExternalContainerGetChildrenData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return NULL;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void _vala_array_add1 (gchar*** array, int* length, int* size, gchar* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static void _vala_array_add2 (gchar*** array, int* length, int* size, gchar* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static void _vala_array_add3 (gchar*** array, int* length, int* size, gchar* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static void rygel_external_container_get_children_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	RygelExternalContainerGetChildrenData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	rygel_external_container_real_get_children_co (_data_);
}


static gboolean rygel_external_container_real_get_children_co (RygelExternalContainerGetChildrenData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = g_new0 (gchar*, 0 + 1);
	_data_->filter = _data_->_tmp0_;
	_data_->filter_length1 = 0;
	_data_->_filter_size_ = _data_->filter_length1;
	{
		_data_->object_prop_collection_length1 = 0;
		_data_->_object_prop_collection_size_ = 0;
		_data_->object_prop_collection = RYGEL_EXTERNAL_MEDIA_OBJECT_PROXY_PROPERTIES;
		_data_->object_prop_collection_length1 = G_N_ELEMENTS (RYGEL_EXTERNAL_MEDIA_OBJECT_PROXY_PROPERTIES);
		for (_data_->object_prop_it = 0; _data_->object_prop_it < G_N_ELEMENTS (RYGEL_EXTERNAL_MEDIA_OBJECT_PROXY_PROPERTIES); _data_->object_prop_it = _data_->object_prop_it + 1) {
			_data_->object_prop = _data_->object_prop_collection[_data_->object_prop_it];
			{
				_data_->_tmp1_ = _data_->filter;
				_data_->_tmp1__length1 = _data_->filter_length1;
				_data_->_tmp2_ = _data_->object_prop;
				_data_->_tmp3_ = g_strdup (_data_->_tmp2_);
				_vala_array_add1 (&_data_->filter, &_data_->filter_length1, &_data_->_filter_size_, _data_->_tmp3_);
			}
		}
	}
	{
		_data_->container_prop_collection_length1 = 0;
		_data_->_container_prop_collection_size_ = 0;
		_data_->container_prop_collection = RYGEL_EXTERNAL_MEDIA_CONTAINER_PROXY_PROPERTIES;
		_data_->container_prop_collection_length1 = G_N_ELEMENTS (RYGEL_EXTERNAL_MEDIA_CONTAINER_PROXY_PROPERTIES);
		for (_data_->container_prop_it = 0; _data_->container_prop_it < G_N_ELEMENTS (RYGEL_EXTERNAL_MEDIA_CONTAINER_PROXY_PROPERTIES); _data_->container_prop_it = _data_->container_prop_it + 1) {
			_data_->container_prop = _data_->container_prop_collection[_data_->container_prop_it];
			{
				_data_->_tmp4_ = _data_->filter;
				_data_->_tmp4__length1 = _data_->filter_length1;
				_data_->_tmp5_ = _data_->container_prop;
				_data_->_tmp6_ = g_strdup (_data_->_tmp5_);
				_vala_array_add2 (&_data_->filter, &_data_->filter_length1, &_data_->_filter_size_, _data_->_tmp6_);
			}
		}
	}
	{
		_data_->item_prop_collection_length1 = 0;
		_data_->_item_prop_collection_size_ = 0;
		_data_->item_prop_collection = RYGEL_EXTERNAL_MEDIA_ITEM_PROXY_PROPERTIES;
		_data_->item_prop_collection_length1 = G_N_ELEMENTS (RYGEL_EXTERNAL_MEDIA_ITEM_PROXY_PROPERTIES);
		for (_data_->item_prop_it = 0; _data_->item_prop_it < G_N_ELEMENTS (RYGEL_EXTERNAL_MEDIA_ITEM_PROXY_PROPERTIES); _data_->item_prop_it = _data_->item_prop_it + 1) {
			_data_->item_prop = _data_->item_prop_collection[_data_->item_prop_it];
			{
				_data_->_tmp7_ = _data_->filter;
				_data_->_tmp7__length1 = _data_->filter_length1;
				_data_->_tmp8_ = _data_->item_prop;
				_data_->_tmp9_ = g_strdup (_data_->_tmp8_);
				_vala_array_add3 (&_data_->filter, &_data_->filter_length1, &_data_->_filter_size_, _data_->_tmp9_);
			}
		}
	}
	_data_->_tmp10_ = _data_->self->actual_container;
	_data_->_tmp11_ = _data_->offset;
	_data_->_tmp12_ = _data_->max_count;
	_data_->_tmp13_ = _data_->filter;
	_data_->_tmp13__length1 = _data_->filter_length1;
	_data_->_tmp14_ = 0;
	_data_->_state_ = 1;
	rygel_external_media_container_proxy_list_children (_data_->_tmp10_, _data_->_tmp11_, _data_->_tmp12_, _data_->_tmp13_, _data_->_tmp13__length1, rygel_external_container_get_children_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp15_ = NULL;
	_data_->_tmp15_ = rygel_external_media_container_proxy_list_children_finish (_data_->_tmp10_, _data_->_res_, &_data_->_tmp14_, &_data_->_inner_error_);
	_data_->children_props = _data_->_tmp15_;
	_data_->children_props_length1 = _data_->_tmp14_;
	_data_->_children_props_size_ = _data_->children_props_length1;
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_data_->filter = (_vala_array_free (_data_->filter, _data_->filter_length1, (GDestroyNotify) g_free), NULL);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp16_ = _data_->children_props;
	_data_->_tmp16__length1 = _data_->children_props_length1;
	_data_->_state_ = 2;
	rygel_external_container_create_media_objects (_data_->self, _data_->_tmp16_, _data_->_tmp16__length1, (RygelMediaContainer*) _data_->self, rygel_external_container_get_children_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp17_ = NULL;
	_data_->_tmp17_ = rygel_external_container_create_media_objects_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
	_data_->_result_ = _data_->_tmp17_;
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_data_->children_props = (_vala_array_free (_data_->children_props, _data_->children_props_length1, (GDestroyNotify) g_hash_table_unref), NULL);
		_data_->filter = (_vala_array_free (_data_->filter, _data_->filter_length1, (GDestroyNotify) g_free), NULL);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp18_ = _data_->_result_;
	_data_->_tmp19_ = _data_->sort_criteria;
	rygel_media_objects_sort_by_criteria (_data_->_tmp18_, _data_->_tmp19_);
	_data_->result = _data_->_result_;
	_data_->children_props = (_vala_array_free (_data_->children_props, _data_->children_props_length1, (GDestroyNotify) g_hash_table_unref), NULL);
	_data_->filter = (_vala_array_free (_data_->filter, _data_->filter_length1, (GDestroyNotify) g_free), NULL);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_object_unref0 (_data_->_result_);
	_data_->children_props = (_vala_array_free (_data_->children_props, _data_->children_props_length1, (GDestroyNotify) g_hash_table_unref), NULL);
	_data_->filter = (_vala_array_free (_data_->filter, _data_->filter_length1, (GDestroyNotify) g_free), NULL);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void rygel_external_container_real_search_data_free (gpointer _data) {
	RygelExternalContainerSearchData* _data_;
	_data_ = _data;
	_rygel_search_expression_unref0 (_data_->expression);
	_g_free0 (_data_->sort_criteria);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (RygelExternalContainerSearchData, _data_);
}


static gpointer _rygel_search_expression_ref0 (gpointer self) {
	return self ? rygel_search_expression_ref (self) : NULL;
}


static void rygel_external_container_real_search (RygelSearchableContainer* base, RygelSearchExpression* expression, guint offset, guint max_count, const gchar* sort_criteria, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelExternalContainer * self;
	RygelExternalContainerSearchData* _data_;
	RygelExternalContainer* _tmp0_;
	RygelSearchExpression* _tmp1_;
	RygelSearchExpression* _tmp2_;
	guint _tmp3_;
	guint _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_;
	GCancellable* _tmp7_;
	GCancellable* _tmp8_;
	self = (RygelExternalContainer*) base;
	_data_ = g_slice_new0 (RygelExternalContainerSearchData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, rygel_external_container_real_search);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_external_container_real_search_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = expression;
	_tmp2_ = _rygel_search_expression_ref0 (_tmp1_);
	_rygel_search_expression_unref0 (_data_->expression);
	_data_->expression = _tmp2_;
	_tmp3_ = offset;
	_data_->offset = _tmp3_;
	_tmp4_ = max_count;
	_data_->max_count = _tmp4_;
	_tmp5_ = sort_criteria;
	_tmp6_ = g_strdup (_tmp5_);
	_g_free0 (_data_->sort_criteria);
	_data_->sort_criteria = _tmp6_;
	_tmp7_ = cancellable;
	_tmp8_ = _g_object_ref0 (_tmp7_);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp8_;
	rygel_external_container_real_search_co (_data_);
}


static RygelMediaObjects* rygel_external_container_real_search_finish (RygelSearchableContainer* base, GAsyncResult* _res_, guint* total_matches, GError** error) {
	RygelMediaObjects* result;
	RygelExternalContainerSearchData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return NULL;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	if (total_matches) {
		*total_matches = _data_->total_matches;
	}
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void rygel_external_container_search_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	RygelExternalContainerSearchData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	rygel_external_container_real_search_co (_data_);
}


static void _vala_array_add4 (gchar*** array, int* length, int* size, gchar* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static void _vala_array_add5 (gchar*** array, int* length, int* size, gchar* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static void _vala_array_add6 (gchar*** array, int* length, int* size, gchar* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static gboolean rygel_external_container_real_search_co (RygelExternalContainerSearchData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp1_ = _data_->expression;
	if (_data_->_tmp1_ == NULL) {
		_data_->_tmp0_ = TRUE;
	} else {
		_data_->_tmp2_ = _data_->self->priv->searchable;
		_data_->_tmp0_ = !_data_->_tmp2_;
	}
	_data_->_tmp3_ = _data_->_tmp0_;
	if (_data_->_tmp3_) {
		_data_->_tmp4_ = _data_->expression;
		_data_->_tmp5_ = _data_->offset;
		_data_->_tmp6_ = _data_->max_count;
		_data_->_tmp7_ = _data_->sort_criteria;
		_data_->_tmp8_ = _data_->cancellable;
		_data_->_tmp9_ = 0U;
		_data_->_state_ = 1;
		rygel_searchable_container_simple_search ((RygelSearchableContainer*) _data_->self, _data_->_tmp4_, _data_->_tmp5_, _data_->_tmp6_, _data_->_tmp7_, _data_->_tmp8_, rygel_external_container_search_ready, _data_);
		return FALSE;
		_state_1:
		_data_->_tmp10_ = NULL;
		_data_->_tmp10_ = rygel_searchable_container_simple_search_finish ((RygelSearchableContainer*) _data_->self, _data_->_res_, &_data_->_tmp9_, &_data_->_inner_error_);
		_data_->total_matches = _data_->_tmp9_;
		_data_->_tmp11_ = _data_->_tmp10_;
		if (_data_->_inner_error_ != NULL) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->result = _data_->_tmp11_;
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp12_ = NULL;
	_data_->_tmp12_ = g_new0 (gchar*, 0 + 1);
	_data_->filter = _data_->_tmp12_;
	_data_->filter_length1 = 0;
	_data_->_filter_size_ = _data_->filter_length1;
	{
		_data_->object_prop_collection_length1 = 0;
		_data_->_object_prop_collection_size_ = 0;
		_data_->object_prop_collection = RYGEL_EXTERNAL_MEDIA_OBJECT_PROXY_PROPERTIES;
		_data_->object_prop_collection_length1 = G_N_ELEMENTS (RYGEL_EXTERNAL_MEDIA_OBJECT_PROXY_PROPERTIES);
		for (_data_->object_prop_it = 0; _data_->object_prop_it < G_N_ELEMENTS (RYGEL_EXTERNAL_MEDIA_OBJECT_PROXY_PROPERTIES); _data_->object_prop_it = _data_->object_prop_it + 1) {
			_data_->object_prop = _data_->object_prop_collection[_data_->object_prop_it];
			{
				_data_->_tmp13_ = _data_->filter;
				_data_->_tmp13__length1 = _data_->filter_length1;
				_data_->_tmp14_ = _data_->object_prop;
				_data_->_tmp15_ = g_strdup (_data_->_tmp14_);
				_vala_array_add4 (&_data_->filter, &_data_->filter_length1, &_data_->_filter_size_, _data_->_tmp15_);
			}
		}
	}
	{
		_data_->container_prop_collection_length1 = 0;
		_data_->_container_prop_collection_size_ = 0;
		_data_->container_prop_collection = RYGEL_EXTERNAL_MEDIA_CONTAINER_PROXY_PROPERTIES;
		_data_->container_prop_collection_length1 = G_N_ELEMENTS (RYGEL_EXTERNAL_MEDIA_CONTAINER_PROXY_PROPERTIES);
		for (_data_->container_prop_it = 0; _data_->container_prop_it < G_N_ELEMENTS (RYGEL_EXTERNAL_MEDIA_CONTAINER_PROXY_PROPERTIES); _data_->container_prop_it = _data_->container_prop_it + 1) {
			_data_->container_prop = _data_->container_prop_collection[_data_->container_prop_it];
			{
				_data_->_tmp16_ = _data_->filter;
				_data_->_tmp16__length1 = _data_->filter_length1;
				_data_->_tmp17_ = _data_->container_prop;
				_data_->_tmp18_ = g_strdup (_data_->_tmp17_);
				_vala_array_add5 (&_data_->filter, &_data_->filter_length1, &_data_->_filter_size_, _data_->_tmp18_);
			}
		}
	}
	{
		_data_->item_prop_collection_length1 = 0;
		_data_->_item_prop_collection_size_ = 0;
		_data_->item_prop_collection = RYGEL_EXTERNAL_MEDIA_ITEM_PROXY_PROPERTIES;
		_data_->item_prop_collection_length1 = G_N_ELEMENTS (RYGEL_EXTERNAL_MEDIA_ITEM_PROXY_PROPERTIES);
		for (_data_->item_prop_it = 0; _data_->item_prop_it < G_N_ELEMENTS (RYGEL_EXTERNAL_MEDIA_ITEM_PROXY_PROPERTIES); _data_->item_prop_it = _data_->item_prop_it + 1) {
			_data_->item_prop = _data_->item_prop_collection[_data_->item_prop_it];
			{
				_data_->_tmp19_ = _data_->filter;
				_data_->_tmp19__length1 = _data_->filter_length1;
				_data_->_tmp20_ = _data_->item_prop;
				_data_->_tmp21_ = g_strdup (_data_->_tmp20_);
				_vala_array_add6 (&_data_->filter, &_data_->filter_length1, &_data_->_filter_size_, _data_->_tmp21_);
			}
		}
	}
	_data_->_tmp22_ = _data_->expression;
	_data_->_tmp23_ = NULL;
	_data_->_tmp23_ = rygel_external_container_translate_expression (_data_->self, _data_->_tmp22_);
	_data_->ext_expression = _data_->_tmp23_;
	_data_->_tmp24_ = _data_->self->actual_container;
	_data_->_tmp25_ = _data_->ext_expression;
	_data_->_tmp26_ = NULL;
	_data_->_tmp26_ = rygel_search_expression_to_string (_data_->_tmp25_);
	_data_->_tmp27_ = _data_->_tmp26_;
	_data_->_tmp28_ = _data_->offset;
	_data_->_tmp29_ = _data_->max_count;
	_data_->_tmp30_ = _data_->filter;
	_data_->_tmp30__length1 = _data_->filter_length1;
	_data_->_tmp31_ = 0;
	_data_->_state_ = 2;
	rygel_external_media_container_proxy_search_objects (_data_->_tmp24_, _data_->_tmp27_, _data_->_tmp28_, _data_->_tmp29_, _data_->_tmp30_, _data_->_tmp30__length1, rygel_external_container_search_ready, _data_);
	return FALSE;
	_state_2:
	_data_->_tmp32_ = NULL;
	_data_->_tmp32_ = rygel_external_media_container_proxy_search_objects_finish (_data_->_tmp24_, _data_->_res_, &_data_->_tmp31_, &_data_->_inner_error_);
	_data_->_tmp33_ = _data_->_tmp32_;
	_data_->_tmp33__length1 = _data_->_tmp31_;
	_g_free0 (_data_->_tmp27_);
	_data_->_result_ = _data_->_tmp33_;
	_data_->_result__length1 = _data_->_tmp33__length1;
	_data_->__result__size_ = _data_->_result__length1;
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_rygel_search_expression_unref0 (_data_->ext_expression);
		_data_->filter = (_vala_array_free (_data_->filter, _data_->filter_length1, (GDestroyNotify) g_free), NULL);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp34_ = _data_->_result_;
	_data_->_tmp34__length1 = _data_->_result__length1;
	_data_->total_matches = (guint) _data_->_tmp34__length1;
	_data_->_tmp35_ = _data_->_result_;
	_data_->_tmp35__length1 = _data_->_result__length1;
	_data_->_state_ = 3;
	rygel_external_container_create_media_objects (_data_->self, _data_->_tmp35_, _data_->_tmp35__length1, NULL, rygel_external_container_search_ready, _data_);
	return FALSE;
	_state_3:
	_data_->_tmp36_ = NULL;
	_data_->_tmp36_ = rygel_external_container_create_media_objects_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
	_data_->objects = _data_->_tmp36_;
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_data_->_result_ = (_vala_array_free (_data_->_result_, _data_->_result__length1, (GDestroyNotify) g_hash_table_unref), NULL);
		_rygel_search_expression_unref0 (_data_->ext_expression);
		_data_->filter = (_vala_array_free (_data_->filter, _data_->filter_length1, (GDestroyNotify) g_free), NULL);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp37_ = _data_->objects;
	_data_->_tmp38_ = _data_->sort_criteria;
	rygel_media_objects_sort_by_criteria (_data_->_tmp37_, _data_->_tmp38_);
	_data_->result = _data_->objects;
	_data_->_result_ = (_vala_array_free (_data_->_result_, _data_->_result__length1, (GDestroyNotify) g_hash_table_unref), NULL);
	_rygel_search_expression_unref0 (_data_->ext_expression);
	_data_->filter = (_vala_array_free (_data_->filter, _data_->filter_length1, (GDestroyNotify) g_free), NULL);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_object_unref0 (_data_->objects);
	_data_->_result_ = (_vala_array_free (_data_->_result_, _data_->_result__length1, (GDestroyNotify) g_hash_table_unref), NULL);
	_rygel_search_expression_unref0 (_data_->ext_expression);
	_data_->filter = (_vala_array_free (_data_->filter, _data_->filter_length1, (GDestroyNotify) g_free), NULL);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void rygel_external_container_real_find_object_data_free (gpointer _data) {
	RygelExternalContainerFindObjectData* _data_;
	_data_ = _data;
	_g_free0 (_data_->id);
	_g_object_unref0 (_data_->cancellable);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (RygelExternalContainerFindObjectData, _data_);
}


static void rygel_external_container_real_find_object (RygelMediaContainer* base, const gchar* id, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelExternalContainer * self;
	RygelExternalContainerFindObjectData* _data_;
	RygelExternalContainer* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	GCancellable* _tmp3_;
	GCancellable* _tmp4_;
	self = (RygelExternalContainer*) base;
	_data_ = g_slice_new0 (RygelExternalContainerFindObjectData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, rygel_external_container_real_find_object);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_external_container_real_find_object_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = id;
	_tmp2_ = g_strdup (_tmp1_);
	_g_free0 (_data_->id);
	_data_->id = _tmp2_;
	_tmp3_ = cancellable;
	_tmp4_ = _g_object_ref0 (_tmp3_);
	_g_object_unref0 (_data_->cancellable);
	_data_->cancellable = _tmp4_;
	rygel_external_container_real_find_object_co (_data_);
}


static RygelMediaObject* rygel_external_container_real_find_object_finish (RygelMediaContainer* base, GAsyncResult* _res_, GError** error) {
	RygelMediaObject* result;
	RygelExternalContainerFindObjectData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return NULL;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static void rygel_external_container_find_object_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	RygelExternalContainerFindObjectData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	rygel_external_container_real_find_object_co (_data_);
}


static guint _variant_get1 (GVariant* value) {
	return g_variant_get_uint32 (value);
}


static gboolean _variant_get2 (GVariant* value) {
	return g_variant_get_boolean (value);
}


static gchar* _variant_get3 (GVariant* value) {
	return g_variant_dup_string (value, NULL);
}


static gboolean rygel_external_container_real_find_object_co (RygelExternalContainerFindObjectData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		case 5:
		goto _state_5;
		case 6:
		goto _state_6;
		case 7:
		goto _state_7;
		case 8:
		goto _state_8;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->media_object = NULL;
	_data_->_tmp0_ = _data_->self->service_name;
	_data_->_tmp1_ = _data_->id;
	_data_->_state_ = 1;
	g_async_initable_new_async (RYGEL_EXTERNAL_TYPE_MEDIA_OBJECT_PROXY_PROXY, 0, NULL, rygel_external_container_find_object_ready, _data_, "g-flags", 0, "g-name", _data_->_tmp0_, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", _data_->_tmp1_, "g-interface-name", "org.gnome.UPnP.MediaObject2", NULL);
	return FALSE;
	_state_1:
	_data_->_tmp2_ = NULL;
	_data_->_tmp2_ = g_async_initable_new_finish (_data_->_source_object_, _data_->_res_, &_data_->_inner_error_);
	_data_->actual_object = (RygelExternalMediaObjectProxy*) _data_->_tmp2_;
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_g_object_unref0 (_data_->media_object);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp3_ = _data_->actual_object;
	_data_->_tmp4_ = rygel_external_media_object_proxy_get_object_type (_data_->_tmp3_);
	_data_->_tmp5_ = _data_->_tmp4_;
	_data_->_tmp6_ = _data_->_tmp5_;
	_data_->_tmp7_ = g_strcmp0 (_data_->_tmp6_, "container") == 0;
	_g_free0 (_data_->_tmp6_);
	if (_data_->_tmp7_) {
		_data_->_tmp8_ = _data_->id;
		_data_->_tmp9_ = NULL;
		_data_->_tmp9_ = rygel_external_container_find_container_by_id (_data_->self, _data_->_tmp8_);
		_g_object_unref0 (_data_->media_object);
		_data_->media_object = (RygelMediaObject*) _data_->_tmp9_;
		_data_->_tmp10_ = _data_->media_object;
		if (_data_->_tmp10_ == NULL) {
			{
				_data_->_tmp11_ = _data_->self->priv->containers;
				_data_->_tmp12_ = _g_object_ref0 (_data_->_tmp11_);
				_data_->_container_list = _data_->_tmp12_;
				_data_->_tmp13_ = _data_->_container_list;
				_data_->_tmp14_ = gee_abstract_collection_get_size ((GeeCollection*) _data_->_tmp13_);
				_data_->_tmp15_ = _data_->_tmp14_;
				_data_->_container_size = _data_->_tmp15_;
				_data_->_container_index = -1;
				while (TRUE) {
					_data_->_tmp16_ = _data_->_container_index;
					_data_->_container_index = _data_->_tmp16_ + 1;
					_data_->_tmp17_ = _data_->_container_index;
					_data_->_tmp18_ = _data_->_container_size;
					if (!(_data_->_tmp17_ < _data_->_tmp18_)) {
						break;
					}
					_data_->_tmp19_ = _data_->_container_list;
					_data_->_tmp20_ = _data_->_container_index;
					_data_->_tmp21_ = NULL;
					_data_->_tmp21_ = gee_abstract_list_get ((GeeAbstractList*) _data_->_tmp19_, _data_->_tmp20_);
					_data_->container = (RygelExternalContainer*) _data_->_tmp21_;
					_data_->_tmp22_ = _data_->container;
					_data_->_tmp23_ = _data_->id;
					_data_->_tmp24_ = _data_->cancellable;
					_data_->_state_ = 2;
					rygel_media_container_find_object ((RygelMediaContainer*) _data_->_tmp22_, _data_->_tmp23_, _data_->_tmp24_, rygel_external_container_find_object_ready, _data_);
					return FALSE;
					_state_2:
					_data_->_tmp25_ = NULL;
					_data_->_tmp25_ = rygel_media_container_find_object_finish ((RygelMediaContainer*) _data_->_tmp22_, _data_->_res_, &_data_->_inner_error_);
					_data_->_tmp26_ = _data_->_tmp25_;
					if (_data_->_inner_error_ != NULL) {
						g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
						g_error_free (_data_->_inner_error_);
						_g_object_unref0 (_data_->container);
						_g_object_unref0 (_data_->_container_list);
						_g_object_unref0 (_data_->actual_object);
						_g_object_unref0 (_data_->media_object);
						if (_data_->_state_ == 0) {
							g_simple_async_result_complete_in_idle (_data_->_async_result);
						} else {
							g_simple_async_result_complete (_data_->_async_result);
						}
						g_object_unref (_data_->_async_result);
						return FALSE;
					}
					_g_object_unref0 (_data_->media_object);
					_data_->media_object = _data_->_tmp26_;
					_data_->_tmp27_ = _data_->media_object;
					if (_data_->_tmp27_ != NULL) {
						_g_object_unref0 (_data_->container);
						break;
					}
					_g_object_unref0 (_data_->container);
				}
				_g_object_unref0 (_data_->_container_list);
			}
			_data_->_tmp28_ = _data_->self->service_name;
			_data_->_tmp29_ = _data_->id;
			_data_->_state_ = 3;
			g_async_initable_new_async (FREE_DESKTOP_TYPE_PROPERTIES_PROXY, 0, NULL, rygel_external_container_find_object_ready, _data_, "g-flags", G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, "g-name", _data_->_tmp28_, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", _data_->_tmp29_, "g-interface-name", "org.freedesktop.DBus.Properties", NULL);
			return FALSE;
			_state_3:
			_data_->_tmp30_ = NULL;
			_data_->_tmp30_ = g_async_initable_new_finish (_data_->_source_object_, _data_->_res_, &_data_->_inner_error_);
			_data_->props_iface = (FreeDesktopProperties*) _data_->_tmp30_;
			if (_data_->_inner_error_ != NULL) {
				g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
				g_error_free (_data_->_inner_error_);
				_g_object_unref0 (_data_->actual_object);
				_g_object_unref0 (_data_->media_object);
				if (_data_->_state_ == 0) {
					g_simple_async_result_complete_in_idle (_data_->_async_result);
				} else {
					g_simple_async_result_complete (_data_->_async_result);
				}
				g_object_unref (_data_->_async_result);
				return FALSE;
			}
			_data_->_tmp31_ = _data_->props_iface;
			_data_->_state_ = 4;
			free_desktop_properties_get_all (_data_->_tmp31_, RYGEL_EXTERNAL_MEDIA_CONTAINER_PROXY_IFACE, rygel_external_container_find_object_ready, _data_);
			return FALSE;
			_state_4:
			_data_->_tmp32_ = NULL;
			_data_->_tmp32_ = free_desktop_properties_get_all_finish (_data_->_tmp31_, _data_->_res_, &_data_->_inner_error_);
			_data_->props = _data_->_tmp32_;
			if (_data_->_inner_error_ != NULL) {
				g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
				g_error_free (_data_->_inner_error_);
				_g_object_unref0 (_data_->props_iface);
				_g_object_unref0 (_data_->actual_object);
				_g_object_unref0 (_data_->media_object);
				if (_data_->_state_ == 0) {
					g_simple_async_result_complete_in_idle (_data_->_async_result);
				} else {
					g_simple_async_result_complete (_data_->_async_result);
				}
				g_object_unref (_data_->_async_result);
				return FALSE;
			}
			_data_->_tmp33_ = _data_->props;
			_data_->_tmp34_ = NULL;
			_data_->_tmp34_ = g_hash_table_lookup (_data_->_tmp33_, "ChildCount");
			_data_->_tmp35_ = _variant_get1 ((GVariant*) _data_->_tmp34_);
			_data_->child_count = _data_->_tmp35_;
			_data_->_tmp36_ = _data_->props;
			_data_->_tmp37_ = NULL;
			_data_->_tmp37_ = g_hash_table_lookup (_data_->_tmp36_, "Searchable");
			_data_->_tmp38_ = _variant_get2 ((GVariant*) _data_->_tmp37_);
			_data_->searchable = _data_->_tmp38_;
			_data_->_tmp39_ = _data_->props_iface;
			_data_->_state_ = 5;
			free_desktop_properties_get_all (_data_->_tmp39_, RYGEL_EXTERNAL_MEDIA_OBJECT_PROXY_IFACE, rygel_external_container_find_object_ready, _data_);
			return FALSE;
			_state_5:
			_data_->_tmp40_ = NULL;
			_data_->_tmp40_ = free_desktop_properties_get_all_finish (_data_->_tmp39_, _data_->_res_, &_data_->_inner_error_);
			_data_->_tmp41_ = _data_->_tmp40_;
			if (_data_->_inner_error_ != NULL) {
				g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
				g_error_free (_data_->_inner_error_);
				_g_hash_table_unref0 (_data_->props);
				_g_object_unref0 (_data_->props_iface);
				_g_object_unref0 (_data_->actual_object);
				_g_object_unref0 (_data_->media_object);
				if (_data_->_state_ == 0) {
					g_simple_async_result_complete_in_idle (_data_->_async_result);
				} else {
					g_simple_async_result_complete (_data_->_async_result);
				}
				g_object_unref (_data_->_async_result);
				return FALSE;
			}
			_g_hash_table_unref0 (_data_->props);
			_data_->props = _data_->_tmp41_;
			_data_->_tmp42_ = _data_->props;
			_data_->_tmp43_ = NULL;
			_data_->_tmp43_ = g_hash_table_lookup (_data_->_tmp42_, "Path");
			_data_->_tmp44_ = _variant_get3 ((GVariant*) _data_->_tmp43_);
			_data_->path = _data_->_tmp44_;
			_data_->_tmp45_ = _data_->props;
			_data_->_tmp46_ = _data_->path;
			_data_->_tmp47_ = _data_->self->service_name;
			_data_->_tmp48_ = NULL;
			_data_->_tmp48_ = rygel_external_get_mandatory_string_value (_data_->_tmp45_, "DisplayName", _data_->_tmp46_, _data_->_tmp47_);
			_data_->_tmp49_ = _data_->_tmp48_;
			rygel_media_object_set_title ((RygelMediaObject*) _data_->self, _data_->_tmp49_);
			_g_free0 (_data_->_tmp49_);
			_data_->_tmp50_ = _data_->path;
			_data_->_tmp51_ = rygel_media_object_get_title ((RygelMediaObject*) _data_->self);
			_data_->_tmp52_ = _data_->_tmp51_;
			_data_->_tmp53_ = _data_->child_count;
			_data_->_tmp54_ = _data_->searchable;
			_data_->_tmp55_ = _data_->self->service_name;
			_data_->_tmp56_ = _data_->path;
			_data_->_tmp57_ = rygel_external_container_new (_data_->_tmp50_, _data_->_tmp52_, _data_->_tmp53_, _data_->_tmp54_, _data_->_tmp55_, _data_->_tmp56_, _data_->self, &_data_->_inner_error_);
			_data_->_tmp58_ = _data_->_tmp57_;
			if (_data_->_inner_error_ != NULL) {
				g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
				g_error_free (_data_->_inner_error_);
				_g_free0 (_data_->path);
				_g_hash_table_unref0 (_data_->props);
				_g_object_unref0 (_data_->props_iface);
				_g_object_unref0 (_data_->actual_object);
				_g_object_unref0 (_data_->media_object);
				if (_data_->_state_ == 0) {
					g_simple_async_result_complete_in_idle (_data_->_async_result);
				} else {
					g_simple_async_result_complete (_data_->_async_result);
				}
				g_object_unref (_data_->_async_result);
				return FALSE;
			}
			_g_object_unref0 (_data_->media_object);
			_data_->media_object = (RygelMediaObject*) _data_->_tmp58_;
			_g_free0 (_data_->path);
			_g_hash_table_unref0 (_data_->props);
			_g_object_unref0 (_data_->props_iface);
		}
	} else {
		_data_->_tmp59_ = _data_->actual_object;
		_data_->_tmp60_ = rygel_external_media_object_proxy_get_parent (_data_->_tmp59_);
		_data_->_tmp61_ = _data_->_tmp60_;
		_data_->_tmp62_ = (gchar*) _data_->_tmp61_;
		_data_->_tmp63_ = rygel_external_dummy_container_new (_data_->_tmp62_, "LaLaLa", (guint) 0, NULL);
		_data_->_tmp64_ = _data_->_tmp63_;
		_g_free0 (_data_->_tmp62_);
		_data_->parent_container = _data_->_tmp64_;
		_data_->_tmp65_ = _data_->self->service_name;
		_data_->_tmp66_ = _data_->id;
		_data_->_state_ = 6;
		g_async_initable_new_async (FREE_DESKTOP_TYPE_PROPERTIES_PROXY, 0, NULL, rygel_external_container_find_object_ready, _data_, "g-flags", G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, "g-name", _data_->_tmp65_, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", _data_->_tmp66_, "g-interface-name", "org.freedesktop.DBus.Properties", NULL);
		return FALSE;
		_state_6:
		_data_->_tmp67_ = NULL;
		_data_->_tmp67_ = g_async_initable_new_finish (_data_->_source_object_, _data_->_res_, &_data_->_inner_error_);
		_data_->_vala1_props_iface = (FreeDesktopProperties*) _data_->_tmp67_;
		if (_data_->_inner_error_ != NULL) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			_g_object_unref0 (_data_->parent_container);
			_g_object_unref0 (_data_->actual_object);
			_g_object_unref0 (_data_->media_object);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp68_ = _data_->_vala1_props_iface;
		_data_->_state_ = 7;
		free_desktop_properties_get_all (_data_->_tmp68_, RYGEL_EXTERNAL_MEDIA_ITEM_PROXY_IFACE, rygel_external_container_find_object_ready, _data_);
		return FALSE;
		_state_7:
		_data_->_tmp69_ = NULL;
		_data_->_tmp69_ = free_desktop_properties_get_all_finish (_data_->_tmp68_, _data_->_res_, &_data_->_inner_error_);
		_data_->_vala1_props = _data_->_tmp69_;
		if (_data_->_inner_error_ != NULL) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			_g_object_unref0 (_data_->_vala1_props_iface);
			_g_object_unref0 (_data_->parent_container);
			_g_object_unref0 (_data_->actual_object);
			_g_object_unref0 (_data_->media_object);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_data_->_tmp70_ = _data_->self->priv->item_factory;
		_data_->_tmp71_ = _data_->id;
		_data_->_tmp72_ = _data_->actual_object;
		_data_->_tmp73_ = rygel_external_media_object_proxy_get_object_type (_data_->_tmp72_);
		_data_->_tmp74_ = _data_->_tmp73_;
		_data_->_tmp75_ = _data_->_tmp74_;
		_data_->_tmp76_ = _data_->actual_object;
		_data_->_tmp77_ = rygel_external_media_object_proxy_get_display_name (_data_->_tmp76_);
		_data_->_tmp78_ = _data_->_tmp77_;
		_data_->_tmp79_ = _data_->_tmp78_;
		_data_->_tmp80_ = _data_->_vala1_props;
		_data_->_tmp81_ = _data_->self->service_name;
		_data_->_tmp82_ = _data_->parent_container;
		_data_->_state_ = 8;
		rygel_external_item_factory_create (_data_->_tmp70_, _data_->_tmp71_, _data_->_tmp75_, _data_->_tmp79_, _data_->_tmp80_, _data_->_tmp81_, (RygelMediaContainer*) _data_->_tmp82_, rygel_external_container_find_object_ready, _data_);
		return FALSE;
		_state_8:
		_data_->_tmp83_ = NULL;
		_data_->_tmp83_ = rygel_external_item_factory_create_finish (_data_->_tmp70_, _data_->_res_, &_data_->_inner_error_);
		_data_->_tmp84_ = _data_->_tmp83_;
		_g_free0 (_data_->_tmp79_);
		_g_free0 (_data_->_tmp75_);
		_data_->_tmp85_ = _data_->_tmp84_;
		if (_data_->_inner_error_ != NULL) {
			g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
			g_error_free (_data_->_inner_error_);
			_g_hash_table_unref0 (_data_->_vala1_props);
			_g_object_unref0 (_data_->_vala1_props_iface);
			_g_object_unref0 (_data_->parent_container);
			_g_object_unref0 (_data_->actual_object);
			_g_object_unref0 (_data_->media_object);
			if (_data_->_state_ == 0) {
				g_simple_async_result_complete_in_idle (_data_->_async_result);
			} else {
				g_simple_async_result_complete (_data_->_async_result);
			}
			g_object_unref (_data_->_async_result);
			return FALSE;
		}
		_g_object_unref0 (_data_->media_object);
		_data_->media_object = (RygelMediaObject*) _data_->_tmp85_;
		_g_hash_table_unref0 (_data_->_vala1_props);
		_g_object_unref0 (_data_->_vala1_props_iface);
		_g_object_unref0 (_data_->parent_container);
	}
	_data_->result = _data_->media_object;
	_g_object_unref0 (_data_->actual_object);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_object_unref0 (_data_->actual_object);
	_g_object_unref0 (_data_->media_object);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void rygel_external_container_create_media_objects_data_free (gpointer _data) {
	RygelExternalContainerCreateMediaObjectsData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->parent);
	_g_object_unref0 (_data_->result);
	_g_object_unref0 (_data_->self);
	g_slice_free (RygelExternalContainerCreateMediaObjectsData, _data_);
}


static void rygel_external_container_create_media_objects (RygelExternalContainer* self, GHashTable** all_props, int all_props_length1, RygelMediaContainer* parent, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelExternalContainerCreateMediaObjectsData* _data_;
	RygelExternalContainer* _tmp0_;
	GHashTable** _tmp1_;
	gint _tmp1__length1;
	RygelMediaContainer* _tmp2_;
	RygelMediaContainer* _tmp3_;
	_data_ = g_slice_new0 (RygelExternalContainerCreateMediaObjectsData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, rygel_external_container_create_media_objects);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_external_container_create_media_objects_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = all_props;
	_tmp1__length1 = all_props_length1;
	_data_->all_props = _tmp1_;
	_data_->all_props_length1 = _tmp1__length1;
	_tmp2_ = parent;
	_tmp3_ = _g_object_ref0 (_tmp2_);
	_g_object_unref0 (_data_->parent);
	_data_->parent = _tmp3_;
	rygel_external_container_create_media_objects_co (_data_);
}


static RygelMediaObjects* rygel_external_container_create_media_objects_finish (RygelExternalContainer* self, GAsyncResult* _res_, GError** error) {
	RygelMediaObjects* result;
	RygelExternalContainerCreateMediaObjectsData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return NULL;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
	result = _data_->result;
	_data_->result = NULL;
	return result;
}


static gpointer _g_hash_table_ref0 (gpointer self) {
	return self ? g_hash_table_ref (self) : NULL;
}


static gchar* _variant_get4 (GVariant* value) {
	return g_variant_dup_string (value, NULL);
}


static gchar* _variant_get5 (GVariant* value) {
	return g_variant_dup_string (value, NULL);
}


static gchar* _variant_get6 (GVariant* value) {
	return g_variant_dup_string (value, NULL);
}


static guint _variant_get7 (GVariant* value) {
	return g_variant_get_uint32 (value);
}


static void rygel_external_container_create_media_objects_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	RygelExternalContainerCreateMediaObjectsData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	rygel_external_container_create_media_objects_co (_data_);
}


static gboolean rygel_external_container_create_media_objects_co (RygelExternalContainerCreateMediaObjectsData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = rygel_media_objects_new ();
	_data_->media_objects = _data_->_tmp0_;
	_data_->_tmp1_ = _data_->all_props;
	_data_->_tmp1__length1 = _data_->all_props_length1;
	{
		_data_->props_collection_length1 = 0;
		_data_->_props_collection_size_ = 0;
		_data_->props_collection = _data_->_tmp1_;
		_data_->props_collection_length1 = _data_->_tmp1__length1;
		for (_data_->props_it = 0; _data_->props_it < _data_->_tmp1__length1; _data_->props_it = _data_->props_it + 1) {
			_data_->_tmp2_ = _g_hash_table_ref0 (_data_->props_collection[_data_->props_it]);
			_data_->props = _data_->_tmp2_;
			{
				_data_->_tmp3_ = _data_->props;
				_data_->_tmp4_ = NULL;
				_data_->_tmp4_ = g_hash_table_lookup (_data_->_tmp3_, "Path");
				_data_->_tmp5_ = _variant_get4 ((GVariant*) _data_->_tmp4_);
				_data_->id = _data_->_tmp5_;
				_data_->_tmp6_ = _data_->props;
				_data_->_tmp7_ = NULL;
				_data_->_tmp7_ = g_hash_table_lookup (_data_->_tmp6_, "Type");
				_data_->_tmp8_ = _variant_get5 ((GVariant*) _data_->_tmp7_);
				_data_->type = _data_->_tmp8_;
				_data_->_tmp9_ = _data_->parent;
				if (_data_->_tmp9_ != NULL) {
					_data_->_tmp10_ = _data_->parent;
					_data_->_tmp11_ = _g_object_ref0 (_data_->_tmp10_);
					_g_object_unref0 (_data_->parent_container);
					_data_->parent_container = _data_->_tmp11_;
				} else {
					_data_->_tmp12_ = _data_->props;
					_data_->_tmp13_ = NULL;
					_data_->_tmp13_ = g_hash_table_lookup (_data_->_tmp12_, "Parent");
					_data_->_tmp14_ = _variant_get6 ((GVariant*) _data_->_tmp13_);
					_data_->parent_id = _data_->_tmp14_;
					_data_->_tmp15_ = _data_->parent_id;
					_data_->_tmp16_ = rygel_external_dummy_container_new (_data_->_tmp15_, "LaLaLa", (guint) 0, NULL);
					_g_object_unref0 (_data_->parent_container);
					_data_->parent_container = (RygelMediaContainer*) _data_->_tmp16_;
					_g_free0 (_data_->parent_id);
				}
				_data_->media_object = NULL;
				_data_->_tmp17_ = _data_->type;
				if (g_strcmp0 (_data_->_tmp17_, "container") == 0) {
					_data_->_tmp18_ = _data_->id;
					_data_->_tmp19_ = NULL;
					_data_->_tmp19_ = rygel_external_container_find_container_by_id (_data_->self, _data_->_tmp18_);
					_g_object_unref0 (_data_->media_object);
					_data_->media_object = (RygelMediaObject*) _data_->_tmp19_;
				}
				_data_->_tmp20_ = _data_->media_object;
				if (_data_->_tmp20_ == NULL) {
					_data_->_tmp21_ = _data_->props;
					_data_->_tmp22_ = _data_->id;
					_data_->_tmp23_ = _data_->self->service_name;
					_data_->_tmp24_ = NULL;
					_data_->_tmp24_ = rygel_external_get_mandatory_string_value (_data_->_tmp21_, "DisplayName", _data_->_tmp22_, _data_->_tmp23_);
					_data_->_tmp25_ = _data_->_tmp24_;
					rygel_media_object_set_title ((RygelMediaObject*) _data_->self, _data_->_tmp25_);
					_g_free0 (_data_->_tmp25_);
					_data_->_tmp26_ = _data_->type;
					if (g_strcmp0 (_data_->_tmp26_, "container") == 0) {
						_data_->_tmp27_ = _data_->props;
						_data_->_tmp28_ = NULL;
						_data_->_tmp28_ = g_hash_table_lookup (_data_->_tmp27_, "ChildCount");
						_data_->_tmp29_ = _variant_get7 ((GVariant*) _data_->_tmp28_);
						_data_->child_count = _data_->_tmp29_;
						_data_->_tmp30_ = _data_->id;
						_data_->_tmp31_ = rygel_media_object_get_title ((RygelMediaObject*) _data_->self);
						_data_->_tmp32_ = _data_->_tmp31_;
						_data_->_tmp33_ = _data_->child_count;
						_data_->_tmp34_ = _data_->parent_container;
						_data_->_tmp35_ = rygel_external_dummy_container_new (_data_->_tmp30_, _data_->_tmp32_, _data_->_tmp33_, _data_->_tmp34_);
						_g_object_unref0 (_data_->media_object);
						_data_->media_object = (RygelMediaObject*) _data_->_tmp35_;
					} else {
						_data_->_tmp36_ = _data_->self->priv->item_factory;
						_data_->_tmp37_ = _data_->id;
						_data_->_tmp38_ = _data_->type;
						_data_->_tmp39_ = rygel_media_object_get_title ((RygelMediaObject*) _data_->self);
						_data_->_tmp40_ = _data_->_tmp39_;
						_data_->_tmp41_ = _data_->props;
						_data_->_tmp42_ = _data_->self->service_name;
						_data_->_tmp43_ = _data_->parent_container;
						_data_->_state_ = 1;
						rygel_external_item_factory_create (_data_->_tmp36_, _data_->_tmp37_, _data_->_tmp38_, _data_->_tmp40_, _data_->_tmp41_, _data_->_tmp42_, _data_->_tmp43_, rygel_external_container_create_media_objects_ready, _data_);
						return FALSE;
						_state_1:
						_data_->_tmp44_ = NULL;
						_data_->_tmp44_ = rygel_external_item_factory_create_finish (_data_->_tmp36_, _data_->_res_, &_data_->_inner_error_);
						_data_->_tmp45_ = _data_->_tmp44_;
						if (_data_->_inner_error_ != NULL) {
							g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
							g_error_free (_data_->_inner_error_);
							_g_object_unref0 (_data_->media_object);
							_g_object_unref0 (_data_->parent_container);
							_g_free0 (_data_->type);
							_g_free0 (_data_->id);
							_g_hash_table_unref0 (_data_->props);
							_g_object_unref0 (_data_->media_objects);
							if (_data_->_state_ == 0) {
								g_simple_async_result_complete_in_idle (_data_->_async_result);
							} else {
								g_simple_async_result_complete (_data_->_async_result);
							}
							g_object_unref (_data_->_async_result);
							return FALSE;
						}
						_g_object_unref0 (_data_->media_object);
						_data_->media_object = (RygelMediaObject*) _data_->_tmp45_;
					}
				}
				_data_->_tmp46_ = _data_->media_objects;
				_data_->_tmp47_ = _data_->media_object;
				gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp46_, _data_->_tmp47_);
				_g_object_unref0 (_data_->media_object);
				_g_object_unref0 (_data_->parent_container);
				_g_free0 (_data_->type);
				_g_free0 (_data_->id);
				_g_hash_table_unref0 (_data_->props);
			}
		}
	}
	_data_->result = _data_->media_objects;
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
	_g_object_unref0 (_data_->media_objects);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void rygel_external_container_refresh_child_containers_data_free (gpointer _data) {
	RygelExternalContainerRefreshChildContainersData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (RygelExternalContainerRefreshChildContainersData, _data_);
}


static void rygel_external_container_refresh_child_containers (RygelExternalContainer* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelExternalContainerRefreshChildContainersData* _data_;
	RygelExternalContainer* _tmp0_;
	_data_ = g_slice_new0 (RygelExternalContainerRefreshChildContainersData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, rygel_external_container_refresh_child_containers);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_external_container_refresh_child_containers_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	rygel_external_container_refresh_child_containers_co (_data_);
}


static void rygel_external_container_refresh_child_containers_finish (RygelExternalContainer* self, GAsyncResult* _res_, GError** error) {
	RygelExternalContainerRefreshChildContainersData* _data_;
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
		return;
	}
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void _vala_array_add7 (gchar*** array, int* length, int* size, gchar* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static void _vala_array_add8 (gchar*** array, int* length, int* size, gchar* value) {
	if ((*length) == (*size)) {
		*size = (*size) ? (2 * (*size)) : 4;
		*array = g_renew (gchar*, *array, (*size) + 1);
	}
	(*array)[(*length)++] = value;
	(*array)[*length] = NULL;
}


static void rygel_external_container_refresh_child_containers_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	RygelExternalContainerRefreshChildContainersData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	rygel_external_container_refresh_child_containers_co (_data_);
}


static gchar* _variant_get8 (GVariant* value) {
	return g_variant_dup_string (value, NULL);
}


static gchar* _variant_get9 (GVariant* value) {
	return g_variant_dup_string (value, NULL);
}


static guint _variant_get10 (GVariant* value) {
	return g_variant_get_uint32 (value);
}


static gboolean _variant_get11 (GVariant* value) {
	return g_variant_get_boolean (value);
}


static gboolean rygel_external_container_refresh_child_containers_co (RygelExternalContainerRefreshChildContainersData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = NULL;
	_data_->_tmp0_ = g_new0 (gchar*, 0 + 1);
	_data_->filter = _data_->_tmp0_;
	_data_->filter_length1 = 0;
	_data_->_filter_size_ = _data_->filter_length1;
	{
		_data_->object_prop_collection_length1 = 0;
		_data_->_object_prop_collection_size_ = 0;
		_data_->object_prop_collection = RYGEL_EXTERNAL_MEDIA_OBJECT_PROXY_PROPERTIES;
		_data_->object_prop_collection_length1 = G_N_ELEMENTS (RYGEL_EXTERNAL_MEDIA_OBJECT_PROXY_PROPERTIES);
		for (_data_->object_prop_it = 0; _data_->object_prop_it < G_N_ELEMENTS (RYGEL_EXTERNAL_MEDIA_OBJECT_PROXY_PROPERTIES); _data_->object_prop_it = _data_->object_prop_it + 1) {
			_data_->object_prop = _data_->object_prop_collection[_data_->object_prop_it];
			{
				_data_->_tmp1_ = _data_->filter;
				_data_->_tmp1__length1 = _data_->filter_length1;
				_data_->_tmp2_ = _data_->object_prop;
				_data_->_tmp3_ = g_strdup (_data_->_tmp2_);
				_vala_array_add7 (&_data_->filter, &_data_->filter_length1, &_data_->_filter_size_, _data_->_tmp3_);
			}
		}
	}
	{
		_data_->container_prop_collection_length1 = 0;
		_data_->_container_prop_collection_size_ = 0;
		_data_->container_prop_collection = RYGEL_EXTERNAL_MEDIA_CONTAINER_PROXY_PROPERTIES;
		_data_->container_prop_collection_length1 = G_N_ELEMENTS (RYGEL_EXTERNAL_MEDIA_CONTAINER_PROXY_PROPERTIES);
		for (_data_->container_prop_it = 0; _data_->container_prop_it < G_N_ELEMENTS (RYGEL_EXTERNAL_MEDIA_CONTAINER_PROXY_PROPERTIES); _data_->container_prop_it = _data_->container_prop_it + 1) {
			_data_->container_prop = _data_->container_prop_collection[_data_->container_prop_it];
			{
				_data_->_tmp4_ = _data_->filter;
				_data_->_tmp4__length1 = _data_->filter_length1;
				_data_->_tmp5_ = _data_->container_prop;
				_data_->_tmp6_ = g_strdup (_data_->_tmp5_);
				_vala_array_add8 (&_data_->filter, &_data_->filter_length1, &_data_->_filter_size_, _data_->_tmp6_);
			}
		}
	}
	_data_->_tmp7_ = _data_->self->actual_container;
	_data_->_tmp8_ = _data_->filter;
	_data_->_tmp8__length1 = _data_->filter_length1;
	_data_->_tmp9_ = 0;
	_data_->_state_ = 1;
	rygel_external_media_container_proxy_list_containers (_data_->_tmp7_, (guint) 0, (guint) 0, _data_->_tmp8_, _data_->_tmp8__length1, rygel_external_container_refresh_child_containers_ready, _data_);
	return FALSE;
	_state_1:
	_data_->_tmp10_ = NULL;
	_data_->_tmp10_ = rygel_external_media_container_proxy_list_containers_finish (_data_->_tmp7_, _data_->_res_, &_data_->_tmp9_, &_data_->_inner_error_);
	_data_->children_props = _data_->_tmp10_;
	_data_->children_props_length1 = _data_->_tmp9_;
	_data_->_children_props_size_ = _data_->children_props_length1;
	if (_data_->_inner_error_ != NULL) {
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
		g_error_free (_data_->_inner_error_);
		_data_->filter = (_vala_array_free (_data_->filter, _data_->filter_length1, (GDestroyNotify) g_free), NULL);
		if (_data_->_state_ == 0) {
			g_simple_async_result_complete_in_idle (_data_->_async_result);
		} else {
			g_simple_async_result_complete (_data_->_async_result);
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp11_ = _data_->self->priv->containers;
	gee_abstract_collection_clear ((GeeAbstractCollection*) _data_->_tmp11_);
	_data_->_tmp12_ = _data_->children_props;
	_data_->_tmp12__length1 = _data_->children_props_length1;
	{
		_data_->props_collection_length1 = 0;
		_data_->_props_collection_size_ = 0;
		_data_->props_collection = _data_->_tmp12_;
		_data_->props_collection_length1 = _data_->_tmp12__length1;
		for (_data_->props_it = 0; _data_->props_it < _data_->_tmp12__length1; _data_->props_it = _data_->props_it + 1) {
			_data_->_tmp13_ = _g_hash_table_ref0 (_data_->props_collection[_data_->props_it]);
			_data_->props = _data_->_tmp13_;
			{
				_data_->_tmp14_ = _data_->props;
				_data_->_tmp15_ = NULL;
				_data_->_tmp15_ = g_hash_table_lookup (_data_->_tmp14_, "Path");
				_data_->_tmp16_ = _variant_get8 ((GVariant*) _data_->_tmp15_);
				_data_->path = _data_->_tmp16_;
				_data_->_tmp17_ = _data_->props;
				_data_->_tmp18_ = NULL;
				_data_->_tmp18_ = g_hash_table_lookup (_data_->_tmp17_, "DisplayName");
				_data_->_tmp19_ = _variant_get9 ((GVariant*) _data_->_tmp18_);
				_data_->title = _data_->_tmp19_;
				_data_->_tmp20_ = _data_->props;
				_data_->_tmp21_ = NULL;
				_data_->_tmp21_ = g_hash_table_lookup (_data_->_tmp20_, "ChildCount");
				_data_->_tmp22_ = _variant_get10 ((GVariant*) _data_->_tmp21_);
				_data_->child_count = _data_->_tmp22_;
				_data_->_tmp23_ = _data_->props;
				_data_->_tmp24_ = NULL;
				_data_->_tmp24_ = g_hash_table_lookup (_data_->_tmp23_, "Searchable");
				_data_->_tmp25_ = _variant_get11 ((GVariant*) _data_->_tmp24_);
				_data_->searchable = _data_->_tmp25_;
				_data_->_tmp26_ = _data_->path;
				_data_->_tmp27_ = _data_->title;
				_data_->_tmp28_ = _data_->child_count;
				_data_->_tmp29_ = _data_->searchable;
				_data_->_tmp30_ = _data_->self->service_name;
				_data_->_tmp31_ = _data_->path;
				_data_->_tmp32_ = rygel_external_container_new (_data_->_tmp26_, _data_->_tmp27_, _data_->_tmp28_, _data_->_tmp29_, _data_->_tmp30_, _data_->_tmp31_, _data_->self, &_data_->_inner_error_);
				_data_->container = _data_->_tmp32_;
				if (_data_->_inner_error_ != NULL) {
					g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
					g_error_free (_data_->_inner_error_);
					_g_free0 (_data_->title);
					_g_free0 (_data_->path);
					_g_hash_table_unref0 (_data_->props);
					_data_->children_props = (_vala_array_free (_data_->children_props, _data_->children_props_length1, (GDestroyNotify) g_hash_table_unref), NULL);
					_data_->filter = (_vala_array_free (_data_->filter, _data_->filter_length1, (GDestroyNotify) g_free), NULL);
					if (_data_->_state_ == 0) {
						g_simple_async_result_complete_in_idle (_data_->_async_result);
					} else {
						g_simple_async_result_complete (_data_->_async_result);
					}
					g_object_unref (_data_->_async_result);
					return FALSE;
				}
				_data_->_tmp33_ = _data_->self->priv->containers;
				_data_->_tmp34_ = _data_->container;
				gee_abstract_collection_add ((GeeAbstractCollection*) _data_->_tmp33_, _data_->_tmp34_);
				_g_object_unref0 (_data_->container);
				_g_free0 (_data_->title);
				_g_free0 (_data_->path);
				_g_hash_table_unref0 (_data_->props);
			}
		}
	}
	_data_->children_props = (_vala_array_free (_data_->children_props, _data_->children_props_length1, (GDestroyNotify) g_hash_table_unref), NULL);
	_data_->filter = (_vala_array_free (_data_->filter, _data_->filter_length1, (GDestroyNotify) g_free), NULL);
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void rygel_external_container_update_container_data_free (gpointer _data) {
	RygelExternalContainerUpdateContainerData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (RygelExternalContainerUpdateContainerData, _data_);
}


static void rygel_external_container_update_container (RygelExternalContainer* self, gboolean connect_signal, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	RygelExternalContainerUpdateContainerData* _data_;
	RygelExternalContainer* _tmp0_;
	gboolean _tmp1_;
	_data_ = g_slice_new0 (RygelExternalContainerUpdateContainerData);
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, rygel_external_container_update_container);
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, rygel_external_container_update_container_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = connect_signal;
	_data_->connect_signal = _tmp1_;
	rygel_external_container_update_container_co (_data_);
}


static void rygel_external_container_update_container_finish (RygelExternalContainer* self, GAsyncResult* _res_) {
	RygelExternalContainerUpdateContainerData* _data_;
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
}


static void rygel_external_container_update_container_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	RygelExternalContainerUpdateContainerData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	rygel_external_container_update_container_co (_data_);
}


static guint _variant_get12 (GVariant* value) {
	return g_variant_get_uint32 (value);
}


static void _rygel_external_container_on_updated_rygel_external_media_container_proxy_updated (RygelExternalMediaContainerProxy* _sender, gpointer self) {
	rygel_external_container_on_updated (self, _sender);
}


static gboolean rygel_external_container_update_container_co (RygelExternalContainerUpdateContainerData* _data_) {
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		case 3:
		goto _state_3;
		case 4:
		goto _state_4;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = _data_->self->service_name;
		_data_->_tmp1_ = _data_->self->actual_container;
		_data_->_tmp2_ = NULL;
		_data_->_tmp2_ = g_dbus_proxy_get_object_path ((GDBusProxy*) _data_->_tmp1_);
		_data_->_state_ = 1;
		g_async_initable_new_async (FREE_DESKTOP_TYPE_PROPERTIES_PROXY, 0, NULL, rygel_external_container_update_container_ready, _data_, "g-flags", G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, "g-name", _data_->_tmp0_, "g-bus-type", G_BUS_TYPE_SESSION, "g-object-path", _data_->_tmp2_, "g-interface-name", "org.freedesktop.DBus.Properties", NULL);
		return FALSE;
		_state_1:
		_data_->_tmp3_ = NULL;
		_data_->_tmp3_ = g_async_initable_new_finish (_data_->_source_object_, _data_->_res_, &_data_->_inner_error_);
		_data_->props_iface = (FreeDesktopProperties*) _data_->_tmp3_;
		if (_data_->_inner_error_ != NULL) {
			goto __catch0_g_error;
		}
		_data_->_tmp4_ = _data_->props_iface;
		_data_->_state_ = 2;
		free_desktop_properties_get_all (_data_->_tmp4_, RYGEL_EXTERNAL_MEDIA_CONTAINER_PROXY_IFACE, rygel_external_container_update_container_ready, _data_);
		return FALSE;
		_state_2:
		_data_->_tmp5_ = NULL;
		_data_->_tmp5_ = free_desktop_properties_get_all_finish (_data_->_tmp4_, _data_->_res_, &_data_->_inner_error_);
		_data_->props = _data_->_tmp5_;
		if (_data_->_inner_error_ != NULL) {
			_g_object_unref0 (_data_->props_iface);
			goto __catch0_g_error;
		}
		_data_->_tmp6_ = _data_->props;
		_data_->_tmp7_ = NULL;
		_data_->_tmp7_ = g_hash_table_lookup (_data_->_tmp6_, "ChildCount");
		_data_->_tmp8_ = _variant_get12 ((GVariant*) _data_->_tmp7_);
		_data_->child_count = _data_->_tmp8_;
		_data_->_tmp9_ = _data_->child_count;
		rygel_media_container_set_child_count ((RygelMediaContainer*) _data_->self, (gint) _data_->_tmp9_);
		_data_->_tmp10_ = _data_->props_iface;
		_data_->_state_ = 3;
		free_desktop_properties_get_all (_data_->_tmp10_, RYGEL_EXTERNAL_MEDIA_OBJECT_PROXY_IFACE, rygel_external_container_update_container_ready, _data_);
		return FALSE;
		_state_3:
		_data_->_tmp11_ = NULL;
		_data_->_tmp11_ = free_desktop_properties_get_all_finish (_data_->_tmp10_, _data_->_res_, &_data_->_inner_error_);
		_data_->_tmp12_ = _data_->_tmp11_;
		if (_data_->_inner_error_ != NULL) {
			_g_hash_table_unref0 (_data_->props);
			_g_object_unref0 (_data_->props_iface);
			goto __catch0_g_error;
		}
		_g_hash_table_unref0 (_data_->props);
		_data_->props = _data_->_tmp12_;
		_data_->_tmp13_ = _data_->props;
		_data_->_tmp14_ = rygel_media_object_get_id ((RygelMediaObject*) _data_->self);
		_data_->_tmp15_ = _data_->_tmp14_;
		_data_->_tmp16_ = _data_->self->service_name;
		_data_->_tmp17_ = NULL;
		_data_->_tmp17_ = rygel_external_get_mandatory_string_value (_data_->_tmp13_, "DisplayName", _data_->_tmp15_, _data_->_tmp16_);
		_data_->_tmp18_ = _data_->_tmp17_;
		rygel_media_object_set_title ((RygelMediaObject*) _data_->self, _data_->_tmp18_);
		_g_free0 (_data_->_tmp18_);
		_g_hash_table_unref0 (_data_->props);
		_g_object_unref0 (_data_->props_iface);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->property_error = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp19_ = _data_->self->actual_container;
		_data_->_tmp20_ = NULL;
		_data_->_tmp20_ = g_dbus_proxy_get_object_path ((GDBusProxy*) _data_->_tmp19_);
		_data_->_tmp21_ = _data_->property_error;
		_data_->_tmp22_ = _data_->_tmp21_->message;
		g_warning ("rygel-external-container.vala:338: Failed to update information about " \
"container '%s': %s", _data_->_tmp20_, _data_->_tmp22_);
		_g_error_free0 (_data_->property_error);
	}
	__finally0:
	if (_data_->_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	{
		_data_->_tmp23_ = rygel_media_container_get_child_count ((RygelMediaContainer*) _data_->self);
		_data_->_tmp24_ = _data_->_tmp23_;
		_data_->_tmp25_ = G_MAXINT;
		if (_data_->_tmp24_ < _data_->_tmp25_) {
			_data_->_state_ = 4;
			rygel_external_container_refresh_child_containers (_data_->self, rygel_external_container_update_container_ready, _data_);
			return FALSE;
			_state_4:
			rygel_external_container_refresh_child_containers_finish (_data_->self, _data_->_res_, &_data_->_inner_error_);
			if (_data_->_inner_error_ != NULL) {
				goto __catch1_g_error;
			}
		}
	}
	goto __finally1;
	__catch1_g_error:
	{
		_data_->err = _data_->_inner_error_;
		_data_->_inner_error_ = NULL;
		_data_->_tmp26_ = _data_->self->actual_container;
		_data_->_tmp27_ = NULL;
		_data_->_tmp27_ = g_dbus_proxy_get_object_path ((GDBusProxy*) _data_->_tmp26_);
		_data_->_tmp28_ = _data_->err;
		_data_->_tmp29_ = _data_->_tmp28_->message;
		g_warning ("rygel-external-container.vala:349: Failed to update information about " \
"container '%s': %s", _data_->_tmp27_, _data_->_tmp29_);
		_g_error_free0 (_data_->err);
	}
	__finally1:
	if (_data_->_inner_error_ != NULL) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
		g_clear_error (&_data_->_inner_error_);
		return FALSE;
	}
	rygel_media_container_updated ((RygelMediaContainer*) _data_->self, NULL, RYGEL_OBJECT_EVENT_TYPE_MODIFIED, FALSE);
	_data_->_tmp30_ = _data_->connect_signal;
	if (_data_->_tmp30_) {
		_data_->_tmp31_ = _data_->self->actual_container;
		g_signal_connect_object (_data_->_tmp31_, "updated", (GCallback) _rygel_external_container_on_updated_rygel_external_media_container_proxy_updated, _data_->self, 0);
	}
	if (_data_->_state_ == 0) {
		g_simple_async_result_complete_in_idle (_data_->_async_result);
	} else {
		g_simple_async_result_complete (_data_->_async_result);
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}


static void rygel_external_container_on_updated (RygelExternalContainer* self, RygelExternalMediaContainerProxy* actual_container) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (actual_container != NULL);
	rygel_external_container_update_container (self, FALSE, NULL, NULL);
}


static RygelMediaContainer* rygel_external_container_find_container_by_id (RygelExternalContainer* self, const gchar* id) {
	RygelMediaContainer* result = NULL;
	RygelMediaContainer* target;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (id != NULL, NULL);
	target = NULL;
	{
		GeeArrayList* _tmp0_;
		GeeArrayList* _tmp1_;
		GeeArrayList* _container_list;
		GeeArrayList* _tmp2_;
		gint _tmp3_;
		gint _tmp4_;
		gint _container_size;
		gint _container_index;
		_tmp0_ = self->priv->containers;
		_tmp1_ = _g_object_ref0 (_tmp0_);
		_container_list = _tmp1_;
		_tmp2_ = _container_list;
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
		_tmp4_ = _tmp3_;
		_container_size = _tmp4_;
		_container_index = -1;
		while (TRUE) {
			gint _tmp5_;
			gint _tmp6_;
			gint _tmp7_;
			GeeArrayList* _tmp8_;
			gint _tmp9_;
			gpointer _tmp10_ = NULL;
			RygelExternalContainer* container;
			RygelExternalContainer* _tmp11_;
			const gchar* _tmp12_;
			const gchar* _tmp13_;
			const gchar* _tmp14_;
			_tmp5_ = _container_index;
			_container_index = _tmp5_ + 1;
			_tmp6_ = _container_index;
			_tmp7_ = _container_size;
			if (!(_tmp6_ < _tmp7_)) {
				break;
			}
			_tmp8_ = _container_list;
			_tmp9_ = _container_index;
			_tmp10_ = gee_abstract_list_get ((GeeAbstractList*) _tmp8_, _tmp9_);
			container = (RygelExternalContainer*) _tmp10_;
			_tmp11_ = container;
			_tmp12_ = rygel_media_object_get_id ((RygelMediaObject*) _tmp11_);
			_tmp13_ = _tmp12_;
			_tmp14_ = id;
			if (g_strcmp0 (_tmp13_, _tmp14_) == 0) {
				RygelExternalContainer* _tmp15_;
				RygelMediaContainer* _tmp16_;
				_tmp15_ = container;
				_tmp16_ = _g_object_ref0 ((RygelMediaContainer*) _tmp15_);
				_g_object_unref0 (target);
				target = _tmp16_;
				_g_object_unref0 (container);
				break;
			}
			_g_object_unref0 (container);
		}
		_g_object_unref0 (_container_list);
	}
	result = target;
	return result;
}


static RygelSearchExpression* rygel_external_container_translate_expression (RygelExternalContainer* self, RygelSearchExpression* upnp_expression) {
	RygelSearchExpression* result = NULL;
	RygelSearchExpression* _tmp0_;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (upnp_expression != NULL, NULL);
	_tmp0_ = upnp_expression;
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, RYGEL_TYPE_RELATIONAL_EXPRESSION)) {
		RygelSearchExpression* _tmp1_;
		RygelRelationalExpression* _tmp2_;
		RygelRelationalExpression* expression;
		RygelRelationalExpression* _tmp3_;
		RygelRelationalExpression* ext_expression;
		RygelRelationalExpression* _tmp4_;
		RygelRelationalExpression* _tmp5_;
		gconstpointer _tmp6_;
		RygelRelationalExpression* _tmp7_;
		RygelRelationalExpression* _tmp8_;
		gconstpointer _tmp9_;
		gchar* _tmp10_ = NULL;
		RygelRelationalExpression* _tmp11_;
		RygelRelationalExpression* _tmp12_;
		gconstpointer _tmp13_;
		gchar* _tmp14_;
		_tmp1_ = upnp_expression;
		_tmp2_ = _rygel_search_expression_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp1_, RYGEL_TYPE_RELATIONAL_EXPRESSION) ? ((RygelRelationalExpression*) _tmp1_) : NULL);
		expression = _tmp2_;
		_tmp3_ = rygel_relational_expression_new ();
		ext_expression = _tmp3_;
		_tmp4_ = ext_expression;
		_tmp5_ = expression;
		_tmp6_ = ((RygelSearchExpression*) _tmp5_)->op;
		((RygelSearchExpression*) _tmp4_)->op = (gpointer) ((gintptr) ((GUPnPSearchCriteriaOp) ((gintptr) _tmp6_)));
		_tmp7_ = ext_expression;
		_tmp8_ = expression;
		_tmp9_ = ((RygelSearchExpression*) _tmp8_)->operand1;
		_tmp10_ = rygel_external_container_translate_property (self, (const gchar*) _tmp9_);
		_g_free0 (((RygelSearchExpression*) _tmp7_)->operand1);
		((RygelSearchExpression*) _tmp7_)->operand1 = _tmp10_;
		_tmp11_ = ext_expression;
		_tmp12_ = expression;
		_tmp13_ = ((RygelSearchExpression*) _tmp12_)->operand2;
		_tmp14_ = g_strdup ((const gchar*) _tmp13_);
		_g_free0 (((RygelSearchExpression*) _tmp11_)->operand2);
		((RygelSearchExpression*) _tmp11_)->operand2 = _tmp14_;
		result = (RygelSearchExpression*) ext_expression;
		_rygel_search_expression_unref0 (expression);
		return result;
	} else {
		RygelSearchExpression* _tmp15_;
		RygelLogicalExpression* _tmp16_;
		RygelLogicalExpression* expression;
		RygelLogicalExpression* _tmp17_;
		RygelLogicalExpression* ext_expression;
		RygelLogicalExpression* _tmp18_;
		RygelLogicalExpression* _tmp19_;
		gconstpointer _tmp20_;
		RygelLogicalExpression* _tmp21_;
		RygelLogicalExpression* _tmp22_;
		gconstpointer _tmp23_;
		RygelSearchExpression* _tmp24_ = NULL;
		RygelLogicalExpression* _tmp25_;
		RygelLogicalExpression* _tmp26_;
		gconstpointer _tmp27_;
		RygelSearchExpression* _tmp28_ = NULL;
		_tmp15_ = upnp_expression;
		_tmp16_ = _rygel_search_expression_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp15_, RYGEL_TYPE_LOGICAL_EXPRESSION) ? ((RygelLogicalExpression*) _tmp15_) : NULL);
		expression = _tmp16_;
		_tmp17_ = rygel_logical_expression_new ();
		ext_expression = _tmp17_;
		_tmp18_ = ext_expression;
		_tmp19_ = expression;
		_tmp20_ = ((RygelSearchExpression*) _tmp19_)->op;
		((RygelSearchExpression*) _tmp18_)->op = (gpointer) ((gintptr) ((RygelLogicalOperator) ((gintptr) _tmp20_)));
		_tmp21_ = ext_expression;
		_tmp22_ = expression;
		_tmp23_ = ((RygelSearchExpression*) _tmp22_)->operand1;
		_tmp24_ = rygel_external_container_translate_expression (self, (RygelSearchExpression*) _tmp23_);
		_rygel_search_expression_unref0 (((RygelSearchExpression*) _tmp21_)->operand1);
		((RygelSearchExpression*) _tmp21_)->operand1 = _tmp24_;
		_tmp25_ = ext_expression;
		_tmp26_ = expression;
		_tmp27_ = ((RygelSearchExpression*) _tmp26_)->operand2;
		_tmp28_ = rygel_external_container_translate_expression (self, (RygelSearchExpression*) _tmp27_);
		_rygel_search_expression_unref0 (((RygelSearchExpression*) _tmp25_)->operand2);
		((RygelSearchExpression*) _tmp25_)->operand2 = _tmp28_;
		result = (RygelSearchExpression*) ext_expression;
		_rygel_search_expression_unref0 (expression);
		return result;
	}
}


gchar* rygel_external_container_translate_property (RygelExternalContainer* self, const gchar* property) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	GQuark _tmp3_ = 0U;
	static GQuark _tmp2_label0 = 0;
	static GQuark _tmp2_label1 = 0;
	static GQuark _tmp2_label2 = 0;
	static GQuark _tmp2_label3 = 0;
	static GQuark _tmp2_label4 = 0;
	static GQuark _tmp2_label5 = 0;
	static GQuark _tmp2_label6 = 0;
	g_return_val_if_fail (self != NULL, NULL);
	g_return_val_if_fail (property != NULL, NULL);
	_tmp0_ = property;
	_tmp1_ = _tmp0_;
	_tmp3_ = (NULL == _tmp1_) ? 0 : g_quark_from_string (_tmp1_);
	if (_tmp3_ == ((0 != _tmp2_label0) ? _tmp2_label0 : (_tmp2_label0 = g_quark_from_static_string ("@id")))) {
		switch (0) {
			default:
			{
				gchar* _tmp4_;
				_tmp4_ = g_strdup ("Path");
				result = _tmp4_;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label1) ? _tmp2_label1 : (_tmp2_label1 = g_quark_from_static_string ("@parentID")))) {
		switch (0) {
			default:
			{
				gchar* _tmp5_;
				_tmp5_ = g_strdup ("Parent");
				result = _tmp5_;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label2) ? _tmp2_label2 : (_tmp2_label2 = g_quark_from_static_string ("dc:title")))) {
		switch (0) {
			default:
			{
				gchar* _tmp6_;
				_tmp6_ = g_strdup ("DisplayName");
				result = _tmp6_;
				return result;
			}
		}
	} else if (((_tmp3_ == ((0 != _tmp2_label3) ? _tmp2_label3 : (_tmp2_label3 = g_quark_from_static_string ("dc:creator")))) || (_tmp3_ == ((0 != _tmp2_label4) ? _tmp2_label4 : (_tmp2_label4 = g_quark_from_static_string ("upnp:artist"))))) || (_tmp3_ == ((0 != _tmp2_label5) ? _tmp2_label5 : (_tmp2_label5 = g_quark_from_static_string ("upnp:author"))))) {
		switch (0) {
			default:
			{
				gchar* _tmp7_;
				_tmp7_ = g_strdup ("Artist");
				result = _tmp7_;
				return result;
			}
		}
	} else if (_tmp3_ == ((0 != _tmp2_label6) ? _tmp2_label6 : (_tmp2_label6 = g_quark_from_static_string ("upnp:album")))) {
		switch (0) {
			default:
			{
				gchar* _tmp8_;
				_tmp8_ = g_strdup ("Album");
				result = _tmp8_;
				return result;
			}
		}
	} else {
		switch (0) {
			default:
			{
				const gchar* _tmp9_;
				gchar* _tmp10_;
				_tmp9_ = property;
				_tmp10_ = g_strdup (_tmp9_);
				result = _tmp10_;
				return result;
			}
		}
	}
}


static GeeArrayList* rygel_external_container_real_get_search_classes (RygelSearchableContainer* base) {
	GeeArrayList* result;
	RygelExternalContainer* self;
	GeeArrayList* _tmp0_;
	self = (RygelExternalContainer*) base;
	_tmp0_ = self->priv->_search_classes;
	result = _tmp0_;
	return result;
}


static void rygel_external_container_real_set_search_classes (RygelSearchableContainer* base, GeeArrayList* value) {
	RygelExternalContainer* self;
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp1_;
	self = (RygelExternalContainer*) base;
	_tmp0_ = value;
	_tmp1_ = _g_object_ref0 (_tmp0_);
	_g_object_unref0 (self->priv->_search_classes);
	self->priv->_search_classes = _tmp1_;
	g_object_notify ((GObject *) self, "search-classes");
}


static void rygel_external_container_class_init (RygelExternalContainerClass * klass) {
	rygel_external_container_parent_class = g_type_class_peek_parent (klass);
	g_type_class_add_private (klass, sizeof (RygelExternalContainerPrivate));
	RYGEL_MEDIA_CONTAINER_CLASS (klass)->get_children = rygel_external_container_real_get_children;
	RYGEL_MEDIA_CONTAINER_CLASS (klass)->get_children_finish = rygel_external_container_real_get_children_finish;
	RYGEL_MEDIA_CONTAINER_CLASS (klass)->find_object = rygel_external_container_real_find_object;
	RYGEL_MEDIA_CONTAINER_CLASS (klass)->find_object_finish = rygel_external_container_real_find_object_finish;
	G_OBJECT_CLASS (klass)->get_property = _vala_rygel_external_container_get_property;
	G_OBJECT_CLASS (klass)->set_property = _vala_rygel_external_container_set_property;
	G_OBJECT_CLASS (klass)->finalize = rygel_external_container_finalize;
	g_object_class_install_property (G_OBJECT_CLASS (klass), RYGEL_EXTERNAL_CONTAINER_SEARCH_CLASSES, g_param_spec_object ("search-classes", "search-classes", "search-classes", GEE_TYPE_ARRAY_LIST, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
}


static void rygel_external_container_rygel_searchable_container_interface_init (RygelSearchableContainerIface * iface) {
	rygel_external_container_rygel_searchable_container_parent_iface = g_type_interface_peek_parent (iface);
	iface->search = (RygelMediaObjects* (*)(RygelSearchableContainer*, RygelSearchExpression*, guint, guint, guint*, const gchar*, GCancellable*, GError**)) rygel_external_container_real_search;
	iface->search_finish = rygel_external_container_real_search_finish;
	iface->get_search_classes = rygel_external_container_real_get_search_classes;
	iface->set_search_classes = rygel_external_container_real_set_search_classes;
}


static void rygel_external_container_instance_init (RygelExternalContainer * self) {
	self->priv = RYGEL_EXTERNAL_CONTAINER_GET_PRIVATE (self);
}


static void rygel_external_container_finalize (GObject* obj) {
	RygelExternalContainer * self;
	RygelMediaContainer* _tmp0_;
	RygelMediaContainer* _tmp1_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, RYGEL_EXTERNAL_TYPE_CONTAINER, RygelExternalContainer);
	_tmp0_ = rygel_media_object_get_parent ((RygelMediaObject*) self);
	_tmp1_ = _tmp0_;
	if (_tmp1_ != NULL) {
		RygelMediaContainer* _tmp2_;
		RygelMediaContainer* _tmp3_;
		_tmp2_ = rygel_media_object_get_parent ((RygelMediaObject*) self);
		_tmp3_ = _tmp2_;
		g_object_remove_weak_pointer ((GObject*) _tmp3_, &((RygelMediaObject*) self)->parent_ptr);
	}
	_g_object_unref0 (self->actual_container);
	_g_free0 (self->service_name);
	_rygel_external_item_factory_unref0 (self->priv->item_factory);
	_g_object_unref0 (self->priv->containers);
	_g_object_unref0 (self->priv->_search_classes);
	G_OBJECT_CLASS (rygel_external_container_parent_class)->finalize (obj);
}


/**
 * Represents an external container.
 */
GType rygel_external_container_get_type (void) {
	static volatile gsize rygel_external_container_type_id__volatile = 0;
	if (g_once_init_enter (&rygel_external_container_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (RygelExternalContainerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) rygel_external_container_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (RygelExternalContainer), 0, (GInstanceInitFunc) rygel_external_container_instance_init, NULL };
		static const GInterfaceInfo rygel_searchable_container_info = { (GInterfaceInitFunc) rygel_external_container_rygel_searchable_container_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType rygel_external_container_type_id;
		rygel_external_container_type_id = g_type_register_static (RYGEL_TYPE_MEDIA_CONTAINER, "RygelExternalContainer", &g_define_type_info, 0);
		g_type_add_interface_static (rygel_external_container_type_id, RYGEL_TYPE_SEARCHABLE_CONTAINER, &rygel_searchable_container_info);
		g_once_init_leave (&rygel_external_container_type_id__volatile, rygel_external_container_type_id);
	}
	return rygel_external_container_type_id__volatile;
}


static void _vala_rygel_external_container_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	RygelExternalContainer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, RYGEL_EXTERNAL_TYPE_CONTAINER, RygelExternalContainer);
	switch (property_id) {
		case RYGEL_EXTERNAL_CONTAINER_SEARCH_CLASSES:
		g_value_set_object (value, rygel_searchable_container_get_search_classes ((RygelSearchableContainer*) self));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


static void _vala_rygel_external_container_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	RygelExternalContainer * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, RYGEL_EXTERNAL_TYPE_CONTAINER, RygelExternalContainer);
	switch (property_id) {
		case RYGEL_EXTERNAL_CONTAINER_SEARCH_CLASSES:
		rygel_searchable_container_set_search_classes ((RygelSearchableContainer*) self, g_value_get_object (value));
		break;
		default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
		break;
	}
}


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);
}



