/* test-shared-update.c generated by valac 0.28.0, the Vala compiler
 * generated from test-shared-update.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_TEST_APP (test_app_get_type ())
#define TEST_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TEST_APP, TestApp))
#define TEST_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TEST_APP, TestAppClass))
#define IS_TEST_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TEST_APP))
#define IS_TEST_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TEST_APP))
#define TEST_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TEST_APP, TestAppClass))

typedef struct _TestApp TestApp;
typedef struct _TestAppClass TestAppClass;
typedef struct _TestAppPrivate TestAppPrivate;
#define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _TestAppUpdateQueryAsyncData TestAppUpdateQueryAsyncData;
#define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
typedef struct _TestAppUpdateBlankQueryAsyncData TestAppUpdateBlankQueryAsyncData;
typedef struct _TestAppDoAsyncTestsData TestAppDoAsyncTestsData;

struct _TestApp {
	GObject parent_instance;
	TestAppPrivate * priv;
};

struct _TestAppClass {
	GObjectClass parent_class;
};

struct _TestAppPrivate {
	GMainLoop* loop;
	TrackerSparqlConnection* con;
	gint res;
};

struct _TestAppUpdateQueryAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TestApp* self;
	TrackerSparqlCursor* cursor;
	gint a;
	TrackerSparqlConnection* _tmp0_;
	GError* ea;
	GError* _tmp1_;
	const gchar* _tmp2_;
	TrackerSparqlCursor* _tmp3_;
	TrackerSparqlConnection* _tmp4_;
	TrackerSparqlCursor* _tmp5_;
	TrackerSparqlCursor* _tmp6_;
	TrackerSparqlCursor* _tmp7_;
	gint _tmp8_;
	GError* eb;
	GError* _tmp9_;
	const gchar* _tmp10_;
	GError * _inner_error_;
};

struct _TestAppUpdateBlankQueryAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TestApp* self;
	GVariant* variant;
	gint a;
	GVariant* _tmp0_;
	TrackerSparqlConnection* _tmp1_;
	GVariant* _tmp2_;
	GVariant* _tmp3_;
	GVariant* _tmp4_;
	gint _tmp5_;
	GError* e;
	GError* _tmp6_;
	const gchar* _tmp7_;
	GError * _inner_error_;
};

struct _TestAppDoAsyncTestsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GSimpleAsyncResult* _async_result;
	TestApp* self;
	GMainLoop* _tmp0_;
};


static gpointer test_app_parent_class = NULL;

GType test_app_get_type (void) G_GNUC_CONST;
#define TEST_APP_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_TEST_APP, TestAppPrivate))
enum  {
	TEST_APP_DUMMY_PROPERTY
};
TestApp* test_app_new (TrackerSparqlConnection* connection);
TestApp* test_app_construct (GType object_type, TrackerSparqlConnection* connection);
static gint test_app_iter_cursor (TestApp* self, TrackerSparqlCursor* cursor);
static gint test_app_iter_variant (TestApp* self, GVariant* variant);
static void test_app_update_query (TestApp* self);
static void test_app_update_query_async_data_free (gpointer _data);
static void test_app_update_query_async (TestApp* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void test_app_update_query_finish (TestApp* self, GAsyncResult* _res_);
static gboolean test_app_update_query_async_co (TestAppUpdateQueryAsyncData* _data_);
static void test_app_update_query_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void test_app_update_blank_query (TestApp* self);
static void test_app_update_blank_query_async_data_free (gpointer _data);
static void test_app_update_blank_query_async (TestApp* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void test_app_update_blank_query_finish (TestApp* self, GAsyncResult* _res_);
static gboolean test_app_update_blank_query_async_co (TestAppUpdateBlankQueryAsyncData* _data_);
static void test_app_update_blank_query_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void test_app_do_sync_tests (TestApp* self);
static void test_app_do_async_tests_data_free (gpointer _data);
static void test_app_do_async_tests (TestApp* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
static void test_app_do_async_tests_finish (TestApp* self, GAsyncResult* _res_);
static gboolean test_app_do_async_tests_co (TestAppDoAsyncTestsData* _data_);
static void test_app_do_async_tests_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static gboolean test_app_in_mainloop (TestApp* self);
gint test_app_run (TestApp* self);
static gboolean _test_app_in_mainloop_gsource_func (gpointer self);
static void test_app_finalize (GObject* obj);


static gpointer _g_object_ref0 (gpointer self) {
#line 11 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	return self ? g_object_ref (self) : NULL;
#line 139 "test-shared-update.c"
}


TestApp* test_app_construct (GType object_type, TrackerSparqlConnection* connection) {
	TestApp * self = NULL;
	TrackerSparqlConnection* _tmp0_ = NULL;
	TrackerSparqlConnection* _tmp1_ = NULL;
#line 10 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_return_val_if_fail (connection != NULL, NULL);
#line 10 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	self = (TestApp*) g_object_new (object_type, NULL);
#line 11 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_tmp0_ = connection;
#line 11 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 11 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_g_object_unref0 (self->priv->con);
#line 11 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	self->priv->con = _tmp1_;
#line 10 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	return self;
#line 161 "test-shared-update.c"
}


TestApp* test_app_new (TrackerSparqlConnection* connection) {
#line 10 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	return test_app_construct (TYPE_TEST_APP, connection);
#line 168 "test-shared-update.c"
}


static gint test_app_iter_cursor (TestApp* self, TrackerSparqlCursor* cursor) {
	gint result = 0;
	GError * _inner_error_ = NULL;
#line 14 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 14 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_return_val_if_fail (cursor != NULL, 0);
#line 179 "test-shared-update.c"
	{
#line 16 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		while (TRUE) {
#line 183 "test-shared-update.c"
			gboolean _tmp0_ = FALSE;
			TrackerSparqlCursor* _tmp1_ = NULL;
			gboolean _tmp2_ = FALSE;
			gint i = 0;
#line 16 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
			_tmp1_ = cursor;
#line 16 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
			_tmp2_ = tracker_sparql_cursor_next (_tmp1_, NULL, &_inner_error_);
#line 16 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
			_tmp0_ = _tmp2_;
#line 16 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 196 "test-shared-update.c"
				goto __catch0_g_error;
			}
#line 16 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
			if (!_tmp0_) {
#line 16 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
				break;
#line 203 "test-shared-update.c"
			}
			{
				gboolean _tmp3_ = FALSE;
#line 19 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
				i = 0;
#line 19 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
				_tmp3_ = TRUE;
#line 19 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
				while (TRUE) {
#line 213 "test-shared-update.c"
					gint _tmp5_ = 0;
					TrackerSparqlCursor* _tmp6_ = NULL;
					gint _tmp7_ = 0;
					gint _tmp8_ = 0;
					const gchar* _tmp9_ = NULL;
					gint _tmp10_ = 0;
					TrackerSparqlCursor* _tmp11_ = NULL;
					gint _tmp12_ = 0;
					const gchar* _tmp13_ = NULL;
#line 19 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
					if (!_tmp3_) {
#line 225 "test-shared-update.c"
						gint _tmp4_ = 0;
#line 19 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
						_tmp4_ = i;
#line 19 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
						i = _tmp4_ + 1;
#line 231 "test-shared-update.c"
					}
#line 19 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
					_tmp3_ = FALSE;
#line 19 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
					_tmp5_ = i;
#line 19 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
					_tmp6_ = cursor;
#line 19 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
					_tmp7_ = tracker_sparql_cursor_get_n_columns (_tmp6_);
#line 19 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
					_tmp8_ = _tmp7_;
#line 19 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
					if (!(_tmp5_ < _tmp8_)) {
#line 19 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
						break;
#line 247 "test-shared-update.c"
					}
#line 20 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
					_tmp10_ = i;
#line 20 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
					if (_tmp10_ != 0) {
#line 20 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
						_tmp9_ = ",";
#line 255 "test-shared-update.c"
					} else {
#line 20 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
						_tmp9_ = "";
#line 259 "test-shared-update.c"
					}
#line 20 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
					_tmp11_ = cursor;
#line 20 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
					_tmp12_ = i;
#line 20 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
					_tmp13_ = tracker_sparql_cursor_get_string (_tmp11_, _tmp12_, NULL);
#line 20 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
					g_print ("%s%s", _tmp9_, _tmp13_);
#line 269 "test-shared-update.c"
				}
			}
#line 23 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
			g_print ("\n");
#line 274 "test-shared-update.c"
		}
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp14_ = NULL;
		const gchar* _tmp15_ = NULL;
#line 15 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		e = _inner_error_;
#line 15 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_inner_error_ = NULL;
#line 26 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp14_ = e;
#line 26 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp15_ = _tmp14_->message;
#line 26 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_warning ("test-shared-update.vala:26: Couldn't iterate query results: %s", _tmp15_);
#line 27 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		result = -1;
#line 27 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_g_error_free0 (e);
#line 27 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		return result;
#line 299 "test-shared-update.c"
	}
	__finally0:
#line 15 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 15 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 15 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_clear_error (&_inner_error_);
#line 15 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		return 0;
#line 310 "test-shared-update.c"
	}
#line 30 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	result = 0;
#line 30 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	return result;
#line 316 "test-shared-update.c"
}


static gint test_app_iter_variant (TestApp* self, GVariant* variant) {
	gint result = 0;
#line 33 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 33 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_return_val_if_fail (variant != NULL, 0);
#line 38 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	result = 0;
#line 38 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	return result;
#line 330 "test-shared-update.c"
}


static void test_app_update_query (TestApp* self) {
	TrackerSparqlCursor* cursor = NULL;
	gint a = 0;
	GError * _inner_error_ = NULL;
#line 41 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_return_if_fail (self != NULL);
#line 340 "test-shared-update.c"
	{
		TrackerSparqlConnection* _tmp0_ = NULL;
#line 46 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp0_ = self->priv->con;
#line 46 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		tracker_sparql_connection_update (_tmp0_, "INSERT { <test01> a nie:InformationElement ; nie:title 'test01' }", G_PRIORITY_DEFAULT, NULL, &_inner_error_);
#line 46 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 349 "test-shared-update.c"
			goto __catch1_g_error;
		}
	}
	goto __finally1;
	__catch1_g_error:
	{
		GError* e = NULL;
		GError* _tmp1_ = NULL;
		const gchar* _tmp2_ = NULL;
#line 45 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		e = _inner_error_;
#line 45 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_inner_error_ = NULL;
#line 48 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp1_ = e;
#line 48 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp2_ = _tmp1_->message;
#line 48 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_warning ("test-shared-update.vala:48: Couldn't update: %s", _tmp2_);
#line 49 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		self->priv->res = -1;
#line 45 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_g_error_free0 (e);
#line 373 "test-shared-update.c"
	}
	__finally1:
#line 45 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 45 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_g_object_unref0 (cursor);
#line 45 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 45 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_clear_error (&_inner_error_);
#line 45 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		return;
#line 386 "test-shared-update.c"
	}
	{
		TrackerSparqlCursor* _tmp3_ = NULL;
		TrackerSparqlConnection* _tmp4_ = NULL;
		TrackerSparqlCursor* _tmp5_ = NULL;
		TrackerSparqlCursor* _tmp6_ = NULL;
		TrackerSparqlCursor* _tmp7_ = NULL;
		gint _tmp8_ = 0;
#line 53 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp4_ = self->priv->con;
#line 53 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp5_ = tracker_sparql_connection_query (_tmp4_, "SELECT ?title WHERE { <test01> nie:title ?title }", NULL, &_inner_error_);
#line 53 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp3_ = _tmp5_;
#line 53 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 403 "test-shared-update.c"
			goto __catch2_g_error;
		}
#line 53 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp6_ = _tmp3_;
#line 53 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp3_ = NULL;
#line 53 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_g_object_unref0 (cursor);
#line 53 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		cursor = _tmp6_;
#line 54 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp7_ = cursor;
#line 54 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp8_ = test_app_iter_cursor (self, _tmp7_);
#line 54 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		a = _tmp8_;
#line 52 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_g_object_unref0 (_tmp3_);
#line 422 "test-shared-update.c"
	}
	goto __finally2;
	__catch2_g_error:
	{
		GError* e = NULL;
		GError* _tmp9_ = NULL;
		const gchar* _tmp10_ = NULL;
#line 52 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		e = _inner_error_;
#line 52 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_inner_error_ = NULL;
#line 56 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp9_ = e;
#line 56 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp10_ = _tmp9_->message;
#line 56 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_warning ("test-shared-update.vala:56: Couldn't query: %s", _tmp10_);
#line 57 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		self->priv->res = -1;
#line 52 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_g_error_free0 (e);
#line 444 "test-shared-update.c"
	}
	__finally2:
#line 52 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 52 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_g_object_unref0 (cursor);
#line 52 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 52 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_clear_error (&_inner_error_);
#line 52 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		return;
#line 457 "test-shared-update.c"
	}
#line 41 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_g_object_unref0 (cursor);
#line 461 "test-shared-update.c"
}


static void test_app_update_query_async_data_free (gpointer _data) {
	TestAppUpdateQueryAsyncData* _data_;
	_data_ = _data;
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_g_object_unref0 (_data_->self);
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_slice_free (TestAppUpdateQueryAsyncData, _data_);
#line 472 "test-shared-update.c"
}


static void test_app_update_query_async (TestApp* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TestAppUpdateQueryAsyncData* _data_;
	TestApp* _tmp0_ = NULL;
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_ = g_slice_new0 (TestAppUpdateQueryAsyncData);
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, test_app_update_query_async);
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, test_app_update_query_async_data_free);
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_->self = _tmp0_;
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	test_app_update_query_async_co (_data_);
#line 491 "test-shared-update.c"
}


static void test_app_update_query_finish (TestApp* self, GAsyncResult* _res_) {
	TestAppUpdateQueryAsyncData* _data_;
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 499 "test-shared-update.c"
}


static void test_app_update_query_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TestAppUpdateQueryAsyncData* _data_;
#line 66 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_ = _user_data_;
#line 66 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_->_source_object_ = source_object;
#line 66 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_->_res_ = _res_;
#line 66 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	test_app_update_query_async_co (_data_);
#line 513 "test-shared-update.c"
}


static gboolean test_app_update_query_async_co (TestAppUpdateQueryAsyncData* _data_) {
#line 61 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	switch (_data_->_state_) {
#line 61 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		case 0:
#line 522 "test-shared-update.c"
		goto _state_0;
#line 61 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		case 1:
#line 526 "test-shared-update.c"
		goto _state_1;
		default:
#line 61 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_assert_not_reached ();
#line 531 "test-shared-update.c"
	}
	_state_0:
	{
#line 66 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp0_ = NULL;
#line 66 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp0_ = _data_->self->priv->con;
#line 66 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_state_ = 1;
#line 66 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		tracker_sparql_connection_update_async (_data_->_tmp0_, "INSERT { <test02> a nie:InformationElement ; nie:title 'test01' }", G_PRIORITY_DEFAULT, NULL, test_app_update_query_async_ready, _data_);
#line 66 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		return FALSE;
#line 545 "test-shared-update.c"
		_state_1:
#line 66 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		tracker_sparql_connection_update_finish (_data_->_tmp0_, _data_->_res_, &_data_->_inner_error_);
#line 66 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 551 "test-shared-update.c"
			goto __catch3_g_error;
		}
	}
	goto __finally3;
	__catch3_g_error:
	{
#line 65 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->ea = _data_->_inner_error_;
#line 65 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_inner_error_ = NULL;
#line 68 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp1_ = NULL;
#line 68 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp1_ = _data_->ea;
#line 68 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp2_ = NULL;
#line 68 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp2_ = _data_->_tmp1_->message;
#line 68 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_warning ("test-shared-update.vala:68: Couldn't update: %s", _data_->_tmp2_);
#line 69 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->self->priv->res = -1;
#line 65 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_g_error_free0 (_data_->ea);
#line 576 "test-shared-update.c"
	}
	__finally3:
#line 65 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 65 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_g_object_unref0 (_data_->cursor);
#line 65 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 65 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_clear_error (&_data_->_inner_error_);
#line 65 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		return FALSE;
#line 589 "test-shared-update.c"
	}
	{
#line 73 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp4_ = NULL;
#line 73 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp4_ = _data_->self->priv->con;
#line 73 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp5_ = NULL;
#line 73 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp5_ = tracker_sparql_connection_query (_data_->_tmp4_, "SELECT ?title WHERE { <test02> nie:title ?title }", NULL, &_data_->_inner_error_);
#line 73 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp3_ = _data_->_tmp5_;
#line 73 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 604 "test-shared-update.c"
			goto __catch4_g_error;
		}
#line 73 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp6_ = NULL;
#line 73 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp6_ = _data_->_tmp3_;
#line 73 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp3_ = NULL;
#line 73 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_g_object_unref0 (_data_->cursor);
#line 73 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->cursor = _data_->_tmp6_;
#line 74 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp7_ = NULL;
#line 74 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp7_ = _data_->cursor;
#line 74 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp8_ = 0;
#line 74 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp8_ = test_app_iter_cursor (_data_->self, _data_->_tmp7_);
#line 74 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->a = _data_->_tmp8_;
#line 72 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_g_object_unref0 (_data_->_tmp3_);
#line 629 "test-shared-update.c"
	}
	goto __finally4;
	__catch4_g_error:
	{
#line 72 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->eb = _data_->_inner_error_;
#line 72 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_inner_error_ = NULL;
#line 76 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp9_ = NULL;
#line 76 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp9_ = _data_->eb;
#line 76 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp10_ = NULL;
#line 76 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp10_ = _data_->_tmp9_->message;
#line 76 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_warning ("test-shared-update.vala:76: Couldn't query: %s", _data_->_tmp10_);
#line 77 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->self->priv->res = -1;
#line 72 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_g_error_free0 (_data_->eb);
#line 652 "test-shared-update.c"
	}
	__finally4:
#line 72 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 72 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_g_object_unref0 (_data_->cursor);
#line 72 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 72 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_clear_error (&_data_->_inner_error_);
#line 72 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		return FALSE;
#line 665 "test-shared-update.c"
	}
#line 61 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_g_object_unref0 (_data_->cursor);
#line 61 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	if (_data_->_state_ == 0) {
#line 61 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 673 "test-shared-update.c"
	} else {
#line 61 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 677 "test-shared-update.c"
	}
#line 61 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_object_unref (_data_->_async_result);
#line 61 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	return FALSE;
#line 683 "test-shared-update.c"
}


static void test_app_update_blank_query (TestApp* self) {
	GVariant* variant = NULL;
	gint a = 0;
	GError * _inner_error_ = NULL;
#line 81 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_return_if_fail (self != NULL);
#line 693 "test-shared-update.c"
	{
		GVariant* _tmp0_ = NULL;
		TrackerSparqlConnection* _tmp1_ = NULL;
		GVariant* _tmp2_ = NULL;
		GVariant* _tmp3_ = NULL;
		GVariant* _tmp4_ = NULL;
		gint _tmp5_ = 0;
#line 86 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp1_ = self->priv->con;
#line 86 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp2_ = tracker_sparql_connection_update_blank (_tmp1_, "INSERT { _:a1 a nie:InformationElement  . _:b1 a nie:InformationElemen" \
"t . _:c1 a nie:InformationElement }", G_PRIORITY_DEFAULT, NULL, &_inner_error_);
#line 86 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp0_ = _tmp2_;
#line 86 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 709 "test-shared-update.c"
			goto __catch5_g_error;
		}
#line 86 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp3_ = _tmp0_;
#line 86 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp0_ = NULL;
#line 86 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_g_variant_unref0 (variant);
#line 86 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		variant = _tmp3_;
#line 87 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp4_ = variant;
#line 87 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp5_ = test_app_iter_variant (self, _tmp4_);
#line 87 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		a = _tmp5_;
#line 85 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_g_variant_unref0 (_tmp0_);
#line 728 "test-shared-update.c"
	}
	goto __finally5;
	__catch5_g_error:
	{
		GError* e = NULL;
		GError* _tmp6_ = NULL;
		const gchar* _tmp7_ = NULL;
#line 85 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		e = _inner_error_;
#line 85 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_inner_error_ = NULL;
#line 89 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp6_ = e;
#line 89 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_tmp7_ = _tmp6_->message;
#line 89 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_warning ("test-shared-update.vala:89: Couldn't update: %s", _tmp7_);
#line 90 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		self->priv->res = -1;
#line 85 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_g_error_free0 (e);
#line 750 "test-shared-update.c"
	}
	__finally5:
#line 85 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 85 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_g_variant_unref0 (variant);
#line 85 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 85 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_clear_error (&_inner_error_);
#line 85 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		return;
#line 763 "test-shared-update.c"
	}
#line 81 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_g_variant_unref0 (variant);
#line 767 "test-shared-update.c"
}


static void test_app_update_blank_query_async_data_free (gpointer _data) {
	TestAppUpdateBlankQueryAsyncData* _data_;
	_data_ = _data;
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_g_object_unref0 (_data_->self);
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_slice_free (TestAppUpdateBlankQueryAsyncData, _data_);
#line 778 "test-shared-update.c"
}


static void test_app_update_blank_query_async (TestApp* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TestAppUpdateBlankQueryAsyncData* _data_;
	TestApp* _tmp0_ = NULL;
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_ = g_slice_new0 (TestAppUpdateBlankQueryAsyncData);
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, test_app_update_blank_query_async);
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, test_app_update_blank_query_async_data_free);
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_->self = _tmp0_;
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	test_app_update_blank_query_async_co (_data_);
#line 797 "test-shared-update.c"
}


static void test_app_update_blank_query_finish (TestApp* self, GAsyncResult* _res_) {
	TestAppUpdateBlankQueryAsyncData* _data_;
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 805 "test-shared-update.c"
}


static void test_app_update_blank_query_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TestAppUpdateBlankQueryAsyncData* _data_;
#line 99 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_ = _user_data_;
#line 99 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_->_source_object_ = source_object;
#line 99 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_->_res_ = _res_;
#line 99 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	test_app_update_blank_query_async_co (_data_);
#line 819 "test-shared-update.c"
}


static gboolean test_app_update_blank_query_async_co (TestAppUpdateBlankQueryAsyncData* _data_) {
#line 94 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	switch (_data_->_state_) {
#line 94 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		case 0:
#line 828 "test-shared-update.c"
		goto _state_0;
#line 94 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		case 1:
#line 832 "test-shared-update.c"
		goto _state_1;
		default:
#line 94 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_assert_not_reached ();
#line 837 "test-shared-update.c"
	}
	_state_0:
	{
#line 99 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp1_ = NULL;
#line 99 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp1_ = _data_->self->priv->con;
#line 99 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_state_ = 1;
#line 99 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		tracker_sparql_connection_update_blank_async (_data_->_tmp1_, "INSERT { _:a2 a nie:InformationElement  . _:b2 a nie:InformationElemen" \
"t . _:c2 a nie:InformationElement }", G_PRIORITY_DEFAULT, NULL, test_app_update_blank_query_async_ready, _data_);
#line 99 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		return FALSE;
#line 851 "test-shared-update.c"
		_state_1:
#line 99 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp2_ = NULL;
#line 99 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp2_ = tracker_sparql_connection_update_blank_finish (_data_->_tmp1_, _data_->_res_, &_data_->_inner_error_);
#line 99 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp0_ = _data_->_tmp2_;
#line 99 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 861 "test-shared-update.c"
			goto __catch6_g_error;
		}
#line 99 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp3_ = NULL;
#line 99 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp3_ = _data_->_tmp0_;
#line 99 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp0_ = NULL;
#line 99 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_g_variant_unref0 (_data_->variant);
#line 99 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->variant = _data_->_tmp3_;
#line 100 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp4_ = NULL;
#line 100 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp4_ = _data_->variant;
#line 100 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp5_ = 0;
#line 100 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp5_ = test_app_iter_variant (_data_->self, _data_->_tmp4_);
#line 100 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->a = _data_->_tmp5_;
#line 98 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_g_variant_unref0 (_data_->_tmp0_);
#line 886 "test-shared-update.c"
	}
	goto __finally6;
	__catch6_g_error:
	{
#line 98 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->e = _data_->_inner_error_;
#line 98 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_inner_error_ = NULL;
#line 102 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp6_ = NULL;
#line 102 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp6_ = _data_->e;
#line 102 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp7_ = NULL;
#line 102 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->_tmp7_ = _data_->_tmp6_->message;
#line 102 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_warning ("test-shared-update.vala:102: Couldn't update: %s", _data_->_tmp7_);
#line 103 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_data_->self->priv->res = -1;
#line 98 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_g_error_free0 (_data_->e);
#line 909 "test-shared-update.c"
	}
	__finally6:
#line 98 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 98 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		_g_variant_unref0 (_data_->variant);
#line 98 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 98 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_clear_error (&_data_->_inner_error_);
#line 98 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		return FALSE;
#line 922 "test-shared-update.c"
	}
#line 94 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_g_variant_unref0 (_data_->variant);
#line 94 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	if (_data_->_state_ == 0) {
#line 94 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 930 "test-shared-update.c"
	} else {
#line 94 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 934 "test-shared-update.c"
	}
#line 94 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_object_unref (_data_->_async_result);
#line 94 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	return FALSE;
#line 940 "test-shared-update.c"
}


static void test_app_do_sync_tests (TestApp* self) {
#line 107 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_return_if_fail (self != NULL);
#line 108 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	test_app_update_query (self);
#line 109 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	test_app_update_blank_query (self);
#line 951 "test-shared-update.c"
}


static void test_app_do_async_tests_data_free (gpointer _data) {
	TestAppDoAsyncTestsData* _data_;
	_data_ = _data;
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_g_object_unref0 (_data_->self);
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_slice_free (TestAppDoAsyncTestsData, _data_);
#line 962 "test-shared-update.c"
}


static void test_app_do_async_tests (TestApp* self, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TestAppDoAsyncTestsData* _data_;
	TestApp* _tmp0_ = NULL;
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_ = g_slice_new0 (TestAppDoAsyncTestsData);
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, test_app_do_async_tests);
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, test_app_do_async_tests_data_free);
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_tmp0_ = _g_object_ref0 (self);
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_->self = _tmp0_;
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	test_app_do_async_tests_co (_data_);
#line 981 "test-shared-update.c"
}


static void test_app_do_async_tests_finish (TestApp* self, GAsyncResult* _res_) {
	TestAppDoAsyncTestsData* _data_;
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
#line 989 "test-shared-update.c"
}


static void test_app_do_async_tests_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TestAppDoAsyncTestsData* _data_;
#line 113 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_ = _user_data_;
#line 113 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_->_source_object_ = source_object;
#line 113 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_->_res_ = _res_;
#line 113 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	test_app_do_async_tests_co (_data_);
#line 1003 "test-shared-update.c"
}


static gboolean test_app_do_async_tests_co (TestAppDoAsyncTestsData* _data_) {
#line 112 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	switch (_data_->_state_) {
#line 112 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		case 0:
#line 1012 "test-shared-update.c"
		goto _state_0;
#line 112 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		case 1:
#line 1016 "test-shared-update.c"
		goto _state_1;
#line 112 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		case 2:
#line 1020 "test-shared-update.c"
		goto _state_2;
		default:
#line 112 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_assert_not_reached ();
#line 1025 "test-shared-update.c"
	}
	_state_0:
#line 113 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_->_state_ = 1;
#line 113 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	test_app_update_query_async (_data_->self, test_app_do_async_tests_ready, _data_);
#line 113 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	return FALSE;
#line 1034 "test-shared-update.c"
	_state_1:
#line 113 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	test_app_update_query_finish (_data_->self, _data_->_res_);
#line 114 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_->_state_ = 2;
#line 114 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	test_app_update_blank_query_async (_data_->self, test_app_do_async_tests_ready, _data_);
#line 114 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	return FALSE;
#line 1044 "test-shared-update.c"
	_state_2:
#line 114 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	test_app_update_blank_query_finish (_data_->self, _data_->_res_);
#line 116 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_print ("Async tests done, now I can quit the mainloop\n");
#line 117 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_->_tmp0_ = NULL;
#line 117 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_data_->_tmp0_ = _data_->self->priv->loop;
#line 117 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_main_loop_quit (_data_->_tmp0_);
#line 112 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	if (_data_->_state_ == 0) {
#line 112 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_simple_async_result_complete_in_idle (_data_->_async_result);
#line 1060 "test-shared-update.c"
	} else {
#line 112 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
		g_simple_async_result_complete (_data_->_async_result);
#line 1064 "test-shared-update.c"
	}
#line 112 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_object_unref (_data_->_async_result);
#line 112 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	return FALSE;
#line 1070 "test-shared-update.c"
}


static gboolean test_app_in_mainloop (TestApp* self) {
	gboolean result = FALSE;
#line 120 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 122 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	test_app_do_sync_tests (self);
#line 123 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	test_app_do_async_tests (self, NULL, NULL);
#line 125 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	result = FALSE;
#line 125 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	return result;
#line 1086 "test-shared-update.c"
}


static gboolean _test_app_in_mainloop_gsource_func (gpointer self) {
	gboolean result;
	result = test_app_in_mainloop ((TestApp*) self);
#line 131 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	return result;
#line 1095 "test-shared-update.c"
}


gint test_app_run (TestApp* self) {
	gint result = 0;
	GMainLoop* _tmp0_ = NULL;
	GMainLoop* _tmp1_ = NULL;
	gint _tmp2_ = 0;
#line 128 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 129 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_tmp0_ = g_main_loop_new (NULL, FALSE);
#line 129 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_g_main_loop_unref0 (self->priv->loop);
#line 129 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	self->priv->loop = _tmp0_;
#line 131 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, _test_app_in_mainloop_gsource_func, g_object_ref (self), g_object_unref);
#line 133 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_tmp1_ = self->priv->loop;
#line 133 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_main_loop_run (_tmp1_);
#line 135 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_tmp2_ = self->priv->res;
#line 135 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	result = _tmp2_;
#line 135 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	return result;
#line 1124 "test-shared-update.c"
}


static void test_app_class_init (TestAppClass * klass) {
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	test_app_parent_class = g_type_class_peek_parent (klass);
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	g_type_class_add_private (klass, sizeof (TestAppPrivate));
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	G_OBJECT_CLASS (klass)->finalize = test_app_finalize;
#line 1135 "test-shared-update.c"
}


static void test_app_instance_init (TestApp * self) {
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	self->priv = TEST_APP_GET_PRIVATE (self);
#line 8 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	self->priv->res = 0;
#line 1144 "test-shared-update.c"
}


static void test_app_finalize (GObject* obj) {
	TestApp * self;
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TEST_APP, TestApp);
#line 6 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_g_main_loop_unref0 (self->priv->loop);
#line 7 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	_g_object_unref0 (self->priv->con);
#line 5 "/home/carlos/Source/gnome/tracker/tests/functional-tests/ipc/test-shared-update.vala"
	G_OBJECT_CLASS (test_app_parent_class)->finalize (obj);
#line 1158 "test-shared-update.c"
}


GType test_app_get_type (void) {
	static volatile gsize test_app_type_id__volatile = 0;
	if (g_once_init_enter (&test_app_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TestAppClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) test_app_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TestApp), 0, (GInstanceInitFunc) test_app_instance_init, NULL };
		GType test_app_type_id;
		test_app_type_id = g_type_register_static (G_TYPE_OBJECT, "TestApp", &g_define_type_info, 0);
		g_once_init_leave (&test_app_type_id__volatile, test_app_type_id);
	}
	return test_app_type_id__volatile;
}



