/* rygel-ruih-icon-elem.c generated by valac 0.32.1, the Vala compiler
 * generated from rygel-ruih-icon-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.1 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 library; 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_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;
typedef struct _IconElemPrivate IconElemPrivate;
#define _g_free0(var) (var = (g_free (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)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), 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 _IconElem {
	UIListing parent_instance;
	IconElemPrivate * priv;
};

struct _IconElemClass {
	UIListingClass parent_class;
};

struct _IconElemPrivate {
	gchar* mime_type;
	gchar* width;
	gchar* height;
	gchar* depth;
	gchar* url;
};

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 icon_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 icon_elem_get_type (void) G_GNUC_CONST;
#define ICON_ELEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_ICON_ELEM, IconElemPrivate))
enum  {
	ICON_ELEM_DUMMY_PROPERTY
};
#define ICON_ELEM_MIMETYPE "mimetype"
#define ICON_ELEM_WIDTH "width"
#define ICON_ELEM_HEIGHT "height"
#define ICON_ELEM_DEPTH "depth"
#define ICON_ELEM_URL "url"
GQuark rygel_ruih_service_error_quark (void);
IconElem* icon_elem_new (xmlNode* node, GError** error);
IconElem* icon_elem_construct (GType object_type, xmlNode* node, GError** error);
UIListing* ui_listing_construct (GType object_type);
static gboolean icon_elem_real_match (UIListing* base, GeeArrayList* protocols, GeeArrayList* filters);
static gchar* icon_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_ICON "icon"
gchar* ui_listing_to_xml (UIListing* self, GeeHashMap* hash_map);
static void icon_elem_finalize (UIListing* obj);


IconElem* icon_elem_construct (GType object_type, xmlNode* node, GError** error) {
	IconElem* self = NULL;
	GError * _inner_error_ = NULL;
	self = (IconElem*) ui_listing_construct (object_type);
	{
		RygelXMLUtilsIterator* _child_node_it = NULL;
		xmlNode* _tmp0_ = NULL;
		RygelXMLUtilsChildIterator* _tmp1_ = NULL;
		RygelXMLUtilsChildIterator* _tmp2_ = NULL;
		RygelXMLUtilsIterator* _tmp3_ = NULL;
		RygelXMLUtilsIterator* _tmp4_ = NULL;
		_tmp0_ = node;
		_tmp1_ = rygel_xml_utils_child_iterator_new (_tmp0_);
		_tmp2_ = _tmp1_;
		_tmp3_ = rygel_xml_utils_iterator_iterator ((RygelXMLUtilsIterator*) _tmp2_);
		_tmp4_ = _tmp3_;
		_rygel_xml_utils_iterator_unref0 (_tmp2_);
		_child_node_it = _tmp4_;
		while (TRUE) {
			RygelXMLUtilsIterator* _tmp5_ = NULL;
			gboolean _tmp6_ = FALSE;
			xmlNode* child_node = NULL;
			RygelXMLUtilsIterator* _tmp7_ = NULL;
			xmlNode* _tmp8_ = NULL;
			xmlNode* _tmp9_ = NULL;
			xmlElementType _tmp10_ = 0;
			gchar* node_name = NULL;
			xmlNode* _tmp11_ = NULL;
			const gchar* _tmp12_ = NULL;
			gchar* _tmp13_ = NULL;
			const gchar* _tmp14_ = NULL;
			const gchar* _tmp15_ = NULL;
			GQuark _tmp17_ = 0U;
			_tmp5_ = _child_node_it;
			_tmp6_ = rygel_xml_utils_iterator_next (_tmp5_);
			if (!_tmp6_) {
				break;
			}
			_tmp7_ = _child_node_it;
			_tmp8_ = rygel_xml_utils_iterator_get (_tmp7_);
			child_node = _tmp8_;
			_tmp9_ = child_node;
			_tmp10_ = _tmp9_->type;
			if (_tmp10_ == XML_TEXT_NODE) {
				continue;
			}
			_tmp11_ = child_node;
			_tmp12_ = _tmp11_->name;
			_tmp13_ = g_strdup (_tmp12_);
			node_name = _tmp13_;
			_tmp14_ = node_name;
			_tmp15_ = _tmp14_;
			_tmp17_ = (NULL == _tmp15_) ? 0 : g_quark_from_string (_tmp15_);
			if (_tmp17_ == g_quark_from_string (ICON_ELEM_MIMETYPE)) {
				switch (0) {
					default:
					{
						xmlNode* _tmp18_ = NULL;
						gchar* _tmp19_ = NULL;
						_tmp18_ = child_node;
						_tmp19_ = (gchar*) xmlNodeGetContent (_tmp18_);
						_g_free0 (self->priv->mime_type);
						self->priv->mime_type = _tmp19_;
						break;
					}
				}
			} else if (_tmp17_ == g_quark_from_string (ICON_ELEM_WIDTH)) {
				switch (0) {
					default:
					{
						xmlNode* _tmp20_ = NULL;
						gchar* _tmp21_ = NULL;
						_tmp20_ = child_node;
						_tmp21_ = (gchar*) xmlNodeGetContent (_tmp20_);
						_g_free0 (self->priv->width);
						self->priv->width = _tmp21_;
						break;
					}
				}
			} else if (_tmp17_ == g_quark_from_string (ICON_ELEM_HEIGHT)) {
				switch (0) {
					default:
					{
						xmlNode* _tmp22_ = NULL;
						gchar* _tmp23_ = NULL;
						_tmp22_ = child_node;
						_tmp23_ = (gchar*) xmlNodeGetContent (_tmp22_);
						_g_free0 (self->priv->height);
						self->priv->height = _tmp23_;
						break;
					}
				}
			} else if (_tmp17_ == g_quark_from_string (ICON_ELEM_DEPTH)) {
				switch (0) {
					default:
					{
						xmlNode* _tmp24_ = NULL;
						gchar* _tmp25_ = NULL;
						_tmp24_ = child_node;
						_tmp25_ = (gchar*) xmlNodeGetContent (_tmp24_);
						_g_free0 (self->priv->depth);
						self->priv->depth = _tmp25_;
						break;
					}
				}
			} else if (_tmp17_ == g_quark_from_string (ICON_ELEM_URL)) {
				switch (0) {
					default:
					{
						xmlNode* _tmp26_ = NULL;
						gchar* _tmp27_ = NULL;
						_tmp26_ = child_node;
						_tmp27_ = (gchar*) xmlNodeGetContent (_tmp26_);
						_g_free0 (self->priv->url);
						self->priv->url = _tmp27_;
						break;
					}
				}
			} else {
				switch (0) {
					default:
					{
						gchar* msg = NULL;
						const gchar* _tmp28_ = NULL;
						gchar* _tmp29_ = NULL;
						const gchar* _tmp30_ = NULL;
						const gchar* _tmp31_ = NULL;
						gchar* _tmp32_ = NULL;
						gchar* _tmp33_ = NULL;
						GError* _tmp34_ = NULL;
						GError* _tmp35_ = NULL;
						_tmp28_ = _ ("Unable to parse Icon data - unexpected node: %s");
						_tmp29_ = g_strdup (_tmp28_);
						msg = _tmp29_;
						_tmp30_ = msg;
						_tmp31_ = node_name;
						_tmp32_ = g_strdup_printf (_tmp30_, _tmp31_);
						_tmp33_ = _tmp32_;
						_tmp34_ = g_error_new_literal (RYGEL_RUIH_SERVICE_ERROR, RYGEL_RUIH_SERVICE_ERROR_OPERATION_REJECTED, _tmp33_);
						_tmp35_ = _tmp34_;
						_g_free0 (_tmp33_);
						_inner_error_ = _tmp35_;
						if (_inner_error_->domain == RYGEL_RUIH_SERVICE_ERROR) {
							g_propagate_error (error, _inner_error_);
							_g_free0 (msg);
							_g_free0 (node_name);
							_rygel_xml_utils_iterator_unref0 (_child_node_it);
							_ui_listing_unref0 (self);
							return NULL;
						} else {
							_g_free0 (msg);
							_g_free0 (node_name);
							_rygel_xml_utils_iterator_unref0 (_child_node_it);
							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_free0 (msg);
					}
				}
			}
			_g_free0 (node_name);
		}
		_rygel_xml_utils_iterator_unref0 (_child_node_it);
	}
	return self;
}


IconElem* icon_elem_new (xmlNode* node, GError** error) {
	return icon_elem_construct (TYPE_ICON_ELEM, node, error);
}


static gboolean icon_elem_real_match (UIListing* base, GeeArrayList* protocols, GeeArrayList* filters) {
	IconElem * self;
	gboolean result = FALSE;
	self = (IconElem*) base;
	g_return_val_if_fail (filters != NULL, FALSE);
	result = TRUE;
	return result;
}


static gchar* icon_elem_real_to_ui_listing (UIListing* base, GeeArrayList* filters) {
	IconElem * self;
	gchar* result = NULL;
	GeeHashMap* elements = NULL;
	GeeHashMap* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	const gchar* _tmp2_ = NULL;
	gboolean _tmp8_ = FALSE;
	const gchar* _tmp9_ = NULL;
	gboolean _tmp15_ = FALSE;
	const gchar* _tmp16_ = NULL;
	gboolean _tmp22_ = FALSE;
	const gchar* _tmp23_ = NULL;
	gboolean _tmp29_ = FALSE;
	const gchar* _tmp30_ = NULL;
	GeeHashMap* _tmp36_ = NULL;
	gint _tmp37_ = 0;
	gint _tmp38_ = 0;
	gchar* _tmp49_ = NULL;
	self = (IconElem*) base;
	g_return_val_if_fail (filters != NULL, NULL);
	_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);
	elements = _tmp0_;
	_tmp2_ = self->priv->mime_type;
	if (_tmp2_ != NULL) {
		GeeArrayList* _tmp3_ = NULL;
		const gchar* _tmp4_ = NULL;
		gboolean _tmp5_ = FALSE;
		_tmp3_ = filters;
		_tmp4_ = self->priv->mime_type;
		_tmp5_ = ui_listing_filters_match ((UIListing*) self, _tmp3_, UI_LISTING_ICON "@" ICON_ELEM_MIMETYPE, _tmp4_);
		_tmp1_ = _tmp5_;
	} else {
		_tmp1_ = FALSE;
	}
	if (_tmp1_) {
		GeeHashMap* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
		_tmp6_ = elements;
		_tmp7_ = self->priv->mime_type;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp6_, ICON_ELEM_MIMETYPE, _tmp7_);
	}
	_tmp9_ = self->priv->width;
	if (_tmp9_ != NULL) {
		GeeArrayList* _tmp10_ = NULL;
		const gchar* _tmp11_ = NULL;
		gboolean _tmp12_ = FALSE;
		_tmp10_ = filters;
		_tmp11_ = self->priv->width;
		_tmp12_ = ui_listing_filters_match ((UIListing*) self, _tmp10_, UI_LISTING_ICON "@" ICON_ELEM_WIDTH, _tmp11_);
		_tmp8_ = _tmp12_;
	} else {
		_tmp8_ = FALSE;
	}
	if (_tmp8_) {
		GeeHashMap* _tmp13_ = NULL;
		const gchar* _tmp14_ = NULL;
		_tmp13_ = elements;
		_tmp14_ = self->priv->width;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp13_, ICON_ELEM_WIDTH, _tmp14_);
	}
	_tmp16_ = self->priv->height;
	if (_tmp16_ != NULL) {
		GeeArrayList* _tmp17_ = NULL;
		const gchar* _tmp18_ = NULL;
		gboolean _tmp19_ = FALSE;
		_tmp17_ = filters;
		_tmp18_ = self->priv->height;
		_tmp19_ = ui_listing_filters_match ((UIListing*) self, _tmp17_, UI_LISTING_ICON "@" ICON_ELEM_HEIGHT, _tmp18_);
		_tmp15_ = _tmp19_;
	} else {
		_tmp15_ = FALSE;
	}
	if (_tmp15_) {
		GeeHashMap* _tmp20_ = NULL;
		const gchar* _tmp21_ = NULL;
		_tmp20_ = elements;
		_tmp21_ = self->priv->height;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp20_, ICON_ELEM_HEIGHT, _tmp21_);
	}
	_tmp23_ = self->priv->depth;
	if (_tmp23_ != NULL) {
		GeeArrayList* _tmp24_ = NULL;
		const gchar* _tmp25_ = NULL;
		gboolean _tmp26_ = FALSE;
		_tmp24_ = filters;
		_tmp25_ = self->priv->depth;
		_tmp26_ = ui_listing_filters_match ((UIListing*) self, _tmp24_, UI_LISTING_ICON "@" ICON_ELEM_DEPTH, _tmp25_);
		_tmp22_ = _tmp26_;
	} else {
		_tmp22_ = FALSE;
	}
	if (_tmp22_) {
		GeeHashMap* _tmp27_ = NULL;
		const gchar* _tmp28_ = NULL;
		_tmp27_ = elements;
		_tmp28_ = self->priv->depth;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp27_, ICON_ELEM_DEPTH, _tmp28_);
	}
	_tmp30_ = self->priv->url;
	if (_tmp30_ != NULL) {
		GeeArrayList* _tmp31_ = NULL;
		const gchar* _tmp32_ = NULL;
		gboolean _tmp33_ = FALSE;
		_tmp31_ = filters;
		_tmp32_ = self->priv->url;
		_tmp33_ = ui_listing_filters_match ((UIListing*) self, _tmp31_, UI_LISTING_ICON "@" ICON_ELEM_URL, _tmp32_);
		_tmp29_ = _tmp33_;
	} else {
		_tmp29_ = FALSE;
	}
	if (_tmp29_) {
		GeeHashMap* _tmp34_ = NULL;
		const gchar* _tmp35_ = NULL;
		_tmp34_ = elements;
		_tmp35_ = self->priv->url;
		gee_abstract_map_set ((GeeAbstractMap*) _tmp34_, ICON_ELEM_URL, _tmp35_);
	}
	_tmp36_ = elements;
	_tmp37_ = gee_abstract_map_get_size ((GeeMap*) _tmp36_);
	_tmp38_ = _tmp37_;
	if (_tmp38_ > 0) {
		GString* sb = NULL;
		GString* _tmp39_ = NULL;
		GString* _tmp40_ = NULL;
		GString* _tmp41_ = NULL;
		GeeHashMap* _tmp42_ = NULL;
		gchar* _tmp43_ = NULL;
		gchar* _tmp44_ = NULL;
		GString* _tmp45_ = NULL;
		GString* _tmp46_ = NULL;
		const gchar* _tmp47_ = NULL;
		gchar* _tmp48_ = NULL;
		_tmp39_ = g_string_new ("");
		sb = _tmp39_;
		_tmp40_ = sb;
		g_string_append (_tmp40_, "<" UI_LISTING_ICON ">\n");
		_tmp41_ = sb;
		_tmp42_ = elements;
		_tmp43_ = ui_listing_to_xml ((UIListing*) self, _tmp42_);
		_tmp44_ = _tmp43_;
		g_string_append (_tmp41_, _tmp44_);
		_g_free0 (_tmp44_);
		_tmp45_ = sb;
		g_string_append (_tmp45_, "</" UI_LISTING_ICON ">\n");
		_tmp46_ = sb;
		_tmp47_ = _tmp46_->str;
		_tmp48_ = g_strdup (_tmp47_);
		result = _tmp48_;
		_g_string_free0 (sb);
		_g_object_unref0 (elements);
		return result;
	}
	_tmp49_ = g_strdup ("");
	result = _tmp49_;
	_g_object_unref0 (elements);
	return result;
}


static void icon_elem_class_init (IconElemClass * klass) {
	icon_elem_parent_class = g_type_class_peek_parent (klass);
	((UIListingClass *) klass)->finalize = icon_elem_finalize;
	g_type_class_add_private (klass, sizeof (IconElemPrivate));
	((UIListingClass *) klass)->match = icon_elem_real_match;
	((UIListingClass *) klass)->to_ui_listing = icon_elem_real_to_ui_listing;
}


static void icon_elem_instance_init (IconElem * self) {
	self->priv = ICON_ELEM_GET_PRIVATE (self);
	self->priv->mime_type = NULL;
	self->priv->width = NULL;
	self->priv->height = NULL;
	self->priv->depth = NULL;
	self->priv->url = NULL;
}


static void icon_elem_finalize (UIListing* obj) {
	IconElem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_ICON_ELEM, IconElem);
	_g_free0 (self->priv->mime_type);
	_g_free0 (self->priv->width);
	_g_free0 (self->priv->height);
	_g_free0 (self->priv->depth);
	_g_free0 (self->priv->url);
	UI_LISTING_CLASS (icon_elem_parent_class)->finalize (obj);
}


GType icon_elem_get_type (void) {
	static volatile gsize icon_elem_type_id__volatile = 0;
	if (g_once_init_enter (&icon_elem_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (IconElemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) icon_elem_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (IconElem), 0, (GInstanceInitFunc) icon_elem_instance_init, NULL };
		GType icon_elem_type_id;
		icon_elem_type_id = g_type_register_static (TYPE_UI_LISTING, "IconElem", &g_define_type_info, 0);
		g_once_init_leave (&icon_elem_type_id__volatile, icon_elem_type_id);
	}
	return icon_elem_type_id__volatile;
}



