/* result-set.c generated by valac 0.56.17, the Vala compiler
 * generated from result-set.vala, do not modify */

/*
 * Copyright (C) 2010 Michal Hruby <michal.mhr@gmail.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Authored by Michal Hruby <michal.mhr@gmail.com>
 *
 */

#include "synapse-core.h"
#include <gee.h>
#include <glib-object.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

enum  {
	SYNAPSE_RESULT_SET_0_PROPERTY,
	SYNAPSE_RESULT_SET_ELEMENT_TYPE_PROPERTY,
	SYNAPSE_RESULT_SET_SIZE_PROPERTY,
	SYNAPSE_RESULT_SET_KEYS_PROPERTY,
	SYNAPSE_RESULT_SET_ENTRIES_PROPERTY,
	SYNAPSE_RESULT_SET_NUM_PROPERTIES
};
static GParamSpec* synapse_result_set_properties[SYNAPSE_RESULT_SET_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _SynapseResultSetPrivate {
	GeeMap* matches;
	GeeSet* uris;
};

static gint SynapseResultSet_private_offset;
static gpointer synapse_result_set_parent_class = NULL;
static GeeTraversableIface * synapse_result_set_gee_traversable_parent_iface = NULL;
static GeeIterableIface * synapse_result_set_gee_iterable_parent_iface = NULL;

static GeeIterator* synapse_result_set_real_iterator (GeeIterable* base);
static gboolean synapse_result_set_real_foreach (GeeTraversable* base,
                                          GeeForallFunc func,
                                          gpointer func_target);
static gint __lambda4_ (SynapseResultSet* self,
                 GeeMapEntry* a,
                 GeeMapEntry* b);
static gint ___lambda4__gcompare_data_func (gconstpointer a,
                                     gconstpointer b,
                                     gpointer self);
static GObject * synapse_result_set_constructor (GType type,
                                          guint n_construct_properties,
                                          GObjectConstructParam * construct_properties);
static void synapse_result_set_finalize (GObject * obj);
static GType synapse_result_set_get_type_once (void);
static void _vala_synapse_result_set_get_property (GObject * object,
                                            guint property_id,
                                            GValue * value,
                                            GParamSpec * pspec);

static inline gpointer
synapse_result_set_get_instance_private (SynapseResultSet* self)
{
	return G_STRUCT_MEMBER_P (self, SynapseResultSet_private_offset);
}

SynapseResultSet*
synapse_result_set_construct (GType object_type)
{
	SynapseResultSet * self = NULL;
#line 30 "result-set.vala"
	self = (SynapseResultSet*) g_object_new (object_type, NULL);
#line 28 "result-set.vala"
	return self;
#line 96 "result-set.c"
}

SynapseResultSet*
synapse_result_set_new (void)
{
#line 28 "result-set.vala"
	return synapse_result_set_construct (SYNAPSE_TYPE_RESULT_SET);
#line 104 "result-set.c"
}

static GeeIterator*
synapse_result_set_real_iterator (GeeIterable* base)
{
	SynapseResultSet * self;
	GeeMap* _tmp0_;
	GeeIterator* _tmp1_;
	GeeIterator* result;
#line 60 "result-set.vala"
	self = (SynapseResultSet*) base;
#line 62 "result-set.vala"
	_tmp0_ = self->priv->matches;
#line 62 "result-set.vala"
	_tmp1_ = gee_iterable_iterator ((GeeIterable*) _tmp0_);
#line 62 "result-set.vala"
	result = _tmp1_;
#line 62 "result-set.vala"
	return result;
#line 124 "result-set.c"
}

void
synapse_result_set_add (SynapseResultSet* self,
                        SynapseMatch* match,
                        gint relevancy)
{
	GeeMap* _tmp0_;
	SynapseUriMatch* uri_match = NULL;
	SynapseUriMatch* _tmp1_;
#line 65 "result-set.vala"
	g_return_if_fail (self != NULL);
#line 65 "result-set.vala"
	g_return_if_fail (match != NULL);
#line 67 "result-set.vala"
	_tmp0_ = self->priv->matches;
#line 67 "result-set.vala"
	gee_map_set (_tmp0_, match, (gpointer) ((gintptr) relevancy));
#line 69 "result-set.vala"
	uri_match = SYNAPSE_IS_URI_MATCH (match) ? ((SynapseUriMatch*) match) : NULL;
#line 70 "result-set.vala"
	_tmp1_ = uri_match;
#line 70 "result-set.vala"
	if (_tmp1_ != NULL) {
#line 149 "result-set.c"
		const gchar* uri = NULL;
		SynapseUriMatch* _tmp2_;
		const gchar* _tmp3_;
		const gchar* _tmp4_;
		gboolean _tmp5_ = FALSE;
		const gchar* _tmp6_;
#line 72 "result-set.vala"
		_tmp2_ = uri_match;
#line 72 "result-set.vala"
		_tmp3_ = synapse_uri_match_get_uri (_tmp2_);
#line 72 "result-set.vala"
		_tmp4_ = _tmp3_;
#line 72 "result-set.vala"
		uri = _tmp4_;
#line 73 "result-set.vala"
		_tmp6_ = uri;
#line 73 "result-set.vala"
		if (_tmp6_ != NULL) {
#line 168 "result-set.c"
			const gchar* _tmp7_;
#line 73 "result-set.vala"
			_tmp7_ = uri;
#line 73 "result-set.vala"
			_tmp5_ = g_strcmp0 (_tmp7_, "") != 0;
#line 174 "result-set.c"
		} else {
#line 73 "result-set.vala"
			_tmp5_ = FALSE;
#line 178 "result-set.c"
		}
#line 73 "result-set.vala"
		if (_tmp5_) {
#line 182 "result-set.c"
			GeeSet* _tmp8_;
			const gchar* _tmp9_;
#line 75 "result-set.vala"
			_tmp8_ = self->priv->uris;
#line 75 "result-set.vala"
			_tmp9_ = uri;
#line 75 "result-set.vala"
			gee_collection_add ((GeeCollection*) _tmp8_, _tmp9_);
#line 191 "result-set.c"
		}
	}
}

void
synapse_result_set_add_all (SynapseResultSet* self,
                            SynapseResultSet* rs)
{
	GeeMap* _tmp0_;
	GeeMap* _tmp1_;
	GeeSet* _tmp2_;
	GeeSet* _tmp3_;
#line 80 "result-set.vala"
	g_return_if_fail (self != NULL);
#line 82 "result-set.vala"
	if (rs == NULL) {
#line 82 "result-set.vala"
		return;
#line 210 "result-set.c"
	}
#line 83 "result-set.vala"
	_tmp0_ = self->priv->matches;
#line 83 "result-set.vala"
	_tmp1_ = rs->priv->matches;
#line 83 "result-set.vala"
	gee_map_set_all (_tmp0_, _tmp1_);
#line 84 "result-set.vala"
	_tmp2_ = self->priv->uris;
#line 84 "result-set.vala"
	_tmp3_ = rs->priv->uris;
#line 84 "result-set.vala"
	gee_collection_add_all ((GeeCollection*) _tmp2_, (GeeCollection*) _tmp3_);
#line 224 "result-set.c"
}

gboolean
synapse_result_set_contains_uri (SynapseResultSet* self,
                                 const gchar* uri)
{
	GeeSet* _tmp0_;
	gboolean result;
#line 87 "result-set.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 87 "result-set.vala"
	g_return_val_if_fail (uri != NULL, FALSE);
#line 89 "result-set.vala"
	_tmp0_ = self->priv->uris;
#line 89 "result-set.vala"
	result = gee_collection_contains ((GeeCollection*) _tmp0_, uri);
#line 89 "result-set.vala"
	return result;
#line 243 "result-set.c"
}

static gboolean
synapse_result_set_real_foreach (GeeTraversable* base,
                                 GeeForallFunc func,
                                 gpointer func_target)
{
	SynapseResultSet * self;
	GeeMap* _tmp0_;
	GeeSet* _tmp1_;
	GeeSet* _tmp2_;
	GeeSet* _tmp3_;
	gboolean _tmp4_;
	gboolean result;
#line 92 "result-set.vala"
	self = (SynapseResultSet*) base;
#line 94 "result-set.vala"
	_tmp0_ = self->priv->matches;
#line 94 "result-set.vala"
	_tmp1_ = gee_map_get_keys (_tmp0_);
#line 94 "result-set.vala"
	_tmp2_ = _tmp1_;
#line 94 "result-set.vala"
	_tmp3_ = _tmp2_;
#line 94 "result-set.vala"
	_tmp4_ = gee_traversable_foreach ((GeeTraversable*) _tmp3_, func, func_target);
#line 94 "result-set.vala"
	_g_object_unref0 (_tmp3_);
#line 94 "result-set.vala"
	result = _tmp4_;
#line 94 "result-set.vala"
	return result;
#line 276 "result-set.c"
}

static gint
__lambda4_ (SynapseResultSet* self,
            GeeMapEntry* a,
            GeeMapEntry* b)
{
	GeeMapEntry* e1 = NULL;
	GeeMapEntry* e2 = NULL;
	gint relevancy_delta = 0;
	GeeMapEntry* _tmp0_;
	gconstpointer _tmp1_;
	gconstpointer _tmp2_;
	GeeMapEntry* _tmp3_;
	gconstpointer _tmp4_;
	gconstpointer _tmp5_;
	gint result;
#line 102 "result-set.vala"
	g_return_val_if_fail (a != NULL, 0);
#line 102 "result-set.vala"
	g_return_val_if_fail (b != NULL, 0);
#line 103 "result-set.vala"
	e1 = G_TYPE_CHECK_INSTANCE_CAST (a, GEE_MAP_TYPE_ENTRY, GeeMapEntry);
#line 104 "result-set.vala"
	e2 = G_TYPE_CHECK_INSTANCE_CAST (b, GEE_MAP_TYPE_ENTRY, GeeMapEntry);
#line 105 "result-set.vala"
	_tmp0_ = e2;
#line 105 "result-set.vala"
	_tmp1_ = gee_map_entry_get_value (_tmp0_);
#line 105 "result-set.vala"
	_tmp2_ = _tmp1_;
#line 105 "result-set.vala"
	_tmp3_ = e1;
#line 105 "result-set.vala"
	_tmp4_ = gee_map_entry_get_value (_tmp3_);
#line 105 "result-set.vala"
	_tmp5_ = _tmp4_;
#line 105 "result-set.vala"
	relevancy_delta = ((gint) ((gintptr) _tmp2_)) - ((gint) ((gintptr) _tmp5_));
#line 106 "result-set.vala"
	if (relevancy_delta != 0) {
#line 106 "result-set.vala"
		result = relevancy_delta;
#line 106 "result-set.vala"
		return result;
#line 322 "result-set.c"
	} else {
		GeeMapEntry* _tmp6_;
		gconstpointer _tmp7_;
		gconstpointer _tmp8_;
		const gchar* _tmp9_;
		const gchar* _tmp10_;
		GeeMapEntry* _tmp11_;
		gconstpointer _tmp12_;
		gconstpointer _tmp13_;
		const gchar* _tmp14_;
		const gchar* _tmp15_;
#line 108 "result-set.vala"
		_tmp6_ = e1;
#line 108 "result-set.vala"
		_tmp7_ = gee_map_entry_get_key (_tmp6_);
#line 108 "result-set.vala"
		_tmp8_ = _tmp7_;
#line 108 "result-set.vala"
		_tmp9_ = synapse_match_get_title ((SynapseMatch*) _tmp8_);
#line 108 "result-set.vala"
		_tmp10_ = _tmp9_;
#line 108 "result-set.vala"
		_tmp11_ = e2;
#line 108 "result-set.vala"
		_tmp12_ = gee_map_entry_get_key (_tmp11_);
#line 108 "result-set.vala"
		_tmp13_ = _tmp12_;
#line 108 "result-set.vala"
		_tmp14_ = synapse_match_get_title ((SynapseMatch*) _tmp13_);
#line 108 "result-set.vala"
		_tmp15_ = _tmp14_;
#line 108 "result-set.vala"
		result = g_ascii_strcasecmp (_tmp10_, _tmp15_);
#line 108 "result-set.vala"
		return result;
#line 358 "result-set.c"
	}
}

static gint
___lambda4__gcompare_data_func (gconstpointer a,
                                gconstpointer b,
                                gpointer self)
{
	gint result;
	result = __lambda4_ ((SynapseResultSet*) self, (GeeMapEntry*) a, (GeeMapEntry*) b);
#line 102 "result-set.vala"
	return result;
#line 371 "result-set.c"
}

GeeList*
synapse_result_set_get_sorted_list (SynapseResultSet* self)
{
	GeeArrayList* l = NULL;
	GeeArrayList* _tmp0_;
	GeeArrayList* _tmp1_;
	GeeMap* _tmp2_;
	GeeSet* _tmp3_;
	GeeSet* _tmp4_;
	GeeSet* _tmp5_;
	GeeArrayList* _tmp6_;
	GeeArrayList* sorted_list = NULL;
	GeeArrayList* _tmp7_;
	GeeList* result;
#line 97 "result-set.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 99 "result-set.vala"
	_tmp0_ = gee_array_list_new (GEE_MAP_TYPE_ENTRY, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 99 "result-set.vala"
	l = _tmp0_;
#line 100 "result-set.vala"
	_tmp1_ = l;
#line 100 "result-set.vala"
	_tmp2_ = self->priv->matches;
#line 100 "result-set.vala"
	_tmp3_ = gee_map_get_entries (_tmp2_);
#line 100 "result-set.vala"
	_tmp4_ = _tmp3_;
#line 100 "result-set.vala"
	_tmp5_ = _tmp4_;
#line 100 "result-set.vala"
	gee_array_list_add_all (_tmp1_, (GeeCollection*) _tmp5_);
#line 100 "result-set.vala"
	_g_object_unref0 (_tmp5_);
#line 102 "result-set.vala"
	_tmp6_ = l;
#line 102 "result-set.vala"
	gee_list_sort ((GeeList*) _tmp6_, ___lambda4__gcompare_data_func, g_object_ref (self), g_object_unref);
#line 111 "result-set.vala"
	_tmp7_ = gee_array_list_new (SYNAPSE_TYPE_MATCH, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL);
#line 111 "result-set.vala"
	sorted_list = _tmp7_;
#line 416 "result-set.c"
	{
		GeeArrayList* _m_list = NULL;
		GeeArrayList* _tmp8_;
		gint _m_size = 0;
		GeeArrayList* _tmp9_;
		gint _tmp10_;
		gint _tmp11_;
		gint _m_index = 0;
#line 112 "result-set.vala"
		_tmp8_ = l;
#line 112 "result-set.vala"
		_m_list = _tmp8_;
#line 112 "result-set.vala"
		_tmp9_ = _m_list;
#line 112 "result-set.vala"
		_tmp10_ = gee_abstract_collection_get_size ((GeeAbstractCollection*) _tmp9_);
#line 112 "result-set.vala"
		_tmp11_ = _tmp10_;
#line 112 "result-set.vala"
		_m_size = _tmp11_;
#line 112 "result-set.vala"
		_m_index = -1;
#line 112 "result-set.vala"
		while (TRUE) {
#line 441 "result-set.c"
			gint _tmp12_;
			gint _tmp13_;
			GeeMapEntry* m = NULL;
			GeeArrayList* _tmp14_;
			gpointer _tmp15_;
			GeeArrayList* _tmp16_;
			GeeMapEntry* _tmp17_;
			gconstpointer _tmp18_;
			gconstpointer _tmp19_;
#line 112 "result-set.vala"
			_m_index = _m_index + 1;
#line 112 "result-set.vala"
			_tmp12_ = _m_index;
#line 112 "result-set.vala"
			_tmp13_ = _m_size;
#line 112 "result-set.vala"
			if (!(_tmp12_ < _tmp13_)) {
#line 112 "result-set.vala"
				break;
#line 461 "result-set.c"
			}
#line 112 "result-set.vala"
			_tmp14_ = _m_list;
#line 112 "result-set.vala"
			_tmp15_ = gee_abstract_list_get ((GeeAbstractList*) _tmp14_, _m_index);
#line 112 "result-set.vala"
			m = (GeeMapEntry*) _tmp15_;
#line 114 "result-set.vala"
			_tmp16_ = sorted_list;
#line 114 "result-set.vala"
			_tmp17_ = m;
#line 114 "result-set.vala"
			_tmp18_ = gee_map_entry_get_key (_tmp17_);
#line 114 "result-set.vala"
			_tmp19_ = _tmp18_;
#line 114 "result-set.vala"
			gee_abstract_collection_add ((GeeAbstractCollection*) _tmp16_, (SynapseMatch*) _tmp19_);
#line 112 "result-set.vala"
			_g_object_unref0 (m);
#line 481 "result-set.c"
		}
	}
#line 117 "result-set.vala"
	result = (GeeList*) sorted_list;
#line 117 "result-set.vala"
	_g_object_unref0 (l);
#line 117 "result-set.vala"
	return result;
#line 490 "result-set.c"
}

static GType
synapse_result_set_real_get_element_type (GeeTraversable* base)
{
	GType result;
	SynapseResultSet* self;
	GeeMap* _tmp0_;
	GType _tmp1_;
	GType _tmp2_;
#line 42 "result-set.vala"
	self = (SynapseResultSet*) base;
#line 42 "result-set.vala"
	_tmp0_ = self->priv->matches;
#line 42 "result-set.vala"
	_tmp1_ = gee_traversable_get_element_type ((GeeTraversable*) _tmp0_);
#line 42 "result-set.vala"
	_tmp2_ = _tmp1_;
#line 42 "result-set.vala"
	result = _tmp2_;
#line 42 "result-set.vala"
	return result;
#line 513 "result-set.c"
}

gint
synapse_result_set_get_size (SynapseResultSet* self)
{
	gint result;
	GeeMap* _tmp0_;
	gint _tmp1_;
	gint _tmp2_;
#line 47 "result-set.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 47 "result-set.vala"
	_tmp0_ = self->priv->matches;
#line 47 "result-set.vala"
	_tmp1_ = gee_map_get_size (_tmp0_);
#line 47 "result-set.vala"
	_tmp2_ = _tmp1_;
#line 47 "result-set.vala"
	result = _tmp2_;
#line 47 "result-set.vala"
	return result;
#line 535 "result-set.c"
}

GeeSet*
synapse_result_set_get_keys (SynapseResultSet* self)
{
	GeeSet* result;
	GeeMap* _tmp0_;
	GeeSet* _tmp1_;
	GeeSet* _tmp2_;
#line 52 "result-set.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 52 "result-set.vala"
	_tmp0_ = self->priv->matches;
#line 52 "result-set.vala"
	_tmp1_ = gee_map_get_keys (_tmp0_);
#line 52 "result-set.vala"
	_tmp2_ = _tmp1_;
#line 52 "result-set.vala"
	result = _tmp2_;
#line 52 "result-set.vala"
	return result;
#line 557 "result-set.c"
}

GeeSet*
synapse_result_set_get_entries (SynapseResultSet* self)
{
	GeeSet* result;
	GeeMap* _tmp0_;
	GeeSet* _tmp1_;
	GeeSet* _tmp2_;
#line 57 "result-set.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 57 "result-set.vala"
	_tmp0_ = self->priv->matches;
#line 57 "result-set.vala"
	_tmp1_ = gee_map_get_entries (_tmp0_);
#line 57 "result-set.vala"
	_tmp2_ = _tmp1_;
#line 57 "result-set.vala"
	result = _tmp2_;
#line 57 "result-set.vala"
	return result;
#line 579 "result-set.c"
}

static GObject *
synapse_result_set_constructor (GType type,
                                guint n_construct_properties,
                                GObjectConstructParam * construct_properties)
{
	GObject * obj;
	GObjectClass * parent_class;
	SynapseResultSet * self;
	GeeHashMap* _tmp0_;
	GeeHashSet* _tmp1_;
#line 33 "result-set.vala"
	parent_class = G_OBJECT_CLASS (synapse_result_set_parent_class);
#line 33 "result-set.vala"
	obj = parent_class->constructor (type, n_construct_properties, construct_properties);
#line 33 "result-set.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SYNAPSE_TYPE_RESULT_SET, SynapseResultSet);
#line 35 "result-set.vala"
	_tmp0_ = gee_hash_map_new (SYNAPSE_TYPE_MATCH, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, G_TYPE_INT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 35 "result-set.vala"
	_g_object_unref0 (self->priv->matches);
#line 35 "result-set.vala"
	self->priv->matches = (GeeMap*) _tmp0_;
#line 37 "result-set.vala"
	_tmp1_ = gee_hash_set_new (G_TYPE_STRING, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 37 "result-set.vala"
	_g_object_unref0 (self->priv->uris);
#line 37 "result-set.vala"
	self->priv->uris = (GeeSet*) _tmp1_;
#line 33 "result-set.vala"
	return obj;
#line 612 "result-set.c"
}

static void
synapse_result_set_class_init (SynapseResultSetClass * klass,
                               gpointer klass_data)
{
#line 23 "result-set.vala"
	synapse_result_set_parent_class = g_type_class_peek_parent (klass);
#line 23 "result-set.vala"
	g_type_class_adjust_private_offset (klass, &SynapseResultSet_private_offset);
#line 23 "result-set.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_synapse_result_set_get_property;
#line 23 "result-set.vala"
	G_OBJECT_CLASS (klass)->constructor = synapse_result_set_constructor;
#line 23 "result-set.vala"
	G_OBJECT_CLASS (klass)->finalize = synapse_result_set_finalize;
#line 23 "result-set.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), SYNAPSE_RESULT_SET_ELEMENT_TYPE_PROPERTY, synapse_result_set_properties[SYNAPSE_RESULT_SET_ELEMENT_TYPE_PROPERTY] = g_param_spec_gtype ("element-type", "element-type", "element-type", G_TYPE_NONE, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
#line 23 "result-set.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), SYNAPSE_RESULT_SET_SIZE_PROPERTY, synapse_result_set_properties[SYNAPSE_RESULT_SET_SIZE_PROPERTY] = g_param_spec_int ("size", "size", "size", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
#line 23 "result-set.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), SYNAPSE_RESULT_SET_KEYS_PROPERTY, synapse_result_set_properties[SYNAPSE_RESULT_SET_KEYS_PROPERTY] = g_param_spec_object ("keys", "keys", "keys", GEE_TYPE_SET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
#line 23 "result-set.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), SYNAPSE_RESULT_SET_ENTRIES_PROPERTY, synapse_result_set_properties[SYNAPSE_RESULT_SET_ENTRIES_PROPERTY] = g_param_spec_object ("entries", "entries", "entries", GEE_TYPE_SET, G_PARAM_STATIC_STRINGS | G_PARAM_READABLE));
#line 637 "result-set.c"
}

static GType
synapse_result_set_gee_traversable_get_g_type (SynapseResultSet* self)
{
#line 23 "result-set.vala"
	return (GType) SYNAPSE_TYPE_MATCH;
#line 645 "result-set.c"
}

static GBoxedCopyFunc
synapse_result_set_gee_traversable_get_g_dup_func (SynapseResultSet* self)
{
#line 23 "result-set.vala"
	return (GBoxedCopyFunc) g_object_ref;
#line 653 "result-set.c"
}

static GDestroyNotify
synapse_result_set_gee_traversable_get_g_destroy_func (SynapseResultSet* self)
{
#line 23 "result-set.vala"
	return (GDestroyNotify) g_object_unref;
#line 661 "result-set.c"
}

static void
synapse_result_set_gee_traversable_interface_init (GeeTraversableIface * iface,
                                                   gpointer iface_data)
{
#line 23 "result-set.vala"
	synapse_result_set_gee_traversable_parent_iface = g_type_interface_peek_parent (iface);
#line 23 "result-set.vala"
	iface->foreach = (gboolean (*) (GeeTraversable*, GeeForallFunc, gpointer)) synapse_result_set_real_foreach;
#line 23 "result-set.vala"
	iface->get_g_type = (GType (*) (GeeTraversable *)) synapse_result_set_gee_traversable_get_g_type;
#line 23 "result-set.vala"
	iface->get_g_dup_func = (GBoxedCopyFunc (*) (GeeTraversable *)) synapse_result_set_gee_traversable_get_g_dup_func;
#line 23 "result-set.vala"
	iface->get_g_destroy_func = (GDestroyNotify (*) (GeeTraversable *)) synapse_result_set_gee_traversable_get_g_destroy_func;
#line 23 "result-set.vala"
	iface->get_element_type = synapse_result_set_real_get_element_type;
#line 680 "result-set.c"
}

static GType
synapse_result_set_gee_iterable_get_g_type (SynapseResultSet* self)
{
#line 23 "result-set.vala"
	return (GType) GEE_MAP_TYPE_ENTRY;
#line 688 "result-set.c"
}

static GBoxedCopyFunc
synapse_result_set_gee_iterable_get_g_dup_func (SynapseResultSet* self)
{
#line 23 "result-set.vala"
	return (GBoxedCopyFunc) g_object_ref;
#line 696 "result-set.c"
}

static GDestroyNotify
synapse_result_set_gee_iterable_get_g_destroy_func (SynapseResultSet* self)
{
#line 23 "result-set.vala"
	return (GDestroyNotify) g_object_unref;
#line 704 "result-set.c"
}

static void
synapse_result_set_gee_iterable_interface_init (GeeIterableIface * iface,
                                                gpointer iface_data)
{
#line 23 "result-set.vala"
	synapse_result_set_gee_iterable_parent_iface = g_type_interface_peek_parent (iface);
#line 23 "result-set.vala"
	iface->iterator = (GeeIterator* (*) (GeeIterable*)) synapse_result_set_real_iterator;
#line 23 "result-set.vala"
	iface->get_g_type = (GType (*) (GeeIterable *)) synapse_result_set_gee_iterable_get_g_type;
#line 23 "result-set.vala"
	iface->get_g_dup_func = (GBoxedCopyFunc (*) (GeeIterable *)) synapse_result_set_gee_iterable_get_g_dup_func;
#line 23 "result-set.vala"
	iface->get_g_destroy_func = (GDestroyNotify (*) (GeeIterable *)) synapse_result_set_gee_iterable_get_g_destroy_func;
#line 721 "result-set.c"
}

static void
synapse_result_set_instance_init (SynapseResultSet * self,
                                  gpointer klass)
{
#line 23 "result-set.vala"
	self->priv = synapse_result_set_get_instance_private (self);
#line 730 "result-set.c"
}

static void
synapse_result_set_finalize (GObject * obj)
{
	SynapseResultSet * self;
#line 23 "result-set.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SYNAPSE_TYPE_RESULT_SET, SynapseResultSet);
#line 25 "result-set.vala"
	_g_object_unref0 (self->priv->matches);
#line 26 "result-set.vala"
	_g_object_unref0 (self->priv->uris);
#line 23 "result-set.vala"
	G_OBJECT_CLASS (synapse_result_set_parent_class)->finalize (obj);
#line 745 "result-set.c"
}

static GType
synapse_result_set_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (SynapseResultSetClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) synapse_result_set_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SynapseResultSet), 0, (GInstanceInitFunc) synapse_result_set_instance_init, NULL };
	static const GInterfaceInfo gee_traversable_info = { (GInterfaceInitFunc) synapse_result_set_gee_traversable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	static const GInterfaceInfo gee_iterable_info = { (GInterfaceInitFunc) synapse_result_set_gee_iterable_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType synapse_result_set_type_id;
	synapse_result_set_type_id = g_type_register_static (G_TYPE_OBJECT, "SynapseResultSet", &g_define_type_info, 0);
	g_type_add_interface_static (synapse_result_set_type_id, GEE_TYPE_TRAVERSABLE, &gee_traversable_info);
	g_type_add_interface_static (synapse_result_set_type_id, GEE_TYPE_ITERABLE, &gee_iterable_info);
	SynapseResultSet_private_offset = g_type_add_instance_private (synapse_result_set_type_id, sizeof (SynapseResultSetPrivate));
	return synapse_result_set_type_id;
}

GType
synapse_result_set_get_type (void)
{
	static volatile gsize synapse_result_set_type_id__once = 0;
	if (g_once_init_enter (&synapse_result_set_type_id__once)) {
		GType synapse_result_set_type_id;
		synapse_result_set_type_id = synapse_result_set_get_type_once ();
		g_once_init_leave (&synapse_result_set_type_id__once, synapse_result_set_type_id);
	}
	return synapse_result_set_type_id__once;
}

static void
_vala_synapse_result_set_get_property (GObject * object,
                                       guint property_id,
                                       GValue * value,
                                       GParamSpec * pspec)
{
	SynapseResultSet * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, SYNAPSE_TYPE_RESULT_SET, SynapseResultSet);
#line 23 "result-set.vala"
	switch (property_id) {
#line 23 "result-set.vala"
		case SYNAPSE_RESULT_SET_ELEMENT_TYPE_PROPERTY:
#line 23 "result-set.vala"
		g_value_set_gtype (value, gee_traversable_get_element_type ((GeeTraversable*) self));
#line 23 "result-set.vala"
		break;
#line 23 "result-set.vala"
		case SYNAPSE_RESULT_SET_SIZE_PROPERTY:
#line 23 "result-set.vala"
		g_value_set_int (value, synapse_result_set_get_size (self));
#line 23 "result-set.vala"
		break;
#line 23 "result-set.vala"
		case SYNAPSE_RESULT_SET_KEYS_PROPERTY:
#line 23 "result-set.vala"
		g_value_take_object (value, synapse_result_set_get_keys (self));
#line 23 "result-set.vala"
		break;
#line 23 "result-set.vala"
		case SYNAPSE_RESULT_SET_ENTRIES_PROPERTY:
#line 23 "result-set.vala"
		g_value_take_object (value, synapse_result_set_get_entries (self));
#line 23 "result-set.vala"
		break;
#line 808 "result-set.c"
		default:
#line 23 "result-set.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 23 "result-set.vala"
		break;
#line 814 "result-set.c"
	}
}

