/* collection.c generated by valac 0.23.1.44-805c3, the Vala compiler
 * generated from collection.vala, do not modify */

/* This file is part of GNOME Boxes. License: LGPLv2+*/

#include <glib.h>
#include <glib-object.h>
#include <clutter/clutter.h>
#include <stdlib.h>
#include <string.h>
#include <libcommon.h>


#define BOXES_TYPE_UI (boxes_ui_get_type ())
#define BOXES_UI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_UI, BoxesUI))
#define BOXES_IS_UI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UI))
#define BOXES_UI_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), BOXES_TYPE_UI, BoxesUIIface))

typedef struct _BoxesUI BoxesUI;
typedef struct _BoxesUIIface BoxesUIIface;

#define BOXES_TYPE_UI_STATE (boxes_ui_state_get_type ())

#define BOXES_TYPE_COLLECTION_ITEM (boxes_collection_item_get_type ())
#define BOXES_COLLECTION_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItem))
#define BOXES_COLLECTION_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItemClass))
#define BOXES_IS_COLLECTION_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_ITEM))
#define BOXES_IS_COLLECTION_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_ITEM))
#define BOXES_COLLECTION_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItemClass))

typedef struct _BoxesCollectionItem BoxesCollectionItem;
typedef struct _BoxesCollectionItemClass BoxesCollectionItemClass;
typedef struct _BoxesCollectionItemPrivate BoxesCollectionItemPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))

#define BOXES_TYPE_MACHINE (boxes_machine_get_type ())
#define BOXES_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_MACHINE, BoxesMachine))
#define BOXES_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_MACHINE, BoxesMachineClass))
#define BOXES_IS_MACHINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_MACHINE))
#define BOXES_IS_MACHINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_MACHINE))
#define BOXES_MACHINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_MACHINE, BoxesMachineClass))

typedef struct _BoxesMachine BoxesMachine;
typedef struct _BoxesMachineClass BoxesMachineClass;

#define BOXES_TYPE_COLLECTION (boxes_collection_get_type ())
#define BOXES_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION, BoxesCollection))
#define BOXES_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION, BoxesCollectionClass))
#define BOXES_IS_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION))
#define BOXES_IS_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION))
#define BOXES_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION, BoxesCollectionClass))

typedef struct _BoxesCollection BoxesCollection;
typedef struct _BoxesCollectionClass BoxesCollectionClass;
typedef struct _BoxesCollectionPrivate BoxesCollectionPrivate;
#define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))

#define BOXES_TYPE_COLLECTION_FILTER (boxes_collection_filter_get_type ())
#define BOXES_COLLECTION_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_COLLECTION_FILTER, BoxesCollectionFilter))
#define BOXES_COLLECTION_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_COLLECTION_FILTER, BoxesCollectionFilterClass))
#define BOXES_IS_COLLECTION_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_COLLECTION_FILTER))
#define BOXES_IS_COLLECTION_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_COLLECTION_FILTER))
#define BOXES_COLLECTION_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_COLLECTION_FILTER, BoxesCollectionFilterClass))

typedef struct _BoxesCollectionFilter BoxesCollectionFilter;
typedef struct _BoxesCollectionFilterClass BoxesCollectionFilterClass;
typedef struct _BoxesCollectionFilterPrivate BoxesCollectionFilterPrivate;

#define BOXES_TYPE_CATEGORY (boxes_category_get_type ())
#define BOXES_CATEGORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_CATEGORY, BoxesCategory))
#define BOXES_CATEGORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_CATEGORY, BoxesCategoryClass))
#define BOXES_IS_CATEGORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_CATEGORY))
#define BOXES_IS_CATEGORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_CATEGORY))
#define BOXES_CATEGORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_CATEGORY, BoxesCategoryClass))

typedef struct _BoxesCategory BoxesCategory;
typedef struct _BoxesCategoryClass BoxesCategoryClass;
typedef struct _BoxesCategoryPrivate BoxesCategoryPrivate;

#define BOXES_CATEGORY_TYPE_KIND (boxes_category_kind_get_type ())

typedef enum  {
	BOXES_UI_STATE_NONE,
	BOXES_UI_STATE_COLLECTION,
	BOXES_UI_STATE_CREDS,
	BOXES_UI_STATE_DISPLAY,
	BOXES_UI_STATE_SETTINGS,
	BOXES_UI_STATE_WIZARD,
	BOXES_UI_STATE_PROPERTIES
} BoxesUIState;

struct _BoxesUIIface {
	GTypeInterface parent_iface;
	ClutterActor* (*get_actor) (BoxesUI* self);
	BoxesUIState (*get_previous_ui_state) (BoxesUI* self);
	void (*set_previous_ui_state) (BoxesUI* self, BoxesUIState value);
	BoxesUIState (*get_ui_state) (BoxesUI* self);
	void (*set_ui_state) (BoxesUI* self, BoxesUIState value);
};

struct _BoxesCollectionItem {
	GObject parent_instance;
	BoxesCollectionItemPrivate * priv;
};

struct _BoxesCollectionItemClass {
	GObjectClass parent_class;
	gint (*compare) (BoxesCollectionItem* self, BoxesCollectionItem* other);
	ClutterActor* (*get_item_actor) (BoxesCollectionItem* self);
};

struct _BoxesCollectionItemPrivate {
	gchar* _name;
	BoxesUIState _previous_ui_state;
	BoxesUIState _ui_state;
};

struct _BoxesCollection {
	GObject parent_instance;
	BoxesCollectionPrivate * priv;
	GPtrArray* items;
};

struct _BoxesCollectionClass {
	GObjectClass parent_class;
};

struct _BoxesCollectionFilter {
	GObject parent_instance;
	BoxesCollectionFilterPrivate * priv;
};

struct _BoxesCollectionFilterClass {
	GObjectClass parent_class;
};

struct _BoxesCollectionFilterPrivate {
	gchar** terms;
	gint terms_length1;
	gint _terms_size_;
};

typedef enum  {
	BOXES_CATEGORY_KIND_USER,
	BOXES_CATEGORY_KIND_NEW,
	BOXES_CATEGORY_KIND_FAVORITES,
	BOXES_CATEGORY_KIND_PRIVATE,
	BOXES_CATEGORY_KIND_SHARED
} BoxesCategoryKind;

struct _BoxesCategory {
	GObject parent_instance;
	BoxesCategoryPrivate * priv;
	gchar* name;
	BoxesCategoryKind kind;
};

struct _BoxesCategoryClass {
	GObjectClass parent_class;
};


static gpointer boxes_collection_item_parent_class = NULL;
static BoxesUIIface* boxes_collection_item_boxes_ui_parent_iface = NULL;
static gpointer boxes_collection_parent_class = NULL;
static gpointer boxes_collection_filter_parent_class = NULL;
static gpointer boxes_category_parent_class = NULL;

GType boxes_ui_state_get_type (void) G_GNUC_CONST;
GType boxes_ui_get_type (void) G_GNUC_CONST;
GType boxes_collection_item_get_type (void) G_GNUC_CONST;
#define BOXES_COLLECTION_ITEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItemPrivate))
enum  {
	BOXES_COLLECTION_ITEM_DUMMY_PROPERTY,
	BOXES_COLLECTION_ITEM_NAME,
	BOXES_COLLECTION_ITEM_ACTOR,
	BOXES_COLLECTION_ITEM_ITEM_ACTOR,
	BOXES_COLLECTION_ITEM_PREVIOUS_UI_STATE,
	BOXES_COLLECTION_ITEM_UI_STATE
};
gint boxes_collection_item_compare (BoxesCollectionItem* self, BoxesCollectionItem* other);
static gint boxes_collection_item_real_compare (BoxesCollectionItem* self, BoxesCollectionItem* other);
GType boxes_machine_get_type (void) G_GNUC_CONST;
const gchar* boxes_collection_item_get_name (BoxesCollectionItem* self);
BoxesCollectionItem* boxes_collection_item_construct (GType object_type);
void boxes_collection_item_set_name (BoxesCollectionItem* self, const gchar* value);
ClutterActor* boxes_collection_item_get_item_actor (BoxesCollectionItem* self);
static void boxes_collection_item_finalize (GObject* obj);
ClutterActor* boxes_ui_get_actor (BoxesUI* self);
BoxesUIState boxes_ui_get_previous_ui_state (BoxesUI* self);
BoxesUIState boxes_ui_get_ui_state (BoxesUI* self);
static void _vala_boxes_collection_item_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
void boxes_ui_set_previous_ui_state (BoxesUI* self, BoxesUIState value);
void boxes_ui_set_ui_state (BoxesUI* self, BoxesUIState value);
static void _vala_boxes_collection_item_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType boxes_collection_get_type (void) G_GNUC_CONST;
enum  {
	BOXES_COLLECTION_DUMMY_PROPERTY
};
BoxesCollection* boxes_collection_new (void);
BoxesCollection* boxes_collection_construct (GType object_type);
void boxes_collection_add_item (BoxesCollection* self, BoxesCollectionItem* item);
void boxes_collection_remove_item (BoxesCollection* self, BoxesCollectionItem* item);
static GObject * boxes_collection_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void _g_object_unref0_ (gpointer var);
static void boxes_collection_finalize (GObject* obj);
GType boxes_collection_filter_get_type (void) G_GNUC_CONST;
#define BOXES_COLLECTION_FILTER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_COLLECTION_FILTER, BoxesCollectionFilterPrivate))
enum  {
	BOXES_COLLECTION_FILTER_DUMMY_PROPERTY,
	BOXES_COLLECTION_FILTER_TEXT
};
gboolean boxes_collection_filter_filter (BoxesCollectionFilter* self, BoxesCollectionItem* item);
BoxesCollectionFilter* boxes_collection_filter_new (void);
BoxesCollectionFilter* boxes_collection_filter_construct (GType object_type);
void boxes_collection_filter_set_text (BoxesCollectionFilter* self, const gchar* value);
static void boxes_collection_filter_finalize (GObject* obj);
static void _vala_boxes_collection_filter_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);
GType boxes_category_get_type (void) G_GNUC_CONST;
GType boxes_category_kind_get_type (void) G_GNUC_CONST;
enum  {
	BOXES_CATEGORY_DUMMY_PROPERTY
};
BoxesCategory* boxes_category_new (const gchar* name, BoxesCategoryKind kind);
BoxesCategory* boxes_category_construct (GType object_type, const gchar* name, BoxesCategoryKind kind);
static void boxes_category_finalize (GObject* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
static gint _vala_array_length (gpointer array);


static gint boxes_collection_item_real_compare (BoxesCollectionItem* self, BoxesCollectionItem* other) {
	gint result = 0;
	BoxesCollectionItem* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	const gchar* _tmp2_ = NULL;
	gboolean _tmp3_ = FALSE;
	const gchar* _tmp11_ = NULL;
	gboolean _tmp12_ = FALSE;
	BoxesCollectionItem* _tmp13_ = NULL;
	const gchar* _tmp14_ = NULL;
	gboolean _tmp15_ = FALSE;
#line 11 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_return_val_if_fail (other != NULL, 0);
#line 13 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp0_ = other;
#line 13 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, BOXES_TYPE_MACHINE)) {
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		result = 1;
#line 14 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		return result;
#line 254 "collection.c"
	}
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp2_ = self->priv->_name;
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp3_ = boxes_is_set (_tmp2_);
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	if (_tmp3_) {
#line 262 "collection.c"
		BoxesCollectionItem* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		gboolean _tmp6_ = FALSE;
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		_tmp4_ = other;
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		_tmp5_ = _tmp4_->priv->_name;
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		_tmp6_ = boxes_is_set (_tmp5_);
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		_tmp1_ = _tmp6_;
#line 274 "collection.c"
	} else {
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		_tmp1_ = FALSE;
#line 278 "collection.c"
	}
#line 18 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	if (_tmp1_) {
#line 282 "collection.c"
		const gchar* _tmp7_ = NULL;
		BoxesCollectionItem* _tmp8_ = NULL;
		const gchar* _tmp9_ = NULL;
		gint _tmp10_ = 0;
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		_tmp7_ = self->priv->_name;
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		_tmp8_ = other;
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		_tmp9_ = _tmp8_->priv->_name;
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		_tmp10_ = g_utf8_collate (_tmp7_, _tmp9_);
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		result = _tmp10_;
#line 19 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		return result;
#line 299 "collection.c"
	}
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp11_ = self->priv->_name;
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp12_ = boxes_is_set (_tmp11_);
#line 22 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	if (_tmp12_) {
#line 23 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		result = -1;
#line 23 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		return result;
#line 311 "collection.c"
	}
#line 24 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp13_ = other;
#line 24 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp14_ = _tmp13_->priv->_name;
#line 24 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp15_ = boxes_is_set (_tmp14_);
#line 24 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	if (_tmp15_) {
#line 25 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		result = 1;
#line 25 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		return result;
#line 325 "collection.c"
	}
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	result = 0;
#line 27 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	return result;
#line 331 "collection.c"
}


gint boxes_collection_item_compare (BoxesCollectionItem* self, BoxesCollectionItem* other) {
#line 11 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 11 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	return BOXES_COLLECTION_ITEM_GET_CLASS (self)->compare (self, other);
#line 340 "collection.c"
}


BoxesCollectionItem* boxes_collection_item_construct (GType object_type) {
	BoxesCollectionItem * self = NULL;
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self = (BoxesCollectionItem*) g_object_new (object_type, NULL);
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	return self;
#line 350 "collection.c"
}


const gchar* boxes_collection_item_get_name (BoxesCollectionItem* self) {
	const gchar* result;
	const gchar* _tmp0_ = NULL;
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp0_ = self->priv->_name;
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	result = _tmp0_;
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	return result;
#line 365 "collection.c"
}


void boxes_collection_item_set_name (BoxesCollectionItem* self, const gchar* value) {
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_return_if_fail (self != NULL);
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp0_ = value;
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_g_free0 (self->priv->_name);
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self->priv->_name = _tmp1_;
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_object_notify ((GObject *) self, "name");
#line 384 "collection.c"
}


static ClutterActor* boxes_collection_item_real_get_actor (BoxesUI* base) {
	ClutterActor* result;
	BoxesCollectionItem* self;
	ClutterActor* _tmp0_ = NULL;
	ClutterActor* _tmp1_ = NULL;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self = (BoxesCollectionItem*) base;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp0_ = boxes_collection_item_get_item_actor (self);
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp1_ = _tmp0_;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	result = _tmp1_;
#line 6 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	return result;
#line 403 "collection.c"
}


ClutterActor* boxes_collection_item_get_item_actor (BoxesCollectionItem* self) {
#line 7 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 7 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	return BOXES_COLLECTION_ITEM_GET_CLASS (self)->get_item_actor (self);
#line 412 "collection.c"
}


static BoxesUIState boxes_collection_item_real_get_previous_ui_state (BoxesUI* base) {
	BoxesUIState result;
	BoxesCollectionItem* self;
	BoxesUIState _tmp0_ = 0;
#line 8 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self = (BoxesCollectionItem*) base;
#line 8 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp0_ = self->priv->_previous_ui_state;
#line 8 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	result = _tmp0_;
#line 8 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	return result;
#line 428 "collection.c"
}


static void boxes_collection_item_real_set_previous_ui_state (BoxesUI* base, BoxesUIState value) {
	BoxesCollectionItem* self;
	BoxesUIState _tmp0_ = 0;
#line 8 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self = (BoxesCollectionItem*) base;
#line 8 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp0_ = value;
#line 8 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self->priv->_previous_ui_state = _tmp0_;
#line 8 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_object_notify ((GObject *) self, "previous-ui-state");
#line 443 "collection.c"
}


static BoxesUIState boxes_collection_item_real_get_ui_state (BoxesUI* base) {
	BoxesUIState result;
	BoxesCollectionItem* self;
	BoxesUIState _tmp0_ = 0;
#line 9 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self = (BoxesCollectionItem*) base;
#line 9 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp0_ = self->priv->_ui_state;
#line 9 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	result = _tmp0_;
#line 9 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	return result;
#line 459 "collection.c"
}


static void boxes_collection_item_real_set_ui_state (BoxesUI* base, BoxesUIState value) {
	BoxesCollectionItem* self;
	BoxesUIState _tmp0_ = 0;
#line 9 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self = (BoxesCollectionItem*) base;
#line 9 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp0_ = value;
#line 9 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self->priv->_ui_state = _tmp0_;
#line 9 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_object_notify ((GObject *) self, "ui-state");
#line 474 "collection.c"
}


static void boxes_collection_item_class_init (BoxesCollectionItemClass * klass) {
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	boxes_collection_item_parent_class = g_type_class_peek_parent (klass);
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_type_class_add_private (klass, sizeof (BoxesCollectionItemPrivate));
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	BOXES_COLLECTION_ITEM_CLASS (klass)->compare = boxes_collection_item_real_compare;
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_collection_item_get_property;
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_collection_item_set_property;
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_collection_item_finalize;
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_COLLECTION_ITEM_NAME, g_param_spec_string ("name", "name", "name", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_COLLECTION_ITEM_ACTOR, g_param_spec_object ("actor", "actor", "actor", clutter_actor_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_COLLECTION_ITEM_ITEM_ACTOR, g_param_spec_object ("item-actor", "item-actor", "item-actor", clutter_actor_get_type (), G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_COLLECTION_ITEM_PREVIOUS_UI_STATE, g_param_spec_enum ("previous-ui-state", "previous-ui-state", "previous-ui-state", BOXES_TYPE_UI_STATE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_COLLECTION_ITEM_UI_STATE, g_param_spec_enum ("ui-state", "ui-state", "ui-state", BOXES_TYPE_UI_STATE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 501 "collection.c"
}


static void boxes_collection_item_boxes_ui_interface_init (BoxesUIIface * iface) {
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	boxes_collection_item_boxes_ui_parent_iface = g_type_interface_peek_parent (iface);
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	iface->get_actor = boxes_collection_item_real_get_actor;
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	iface->get_previous_ui_state = boxes_collection_item_real_get_previous_ui_state;
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	iface->set_previous_ui_state = boxes_collection_item_real_set_previous_ui_state;
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	iface->get_ui_state = boxes_collection_item_real_get_ui_state;
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	iface->set_ui_state = boxes_collection_item_real_set_ui_state;
#line 518 "collection.c"
}


static void boxes_collection_item_instance_init (BoxesCollectionItem * self) {
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self->priv = BOXES_COLLECTION_ITEM_GET_PRIVATE (self);
#line 525 "collection.c"
}


static void boxes_collection_item_finalize (GObject* obj) {
	BoxesCollectionItem * self;
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItem);
#line 4 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_g_free0 (self->priv->_name);
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (boxes_collection_item_parent_class)->finalize (obj);
#line 537 "collection.c"
}


GType boxes_collection_item_get_type (void) {
	static volatile gsize boxes_collection_item_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_collection_item_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesCollectionItemClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_collection_item_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesCollectionItem), 0, (GInstanceInitFunc) boxes_collection_item_instance_init, NULL };
		static const GInterfaceInfo boxes_ui_info = { (GInterfaceInitFunc) boxes_collection_item_boxes_ui_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
		GType boxes_collection_item_type_id;
		boxes_collection_item_type_id = g_type_register_static (G_TYPE_OBJECT, "BoxesCollectionItem", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_type_add_interface_static (boxes_collection_item_type_id, BOXES_TYPE_UI, &boxes_ui_info);
		g_once_init_leave (&boxes_collection_item_type_id__volatile, boxes_collection_item_type_id);
	}
	return boxes_collection_item_type_id__volatile;
}


static void _vala_boxes_collection_item_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesCollectionItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItem);
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	switch (property_id) {
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		case BOXES_COLLECTION_ITEM_NAME:
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		g_value_set_string (value, boxes_collection_item_get_name (self));
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		break;
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		case BOXES_COLLECTION_ITEM_ACTOR:
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		g_value_set_object (value, boxes_ui_get_actor ((BoxesUI*) self));
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		break;
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		case BOXES_COLLECTION_ITEM_PREVIOUS_UI_STATE:
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		g_value_set_enum (value, boxes_ui_get_previous_ui_state ((BoxesUI*) self));
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		break;
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		case BOXES_COLLECTION_ITEM_UI_STATE:
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		g_value_set_enum (value, boxes_ui_get_ui_state ((BoxesUI*) self));
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		break;
#line 584 "collection.c"
		default:
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		break;
#line 590 "collection.c"
	}
}


static void _vala_boxes_collection_item_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesCollectionItem * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItem);
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	switch (property_id) {
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		case BOXES_COLLECTION_ITEM_NAME:
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		boxes_collection_item_set_name (self, g_value_get_string (value));
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		break;
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		case BOXES_COLLECTION_ITEM_PREVIOUS_UI_STATE:
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		boxes_ui_set_previous_ui_state ((BoxesUI*) self, g_value_get_enum (value));
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		break;
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		case BOXES_COLLECTION_ITEM_UI_STATE:
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		boxes_ui_set_ui_state ((BoxesUI*) self, g_value_get_enum (value));
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		break;
#line 618 "collection.c"
		default:
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 3 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		break;
#line 624 "collection.c"
	}
}


BoxesCollection* boxes_collection_construct (GType object_type) {
	BoxesCollection * self = NULL;
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self = (BoxesCollection*) g_object_new (object_type, NULL);
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	return self;
#line 635 "collection.c"
}


BoxesCollection* boxes_collection_new (void) {
#line 41 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	return boxes_collection_construct (BOXES_TYPE_COLLECTION);
#line 642 "collection.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	return self ? g_object_ref (self) : NULL;
#line 649 "collection.c"
}


void boxes_collection_add_item (BoxesCollection* self, BoxesCollectionItem* item) {
	GPtrArray* _tmp0_ = NULL;
	BoxesCollectionItem* _tmp1_ = NULL;
	BoxesCollectionItem* _tmp2_ = NULL;
	BoxesCollectionItem* _tmp3_ = NULL;
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_return_if_fail (self != NULL);
#line 44 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_return_if_fail (item != NULL);
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp0_ = self->items;
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp1_ = item;
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 45 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_ptr_array_add (_tmp0_, _tmp2_);
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp3_ = item;
#line 46 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_signal_emit_by_name (self, "item-added", _tmp3_);
#line 674 "collection.c"
}


void boxes_collection_remove_item (BoxesCollection* self, BoxesCollectionItem* item) {
	GPtrArray* _tmp0_ = NULL;
	BoxesCollectionItem* _tmp1_ = NULL;
	BoxesCollectionItem* _tmp2_ = NULL;
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_return_if_fail (self != NULL);
#line 49 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_return_if_fail (item != NULL);
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp0_ = self->items;
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp1_ = item;
#line 50 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_ptr_array_remove (_tmp0_, _tmp1_);
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp2_ = item;
#line 51 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_signal_emit_by_name (self, "item-removed", _tmp2_);
#line 696 "collection.c"
}


static void _g_object_unref0_ (gpointer var) {
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 703 "collection.c"
}


static GObject * boxes_collection_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	BoxesCollection * self;
	GPtrArray* _tmp0_ = NULL;
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	parent_class = G_OBJECT_CLASS (boxes_collection_parent_class);
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_COLLECTION, BoxesCollection);
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp0_ = g_ptr_array_new_with_free_func (_g_object_unref0_);
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_g_ptr_array_unref0 (self->items);
#line 38 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self->items = _tmp0_;
#line 37 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	return obj;
#line 726 "collection.c"
}


static void boxes_collection_class_init (BoxesCollectionClass * klass) {
#line 31 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	boxes_collection_parent_class = g_type_class_peek_parent (klass);
#line 31 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->constructor = boxes_collection_constructor;
#line 31 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_collection_finalize;
#line 31 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_signal_new ("item_added", BOXES_TYPE_COLLECTION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, BOXES_TYPE_COLLECTION_ITEM);
#line 31 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_signal_new ("item_removed", BOXES_TYPE_COLLECTION, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, BOXES_TYPE_COLLECTION_ITEM);
#line 741 "collection.c"
}


static void boxes_collection_instance_init (BoxesCollection * self) {
}


static void boxes_collection_finalize (GObject* obj) {
	BoxesCollection * self;
#line 31 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_COLLECTION, BoxesCollection);
#line 35 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_g_ptr_array_unref0 (self->items);
#line 31 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (boxes_collection_parent_class)->finalize (obj);
#line 757 "collection.c"
}


GType boxes_collection_get_type (void) {
	static volatile gsize boxes_collection_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_collection_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesCollectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_collection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesCollection), 0, (GInstanceInitFunc) boxes_collection_instance_init, NULL };
		GType boxes_collection_type_id;
		boxes_collection_type_id = g_type_register_static (G_TYPE_OBJECT, "BoxesCollection", &g_define_type_info, 0);
		g_once_init_leave (&boxes_collection_type_id__volatile, boxes_collection_type_id);
	}
	return boxes_collection_type_id__volatile;
}


static gboolean string_contains (const gchar* self, const gchar* needle) {
	gboolean result = FALSE;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 1268 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, FALSE);
#line 1268 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, FALSE);
#line 1269 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	_tmp0_ = needle;
#line 1269 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	_tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_);
#line 1269 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	result = _tmp1_ != NULL;
#line 1269 "/home/zeenix/jhbuild/share/vala-0.24/vapi/glib-2.0.vapi"
	return result;
#line 789 "collection.c"
}


gboolean boxes_collection_filter_filter (BoxesCollectionFilter* self, BoxesCollectionItem* item) {
	gboolean result = FALSE;
	gchar* name = NULL;
	BoxesCollectionItem* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar** _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
#line 66 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 66 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_return_val_if_fail (item != NULL, FALSE);
#line 67 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp0_ = item;
#line 67 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp1_ = boxes_collection_item_get_name (_tmp0_);
#line 67 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp2_ = _tmp1_;
#line 67 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp3_ = boxes_canonicalize_for_search (_tmp2_);
#line 67 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	name = _tmp3_;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp4_ = self->priv->terms;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp4__length1 = self->priv->terms_length1;
#line 820 "collection.c"
	{
		gchar** term_collection = NULL;
		gint term_collection_length1 = 0;
		gint _term_collection_size_ = 0;
		gint term_it = 0;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		term_collection = _tmp4_;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		term_collection_length1 = _tmp4__length1;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		for (term_it = 0; term_it < _tmp4__length1; term_it = term_it + 1) {
#line 832 "collection.c"
			gchar* _tmp5_ = NULL;
			gchar* term = NULL;
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
			_tmp5_ = g_strdup (term_collection[term_it]);
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
			term = _tmp5_;
#line 839 "collection.c"
			{
				const gchar* _tmp6_ = NULL;
				const gchar* _tmp7_ = NULL;
				gboolean _tmp8_ = FALSE;
#line 69 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
				_tmp6_ = name;
#line 69 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
				_tmp7_ = term;
#line 69 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
				_tmp8_ = string_contains (_tmp6_, _tmp7_);
#line 69 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
				if (!_tmp8_) {
#line 70 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
					result = FALSE;
#line 70 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
					_g_free0 (term);
#line 70 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
					_g_free0 (name);
#line 70 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
					return result;
#line 860 "collection.c"
				}
#line 68 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
				_g_free0 (term);
#line 864 "collection.c"
			}
		}
	}
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	result = TRUE;
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_g_free0 (name);
#line 72 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	return result;
#line 874 "collection.c"
}


BoxesCollectionFilter* boxes_collection_filter_construct (GType object_type) {
	BoxesCollectionFilter * self = NULL;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self = (BoxesCollectionFilter*) g_object_new (object_type, NULL);
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	return self;
#line 884 "collection.c"
}


BoxesCollectionFilter* boxes_collection_filter_new (void) {
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	return boxes_collection_filter_construct (BOXES_TYPE_COLLECTION_FILTER);
#line 891 "collection.c"
}


void boxes_collection_filter_set_text (BoxesCollectionFilter* self, const gchar* value) {
	const gchar* _tmp0_ = NULL;
	gchar** _tmp1_ = NULL;
	gchar** _tmp2_ = NULL;
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_return_if_fail (self != NULL);
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp0_ = value;
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp2_ = _tmp1_ = g_strsplit (_tmp0_, " ", 0);
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self->priv->terms = (_vala_array_free (self->priv->terms, self->priv->terms_length1, (GDestroyNotify) g_free), NULL);
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self->priv->terms = _tmp2_;
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self->priv->terms_length1 = _vala_array_length (_tmp1_);
#line 60 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self->priv->_terms_size_ = self->priv->terms_length1;
#line 913 "collection.c"
	{
		gint i = 0;
#line 61 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		i = 0;
#line 918 "collection.c"
		{
			gboolean _tmp3_ = FALSE;
#line 61 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
			_tmp3_ = TRUE;
#line 61 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
			while (TRUE) {
#line 925 "collection.c"
				gint _tmp5_ = 0;
				gchar** _tmp6_ = NULL;
				gint _tmp6__length1 = 0;
				gchar** _tmp7_ = NULL;
				gint _tmp7__length1 = 0;
				gint _tmp8_ = 0;
				gchar** _tmp9_ = NULL;
				gint _tmp9__length1 = 0;
				gint _tmp10_ = 0;
				const gchar* _tmp11_ = NULL;
				gchar* _tmp12_ = NULL;
				gchar* _tmp13_ = NULL;
#line 61 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
				if (!_tmp3_) {
#line 940 "collection.c"
					gint _tmp4_ = 0;
#line 61 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
					_tmp4_ = i;
#line 61 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
					i = _tmp4_ + 1;
#line 946 "collection.c"
				}
#line 61 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
				_tmp3_ = FALSE;
#line 61 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
				_tmp5_ = i;
#line 61 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
				_tmp6_ = self->priv->terms;
#line 61 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
				_tmp6__length1 = self->priv->terms_length1;
#line 61 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
				if (!(_tmp5_ < _tmp6__length1)) {
#line 61 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
					break;
#line 960 "collection.c"
				}
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
				_tmp7_ = self->priv->terms;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
				_tmp7__length1 = self->priv->terms_length1;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
				_tmp8_ = i;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
				_tmp9_ = self->priv->terms;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
				_tmp9__length1 = self->priv->terms_length1;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
				_tmp10_ = i;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
				_tmp11_ = _tmp9_[_tmp10_];
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
				_tmp12_ = boxes_canonicalize_for_search (_tmp11_);
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
				_g_free0 (_tmp7_[_tmp8_]);
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
				_tmp7_[_tmp8_] = _tmp12_;
#line 62 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
				_tmp13_ = _tmp7_[_tmp8_];
#line 984 "collection.c"
			}
		}
	}
#line 59 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_object_notify ((GObject *) self, "text");
#line 990 "collection.c"
}


static void boxes_collection_filter_class_init (BoxesCollectionFilterClass * klass) {
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	boxes_collection_filter_parent_class = g_type_class_peek_parent (klass);
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_type_class_add_private (klass, sizeof (BoxesCollectionFilterPrivate));
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_collection_filter_set_property;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_collection_filter_finalize;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_COLLECTION_FILTER_TEXT, g_param_spec_string ("text", "text", "text", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE));
#line 1005 "collection.c"
}


static void boxes_collection_filter_instance_init (BoxesCollectionFilter * self) {
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self->priv = BOXES_COLLECTION_FILTER_GET_PRIVATE (self);
#line 1012 "collection.c"
}


static void boxes_collection_filter_finalize (GObject* obj) {
	BoxesCollectionFilter * self;
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_COLLECTION_FILTER, BoxesCollectionFilter);
#line 56 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self->priv->terms = (_vala_array_free (self->priv->terms, self->priv->terms_length1, (GDestroyNotify) g_free), NULL);
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (boxes_collection_filter_parent_class)->finalize (obj);
#line 1024 "collection.c"
}


GType boxes_collection_filter_get_type (void) {
	static volatile gsize boxes_collection_filter_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_collection_filter_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesCollectionFilterClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_collection_filter_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesCollectionFilter), 0, (GInstanceInitFunc) boxes_collection_filter_instance_init, NULL };
		GType boxes_collection_filter_type_id;
		boxes_collection_filter_type_id = g_type_register_static (G_TYPE_OBJECT, "BoxesCollectionFilter", &g_define_type_info, 0);
		g_once_init_leave (&boxes_collection_filter_type_id__volatile, boxes_collection_filter_type_id);
	}
	return boxes_collection_filter_type_id__volatile;
}


static void _vala_boxes_collection_filter_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	BoxesCollectionFilter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_COLLECTION_FILTER, BoxesCollectionFilter);
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	switch (property_id) {
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		case BOXES_COLLECTION_FILTER_TEXT:
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		boxes_collection_filter_set_text (self, g_value_get_string (value));
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		break;
#line 1051 "collection.c"
		default:
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 55 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
		break;
#line 1057 "collection.c"
	}
}


GType boxes_category_kind_get_type (void) {
	static volatile gsize boxes_category_kind_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_category_kind_type_id__volatile)) {
		static const GEnumValue values[] = {{BOXES_CATEGORY_KIND_USER, "BOXES_CATEGORY_KIND_USER", "user"}, {BOXES_CATEGORY_KIND_NEW, "BOXES_CATEGORY_KIND_NEW", "new"}, {BOXES_CATEGORY_KIND_FAVORITES, "BOXES_CATEGORY_KIND_FAVORITES", "favorites"}, {BOXES_CATEGORY_KIND_PRIVATE, "BOXES_CATEGORY_KIND_PRIVATE", "private"}, {BOXES_CATEGORY_KIND_SHARED, "BOXES_CATEGORY_KIND_SHARED", "shared"}, {0, NULL, NULL}};
		GType boxes_category_kind_type_id;
		boxes_category_kind_type_id = g_enum_register_static ("BoxesCategoryKind", values);
		g_once_init_leave (&boxes_category_kind_type_id__volatile, boxes_category_kind_type_id);
	}
	return boxes_category_kind_type_id__volatile;
}


BoxesCategory* boxes_category_construct (GType object_type, const gchar* name, BoxesCategoryKind kind) {
	BoxesCategory * self = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	BoxesCategoryKind _tmp2_ = 0;
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self = (BoxesCategory*) g_object_new (object_type, NULL);
#line 89 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp0_ = name;
#line 89 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 89 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_g_free0 (self->name);
#line 89 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self->name = _tmp1_;
#line 90 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp2_ = kind;
#line 90 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self->kind = _tmp2_;
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	return self;
#line 1097 "collection.c"
}


BoxesCategory* boxes_category_new (const gchar* name, BoxesCategoryKind kind) {
#line 88 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	return boxes_category_construct (BOXES_TYPE_CATEGORY, name, kind);
#line 1104 "collection.c"
}


static void boxes_category_class_init (BoxesCategoryClass * klass) {
#line 76 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	boxes_category_parent_class = g_type_class_peek_parent (klass);
#line 76 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_category_finalize;
#line 1113 "collection.c"
}


static void boxes_category_instance_init (BoxesCategory * self) {
}


static void boxes_category_finalize (GObject* obj) {
	BoxesCategory * self;
#line 76 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_CATEGORY, BoxesCategory);
#line 85 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	_g_free0 (self->name);
#line 76 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (boxes_category_parent_class)->finalize (obj);
#line 1129 "collection.c"
}


GType boxes_category_get_type (void) {
	static volatile gsize boxes_category_type_id__volatile = 0;
	if (g_once_init_enter (&boxes_category_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (BoxesCategoryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) boxes_category_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BoxesCategory), 0, (GInstanceInitFunc) boxes_category_instance_init, NULL };
		GType boxes_category_type_id;
		boxes_category_type_id = g_type_register_static (G_TYPE_OBJECT, "BoxesCategory", &g_define_type_info, 0);
		g_once_init_leave (&boxes_category_type_id__volatile, boxes_category_type_id);
	}
	return boxes_category_type_id__volatile;
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection-view.vala"
	if ((array != NULL) && (destroy_func != NULL)) {
#line 1148 "collection.c"
		int i;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection-view.vala"
		for (i = 0; i < array_length; i = i + 1) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection-view.vala"
			if (((gpointer*) array)[i] != NULL) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection-view.vala"
				destroy_func (((gpointer*) array)[i]);
#line 1156 "collection.c"
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection-view.vala"
	_vala_array_destroy (array, array_length, destroy_func);
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection-view.vala"
	g_free (array);
#line 1168 "collection.c"
}


static gint _vala_array_length (gpointer array) {
	int length;
	length = 0;
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection-view.vala"
	if (array) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection-view.vala"
		while (((gpointer*) array)[length]) {
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection-view.vala"
			length++;
#line 1181 "collection.c"
		}
	}
#line 10 "/home/zeenix/checkout/gnome/gnome-boxes/src/collection-view.vala"
	return length;
#line 1186 "collection.c"
}



