/* collection.c generated by valac 0.38.4, 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 <stdlib.h>
#include <string.h>
#include <libcommon.h>
#include <gio/gio.h>
#include <gtk/gtk.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;
enum  {
	BOXES_COLLECTION_ITEM_0_PROPERTY,
	BOXES_COLLECTION_ITEM_NAME_PROPERTY,
	BOXES_COLLECTION_ITEM_PREVIOUS_UI_STATE_PROPERTY,
	BOXES_COLLECTION_ITEM_UI_STATE_PROPERTY,
	BOXES_COLLECTION_ITEM_NUM_PROPERTIES
};
static GParamSpec* boxes_collection_item_properties[BOXES_COLLECTION_ITEM_NUM_PROPERTIES];
#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;
enum  {
	BOXES_COLLECTION_0_PROPERTY,
	BOXES_COLLECTION_LENGTH_PROPERTY,
	BOXES_COLLECTION_NUM_PROPERTIES
};
static GParamSpec* boxes_collection_properties[BOXES_COLLECTION_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define __g_list_free__g_object_unref0_0(var) ((var == NULL) ? NULL : (var = (_g_list_free__g_object_unref0_ (var), NULL)))

#define BOXES_TYPE_APP_WINDOW (boxes_app_window_get_type ())
#define BOXES_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_APP_WINDOW, BoxesAppWindow))
#define BOXES_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_APP_WINDOW, BoxesAppWindowClass))
#define BOXES_IS_APP_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_APP_WINDOW))
#define BOXES_IS_APP_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_APP_WINDOW))
#define BOXES_APP_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_APP_WINDOW, BoxesAppWindowClass))

typedef struct _BoxesAppWindow BoxesAppWindow;
typedef struct _BoxesAppWindowClass BoxesAppWindowClass;
typedef struct _Block20Data Block20Data;
typedef struct _Block21Data Block21Data;
enum  {
	BOXES_COLLECTION_ITEM_ADDED_SIGNAL,
	BOXES_COLLECTION_ITEM_REMOVED_SIGNAL,
	BOXES_COLLECTION_NUM_SIGNALS
};
static guint boxes_collection_signals[BOXES_COLLECTION_NUM_SIGNALS] = {0};

#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;
enum  {
	BOXES_COLLECTION_FILTER_0_PROPERTY,
	BOXES_COLLECTION_FILTER_TEXT_PROPERTY,
	BOXES_COLLECTION_FILTER_NUM_PROPERTIES
};
static GParamSpec* boxes_collection_filter_properties[BOXES_COLLECTION_FILTER_NUM_PROPERTIES];
enum  {
	BOXES_COLLECTION_FILTER_FILTER_FUNC_CHANGED_SIGNAL,
	BOXES_COLLECTION_FILTER_NUM_SIGNALS
};
static guint boxes_collection_filter_signals[BOXES_COLLECTION_FILTER_NUM_SIGNALS] = {0};

#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 ())
enum  {
	BOXES_CATEGORY_0_PROPERTY,
	BOXES_CATEGORY_NUM_PROPERTIES
};
static GParamSpec* boxes_category_properties[BOXES_CATEGORY_NUM_PROPERTIES];

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

struct _BoxesUIIface {
	GTypeInterface parent_iface;
	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);
};

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

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

struct _BoxesCollectionClass {
	GObjectClass parent_class;
};

struct _BoxesCollectionPrivate {
	GList* hidden_items;
};

struct _Block20Data {
	int _ref_count_;
	BoxesCollection* self;
	BoxesAppWindow* window;
	BoxesCollectionItem* item;
};

struct _Block21Data {
	int _ref_count_;
	Block20Data * _data20_;
	gulong ui_state_id;
};

typedef void (*BoxesCollectionCollectionForeachFunc) (BoxesCollectionItem* item, void* user_data);
struct _BoxesCollectionFilter {
	GObject parent_instance;
	BoxesCollectionFilterPrivate * priv;
};

struct _BoxesCollectionFilterClass {
	GObjectClass parent_class;
};

typedef gboolean (*BoxesCollectionFilterFunc) (BoxesCollectionItem* item, void* user_data);
struct _BoxesCollectionFilterPrivate {
	gchar** terms;
	gint terms_length1;
	gint _terms_size_;
	gchar* _text;
	BoxesCollectionFilterFunc _filter_func;
	gpointer _filter_func_target;
};

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))
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);
static void boxes_collection_item_finalize (GObject * obj);
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;
#define BOXES_COLLECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), BOXES_TYPE_COLLECTION, BoxesCollectionPrivate))
static void _g_object_unref0_ (gpointer var);
static inline void _g_list_free__g_object_unref0_ (GList* self);
BoxesCollection* boxes_collection_new (void);
BoxesCollection* boxes_collection_construct (GType object_type);
BoxesCollectionItem* boxes_collection_get_item (BoxesCollection* self, gint position);
void boxes_collection_add_item (BoxesCollection* self, BoxesCollectionItem* item);
GType boxes_app_window_get_type (void) G_GNUC_CONST;
static Block20Data* block20_data_ref (Block20Data* _data20_);
static void block20_data_unref (void * _userdata_);
BoxesAppWindow* boxes_machine_get_window (BoxesMachine* self);
static Block21Data* block21_data_ref (Block21Data* _data21_);
static void block21_data_unref (void * _userdata_);
static void ___lambda10_ (Block21Data* _data21_);
static void ____lambda10__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
void boxes_ui_set_state (BoxesUI* self, BoxesUIState new_state);
static gint __lambda11_ (BoxesCollection* self, GObject* item1, GObject* item2);
static gint ___lambda11__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self);
void boxes_collection_remove_item (BoxesCollection* self, BoxesCollectionItem* item);
guint boxes_collection_get_length (BoxesCollection* self);
void boxes_collection_foreach_item (BoxesCollection* self, BoxesCollectionCollectionForeachFunc foreach_func, void* foreach_func_target);
static GObject * boxes_collection_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void boxes_collection_finalize (GObject * obj);
static void _vala_boxes_collection_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
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))
gboolean boxes_collection_filter_filter (BoxesCollectionFilter* self, BoxesCollectionItem* item);
BoxesCollectionFilterFunc boxes_collection_filter_get_filter_func (BoxesCollectionFilter* self, gpointer* result_target);
BoxesCollectionFilter* boxes_collection_filter_new (void);
BoxesCollectionFilter* boxes_collection_filter_construct (GType object_type);
const gchar* boxes_collection_filter_get_text (BoxesCollectionFilter* self);
void boxes_collection_filter_set_text (BoxesCollectionFilter* self, const gchar* value);
void boxes_collection_filter_set_filter_func (BoxesCollectionFilter* self, BoxesCollectionFilterFunc value, gpointer value_target);
static void boxes_collection_filter_finalize (GObject * obj);
static void _vala_boxes_collection_filter_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
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;
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_;
	gboolean _tmp1_ = FALSE;
	const gchar* _tmp2_;
	gboolean _tmp3_;
	const gchar* _tmp11_;
	gboolean _tmp12_;
	BoxesCollectionItem* _tmp13_;
	const gchar* _tmp14_;
	gboolean _tmp15_;
#line 9 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_return_val_if_fail (other != NULL, 0);
#line 11 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp0_ = other;
#line 11 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	if (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, BOXES_TYPE_MACHINE)) {
#line 12 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		result = 1;
#line 12 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		return result;
#line 324 "collection.c"
	}
#line 16 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp2_ = self->priv->_name;
#line 16 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp3_ = boxes_is_set (_tmp2_);
#line 16 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	if (_tmp3_) {
#line 332 "collection.c"
		BoxesCollectionItem* _tmp4_;
		const gchar* _tmp5_;
		gboolean _tmp6_;
#line 16 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp4_ = other;
#line 16 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp5_ = _tmp4_->priv->_name;
#line 16 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp6_ = boxes_is_set (_tmp5_);
#line 16 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp1_ = _tmp6_;
#line 344 "collection.c"
	} else {
#line 16 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp1_ = FALSE;
#line 348 "collection.c"
	}
#line 16 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	if (_tmp1_) {
#line 352 "collection.c"
		const gchar* _tmp7_;
		BoxesCollectionItem* _tmp8_;
		const gchar* _tmp9_;
		gint _tmp10_;
#line 17 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp7_ = self->priv->_name;
#line 17 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp8_ = other;
#line 17 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp9_ = _tmp8_->priv->_name;
#line 17 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp10_ = g_utf8_collate (_tmp7_, _tmp9_);
#line 17 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		result = _tmp10_;
#line 17 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		return result;
#line 369 "collection.c"
	}
#line 20 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp11_ = self->priv->_name;
#line 20 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp12_ = boxes_is_set (_tmp11_);
#line 20 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	if (_tmp12_) {
#line 21 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		result = -1;
#line 21 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		return result;
#line 381 "collection.c"
	}
#line 22 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp13_ = other;
#line 22 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp14_ = _tmp13_->priv->_name;
#line 22 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp15_ = boxes_is_set (_tmp14_);
#line 22 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	if (_tmp15_) {
#line 23 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		result = 1;
#line 23 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		return result;
#line 395 "collection.c"
	}
#line 25 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	result = 0;
#line 25 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	return result;
#line 401 "collection.c"
}


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


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


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


void boxes_collection_item_set_name (BoxesCollectionItem* self, const gchar* value) {
#line 4 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_return_if_fail (self != NULL);
#line 4 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	if (g_strcmp0 (value, boxes_collection_item_get_name (self)) != 0) {
#line 444 "collection.c"
		const gchar* _tmp0_;
		gchar* _tmp1_;
#line 4 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp0_ = value;
#line 4 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp1_ = g_strdup (_tmp0_);
#line 4 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_g_free0 (self->priv->_name);
#line 4 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		self->priv->_name = _tmp1_;
#line 4 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		g_object_notify_by_pspec ((GObject *) self, boxes_collection_item_properties[BOXES_COLLECTION_ITEM_NAME_PROPERTY]);
#line 457 "collection.c"
	}
}


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


static void boxes_collection_item_real_set_previous_ui_state (BoxesUI* base, BoxesUIState value) {
	BoxesCollectionItem* self;
#line 6 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self = (BoxesCollectionItem*) base;
#line 6 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	if (boxes_collection_item_real_get_previous_ui_state (base) != value) {
#line 484 "collection.c"
		BoxesUIState _tmp0_;
#line 6 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp0_ = value;
#line 6 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		self->priv->_previous_ui_state = _tmp0_;
#line 6 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		g_object_notify_by_pspec ((GObject *) self, boxes_collection_item_properties[BOXES_COLLECTION_ITEM_PREVIOUS_UI_STATE_PROPERTY]);
#line 492 "collection.c"
	}
}


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


static void boxes_collection_item_real_set_ui_state (BoxesUI* base, BoxesUIState value) {
	BoxesCollectionItem* self;
#line 7 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self = (BoxesCollectionItem*) base;
#line 7 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	if (boxes_collection_item_real_get_ui_state (base) != value) {
#line 519 "collection.c"
		BoxesUIState _tmp0_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp0_ = value;
#line 7 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		self->priv->_ui_state = _tmp0_;
#line 7 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		g_object_notify_by_pspec ((GObject *) self, boxes_collection_item_properties[BOXES_COLLECTION_ITEM_UI_STATE_PROPERTY]);
#line 527 "collection.c"
	}
}


static void boxes_collection_item_class_init (BoxesCollectionItemClass * klass) {
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	boxes_collection_item_parent_class = g_type_class_peek_parent (klass);
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_type_class_add_private (klass, sizeof (BoxesCollectionItemPrivate));
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	((BoxesCollectionItemClass *) klass)->compare = (gint (*) (BoxesCollectionItem *, BoxesCollectionItem*)) boxes_collection_item_real_compare;
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_collection_item_get_property;
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_collection_item_set_property;
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_collection_item_finalize;
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_COLLECTION_ITEM_NAME_PROPERTY, boxes_collection_item_properties[BOXES_COLLECTION_ITEM_NAME_PROPERTY] = 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/fborges/checkout/gnome-boxes/src/collection.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_COLLECTION_ITEM_PREVIOUS_UI_STATE_PROPERTY, boxes_collection_item_properties[BOXES_COLLECTION_ITEM_PREVIOUS_UI_STATE_PROPERTY] = 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/fborges/checkout/gnome-boxes/src/collection.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_COLLECTION_ITEM_UI_STATE_PROPERTY, boxes_collection_item_properties[BOXES_COLLECTION_ITEM_UI_STATE_PROPERTY] = 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 551 "collection.c"
}


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


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


static void boxes_collection_item_finalize (GObject * obj) {
	BoxesCollectionItem * self;
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItem);
#line 4 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_g_free0 (self->priv->_name);
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (boxes_collection_item_parent_class)->finalize (obj);
#line 585 "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/fborges/checkout/gnome-boxes/src/collection.vala"
	switch (property_id) {
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		case BOXES_COLLECTION_ITEM_NAME_PROPERTY:
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		g_value_set_string (value, boxes_collection_item_get_name (self));
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		break;
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		case BOXES_COLLECTION_ITEM_PREVIOUS_UI_STATE_PROPERTY:
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		g_value_set_enum (value, boxes_ui_get_previous_ui_state ((BoxesUI*) self));
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		break;
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		case BOXES_COLLECTION_ITEM_UI_STATE_PROPERTY:
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		g_value_set_enum (value, boxes_ui_get_ui_state ((BoxesUI*) self));
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		break;
#line 626 "collection.c"
		default:
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		break;
#line 632 "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/fborges/checkout/gnome-boxes/src/collection.vala"
	switch (property_id) {
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		case BOXES_COLLECTION_ITEM_NAME_PROPERTY:
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		boxes_collection_item_set_name (self, g_value_get_string (value));
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		break;
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		case BOXES_COLLECTION_ITEM_PREVIOUS_UI_STATE_PROPERTY:
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		boxes_ui_set_previous_ui_state ((BoxesUI*) self, g_value_get_enum (value));
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		break;
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		case BOXES_COLLECTION_ITEM_UI_STATE_PROPERTY:
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		boxes_ui_set_ui_state ((BoxesUI*) self, g_value_get_enum (value));
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		break;
#line 660 "collection.c"
		default:
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 3 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		break;
#line 666 "collection.c"
	}
}


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


static inline void _g_list_free__g_object_unref0_ (GList* self) {
#line 35 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_list_free_full (self, (GDestroyNotify) _g_object_unref0_);
#line 681 "collection.c"
}


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


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


BoxesCollectionItem* boxes_collection_get_item (BoxesCollection* self, gint position) {
	BoxesCollectionItem* result = NULL;
	GListStore* _tmp0_;
	gint _tmp1_;
	GObject* _tmp2_;
	BoxesCollectionItem* _tmp3_;
#line 51 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 52 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp0_ = self->items;
#line 52 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp1_ = position;
#line 52 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp2_ = g_list_model_get_item ((GListModel*) _tmp0_, (guint) _tmp1_);
#line 52 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp3_ = G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, BOXES_TYPE_COLLECTION_ITEM) ? ((BoxesCollectionItem*) _tmp2_) : NULL;
#line 52 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	if (_tmp3_ == NULL) {
#line 52 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_g_object_unref0 (_tmp2_);
#line 722 "collection.c"
	}
#line 52 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	result = _tmp3_;
#line 52 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	return result;
#line 728 "collection.c"
}


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


static Block20Data* block20_data_ref (Block20Data* _data20_) {
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_atomic_int_inc (&_data20_->_ref_count_);
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	return _data20_;
#line 744 "collection.c"
}


static void block20_data_unref (void * _userdata_) {
	Block20Data* _data20_;
	_data20_ = (Block20Data*) _userdata_;
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	if (g_atomic_int_dec_and_test (&_data20_->_ref_count_)) {
#line 753 "collection.c"
		BoxesCollection* self;
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		self = _data20_->self;
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_g_object_unref0 (_data20_->window);
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_g_object_unref0 (_data20_->item);
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_g_object_unref0 (self);
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		g_slice_free (Block20Data, _data20_);
#line 765 "collection.c"
	}
}


static Block21Data* block21_data_ref (Block21Data* _data21_) {
#line 65 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_atomic_int_inc (&_data21_->_ref_count_);
#line 65 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	return _data21_;
#line 775 "collection.c"
}


static void block21_data_unref (void * _userdata_) {
	Block21Data* _data21_;
	_data21_ = (Block21Data*) _userdata_;
#line 65 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	if (g_atomic_int_dec_and_test (&_data21_->_ref_count_)) {
#line 784 "collection.c"
		BoxesCollection* self;
#line 65 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		self = _data21_->_data20_->self;
#line 65 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		block20_data_unref (_data21_->_data20_);
#line 65 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_data21_->_data20_ = NULL;
#line 65 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		g_slice_free (Block21Data, _data21_);
#line 794 "collection.c"
	}
}


static void ___lambda10_ (Block21Data* _data21_) {
	Block20Data* _data20_;
	BoxesCollection* self;
	BoxesAppWindow* _tmp0_;
	BoxesUIState _tmp1_;
	BoxesUIState _tmp2_;
	GList* _tmp3_;
	BoxesCollectionItem* _tmp4_;
	GList* _tmp5_;
	BoxesAppWindow* _tmp8_;
	gulong _tmp9_;
#line 70 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_data20_ = _data21_->_data20_;
#line 70 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self = _data20_->self;
#line 71 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp0_ = _data20_->window;
#line 71 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp1_ = boxes_ui_get_ui_state ((BoxesUI*) _tmp0_);
#line 71 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp2_ = _tmp1_;
#line 71 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	if (_tmp2_ == BOXES_UI_STATE_WIZARD) {
#line 72 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		return;
#line 824 "collection.c"
	}
#line 74 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp3_ = self->priv->hidden_items;
#line 74 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp4_ = _data20_->item;
#line 74 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp5_ = g_list_find (_tmp3_, _tmp4_);
#line 74 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	if (_tmp5_ != NULL) {
#line 834 "collection.c"
		BoxesCollectionItem* _tmp6_;
		BoxesCollectionItem* _tmp7_;
#line 75 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp6_ = _data20_->item;
#line 75 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		boxes_collection_add_item (self, _tmp6_);
#line 76 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp7_ = _data20_->item;
#line 76 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		self->priv->hidden_items = g_list_remove (self->priv->hidden_items, _tmp7_);
#line 845 "collection.c"
	}
#line 78 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp8_ = _data20_->window;
#line 78 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp9_ = _data21_->ui_state_id;
#line 78 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_signal_handler_disconnect ((GObject*) _tmp8_, _tmp9_);
#line 853 "collection.c"
}


static void ____lambda10__g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
#line 70 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	___lambda10_ (self);
#line 860 "collection.c"
}


static gint __lambda11_ (BoxesCollection* self, GObject* item1, GObject* item2) {
	gint result = 0;
	gboolean _tmp0_ = FALSE;
	GObject* _tmp1_;
	GObject* _tmp3_;
	GObject* _tmp4_;
	gint _tmp5_;
#line 86 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_return_val_if_fail (item1 != NULL, 0);
#line 86 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_return_val_if_fail (item2 != NULL, 0);
#line 87 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp1_ = item1;
#line 87 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	if (_tmp1_ == NULL) {
#line 87 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp0_ = TRUE;
#line 881 "collection.c"
	} else {
		GObject* _tmp2_;
#line 87 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp2_ = item2;
#line 87 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp0_ = _tmp2_ == NULL;
#line 888 "collection.c"
	}
#line 87 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	if (_tmp0_) {
#line 88 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		result = 0;
#line 88 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		return result;
#line 896 "collection.c"
	}
#line 90 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp3_ = item1;
#line 90 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp4_ = item2;
#line 90 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp5_ = boxes_collection_item_compare (G_TYPE_CHECK_INSTANCE_TYPE (_tmp3_, BOXES_TYPE_COLLECTION_ITEM) ? ((BoxesCollectionItem*) _tmp3_) : NULL, G_TYPE_CHECK_INSTANCE_TYPE (_tmp4_, BOXES_TYPE_COLLECTION_ITEM) ? ((BoxesCollectionItem*) _tmp4_) : NULL);
#line 90 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	result = _tmp5_;
#line 90 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	return result;
#line 908 "collection.c"
}


static gint ___lambda11__gcompare_data_func (gconstpointer a, gconstpointer b, gpointer self) {
	gint result;
	result = __lambda11_ ((BoxesCollection*) self, (GObject*) a, (GObject*) b);
#line 86 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	return result;
#line 917 "collection.c"
}


void boxes_collection_add_item (BoxesCollection* self, BoxesCollectionItem* item) {
	Block20Data* _data20_;
	BoxesCollectionItem* _tmp0_;
	BoxesCollectionItem* _tmp1_;
	BoxesMachine* machine = NULL;
	BoxesCollectionItem* _tmp2_;
	BoxesMachine* _tmp3_;
	BoxesMachine* _tmp4_;
	BoxesMachine* _tmp7_;
	BoxesAppWindow* _tmp8_;
	BoxesAppWindow* _tmp9_;
	BoxesAppWindow* _tmp10_;
	BoxesAppWindow* _tmp11_;
	BoxesUIState _tmp12_;
	BoxesUIState _tmp13_;
	BoxesCollectionItem* _tmp18_;
	BoxesAppWindow* _tmp19_;
	BoxesUIState _tmp20_;
	BoxesUIState _tmp21_;
	GListStore* _tmp22_;
	BoxesCollectionItem* _tmp23_;
	BoxesCollectionItem* _tmp24_;
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_return_if_fail (self != NULL);
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_return_if_fail (item != NULL);
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_data20_ = g_slice_new0 (Block20Data);
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_data20_->_ref_count_ = 1;
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_data20_->self = g_object_ref (self);
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp0_ = item;
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_g_object_unref0 (_data20_->item);
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_data20_->item = _tmp1_;
#line 56 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp2_ = _data20_->item;
#line 56 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp3_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp2_, BOXES_TYPE_MACHINE) ? ((BoxesMachine*) _tmp2_) : NULL);
#line 56 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	machine = _tmp3_;
#line 58 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp4_ = machine;
#line 58 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	if (_tmp4_ == NULL) {
#line 971 "collection.c"
		gchar* _tmp5_;
		gchar* _tmp6_;
#line 59 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp5_ = g_strdup_printf ("Cannot add item %p", &_data20_->item);
#line 59 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp6_ = _tmp5_;
#line 59 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		g_warning ("collection.vala:59: %s", _tmp6_);
#line 59 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_g_free0 (_tmp6_);
#line 61 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_g_object_unref0 (machine);
#line 61 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		block20_data_unref (_data20_);
#line 61 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_data20_ = NULL;
#line 61 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		return;
#line 990 "collection.c"
	}
#line 64 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp7_ = machine;
#line 64 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp8_ = boxes_machine_get_window (_tmp7_);
#line 64 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp9_ = _tmp8_;
#line 64 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp10_ = _g_object_ref0 (_tmp9_);
#line 64 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_data20_->window = _tmp10_;
#line 65 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp11_ = _data20_->window;
#line 65 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp12_ = boxes_ui_get_ui_state ((BoxesUI*) _tmp11_);
#line 65 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp13_ = _tmp12_;
#line 65 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	if (_tmp13_ == BOXES_UI_STATE_WIZARD) {
#line 1010 "collection.c"
		Block21Data* _data21_;
		BoxesCollectionItem* _tmp14_;
		BoxesCollectionItem* _tmp15_;
		BoxesAppWindow* _tmp16_;
		gulong _tmp17_;
#line 65 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_data21_ = g_slice_new0 (Block21Data);
#line 65 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_data21_->_ref_count_ = 1;
#line 65 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_data21_->_data20_ = block20_data_ref (_data20_);
#line 67 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp14_ = _data20_->item;
#line 67 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp15_ = _g_object_ref0 (_tmp14_);
#line 67 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		self->priv->hidden_items = g_list_append (self->priv->hidden_items, _tmp15_);
#line 69 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_data21_->ui_state_id = (gulong) 0;
#line 70 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp16_ = _data20_->window;
#line 70 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp17_ = g_signal_connect_data ((GObject*) _tmp16_, "notify::ui-state", (GCallback) ____lambda10__g_object_notify, block21_data_ref (_data21_), (GClosureNotify) block21_data_unref, 0);
#line 70 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_data21_->ui_state_id = _tmp17_;
#line 81 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		block21_data_unref (_data21_);
#line 81 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_data21_ = NULL;
#line 81 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_g_object_unref0 (machine);
#line 81 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		block20_data_unref (_data20_);
#line 81 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_data20_ = NULL;
#line 81 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		return;
#line 1048 "collection.c"
	}
#line 84 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp18_ = _data20_->item;
#line 84 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp19_ = _data20_->window;
#line 84 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp20_ = boxes_ui_get_ui_state ((BoxesUI*) _tmp19_);
#line 84 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp21_ = _tmp20_;
#line 84 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	boxes_ui_set_state ((BoxesUI*) _tmp18_, _tmp21_);
#line 86 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp22_ = self->items;
#line 86 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp23_ = _data20_->item;
#line 86 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_list_store_insert_sorted (_tmp22_, (GObject*) _tmp23_, ___lambda11__gcompare_data_func, self);
#line 93 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp24_ = _data20_->item;
#line 93 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_signal_emit (self, boxes_collection_signals[BOXES_COLLECTION_ITEM_ADDED_SIGNAL], 0, _tmp24_);
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_g_object_unref0 (machine);
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	block20_data_unref (_data20_);
#line 55 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_data20_ = NULL;
#line 1076 "collection.c"
}


void boxes_collection_remove_item (BoxesCollection* self, BoxesCollectionItem* item) {
	BoxesCollectionItem* _tmp0_;
#line 96 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_return_if_fail (self != NULL);
#line 96 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_return_if_fail (item != NULL);
#line 97 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp0_ = item;
#line 97 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self->priv->hidden_items = g_list_remove (self->priv->hidden_items, _tmp0_);
#line 1090 "collection.c"
	{
		gint i = 0;
#line 98 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		i = 0;
#line 1095 "collection.c"
		{
			gboolean _tmp1_ = FALSE;
#line 98 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
			_tmp1_ = TRUE;
#line 98 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
			while (TRUE) {
#line 1102 "collection.c"
				gint _tmp3_;
				guint _tmp4_;
				guint _tmp5_;
				gint _tmp6_;
				BoxesCollectionItem* _tmp7_;
				BoxesCollectionItem* _tmp8_;
				BoxesCollectionItem* _tmp9_;
				gboolean _tmp10_;
#line 98 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				if (!_tmp1_) {
#line 1113 "collection.c"
					gint _tmp2_;
#line 98 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
					_tmp2_ = i;
#line 98 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
					i = _tmp2_ + 1;
#line 1119 "collection.c"
				}
#line 98 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp1_ = FALSE;
#line 98 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp3_ = i;
#line 98 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp4_ = boxes_collection_get_length (self);
#line 98 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp5_ = _tmp4_;
#line 98 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				if (!(((guint) _tmp3_) < _tmp5_)) {
#line 98 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
					break;
#line 1133 "collection.c"
				}
#line 99 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp6_ = i;
#line 99 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp7_ = boxes_collection_get_item (self, _tmp6_);
#line 99 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp8_ = _tmp7_;
#line 99 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp9_ = item;
#line 99 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp10_ = _tmp8_ == _tmp9_;
#line 99 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_g_object_unref0 (_tmp8_);
#line 99 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				if (_tmp10_) {
#line 1149 "collection.c"
					GListStore* _tmp11_;
					gint _tmp12_;
					BoxesCollectionItem* _tmp13_;
#line 100 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
					_tmp11_ = self->items;
#line 100 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
					_tmp12_ = i;
#line 100 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
					g_list_store_remove (_tmp11_, (guint) _tmp12_);
#line 101 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
					_tmp13_ = item;
#line 101 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
					g_signal_emit (self, boxes_collection_signals[BOXES_COLLECTION_ITEM_REMOVED_SIGNAL], 0, _tmp13_);
#line 103 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
					break;
#line 1165 "collection.c"
				}
			}
		}
	}
}


void boxes_collection_foreach_item (BoxesCollection* self, BoxesCollectionCollectionForeachFunc foreach_func, void* foreach_func_target) {
#line 108 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_return_if_fail (self != NULL);
#line 1176 "collection.c"
	{
		gint i = 0;
#line 109 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		i = 0;
#line 1181 "collection.c"
		{
			gboolean _tmp0_ = FALSE;
#line 109 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
			_tmp0_ = TRUE;
#line 109 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
			while (TRUE) {
#line 1188 "collection.c"
				gint _tmp2_;
				guint _tmp3_;
				guint _tmp4_;
				BoxesCollectionCollectionForeachFunc _tmp5_;
				void* _tmp5__target;
				gint _tmp6_;
				BoxesCollectionItem* _tmp7_;
				BoxesCollectionItem* _tmp8_;
#line 109 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				if (!_tmp0_) {
#line 1199 "collection.c"
					gint _tmp1_;
#line 109 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
					_tmp1_ = i;
#line 109 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
					i = _tmp1_ + 1;
#line 1205 "collection.c"
				}
#line 109 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp0_ = FALSE;
#line 109 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp2_ = i;
#line 109 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp3_ = boxes_collection_get_length (self);
#line 109 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp4_ = _tmp3_;
#line 109 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				if (!(((guint) _tmp2_) < _tmp4_)) {
#line 109 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
					break;
#line 1219 "collection.c"
				}
#line 110 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp5_ = foreach_func;
#line 110 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp5__target = foreach_func_target;
#line 110 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp6_ = i;
#line 110 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp7_ = boxes_collection_get_item (self, _tmp6_);
#line 110 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp8_ = _tmp7_;
#line 110 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp5_ (_tmp8_, _tmp5__target);
#line 110 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_g_object_unref0 (_tmp8_);
#line 1235 "collection.c"
			}
		}
	}
}


guint boxes_collection_get_length (BoxesCollection* self) {
	guint result;
	GListStore* _tmp0_;
	guint _tmp1_;
#line 38 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_return_val_if_fail (self != NULL, 0U);
#line 38 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp0_ = self->items;
#line 38 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp1_ = g_list_model_get_n_items ((GListModel*) _tmp0_);
#line 38 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	result = _tmp1_;
#line 38 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	return result;
#line 1256 "collection.c"
}


static GObject * boxes_collection_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
	GObject * obj;
	GObjectClass * parent_class;
	BoxesCollection * self;
	GListStore* _tmp0_;
#line 43 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	parent_class = G_OBJECT_CLASS (boxes_collection_parent_class);
#line 43 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 43 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_COLLECTION, BoxesCollection);
#line 44 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp0_ = g_list_store_new (BOXES_TYPE_COLLECTION_ITEM);
#line 44 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_g_object_unref0 (self->items);
#line 44 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self->items = _tmp0_;
#line 45 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	__g_list_free__g_object_unref0_0 (self->priv->hidden_items);
#line 45 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self->priv->hidden_items = NULL;
#line 43 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	return obj;
#line 1283 "collection.c"
}


static void boxes_collection_class_init (BoxesCollectionClass * klass) {
#line 29 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	boxes_collection_parent_class = g_type_class_peek_parent (klass);
#line 29 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_type_class_add_private (klass, sizeof (BoxesCollectionPrivate));
#line 29 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_collection_get_property;
#line 29 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->constructor = boxes_collection_constructor;
#line 29 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_collection_finalize;
#line 29 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_COLLECTION_LENGTH_PROPERTY, boxes_collection_properties[BOXES_COLLECTION_LENGTH_PROPERTY] = g_param_spec_uint ("length", "length", "length", 0, G_MAXUINT, 0U, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 29 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	boxes_collection_signals[BOXES_COLLECTION_ITEM_ADDED_SIGNAL] = 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 29 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	boxes_collection_signals[BOXES_COLLECTION_ITEM_REMOVED_SIGNAL] = 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 1304 "collection.c"
}


static void boxes_collection_instance_init (BoxesCollection * self) {
#line 29 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self->priv = BOXES_COLLECTION_GET_PRIVATE (self);
#line 1311 "collection.c"
}


static void boxes_collection_finalize (GObject * obj) {
	BoxesCollection * self;
#line 29 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_COLLECTION, BoxesCollection);
#line 33 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_g_object_unref0 (self->items);
#line 35 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	__g_list_free__g_object_unref0_0 (self->priv->hidden_items);
#line 29 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (boxes_collection_parent_class)->finalize (obj);
#line 1325 "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 void _vala_boxes_collection_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesCollection * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_COLLECTION, BoxesCollection);
#line 29 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	switch (property_id) {
#line 29 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		case BOXES_COLLECTION_LENGTH_PROPERTY:
#line 29 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		g_value_set_uint (value, boxes_collection_get_length (self));
#line 29 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		break;
#line 1352 "collection.c"
		default:
#line 29 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 29 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		break;
#line 1358 "collection.c"
	}
}


static gboolean string_contains (const gchar* self, const gchar* needle) {
	gboolean result = FALSE;
	const gchar* _tmp0_;
	gchar* _tmp1_;
#line 1411 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, FALSE);
#line 1411 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, FALSE);
#line 1412 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp0_ = needle;
#line 1412 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	_tmp1_ = strstr ((gchar*) self, (gchar*) _tmp0_);
#line 1412 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	result = _tmp1_ != NULL;
#line 1412 "/usr/share/vala-0.38/vapi/glib-2.0.vapi"
	return result;
#line 1379 "collection.c"
}


gboolean boxes_collection_filter_filter (BoxesCollectionFilter* self, BoxesCollectionItem* item) {
	gboolean result = FALSE;
	gchar* name = NULL;
	BoxesCollectionItem* _tmp0_;
	const gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar* _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	BoxesCollectionFilterFunc _tmp9_;
	void* _tmp9__target;
	BoxesCollectionFilterFunc _tmp10_;
	void* _tmp10__target;
#line 141 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 141 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_return_val_if_fail (item != NULL, FALSE);
#line 142 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp0_ = item;
#line 142 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp1_ = boxes_collection_item_get_name (_tmp0_);
#line 142 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp2_ = _tmp1_;
#line 142 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp3_ = boxes_canonicalize_for_search (_tmp2_);
#line 142 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	name = _tmp3_;
#line 143 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp4_ = self->priv->terms;
#line 143 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp4__length1 = self->priv->terms_length1;
#line 1414 "collection.c"
	{
		gchar** term_collection = NULL;
		gint term_collection_length1 = 0;
		gint _term_collection_size_ = 0;
		gint term_it = 0;
#line 143 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		term_collection = _tmp4_;
#line 143 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		term_collection_length1 = _tmp4__length1;
#line 143 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		for (term_it = 0; term_it < _tmp4__length1; term_it = term_it + 1) {
#line 1426 "collection.c"
			gchar* _tmp5_;
			gchar* term = NULL;
#line 143 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
			_tmp5_ = g_strdup (term_collection[term_it]);
#line 143 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
			term = _tmp5_;
#line 1433 "collection.c"
			{
				const gchar* _tmp6_;
				const gchar* _tmp7_;
				gboolean _tmp8_;
#line 144 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp6_ = name;
#line 144 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp7_ = term;
#line 144 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp8_ = string_contains (_tmp6_, _tmp7_);
#line 144 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				if (!_tmp8_) {
#line 145 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
					result = FALSE;
#line 145 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
					_g_free0 (term);
#line 145 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
					_g_free0 (name);
#line 145 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
					return result;
#line 1454 "collection.c"
				}
#line 143 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_g_free0 (term);
#line 1458 "collection.c"
			}
		}
	}
#line 148 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp9_ = boxes_collection_filter_get_filter_func (self, &_tmp9__target);
#line 148 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp10_ = _tmp9_;
#line 148 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp10__target = _tmp9__target;
#line 148 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	if (_tmp10_ != NULL) {
#line 1470 "collection.c"
		BoxesCollectionFilterFunc _tmp11_;
		void* _tmp11__target;
		BoxesCollectionFilterFunc _tmp12_;
		void* _tmp12__target;
		BoxesCollectionItem* _tmp13_;
		gboolean _tmp14_;
#line 149 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp11_ = boxes_collection_filter_get_filter_func (self, &_tmp11__target);
#line 149 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp12_ = _tmp11_;
#line 149 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp12__target = _tmp11__target;
#line 149 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp13_ = item;
#line 149 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_tmp14_ = _tmp12_ (_tmp13_, _tmp12__target);
#line 149 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		result = _tmp14_;
#line 149 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		_g_free0 (name);
#line 149 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		return result;
#line 1493 "collection.c"
	}
#line 151 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	result = TRUE;
#line 151 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_g_free0 (name);
#line 151 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	return result;
#line 1501 "collection.c"
}


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


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


const gchar* boxes_collection_filter_get_text (BoxesCollectionFilter* self) {
	const gchar* result;
	const gchar* _tmp0_;
#line 122 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 122 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp0_ = self->priv->_text;
#line 122 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	result = _tmp0_;
#line 122 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	return result;
#line 1533 "collection.c"
}


void boxes_collection_filter_set_text (BoxesCollectionFilter* self, const gchar* value) {
	const gchar* _tmp0_;
	gchar* _tmp1_;
	const gchar* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
#line 123 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_return_if_fail (self != NULL);
#line 124 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp0_ = value;
#line 124 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 124 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_g_free0 (self->priv->_text);
#line 124 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self->priv->_text = _tmp1_;
#line 125 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp2_ = value;
#line 125 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp4_ = _tmp3_ = g_strsplit (_tmp2_, " ", 0);
#line 125 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self->priv->terms = (_vala_array_free (self->priv->terms, self->priv->terms_length1, (GDestroyNotify) g_free), NULL);
#line 125 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self->priv->terms = _tmp4_;
#line 125 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self->priv->terms_length1 = _vala_array_length (_tmp3_);
#line 125 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self->priv->_terms_size_ = self->priv->terms_length1;
#line 1565 "collection.c"
	{
		gint i = 0;
#line 126 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		i = 0;
#line 1570 "collection.c"
		{
			gboolean _tmp5_ = FALSE;
#line 126 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
			_tmp5_ = TRUE;
#line 126 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
			while (TRUE) {
#line 1577 "collection.c"
				gint _tmp7_;
				gchar** _tmp8_;
				gint _tmp8__length1;
				gchar** _tmp9_;
				gint _tmp9__length1;
				gint _tmp10_;
				gchar** _tmp11_;
				gint _tmp11__length1;
				gint _tmp12_;
				const gchar* _tmp13_;
				gchar* _tmp14_;
				gchar* _tmp15_;
#line 126 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				if (!_tmp5_) {
#line 1592 "collection.c"
					gint _tmp6_;
#line 126 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
					_tmp6_ = i;
#line 126 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
					i = _tmp6_ + 1;
#line 1598 "collection.c"
				}
#line 126 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp5_ = FALSE;
#line 126 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp7_ = i;
#line 126 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp8_ = self->priv->terms;
#line 126 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp8__length1 = self->priv->terms_length1;
#line 126 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				if (!(_tmp7_ < _tmp8__length1)) {
#line 126 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
					break;
#line 1612 "collection.c"
				}
#line 127 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp9_ = self->priv->terms;
#line 127 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp9__length1 = self->priv->terms_length1;
#line 127 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp10_ = i;
#line 127 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp11_ = self->priv->terms;
#line 127 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp11__length1 = self->priv->terms_length1;
#line 127 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp12_ = i;
#line 127 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp13_ = _tmp11_[_tmp12_];
#line 127 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp14_ = boxes_canonicalize_for_search (_tmp13_);
#line 127 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_g_free0 (_tmp9_[_tmp10_]);
#line 127 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp9_[_tmp10_] = _tmp14_;
#line 127 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
				_tmp15_ = _tmp9_[_tmp10_];
#line 1636 "collection.c"
			}
		}
	}
#line 123 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_object_notify_by_pspec ((GObject *) self, boxes_collection_filter_properties[BOXES_COLLECTION_FILTER_TEXT_PROPERTY]);
#line 1642 "collection.c"
}


BoxesCollectionFilterFunc boxes_collection_filter_get_filter_func (BoxesCollectionFilter* self, gpointer* result_target) {
	BoxesCollectionFilterFunc result;
	BoxesCollectionFilterFunc _tmp0_;
	void* _tmp0__target;
	BoxesCollectionFilterFunc _tmp1_;
	void* _tmp1__target;
#line 133 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 133 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp0_ = self->priv->_filter_func;
#line 133 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp0__target = self->priv->_filter_func_target;
#line 133 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp1_ = _tmp0_;
#line 133 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp1__target = _tmp0__target;
#line 133 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	*result_target = _tmp1__target;
#line 133 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	result = _tmp1_;
#line 133 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	return result;
#line 1668 "collection.c"
}


void boxes_collection_filter_set_filter_func (BoxesCollectionFilter* self, BoxesCollectionFilterFunc value, gpointer value_target) {
	BoxesCollectionFilterFunc _tmp0_;
	void* _tmp0__target;
#line 134 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_return_if_fail (self != NULL);
#line 135 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp0_ = value;
#line 135 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp0__target = value_target;
#line 135 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self->priv->_filter_func = _tmp0_;
#line 135 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self->priv->_filter_func_target = _tmp0__target;
#line 136 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_signal_emit (self, boxes_collection_filter_signals[BOXES_COLLECTION_FILTER_FILTER_FUNC_CHANGED_SIGNAL], 0);
#line 1687 "collection.c"
}


static void boxes_collection_filter_class_init (BoxesCollectionFilterClass * klass) {
#line 114 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	boxes_collection_filter_parent_class = g_type_class_peek_parent (klass);
#line 114 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_type_class_add_private (klass, sizeof (BoxesCollectionFilterPrivate));
#line 114 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_collection_filter_get_property;
#line 114 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_collection_filter_set_property;
#line 114 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_collection_filter_finalize;
#line 114 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), BOXES_COLLECTION_FILTER_TEXT_PROPERTY, boxes_collection_filter_properties[BOXES_COLLECTION_FILTER_TEXT_PROPERTY] = g_param_spec_string ("text", "text", "text", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE | G_PARAM_WRITABLE));
#line 114 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	boxes_collection_filter_signals[BOXES_COLLECTION_FILTER_FILTER_FUNC_CHANGED_SIGNAL] = g_signal_new ("filter-func-changed", BOXES_TYPE_COLLECTION_FILTER, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
#line 1706 "collection.c"
}


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


static void boxes_collection_filter_finalize (GObject * obj) {
	BoxesCollectionFilter * self;
#line 114 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_COLLECTION_FILTER, BoxesCollectionFilter);
#line 118 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self->priv->terms = (_vala_array_free (self->priv->terms, self->priv->terms_length1, (GDestroyNotify) g_free), NULL);
#line 120 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_g_free0 (self->priv->_text);
#line 114 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (boxes_collection_filter_parent_class)->finalize (obj);
#line 1727 "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_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	BoxesCollectionFilter * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, BOXES_TYPE_COLLECTION_FILTER, BoxesCollectionFilter);
#line 114 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	switch (property_id) {
#line 114 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		case BOXES_COLLECTION_FILTER_TEXT_PROPERTY:
#line 114 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		g_value_set_string (value, boxes_collection_filter_get_text (self));
#line 114 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		break;
#line 1754 "collection.c"
		default:
#line 114 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 114 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		break;
#line 1760 "collection.c"
	}
}


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 114 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	switch (property_id) {
#line 114 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		case BOXES_COLLECTION_FILTER_TEXT_PROPERTY:
#line 114 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		boxes_collection_filter_set_text (self, g_value_get_string (value));
#line 114 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		break;
#line 1776 "collection.c"
		default:
#line 114 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 114 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
		break;
#line 1782 "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_;
	gchar* _tmp1_;
	BoxesCategoryKind _tmp2_;
#line 169 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 169 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self = (BoxesCategory*) g_object_new (object_type, NULL);
#line 170 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp0_ = name;
#line 170 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 170 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_g_free0 (self->name);
#line 170 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self->name = _tmp1_;
#line 171 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_tmp2_ = kind;
#line 171 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self->kind = _tmp2_;
#line 169 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	return self;
#line 1822 "collection.c"
}


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


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


static void boxes_category_instance_init (BoxesCategory * self) {
}


static void boxes_category_finalize (GObject * obj) {
	BoxesCategory * self;
#line 157 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_CATEGORY, BoxesCategory);
#line 166 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	_g_free0 (self->name);
#line 157 "/home/fborges/checkout/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (boxes_category_parent_class)->finalize (obj);
#line 1854 "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) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}


static gint _vala_array_length (gpointer array) {
	int length;
	length = 0;
	if (array) {
		while (((gpointer*) array)[length]) {
			length++;
		}
	}
	return length;
}



