/* tracker-connection-mock.c generated by valac 0.25.2.3-2bd7, the Vala compiler
 * generated from tracker-connection-mock.vala, do not modify */


#include <glib.h>
#include <glib-object.h>
#include "libtracker-sparql/tracker-sparql.h"
#include <stdlib.h>
#include <string.h>
#include <gio/gio.h>


#define TYPE_TRACKER_MOCK_RESULTS (tracker_mock_results_get_type ())
#define TRACKER_MOCK_RESULTS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TRACKER_MOCK_RESULTS, TrackerMockResults))
#define TRACKER_MOCK_RESULTS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TRACKER_MOCK_RESULTS, TrackerMockResultsClass))
#define IS_TRACKER_MOCK_RESULTS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TRACKER_MOCK_RESULTS))
#define IS_TRACKER_MOCK_RESULTS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TRACKER_MOCK_RESULTS))
#define TRACKER_MOCK_RESULTS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TRACKER_MOCK_RESULTS, TrackerMockResultsClass))

typedef struct _TrackerMockResults TrackerMockResults;
typedef struct _TrackerMockResultsClass TrackerMockResultsClass;
typedef struct _TrackerMockResultsPrivate TrackerMockResultsPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _TrackerMockResultsNextAsyncData TrackerMockResultsNextAsyncData;

#define TYPE_TRACKER_MOCK_CONNECTION (tracker_mock_connection_get_type ())
#define TRACKER_MOCK_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TRACKER_MOCK_CONNECTION, TrackerMockConnection))
#define TRACKER_MOCK_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TRACKER_MOCK_CONNECTION, TrackerMockConnectionClass))
#define IS_TRACKER_MOCK_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TRACKER_MOCK_CONNECTION))
#define IS_TRACKER_MOCK_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TRACKER_MOCK_CONNECTION))
#define TRACKER_MOCK_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TRACKER_MOCK_CONNECTION, TrackerMockConnectionClass))

typedef struct _TrackerMockConnection TrackerMockConnection;
typedef struct _TrackerMockConnectionClass TrackerMockConnectionClass;
typedef struct _TrackerMockConnectionPrivate TrackerMockConnectionPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _TrackerMockConnectionQueryAsyncData TrackerMockConnectionQueryAsyncData;

struct _TrackerMockResults {
	TrackerSparqlCursor parent_instance;
	TrackerMockResultsPrivate * priv;
};

struct _TrackerMockResultsClass {
	TrackerSparqlCursorClass parent_class;
};

struct _TrackerMockResultsPrivate {
	gint rows;
	gint current_row;
	gchar** results;
	gint results_length1;
	gint results_length2;
	gchar** var_names;
	gint var_names_length1;
	gint _var_names_size_;
	TrackerSparqlValueType* types;
	gint types_length1;
	gint _types_size_;
	gint cols;
};

struct _TrackerMockResultsNextAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrackerMockResults* self;
	GCancellable* cancellable;
	gboolean result;
	gboolean _tmp0_;
	GCancellable* _tmp1_;
	gboolean _tmp2_;
	GError * _inner_error_;
};

struct _TrackerMockConnection {
	TrackerSparqlConnection parent_instance;
	TrackerMockConnectionPrivate * priv;
};

struct _TrackerMockConnectionClass {
	TrackerSparqlConnectionClass parent_class;
};

struct _TrackerMockConnectionPrivate {
	TrackerMockResults* results;
	TrackerMockResults* hardcoded;
};

struct _TrackerMockConnectionQueryAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TrackerMockConnection* self;
	gchar* sparql;
	GCancellable* cancellable;
	TrackerSparqlCursor* result;
	TrackerMockResults* _tmp0_;
	TrackerMockResults* _tmp1_;
	TrackerSparqlCursor* _tmp2_;
	TrackerMockResults* _tmp3_;
	TrackerSparqlCursor* _tmp4_;
};


static gpointer tracker_mock_results_parent_class = NULL;
static gpointer tracker_mock_connection_parent_class = NULL;

GType tracker_mock_results_get_type (void) G_GNUC_CONST;
#define TRACKER_MOCK_RESULTS_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_TRACKER_MOCK_RESULTS, TrackerMockResultsPrivate))
enum  {
	TRACKER_MOCK_RESULTS_DUMMY_PROPERTY,
	TRACKER_MOCK_RESULTS_N_COLUMNS
};
TrackerMockResults* tracker_mock_results_new (gchar** results, int results_length1, int results_length2, gint rows, gint cols, gchar** var_names, int var_names_length1, TrackerSparqlValueType* types, int types_length1);
TrackerMockResults* tracker_mock_results_construct (GType object_type, gchar** results, int results_length1, int results_length2, gint rows, gint cols, gchar** var_names, int var_names_length1, TrackerSparqlValueType* types, int types_length1);
static TrackerSparqlValueType* _vala_array_dup1 (TrackerSparqlValueType* self, int length);
static gchar** _vala_array_dup2 (gchar** self, int length);
static TrackerSparqlValueType tracker_mock_results_real_get_value_type (TrackerSparqlCursor* base, gint column);
static const gchar* tracker_mock_results_real_get_variable_name (TrackerSparqlCursor* base, gint column);
static const gchar* tracker_mock_results_real_get_string (TrackerSparqlCursor* base, gint column, glong* length);
static gboolean tracker_mock_results_real_next (TrackerSparqlCursor* base, GCancellable* cancellable, GError** error);
static void tracker_mock_results_real_next_async_data_free (gpointer _data);
static void tracker_mock_results_real_next_async (TrackerSparqlCursor* base, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean tracker_mock_results_real_next_async_co (TrackerMockResultsNextAsyncData* _data_);
static void tracker_mock_results_real_rewind (TrackerSparqlCursor* base);
static void tracker_mock_results_finalize (GObject* obj);
static void _vala_tracker_mock_results_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
GType tracker_mock_connection_get_type (void) G_GNUC_CONST;
#define TRACKER_MOCK_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_TRACKER_MOCK_CONNECTION, TrackerMockConnectionPrivate))
enum  {
	TRACKER_MOCK_CONNECTION_DUMMY_PROPERTY
};
static TrackerSparqlCursor* tracker_mock_connection_real_query (TrackerSparqlConnection* base, const gchar* sparql, GCancellable* cancellable, GError** error);
static void tracker_mock_connection_real_query_async_data_free (gpointer _data);
static void tracker_mock_connection_real_query_async (TrackerSparqlConnection* base, const gchar* sparql, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
static gboolean tracker_mock_connection_real_query_async_co (TrackerMockConnectionQueryAsyncData* _data_);
void tracker_mock_connection_set_results (TrackerMockConnection* self, TrackerMockResults* results);
TrackerMockConnection* tracker_mock_connection_new (void);
TrackerMockConnection* tracker_mock_connection_construct (GType object_type);
static void tracker_mock_connection_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 TrackerSparqlValueType* _vala_array_dup1 (TrackerSparqlValueType* self, int length) {
#line 17 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return g_memdup (self, length * sizeof (TrackerSparqlValueType));
#line 152 "tracker-connection-mock.c"
}


static gchar** _vala_array_dup2 (gchar** self, int length) {
	gchar** result;
	int i;
#line 18 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	result = g_new0 (gchar*, length + 1);
#line 18 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	for (i = 0; i < length; i++) {
#line 163 "tracker-connection-mock.c"
		gchar* _tmp0_ = NULL;
#line 18 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_tmp0_ = g_strdup (self[i]);
#line 18 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		result[i] = _tmp0_;
#line 169 "tracker-connection-mock.c"
	}
#line 18 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return result;
#line 173 "tracker-connection-mock.c"
}


TrackerMockResults* tracker_mock_results_construct (GType object_type, gchar** results, int results_length1, int results_length2, gint rows, gint cols, gchar** var_names, int var_names_length1, TrackerSparqlValueType* types, int types_length1) {
	TrackerMockResults * self = NULL;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	gchar** _tmp2_ = NULL;
	gint _tmp2__length1 = 0;
	gint _tmp2__length2 = 0;
	TrackerSparqlValueType* _tmp3_ = NULL;
	gint _tmp3__length1 = 0;
	TrackerSparqlValueType* _tmp4_ = NULL;
	gint _tmp4__length1 = 0;
	gchar** _tmp5_ = NULL;
	gint _tmp5__length1 = 0;
	gchar** _tmp6_ = NULL;
	gint _tmp6__length1 = 0;
#line 13 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self = (TrackerMockResults*) tracker_sparql_cursor_construct (object_type);
#line 14 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp0_ = rows;
#line 14 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->rows = _tmp0_;
#line 15 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1_ = cols;
#line 15 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->cols = _tmp1_;
#line 16 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp2_ = results;
#line 16 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp2__length1 = results_length1;
#line 16 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp2__length2 = results_length2;
#line 16 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	results = NULL;
#line 16 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	results_length1 = 0;
#line 16 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	results_length2 = 0;
#line 16 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->results = (_vala_array_free (self->priv->results, self->priv->results_length1 * self->priv->results_length2, (GDestroyNotify) g_free), NULL);
#line 16 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->results = _tmp2_;
#line 16 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->results_length1 = _tmp2__length1;
#line 16 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->results_length2 = _tmp2__length2;
#line 17 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp3_ = types;
#line 17 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp3__length1 = types_length1;
#line 17 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp4_ = (_tmp3_ != NULL) ? _vala_array_dup1 (_tmp3_, _tmp3__length1) : ((gpointer) _tmp3_);
#line 17 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp4__length1 = _tmp3__length1;
#line 17 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->types = (g_free (self->priv->types), NULL);
#line 17 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->types = _tmp4_;
#line 17 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->types_length1 = _tmp4__length1;
#line 17 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->_types_size_ = self->priv->types_length1;
#line 18 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp5_ = var_names;
#line 18 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp5__length1 = var_names_length1;
#line 18 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp6_ = (_tmp5_ != NULL) ? _vala_array_dup2 (_tmp5_, _tmp5__length1) : ((gpointer) _tmp5_);
#line 18 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp6__length1 = _tmp5__length1;
#line 18 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->var_names = (_vala_array_free (self->priv->var_names, self->priv->var_names_length1, (GDestroyNotify) g_free), NULL);
#line 18 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->var_names = _tmp6_;
#line 18 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->var_names_length1 = _tmp6__length1;
#line 18 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->_var_names_size_ = self->priv->var_names_length1;
#line 13 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	results = (_vala_array_free (results, results_length1 * results_length2, (GDestroyNotify) g_free), NULL);
#line 13 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return self;
#line 258 "tracker-connection-mock.c"
}


TrackerMockResults* tracker_mock_results_new (gchar** results, int results_length1, int results_length2, gint rows, gint cols, gchar** var_names, int var_names_length1, TrackerSparqlValueType* types, int types_length1) {
#line 13 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return tracker_mock_results_construct (TYPE_TRACKER_MOCK_RESULTS, results, results_length1, results_length2, rows, cols, var_names, var_names_length1, types, types_length1);
#line 265 "tracker-connection-mock.c"
}


static TrackerSparqlValueType tracker_mock_results_real_get_value_type (TrackerSparqlCursor* base, gint column) {
	TrackerMockResults * self;
	TrackerSparqlValueType result = 0;
	gint _tmp0_ = 0;
	TrackerSparqlValueType* _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	gint _tmp2_ = 0;
	TrackerSparqlValueType _tmp3_ = 0;
#line 23 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self = (TrackerMockResults*) base;
#line 23 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp0_ = self->priv->current_row;
#line 23 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_return_val_if_fail (_tmp0_ >= 0, 0);
#line 25 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1_ = self->priv->types;
#line 25 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1__length1 = self->priv->types_length1;
#line 25 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp2_ = column;
#line 25 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp3_ = _tmp1_[_tmp2_];
#line 25 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	result = _tmp3_;
#line 25 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return result;
#line 295 "tracker-connection-mock.c"
}


static const gchar* tracker_mock_results_real_get_variable_name (TrackerSparqlCursor* base, gint column) {
	TrackerMockResults * self;
	const gchar* result = NULL;
	gint _tmp0_ = 0;
	gchar** _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	gint _tmp2_ = 0;
	const gchar* _tmp3_ = NULL;
#line 28 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self = (TrackerMockResults*) base;
#line 28 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp0_ = self->priv->current_row;
#line 28 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_return_val_if_fail (_tmp0_ >= 0, NULL);
#line 30 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1_ = self->priv->var_names;
#line 30 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1__length1 = self->priv->var_names_length1;
#line 30 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp2_ = column;
#line 30 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp3_ = _tmp1_[_tmp2_];
#line 30 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	result = _tmp3_;
#line 30 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return result;
#line 325 "tracker-connection-mock.c"
}


static const gchar* tracker_mock_results_real_get_string (TrackerSparqlCursor* base, gint column, glong* length) {
	TrackerMockResults * self;
	glong _vala_length = 0L;
	const gchar* result = NULL;
	gint _tmp0_ = 0;
	const gchar* str = NULL;
	gchar** _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	gint _tmp1__length2 = 0;
	gint _tmp2_ = 0;
	gint _tmp3_ = 0;
	const gchar* _tmp4_ = NULL;
	gint _tmp5_ = 0;
	gint _tmp6_ = 0;
#line 33 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self = (TrackerMockResults*) base;
#line 33 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp0_ = self->priv->current_row;
#line 33 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_return_val_if_fail (_tmp0_ >= 0, NULL);
#line 37 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1_ = self->priv->results;
#line 37 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1__length1 = self->priv->results_length1;
#line 37 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1__length2 = self->priv->results_length2;
#line 37 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp2_ = self->priv->current_row;
#line 37 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp3_ = column;
#line 37 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp4_ = _tmp1_[(_tmp2_ * _tmp1__length2) + _tmp3_];
#line 37 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	str = _tmp4_;
#line 39 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp5_ = strlen (str);
#line 39 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp6_ = _tmp5_;
#line 39 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_vala_length = (glong) _tmp6_;
#line 41 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	result = str;
#line 41 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	if (length) {
#line 41 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		*length = _vala_length;
#line 375 "tracker-connection-mock.c"
	}
#line 41 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return result;
#line 379 "tracker-connection-mock.c"
}


static gboolean tracker_mock_results_real_next (TrackerSparqlCursor* base, GCancellable* cancellable, GError** error) {
	TrackerMockResults * self;
	gboolean result = FALSE;
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
	gint _tmp2_ = 0;
#line 44 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self = (TrackerMockResults*) base;
#line 45 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp0_ = self->priv->current_row;
#line 45 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1_ = self->priv->rows;
#line 45 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	if (_tmp0_ >= (_tmp1_ - 1)) {
#line 46 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		result = FALSE;
#line 46 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		return result;
#line 401 "tracker-connection-mock.c"
	}
#line 48 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp2_ = self->priv->current_row;
#line 48 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->current_row = _tmp2_ + 1;
#line 49 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	result = TRUE;
#line 49 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return result;
#line 411 "tracker-connection-mock.c"
}


static void tracker_mock_results_real_next_async_data_free (gpointer _data) {
	TrackerMockResultsNextAsyncData* _data_;
	_data_ = _data;
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_g_object_unref0 (_data_->cancellable);
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_g_object_unref0 (_data_->self);
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_slice_free (TrackerMockResultsNextAsyncData, _data_);
#line 424 "tracker-connection-mock.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return self ? g_object_ref (self) : NULL;
#line 431 "tracker-connection-mock.c"
}


static void tracker_mock_results_real_next_async (TrackerSparqlCursor* base, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrackerMockResults * self;
	TrackerMockResultsNextAsyncData* _data_;
	TrackerMockResults* _tmp0_ = NULL;
	GCancellable* _tmp1_ = NULL;
	GCancellable* _tmp2_ = NULL;
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self = (TrackerMockResults*) base;
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_ = g_slice_new0 (TrackerMockResultsNextAsyncData);
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, tracker_mock_results_real_next_async);
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_mock_results_real_next_async_data_free);
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->self = _tmp0_;
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1_ = cancellable;
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_g_object_unref0 (_data_->cancellable);
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->cancellable = _tmp2_;
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	tracker_mock_results_real_next_async_co (_data_);
#line 463 "tracker-connection-mock.c"
}


static gboolean tracker_mock_results_real_next_finish (TrackerSparqlCursor* base, GAsyncResult* _res_, GError** error) {
	gboolean result;
	TrackerMockResultsNextAsyncData* _data_;
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		return FALSE;
#line 474 "tracker-connection-mock.c"
	}
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	result = _data_->result;
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return result;
#line 482 "tracker-connection-mock.c"
}


static gboolean tracker_mock_results_real_next_async_co (TrackerMockResultsNextAsyncData* _data_) {
#line 52 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	switch (_data_->_state_) {
#line 52 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		case 0:
#line 491 "tracker-connection-mock.c"
		goto _state_0;
		default:
#line 52 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		g_assert_not_reached ();
#line 496 "tracker-connection-mock.c"
	}
	_state_0:
#line 54 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->_tmp1_ = NULL;
#line 54 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->_tmp1_ = _data_->cancellable;
#line 54 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->_tmp2_ = FALSE;
#line 54 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->_tmp2_ = tracker_sparql_cursor_next ((TrackerSparqlCursor*) _data_->self, _data_->_tmp1_, &_data_->_inner_error_);
#line 54 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->_tmp0_ = _data_->_tmp2_;
#line 54 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 54 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_);
#line 54 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		g_error_free (_data_->_inner_error_);
#line 54 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		if (_data_->_state_ == 0) {
#line 54 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 519 "tracker-connection-mock.c"
		} else {
#line 54 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 523 "tracker-connection-mock.c"
		}
#line 54 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		g_object_unref (_data_->_async_result);
#line 54 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		return FALSE;
#line 529 "tracker-connection-mock.c"
	}
#line 54 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->result = _data_->_tmp0_;
#line 54 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	if (_data_->_state_ == 0) {
#line 54 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 537 "tracker-connection-mock.c"
	} else {
#line 54 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 541 "tracker-connection-mock.c"
	}
#line 54 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_object_unref (_data_->_async_result);
#line 54 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return FALSE;
#line 52 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	if (_data_->_state_ == 0) {
#line 52 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 551 "tracker-connection-mock.c"
	} else {
#line 52 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 555 "tracker-connection-mock.c"
	}
#line 52 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_object_unref (_data_->_async_result);
#line 52 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return FALSE;
#line 561 "tracker-connection-mock.c"
}


static void tracker_mock_results_real_rewind (TrackerSparqlCursor* base) {
	TrackerMockResults * self;
#line 57 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self = (TrackerMockResults*) base;
#line 58 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->current_row = 0;
#line 571 "tracker-connection-mock.c"
}


static gint tracker_mock_results_real_get_n_columns (TrackerSparqlCursor* base) {
	gint result;
	TrackerMockResults* self;
	gint _tmp0_ = 0;
#line 21 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self = (TrackerMockResults*) base;
#line 21 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp0_ = self->priv->cols;
#line 21 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	result = _tmp0_;
#line 21 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return result;
#line 587 "tracker-connection-mock.c"
}


static void tracker_mock_results_class_init (TrackerMockResultsClass * klass) {
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	tracker_mock_results_parent_class = g_type_class_peek_parent (klass);
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_type_class_add_private (klass, sizeof (TrackerMockResultsPrivate));
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	((TrackerSparqlCursorClass *) klass)->get_value_type = tracker_mock_results_real_get_value_type;
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	((TrackerSparqlCursorClass *) klass)->get_variable_name = tracker_mock_results_real_get_variable_name;
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	((TrackerSparqlCursorClass *) klass)->get_string = tracker_mock_results_real_get_string;
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	((TrackerSparqlCursorClass *) klass)->next = tracker_mock_results_real_next;
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	((TrackerSparqlCursorClass *) klass)->next_async = tracker_mock_results_real_next_async;
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	((TrackerSparqlCursorClass *) klass)->next_finish = tracker_mock_results_real_next_finish;
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	((TrackerSparqlCursorClass *) klass)->rewind = tracker_mock_results_real_rewind;
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	TRACKER_SPARQL_CURSOR_CLASS (klass)->get_n_columns = tracker_mock_results_real_get_n_columns;
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_tracker_mock_results_get_property;
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	G_OBJECT_CLASS (klass)->finalize = tracker_mock_results_finalize;
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_MOCK_RESULTS_N_COLUMNS, g_param_spec_int ("n-columns", "n-columns", "n-columns", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 618 "tracker-connection-mock.c"
}


static void tracker_mock_results_instance_init (TrackerMockResults * self) {
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv = TRACKER_MOCK_RESULTS_GET_PRIVATE (self);
#line 7 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->current_row = -1;
#line 627 "tracker-connection-mock.c"
}


static void tracker_mock_results_finalize (GObject* obj) {
	TrackerMockResults * self;
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TRACKER_MOCK_RESULTS, TrackerMockResults);
#line 8 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->results = (_vala_array_free (self->priv->results, self->priv->results_length1 * self->priv->results_length2, (GDestroyNotify) g_free), NULL);
#line 9 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->var_names = (_vala_array_free (self->priv->var_names, self->priv->var_names_length1, (GDestroyNotify) g_free), NULL);
#line 10 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->types = (g_free (self->priv->types), NULL);
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	G_OBJECT_CLASS (tracker_mock_results_parent_class)->finalize (obj);
#line 643 "tracker-connection-mock.c"
}


GType tracker_mock_results_get_type (void) {
	static volatile gsize tracker_mock_results_type_id__volatile = 0;
	if (g_once_init_enter (&tracker_mock_results_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TrackerMockResultsClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_mock_results_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerMockResults), 0, (GInstanceInitFunc) tracker_mock_results_instance_init, NULL };
		GType tracker_mock_results_type_id;
		tracker_mock_results_type_id = g_type_register_static (TRACKER_SPARQL_TYPE_CURSOR, "TrackerMockResults", &g_define_type_info, 0);
		g_once_init_leave (&tracker_mock_results_type_id__volatile, tracker_mock_results_type_id);
	}
	return tracker_mock_results_type_id__volatile;
}


static void _vala_tracker_mock_results_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	TrackerMockResults * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (object, TYPE_TRACKER_MOCK_RESULTS, TrackerMockResults);
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	switch (property_id) {
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		case TRACKER_MOCK_RESULTS_N_COLUMNS:
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		g_value_set_int (value, tracker_sparql_cursor_get_n_columns ((TrackerSparqlCursor*) self));
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		break;
#line 670 "tracker-connection-mock.c"
		default:
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 5 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		break;
#line 676 "tracker-connection-mock.c"
	}
}


static TrackerSparqlCursor* tracker_mock_connection_real_query (TrackerSparqlConnection* base, const gchar* sparql, GCancellable* cancellable, GError** error) {
	TrackerMockConnection * self;
	TrackerSparqlCursor* result = NULL;
	TrackerMockResults* _tmp0_ = NULL;
#line 72 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self = (TrackerMockConnection*) base;
#line 72 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_return_val_if_fail (sparql != NULL, NULL);
#line 75 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp0_ = self->priv->results;
#line 75 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	if (_tmp0_ != NULL) {
#line 693 "tracker-connection-mock.c"
		TrackerMockResults* _tmp1_ = NULL;
		TrackerSparqlCursor* _tmp2_ = NULL;
#line 76 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_tmp1_ = self->priv->results;
#line 76 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_tmp2_ = _g_object_ref0 ((TrackerSparqlCursor*) _tmp1_);
#line 76 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		result = _tmp2_;
#line 76 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		return result;
#line 704 "tracker-connection-mock.c"
	} else {
		TrackerMockResults* _tmp3_ = NULL;
		TrackerSparqlCursor* _tmp4_ = NULL;
#line 78 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_tmp3_ = self->priv->hardcoded;
#line 78 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_tmp4_ = _g_object_ref0 ((TrackerSparqlCursor*) _tmp3_);
#line 78 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		result = _tmp4_;
#line 78 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		return result;
#line 716 "tracker-connection-mock.c"
	}
}


static void tracker_mock_connection_real_query_async_data_free (gpointer _data) {
	TrackerMockConnectionQueryAsyncData* _data_;
	_data_ = _data;
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_g_free0 (_data_->sparql);
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_g_object_unref0 (_data_->cancellable);
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_g_object_unref0 (_data_->result);
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_g_object_unref0 (_data_->self);
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_slice_free (TrackerMockConnectionQueryAsyncData, _data_);
#line 734 "tracker-connection-mock.c"
}


static void tracker_mock_connection_real_query_async (TrackerSparqlConnection* base, const gchar* sparql, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrackerMockConnection * self;
	TrackerMockConnectionQueryAsyncData* _data_;
	TrackerMockConnection* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	GCancellable* _tmp3_ = NULL;
	GCancellable* _tmp4_ = NULL;
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self = (TrackerMockConnection*) base;
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_ = g_slice_new0 (TrackerMockConnectionQueryAsyncData);
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, tracker_mock_connection_real_query_async);
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_mock_connection_real_query_async_data_free);
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->self = _tmp0_;
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1_ = sparql;
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_g_free0 (_data_->sparql);
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->sparql = _tmp2_;
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp3_ = cancellable;
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_g_object_unref0 (_data_->cancellable);
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->cancellable = _tmp4_;
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	tracker_mock_connection_real_query_async_co (_data_);
#line 776 "tracker-connection-mock.c"
}


static TrackerSparqlCursor* tracker_mock_connection_real_query_finish (TrackerSparqlConnection* base, GAsyncResult* _res_, GError** error) {
	TrackerSparqlCursor* result;
	TrackerMockConnectionQueryAsyncData* _data_;
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		return NULL;
#line 787 "tracker-connection-mock.c"
	}
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	result = _data_->result;
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->result = NULL;
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return result;
#line 797 "tracker-connection-mock.c"
}


static gboolean tracker_mock_connection_real_query_async_co (TrackerMockConnectionQueryAsyncData* _data_) {
#line 83 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	switch (_data_->_state_) {
#line 83 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		case 0:
#line 806 "tracker-connection-mock.c"
		goto _state_0;
		default:
#line 83 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		g_assert_not_reached ();
#line 811 "tracker-connection-mock.c"
	}
	_state_0:
#line 85 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->_tmp0_ = NULL;
#line 85 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->_tmp0_ = _data_->self->priv->results;
#line 85 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	if (_data_->_tmp0_ != NULL) {
#line 86 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_data_->_tmp1_ = NULL;
#line 86 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_data_->_tmp1_ = _data_->self->priv->results;
#line 86 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_data_->_tmp2_ = NULL;
#line 86 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_data_->_tmp2_ = _g_object_ref0 ((TrackerSparqlCursor*) _data_->_tmp1_);
#line 86 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_data_->result = _data_->_tmp2_;
#line 86 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		if (_data_->_state_ == 0) {
#line 86 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 834 "tracker-connection-mock.c"
		} else {
#line 86 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 838 "tracker-connection-mock.c"
		}
#line 86 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		g_object_unref (_data_->_async_result);
#line 86 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		return FALSE;
#line 844 "tracker-connection-mock.c"
	} else {
#line 88 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_data_->_tmp3_ = NULL;
#line 88 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_data_->_tmp3_ = _data_->self->priv->hardcoded;
#line 88 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_data_->_tmp4_ = NULL;
#line 88 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_data_->_tmp4_ = _g_object_ref0 ((TrackerSparqlCursor*) _data_->_tmp3_);
#line 88 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_data_->result = _data_->_tmp4_;
#line 88 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		if (_data_->_state_ == 0) {
#line 88 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
			g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 860 "tracker-connection-mock.c"
		} else {
#line 88 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
			g_simple_async_result_complete (_data_->_async_result);
#line 864 "tracker-connection-mock.c"
		}
#line 88 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		g_object_unref (_data_->_async_result);
#line 88 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		return FALSE;
#line 870 "tracker-connection-mock.c"
	}
#line 83 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	if (_data_->_state_ == 0) {
#line 83 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 876 "tracker-connection-mock.c"
	} else {
#line 83 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 880 "tracker-connection-mock.c"
	}
#line 83 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_object_unref (_data_->_async_result);
#line 83 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return FALSE;
#line 886 "tracker-connection-mock.c"
}


void tracker_mock_connection_set_results (TrackerMockConnection* self, TrackerMockResults* results) {
	TrackerMockResults* _tmp0_ = NULL;
	TrackerMockResults* _tmp1_ = NULL;
#line 93 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_return_if_fail (self != NULL);
#line 93 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_return_if_fail (results != NULL);
#line 94 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp0_ = results;
#line 94 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 94 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_g_object_unref0 (self->priv->results);
#line 94 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->results = _tmp1_;
#line 905 "tracker-connection-mock.c"
}


TrackerMockConnection* tracker_mock_connection_construct (GType object_type) {
	TrackerMockConnection * self = NULL;
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self = (TrackerMockConnection*) tracker_sparql_connection_construct (object_type);
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return self;
#line 915 "tracker-connection-mock.c"
}


TrackerMockConnection* tracker_mock_connection_new (void) {
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return tracker_mock_connection_construct (TYPE_TRACKER_MOCK_CONNECTION);
#line 922 "tracker-connection-mock.c"
}


static void tracker_mock_connection_class_init (TrackerMockConnectionClass * klass) {
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	tracker_mock_connection_parent_class = g_type_class_peek_parent (klass);
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_type_class_add_private (klass, sizeof (TrackerMockConnectionPrivate));
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	((TrackerSparqlConnectionClass *) klass)->query = tracker_mock_connection_real_query;
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	((TrackerSparqlConnectionClass *) klass)->query_async = tracker_mock_connection_real_query_async;
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	((TrackerSparqlConnectionClass *) klass)->query_finish = tracker_mock_connection_real_query_finish;
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	G_OBJECT_CLASS (klass)->finalize = tracker_mock_connection_finalize;
#line 939 "tracker-connection-mock.c"
}


static void tracker_mock_connection_instance_init (TrackerMockConnection * self) {
	gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar** _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	gchar* _tmp6_ = NULL;
	gchar** _tmp7_ = NULL;
	gchar** _tmp8_ = NULL;
	gint _tmp8__length1 = 0;
	TrackerSparqlValueType* _tmp9_ = NULL;
	TrackerSparqlValueType* _tmp10_ = NULL;
	gint _tmp10__length1 = 0;
	TrackerMockResults* _tmp11_ = NULL;
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv = TRACKER_MOCK_CONNECTION_GET_PRIVATE (self);
#line 67 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->results = NULL;
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp0_ = g_strdup ("11");
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1_ = g_strdup ("12");
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp2_ = g_strdup ("21");
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp3_ = g_strdup ("22");
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp4_ = g_new0 (gchar*, (2 * 2) + 1);
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp4_[0] = _tmp0_;
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp4_[1] = _tmp1_;
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp4_[2] = _tmp2_;
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp4_[3] = _tmp3_;
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp5_ = g_strdup ("artist");
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp6_ = g_strdup ("album");
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp7_ = g_new0 (gchar*, 2 + 1);
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp7_[0] = _tmp5_;
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp7_[1] = _tmp6_;
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp8_ = _tmp7_;
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp8__length1 = 2;
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp9_ = g_new0 (TrackerSparqlValueType, 2);
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp9_[0] = TRACKER_SPARQL_VALUE_TYPE_STRING;
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp9_[1] = TRACKER_SPARQL_VALUE_TYPE_STRING;
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp10_ = _tmp9_;
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp10__length1 = 2;
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp11_ = tracker_mock_results_new (_tmp4_, 2, 2, 2, 2, _tmp8_, 2, _tmp10_, 2);
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->hardcoded = _tmp11_;
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp10_ = (g_free (_tmp10_), NULL);
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp8_ = (_vala_array_free (_tmp8_, _tmp8__length1, (GDestroyNotify) g_free), NULL);
#line 1012 "tracker-connection-mock.c"
}


static void tracker_mock_connection_finalize (GObject* obj) {
	TrackerMockConnection * self;
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TRACKER_MOCK_CONNECTION, TrackerMockConnection);
#line 67 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_g_object_unref0 (self->priv->results);
#line 68 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_g_object_unref0 (self->priv->hardcoded);
#line 65 "/home/martyn/Source/checkout/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	G_OBJECT_CLASS (tracker_mock_connection_parent_class)->finalize (obj);
#line 1026 "tracker-connection-mock.c"
}


GType tracker_mock_connection_get_type (void) {
	static volatile gsize tracker_mock_connection_type_id__volatile = 0;
	if (g_once_init_enter (&tracker_mock_connection_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TrackerMockConnectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_mock_connection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerMockConnection), 0, (GInstanceInitFunc) tracker_mock_connection_instance_init, NULL };
		GType tracker_mock_connection_type_id;
		tracker_mock_connection_type_id = g_type_register_static (TRACKER_SPARQL_TYPE_CONNECTION, "TrackerMockConnection", &g_define_type_info, 0);
		g_once_init_leave (&tracker_mock_connection_type_id__volatile, tracker_mock_connection_type_id);
	}
	return tracker_mock_connection_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);
}



