/* rygel-ruih-ui-elem.c generated by valac 0.26.0.92-9bcc61c, the Vala compiler
 * generated from rygel-ruih-ui-elem.vala, do not modify */

/*
 * Copyright (C) 2013  Cable Television Laboratories, Inc.
 *
 * Author: Neha Shanbhag <N.Shanbhag@cablelabs.com>
 * Contact: http://www.cablelabs.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 <gee.h>
#include <stdlib.h>
#include <string.h>
#include <libxml/tree.h>
#include <rygel-core.h>
#include <glib/gi18n-lib.h>


#define TYPE_UI_LISTING (ui_listing_get_type ())
#define UI_LISTING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UI_LISTING, UIListing))
#define UI_LISTING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UI_LISTING, UIListingClass))
#define IS_UI_LISTING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UI_LISTING))
#define IS_UI_LISTING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UI_LISTING))
#define UI_LISTING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UI_LISTING, UIListingClass))

typedef struct _UIListing UIListing;
typedef struct _UIListingClass UIListingClass;
typedef struct _UIListingPrivate UIListingPrivate;

#define TYPE_PROTOCOL_ELEM (protocol_elem_get_type ())
#define PROTOCOL_ELEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PROTOCOL_ELEM, ProtocolElem))
#define PROTOCOL_ELEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PROTOCOL_ELEM, ProtocolElemClass))
#define IS_PROTOCOL_ELEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PROTOCOL_ELEM))
#define IS_PROTOCOL_ELEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PROTOCOL_ELEM))
#define PROTOCOL_ELEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PROTOCOL_ELEM, ProtocolElemClass))

typedef struct _ProtocolElem ProtocolElem;
typedef struct _ProtocolElemClass ProtocolElemClass;

#define TYPE_FILTER_ENTRY (filter_entry_get_type ())
#define FILTER_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FILTER_ENTRY, FilterEntry))
#define FILTER_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_FILTER_ENTRY, FilterEntryClass))
#define IS_FILTER_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FILTER_ENTRY))
#define IS_FILTER_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_FILTER_ENTRY))
#define FILTER_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_FILTER_ENTRY, FilterEntryClass))

typedef struct _FilterEntry FilterEntry;
typedef struct _FilterEntryClass FilterEntryClass;

#define TYPE_UI_ELEM (ui_elem_get_type ())
#define UI_ELEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_UI_ELEM, UIElem))
#define UI_ELEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_UI_ELEM, UIElemClass))
#define IS_UI_ELEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_UI_ELEM))
#define IS_UI_ELEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_UI_ELEM))
#define UI_ELEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_UI_ELEM, UIElemClass))

typedef struct _UIElem UIElem;
typedef struct _UIElemClass UIElemClass;
typedef struct _UIElemPrivate UIElemPrivate;

#define TYPE_ICON_ELEM (icon_elem_get_type ())
#define ICON_ELEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ICON_ELEM, IconElem))
#define ICON_ELEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ICON_ELEM, IconElemClass))
#define IS_ICON_ELEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ICON_ELEM))
#define IS_ICON_ELEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ICON_ELEM))
#define ICON_ELEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ICON_ELEM, IconElemClass))

typedef struct _IconElem IconElem;
typedef struct _IconElemClass IconElemClass;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _rygel_xml_utils_iterator_unref0(var) ((var == NULL) ? NULL : (var = (rygel_xml_utils_iterator_unref (var), NULL)))
#define _ui_listing_unref0(var) ((var == NULL) ? NULL : (var = (ui_listing_unref (var), NULL)))
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))

struct _UIListing {
	GTypeInstance parent_instance;
	volatile int ref_count;
	UIListingPrivate * priv;
};

struct _UIListingClass {
	GTypeClass parent_class;
	void (*finalize) (UIListing *self);
	gboolean (*match) (UIListing* self, GeeArrayList* protocols, GeeArrayList* filters);
	gchar* (*to_ui_listing) (UIListing* self, GeeArrayList* filters);
};

struct _UIElem {
	UIListing parent_instance;
	UIElemPrivate * priv;
};

struct _UIElemClass {
	UIListingClass parent_class;
};

struct _UIElemPrivate {
	gchar* id;
	gchar* name;
	gchar* description;
	gchar* fork;
	gchar* lifetime;
	GeeArrayList* icons;
	GeeArrayList* protocols;
};

typedef enum  {
	RYGEL_RUIH_SERVICE_ERROR_OPERATION_REJECTED = 701,
	RYGEL_RUIH_SERVICE_ERROR_INVALID_FILTER = 702
} RygelRuihServiceError;
#define RYGEL_RUIH_SERVICE_ERROR rygel_ruih_service_error_quark ()

static gpointer ui_elem_parent_class = NULL;

gpointer ui_listing_ref (gpointer instance);
void ui_listing_unref (gpointer instance);
GParamSpec* param_spec_ui_listing (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_ui_listing (GValue* value, gpointer v_object);
void value_take_ui_listing (GValue* value, gpointer v_object);
gpointer value_get_ui_listing (const GValue* value);
GType ui_listing_get_type (void) G_GNUC_CONST;
GType protocol_elem_get_type (void) G_GNUC_CONST;
gpointer filter_entry_ref (gpointer instance);
void filter_entry_unref (gpointer instance);
GParamSpec* param_spec_filter_entry (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_filter_entry (GValue* value, gpointer v_object);
void value_take_filter_entry (GValue* value, gpointer v_object);
gpointer value_get_filter_entry (const GValue* value);
GType filter_entry_get_type (void) G_GNUC_CONST;
GType ui_elem_get_type (void) G_GNUC_CONST;
GType icon_elem_get_type (void) G_GNUC_CONST;
#define UI_ELEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_UI_ELEM, UIElemPrivate))
enum  {
	UI_ELEM_DUMMY_PROPERTY
};
GQuark rygel_ruih_service_error_quark (void);
UIElem* ui_elem_new (xmlNode* node, GError** error);
UIElem* ui_elem_construct (GType object_type, xmlNode* node, GError** error);
UIListing* ui_listing_construct (GType object_type);
#define UI_LISTING_UIID "uiID"
#define UI_LISTING_NAME "name"
#define UI_LISTING_DESCRIPTION "description"
#define UI_LISTING_ICONLIST "iconList"
#define UI_LISTING_FORK "fork"
#define UI_LISTING_LIFETIME "lifetime"
#define UI_LISTING_PROTOCOL "protocol"
#define UI_LISTING_ICON "icon"
IconElem* icon_elem_new (xmlNode* node, GError** error);
IconElem* icon_elem_construct (GType object_type, xmlNode* node, GError** error);
ProtocolElem* protocol_elem_new (xmlNode* node, GError** error);
ProtocolElem* protocol_elem_construct (GType object_type, xmlNode* node, GError** error);
static gboolean ui_elem_real_match (UIListing* base, GeeArrayList* protocol_elements, GeeArrayList* filters);
gboolean ui_listing_match (UIListing* self, GeeArrayList* protocols, GeeArrayList* filters);
static gchar* ui_elem_real_to_ui_listing (UIListing* base, GeeArrayList* filters);
gboolean ui_listing_filters_match (UIListing* self, GeeArrayList* filters, const gchar* name, const gchar* value);
#define UI_LISTING_UI "ui"
gchar* ui_listing_to_xml (UIListing* self, GeeHashMap* hash_map);
gchar* ui_listing_to_ui_listing (UIListing* self, GeeArrayList* filters);
static void ui_elem_finalize (UIListing* obj);


UIElem* ui_elem_construct (GType object_type, xmlNode* node, GError** error) {
	UIElem* self = NULL;
	GeeArrayList* _tmp0_ = NULL;
	GeeArrayList* _tmp1_ = NULL;
	GError * _inner_error_ = NULL;
#line 38 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	self = (UIElem*) ui_listing_construct (object_type);
#line 39 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp0_ = gee_array_list_new (TYPE_ICON_ELEM, (GBoxedCopyFunc) ui_listing_ref, ui_listing_unref, NULL, NULL, NULL);
#line 39 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_g_object_unref0 (self->priv->icons);
#line 39 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	self->priv->icons = _tmp0_;
#line 40 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp1_ = gee_array_list_new (TYPE_PROTOCOL_ELEM, (GBoxedCopyFunc) ui_listing_ref, ui_listing_unref, NULL, NULL, NULL);
#line 40 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_g_object_unref0 (self->priv->protocols);
#line 40 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	self->priv->protocols = _tmp1_;
#line 201 "rygel-ruih-ui-elem.c"
	{
		RygelXMLUtilsIterator* _child_node_it = NULL;
		xmlNode* _tmp2_ = NULL;
		RygelXMLUtilsChildIterator* _tmp3_ = NULL;
		RygelXMLUtilsChildIterator* _tmp4_ = NULL;
		RygelXMLUtilsIterator* _tmp5_ = NULL;
		RygelXMLUtilsIterator* _tmp6_ = NULL;
#line 43 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp2_ = node;
#line 43 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp3_ = rygel_xml_utils_child_iterator_new (_tmp2_);
#line 43 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp4_ = _tmp3_;
#line 43 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp5_ = rygel_xml_utils_iterator_iterator ((RygelXMLUtilsIterator*) _tmp4_);
#line 43 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp6_ = _tmp5_;
#line 43 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_rygel_xml_utils_iterator_unref0 (_tmp4_);
#line 43 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_child_node_it = _tmp6_;
#line 43 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		while (TRUE) {
#line 225 "rygel-ruih-ui-elem.c"
			RygelXMLUtilsIterator* _tmp7_ = NULL;
			gboolean _tmp8_ = FALSE;
			xmlNode* child_node = NULL;
			RygelXMLUtilsIterator* _tmp9_ = NULL;
			xmlNode* _tmp10_ = NULL;
			xmlNode* _tmp11_ = NULL;
			xmlElementType _tmp12_ = 0;
			gchar* node_name = NULL;
			xmlNode* _tmp13_ = NULL;
			const gchar* _tmp14_ = NULL;
			gchar* _tmp15_ = NULL;
			const gchar* _tmp16_ = NULL;
			const gchar* _tmp17_ = NULL;
			GQuark _tmp19_ = 0U;
#line 43 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp7_ = _child_node_it;
#line 43 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp8_ = rygel_xml_utils_iterator_next (_tmp7_);
#line 43 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			if (!_tmp8_) {
#line 43 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				break;
#line 248 "rygel-ruih-ui-elem.c"
			}
#line 43 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp9_ = _child_node_it;
#line 43 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp10_ = rygel_xml_utils_iterator_get (_tmp9_);
#line 43 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			child_node = _tmp10_;
#line 44 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp11_ = child_node;
#line 44 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp12_ = _tmp11_->type;
#line 44 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			if (_tmp12_ == XML_TEXT_NODE) {
#line 46 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				continue;
#line 264 "rygel-ruih-ui-elem.c"
			}
#line 49 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp13_ = child_node;
#line 49 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp14_ = _tmp13_->name;
#line 49 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp15_ = g_strdup (_tmp14_);
#line 49 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			node_name = _tmp15_;
#line 50 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp16_ = node_name;
#line 50 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp17_ = _tmp16_;
#line 50 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp19_ = (NULL == _tmp17_) ? 0 : g_quark_from_string (_tmp17_);
#line 50 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			if (_tmp19_ == g_quark_from_string (UI_LISTING_UIID)) {
#line 50 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				switch (0) {
#line 284 "rygel-ruih-ui-elem.c"
					default:
					{
						xmlNode* _tmp20_ = NULL;
						gchar* _tmp21_ = NULL;
#line 52 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp20_ = child_node;
#line 52 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp21_ = (gchar*) xmlNodeGetContent (_tmp20_);
#line 52 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_g_free0 (self->priv->id);
#line 52 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						self->priv->id = _tmp21_;
#line 53 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						break;
#line 299 "rygel-ruih-ui-elem.c"
					}
				}
			} else if (_tmp19_ == g_quark_from_string (UI_LISTING_NAME)) {
#line 50 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				switch (0) {
#line 305 "rygel-ruih-ui-elem.c"
					default:
					{
						xmlNode* _tmp22_ = NULL;
						gchar* _tmp23_ = NULL;
#line 55 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp22_ = child_node;
#line 55 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp23_ = (gchar*) xmlNodeGetContent (_tmp22_);
#line 55 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_g_free0 (self->priv->name);
#line 55 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						self->priv->name = _tmp23_;
#line 56 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						break;
#line 320 "rygel-ruih-ui-elem.c"
					}
				}
			} else if (_tmp19_ == g_quark_from_string (UI_LISTING_DESCRIPTION)) {
#line 50 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				switch (0) {
#line 326 "rygel-ruih-ui-elem.c"
					default:
					{
						xmlNode* _tmp24_ = NULL;
						gchar* _tmp25_ = NULL;
#line 58 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp24_ = child_node;
#line 58 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp25_ = (gchar*) xmlNodeGetContent (_tmp24_);
#line 58 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_g_free0 (self->priv->description);
#line 58 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						self->priv->description = _tmp25_;
#line 59 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						break;
#line 341 "rygel-ruih-ui-elem.c"
					}
				}
			} else if (_tmp19_ == g_quark_from_string (UI_LISTING_ICONLIST)) {
#line 50 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				switch (0) {
#line 347 "rygel-ruih-ui-elem.c"
					default:
					{
						RygelXMLUtilsChildIterator* it = NULL;
						xmlNode* _tmp26_ = NULL;
						RygelXMLUtilsChildIterator* _tmp27_ = NULL;
#line 61 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp26_ = child_node;
#line 61 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp27_ = rygel_xml_utils_child_iterator_new (_tmp26_);
#line 61 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						it = _tmp27_;
#line 359 "rygel-ruih-ui-elem.c"
						{
							RygelXMLUtilsIterator* _icon_node_it = NULL;
							RygelXMLUtilsChildIterator* _tmp28_ = NULL;
							RygelXMLUtilsIterator* _tmp29_ = NULL;
#line 62 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
							_tmp28_ = it;
#line 62 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
							_tmp29_ = rygel_xml_utils_iterator_iterator ((RygelXMLUtilsIterator*) _tmp28_);
#line 62 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
							_icon_node_it = _tmp29_;
#line 62 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
							while (TRUE) {
#line 372 "rygel-ruih-ui-elem.c"
								RygelXMLUtilsIterator* _tmp30_ = NULL;
								gboolean _tmp31_ = FALSE;
								xmlNode* icon_node = NULL;
								RygelXMLUtilsIterator* _tmp32_ = NULL;
								xmlNode* _tmp33_ = NULL;
								xmlNode* _tmp34_ = NULL;
								const gchar* _tmp35_ = NULL;
#line 62 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
								_tmp30_ = _icon_node_it;
#line 62 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
								_tmp31_ = rygel_xml_utils_iterator_next (_tmp30_);
#line 62 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
								if (!_tmp31_) {
#line 62 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
									break;
#line 388 "rygel-ruih-ui-elem.c"
								}
#line 62 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
								_tmp32_ = _icon_node_it;
#line 62 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
								_tmp33_ = rygel_xml_utils_iterator_get (_tmp32_);
#line 62 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
								icon_node = _tmp33_;
#line 63 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
								_tmp34_ = icon_node;
#line 63 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
								_tmp35_ = _tmp34_->name;
#line 63 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
								if (g_strcmp0 (_tmp35_, UI_LISTING_ICON) == 0) {
#line 402 "rygel-ruih-ui-elem.c"
									IconElem* _tmp36_ = NULL;
									xmlNode* _tmp37_ = NULL;
									IconElem* _tmp38_ = NULL;
									GeeArrayList* _tmp39_ = NULL;
#line 64 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
									_tmp37_ = icon_node;
#line 64 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
									_tmp38_ = icon_elem_new (_tmp37_, &_inner_error_);
#line 64 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
									_tmp36_ = _tmp38_;
#line 64 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
									if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 64 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
										if (_inner_error_->domain == RYGEL_RUIH_SERVICE_ERROR) {
#line 64 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
											g_propagate_error (error, _inner_error_);
#line 64 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
											_rygel_xml_utils_iterator_unref0 (_icon_node_it);
#line 64 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
											_rygel_xml_utils_iterator_unref0 (it);
#line 64 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
											_g_free0 (node_name);
#line 64 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
											_rygel_xml_utils_iterator_unref0 (_child_node_it);
#line 64 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
											_ui_listing_unref0 (self);
#line 64 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
											return NULL;
#line 431 "rygel-ruih-ui-elem.c"
										} else {
#line 64 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
											_rygel_xml_utils_iterator_unref0 (_icon_node_it);
#line 64 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
											_rygel_xml_utils_iterator_unref0 (it);
#line 64 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
											_g_free0 (node_name);
#line 64 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
											_rygel_xml_utils_iterator_unref0 (_child_node_it);
#line 64 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
											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);
#line 64 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
											g_clear_error (&_inner_error_);
#line 64 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
											return NULL;
#line 447 "rygel-ruih-ui-elem.c"
										}
									}
#line 64 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
									_tmp39_ = self->priv->icons;
#line 64 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
									gee_abstract_collection_add ((GeeAbstractCollection*) _tmp39_, _tmp36_);
#line 63 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
									_ui_listing_unref0 (_tmp36_);
#line 456 "rygel-ruih-ui-elem.c"
								}
							}
#line 62 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
							_rygel_xml_utils_iterator_unref0 (_icon_node_it);
#line 461 "rygel-ruih-ui-elem.c"
						}
#line 67 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_rygel_xml_utils_iterator_unref0 (it);
#line 67 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						break;
#line 467 "rygel-ruih-ui-elem.c"
					}
				}
			} else if (_tmp19_ == g_quark_from_string (UI_LISTING_FORK)) {
#line 50 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				switch (0) {
#line 473 "rygel-ruih-ui-elem.c"
					default:
					{
						xmlNode* _tmp40_ = NULL;
						gchar* _tmp41_ = NULL;
#line 69 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp40_ = child_node;
#line 69 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp41_ = (gchar*) xmlNodeGetContent (_tmp40_);
#line 69 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_g_free0 (self->priv->fork);
#line 69 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						self->priv->fork = _tmp41_;
#line 70 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						break;
#line 488 "rygel-ruih-ui-elem.c"
					}
				}
			} else if (_tmp19_ == g_quark_from_string (UI_LISTING_LIFETIME)) {
#line 50 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				switch (0) {
#line 494 "rygel-ruih-ui-elem.c"
					default:
					{
						xmlNode* _tmp42_ = NULL;
						gchar* _tmp43_ = NULL;
#line 72 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp42_ = child_node;
#line 72 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp43_ = (gchar*) xmlNodeGetContent (_tmp42_);
#line 72 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_g_free0 (self->priv->lifetime);
#line 72 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						self->priv->lifetime = _tmp43_;
#line 73 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						break;
#line 509 "rygel-ruih-ui-elem.c"
					}
				}
			} else if (_tmp19_ == g_quark_from_string (UI_LISTING_PROTOCOL)) {
#line 50 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				switch (0) {
#line 515 "rygel-ruih-ui-elem.c"
					default:
					{
						ProtocolElem* _tmp44_ = NULL;
						xmlNode* _tmp45_ = NULL;
						ProtocolElem* _tmp46_ = NULL;
						GeeArrayList* _tmp47_ = NULL;
#line 75 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp45_ = child_node;
#line 75 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp46_ = protocol_elem_new (_tmp45_, &_inner_error_);
#line 75 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp44_ = _tmp46_;
#line 75 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 75 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
							if (_inner_error_->domain == RYGEL_RUIH_SERVICE_ERROR) {
#line 75 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
								g_propagate_error (error, _inner_error_);
#line 75 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
								_g_free0 (node_name);
#line 75 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
								_rygel_xml_utils_iterator_unref0 (_child_node_it);
#line 75 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
								_ui_listing_unref0 (self);
#line 75 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
								return NULL;
#line 542 "rygel-ruih-ui-elem.c"
							} else {
#line 75 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
								_g_free0 (node_name);
#line 75 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
								_rygel_xml_utils_iterator_unref0 (_child_node_it);
#line 75 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
								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);
#line 75 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
								g_clear_error (&_inner_error_);
#line 75 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
								return NULL;
#line 554 "rygel-ruih-ui-elem.c"
							}
						}
#line 75 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp47_ = self->priv->protocols;
#line 75 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						gee_abstract_collection_add ((GeeAbstractCollection*) _tmp47_, _tmp44_);
#line 76 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_ui_listing_unref0 (_tmp44_);
#line 76 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						break;
#line 565 "rygel-ruih-ui-elem.c"
					}
				}
			} else {
#line 50 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				switch (0) {
#line 571 "rygel-ruih-ui-elem.c"
					default:
					{
						gchar* msg = NULL;
						const gchar* _tmp48_ = NULL;
						gchar* _tmp49_ = NULL;
						const gchar* _tmp50_ = NULL;
						const gchar* _tmp51_ = NULL;
						gchar* _tmp52_ = NULL;
						gchar* _tmp53_ = NULL;
						GError* _tmp54_ = NULL;
						GError* _tmp55_ = NULL;
#line 78 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp48_ = _ ("Unable to parse UI data - unexpected node: %s");
#line 78 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp49_ = g_strdup (_tmp48_);
#line 78 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						msg = _tmp49_;
#line 79 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp50_ = msg;
#line 79 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp51_ = node_name;
#line 79 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp52_ = g_strdup_printf (_tmp50_, _tmp51_);
#line 79 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp53_ = _tmp52_;
#line 79 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp54_ = g_error_new_literal (RYGEL_RUIH_SERVICE_ERROR, RYGEL_RUIH_SERVICE_ERROR_OPERATION_REJECTED, _tmp53_);
#line 79 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_tmp55_ = _tmp54_;
#line 79 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_g_free0 (_tmp53_);
#line 79 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_inner_error_ = _tmp55_;
#line 79 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						if (_inner_error_->domain == RYGEL_RUIH_SERVICE_ERROR) {
#line 79 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
							g_propagate_error (error, _inner_error_);
#line 79 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
							_g_free0 (msg);
#line 79 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
							_g_free0 (node_name);
#line 79 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
							_rygel_xml_utils_iterator_unref0 (_child_node_it);
#line 79 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
							_ui_listing_unref0 (self);
#line 79 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
							return NULL;
#line 619 "rygel-ruih-ui-elem.c"
						} else {
#line 79 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
							_g_free0 (msg);
#line 79 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
							_g_free0 (node_name);
#line 79 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
							_rygel_xml_utils_iterator_unref0 (_child_node_it);
#line 79 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
							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);
#line 79 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
							g_clear_error (&_inner_error_);
#line 79 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
							return NULL;
#line 633 "rygel-ruih-ui-elem.c"
						}
#line 50 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
						_g_free0 (msg);
#line 637 "rygel-ruih-ui-elem.c"
					}
				}
			}
#line 43 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_g_free0 (node_name);
#line 643 "rygel-ruih-ui-elem.c"
		}
#line 43 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_rygel_xml_utils_iterator_unref0 (_child_node_it);
#line 647 "rygel-ruih-ui-elem.c"
	}
#line 38 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	return self;
#line 651 "rygel-ruih-ui-elem.c"
}


UIElem* ui_elem_new (xmlNode* node, GError** error) {
#line 38 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	return ui_elem_construct (TYPE_UI_ELEM, node, error);
#line 658 "rygel-ruih-ui-elem.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 91 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	return self ? g_object_ref (self) : NULL;
#line 665 "rygel-ruih-ui-elem.c"
}


static gboolean ui_elem_real_match (UIListing* base, GeeArrayList* protocol_elements, GeeArrayList* filters) {
	UIElem * self;
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	GeeArrayList* _tmp1_ = NULL;
#line 85 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	self = (UIElem*) base;
#line 85 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	g_return_val_if_fail (filters != NULL, FALSE);
#line 87 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp1_ = protocol_elements;
#line 87 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	if (_tmp1_ == NULL) {
#line 87 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp0_ = TRUE;
#line 684 "rygel-ruih-ui-elem.c"
	} else {
		GeeArrayList* _tmp2_ = NULL;
		gint _tmp3_ = 0;
		gint _tmp4_ = 0;
#line 87 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp2_ = protocol_elements;
#line 87 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp3_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp2_);
#line 87 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp4_ = _tmp3_;
#line 87 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp0_ = _tmp4_ == 0;
#line 697 "rygel-ruih-ui-elem.c"
	}
#line 87 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	if (_tmp0_) {
#line 88 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		result = TRUE;
#line 88 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		return result;
#line 705 "rygel-ruih-ui-elem.c"
	}
	{
		GeeArrayList* _proto_list = NULL;
		GeeArrayList* _tmp5_ = NULL;
		GeeArrayList* _tmp6_ = NULL;
		gint _proto_size = 0;
		GeeArrayList* _tmp7_ = NULL;
		gint _tmp8_ = 0;
		gint _tmp9_ = 0;
		gint _proto_index = 0;
#line 91 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp5_ = protocol_elements;
#line 91 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp6_ = _g_object_ref0 (_tmp5_);
#line 91 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_proto_list = _tmp6_;
#line 91 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp7_ = _proto_list;
#line 91 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp8_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp7_);
#line 91 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp9_ = _tmp8_;
#line 91 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_proto_size = _tmp9_;
#line 91 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_proto_index = -1;
#line 91 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		while (TRUE) {
#line 734 "rygel-ruih-ui-elem.c"
			gint _tmp10_ = 0;
			gint _tmp11_ = 0;
			gint _tmp12_ = 0;
			ProtocolElem* proto = NULL;
			GeeArrayList* _tmp13_ = NULL;
			gint _tmp14_ = 0;
			gpointer _tmp15_ = NULL;
			ProtocolElem* _tmp16_ = NULL;
			GeeArrayList* _tmp17_ = NULL;
			GeeArrayList* _tmp18_ = NULL;
			gboolean _tmp19_ = FALSE;
#line 91 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp10_ = _proto_index;
#line 91 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_proto_index = _tmp10_ + 1;
#line 91 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp11_ = _proto_index;
#line 91 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp12_ = _proto_size;
#line 91 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			if (!(_tmp11_ < _tmp12_)) {
#line 91 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				break;
#line 758 "rygel-ruih-ui-elem.c"
			}
#line 91 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp13_ = _proto_list;
#line 91 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp14_ = _proto_index;
#line 91 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp15_ = gee_abstract_list_get ((GeeAbstractList*) _tmp13_, _tmp14_);
#line 91 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			proto = (ProtocolElem*) _tmp15_;
#line 92 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp16_ = proto;
#line 92 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp17_ = self->priv->protocols;
#line 92 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp18_ = filters;
#line 92 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp19_ = ui_listing_match ((UIListing*) _tmp16_, _tmp17_, _tmp18_);
#line 92 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			if (_tmp19_) {
#line 93 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				result = TRUE;
#line 93 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				_ui_listing_unref0 (proto);
#line 93 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				_g_object_unref0 (_proto_list);
#line 93 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				return result;
#line 786 "rygel-ruih-ui-elem.c"
			}
#line 91 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_ui_listing_unref0 (proto);
#line 790 "rygel-ruih-ui-elem.c"
		}
#line 91 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_g_object_unref0 (_proto_list);
#line 794 "rygel-ruih-ui-elem.c"
	}
#line 97 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	result = FALSE;
#line 97 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	return result;
#line 800 "rygel-ruih-ui-elem.c"
}


static gchar* ui_elem_real_to_ui_listing (UIListing* base, GeeArrayList* filters) {
	UIElem * self;
	gchar* result = NULL;
	GeeHashMap* elements = NULL;
	GeeHashMap* _tmp0_ = NULL;
	gboolean match = FALSE;
	GeeHashMap* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	GeeHashMap* _tmp3_ = NULL;
	const gchar* _tmp4_ = NULL;
	GeeHashMap* _tmp5_ = NULL;
	const gchar* _tmp6_ = NULL;
	GeeHashMap* _tmp7_ = NULL;
	const gchar* _tmp8_ = NULL;
	GeeHashMap* _tmp9_ = NULL;
	const gchar* _tmp10_ = NULL;
	gboolean _tmp11_ = FALSE;
	const gchar* _tmp12_ = NULL;
	gboolean _tmp16_ = FALSE;
	const gchar* _tmp17_ = NULL;
	gboolean _tmp21_ = FALSE;
	const gchar* _tmp22_ = NULL;
	gboolean _tmp26_ = FALSE;
	const gchar* _tmp27_ = NULL;
	GString* sb = NULL;
	GString* _tmp31_ = NULL;
	GString* _tmp32_ = NULL;
	GeeHashMap* _tmp33_ = NULL;
	gchar* _tmp34_ = NULL;
	gchar* _tmp35_ = NULL;
	GString* icon_sb = NULL;
	GString* _tmp36_ = NULL;
	GString* _tmp53_ = NULL;
	const gchar* _tmp54_ = NULL;
	gint _tmp55_ = 0;
	gint _tmp56_ = 0;
	GString* protocol_sb = NULL;
	GString* _tmp62_ = NULL;
	GeeArrayList* _tmp63_ = NULL;
	gint _tmp64_ = 0;
	gint _tmp65_ = 0;
	GString* _tmp89_ = NULL;
	gboolean _tmp90_ = FALSE;
#line 100 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	self = (UIElem*) base;
#line 100 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	g_return_val_if_fail (filters != NULL, NULL);
#line 101 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 101 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	elements = _tmp0_;
#line 102 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	match = FALSE;
#line 105 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp1_ = elements;
#line 105 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp2_ = self->priv->id;
#line 105 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp1_, UI_LISTING_UIID, _tmp2_);
#line 106 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp3_ = elements;
#line 106 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp4_ = self->priv->name;
#line 106 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp3_, UI_LISTING_NAME, _tmp4_);
#line 107 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp5_ = elements;
#line 107 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp6_ = self->priv->description;
#line 107 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp5_, UI_LISTING_DESCRIPTION, _tmp6_);
#line 108 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp7_ = elements;
#line 108 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp8_ = self->priv->fork;
#line 108 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp7_, UI_LISTING_FORK, _tmp8_);
#line 109 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp9_ = elements;
#line 109 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp10_ = self->priv->lifetime;
#line 109 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	gee_abstract_map_set ((GeeAbstractMap*) _tmp9_, UI_LISTING_LIFETIME, _tmp10_);
#line 111 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp12_ = self->priv->name;
#line 111 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	if (_tmp12_ != NULL) {
#line 891 "rygel-ruih-ui-elem.c"
		GeeArrayList* _tmp13_ = NULL;
		const gchar* _tmp14_ = NULL;
		gboolean _tmp15_ = FALSE;
#line 112 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp13_ = filters;
#line 112 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp14_ = self->priv->name;
#line 112 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp15_ = ui_listing_filters_match ((UIListing*) self, _tmp13_, UI_LISTING_NAME, _tmp14_);
#line 112 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp11_ = _tmp15_;
#line 903 "rygel-ruih-ui-elem.c"
	} else {
#line 111 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp11_ = FALSE;
#line 907 "rygel-ruih-ui-elem.c"
	}
#line 111 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	if (_tmp11_) {
#line 113 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		match = TRUE;
#line 913 "rygel-ruih-ui-elem.c"
	}
#line 115 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp17_ = self->priv->description;
#line 115 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	if (_tmp17_ != NULL) {
#line 919 "rygel-ruih-ui-elem.c"
		GeeArrayList* _tmp18_ = NULL;
		const gchar* _tmp19_ = NULL;
		gboolean _tmp20_ = FALSE;
#line 116 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp18_ = filters;
#line 116 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp19_ = self->priv->description;
#line 116 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp20_ = ui_listing_filters_match ((UIListing*) self, _tmp18_, UI_LISTING_DESCRIPTION, _tmp19_);
#line 116 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp16_ = _tmp20_;
#line 931 "rygel-ruih-ui-elem.c"
	} else {
#line 115 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp16_ = FALSE;
#line 935 "rygel-ruih-ui-elem.c"
	}
#line 115 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	if (_tmp16_) {
#line 117 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		match = TRUE;
#line 941 "rygel-ruih-ui-elem.c"
	}
#line 119 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp22_ = self->priv->fork;
#line 119 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	if (_tmp22_ != NULL) {
#line 947 "rygel-ruih-ui-elem.c"
		GeeArrayList* _tmp23_ = NULL;
		const gchar* _tmp24_ = NULL;
		gboolean _tmp25_ = FALSE;
#line 120 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp23_ = filters;
#line 120 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp24_ = self->priv->fork;
#line 120 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp25_ = ui_listing_filters_match ((UIListing*) self, _tmp23_, UI_LISTING_FORK, _tmp24_);
#line 120 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp21_ = _tmp25_;
#line 959 "rygel-ruih-ui-elem.c"
	} else {
#line 119 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp21_ = FALSE;
#line 963 "rygel-ruih-ui-elem.c"
	}
#line 119 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	if (_tmp21_) {
#line 121 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		match = TRUE;
#line 969 "rygel-ruih-ui-elem.c"
	}
#line 123 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp27_ = self->priv->lifetime;
#line 123 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	if (_tmp27_ != NULL) {
#line 975 "rygel-ruih-ui-elem.c"
		GeeArrayList* _tmp28_ = NULL;
		const gchar* _tmp29_ = NULL;
		gboolean _tmp30_ = FALSE;
#line 124 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp28_ = filters;
#line 124 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp29_ = self->priv->lifetime;
#line 124 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp30_ = ui_listing_filters_match ((UIListing*) self, _tmp28_, UI_LISTING_LIFETIME, _tmp29_);
#line 124 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp26_ = _tmp30_;
#line 987 "rygel-ruih-ui-elem.c"
	} else {
#line 123 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp26_ = FALSE;
#line 991 "rygel-ruih-ui-elem.c"
	}
#line 123 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	if (_tmp26_) {
#line 125 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		match = TRUE;
#line 997 "rygel-ruih-ui-elem.c"
	}
#line 128 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp31_ = g_string_new ("<" UI_LISTING_UI ">\n");
#line 128 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	sb = _tmp31_;
#line 129 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp32_ = sb;
#line 129 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp33_ = elements;
#line 129 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp34_ = ui_listing_to_xml ((UIListing*) self, _tmp33_);
#line 129 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp35_ = _tmp34_;
#line 129 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	g_string_append (_tmp32_, _tmp35_);
#line 129 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_g_free0 (_tmp35_);
#line 131 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp36_ = g_string_new ("");
#line 131 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	icon_sb = _tmp36_;
#line 1019 "rygel-ruih-ui-elem.c"
	{
		GeeArrayList* _icon_list = NULL;
		GeeArrayList* _tmp37_ = NULL;
		GeeArrayList* _tmp38_ = NULL;
		gint _icon_size = 0;
		GeeArrayList* _tmp39_ = NULL;
		gint _tmp40_ = 0;
		gint _tmp41_ = 0;
		gint _icon_index = 0;
#line 132 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp37_ = self->priv->icons;
#line 132 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp38_ = _g_object_ref0 (_tmp37_);
#line 132 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_icon_list = _tmp38_;
#line 132 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp39_ = _icon_list;
#line 132 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp40_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp39_);
#line 132 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp41_ = _tmp40_;
#line 132 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_icon_size = _tmp41_;
#line 132 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_icon_index = -1;
#line 132 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		while (TRUE) {
#line 1047 "rygel-ruih-ui-elem.c"
			gint _tmp42_ = 0;
			gint _tmp43_ = 0;
			gint _tmp44_ = 0;
			IconElem* icon = NULL;
			GeeArrayList* _tmp45_ = NULL;
			gint _tmp46_ = 0;
			gpointer _tmp47_ = NULL;
			GString* _tmp48_ = NULL;
			IconElem* _tmp49_ = NULL;
			GeeArrayList* _tmp50_ = NULL;
			gchar* _tmp51_ = NULL;
			gchar* _tmp52_ = NULL;
#line 132 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp42_ = _icon_index;
#line 132 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_icon_index = _tmp42_ + 1;
#line 132 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp43_ = _icon_index;
#line 132 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp44_ = _icon_size;
#line 132 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			if (!(_tmp43_ < _tmp44_)) {
#line 132 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				break;
#line 1072 "rygel-ruih-ui-elem.c"
			}
#line 132 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp45_ = _icon_list;
#line 132 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp46_ = _icon_index;
#line 132 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp47_ = gee_abstract_list_get ((GeeAbstractList*) _tmp45_, _tmp46_);
#line 132 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			icon = (IconElem*) _tmp47_;
#line 133 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp48_ = icon_sb;
#line 133 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp49_ = icon;
#line 133 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp50_ = filters;
#line 133 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp51_ = ui_listing_to_ui_listing ((UIListing*) _tmp49_, _tmp50_);
#line 133 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp52_ = _tmp51_;
#line 133 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			g_string_append (_tmp48_, _tmp52_);
#line 133 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_g_free0 (_tmp52_);
#line 132 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_ui_listing_unref0 (icon);
#line 1098 "rygel-ruih-ui-elem.c"
		}
#line 132 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_g_object_unref0 (_icon_list);
#line 1102 "rygel-ruih-ui-elem.c"
	}
#line 137 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp53_ = icon_sb;
#line 137 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp54_ = _tmp53_->str;
#line 137 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp55_ = strlen (_tmp54_);
#line 137 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp56_ = _tmp55_;
#line 137 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	if (_tmp56_ > 0) {
#line 1114 "rygel-ruih-ui-elem.c"
		GString* _tmp57_ = NULL;
		GString* _tmp58_ = NULL;
		GString* _tmp59_ = NULL;
		const gchar* _tmp60_ = NULL;
		GString* _tmp61_ = NULL;
#line 138 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		match = TRUE;
#line 139 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp57_ = sb;
#line 139 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		g_string_append (_tmp57_, "<" UI_LISTING_ICONLIST ">\n");
#line 140 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp58_ = sb;
#line 140 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp59_ = icon_sb;
#line 140 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp60_ = _tmp59_->str;
#line 140 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		g_string_append (_tmp58_, _tmp60_);
#line 141 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp61_ = sb;
#line 141 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		g_string_append (_tmp61_, "</" UI_LISTING_ICONLIST ">\n");
#line 1138 "rygel-ruih-ui-elem.c"
	}
#line 144 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp62_ = g_string_new ("");
#line 144 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	protocol_sb = _tmp62_;
#line 145 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp63_ = self->priv->protocols;
#line 145 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp64_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp63_);
#line 145 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp65_ = _tmp64_;
#line 145 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	if (_tmp65_ > 0) {
#line 1152 "rygel-ruih-ui-elem.c"
		GString* _tmp82_ = NULL;
		const gchar* _tmp83_ = NULL;
		gint _tmp84_ = 0;
		gint _tmp85_ = 0;
		{
			GeeArrayList* _protocol_list = NULL;
			GeeArrayList* _tmp66_ = NULL;
			GeeArrayList* _tmp67_ = NULL;
			gint _protocol_size = 0;
			GeeArrayList* _tmp68_ = NULL;
			gint _tmp69_ = 0;
			gint _tmp70_ = 0;
			gint _protocol_index = 0;
#line 146 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp66_ = self->priv->protocols;
#line 146 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp67_ = _g_object_ref0 (_tmp66_);
#line 146 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_protocol_list = _tmp67_;
#line 146 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp68_ = _protocol_list;
#line 146 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp69_ = gee_abstract_collection_get_size ((GeeCollection*) _tmp68_);
#line 146 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp70_ = _tmp69_;
#line 146 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_protocol_size = _tmp70_;
#line 146 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_protocol_index = -1;
#line 146 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			while (TRUE) {
#line 1184 "rygel-ruih-ui-elem.c"
				gint _tmp71_ = 0;
				gint _tmp72_ = 0;
				gint _tmp73_ = 0;
				ProtocolElem* protocol = NULL;
				GeeArrayList* _tmp74_ = NULL;
				gint _tmp75_ = 0;
				gpointer _tmp76_ = NULL;
				GString* _tmp77_ = NULL;
				ProtocolElem* _tmp78_ = NULL;
				GeeArrayList* _tmp79_ = NULL;
				gchar* _tmp80_ = NULL;
				gchar* _tmp81_ = NULL;
#line 146 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				_tmp71_ = _protocol_index;
#line 146 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				_protocol_index = _tmp71_ + 1;
#line 146 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				_tmp72_ = _protocol_index;
#line 146 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				_tmp73_ = _protocol_size;
#line 146 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				if (!(_tmp72_ < _tmp73_)) {
#line 146 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
					break;
#line 1209 "rygel-ruih-ui-elem.c"
				}
#line 146 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				_tmp74_ = _protocol_list;
#line 146 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				_tmp75_ = _protocol_index;
#line 146 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				_tmp76_ = gee_abstract_list_get ((GeeAbstractList*) _tmp74_, _tmp75_);
#line 146 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				protocol = (ProtocolElem*) _tmp76_;
#line 147 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				_tmp77_ = protocol_sb;
#line 147 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				_tmp78_ = protocol;
#line 147 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				_tmp79_ = filters;
#line 147 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				_tmp80_ = ui_listing_to_ui_listing ((UIListing*) _tmp78_, _tmp79_);
#line 147 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				_tmp81_ = _tmp80_;
#line 147 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				g_string_append (_tmp77_, _tmp81_);
#line 147 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				_g_free0 (_tmp81_);
#line 146 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
				_ui_listing_unref0 (protocol);
#line 1235 "rygel-ruih-ui-elem.c"
			}
#line 146 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_g_object_unref0 (_protocol_list);
#line 1239 "rygel-ruih-ui-elem.c"
		}
#line 150 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp82_ = protocol_sb;
#line 150 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp83_ = _tmp82_->str;
#line 150 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp84_ = strlen (_tmp83_);
#line 150 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp85_ = _tmp84_;
#line 150 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		if (_tmp85_ > 0) {
#line 1251 "rygel-ruih-ui-elem.c"
			GString* _tmp86_ = NULL;
			GString* _tmp87_ = NULL;
			const gchar* _tmp88_ = NULL;
#line 151 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			match = TRUE;
#line 152 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp86_ = sb;
#line 152 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp87_ = protocol_sb;
#line 152 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			_tmp88_ = _tmp87_->str;
#line 152 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
			g_string_append (_tmp86_, _tmp88_);
#line 1265 "rygel-ruih-ui-elem.c"
		}
	}
#line 156 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp89_ = sb;
#line 156 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	g_string_append (_tmp89_, "</" UI_LISTING_UI ">\n");
#line 157 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_tmp90_ = match;
#line 157 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	if (_tmp90_) {
#line 1276 "rygel-ruih-ui-elem.c"
		GString* _tmp91_ = NULL;
		const gchar* _tmp92_ = NULL;
		gchar* _tmp93_ = NULL;
#line 158 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp91_ = sb;
#line 158 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp92_ = _tmp91_->str;
#line 158 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp93_ = g_strdup (_tmp92_);
#line 158 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		result = _tmp93_;
#line 158 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_g_string_free0 (protocol_sb);
#line 158 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_g_string_free0 (icon_sb);
#line 158 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_g_string_free0 (sb);
#line 158 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_g_object_unref0 (elements);
#line 158 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		return result;
#line 1298 "rygel-ruih-ui-elem.c"
	} else {
		gchar* _tmp94_ = NULL;
#line 160 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_tmp94_ = g_strdup ("");
#line 160 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		result = _tmp94_;
#line 160 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_g_string_free0 (protocol_sb);
#line 160 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_g_string_free0 (icon_sb);
#line 160 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_g_string_free0 (sb);
#line 160 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		_g_object_unref0 (elements);
#line 160 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
		return result;
#line 1315 "rygel-ruih-ui-elem.c"
	}
#line 100 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_g_string_free0 (protocol_sb);
#line 100 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_g_string_free0 (icon_sb);
#line 100 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_g_string_free0 (sb);
#line 100 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_g_object_unref0 (elements);
#line 1325 "rygel-ruih-ui-elem.c"
}


static void ui_elem_class_init (UIElemClass * klass) {
#line 27 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	ui_elem_parent_class = g_type_class_peek_parent (klass);
#line 27 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	((UIListingClass *) klass)->finalize = ui_elem_finalize;
#line 27 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	g_type_class_add_private (klass, sizeof (UIElemPrivate));
#line 27 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	((UIListingClass *) klass)->match = ui_elem_real_match;
#line 27 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	((UIListingClass *) klass)->to_ui_listing = ui_elem_real_to_ui_listing;
#line 1340 "rygel-ruih-ui-elem.c"
}


static void ui_elem_instance_init (UIElem * self) {
#line 27 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	self->priv = UI_ELEM_GET_PRIVATE (self);
#line 29 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	self->priv->id = NULL;
#line 30 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	self->priv->name = NULL;
#line 31 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	self->priv->description = NULL;
#line 32 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	self->priv->fork = NULL;
#line 33 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	self->priv->lifetime = NULL;
#line 1357 "rygel-ruih-ui-elem.c"
}


static void ui_elem_finalize (UIListing* obj) {
	UIElem * self;
#line 27 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_UI_ELEM, UIElem);
#line 29 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_g_free0 (self->priv->id);
#line 30 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_g_free0 (self->priv->name);
#line 31 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_g_free0 (self->priv->description);
#line 32 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_g_free0 (self->priv->fork);
#line 33 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_g_free0 (self->priv->lifetime);
#line 35 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_g_object_unref0 (self->priv->icons);
#line 36 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	_g_object_unref0 (self->priv->protocols);
#line 27 "/home/jens/Source/rygel/src/librygel-ruih/rygel-ruih-ui-elem.vala"
	UI_LISTING_CLASS (ui_elem_parent_class)->finalize (obj);
#line 1381 "rygel-ruih-ui-elem.c"
}


GType ui_elem_get_type (void) {
	static volatile gsize ui_elem_type_id__volatile = 0;
	if (g_once_init_enter (&ui_elem_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (UIElemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) ui_elem_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UIElem), 0, (GInstanceInitFunc) ui_elem_instance_init, NULL };
		GType ui_elem_type_id;
		ui_elem_type_id = g_type_register_static (TYPE_UI_LISTING, "UIElem", &g_define_type_info, 0);
		g_once_init_leave (&ui_elem_type_id__volatile, ui_elem_type_id);
	}
	return ui_elem_type_id__volatile;
}



