/* collection.c generated by valac 0.18.0.29-efcd0, 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>


#define BOXES_TYPE_UI (boxes_ui_get_type ())
#define BOXES_UI(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BOXES_TYPE_UI, BoxesUI))
#define BOXES_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BOXES_TYPE_UI, BoxesUIClass))
#define BOXES_IS_UI(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BOXES_TYPE_UI))
#define BOXES_IS_UI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BOXES_TYPE_UI))
#define BOXES_UI_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BOXES_TYPE_UI, BoxesUIClass))

typedef struct _BoxesUI BoxesUI;
typedef struct _BoxesUIClass BoxesUIClass;
typedef struct _BoxesUIPrivate BoxesUIPrivate;

#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_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 _BoxesUI {
	GObject parent_instance;
	BoxesUIPrivate * priv;
	BoxesUIState previous_ui_state;
};

struct _BoxesUIClass {
	GObjectClass parent_class;
	void (*ui_state_changed) (BoxesUI* self);
	ClutterActor* (*get_actor) (BoxesUI* self);
};

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

struct _BoxesCollectionItemClass {
	BoxesUIClass parent_class;
};

struct _BoxesCollectionItemPrivate {
	gchar* _name;
};

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

struct _BoxesCollectionClass {
	GObjectClass parent_class;
};

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

struct _BoxesCollectionFilterClass {
	GObjectClass parent_class;
};

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 gpointer boxes_collection_parent_class = NULL;
static gpointer boxes_collection_filter_parent_class = NULL;
static gpointer boxes_category_parent_class = NULL;

GType boxes_ui_get_type (void) G_GNUC_CONST;
GType boxes_ui_state_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
};
BoxesCollectionItem* boxes_collection_item_construct (GType object_type);
BoxesUI* boxes_ui_construct (GType object_type);
const gchar* boxes_collection_item_get_name (BoxesCollectionItem* self);
void boxes_collection_item_set_name (BoxesCollectionItem* self, const gchar* value);
static void boxes_collection_item_finalize (GObject* obj);
static void _vala_boxes_collection_item_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
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;
enum  {
	BOXES_COLLECTION_FILTER_DUMMY_PROPERTY
};
gboolean boxes_collection_filter_filter (BoxesCollectionFilter* self, BoxesCollectionItem* item);
BoxesCollectionFilter* boxes_collection_filter_new (void);
BoxesCollectionFilter* boxes_collection_filter_construct (GType object_type);
static void boxes_collection_filter_finalize (GObject* obj);
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);


BoxesCollectionItem* boxes_collection_item_construct (GType object_type) {
	BoxesCollectionItem * self = NULL;
#line 3 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	self = (BoxesCollectionItem*) boxes_ui_construct (object_type);
#line 3 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	return self;
#line 205 "collection.c"
}


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


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


static void boxes_collection_item_class_init (BoxesCollectionItemClass * klass) {
#line 3 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	boxes_collection_item_parent_class = g_type_class_peek_parent (klass);
#line 3 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	g_type_class_add_private (klass, sizeof (BoxesCollectionItemPrivate));
#line 3 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_boxes_collection_item_get_property;
#line 3 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_boxes_collection_item_set_property;
#line 3 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_collection_item_finalize;
#line 3 "/extra-data/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 256 "collection.c"
}


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


static void boxes_collection_item_finalize (GObject* obj) {
	BoxesCollectionItem * self;
#line 3 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_COLLECTION_ITEM, BoxesCollectionItem);
#line 4 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_g_free0 (self->priv->_name);
#line 3 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (boxes_collection_item_parent_class)->finalize (obj);
#line 275 "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 };
		GType boxes_collection_item_type_id;
		boxes_collection_item_type_id = g_type_register_static (BOXES_TYPE_UI, "BoxesCollectionItem", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		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 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	switch (property_id) {
#line 3 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
		case BOXES_COLLECTION_ITEM_NAME:
#line 3 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
		g_value_set_string (value, boxes_collection_item_get_name (self));
#line 3 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
		break;
#line 302 "collection.c"
		default:
#line 3 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 3 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
		break;
#line 308 "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 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	switch (property_id) {
#line 3 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
		case BOXES_COLLECTION_ITEM_NAME:
#line 3 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
		boxes_collection_item_set_name (self, g_value_get_string (value));
#line 3 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
		break;
#line 324 "collection.c"
		default:
#line 3 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 3 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
		break;
#line 330 "collection.c"
	}
}


BoxesCollection* boxes_collection_construct (GType object_type) {
	BoxesCollection * self = NULL;
#line 17 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	self = (BoxesCollection*) g_object_new (object_type, NULL);
#line 17 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	return self;
#line 341 "collection.c"
}


BoxesCollection* boxes_collection_new (void) {
#line 17 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	return boxes_collection_construct (BOXES_TYPE_COLLECTION);
#line 348 "collection.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 21 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	return self ? g_object_ref (self) : NULL;
#line 355 "collection.c"
}


void boxes_collection_add_item (BoxesCollection* self, BoxesCollectionItem* item) {
	GPtrArray* _tmp0_;
	BoxesCollectionItem* _tmp1_;
	BoxesCollectionItem* _tmp2_;
	BoxesCollectionItem* _tmp3_;
#line 20 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	g_return_if_fail (self != NULL);
#line 20 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	g_return_if_fail (item != NULL);
#line 21 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp0_ = self->items;
#line 21 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp1_ = item;
#line 21 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 21 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	g_ptr_array_add (_tmp0_, _tmp2_);
#line 22 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp3_ = item;
#line 22 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	g_signal_emit_by_name (self, "item-added", _tmp3_);
#line 380 "collection.c"
}


void boxes_collection_remove_item (BoxesCollection* self, BoxesCollectionItem* item) {
	GPtrArray* _tmp0_;
	BoxesCollectionItem* _tmp1_;
	BoxesCollectionItem* _tmp2_;
#line 25 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	g_return_if_fail (self != NULL);
#line 25 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	g_return_if_fail (item != NULL);
#line 26 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp0_ = self->items;
#line 26 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp1_ = item;
#line 26 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	g_ptr_array_remove (_tmp0_, _tmp1_);
#line 27 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp2_ = item;
#line 27 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	g_signal_emit_by_name (self, "item-removed", _tmp2_);
#line 402 "collection.c"
}


static void _g_object_unref0_ (gpointer var) {
#line 14 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	(var == NULL) ? NULL : (var = (g_object_unref (var), NULL));
#line 409 "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_;
#line 13 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	parent_class = G_OBJECT_CLASS (boxes_collection_parent_class);
#line 13 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 13 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_COLLECTION, BoxesCollection);
#line 14 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp0_ = g_ptr_array_new_with_free_func (_g_object_unref0_);
#line 14 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_g_ptr_array_unref0 (self->items);
#line 14 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	self->items = _tmp0_;
#line 13 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	return obj;
#line 432 "collection.c"
}


static void boxes_collection_class_init (BoxesCollectionClass * klass) {
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	boxes_collection_parent_class = g_type_class_peek_parent (klass);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->constructor = boxes_collection_constructor;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_collection_finalize;
#line 7 "/extra-data/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 7 "/extra-data/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 447 "collection.c"
}


static void boxes_collection_instance_init (BoxesCollection * self) {
}


static void boxes_collection_finalize (GObject* obj) {
	BoxesCollection * self;
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_COLLECTION, BoxesCollection);
#line 11 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_g_ptr_array_unref0 (self->items);
#line 7 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (boxes_collection_parent_class)->finalize (obj);
#line 463 "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 gint string_index_of (const gchar* self, const gchar* needle, gint start_index) {
	gint result = 0;
	gint _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_ = NULL;
	gchar* _result_;
	gchar* _tmp3_;
#line 884 "/home/zeenix/jhbuild/share/vala-0.20/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, 0);
#line 884 "/home/zeenix/jhbuild/share/vala-0.20/vapi/glib-2.0.vapi"
	g_return_val_if_fail (needle != NULL, 0);
#line 885 "/home/zeenix/jhbuild/share/vala-0.20/vapi/glib-2.0.vapi"
	_tmp0_ = start_index;
#line 885 "/home/zeenix/jhbuild/share/vala-0.20/vapi/glib-2.0.vapi"
	_tmp1_ = needle;
#line 885 "/home/zeenix/jhbuild/share/vala-0.20/vapi/glib-2.0.vapi"
	_tmp2_ = strstr (((gchar*) self) + _tmp0_, (gchar*) _tmp1_);
#line 885 "/home/zeenix/jhbuild/share/vala-0.20/vapi/glib-2.0.vapi"
	_result_ = _tmp2_;
#line 887 "/home/zeenix/jhbuild/share/vala-0.20/vapi/glib-2.0.vapi"
	_tmp3_ = _result_;
#line 887 "/home/zeenix/jhbuild/share/vala-0.20/vapi/glib-2.0.vapi"
	if (_tmp3_ != NULL) {
#line 502 "collection.c"
		gchar* _tmp4_;
#line 888 "/home/zeenix/jhbuild/share/vala-0.20/vapi/glib-2.0.vapi"
		_tmp4_ = _result_;
#line 888 "/home/zeenix/jhbuild/share/vala-0.20/vapi/glib-2.0.vapi"
		result = (gint) (_tmp4_ - ((gchar*) self));
#line 888 "/home/zeenix/jhbuild/share/vala-0.20/vapi/glib-2.0.vapi"
		return result;
#line 510 "collection.c"
	} else {
#line 890 "/home/zeenix/jhbuild/share/vala-0.20/vapi/glib-2.0.vapi"
		result = -1;
#line 890 "/home/zeenix/jhbuild/share/vala-0.20/vapi/glib-2.0.vapi"
		return result;
#line 516 "collection.c"
	}
}


gboolean boxes_collection_filter_filter (BoxesCollectionFilter* self, BoxesCollectionItem* item) {
	gboolean result = FALSE;
	const gchar* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_ = NULL;
	gchar* text;
	BoxesCollectionItem* _tmp3_;
	const gchar* _tmp4_;
	const gchar* _tmp5_;
	gchar* _tmp6_ = NULL;
	gchar* _tmp7_;
	const gchar* _tmp8_;
	gint _tmp9_ = 0;
	gboolean _tmp10_;
#line 34 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 34 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	g_return_val_if_fail (item != NULL, FALSE);
#line 35 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp0_ = self->text;
#line 35 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	if (_tmp0_ == NULL) {
#line 36 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
		result = TRUE;
#line 36 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
		return result;
#line 547 "collection.c"
	}
#line 38 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp1_ = self->text;
#line 38 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp2_ = g_utf8_casefold (_tmp1_, (gssize) (-1));
#line 38 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	text = _tmp2_;
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp3_ = item;
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp4_ = boxes_collection_item_get_name (_tmp3_);
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp5_ = _tmp4_;
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp6_ = g_utf8_casefold (_tmp5_, (gssize) (-1));
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp7_ = _tmp6_;
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp8_ = text;
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp9_ = string_index_of (_tmp7_, _tmp8_, 0);
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp10_ = _tmp9_ != (-1);
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_g_free0 (_tmp7_);
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	result = _tmp10_;
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_g_free0 (text);
#line 39 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	return result;
#line 579 "collection.c"
}


BoxesCollectionFilter* boxes_collection_filter_construct (GType object_type) {
	BoxesCollectionFilter * self = NULL;
#line 31 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	self = (BoxesCollectionFilter*) g_object_new (object_type, NULL);
#line 31 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	return self;
#line 589 "collection.c"
}


BoxesCollectionFilter* boxes_collection_filter_new (void) {
#line 31 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	return boxes_collection_filter_construct (BOXES_TYPE_COLLECTION_FILTER);
#line 596 "collection.c"
}


static void boxes_collection_filter_class_init (BoxesCollectionFilterClass * klass) {
#line 31 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	boxes_collection_filter_parent_class = g_type_class_peek_parent (klass);
#line 31 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_collection_filter_finalize;
#line 605 "collection.c"
}


static void boxes_collection_filter_instance_init (BoxesCollectionFilter * self) {
}


static void boxes_collection_filter_finalize (GObject* obj) {
	BoxesCollectionFilter * self;
#line 31 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_COLLECTION_FILTER, BoxesCollectionFilter);
#line 32 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_g_free0 (self->text);
#line 31 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (boxes_collection_filter_parent_class)->finalize (obj);
#line 621 "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;
}


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 55 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	self = (BoxesCategory*) g_object_new (object_type, NULL);
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp0_ = name;
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_g_free0 (self->name);
#line 56 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	self->name = _tmp1_;
#line 57 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_tmp2_ = kind;
#line 57 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	self->kind = _tmp2_;
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	return self;
#line 672 "collection.c"
}


BoxesCategory* boxes_category_new (const gchar* name, BoxesCategoryKind kind) {
#line 55 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	return boxes_category_construct (BOXES_TYPE_CATEGORY, name, kind);
#line 679 "collection.c"
}


static void boxes_category_class_init (BoxesCategoryClass * klass) {
#line 43 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	boxes_category_parent_class = g_type_class_peek_parent (klass);
#line 43 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (klass)->finalize = boxes_category_finalize;
#line 688 "collection.c"
}


static void boxes_category_instance_init (BoxesCategory * self) {
}


static void boxes_category_finalize (GObject* obj) {
	BoxesCategory * self;
#line 43 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BOXES_TYPE_CATEGORY, BoxesCategory);
#line 52 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	_g_free0 (self->name);
#line 43 "/extra-data/checkout/gnome/gnome-boxes/src/collection.vala"
	G_OBJECT_CLASS (boxes_category_parent_class)->finalize (obj);
#line 704 "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;
}



