/* tracker-sparql-builder.c generated by valac 0.14.0, the Vala compiler
 * generated from tracker-sparql-builder.vala, do not modify */

/*
 * Copyright (C) 2009, Nokia
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02110-1301, USA.
 */

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <float.h>
#include <math.h>


#define TRACKER_TYPE_SPARQL_BUILDER (tracker_sparql_builder_get_type ())
#define TRACKER_SPARQL_BUILDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_TYPE_SPARQL_BUILDER, TrackerSparqlBuilder))
#define TRACKER_SPARQL_BUILDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_SPARQL_BUILDER, TrackerSparqlBuilderClass))
#define TRACKER_IS_SPARQL_BUILDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_TYPE_SPARQL_BUILDER))
#define TRACKER_IS_SPARQL_BUILDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_SPARQL_BUILDER))
#define TRACKER_SPARQL_BUILDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_SPARQL_BUILDER, TrackerSparqlBuilderClass))

typedef struct _TrackerSparqlBuilder TrackerSparqlBuilder;
typedef struct _TrackerSparqlBuilderClass TrackerSparqlBuilderClass;
typedef struct _TrackerSparqlBuilderPrivate TrackerSparqlBuilderPrivate;

#define TRACKER_SPARQL_BUILDER_TYPE_STATE (tracker_sparql_builder_state_get_type ())
#define _g_string_free0(var) ((var == NULL) ? NULL : (var = (g_string_free (var, TRUE), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

struct _TrackerSparqlBuilder {
	GObject parent_instance;
	TrackerSparqlBuilderPrivate * priv;
};

struct _TrackerSparqlBuilderClass {
	GObjectClass parent_class;
};

typedef enum  {
	TRACKER_SPARQL_BUILDER_STATE_UPDATE,
	TRACKER_SPARQL_BUILDER_STATE_INSERT,
	TRACKER_SPARQL_BUILDER_STATE_DELETE,
	TRACKER_SPARQL_BUILDER_STATE_SUBJECT,
	TRACKER_SPARQL_BUILDER_STATE_PREDICATE,
	TRACKER_SPARQL_BUILDER_STATE_OBJECT,
	TRACKER_SPARQL_BUILDER_STATE_BLANK,
	TRACKER_SPARQL_BUILDER_STATE_WHERE,
	TRACKER_SPARQL_BUILDER_STATE_EMBEDDED_INSERT
} TrackerSparqlBuilderState;

struct _TrackerSparqlBuilderPrivate {
	gint _length;
	TrackerSparqlBuilderState* states;
	gint states_length1;
	gint _states_size_;
	GString* str;
};


static gpointer tracker_sparql_builder_parent_class = NULL;

GType tracker_sparql_builder_get_type (void) G_GNUC_CONST;
GType tracker_sparql_builder_state_get_type (void) G_GNUC_CONST;
#define TRACKER_SPARQL_BUILDER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_TYPE_SPARQL_BUILDER, TrackerSparqlBuilderPrivate))
enum  {
	TRACKER_SPARQL_BUILDER_DUMMY_PROPERTY,
	TRACKER_SPARQL_BUILDER_RESULT,
	TRACKER_SPARQL_BUILDER_LENGTH,
	TRACKER_SPARQL_BUILDER_STATE
};
TrackerSparqlBuilder* tracker_sparql_builder_new_update (void);
TrackerSparqlBuilder* tracker_sparql_builder_construct_update (GType object_type);
static void _vala_array_add1 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
TrackerSparqlBuilder* tracker_sparql_builder_new_embedded_insert (void);
TrackerSparqlBuilder* tracker_sparql_builder_construct_embedded_insert (GType object_type);
static void _vala_array_add2 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
static void _vala_array_add3 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
static void _vala_array_add4 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
void tracker_sparql_builder_drop_graph (TrackerSparqlBuilder* self, const gchar* iri);
TrackerSparqlBuilderState tracker_sparql_builder_get_state (TrackerSparqlBuilder* self);
void tracker_sparql_builder_insert_open (TrackerSparqlBuilder* self, const gchar* graph);
static void _vala_array_add5 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
void tracker_sparql_builder_insert_silent_open (TrackerSparqlBuilder* self, const gchar* graph);
static void _vala_array_add6 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
void tracker_sparql_builder_insert_close (TrackerSparqlBuilder* self);
void tracker_sparql_builder_delete_open (TrackerSparqlBuilder* self, const gchar* graph);
static void _vala_array_add7 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
void tracker_sparql_builder_delete_close (TrackerSparqlBuilder* self);
void tracker_sparql_builder_where_open (TrackerSparqlBuilder* self);
static void _vala_array_add8 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
void tracker_sparql_builder_where_close (TrackerSparqlBuilder* self);
void tracker_sparql_builder_subject_variable (TrackerSparqlBuilder* self, const gchar* var_name);
void tracker_sparql_builder_subject (TrackerSparqlBuilder* self, const gchar* s);
void tracker_sparql_builder_object_variable (TrackerSparqlBuilder* self, const gchar* var_name);
void tracker_sparql_builder_object (TrackerSparqlBuilder* self, const gchar* s);
void tracker_sparql_builder_subject_iri (TrackerSparqlBuilder* self, const gchar* iri);
static void _vala_array_add9 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
void tracker_sparql_builder_predicate_iri (TrackerSparqlBuilder* self, const gchar* iri);
void tracker_sparql_builder_predicate (TrackerSparqlBuilder* self, const gchar* s);
static void _vala_array_add10 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
void tracker_sparql_builder_object_iri (TrackerSparqlBuilder* self, const gchar* iri);
static void _vala_array_add11 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
gint tracker_sparql_builder_get_length (TrackerSparqlBuilder* self);
static void tracker_sparql_builder_set_length (TrackerSparqlBuilder* self, gint value);
void tracker_sparql_builder_object_string (TrackerSparqlBuilder* self, const gchar* literal);
static void _vala_array_add12 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
void tracker_sparql_builder_object_unvalidated (TrackerSparqlBuilder* self, const gchar* value);
void tracker_sparql_builder_object_boolean (TrackerSparqlBuilder* self, gboolean literal);
void tracker_sparql_builder_object_int64 (TrackerSparqlBuilder* self, gint64 literal);
void tracker_sparql_builder_object_date (TrackerSparqlBuilder* self, time_t* literal);
void tracker_sparql_builder_object_double (TrackerSparqlBuilder* self, gdouble literal);
void tracker_sparql_builder_object_blank_open (TrackerSparqlBuilder* self);
static void _vala_array_add13 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
void tracker_sparql_builder_object_blank_close (TrackerSparqlBuilder* self);
static void _vala_array_add14 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value);
void tracker_sparql_builder_prepend (TrackerSparqlBuilder* self, const gchar* raw);
void tracker_sparql_builder_append (TrackerSparqlBuilder* self, const gchar* raw);
TrackerSparqlBuilder* tracker_sparql_builder_new (void);
TrackerSparqlBuilder* tracker_sparql_builder_construct (GType object_type);
const gchar* tracker_sparql_builder_get_result (TrackerSparqlBuilder* self);
static void tracker_sparql_builder_finalize (GObject* obj);
static void _vala_tracker_sparql_builder_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec);
static void _vala_tracker_sparql_builder_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec);


GType tracker_sparql_builder_state_get_type (void) {
	static volatile gsize tracker_sparql_builder_state_type_id__volatile = 0;
	if (g_once_init_enter (&tracker_sparql_builder_state_type_id__volatile)) {
		static const GEnumValue values[] = {{TRACKER_SPARQL_BUILDER_STATE_UPDATE, "TRACKER_SPARQL_BUILDER_STATE_UPDATE", "update"}, {TRACKER_SPARQL_BUILDER_STATE_INSERT, "TRACKER_SPARQL_BUILDER_STATE_INSERT", "insert"}, {TRACKER_SPARQL_BUILDER_STATE_DELETE, "TRACKER_SPARQL_BUILDER_STATE_DELETE", "delete"}, {TRACKER_SPARQL_BUILDER_STATE_SUBJECT, "TRACKER_SPARQL_BUILDER_STATE_SUBJECT", "subject"}, {TRACKER_SPARQL_BUILDER_STATE_PREDICATE, "TRACKER_SPARQL_BUILDER_STATE_PREDICATE", "predicate"}, {TRACKER_SPARQL_BUILDER_STATE_OBJECT, "TRACKER_SPARQL_BUILDER_STATE_OBJECT", "object"}, {TRACKER_SPARQL_BUILDER_STATE_BLANK, "TRACKER_SPARQL_BUILDER_STATE_BLANK", "blank"}, {TRACKER_SPARQL_BUILDER_STATE_WHERE, "TRACKER_SPARQL_BUILDER_STATE_WHERE", "where"}, {TRACKER_SPARQL_BUILDER_STATE_EMBEDDED_INSERT, "TRACKER_SPARQL_BUILDER_STATE_EMBEDDED_INSERT", "embedded-insert"}, {0, NULL, NULL}};
		GType tracker_sparql_builder_state_type_id;
		tracker_sparql_builder_state_type_id = g_enum_register_static ("TrackerSparqlBuilderState", values);
		g_once_init_leave (&tracker_sparql_builder_state_type_id__volatile, tracker_sparql_builder_state_type_id);
	}
	return tracker_sparql_builder_state_type_id__volatile;
}


static void _vala_array_add1 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
#line 50 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if ((*length) == (*size)) {
#line 50 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 50 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*array = g_renew (TrackerSparqlBuilderState, *array, *size);
#line 163 "tracker-sparql-builder.c"
	}
#line 50 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	(*array)[(*length)++] = value;
#line 167 "tracker-sparql-builder.c"
}


TrackerSparqlBuilder* tracker_sparql_builder_construct_update (GType object_type) {
	TrackerSparqlBuilder * self = NULL;
	TrackerSparqlBuilderState* _tmp0_;
	gint _tmp0__length1;
#line 49 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	self = (TrackerSparqlBuilder*) g_object_new (object_type, NULL);
#line 50 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = self->priv->states;
#line 50 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0__length1 = self->priv->states_length1;
#line 50 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_vala_array_add1 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_UPDATE);
#line 49 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	return self;
#line 185 "tracker-sparql-builder.c"
}


TrackerSparqlBuilder* tracker_sparql_builder_new_update (void) {
#line 49 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	return tracker_sparql_builder_construct_update (TRACKER_TYPE_SPARQL_BUILDER);
#line 192 "tracker-sparql-builder.c"
}


static void _vala_array_add2 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
#line 54 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if ((*length) == (*size)) {
#line 54 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 54 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*array = g_renew (TrackerSparqlBuilderState, *array, *size);
#line 203 "tracker-sparql-builder.c"
	}
#line 54 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	(*array)[(*length)++] = value;
#line 207 "tracker-sparql-builder.c"
}


static void _vala_array_add3 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
#line 55 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if ((*length) == (*size)) {
#line 55 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 55 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*array = g_renew (TrackerSparqlBuilderState, *array, *size);
#line 218 "tracker-sparql-builder.c"
	}
#line 55 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	(*array)[(*length)++] = value;
#line 222 "tracker-sparql-builder.c"
}


static void _vala_array_add4 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
#line 56 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if ((*length) == (*size)) {
#line 56 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 56 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*array = g_renew (TrackerSparqlBuilderState, *array, *size);
#line 233 "tracker-sparql-builder.c"
	}
#line 56 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	(*array)[(*length)++] = value;
#line 237 "tracker-sparql-builder.c"
}


TrackerSparqlBuilder* tracker_sparql_builder_construct_embedded_insert (GType object_type) {
	TrackerSparqlBuilder * self = NULL;
	TrackerSparqlBuilderState* _tmp0_;
	gint _tmp0__length1;
	TrackerSparqlBuilderState* _tmp1_;
	gint _tmp1__length1;
	TrackerSparqlBuilderState* _tmp2_;
	gint _tmp2__length1;
#line 53 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	self = (TrackerSparqlBuilder*) g_object_new (object_type, NULL);
#line 54 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = self->priv->states;
#line 54 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0__length1 = self->priv->states_length1;
#line 54 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_vala_array_add2 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_EMBEDDED_INSERT);
#line 55 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = self->priv->states;
#line 55 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1__length1 = self->priv->states_length1;
#line 55 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_vala_array_add3 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_INSERT);
#line 56 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = self->priv->states;
#line 56 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2__length1 = self->priv->states_length1;
#line 56 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_vala_array_add4 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_SUBJECT);
#line 53 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	return self;
#line 271 "tracker-sparql-builder.c"
}


TrackerSparqlBuilder* tracker_sparql_builder_new_embedded_insert (void) {
#line 53 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	return tracker_sparql_builder_construct_embedded_insert (TRACKER_TYPE_SPARQL_BUILDER);
#line 278 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_drop_graph (TrackerSparqlBuilder* self, const gchar* iri) {
	TrackerSparqlBuilderState _tmp0_;
	TrackerSparqlBuilderState _tmp1_;
	GString* _tmp2_;
	const gchar* _tmp3_;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_;
#line 59 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 59 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (iri != NULL);
#line 59 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = tracker_sparql_builder_get_state (self);
#line 59 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = _tmp0_;
#line 59 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_UPDATE);
#line 62 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = self->priv->str;
#line 62 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp3_ = iri;
#line 62 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp4_ = g_strdup_printf ("DROP GRAPH <%s>\n", _tmp3_);
#line 62 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp5_ = _tmp4_;
#line 62 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_string_append (_tmp2_, _tmp5_);
#line 62 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_g_free0 (_tmp5_);
#line 311 "tracker-sparql-builder.c"
}


static void _vala_array_add5 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
#line 68 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if ((*length) == (*size)) {
#line 68 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 68 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*array = g_renew (TrackerSparqlBuilderState, *array, *size);
#line 322 "tracker-sparql-builder.c"
	}
#line 68 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	(*array)[(*length)++] = value;
#line 326 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_insert_open (TrackerSparqlBuilder* self, const gchar* graph) {
	TrackerSparqlBuilderState _tmp0_;
	TrackerSparqlBuilderState _tmp1_;
	TrackerSparqlBuilderState* _tmp2_;
	gint _tmp2__length1;
	const gchar* _tmp3_;
#line 65 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 65 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = tracker_sparql_builder_get_state (self);
#line 65 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = _tmp0_;
#line 65 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_UPDATE);
#line 68 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = self->priv->states;
#line 68 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2__length1 = self->priv->states_length1;
#line 68 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_vala_array_add5 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_INSERT);
#line 69 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp3_ = graph;
#line 69 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if (_tmp3_ != NULL) {
#line 354 "tracker-sparql-builder.c"
		GString* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_;
#line 70 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp4_ = self->priv->str;
#line 70 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp5_ = graph;
#line 70 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp6_ = g_strdup_printf ("INSERT INTO <%s> {\n", _tmp5_);
#line 70 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp7_ = _tmp6_;
#line 70 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		g_string_append (_tmp4_, _tmp7_);
#line 70 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_g_free0 (_tmp7_);
#line 371 "tracker-sparql-builder.c"
	} else {
		GString* _tmp8_;
#line 72 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp8_ = self->priv->str;
#line 72 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		g_string_append (_tmp8_, "INSERT {\n");
#line 378 "tracker-sparql-builder.c"
	}
}


static void _vala_array_add6 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
#line 78 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if ((*length) == (*size)) {
#line 78 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 78 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*array = g_renew (TrackerSparqlBuilderState, *array, *size);
#line 390 "tracker-sparql-builder.c"
	}
#line 78 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	(*array)[(*length)++] = value;
#line 394 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_insert_silent_open (TrackerSparqlBuilder* self, const gchar* graph) {
	TrackerSparqlBuilderState _tmp0_;
	TrackerSparqlBuilderState _tmp1_;
	TrackerSparqlBuilderState* _tmp2_;
	gint _tmp2__length1;
	const gchar* _tmp3_;
#line 75 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 75 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = tracker_sparql_builder_get_state (self);
#line 75 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = _tmp0_;
#line 75 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_UPDATE);
#line 78 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = self->priv->states;
#line 78 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2__length1 = self->priv->states_length1;
#line 78 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_vala_array_add6 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_INSERT);
#line 79 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp3_ = graph;
#line 79 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if (_tmp3_ != NULL) {
#line 422 "tracker-sparql-builder.c"
		GString* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_;
#line 80 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp4_ = self->priv->str;
#line 80 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp5_ = graph;
#line 80 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp6_ = g_strdup_printf ("INSERT SILENT INTO <%s> {\n", _tmp5_);
#line 80 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp7_ = _tmp6_;
#line 80 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		g_string_append (_tmp4_, _tmp7_);
#line 80 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_g_free0 (_tmp7_);
#line 439 "tracker-sparql-builder.c"
	} else {
		GString* _tmp8_;
#line 82 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp8_ = self->priv->str;
#line 82 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		g_string_append (_tmp8_, "INSERT SILENT {\n");
#line 446 "tracker-sparql-builder.c"
	}
}


void tracker_sparql_builder_insert_close (TrackerSparqlBuilder* self) {
	TrackerSparqlBuilderState _tmp0_;
	TrackerSparqlBuilderState _tmp1_;
	TrackerSparqlBuilderState _tmp2_;
	TrackerSparqlBuilderState _tmp3_;
	TrackerSparqlBuilderState _tmp4_;
	TrackerSparqlBuilderState _tmp5_;
	gint _tmp8_;
	TrackerSparqlBuilderState _tmp9_;
	TrackerSparqlBuilderState _tmp10_;
#line 85 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 85 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = tracker_sparql_builder_get_state (self);
#line 85 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = _tmp0_;
#line 85 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = tracker_sparql_builder_get_state (self);
#line 85 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp3_ = _tmp2_;
#line 85 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail ((_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_INSERT) || (_tmp3_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT));
#line 88 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp4_ = tracker_sparql_builder_get_state (self);
#line 88 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp5_ = _tmp4_;
#line 88 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if (_tmp5_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT) {
#line 479 "tracker-sparql-builder.c"
		GString* _tmp6_;
		gint _tmp7_;
#line 89 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp6_ = self->priv->str;
#line 89 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		g_string_append (_tmp6_, " .\n");
#line 90 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		self->priv->states_length1 = self->priv->states_length1 - 3;
#line 90 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp7_ = self->priv->states_length1;
#line 490 "tracker-sparql-builder.c"
	}
#line 92 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp8_ = self->priv->states_length1;
#line 92 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	self->priv->states_length1 = _tmp8_ - 1;
#line 94 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp9_ = tracker_sparql_builder_get_state (self);
#line 94 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp10_ = _tmp9_;
#line 94 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if (_tmp10_ != TRACKER_SPARQL_BUILDER_STATE_EMBEDDED_INSERT) {
#line 502 "tracker-sparql-builder.c"
		GString* _tmp11_;
#line 95 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp11_ = self->priv->str;
#line 95 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		g_string_append (_tmp11_, "}\n");
#line 508 "tracker-sparql-builder.c"
	}
}


static void _vala_array_add7 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
#line 102 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if ((*length) == (*size)) {
#line 102 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 102 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*array = g_renew (TrackerSparqlBuilderState, *array, *size);
#line 520 "tracker-sparql-builder.c"
	}
#line 102 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	(*array)[(*length)++] = value;
#line 524 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_delete_open (TrackerSparqlBuilder* self, const gchar* graph) {
	TrackerSparqlBuilderState _tmp0_;
	TrackerSparqlBuilderState _tmp1_;
	TrackerSparqlBuilderState* _tmp2_;
	gint _tmp2__length1;
	const gchar* _tmp3_;
#line 99 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 99 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = tracker_sparql_builder_get_state (self);
#line 99 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = _tmp0_;
#line 99 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_UPDATE);
#line 102 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = self->priv->states;
#line 102 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2__length1 = self->priv->states_length1;
#line 102 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_vala_array_add7 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_DELETE);
#line 103 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp3_ = graph;
#line 103 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if (_tmp3_ != NULL) {
#line 552 "tracker-sparql-builder.c"
		GString* _tmp4_;
		const gchar* _tmp5_;
		gchar* _tmp6_ = NULL;
		gchar* _tmp7_;
#line 104 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp4_ = self->priv->str;
#line 104 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp5_ = graph;
#line 104 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp6_ = g_strdup_printf ("DELETE FROM <%s> {\n", _tmp5_);
#line 104 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp7_ = _tmp6_;
#line 104 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		g_string_append (_tmp4_, _tmp7_);
#line 104 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_g_free0 (_tmp7_);
#line 569 "tracker-sparql-builder.c"
	} else {
		GString* _tmp8_;
#line 106 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp8_ = self->priv->str;
#line 106 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		g_string_append (_tmp8_, "DELETE {\n");
#line 576 "tracker-sparql-builder.c"
	}
}


void tracker_sparql_builder_delete_close (TrackerSparqlBuilder* self) {
	TrackerSparqlBuilderState _tmp0_;
	TrackerSparqlBuilderState _tmp1_;
	TrackerSparqlBuilderState _tmp2_;
	TrackerSparqlBuilderState _tmp3_;
	TrackerSparqlBuilderState _tmp4_;
	TrackerSparqlBuilderState _tmp5_;
	gint _tmp8_;
	GString* _tmp9_;
#line 109 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 109 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = tracker_sparql_builder_get_state (self);
#line 109 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = _tmp0_;
#line 109 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = tracker_sparql_builder_get_state (self);
#line 109 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp3_ = _tmp2_;
#line 109 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail ((_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_DELETE) || (_tmp3_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT));
#line 112 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp4_ = tracker_sparql_builder_get_state (self);
#line 112 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp5_ = _tmp4_;
#line 112 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if (_tmp5_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT) {
#line 608 "tracker-sparql-builder.c"
		GString* _tmp6_;
		gint _tmp7_;
#line 113 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp6_ = self->priv->str;
#line 113 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		g_string_append (_tmp6_, " .\n");
#line 114 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		self->priv->states_length1 = self->priv->states_length1 - 3;
#line 114 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp7_ = self->priv->states_length1;
#line 619 "tracker-sparql-builder.c"
	}
#line 116 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp8_ = self->priv->states_length1;
#line 116 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	self->priv->states_length1 = _tmp8_ - 1;
#line 118 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp9_ = self->priv->str;
#line 118 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_string_append (_tmp9_, "}\n");
#line 629 "tracker-sparql-builder.c"
}


static void _vala_array_add8 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
#line 124 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if ((*length) == (*size)) {
#line 124 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 124 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*array = g_renew (TrackerSparqlBuilderState, *array, *size);
#line 640 "tracker-sparql-builder.c"
	}
#line 124 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	(*array)[(*length)++] = value;
#line 644 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_where_open (TrackerSparqlBuilder* self) {
	TrackerSparqlBuilderState _tmp0_;
	TrackerSparqlBuilderState _tmp1_;
	TrackerSparqlBuilderState* _tmp2_;
	gint _tmp2__length1;
	GString* _tmp3_;
#line 121 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 121 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = tracker_sparql_builder_get_state (self);
#line 121 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = _tmp0_;
#line 121 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_UPDATE);
#line 124 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = self->priv->states;
#line 124 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2__length1 = self->priv->states_length1;
#line 124 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_vala_array_add8 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_WHERE);
#line 125 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp3_ = self->priv->str;
#line 125 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_string_append (_tmp3_, "WHERE {\n");
#line 672 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_where_close (TrackerSparqlBuilder* self) {
	TrackerSparqlBuilderState _tmp0_;
	TrackerSparqlBuilderState _tmp1_;
	TrackerSparqlBuilderState _tmp2_;
	TrackerSparqlBuilderState _tmp3_;
	TrackerSparqlBuilderState _tmp4_;
	TrackerSparqlBuilderState _tmp5_;
	gint _tmp8_;
	GString* _tmp9_;
#line 128 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 128 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = tracker_sparql_builder_get_state (self);
#line 128 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = _tmp0_;
#line 128 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = tracker_sparql_builder_get_state (self);
#line 128 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp3_ = _tmp2_;
#line 128 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail ((_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_WHERE) || (_tmp3_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT));
#line 131 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp4_ = tracker_sparql_builder_get_state (self);
#line 131 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp5_ = _tmp4_;
#line 131 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if (_tmp5_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT) {
#line 703 "tracker-sparql-builder.c"
		GString* _tmp6_;
		gint _tmp7_;
#line 132 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp6_ = self->priv->str;
#line 132 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		g_string_append (_tmp6_, " .\n");
#line 133 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		self->priv->states_length1 = self->priv->states_length1 - 3;
#line 133 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp7_ = self->priv->states_length1;
#line 714 "tracker-sparql-builder.c"
	}
#line 135 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp8_ = self->priv->states_length1;
#line 135 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	self->priv->states_length1 = _tmp8_ - 1;
#line 136 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp9_ = self->priv->str;
#line 136 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_string_append (_tmp9_, "}\n");
#line 724 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_subject_variable (TrackerSparqlBuilder* self, const gchar* var_name) {
	const gchar* _tmp0_;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_;
#line 139 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 139 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (var_name != NULL);
#line 140 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = var_name;
#line 140 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = g_strdup_printf ("?%s", _tmp0_);
#line 140 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = _tmp1_;
#line 140 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	tracker_sparql_builder_subject (self, _tmp2_);
#line 140 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_g_free0 (_tmp2_);
#line 746 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_object_variable (TrackerSparqlBuilder* self, const gchar* var_name) {
	const gchar* _tmp0_;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_;
#line 143 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 143 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (var_name != NULL);
#line 144 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = var_name;
#line 144 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = g_strdup_printf ("?%s", _tmp0_);
#line 144 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = _tmp1_;
#line 144 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	tracker_sparql_builder_object (self, _tmp2_);
#line 144 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_g_free0 (_tmp2_);
#line 768 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_subject_iri (TrackerSparqlBuilder* self, const gchar* iri) {
	const gchar* _tmp0_;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_;
#line 147 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 147 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (iri != NULL);
#line 148 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = iri;
#line 148 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = g_strdup_printf ("<%s>", _tmp0_);
#line 148 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = _tmp1_;
#line 148 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	tracker_sparql_builder_subject (self, _tmp2_);
#line 148 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_g_free0 (_tmp2_);
#line 790 "tracker-sparql-builder.c"
}


static void _vala_array_add9 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
#line 159 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if ((*length) == (*size)) {
#line 159 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 159 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*array = g_renew (TrackerSparqlBuilderState, *array, *size);
#line 801 "tracker-sparql-builder.c"
	}
#line 159 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	(*array)[(*length)++] = value;
#line 805 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_subject (TrackerSparqlBuilder* self, const gchar* s) {
	TrackerSparqlBuilderState _tmp0_;
	TrackerSparqlBuilderState _tmp1_;
	TrackerSparqlBuilderState _tmp2_;
	TrackerSparqlBuilderState _tmp3_;
	TrackerSparqlBuilderState _tmp4_;
	TrackerSparqlBuilderState _tmp5_;
	TrackerSparqlBuilderState _tmp6_;
	TrackerSparqlBuilderState _tmp7_;
	TrackerSparqlBuilderState _tmp8_;
	TrackerSparqlBuilderState _tmp9_;
	TrackerSparqlBuilderState _tmp10_;
	TrackerSparqlBuilderState _tmp11_;
	GString* _tmp14_;
	const gchar* _tmp15_;
	TrackerSparqlBuilderState* _tmp16_;
	gint _tmp16__length1;
#line 151 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 151 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (s != NULL);
#line 151 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = tracker_sparql_builder_get_state (self);
#line 151 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = _tmp0_;
#line 151 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = tracker_sparql_builder_get_state (self);
#line 151 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp3_ = _tmp2_;
#line 151 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp4_ = tracker_sparql_builder_get_state (self);
#line 151 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp5_ = _tmp4_;
#line 151 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp6_ = tracker_sparql_builder_get_state (self);
#line 151 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp7_ = _tmp6_;
#line 151 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp8_ = tracker_sparql_builder_get_state (self);
#line 151 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp9_ = _tmp8_;
#line 151 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (((((_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_INSERT) || (_tmp3_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT)) || (_tmp5_ == TRACKER_SPARQL_BUILDER_STATE_EMBEDDED_INSERT)) || (_tmp7_ == TRACKER_SPARQL_BUILDER_STATE_DELETE)) || (_tmp9_ == TRACKER_SPARQL_BUILDER_STATE_WHERE));
#line 154 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp10_ = tracker_sparql_builder_get_state (self);
#line 154 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp11_ = _tmp10_;
#line 154 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if (_tmp11_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT) {
#line 858 "tracker-sparql-builder.c"
		GString* _tmp12_;
		gint _tmp13_;
#line 155 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp12_ = self->priv->str;
#line 155 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		g_string_append (_tmp12_, " .\n");
#line 156 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		self->priv->states_length1 = self->priv->states_length1 - 3;
#line 156 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp13_ = self->priv->states_length1;
#line 869 "tracker-sparql-builder.c"
	}
#line 158 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp14_ = self->priv->str;
#line 158 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp15_ = s;
#line 158 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_string_append (_tmp14_, _tmp15_);
#line 159 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp16_ = self->priv->states;
#line 159 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp16__length1 = self->priv->states_length1;
#line 159 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_vala_array_add9 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_SUBJECT);
#line 883 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_predicate_iri (TrackerSparqlBuilder* self, const gchar* iri) {
	const gchar* _tmp0_;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_;
#line 162 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 162 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (iri != NULL);
#line 163 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = iri;
#line 163 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = g_strdup_printf ("<%s>", _tmp0_);
#line 163 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = _tmp1_;
#line 163 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	tracker_sparql_builder_predicate (self, _tmp2_);
#line 163 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_g_free0 (_tmp2_);
#line 905 "tracker-sparql-builder.c"
}


static void _vala_array_add10 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
#line 175 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if ((*length) == (*size)) {
#line 175 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 175 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*array = g_renew (TrackerSparqlBuilderState, *array, *size);
#line 916 "tracker-sparql-builder.c"
	}
#line 175 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	(*array)[(*length)++] = value;
#line 920 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_predicate (TrackerSparqlBuilder* self, const gchar* s) {
	TrackerSparqlBuilderState _tmp0_;
	TrackerSparqlBuilderState _tmp1_;
	TrackerSparqlBuilderState _tmp2_;
	TrackerSparqlBuilderState _tmp3_;
	TrackerSparqlBuilderState _tmp4_;
	TrackerSparqlBuilderState _tmp5_;
	TrackerSparqlBuilderState _tmp6_;
	TrackerSparqlBuilderState _tmp7_;
	GString* _tmp10_;
	GString* _tmp11_;
	const gchar* _tmp12_;
	TrackerSparqlBuilderState* _tmp13_;
	gint _tmp13__length1;
#line 166 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 166 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (s != NULL);
#line 166 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = tracker_sparql_builder_get_state (self);
#line 166 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = _tmp0_;
#line 166 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = tracker_sparql_builder_get_state (self);
#line 166 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp3_ = _tmp2_;
#line 166 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp4_ = tracker_sparql_builder_get_state (self);
#line 166 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp5_ = _tmp4_;
#line 166 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (((_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_SUBJECT) || (_tmp3_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT)) || (_tmp5_ == TRACKER_SPARQL_BUILDER_STATE_BLANK));
#line 169 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp6_ = tracker_sparql_builder_get_state (self);
#line 169 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp7_ = _tmp6_;
#line 169 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if (_tmp7_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT) {
#line 962 "tracker-sparql-builder.c"
		GString* _tmp8_;
		gint _tmp9_;
#line 170 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp8_ = self->priv->str;
#line 170 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		g_string_append (_tmp8_, " ;\n\t");
#line 171 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		self->priv->states_length1 = self->priv->states_length1 - 2;
#line 171 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp9_ = self->priv->states_length1;
#line 973 "tracker-sparql-builder.c"
	}
#line 173 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp10_ = self->priv->str;
#line 173 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_string_append (_tmp10_, " ");
#line 174 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp11_ = self->priv->str;
#line 174 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp12_ = s;
#line 174 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_string_append (_tmp11_, _tmp12_);
#line 175 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp13_ = self->priv->states;
#line 175 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp13__length1 = self->priv->states_length1;
#line 175 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_vala_array_add10 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_PREDICATE);
#line 991 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_object_iri (TrackerSparqlBuilder* self, const gchar* iri) {
	const gchar* _tmp0_;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_;
#line 178 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 178 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (iri != NULL);
#line 179 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = iri;
#line 179 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = g_strdup_printf ("<%s>", _tmp0_);
#line 179 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = _tmp1_;
#line 179 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	tracker_sparql_builder_object (self, _tmp2_);
#line 179 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_g_free0 (_tmp2_);
#line 1013 "tracker-sparql-builder.c"
}


static void _vala_array_add11 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
#line 191 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if ((*length) == (*size)) {
#line 191 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 191 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*array = g_renew (TrackerSparqlBuilderState, *array, *size);
#line 1024 "tracker-sparql-builder.c"
	}
#line 191 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	(*array)[(*length)++] = value;
#line 1028 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_object (TrackerSparqlBuilder* self, const gchar* s) {
	TrackerSparqlBuilderState _tmp0_;
	TrackerSparqlBuilderState _tmp1_;
	TrackerSparqlBuilderState _tmp2_;
	TrackerSparqlBuilderState _tmp3_;
	TrackerSparqlBuilderState _tmp4_;
	TrackerSparqlBuilderState _tmp5_;
	GString* _tmp8_;
	GString* _tmp9_;
	const gchar* _tmp10_;
	TrackerSparqlBuilderState* _tmp11_;
	gint _tmp11__length1;
	gint _tmp12_;
#line 182 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 182 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (s != NULL);
#line 182 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = tracker_sparql_builder_get_state (self);
#line 182 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = _tmp0_;
#line 182 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = tracker_sparql_builder_get_state (self);
#line 182 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp3_ = _tmp2_;
#line 182 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail ((_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_PREDICATE) || (_tmp3_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT));
#line 185 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp4_ = tracker_sparql_builder_get_state (self);
#line 185 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp5_ = _tmp4_;
#line 185 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if (_tmp5_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT) {
#line 1065 "tracker-sparql-builder.c"
		GString* _tmp6_;
		gint _tmp7_;
#line 186 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp6_ = self->priv->str;
#line 186 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		g_string_append (_tmp6_, " ,");
#line 187 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp7_ = self->priv->states_length1;
#line 187 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		self->priv->states_length1 = _tmp7_ - 1;
#line 1076 "tracker-sparql-builder.c"
	}
#line 189 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp8_ = self->priv->str;
#line 189 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_string_append (_tmp8_, " ");
#line 190 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp9_ = self->priv->str;
#line 190 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp10_ = s;
#line 190 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_string_append (_tmp9_, _tmp10_);
#line 191 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp11_ = self->priv->states;
#line 191 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp11__length1 = self->priv->states_length1;
#line 191 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_vala_array_add11 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_OBJECT);
#line 193 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp12_ = self->priv->_length;
#line 193 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	tracker_sparql_builder_set_length (self, _tmp12_ + 1);
#line 1098 "tracker-sparql-builder.c"
}


static void _vala_array_add12 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
#line 235 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if ((*length) == (*size)) {
#line 235 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 235 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*array = g_renew (TrackerSparqlBuilderState, *array, *size);
#line 1109 "tracker-sparql-builder.c"
	}
#line 235 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	(*array)[(*length)++] = value;
#line 1113 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_object_string (TrackerSparqlBuilder* self, const gchar* literal) {
	TrackerSparqlBuilderState _tmp0_;
	TrackerSparqlBuilderState _tmp1_;
	TrackerSparqlBuilderState _tmp2_;
	TrackerSparqlBuilderState _tmp3_;
	TrackerSparqlBuilderState _tmp4_;
	TrackerSparqlBuilderState _tmp5_;
	GString* _tmp8_;
	const gchar* _tmp9_;
	gchar* p;
	GString* _tmp25_;
	TrackerSparqlBuilderState* _tmp26_;
	gint _tmp26__length1;
	gint _tmp27_;
#line 196 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 196 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (literal != NULL);
#line 196 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = tracker_sparql_builder_get_state (self);
#line 196 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = _tmp0_;
#line 196 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = tracker_sparql_builder_get_state (self);
#line 196 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp3_ = _tmp2_;
#line 196 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail ((_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_PREDICATE) || (_tmp3_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT));
#line 199 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp4_ = tracker_sparql_builder_get_state (self);
#line 199 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp5_ = _tmp4_;
#line 199 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if (_tmp5_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT) {
#line 1151 "tracker-sparql-builder.c"
		GString* _tmp6_;
		gint _tmp7_;
#line 200 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp6_ = self->priv->str;
#line 200 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		g_string_append (_tmp6_, " ,");
#line 201 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp7_ = self->priv->states_length1;
#line 201 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		self->priv->states_length1 = _tmp7_ - 1;
#line 1162 "tracker-sparql-builder.c"
	}
#line 204 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp8_ = self->priv->str;
#line 204 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_string_append (_tmp8_, " \"");
#line 206 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp9_ = literal;
#line 206 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	p = _tmp9_;
#line 207 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	while (TRUE) {
#line 1174 "tracker-sparql-builder.c"
		gchar* _tmp10_;
		gchar* _tmp11_;
		gsize _tmp12_ = 0UL;
		gsize len;
		GString* _tmp13_;
		gchar* _tmp14_;
		gsize _tmp15_;
		gchar* _tmp16_;
		gsize _tmp17_;
		gchar* _tmp18_;
		gchar* _tmp24_;
#line 207 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp10_ = p;
#line 207 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		if (!((*_tmp10_) != '\0')) {
#line 207 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
			break;
#line 1192 "tracker-sparql-builder.c"
		}
#line 208 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp11_ = p;
#line 208 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp12_ = strcspn ((const gchar*) _tmp11_, "\t\n\r\"\\");
#line 208 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		len = _tmp12_;
#line 209 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp13_ = self->priv->str;
#line 209 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp14_ = p;
#line 209 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp15_ = len;
#line 209 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		g_string_append_len (_tmp13_, (const gchar*) _tmp14_, (gssize) ((glong) _tmp15_));
#line 210 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp16_ = p;
#line 210 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp17_ = len;
#line 210 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		p = _tmp16_ + _tmp17_;
#line 211 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp18_ = p;
#line 211 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		switch (*_tmp18_) {
#line 211 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
			case '\t':
#line 1220 "tracker-sparql-builder.c"
			{
				GString* _tmp19_;
#line 213 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
				_tmp19_ = self->priv->str;
#line 213 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
				g_string_append (_tmp19_, "\\t");
#line 214 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
				break;
#line 1229 "tracker-sparql-builder.c"
			}
#line 211 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
			case '\n':
#line 1233 "tracker-sparql-builder.c"
			{
				GString* _tmp20_;
#line 216 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
				_tmp20_ = self->priv->str;
#line 216 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
				g_string_append (_tmp20_, "\\n");
#line 217 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
				break;
#line 1242 "tracker-sparql-builder.c"
			}
#line 211 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
			case '\r':
#line 1246 "tracker-sparql-builder.c"
			{
				GString* _tmp21_;
#line 219 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
				_tmp21_ = self->priv->str;
#line 219 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
				g_string_append (_tmp21_, "\\r");
#line 220 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
				break;
#line 1255 "tracker-sparql-builder.c"
			}
#line 211 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
			case '"':
#line 1259 "tracker-sparql-builder.c"
			{
				GString* _tmp22_;
#line 222 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
				_tmp22_ = self->priv->str;
#line 222 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
				g_string_append (_tmp22_, "\\\"");
#line 223 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
				break;
#line 1268 "tracker-sparql-builder.c"
			}
#line 211 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
			case '\\':
#line 1272 "tracker-sparql-builder.c"
			{
				GString* _tmp23_;
#line 225 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
				_tmp23_ = self->priv->str;
#line 225 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
				g_string_append (_tmp23_, "\\\\");
#line 226 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
				break;
#line 1281 "tracker-sparql-builder.c"
			}
			default:
			{
#line 228 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
				continue;
#line 1287 "tracker-sparql-builder.c"
			}
		}
#line 230 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp24_ = p;
#line 230 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		p = _tmp24_ + 1;
#line 1294 "tracker-sparql-builder.c"
	}
#line 233 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp25_ = self->priv->str;
#line 233 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_string_append (_tmp25_, "\"");
#line 235 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp26_ = self->priv->states;
#line 235 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp26__length1 = self->priv->states_length1;
#line 235 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_vala_array_add12 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_OBJECT);
#line 237 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp27_ = self->priv->_length;
#line 237 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	tracker_sparql_builder_set_length (self, _tmp27_ + 1);
#line 1310 "tracker-sparql-builder.c"
}


static glong string_strnlen (gchar* str, glong maxlen) {
	glong result = 0L;
	gchar* _tmp0_;
	glong _tmp1_;
	gchar* _tmp2_ = NULL;
	gchar* end;
	gchar* _tmp3_;
#line 1301 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp0_ = str;
#line 1301 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp1_ = maxlen;
#line 1301 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp2_ = memchr (_tmp0_, 0, (gsize) _tmp1_);
#line 1301 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	end = _tmp2_;
#line 1302 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp3_ = end;
#line 1302 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	if (_tmp3_ == NULL) {
#line 1333 "tracker-sparql-builder.c"
		glong _tmp4_;
#line 1303 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp4_ = maxlen;
#line 1303 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		result = _tmp4_;
#line 1303 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		return result;
#line 1341 "tracker-sparql-builder.c"
	} else {
		gchar* _tmp5_;
		gchar* _tmp6_;
#line 1305 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp5_ = end;
#line 1305 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp6_ = str;
#line 1305 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		result = (glong) (_tmp5_ - _tmp6_);
#line 1305 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		return result;
#line 1353 "tracker-sparql-builder.c"
	}
}


static gchar* string_substring (const gchar* self, glong offset, glong len) {
	gchar* result = NULL;
	glong string_length = 0L;
	gboolean _tmp0_ = FALSE;
	glong _tmp1_;
	gboolean _tmp3_;
	glong _tmp9_;
	glong _tmp15_;
	glong _tmp18_;
	glong _tmp19_;
	glong _tmp20_;
	glong _tmp21_;
	glong _tmp22_;
	gchar* _tmp23_ = NULL;
#line 1312 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, NULL);
#line 1314 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp1_ = offset;
#line 1314 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	if (_tmp1_ >= ((glong) 0)) {
#line 1378 "tracker-sparql-builder.c"
		glong _tmp2_;
#line 1314 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp2_ = len;
#line 1314 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp0_ = _tmp2_ >= ((glong) 0);
#line 1384 "tracker-sparql-builder.c"
	} else {
#line 1314 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp0_ = FALSE;
#line 1388 "tracker-sparql-builder.c"
	}
#line 1314 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp3_ = _tmp0_;
#line 1314 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	if (_tmp3_) {
#line 1394 "tracker-sparql-builder.c"
		glong _tmp4_;
		glong _tmp5_;
		glong _tmp6_ = 0L;
#line 1316 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp4_ = offset;
#line 1316 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp5_ = len;
#line 1316 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp6_ = string_strnlen ((gchar*) self, _tmp4_ + _tmp5_);
#line 1316 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		string_length = _tmp6_;
#line 1406 "tracker-sparql-builder.c"
	} else {
		gint _tmp7_;
		gint _tmp8_;
#line 1318 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp7_ = strlen (self);
#line 1318 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp8_ = _tmp7_;
#line 1318 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		string_length = (glong) _tmp8_;
#line 1416 "tracker-sparql-builder.c"
	}
#line 1321 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp9_ = offset;
#line 1321 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	if (_tmp9_ < ((glong) 0)) {
#line 1422 "tracker-sparql-builder.c"
		glong _tmp10_;
		glong _tmp11_;
		glong _tmp12_;
#line 1322 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp10_ = string_length;
#line 1322 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp11_ = offset;
#line 1322 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		offset = _tmp10_ + _tmp11_;
#line 1323 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp12_ = offset;
#line 1323 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp12_ >= ((glong) 0), NULL);
#line 1436 "tracker-sparql-builder.c"
	} else {
		glong _tmp13_;
		glong _tmp14_;
#line 1325 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp13_ = offset;
#line 1325 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp14_ = string_length;
#line 1325 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		g_return_val_if_fail (_tmp13_ <= _tmp14_, NULL);
#line 1446 "tracker-sparql-builder.c"
	}
#line 1327 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp15_ = len;
#line 1327 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	if (_tmp15_ < ((glong) 0)) {
#line 1452 "tracker-sparql-builder.c"
		glong _tmp16_;
		glong _tmp17_;
#line 1328 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp16_ = string_length;
#line 1328 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		_tmp17_ = offset;
#line 1328 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
		len = _tmp16_ - _tmp17_;
#line 1461 "tracker-sparql-builder.c"
	}
#line 1330 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp18_ = offset;
#line 1330 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp19_ = len;
#line 1330 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp20_ = string_length;
#line 1330 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	g_return_val_if_fail ((_tmp18_ + _tmp19_) <= _tmp20_, NULL);
#line 1331 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp21_ = offset;
#line 1331 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp22_ = len;
#line 1331 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp23_ = g_strndup (((gchar*) self) + _tmp21_, (gsize) _tmp22_);
#line 1331 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	result = _tmp23_;
#line 1331 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	return result;
#line 1481 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_object_unvalidated (TrackerSparqlBuilder* self, const gchar* value) {
	gchar* end = NULL;
	const gchar* _tmp0_;
	gchar* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	const gchar* _tmp10_;
#line 240 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 240 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (value != NULL);
#line 243 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = value;
#line 243 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = g_utf8_validate (_tmp0_, (gssize) (-1), &_tmp1_);
#line 243 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	end = _tmp1_;
#line 243 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if (!_tmp2_) {
#line 1503 "tracker-sparql-builder.c"
		const gchar* _tmp3_;
		gchar* _tmp4_;
#line 244 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp3_ = value;
#line 244 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp4_ = end;
#line 244 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		if (_tmp3_ != _tmp4_) {
#line 1512 "tracker-sparql-builder.c"
			const gchar* _tmp5_;
			gchar* _tmp6_;
			const gchar* _tmp7_;
			gchar* _tmp8_ = NULL;
			gchar* _tmp9_;
#line 245 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
			_tmp5_ = value;
#line 245 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
			_tmp6_ = end;
#line 245 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
			_tmp7_ = value;
#line 245 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
			_tmp8_ = string_substring (_tmp5_, (glong) 0, (glong) (_tmp6_ - ((gchar*) _tmp7_)));
#line 245 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
			_tmp9_ = _tmp8_;
#line 245 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
			tracker_sparql_builder_object_string (self, _tmp9_);
#line 245 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
			_g_free0 (_tmp9_);
#line 1532 "tracker-sparql-builder.c"
		} else {
#line 247 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
			tracker_sparql_builder_object_string (self, "(invalid data)");
#line 1536 "tracker-sparql-builder.c"
		}
#line 250 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		return;
#line 1540 "tracker-sparql-builder.c"
	}
#line 253 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp10_ = value;
#line 253 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	tracker_sparql_builder_object_string (self, _tmp10_);
#line 1546 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_object_boolean (TrackerSparqlBuilder* self, gboolean literal) {
	const gchar* _tmp0_ = NULL;
	gboolean _tmp1_;
	const gchar* _tmp2_;
#line 256 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 257 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = literal;
#line 257 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if (_tmp1_) {
#line 257 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp0_ = "true";
#line 1562 "tracker-sparql-builder.c"
	} else {
#line 257 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp0_ = "false";
#line 1566 "tracker-sparql-builder.c"
	}
#line 257 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = _tmp0_;
#line 257 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	tracker_sparql_builder_object (self, _tmp2_);
#line 1572 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_object_int64 (TrackerSparqlBuilder* self, gint64 literal) {
	gint64 _tmp0_;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_;
#line 260 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 261 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = literal;
#line 261 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = g_strdup_printf ("%" G_GINT64_FORMAT, _tmp0_);
#line 261 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = _tmp1_;
#line 261 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	tracker_sparql_builder_object (self, _tmp2_);
#line 261 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_g_free0 (_tmp2_);
#line 1592 "tracker-sparql-builder.c"
}


static void g_time_gm (time_t time, struct tm* result) {
	struct tm _result_ = {0};
	struct tm _tmp0_ = {0};
#line 2431 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	gmtime_r (&time, &_tmp0_);
#line 2431 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_result_ = _tmp0_;
#line 2432 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	*result = _result_;
#line 2432 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	return;
#line 1607 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_object_date (TrackerSparqlBuilder* self, time_t* literal) {
	time_t _tmp0_;
	struct tm _tmp1_ = {0};
	struct tm tm;
	struct tm _tmp2_;
	gint _tmp3_;
	struct tm _tmp4_;
	gint _tmp5_;
	struct tm _tmp6_;
	gint _tmp7_;
	struct tm _tmp8_;
	gint _tmp9_;
	struct tm _tmp10_;
	gint _tmp11_;
	struct tm _tmp12_;
	gint _tmp13_;
	gchar* _tmp14_ = NULL;
	gchar* _tmp15_;
#line 264 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 265 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = *literal;
#line 265 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_time_gm (_tmp0_, &_tmp1_);
#line 265 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	tm = _tmp1_;
#line 267 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = tm;
#line 267 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp3_ = _tmp2_.tm_year;
#line 267 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp4_ = tm;
#line 267 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp5_ = _tmp4_.tm_mon;
#line 267 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp6_ = tm;
#line 267 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp7_ = _tmp6_.tm_mday;
#line 267 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp8_ = tm;
#line 267 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp9_ = _tmp8_.tm_hour;
#line 267 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp10_ = tm;
#line 267 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp11_ = _tmp10_.tm_min;
#line 267 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp12_ = tm;
#line 267 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp13_ = _tmp12_.tm_sec;
#line 267 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp14_ = g_strdup_printf ("%04d-%02d-%02dT%02d:%02d:%02dZ", _tmp3_ + 1900, _tmp5_ + 1, _tmp7_, _tmp9_, _tmp11_, _tmp13_);
#line 267 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp15_ = _tmp14_;
#line 267 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	tracker_sparql_builder_object_string (self, _tmp15_);
#line 267 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_g_free0 (_tmp15_);
#line 1669 "tracker-sparql-builder.c"
}


static gchar* double_to_string (gdouble self) {
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
	gchar* _tmp1_;
	gint _tmp1__length1;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_;
	gchar* _tmp4_;
#line 767 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp0_ = g_new0 (gchar, G_ASCII_DTOSTR_BUF_SIZE);
#line 767 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp1_ = _tmp0_;
#line 767 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp1__length1 = G_ASCII_DTOSTR_BUF_SIZE;
#line 767 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp2_ = g_ascii_dtostr (_tmp1_, G_ASCII_DTOSTR_BUF_SIZE, self);
#line 767 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp3_ = g_strdup (_tmp2_);
#line 767 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp4_ = _tmp3_;
#line 767 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	_tmp1_ = (g_free (_tmp1_), NULL);
#line 767 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	result = _tmp4_;
#line 767 "/usr/share/vala-0.14/vapi/glib-2.0.vapi"
	return result;
#line 1699 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_object_double (TrackerSparqlBuilder* self, gdouble literal) {
	gdouble _tmp0_;
	gchar* _tmp1_ = NULL;
	gchar* _tmp2_;
#line 270 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 271 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = literal;
#line 271 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = double_to_string (_tmp0_);
#line 271 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = _tmp1_;
#line 271 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	tracker_sparql_builder_object (self, _tmp2_);
#line 271 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_g_free0 (_tmp2_);
#line 1719 "tracker-sparql-builder.c"
}


static void _vala_array_add13 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
#line 282 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if ((*length) == (*size)) {
#line 282 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 282 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*array = g_renew (TrackerSparqlBuilderState, *array, *size);
#line 1730 "tracker-sparql-builder.c"
	}
#line 282 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	(*array)[(*length)++] = value;
#line 1734 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_object_blank_open (TrackerSparqlBuilder* self) {
	TrackerSparqlBuilderState _tmp0_;
	TrackerSparqlBuilderState _tmp1_;
	TrackerSparqlBuilderState _tmp2_;
	TrackerSparqlBuilderState _tmp3_;
	TrackerSparqlBuilderState _tmp4_;
	TrackerSparqlBuilderState _tmp5_;
	GString* _tmp8_;
	TrackerSparqlBuilderState* _tmp9_;
	gint _tmp9__length1;
#line 274 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 274 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = tracker_sparql_builder_get_state (self);
#line 274 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = _tmp0_;
#line 274 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = tracker_sparql_builder_get_state (self);
#line 274 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp3_ = _tmp2_;
#line 274 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail ((_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_PREDICATE) || (_tmp3_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT));
#line 277 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp4_ = tracker_sparql_builder_get_state (self);
#line 277 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp5_ = _tmp4_;
#line 277 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if (_tmp5_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT) {
#line 1766 "tracker-sparql-builder.c"
		GString* _tmp6_;
		gint _tmp7_;
#line 278 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp6_ = self->priv->str;
#line 278 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		g_string_append (_tmp6_, " ,");
#line 279 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp7_ = self->priv->states_length1;
#line 279 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		self->priv->states_length1 = _tmp7_ - 1;
#line 1777 "tracker-sparql-builder.c"
	}
#line 281 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp8_ = self->priv->str;
#line 281 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_string_append (_tmp8_, " [");
#line 282 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp9_ = self->priv->states;
#line 282 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp9__length1 = self->priv->states_length1;
#line 282 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_vala_array_add13 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_BLANK);
#line 1789 "tracker-sparql-builder.c"
}


static void _vala_array_add14 (TrackerSparqlBuilderState** array, int* length, int* size, TrackerSparqlBuilderState value) {
#line 290 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if ((*length) == (*size)) {
#line 290 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 290 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		*array = g_renew (TrackerSparqlBuilderState, *array, *size);
#line 1800 "tracker-sparql-builder.c"
	}
#line 290 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	(*array)[(*length)++] = value;
#line 1804 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_object_blank_close (TrackerSparqlBuilder* self) {
	TrackerSparqlBuilderState _tmp0_;
	TrackerSparqlBuilderState _tmp1_;
	TrackerSparqlBuilderState* _tmp2_;
	gint _tmp2__length1;
	TrackerSparqlBuilderState* _tmp3_;
	gint _tmp3__length1;
	TrackerSparqlBuilderState _tmp4_;
	TrackerSparqlBuilderState _tmp5_;
	TrackerSparqlBuilderState _tmp6_;
	GString* _tmp7_;
	gint _tmp8_;
	TrackerSparqlBuilderState* _tmp9_;
	gint _tmp9__length1;
	gint _tmp10_;
#line 285 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 285 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = tracker_sparql_builder_get_state (self);
#line 285 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = _tmp0_;
#line 285 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = self->priv->states;
#line 285 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2__length1 = self->priv->states_length1;
#line 285 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp3_ = self->priv->states;
#line 285 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp3__length1 = self->priv->states_length1;
#line 285 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp4_ = _tmp2_[_tmp3__length1 - 3];
#line 285 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp5_ = tracker_sparql_builder_get_state (self);
#line 285 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp6_ = _tmp5_;
#line 285 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail ((_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT) && (_tmp4_ == TRACKER_SPARQL_BUILDER_STATE_BLANK));
#line 288 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp7_ = self->priv->str;
#line 288 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_string_append (_tmp7_, "]");
#line 289 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	self->priv->states_length1 = self->priv->states_length1 - 3;
#line 289 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp8_ = self->priv->states_length1;
#line 290 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp9_ = self->priv->states;
#line 290 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp9__length1 = self->priv->states_length1;
#line 290 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_vala_array_add14 (&self->priv->states, &self->priv->states_length1, &self->priv->_states_size_, TRACKER_SPARQL_BUILDER_STATE_OBJECT);
#line 292 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp10_ = self->priv->_length;
#line 292 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	tracker_sparql_builder_set_length (self, _tmp10_ + 1);
#line 1863 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_prepend (TrackerSparqlBuilder* self, const gchar* raw) {
	GString* _tmp0_;
	const gchar* _tmp1_;
	gchar* _tmp2_ = NULL;
	gchar* _tmp3_;
#line 295 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 295 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (raw != NULL);
#line 297 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = self->priv->str;
#line 297 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = raw;
#line 297 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = g_strdup_printf ("%s\n", _tmp1_);
#line 297 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp3_ = _tmp2_;
#line 297 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_string_prepend (_tmp0_, _tmp3_);
#line 297 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_g_free0 (_tmp3_);
#line 1888 "tracker-sparql-builder.c"
}


void tracker_sparql_builder_append (TrackerSparqlBuilder* self, const gchar* raw) {
	TrackerSparqlBuilderState _tmp0_;
	TrackerSparqlBuilderState _tmp1_;
	GString* _tmp4_;
	const gchar* _tmp5_;
#line 300 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 300 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (raw != NULL);
#line 302 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = tracker_sparql_builder_get_state (self);
#line 302 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = _tmp0_;
#line 302 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	if (_tmp1_ == TRACKER_SPARQL_BUILDER_STATE_OBJECT) {
#line 1907 "tracker-sparql-builder.c"
		GString* _tmp2_;
		gint _tmp3_;
#line 303 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp2_ = self->priv->str;
#line 303 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		g_string_append (_tmp2_, " .\n");
#line 304 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		self->priv->states_length1 = self->priv->states_length1 - 3;
#line 304 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		_tmp3_ = self->priv->states_length1;
#line 1918 "tracker-sparql-builder.c"
	}
#line 307 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp4_ = self->priv->str;
#line 307 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp5_ = raw;
#line 307 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_string_append (_tmp4_, _tmp5_);
#line 1926 "tracker-sparql-builder.c"
}


TrackerSparqlBuilder* tracker_sparql_builder_construct (GType object_type) {
	TrackerSparqlBuilder * self = NULL;
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	self = (TrackerSparqlBuilder*) g_object_new (object_type, NULL);
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	return self;
#line 1936 "tracker-sparql-builder.c"
}


TrackerSparqlBuilder* tracker_sparql_builder_new (void) {
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	return tracker_sparql_builder_construct (TRACKER_TYPE_SPARQL_BUILDER);
#line 1943 "tracker-sparql-builder.c"
}


const gchar* tracker_sparql_builder_get_result (TrackerSparqlBuilder* self) {
	const gchar* result;
	TrackerSparqlBuilderState* _tmp0_;
	gint _tmp0__length1;
	GString* _tmp1_;
	const gchar* _tmp2_;
#line 34 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 35 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = self->priv->states;
#line 35 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0__length1 = self->priv->states_length1;
#line 35 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_warn_if_fail (_tmp0__length1 == 1);
#line 36 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = self->priv->str;
#line 36 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = _tmp1_->str;
#line 36 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	result = _tmp2_;
#line 36 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	return result;
#line 1969 "tracker-sparql-builder.c"
}


gint tracker_sparql_builder_get_length (TrackerSparqlBuilder* self) {
	gint result;
	gint _tmp0_;
#line 40 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 40 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = self->priv->_length;
#line 40 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	result = _tmp0_;
#line 40 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	return result;
#line 1984 "tracker-sparql-builder.c"
}


static void tracker_sparql_builder_set_length (TrackerSparqlBuilder* self, gint value) {
	gint _tmp0_;
#line 40 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_if_fail (self != NULL);
#line 40 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = value;
#line 40 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	self->priv->_length = _tmp0_;
#line 40 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_object_notify ((GObject *) self, "length");
#line 1998 "tracker-sparql-builder.c"
}


TrackerSparqlBuilderState tracker_sparql_builder_get_state (TrackerSparqlBuilder* self) {
	TrackerSparqlBuilderState result;
	TrackerSparqlBuilderState* _tmp0_;
	gint _tmp0__length1;
	TrackerSparqlBuilderState* _tmp1_;
	gint _tmp1__length1;
	TrackerSparqlBuilderState _tmp2_;
#line 43 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_return_val_if_fail (self != NULL, 0);
#line 43 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = self->priv->states;
#line 43 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0__length1 = self->priv->states_length1;
#line 43 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1_ = self->priv->states;
#line 43 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp1__length1 = self->priv->states_length1;
#line 43 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp2_ = _tmp0_[_tmp1__length1 - 1];
#line 43 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	result = _tmp2_;
#line 43 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	return result;
#line 2025 "tracker-sparql-builder.c"
}


static void tracker_sparql_builder_class_init (TrackerSparqlBuilderClass * klass) {
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	tracker_sparql_builder_parent_class = g_type_class_peek_parent (klass);
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_type_class_add_private (klass, sizeof (TrackerSparqlBuilderPrivate));
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	G_OBJECT_CLASS (klass)->get_property = _vala_tracker_sparql_builder_get_property;
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	G_OBJECT_CLASS (klass)->set_property = _vala_tracker_sparql_builder_set_property;
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	G_OBJECT_CLASS (klass)->finalize = tracker_sparql_builder_finalize;
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_SPARQL_BUILDER_RESULT, g_param_spec_string ("result", "result", "result", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_SPARQL_BUILDER_LENGTH, g_param_spec_int ("length", "length", "length", G_MININT, G_MAXINT, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	g_object_class_install_property (G_OBJECT_CLASS (klass), TRACKER_SPARQL_BUILDER_STATE, g_param_spec_enum ("state", "state", "state", TRACKER_SPARQL_BUILDER_TYPE_STATE, 0, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE));
#line 2046 "tracker-sparql-builder.c"
}


static void tracker_sparql_builder_instance_init (TrackerSparqlBuilder * self) {
	GString* _tmp0_;
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	self->priv = TRACKER_SPARQL_BUILDER_GET_PRIVATE (self);
#line 47 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_tmp0_ = g_string_new ("");
#line 47 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	self->priv->str = _tmp0_;
#line 2058 "tracker-sparql-builder.c"
}


static void tracker_sparql_builder_finalize (GObject* obj) {
	TrackerSparqlBuilder * self;
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	self = TRACKER_SPARQL_BUILDER (obj);
#line 46 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	self->priv->states = (g_free (self->priv->states), NULL);
#line 47 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	_g_string_free0 (self->priv->str);
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	G_OBJECT_CLASS (tracker_sparql_builder_parent_class)->finalize (obj);
#line 2072 "tracker-sparql-builder.c"
}


GType tracker_sparql_builder_get_type (void) {
	static volatile gsize tracker_sparql_builder_type_id__volatile = 0;
	if (g_once_init_enter (&tracker_sparql_builder_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlBuilderClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_builder_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlBuilder), 0, (GInstanceInitFunc) tracker_sparql_builder_instance_init, NULL };
		GType tracker_sparql_builder_type_id;
		tracker_sparql_builder_type_id = g_type_register_static (G_TYPE_OBJECT, "TrackerSparqlBuilder", &g_define_type_info, 0);
		g_once_init_leave (&tracker_sparql_builder_type_id__volatile, tracker_sparql_builder_type_id);
	}
	return tracker_sparql_builder_type_id__volatile;
}


static void _vala_tracker_sparql_builder_get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) {
	TrackerSparqlBuilder * self;
	self = TRACKER_SPARQL_BUILDER (object);
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	switch (property_id) {
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		case TRACKER_SPARQL_BUILDER_RESULT:
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		g_value_set_string (value, tracker_sparql_builder_get_result (self));
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		break;
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		case TRACKER_SPARQL_BUILDER_LENGTH:
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		g_value_set_int (value, tracker_sparql_builder_get_length (self));
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		break;
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		case TRACKER_SPARQL_BUILDER_STATE:
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		g_value_set_enum (value, tracker_sparql_builder_get_state (self));
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		break;
#line 2111 "tracker-sparql-builder.c"
		default:
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		break;
#line 2117 "tracker-sparql-builder.c"
	}
}


static void _vala_tracker_sparql_builder_set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) {
	TrackerSparqlBuilder * self;
	self = TRACKER_SPARQL_BUILDER (object);
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
	switch (property_id) {
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		case TRACKER_SPARQL_BUILDER_LENGTH:
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		tracker_sparql_builder_set_length (self, g_value_get_int (value));
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		break;
#line 2133 "tracker-sparql-builder.c"
		default:
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
#line 20 "/home/martyn/Source/tracker/src/libtracker-client/tracker-sparql-builder.vala"
		break;
#line 2139 "tracker-sparql-builder.c"
	}
}



