/* tracker-connection-mock.c generated by valac 0.38.3, 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;
enum  {
	TRACKER_MOCK_RESULTS_0_PROPERTY,
	TRACKER_MOCK_RESULTS_N_COLUMNS_PROPERTY,
	TRACKER_MOCK_RESULTS_NUM_PROPERTIES
};
static GParamSpec* tracker_mock_results_properties[TRACKER_MOCK_RESULTS_NUM_PROPERTIES];
#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;
enum  {
	TRACKER_MOCK_CONNECTION_0_PROPERTY,
	TRACKER_MOCK_CONNECTION_NUM_PROPERTIES
};
static GParamSpec* tracker_mock_connection_properties[TRACKER_MOCK_CONNECTION_NUM_PROPERTIES];
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _TrackerMockConnectionQueryAsyncData TrackerMockConnectionQueryAsyncData;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

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_;
	GTask* _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_;
	GTask* _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))
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))
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/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return g_memdup (self, length * sizeof (TrackerSparqlValueType));
#line 160 "tracker-connection-mock.c"
}


static gchar** _vala_array_dup2 (gchar** self, int length) {
	gchar** result;
	int i;
#line 18 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	result = g_new0 (gchar*, length + 1);
#line 18 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	for (i = 0; i < length; i++) {
#line 171 "tracker-connection-mock.c"
		gchar* _tmp0_;
#line 18 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_tmp0_ = g_strdup (self[i]);
#line 18 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		result[i] = _tmp0_;
#line 177 "tracker-connection-mock.c"
	}
#line 18 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return result;
#line 181 "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_;
	gint _tmp1_;
	gchar** _tmp2_;
	gint _tmp2__length1;
	gint _tmp2__length2;
	TrackerSparqlValueType* _tmp3_;
	gint _tmp3__length1;
	TrackerSparqlValueType* _tmp4_;
	gint _tmp4__length1;
	gchar** _tmp5_;
	gint _tmp5__length1;
	gchar** _tmp6_;
	gint _tmp6__length1;
#line 13 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self = (TrackerMockResults*) tracker_sparql_cursor_construct (object_type);
#line 14 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp0_ = rows;
#line 14 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->rows = _tmp0_;
#line 15 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1_ = cols;
#line 15 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->cols = _tmp1_;
#line 16 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp2_ = results;
#line 16 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp2__length1 = results_length1;
#line 16 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp2__length2 = results_length2;
#line 16 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	results = NULL;
#line 16 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	results_length1 = 0;
#line 16 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	results_length2 = 0;
#line 16 "/home/carlos/Source/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/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->results = _tmp2_;
#line 16 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->results_length1 = _tmp2__length1;
#line 16 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->results_length2 = _tmp2__length2;
#line 17 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp3_ = types;
#line 17 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp3__length1 = types_length1;
#line 17 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp4_ = (_tmp3_ != NULL) ? _vala_array_dup1 (_tmp3_, _tmp3__length1) : ((gpointer) _tmp3_);
#line 17 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp4__length1 = _tmp3__length1;
#line 17 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->types = (g_free (self->priv->types), NULL);
#line 17 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->types = _tmp4_;
#line 17 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->types_length1 = _tmp4__length1;
#line 17 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->_types_size_ = self->priv->types_length1;
#line 18 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp5_ = var_names;
#line 18 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp5__length1 = var_names_length1;
#line 18 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp6_ = (_tmp5_ != NULL) ? _vala_array_dup2 (_tmp5_, _tmp5__length1) : ((gpointer) _tmp5_);
#line 18 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp6__length1 = _tmp5__length1;
#line 18 "/home/carlos/Source/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/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->var_names = _tmp6_;
#line 18 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->var_names_length1 = _tmp6__length1;
#line 18 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->_var_names_size_ = self->priv->var_names_length1;
#line 13 "/home/carlos/Source/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/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return self;
#line 266 "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/carlos/Source/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 273 "tracker-connection-mock.c"
}


static TrackerSparqlValueType tracker_mock_results_real_get_value_type (TrackerSparqlCursor* base, gint column) {
	TrackerMockResults * self;
	TrackerSparqlValueType result = 0;
	gint _tmp0_;
	TrackerSparqlValueType* _tmp1_;
	gint _tmp1__length1;
	gint _tmp2_;
	TrackerSparqlValueType _tmp3_;
#line 23 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self = (TrackerMockResults*) base;
#line 23 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp0_ = self->priv->current_row;
#line 23 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_vala_return_val_if_fail (_tmp0_ >= 0, "current_row >= 0", 0);
#line 25 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1_ = self->priv->types;
#line 25 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1__length1 = self->priv->types_length1;
#line 25 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp2_ = column;
#line 25 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp3_ = _tmp1_[_tmp2_];
#line 25 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	result = _tmp3_;
#line 25 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return result;
#line 303 "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_;
	gchar** _tmp1_;
	gint _tmp1__length1;
	gint _tmp2_;
	const gchar* _tmp3_;
#line 28 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self = (TrackerMockResults*) base;
#line 28 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp0_ = self->priv->current_row;
#line 28 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_vala_return_val_if_fail (_tmp0_ >= 0, "current_row >= 0", NULL);
#line 30 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1_ = self->priv->var_names;
#line 30 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1__length1 = self->priv->var_names_length1;
#line 30 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp2_ = column;
#line 30 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp3_ = _tmp1_[_tmp2_];
#line 30 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	result = _tmp3_;
#line 30 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return result;
#line 333 "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_;
	const gchar* str = NULL;
	gchar** _tmp1_;
	gint _tmp1__length1;
	gint _tmp1__length2;
	gint _tmp2_;
	gint _tmp3_;
	const gchar* _tmp4_;
	gint _tmp5_;
	gint _tmp6_;
#line 33 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self = (TrackerMockResults*) base;
#line 33 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp0_ = self->priv->current_row;
#line 33 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_vala_return_val_if_fail (_tmp0_ >= 0, "current_row >= 0", NULL);
#line 37 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1_ = self->priv->results;
#line 37 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1__length1 = self->priv->results_length1;
#line 37 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1__length2 = self->priv->results_length2;
#line 37 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp2_ = self->priv->current_row;
#line 37 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp3_ = column;
#line 37 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp4_ = _tmp1_[(_tmp2_ * _tmp1__length2) + _tmp3_];
#line 37 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	str = _tmp4_;
#line 39 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp5_ = strlen (str);
#line 39 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp6_ = _tmp5_;
#line 39 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_vala_length = (glong) _tmp6_;
#line 41 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	result = str;
#line 41 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	if (length) {
#line 41 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		*length = _vala_length;
#line 383 "tracker-connection-mock.c"
	}
#line 41 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return result;
#line 387 "tracker-connection-mock.c"
}


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


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


static gpointer _g_object_ref0 (gpointer self) {
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return self ? g_object_ref (self) : NULL;
#line 439 "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_;
	GCancellable* _tmp1_;
	GCancellable* _tmp2_;
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self = (TrackerMockResults*) base;
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_ = g_slice_new0 (TrackerMockResultsNextAsyncData);
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_task_set_task_data (_data_->_async_result, _data_, tracker_mock_results_real_next_async_data_free);
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->self = _tmp0_;
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1_ = cancellable;
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp2_ = _g_object_ref0 (_tmp1_);
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_g_object_unref0 (_data_->cancellable);
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->cancellable = _tmp2_;
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	tracker_mock_results_real_next_async_co (_data_);
#line 471 "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/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	if (NULL == _data_) {
#line 482 "tracker-connection-mock.c"
		gboolean _tmp0_ = FALSE;
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		return _tmp0_;
#line 486 "tracker-connection-mock.c"
	}
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	result = _data_->result;
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return result;
#line 492 "tracker-connection-mock.c"
}


static gboolean tracker_mock_results_real_next_async_co (TrackerMockResultsNextAsyncData* _data_) {
#line 52 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	switch (_data_->_state_) {
#line 52 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		case 0:
#line 501 "tracker-connection-mock.c"
		goto _state_0;
		default:
#line 52 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		g_assert_not_reached ();
#line 506 "tracker-connection-mock.c"
	}
	_state_0:
#line 54 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->_tmp1_ = _data_->cancellable;
#line 54 "/home/carlos/Source/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/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->_tmp0_ = _data_->_tmp2_;
#line 54 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 54 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 54 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		g_object_unref (_data_->_async_result);
#line 54 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		return FALSE;
#line 523 "tracker-connection-mock.c"
	}
#line 54 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->result = _data_->_tmp0_;
#line 54 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 54 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	if (_data_->_state_ != 0) {
#line 54 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 54 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 535 "tracker-connection-mock.c"
		}
	}
#line 54 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_object_unref (_data_->_async_result);
#line 54 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return FALSE;
#line 542 "tracker-connection-mock.c"
}


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


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


static void tracker_mock_results_class_init (TrackerMockResultsClass * klass) {
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	tracker_mock_results_parent_class = g_type_class_peek_parent (klass);
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_type_class_add_private (klass, sizeof (TrackerMockResultsPrivate));
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	((TrackerSparqlCursorClass *) klass)->get_value_type = (TrackerSparqlValueType (*) (TrackerSparqlCursor *, gint)) tracker_mock_results_real_get_value_type;
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	((TrackerSparqlCursorClass *) klass)->get_variable_name = (const gchar* (*) (TrackerSparqlCursor *, gint)) tracker_mock_results_real_get_variable_name;
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	((TrackerSparqlCursorClass *) klass)->get_string = (const gchar* (*) (TrackerSparqlCursor *, gint, glong*)) tracker_mock_results_real_get_string;
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	((TrackerSparqlCursorClass *) klass)->next = (gboolean (*) (TrackerSparqlCursor *, GCancellable*, GError**)) tracker_mock_results_real_next;
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	((TrackerSparqlCursorClass *) klass)->next_async = (void (*) (TrackerSparqlCursor *, GCancellable*, GAsyncReadyCallback, gpointer)) tracker_mock_results_real_next_async;
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	((TrackerSparqlCursorClass *) klass)->next_finish = (gboolean (*) (TrackerSparqlCursor *, GAsyncResult*, GError**)) tracker_mock_results_real_next_finish;
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	((TrackerSparqlCursorClass *) klass)->rewind = (void (*) (TrackerSparqlCursor *)) tracker_mock_results_real_rewind;
#line 5 "/home/carlos/Source/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/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_tracker_mock_results_get_property;
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	G_OBJECT_CLASS (klass)->finalize = tracker_mock_results_finalize;
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_MOCK_RESULTS_N_COLUMNS_PROPERTY, tracker_mock_results_properties[TRACKER_MOCK_RESULTS_N_COLUMNS_PROPERTY] = 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 599 "tracker-connection-mock.c"
}


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


static void tracker_mock_results_finalize (GObject * obj) {
	TrackerMockResults * self;
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TRACKER_MOCK_RESULTS, TrackerMockResults);
#line 8 "/home/carlos/Source/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/carlos/Source/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/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self->priv->types = (g_free (self->priv->types), NULL);
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	G_OBJECT_CLASS (tracker_mock_results_parent_class)->finalize (obj);
#line 624 "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/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	switch (property_id) {
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		case TRACKER_MOCK_RESULTS_N_COLUMNS_PROPERTY:
#line 5 "/home/carlos/Source/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/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		break;
#line 651 "tracker-connection-mock.c"
		default:
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 5 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		break;
#line 657 "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_;
#line 72 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self = (TrackerMockConnection*) base;
#line 72 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_return_val_if_fail (sparql != NULL, NULL);
#line 75 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp0_ = self->priv->results;
#line 75 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	if (_tmp0_ != NULL) {
#line 674 "tracker-connection-mock.c"
		TrackerMockResults* _tmp1_;
		TrackerSparqlCursor* _tmp2_;
#line 76 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_tmp1_ = self->priv->results;
#line 76 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_tmp2_ = _g_object_ref0 ((TrackerSparqlCursor*) _tmp1_);
#line 76 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		result = _tmp2_;
#line 76 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		return result;
#line 685 "tracker-connection-mock.c"
	} else {
		TrackerMockResults* _tmp3_;
		TrackerSparqlCursor* _tmp4_;
#line 78 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_tmp3_ = self->priv->hardcoded;
#line 78 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_tmp4_ = _g_object_ref0 ((TrackerSparqlCursor*) _tmp3_);
#line 78 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		result = _tmp4_;
#line 78 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		return result;
#line 697 "tracker-connection-mock.c"
	}
}


static void tracker_mock_connection_real_query_async_data_free (gpointer _data) {
	TrackerMockConnectionQueryAsyncData* _data_;
	_data_ = _data;
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_g_free0 (_data_->sparql);
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_g_object_unref0 (_data_->cancellable);
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_g_object_unref0 (_data_->result);
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_g_object_unref0 (_data_->self);
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_slice_free (TrackerMockConnectionQueryAsyncData, _data_);
#line 715 "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_;
	const gchar* _tmp1_;
	gchar* _tmp2_;
	GCancellable* _tmp3_;
	GCancellable* _tmp4_;
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self = (TrackerMockConnection*) base;
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_ = g_slice_new0 (TrackerMockConnectionQueryAsyncData);
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->_async_result = g_task_new (G_OBJECT (self), cancellable, _callback_, _user_data_);
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_task_set_task_data (_data_->_async_result, _data_, tracker_mock_connection_real_query_async_data_free);
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->self = _tmp0_;
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp1_ = sparql;
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp2_ = g_strdup (_tmp1_);
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_g_free0 (_data_->sparql);
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->sparql = _tmp2_;
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp3_ = cancellable;
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_g_object_unref0 (_data_->cancellable);
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->cancellable = _tmp4_;
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	tracker_mock_connection_real_query_async_co (_data_);
#line 757 "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/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	if (NULL == _data_) {
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		return NULL;
#line 770 "tracker-connection-mock.c"
	}
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	result = _data_->result;
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->result = NULL;
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	return result;
#line 778 "tracker-connection-mock.c"
}


static gboolean tracker_mock_connection_real_query_async_co (TrackerMockConnectionQueryAsyncData* _data_) {
#line 83 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	switch (_data_->_state_) {
#line 83 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		case 0:
#line 787 "tracker-connection-mock.c"
		goto _state_0;
		default:
#line 83 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		g_assert_not_reached ();
#line 792 "tracker-connection-mock.c"
	}
	_state_0:
#line 85 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_data_->_tmp0_ = _data_->self->priv->results;
#line 85 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	if (_data_->_tmp0_ != NULL) {
#line 86 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_data_->_tmp1_ = _data_->self->priv->results;
#line 86 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_data_->_tmp2_ = _g_object_ref0 ((TrackerSparqlCursor*) _data_->_tmp1_);
#line 86 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_data_->result = _data_->_tmp2_;
#line 86 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 86 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		if (_data_->_state_ != 0) {
#line 86 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
			while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 86 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 813 "tracker-connection-mock.c"
			}
		}
#line 86 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		g_object_unref (_data_->_async_result);
#line 86 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		return FALSE;
#line 820 "tracker-connection-mock.c"
	} else {
#line 88 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_data_->_tmp3_ = _data_->self->priv->hardcoded;
#line 88 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_data_->_tmp4_ = _g_object_ref0 ((TrackerSparqlCursor*) _data_->_tmp3_);
#line 88 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		_data_->result = _data_->_tmp4_;
#line 88 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 88 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		if (_data_->_state_ != 0) {
#line 88 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
			while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 88 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 836 "tracker-connection-mock.c"
			}
		}
#line 88 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		g_object_unref (_data_->_async_result);
#line 88 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
		return FALSE;
#line 843 "tracker-connection-mock.c"
	}
}


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


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


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


static void tracker_mock_connection_class_init (TrackerMockConnectionClass * klass) {
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	tracker_mock_connection_parent_class = g_type_class_peek_parent (klass);
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	g_type_class_add_private (klass, sizeof (TrackerMockConnectionPrivate));
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	((TrackerSparqlConnectionClass *) klass)->query = (TrackerSparqlCursor* (*) (TrackerSparqlConnection *, const gchar*, GCancellable*, GError**)) tracker_mock_connection_real_query;
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	((TrackerSparqlConnectionClass *) klass)->query_async = (void (*) (TrackerSparqlConnection *, const gchar*, GCancellable*, GAsyncReadyCallback, gpointer)) tracker_mock_connection_real_query_async;
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	((TrackerSparqlConnectionClass *) klass)->query_finish = (TrackerSparqlCursor* (*) (TrackerSparqlConnection *, GAsyncResult*, GError**)) tracker_mock_connection_real_query_finish;
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	G_OBJECT_CLASS (klass)->finalize = tracker_mock_connection_finalize;
#line 897 "tracker-connection-mock.c"
}


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


static void tracker_mock_connection_finalize (GObject * obj) {
	TrackerMockConnection * self;
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TRACKER_MOCK_CONNECTION, TrackerMockConnection);
#line 67 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_g_object_unref0 (self->priv->results);
#line 68 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	_g_object_unref0 (self->priv->hardcoded);
#line 65 "/home/carlos/Source/gnome/tracker/tests/libtracker-miner/tracker-connection-mock.vala"
	G_OBJECT_CLASS (tracker_mock_connection_parent_class)->finalize (obj);
#line 984 "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);
}



