/* tracker-query.c generated by valac 0.35.1.15-f996c-dirty, the Vala compiler
 * generated from tracker-query.vala, do not modify */

/**/
/* Copyright 2010, Martyn Russell <martyn@lanedo.com>*/
/**/
/* This program is free software; you can redistribute it and/or*/
/* modify it under the terms of the GNU General Public License*/
/* as published by the Free Software Foundation; either version 2*/
/* of the License, or (at your option) any later version.*/
/**/
/* This program 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 General Public License for more details.*/
/**/
/* You should have received a copy of the GNU General Public License*/
/* along with this program; 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 "libtracker-sparql/tracker-sparql.h"
#include <gio/gio.h>
#include <gobject/gvaluecollector.h>


#define TRACKER_TYPE_QUERY (tracker_query_get_type ())
#define TRACKER_QUERY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_TYPE_QUERY, TrackerQuery))
#define TRACKER_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_QUERY, TrackerQueryClass))
#define TRACKER_IS_QUERY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_TYPE_QUERY))
#define TRACKER_IS_QUERY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_QUERY))
#define TRACKER_QUERY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_QUERY, TrackerQueryClass))

typedef struct _TrackerQuery TrackerQuery;
typedef struct _TrackerQueryClass TrackerQueryClass;
typedef struct _TrackerQueryPrivate TrackerQueryPrivate;

#define TRACKER_QUERY_TYPE_TYPE (tracker_query_type_get_type ())

#define TRACKER_QUERY_TYPE_MATCH (tracker_query_match_get_type ())
#define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _tracker_query_unref0(var) ((var == NULL) ? NULL : (var = (tracker_query_unref (var), NULL)))
typedef struct _TrackerQueryGetCountAsyncData TrackerQueryGetCountAsyncData;
typedef struct _TrackerQueryPerformAsyncData TrackerQueryPerformAsyncData;
typedef struct _TrackerParamSpecQuery TrackerParamSpecQuery;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _TrackerQuery {
	GTypeInstance parent_instance;
	volatile int ref_count;
	TrackerQueryPrivate * priv;
};

struct _TrackerQueryClass {
	GTypeClass parent_class;
	void (*finalize) (TrackerQuery *self);
};

struct _TrackerQueryPrivate {
	gchar** match_clauses;
	gint match_clauses_length1;
	gint _match_clauses_size_;
	gchar** where_clauses;
	gint where_clauses_length1;
	gint _where_clauses_size_;
	gchar** sort_clauses;
	gint sort_clauses_length1;
	gint _sort_clauses_size_;
	gchar* _criteria;
	guint _offset;
	guint _limit;
	gchar* _query;
	GPtrArray* _tags;
};

typedef enum  {
	TRACKER_QUERY_TYPE_ALL,
	TRACKER_QUERY_TYPE_CONTACTS,
	TRACKER_QUERY_TYPE_APPLICATIONS,
	TRACKER_QUERY_TYPE_MUSIC,
	TRACKER_QUERY_TYPE_IMAGES,
	TRACKER_QUERY_TYPE_VIDEOS,
	TRACKER_QUERY_TYPE_DOCUMENTS,
	TRACKER_QUERY_TYPE_MAIL,
	TRACKER_QUERY_TYPE_CALENDAR,
	TRACKER_QUERY_TYPE_FOLDERS,
	TRACKER_QUERY_TYPE_BOOKMARKS
} TrackerQueryType;

typedef enum  {
	TRACKER_QUERY_MATCH_NONE,
	TRACKER_QUERY_MATCH_FTS,
	TRACKER_QUERY_MATCH_FTS_INDIRECT,
	TRACKER_QUERY_MATCH_TITLES,
	TRACKER_QUERY_MATCH_TITLES_INDIRECT,
	TRACKER_QUERY_MATCH_TAGS_ONLY,
	TRACKER_QUERY_MATCH_TAGS_ONLY_INDIRECT
} TrackerQueryMatch;

struct _TrackerQueryGetCountAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TrackerQuery* self;
	TrackerQueryType query_type;
	TrackerQueryMatch match_type;
	GCancellable* cancellable;
	guint result;
	TrackerSparqlConnection* _tmp0_;
	TrackerSparqlCursor* cursor;
	TrackerQueryType _tmp1_;
	TrackerQueryMatch _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	GPtrArray* _tmp5_;
	GPtrArray* _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
	gboolean _tmp9_;
	TrackerQueryMatch _tmp10_;
	TrackerQueryMatch _tmp11_;
	TrackerQueryMatch _tmp12_;
	gboolean _tmp13_;
	gboolean _tmp14_;
	gboolean _tmp15_;
	TrackerQueryMatch _tmp16_;
	TrackerQueryMatch _tmp17_;
	TrackerQueryMatch _tmp18_;
	gboolean _tmp19_;
	const gchar* _tmp20_;
	const gchar* _tmp21_;
	gint _tmp22_;
	gint _tmp23_;
	gchar* match;
	gboolean _tmp24_;
	TrackerQueryMatch _tmp25_;
	TrackerQueryMatch _tmp26_;
	gchar** _tmp27_;
	gint _tmp27__length1;
	TrackerQueryMatch _tmp28_;
	const gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* criteria_escaped;
	const gchar* _tmp33_;
	gchar* _tmp34_;
	gboolean _tmp35_;
	TrackerQueryMatch _tmp36_;
	TrackerQueryMatch _tmp37_;
	gchar** _tmp38_;
	gint _tmp38__length1;
	TrackerQueryMatch _tmp39_;
	const gchar* _tmp40_;
	const gchar* _tmp41_;
	const gchar* _tmp42_;
	gchar* _tmp43_;
	gchar** _tmp44_;
	gint _tmp44__length1;
	TrackerQueryMatch _tmp45_;
	const gchar* _tmp46_;
	const gchar* _tmp47_;
	gchar* _tmp48_;
	gchar** _tmp49_;
	gint _tmp49__length1;
	TrackerQueryType _tmp50_;
	const gchar* _tmp51_;
	gint _tmp52_;
	gint _tmp53_;
	const gchar* _tmp54_;
	gchar** _tmp55_;
	gint _tmp55__length1;
	TrackerQueryType _tmp56_;
	const gchar* _tmp57_;
	const gchar* _tmp58_;
	gchar* _tmp59_;
	gchar* _tmp60_;
	gchar* _tmp61_;
	gchar* _tmp62_;
	gchar* _tmp63_;
	gchar* _tmp64_;
	gchar** _tmp65_;
	gint _tmp65__length1;
	TrackerQueryType _tmp66_;
	const gchar* _tmp67_;
	gint _tmp68_;
	gint _tmp69_;
	const gchar* _tmp70_;
	gchar** _tmp71_;
	gint _tmp71__length1;
	TrackerQueryType _tmp72_;
	const gchar* _tmp73_;
	gchar* _tmp74_;
	gchar* _tmp75_;
	gchar* _tmp76_;
	gchar* _tmp77_;
	TrackerSparqlCursor* _tmp78_;
	TrackerSparqlConnection* _tmp79_;
	const gchar* _tmp80_;
	TrackerSparqlCursor* _tmp81_;
	TrackerSparqlCursor* _tmp82_;
	TrackerSparqlCursor* _tmp83_;
	GError* e;
	GError* _tmp84_;
	const gchar* _tmp85_;
	TrackerSparqlCursor* _tmp86_;
	gint64 _tmp87_;
	GError * _inner_error_;
};

struct _TrackerQueryPerformAsyncData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	TrackerQuery* self;
	TrackerQueryType query_type;
	TrackerQueryMatch match_type;
	gchar** args;
	gint args_length1;
	GCancellable* cancellable;
	TrackerSparqlCursor* result;
	TrackerSparqlConnection* _tmp0_;
	TrackerSparqlCursor* cursor;
	TrackerQueryType _tmp1_;
	TrackerQueryMatch _tmp2_;
	gboolean _tmp3_;
	gboolean _tmp4_;
	GPtrArray* _tmp5_;
	GPtrArray* _tmp6_;
	gint _tmp7_;
	gint _tmp8_;
	gboolean _tmp9_;
	TrackerQueryMatch _tmp10_;
	TrackerQueryMatch _tmp11_;
	gboolean _tmp12_;
	gboolean _tmp13_;
	gboolean _tmp14_;
	TrackerQueryMatch _tmp15_;
	TrackerQueryMatch _tmp16_;
	TrackerQueryMatch _tmp17_;
	gboolean _tmp18_;
	const gchar* _tmp19_;
	const gchar* _tmp20_;
	gint _tmp21_;
	gint _tmp22_;
	guint _tmp23_;
	gchar* match;
	gboolean _tmp24_;
	TrackerQueryMatch _tmp25_;
	TrackerQueryMatch _tmp26_;
	gchar** _tmp27_;
	gint _tmp27__length1;
	TrackerQueryMatch _tmp28_;
	const gchar* _tmp29_;
	gchar* _tmp30_;
	gchar* _tmp31_;
	gchar* _tmp32_;
	gchar* criteria_escaped;
	const gchar* _tmp33_;
	gchar* _tmp34_;
	gboolean _tmp35_;
	TrackerQueryMatch _tmp36_;
	TrackerQueryMatch _tmp37_;
	gchar** _tmp38_;
	gint _tmp38__length1;
	TrackerQueryMatch _tmp39_;
	const gchar* _tmp40_;
	const gchar* _tmp41_;
	const gchar* _tmp42_;
	gchar* _tmp43_;
	gchar** _tmp44_;
	gint _tmp44__length1;
	TrackerQueryMatch _tmp45_;
	const gchar* _tmp46_;
	const gchar* _tmp47_;
	gchar* _tmp48_;
	gchar** _tmp49_;
	gint _tmp49__length1;
	gchar* _tmp50_;
	gchar* _tmp51_;
	gchar* _tmp52_;
	gchar* _tmp53_;
	gchar** _tmp54_;
	gint _tmp54__length1;
	TrackerQueryType _tmp55_;
	const gchar* _tmp56_;
	gint _tmp57_;
	gint _tmp58_;
	const gchar* _tmp59_;
	gchar** _tmp60_;
	gint _tmp60__length1;
	TrackerQueryType _tmp61_;
	const gchar* _tmp62_;
	const gchar* _tmp63_;
	gchar* _tmp64_;
	gchar* _tmp65_;
	gchar* _tmp66_;
	gchar* _tmp67_;
	gchar* _tmp68_;
	gchar* _tmp69_;
	gchar** _tmp70_;
	gint _tmp70__length1;
	TrackerQueryType _tmp71_;
	const gchar* _tmp72_;
	gint _tmp73_;
	gint _tmp74_;
	const gchar* _tmp75_;
	gchar** _tmp76_;
	gint _tmp76__length1;
	TrackerQueryType _tmp77_;
	const gchar* _tmp78_;
	gchar* _tmp79_;
	gchar* _tmp80_;
	gchar* _tmp81_;
	gchar* _tmp82_;
	const gchar* _tmp83_;
	guint _tmp84_;
	guint _tmp85_;
	gchar* _tmp86_;
	gchar* _tmp87_;
	gchar* _tmp88_;
	gchar* _tmp89_;
	const gchar* _tmp90_;
	TrackerSparqlCursor* _tmp91_;
	TrackerSparqlConnection* _tmp92_;
	const gchar* _tmp93_;
	TrackerSparqlCursor* _tmp94_;
	TrackerSparqlCursor* _tmp95_;
	GError* e;
	GError* _tmp96_;
	const gchar* _tmp97_;
	GError * _inner_error_;
};

struct _TrackerParamSpecQuery {
	GParamSpec parent_instance;
};


static gpointer tracker_query_parent_class = NULL;
static TrackerSparqlConnection* tracker_query_connection;
static TrackerSparqlConnection* tracker_query_connection = NULL;

gpointer tracker_query_ref (gpointer instance);
void tracker_query_unref (gpointer instance);
GParamSpec* tracker_param_spec_query (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void tracker_value_set_query (GValue* value, gpointer v_object);
void tracker_value_take_query (GValue* value, gpointer v_object);
gpointer tracker_value_get_query (const GValue* value);
GType tracker_query_get_type (void) G_GNUC_CONST;
#define TRACKER_QUERY_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_TYPE_QUERY, TrackerQueryPrivate))
enum  {
	TRACKER_QUERY_DUMMY_PROPERTY
};
GType tracker_query_type_get_type (void) G_GNUC_CONST;
GType tracker_query_match_get_type (void) G_GNUC_CONST;
TrackerQuery* tracker_query_new (void);
TrackerQuery* tracker_query_construct (GType object_type);
void tracker_query_set_tags (TrackerQuery* self, GPtrArray* value);
static gchar* tracker_query_get_tags_filter (TrackerQuery* self);
GPtrArray* tracker_query_get_tags (TrackerQuery* self);
static gboolean tracker_query_check_query_and_match_type (TrackerQuery* self, TrackerQueryType query_type, TrackerQueryMatch match_type);
static void tracker_query_get_count_async_data_free (gpointer _data);
void tracker_query_get_count_async (TrackerQuery* self, TrackerQueryType query_type, TrackerQueryMatch match_type, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
guint tracker_query_get_count_finish (TrackerQuery* self, GAsyncResult* _res_, GError** error);
static gboolean tracker_query_get_count_async_co (TrackerQueryGetCountAsyncData* _data_);
const gchar* tracker_query_get_criteria (TrackerQuery* self);
static void tracker_query_set_query (TrackerQuery* self, const gchar* value);
const gchar* tracker_query_get_query (TrackerQuery* self);
static void tracker_query_get_count_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
static void tracker_query_perform_async_data_free (gpointer _data);
void tracker_query_perform_async (TrackerQuery* self, TrackerQueryType query_type, TrackerQueryMatch match_type, gchar** args, int args_length1, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
TrackerSparqlCursor* tracker_query_perform_finish (TrackerQuery* self, GAsyncResult* _res_, GError** error);
static gboolean tracker_query_perform_async_co (TrackerQueryPerformAsyncData* _data_);
guint tracker_query_get_limit (TrackerQuery* self);
guint tracker_query_get_offset (TrackerQuery* self);
static void tracker_query_perform_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
void tracker_query_set_criteria (TrackerQuery* self, const gchar* value);
void tracker_query_set_offset (TrackerQuery* self, guint value);
void tracker_query_set_limit (TrackerQuery* self, guint value);
static void tracker_query_finalize (TrackerQuery * obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


GType tracker_query_type_get_type (void) {
	static volatile gsize tracker_query_type_type_id__volatile = 0;
	if (g_once_init_enter (&tracker_query_type_type_id__volatile)) {
		static const GEnumValue values[] = {{TRACKER_QUERY_TYPE_ALL, "TRACKER_QUERY_TYPE_ALL", "all"}, {TRACKER_QUERY_TYPE_CONTACTS, "TRACKER_QUERY_TYPE_CONTACTS", "contacts"}, {TRACKER_QUERY_TYPE_APPLICATIONS, "TRACKER_QUERY_TYPE_APPLICATIONS", "applications"}, {TRACKER_QUERY_TYPE_MUSIC, "TRACKER_QUERY_TYPE_MUSIC", "music"}, {TRACKER_QUERY_TYPE_IMAGES, "TRACKER_QUERY_TYPE_IMAGES", "images"}, {TRACKER_QUERY_TYPE_VIDEOS, "TRACKER_QUERY_TYPE_VIDEOS", "videos"}, {TRACKER_QUERY_TYPE_DOCUMENTS, "TRACKER_QUERY_TYPE_DOCUMENTS", "documents"}, {TRACKER_QUERY_TYPE_MAIL, "TRACKER_QUERY_TYPE_MAIL", "mail"}, {TRACKER_QUERY_TYPE_CALENDAR, "TRACKER_QUERY_TYPE_CALENDAR", "calendar"}, {TRACKER_QUERY_TYPE_FOLDERS, "TRACKER_QUERY_TYPE_FOLDERS", "folders"}, {TRACKER_QUERY_TYPE_BOOKMARKS, "TRACKER_QUERY_TYPE_BOOKMARKS", "bookmarks"}, {0, NULL, NULL}};
		GType tracker_query_type_type_id;
		tracker_query_type_type_id = g_enum_register_static ("TrackerQueryType", values);
		g_once_init_leave (&tracker_query_type_type_id__volatile, tracker_query_type_type_id);
	}
	return tracker_query_type_type_id__volatile;
}


GType tracker_query_match_get_type (void) {
	static volatile gsize tracker_query_match_type_id__volatile = 0;
	if (g_once_init_enter (&tracker_query_match_type_id__volatile)) {
		static const GEnumValue values[] = {{TRACKER_QUERY_MATCH_NONE, "TRACKER_QUERY_MATCH_NONE", "none"}, {TRACKER_QUERY_MATCH_FTS, "TRACKER_QUERY_MATCH_FTS", "fts"}, {TRACKER_QUERY_MATCH_FTS_INDIRECT, "TRACKER_QUERY_MATCH_FTS_INDIRECT", "fts-indirect"}, {TRACKER_QUERY_MATCH_TITLES, "TRACKER_QUERY_MATCH_TITLES", "titles"}, {TRACKER_QUERY_MATCH_TITLES_INDIRECT, "TRACKER_QUERY_MATCH_TITLES_INDIRECT", "titles-indirect"}, {TRACKER_QUERY_MATCH_TAGS_ONLY, "TRACKER_QUERY_MATCH_TAGS_ONLY", "tags-only"}, {TRACKER_QUERY_MATCH_TAGS_ONLY_INDIRECT, "TRACKER_QUERY_MATCH_TAGS_ONLY_INDIRECT", "tags-only-indirect"}, {0, NULL, NULL}};
		GType tracker_query_match_type_id;
		tracker_query_match_type_id = g_enum_register_static ("TrackerQueryMatch", values);
		g_once_init_leave (&tracker_query_match_type_id__volatile, tracker_query_match_type_id);
	}
	return tracker_query_match_type_id__volatile;
}


TrackerQuery* tracker_query_construct (GType object_type) {
	TrackerQuery* self = NULL;
	GError * _inner_error_ = NULL;
#line 225 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	self = (TrackerQuery*) g_type_create_instance (object_type);
#line 428 "tracker-query.c"
	{
		TrackerSparqlConnection* _tmp0_;
		TrackerSparqlConnection* _tmp1_;
		TrackerSparqlConnection* _tmp2_;
#line 227 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp1_ = tracker_sparql_connection_get (NULL, &_inner_error_);
#line 227 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp0_ = _tmp1_;
#line 227 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 439 "tracker-query.c"
			goto __catch3_g_error;
		}
#line 227 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp2_ = _tmp0_;
#line 227 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp0_ = NULL;
#line 227 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_g_object_unref0 (tracker_query_connection);
#line 227 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		tracker_query_connection = _tmp2_;
#line 226 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_g_object_unref0 (_tmp0_);
#line 452 "tracker-query.c"
	}
	goto __finally3;
	__catch3_g_error:
	{
		GError* e = NULL;
		GError* _tmp3_;
		const gchar* _tmp4_;
#line 226 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		e = _inner_error_;
#line 226 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_inner_error_ = NULL;
#line 229 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp3_ = e;
#line 229 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp4_ = _tmp3_->message;
#line 229 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_warning ("tracker-query.vala:229: Could not get Sparql connection: %s", _tmp4_);
#line 226 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_g_error_free0 (e);
#line 472 "tracker-query.c"
	}
	__finally3:
#line 226 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 226 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 226 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_clear_error (&_inner_error_);
#line 226 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		return NULL;
#line 483 "tracker-query.c"
	}
#line 232 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	tracker_query_set_tags (self, NULL);
#line 225 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return self;
#line 489 "tracker-query.c"
}


TrackerQuery* tracker_query_new (void) {
#line 225 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return tracker_query_construct (TRACKER_TYPE_QUERY);
#line 496 "tracker-query.c"
}


static gint g_ptr_array_get_length (GPtrArray* self) {
	gint result;
	guint _tmp0_;
#line 4926 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_val_if_fail (self != NULL, 0);
#line 4926 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp0_ = self->len;
#line 4926 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
	result = (gint) _tmp0_;
#line 4926 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
	return result;
#line 511 "tracker-query.c"
}


static void g_ptr_array_set_length (GPtrArray* self, gint value) {
	gint _tmp0_;
#line 4927 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
	g_return_if_fail (self != NULL);
#line 4927 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp0_ = value;
#line 4927 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
	g_ptr_array_set_size (self, _tmp0_);
#line 523 "tracker-query.c"
}


static gchar* tracker_query_get_tags_filter (TrackerQuery* self) {
	gchar* result = NULL;
	gchar* filter;
	gchar* _tmp0_;
	gboolean _tmp1_ = FALSE;
	GPtrArray* _tmp2_;
#line 235 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 236 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp0_ = g_strdup ("");
#line 236 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	filter = _tmp0_;
#line 238 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp2_ = self->priv->_tags;
#line 238 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_tmp2_ != NULL) {
#line 543 "tracker-query.c"
		GPtrArray* _tmp3_;
		gint _tmp4_;
		gint _tmp5_;
#line 238 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp3_ = self->priv->_tags;
#line 238 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp4_ = g_ptr_array_get_length (_tmp3_);
#line 238 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp5_ = _tmp4_;
#line 238 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp1_ = _tmp5_ > 0;
#line 555 "tracker-query.c"
	} else {
#line 238 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp1_ = FALSE;
#line 559 "tracker-query.c"
	}
#line 238 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_tmp1_) {
#line 563 "tracker-query.c"
		{
			gint i;
#line 239 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			i = 0;
#line 568 "tracker-query.c"
			{
				gboolean _tmp6_;
#line 239 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
				_tmp6_ = TRUE;
#line 239 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
				while (TRUE) {
#line 575 "tracker-query.c"
					gint _tmp8_;
					GPtrArray* _tmp9_;
					gint _tmp10_;
					gint _tmp11_;
					gchar* escaped;
					GPtrArray* _tmp12_;
					gint _tmp13_;
					gconstpointer _tmp14_;
					gchar* _tmp15_;
					const gchar* _tmp16_;
					gint _tmp17_;
					gint _tmp18_;
					const gchar* _tmp21_;
					const gchar* _tmp22_;
					gchar* _tmp23_;
					gchar* _tmp24_;
					gchar* _tmp25_;
#line 239 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					if (!_tmp6_) {
#line 595 "tracker-query.c"
						gint _tmp7_;
#line 239 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
						_tmp7_ = i;
#line 239 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
						i = _tmp7_ + 1;
#line 601 "tracker-query.c"
					}
#line 239 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					_tmp6_ = FALSE;
#line 239 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					_tmp8_ = i;
#line 239 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					_tmp9_ = self->priv->_tags;
#line 239 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					_tmp10_ = g_ptr_array_get_length (_tmp9_);
#line 239 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					_tmp11_ = _tmp10_;
#line 239 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					if (!(_tmp8_ < _tmp11_)) {
#line 239 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
						break;
#line 617 "tracker-query.c"
					}
#line 240 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					_tmp12_ = self->priv->_tags;
#line 240 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					_tmp13_ = i;
#line 240 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					_tmp14_ = g_ptr_array_index (_tmp12_, (guint) _tmp13_);
#line 240 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					_tmp15_ = tracker_sparql_escape_string ((const gchar*) _tmp14_);
#line 240 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					escaped = _tmp15_;
#line 242 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					_tmp16_ = filter;
#line 242 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					_tmp17_ = strlen (_tmp16_);
#line 242 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					_tmp18_ = _tmp17_;
#line 242 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					if (_tmp18_ > 1) {
#line 637 "tracker-query.c"
						const gchar* _tmp19_;
						gchar* _tmp20_;
#line 243 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
						_tmp19_ = filter;
#line 243 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
						_tmp20_ = g_strconcat (_tmp19_, ", ", NULL);
#line 243 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
						g_free (filter);
#line 243 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
						filter = _tmp20_;
#line 648 "tracker-query.c"
					}
#line 245 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					_tmp21_ = filter;
#line 245 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					_tmp22_ = escaped;
#line 245 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					_tmp23_ = g_strdup_printf ("\"%s\"", _tmp22_);
#line 245 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					_tmp24_ = _tmp23_;
#line 245 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					_tmp25_ = g_strconcat (_tmp21_, _tmp24_, NULL);
#line 245 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					g_free (filter);
#line 245 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					filter = _tmp25_;
#line 245 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					g_free (_tmp24_);
#line 239 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
					g_free (escaped);
#line 668 "tracker-query.c"
				}
			}
		}
	}
#line 249 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	result = filter;
#line 249 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return result;
#line 677 "tracker-query.c"
}


static gboolean tracker_query_check_query_and_match_type (TrackerQuery* self, TrackerQueryType query_type, TrackerQueryMatch match_type) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	TrackerQueryType _tmp1_;
	gboolean _tmp4_ = FALSE;
	TrackerQueryType _tmp5_;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_ = FALSE;
	TrackerQueryType _tmp11_;
#line 252 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_return_val_if_fail (self != NULL, FALSE);
#line 253 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp1_ = query_type;
#line 253 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_tmp1_ != TRACKER_QUERY_TYPE_IMAGES) {
#line 696 "tracker-query.c"
		TrackerQueryMatch _tmp2_;
#line 253 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp2_ = match_type;
#line 253 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp0_ = _tmp2_ == TRACKER_QUERY_MATCH_NONE;
#line 702 "tracker-query.c"
	} else {
#line 253 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp0_ = FALSE;
#line 706 "tracker-query.c"
	}
#line 253 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_tmp0_) {
#line 710 "tracker-query.c"
		TrackerQueryType _tmp3_;
#line 254 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp3_ = query_type;
#line 254 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_critical ("tracker-query.vala:254: You can not use a non-IMAGES query (%d) with N" \
"ONE matching", (gint) _tmp3_);
#line 255 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		result = FALSE;
#line 255 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		return result;
#line 720 "tracker-query.c"
	}
#line 258 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp5_ = query_type;
#line 258 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_tmp5_ == TRACKER_QUERY_TYPE_MUSIC) {
#line 726 "tracker-query.c"
		gboolean _tmp6_ = FALSE;
		TrackerQueryMatch _tmp7_;
#line 258 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp7_ = match_type;
#line 258 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (_tmp7_ == TRACKER_QUERY_MATCH_FTS_INDIRECT) {
#line 258 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_tmp6_ = TRUE;
#line 735 "tracker-query.c"
		} else {
			TrackerQueryMatch _tmp8_;
#line 259 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_tmp8_ = match_type;
#line 259 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_tmp6_ = _tmp8_ == TRACKER_QUERY_MATCH_TITLES_INDIRECT;
#line 742 "tracker-query.c"
		}
#line 258 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp4_ = !_tmp6_;
#line 746 "tracker-query.c"
	} else {
#line 258 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp4_ = FALSE;
#line 750 "tracker-query.c"
	}
#line 258 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_tmp4_) {
#line 260 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_critical ("tracker-query.vala:260: You can not use a MUSIC query with match TITLE" \
"S or FTS, INDIRECT required");
#line 261 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		result = FALSE;
#line 261 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		return result;
#line 760 "tracker-query.c"
	}
#line 264 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp11_ = query_type;
#line 264 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_tmp11_ != TRACKER_QUERY_TYPE_MUSIC) {
#line 766 "tracker-query.c"
		TrackerQueryType _tmp12_;
#line 264 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp12_ = query_type;
#line 264 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp10_ = _tmp12_ != TRACKER_QUERY_TYPE_DOCUMENTS;
#line 772 "tracker-query.c"
	} else {
#line 264 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp10_ = FALSE;
#line 776 "tracker-query.c"
	}
#line 264 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_tmp10_) {
#line 780 "tracker-query.c"
		gboolean _tmp13_ = FALSE;
		gboolean _tmp14_ = FALSE;
		gboolean _tmp15_ = FALSE;
		TrackerQueryMatch _tmp16_;
#line 265 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp16_ = match_type;
#line 265 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (_tmp16_ == TRACKER_QUERY_MATCH_NONE) {
#line 265 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_tmp15_ = TRUE;
#line 791 "tracker-query.c"
		} else {
			TrackerQueryMatch _tmp17_;
#line 266 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_tmp17_ = match_type;
#line 266 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_tmp15_ = _tmp17_ == TRACKER_QUERY_MATCH_FTS;
#line 798 "tracker-query.c"
		}
#line 265 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (_tmp15_) {
#line 265 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_tmp14_ = TRUE;
#line 804 "tracker-query.c"
		} else {
			TrackerQueryMatch _tmp18_;
#line 267 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_tmp18_ = match_type;
#line 267 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_tmp14_ = _tmp18_ == TRACKER_QUERY_MATCH_TITLES;
#line 811 "tracker-query.c"
		}
#line 265 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (_tmp14_) {
#line 265 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_tmp13_ = TRUE;
#line 817 "tracker-query.c"
		} else {
			TrackerQueryMatch _tmp19_;
#line 268 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_tmp19_ = match_type;
#line 268 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_tmp13_ = _tmp19_ == TRACKER_QUERY_MATCH_TAGS_ONLY;
#line 824 "tracker-query.c"
		}
#line 265 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp9_ = !_tmp13_;
#line 828 "tracker-query.c"
	} else {
#line 264 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp9_ = FALSE;
#line 832 "tracker-query.c"
	}
#line 264 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_tmp9_) {
#line 836 "tracker-query.c"
		TrackerQueryType _tmp20_;
		TrackerQueryMatch _tmp21_;
#line 269 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp20_ = query_type;
#line 269 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_tmp21_ = match_type;
#line 269 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_critical ("tracker-query.vala:269: You can not use a non-MUSIC or non-DOCUMENTS q" \
"uery (%d) with INDIRECT matching (%d)", (gint) _tmp20_, (gint) _tmp21_);
#line 270 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		result = FALSE;
#line 270 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		return result;
#line 849 "tracker-query.c"
	}
#line 273 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	result = TRUE;
#line 273 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return result;
#line 855 "tracker-query.c"
}


static void tracker_query_get_count_async_data_free (gpointer _data) {
	TrackerQueryGetCountAsyncData* _data_;
	_data_ = _data;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_g_object_unref0 (_data_->cancellable);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tracker_query_unref0 (_data_->self);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_slice_free (TrackerQueryGetCountAsyncData, _data_);
#line 868 "tracker-query.c"
}


static gpointer _tracker_query_ref0 (gpointer self) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return self ? tracker_query_ref (self) : NULL;
#line 875 "tracker-query.c"
}


static gpointer _g_object_ref0 (gpointer self) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return self ? g_object_ref (self) : NULL;
#line 882 "tracker-query.c"
}


void tracker_query_get_count_async (TrackerQuery* self, TrackerQueryType query_type, TrackerQueryMatch match_type, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrackerQueryGetCountAsyncData* _data_;
	TrackerQuery* _tmp0_;
	TrackerQueryType _tmp1_;
	TrackerQueryMatch _tmp2_;
	GCancellable* _tmp3_;
	GCancellable* _tmp4_;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_ = g_slice_new0 (TrackerQueryGetCountAsyncData);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_async_result = g_task_new (NULL, cancellable, _callback_, _user_data_);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_task_set_task_data (_data_->_async_result, _data_, tracker_query_get_count_async_data_free);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp0_ = _tracker_query_ref0 (self);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->self = _tmp0_;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp1_ = query_type;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->query_type = _tmp1_;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp2_ = match_type;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->match_type = _tmp2_;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp3_ = cancellable;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp4_ = _g_object_ref0 (_tmp3_);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_g_object_unref0 (_data_->cancellable);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->cancellable = _tmp4_;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	tracker_query_get_count_async_co (_data_);
#line 921 "tracker-query.c"
}


guint tracker_query_get_count_finish (TrackerQuery* self, GAsyncResult* _res_, GError** error) {
	guint result;
	TrackerQueryGetCountAsyncData* _data_;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (NULL == _data_) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		return 0U;
#line 934 "tracker-query.c"
	}
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	result = _data_->result;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return result;
#line 940 "tracker-query.c"
}


static void tracker_query_get_count_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrackerQueryGetCountAsyncData* _data_;
#line 330 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_ = _user_data_;
#line 330 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_source_object_ = source_object;
#line 330 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_res_ = _res_;
#line 330 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	tracker_query_get_count_async_co (_data_);
#line 954 "tracker-query.c"
}


static gboolean tracker_query_get_count_async_co (TrackerQueryGetCountAsyncData* _data_) {
#line 276 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	switch (_data_->_state_) {
#line 276 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		case 0:
#line 963 "tracker-query.c"
		goto _state_0;
#line 276 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		case 1:
#line 967 "tracker-query.c"
		goto _state_1;
#line 276 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		case 2:
#line 971 "tracker-query.c"
		goto _state_2;
		default:
#line 276 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_assert_not_reached ();
#line 976 "tracker-query.c"
	}
	_state_0:
#line 276 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp0_ = tracker_query_connection;
#line 276 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_vala_return_val_if_fail (_data_->_tmp0_ != NULL, "connection != null", FALSE);
#line 278 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->cursor = NULL;
#line 280 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp1_ = _data_->query_type;
#line 280 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp2_ = _data_->match_type;
#line 280 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp3_ = tracker_query_check_query_and_match_type (_data_->self, _data_->_tmp1_, _data_->_tmp2_);
#line 280 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (!_data_->_tmp3_) {
#line 281 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->result = (guint) 0;
#line 281 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_g_object_unref0 (_data_->cursor);
#line 281 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 281 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (_data_->_state_ != 0) {
#line 281 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 281 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1005 "tracker-query.c"
			}
		}
#line 281 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_object_unref (_data_->_async_result);
#line 281 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		return FALSE;
#line 1012 "tracker-query.c"
	}
#line 285 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp5_ = _data_->self->priv->_tags;
#line 285 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_tmp5_ != NULL) {
#line 285 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp6_ = _data_->self->priv->_tags;
#line 285 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp7_ = g_ptr_array_get_length (_data_->_tmp6_);
#line 285 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp8_ = _data_->_tmp7_;
#line 285 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp4_ = _data_->_tmp8_ > 0;
#line 1026 "tracker-query.c"
	} else {
#line 285 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp4_ = FALSE;
#line 1030 "tracker-query.c"
	}
#line 285 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_tmp4_) {
#line 286 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp10_ = _data_->match_type;
#line 286 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (_data_->_tmp10_ == TRACKER_QUERY_MATCH_FTS_INDIRECT) {
#line 286 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp9_ = TRUE;
#line 1040 "tracker-query.c"
		} else {
#line 287 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp11_ = _data_->match_type;
#line 287 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp9_ = _data_->_tmp11_ == TRACKER_QUERY_MATCH_TITLES_INDIRECT;
#line 1046 "tracker-query.c"
		}
#line 286 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (_data_->_tmp9_) {
#line 288 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->match_type = TRACKER_QUERY_MATCH_TAGS_ONLY_INDIRECT;
#line 1052 "tracker-query.c"
		} else {
#line 290 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->match_type = TRACKER_QUERY_MATCH_TAGS_ONLY;
#line 1056 "tracker-query.c"
		}
	}
#line 293 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp12_ = _data_->match_type;
#line 293 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_debug ("tracker-query.vala:293: match_type:%d", (gint) _data_->_tmp12_);
#line 294 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp16_ = _data_->match_type;
#line 294 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_tmp16_ != TRACKER_QUERY_MATCH_NONE) {
#line 295 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp17_ = _data_->match_type;
#line 295 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp15_ = _data_->_tmp17_ != TRACKER_QUERY_MATCH_TAGS_ONLY;
#line 1071 "tracker-query.c"
	} else {
#line 294 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp15_ = FALSE;
#line 1075 "tracker-query.c"
	}
#line 294 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_tmp15_) {
#line 296 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp18_ = _data_->match_type;
#line 296 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp14_ = _data_->_tmp18_ != TRACKER_QUERY_MATCH_TAGS_ONLY_INDIRECT;
#line 1083 "tracker-query.c"
	} else {
#line 294 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp14_ = FALSE;
#line 1087 "tracker-query.c"
	}
#line 294 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_tmp14_) {
#line 297 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp20_ = _data_->self->priv->_criteria;
#line 297 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (_data_->_tmp20_ == NULL) {
#line 297 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp19_ = TRUE;
#line 1097 "tracker-query.c"
		} else {
#line 297 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp21_ = _data_->self->priv->_criteria;
#line 297 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp22_ = strlen (_data_->_tmp21_);
#line 297 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp23_ = _data_->_tmp22_;
#line 297 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp19_ = _data_->_tmp23_ < 1;
#line 1107 "tracker-query.c"
		}
#line 297 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp13_ = _data_->_tmp19_;
#line 1111 "tracker-query.c"
	} else {
#line 294 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp13_ = FALSE;
#line 1115 "tracker-query.c"
	}
#line 294 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_tmp13_) {
#line 298 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_warning ("tracker-query.vala:298: Criteria was NULL or an empty string no query " \
"performed");
#line 299 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->result = (guint) 0;
#line 299 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_g_object_unref0 (_data_->cursor);
#line 299 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 299 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (_data_->_state_ != 0) {
#line 299 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 299 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1133 "tracker-query.c"
			}
		}
#line 299 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_object_unref (_data_->_async_result);
#line 299 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		return FALSE;
#line 1140 "tracker-query.c"
	}
#line 304 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp25_ = _data_->match_type;
#line 304 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_tmp25_ == TRACKER_QUERY_MATCH_TAGS_ONLY) {
#line 304 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp24_ = TRUE;
#line 1148 "tracker-query.c"
	} else {
#line 305 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp26_ = _data_->match_type;
#line 305 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp24_ = _data_->_tmp26_ == TRACKER_QUERY_MATCH_TAGS_ONLY_INDIRECT;
#line 1154 "tracker-query.c"
	}
#line 304 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_tmp24_) {
#line 306 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp27_ = _data_->self->priv->match_clauses;
#line 306 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp27__length1 = _data_->self->priv->match_clauses_length1;
#line 306 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp28_ = _data_->match_type;
#line 306 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp29_ = _data_->_tmp27_[_data_->_tmp28_];
#line 306 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp30_ = tracker_query_get_tags_filter (_data_->self);
#line 306 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp31_ = _data_->_tmp30_;
#line 306 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp32_ = g_strdup_printf (_data_->_tmp29_, _data_->_tmp31_);
#line 306 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_free (_data_->match);
#line 306 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->match = _data_->_tmp32_;
#line 306 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_free (_data_->_tmp31_);
#line 1178 "tracker-query.c"
	} else {
#line 308 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp33_ = _data_->self->priv->_criteria;
#line 308 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp34_ = tracker_sparql_escape_string (_data_->_tmp33_);
#line 308 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->criteria_escaped = _data_->_tmp34_;
#line 311 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp36_ = _data_->match_type;
#line 311 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (_data_->_tmp36_ == TRACKER_QUERY_MATCH_FTS) {
#line 311 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp35_ = TRUE;
#line 1192 "tracker-query.c"
		} else {
#line 312 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp37_ = _data_->match_type;
#line 312 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp35_ = _data_->_tmp37_ == TRACKER_QUERY_MATCH_FTS_INDIRECT;
#line 1198 "tracker-query.c"
		}
#line 311 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (_data_->_tmp35_) {
#line 313 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp38_ = _data_->self->priv->match_clauses;
#line 313 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp38__length1 = _data_->self->priv->match_clauses_length1;
#line 313 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp39_ = _data_->match_type;
#line 313 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp40_ = _data_->_tmp38_[_data_->_tmp39_];
#line 313 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp41_ = _data_->criteria_escaped;
#line 313 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp42_ = _data_->criteria_escaped;
#line 313 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp43_ = g_strdup_printf (_data_->_tmp40_, _data_->_tmp41_, _data_->_tmp42_);
#line 313 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			g_free (_data_->match);
#line 313 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->match = _data_->_tmp43_;
#line 1220 "tracker-query.c"
		} else {
#line 315 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp44_ = _data_->self->priv->match_clauses;
#line 315 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp44__length1 = _data_->self->priv->match_clauses_length1;
#line 315 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp45_ = _data_->match_type;
#line 315 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp46_ = _data_->_tmp44_[_data_->_tmp45_];
#line 315 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp47_ = _data_->criteria_escaped;
#line 315 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp48_ = g_strdup_printf (_data_->_tmp46_, _data_->_tmp47_);
#line 315 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			g_free (_data_->match);
#line 315 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->match = _data_->_tmp48_;
#line 1238 "tracker-query.c"
		}
#line 304 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_free (_data_->criteria_escaped);
#line 1242 "tracker-query.c"
	}
#line 319 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	tracker_query_set_query (_data_->self, "SELECT count(?urn)");
#line 321 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp49_ = _data_->self->priv->where_clauses;
#line 321 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp49__length1 = _data_->self->priv->where_clauses_length1;
#line 321 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp50_ = _data_->query_type;
#line 321 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp51_ = _data_->_tmp49_[_data_->_tmp50_];
#line 321 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp52_ = strlen (_data_->_tmp51_);
#line 321 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp53_ = _data_->_tmp52_;
#line 321 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_tmp53_ > 0) {
#line 322 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp54_ = _data_->self->priv->_query;
#line 322 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp55_ = _data_->self->priv->where_clauses;
#line 322 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp55__length1 = _data_->self->priv->where_clauses_length1;
#line 322 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp56_ = _data_->query_type;
#line 322 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp57_ = _data_->_tmp55_[_data_->_tmp56_];
#line 322 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp58_ = _data_->match;
#line 322 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp59_ = g_strdup_printf (_data_->_tmp57_, _data_->_tmp58_);
#line 322 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp60_ = _data_->_tmp59_;
#line 322 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp61_ = g_strconcat (" ", _data_->_tmp60_, NULL);
#line 322 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp62_ = _data_->_tmp61_;
#line 322 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp63_ = g_strconcat (_data_->_tmp54_, _data_->_tmp62_, NULL);
#line 322 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp64_ = _data_->_tmp63_;
#line 322 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		tracker_query_set_query (_data_->self, _data_->_tmp64_);
#line 322 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_free (_data_->_tmp64_);
#line 322 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_free (_data_->_tmp62_);
#line 322 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_free (_data_->_tmp60_);
#line 1292 "tracker-query.c"
	}
#line 325 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp65_ = _data_->self->priv->sort_clauses;
#line 325 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp65__length1 = _data_->self->priv->sort_clauses_length1;
#line 325 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp66_ = _data_->query_type;
#line 325 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp67_ = _data_->_tmp65_[_data_->_tmp66_];
#line 325 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp68_ = strlen (_data_->_tmp67_);
#line 325 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp69_ = _data_->_tmp68_;
#line 325 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_tmp69_ > 0) {
#line 326 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp70_ = _data_->self->priv->_query;
#line 326 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp71_ = _data_->self->priv->sort_clauses;
#line 326 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp71__length1 = _data_->self->priv->sort_clauses_length1;
#line 326 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp72_ = _data_->query_type;
#line 326 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp73_ = _data_->_tmp71_[_data_->_tmp72_];
#line 326 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp74_ = g_strconcat (" ORDER BY ", _data_->_tmp73_, NULL);
#line 326 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp75_ = _data_->_tmp74_;
#line 326 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp76_ = g_strconcat (_data_->_tmp70_, _data_->_tmp75_, NULL);
#line 326 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp77_ = _data_->_tmp76_;
#line 326 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		tracker_query_set_query (_data_->self, _data_->_tmp77_);
#line 326 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_free (_data_->_tmp77_);
#line 326 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_free (_data_->_tmp75_);
#line 1332 "tracker-query.c"
	}
	{
#line 330 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp79_ = tracker_query_connection;
#line 330 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp80_ = _data_->self->priv->_query;
#line 330 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_state_ = 1;
#line 330 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		tracker_sparql_connection_query_async (_data_->_tmp79_, _data_->_tmp80_, NULL, tracker_query_get_count_async_ready, _data_);
#line 330 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		return FALSE;
#line 1345 "tracker-query.c"
		_state_1:
#line 330 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp81_ = tracker_sparql_connection_query_finish (_data_->_tmp79_, _data_->_res_, &_data_->_inner_error_);
#line 330 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp78_ = _data_->_tmp81_;
#line 330 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 1353 "tracker-query.c"
			goto __catch4_g_error;
		}
#line 330 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp82_ = _data_->_tmp78_;
#line 330 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp78_ = NULL;
#line 330 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_g_object_unref0 (_data_->cursor);
#line 330 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->cursor = _data_->_tmp82_;
#line 331 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp83_ = _data_->cursor;
#line 331 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_state_ = 2;
#line 331 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		tracker_sparql_cursor_next_async (_data_->_tmp83_, NULL, tracker_query_get_count_async_ready, _data_);
#line 331 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		return FALSE;
#line 1372 "tracker-query.c"
		_state_2:
#line 331 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		tracker_sparql_cursor_next_finish (_data_->_tmp83_, _data_->_res_, &_data_->_inner_error_);
#line 331 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 331 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_g_object_unref0 (_data_->_tmp78_);
#line 1380 "tracker-query.c"
			goto __catch4_g_error;
		}
#line 329 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_g_object_unref0 (_data_->_tmp78_);
#line 1385 "tracker-query.c"
	}
	goto __finally4;
	__catch4_g_error:
	{
#line 329 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->e = _data_->_inner_error_;
#line 329 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_inner_error_ = NULL;
#line 333 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp84_ = _data_->e;
#line 333 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp85_ = _data_->_tmp84_->message;
#line 333 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_warning ("tracker-query.vala:333: Could not run Sparql count query: %s", _data_->_tmp85_);
#line 329 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_g_error_free0 (_data_->e);
#line 1402 "tracker-query.c"
	}
	__finally4:
#line 329 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 329 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (_data_->_inner_error_->domain == G_IO_ERROR) {
#line 329 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 329 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			g_free (_data_->match);
#line 329 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_g_object_unref0 (_data_->cursor);
#line 329 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			g_object_unref (_data_->_async_result);
#line 329 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			return FALSE;
#line 1419 "tracker-query.c"
		} else {
#line 329 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			g_free (_data_->match);
#line 329 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_g_object_unref0 (_data_->cursor);
#line 329 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 329 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			g_clear_error (&_data_->_inner_error_);
#line 329 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			return FALSE;
#line 1431 "tracker-query.c"
		}
	}
#line 336 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp86_ = _data_->cursor;
#line 336 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp87_ = tracker_sparql_cursor_get_integer (_data_->_tmp86_, 0);
#line 336 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->result = (guint) _data_->_tmp87_;
#line 336 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_free (_data_->match);
#line 336 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_g_object_unref0 (_data_->cursor);
#line 336 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 336 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_state_ != 0) {
#line 336 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 336 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1452 "tracker-query.c"
		}
	}
#line 336 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_object_unref (_data_->_async_result);
#line 336 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return FALSE;
#line 276 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_free (_data_->match);
#line 276 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_g_object_unref0 (_data_->cursor);
#line 276 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 276 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_state_ != 0) {
#line 276 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 276 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 1471 "tracker-query.c"
		}
	}
#line 276 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_object_unref (_data_->_async_result);
#line 276 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return FALSE;
#line 1478 "tracker-query.c"
}


static void tracker_query_perform_async_data_free (gpointer _data) {
	TrackerQueryPerformAsyncData* _data_;
	_data_ = _data;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_g_object_unref0 (_data_->cancellable);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_g_object_unref0 (_data_->result);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tracker_query_unref0 (_data_->self);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_slice_free (TrackerQueryPerformAsyncData, _data_);
#line 1493 "tracker-query.c"
}


void tracker_query_perform_async (TrackerQuery* self, TrackerQueryType query_type, TrackerQueryMatch match_type, gchar** args, int args_length1, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
	TrackerQueryPerformAsyncData* _data_;
	TrackerQuery* _tmp0_;
	TrackerQueryType _tmp1_;
	TrackerQueryMatch _tmp2_;
	gchar** _tmp3_;
	gint _tmp3__length1;
	GCancellable* _tmp4_;
	GCancellable* _tmp5_;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_ = g_slice_new0 (TrackerQueryPerformAsyncData);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_async_result = g_task_new (NULL, cancellable, _callback_, _user_data_);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_task_set_task_data (_data_->_async_result, _data_, tracker_query_perform_async_data_free);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp0_ = _tracker_query_ref0 (self);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->self = _tmp0_;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp1_ = query_type;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->query_type = _tmp1_;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp2_ = match_type;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->match_type = _tmp2_;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp3_ = args;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp3__length1 = args_length1;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->args = _tmp3_;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->args_length1 = _tmp3__length1;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp4_ = cancellable;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp5_ = _g_object_ref0 (_tmp4_);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_g_object_unref0 (_data_->cancellable);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->cancellable = _tmp5_;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	tracker_query_perform_async_co (_data_);
#line 1542 "tracker-query.c"
}


TrackerSparqlCursor* tracker_query_perform_finish (TrackerQuery* self, GAsyncResult* _res_, GError** error) {
	TrackerSparqlCursor* result;
	TrackerQueryPerformAsyncData* _data_;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (NULL == _data_) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		return NULL;
#line 1555 "tracker-query.c"
	}
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	result = _data_->result;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->result = NULL;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return result;
#line 1563 "tracker-query.c"
}


static gchar* _vala_g_strjoinv (const gchar* separator, gchar** str_array, int str_array_length1) {
	gchar* result = NULL;
	const gchar* _tmp0_;
	gboolean _tmp1_ = FALSE;
	gboolean _tmp2_ = FALSE;
	gchar** _tmp3_;
	gint _tmp3__length1;
#line 1070 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp0_ = separator;
#line 1070 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp0_ == NULL) {
#line 1071 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		separator = "";
#line 1580 "tracker-query.c"
	}
#line 1073 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp3_ = str_array;
#line 1073 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
	_tmp3__length1 = str_array_length1;
#line 1073 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp3_ != NULL) {
#line 1073 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp2_ = TRUE;
#line 1590 "tracker-query.c"
	} else {
		gchar** _tmp4_;
		gint _tmp4__length1;
#line 1073 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp4_ = str_array;
#line 1073 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp4__length1 = str_array_length1;
#line 1073 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp2_ = _tmp4__length1 > 0;
#line 1600 "tracker-query.c"
	}
#line 1073 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp2_) {
#line 1073 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp1_ = TRUE;
#line 1606 "tracker-query.c"
	} else {
		gboolean _tmp5_ = FALSE;
		gchar** _tmp6_;
		gint _tmp6__length1;
#line 1073 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp6_ = str_array;
#line 1073 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp6__length1 = str_array_length1;
#line 1073 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		if (_tmp6__length1 == -1) {
#line 1617 "tracker-query.c"
			gchar** _tmp7_;
			gint _tmp7__length1;
			const gchar* _tmp8_;
#line 1073 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
			_tmp7_ = str_array;
#line 1073 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
			_tmp7__length1 = str_array_length1;
#line 1073 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
			_tmp8_ = _tmp7_[0];
#line 1073 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
			_tmp5_ = _tmp8_ != NULL;
#line 1629 "tracker-query.c"
		} else {
#line 1073 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
			_tmp5_ = FALSE;
#line 1633 "tracker-query.c"
		}
#line 1073 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp1_ = _tmp5_;
#line 1637 "tracker-query.c"
	}
#line 1073 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
	if (_tmp1_) {
#line 1641 "tracker-query.c"
		gint i = 0;
		gsize len;
		gint _tmp31_;
		gint _tmp33_;
		gint _tmp34_;
		gsize _tmp35_;
		const gchar* _tmp36_;
		gint _tmp37_;
		gint _tmp38_;
		gint _tmp39_;
		const gchar* res;
		gsize _tmp40_;
		void* _tmp41_;
		void* ptr;
		const gchar* _tmp42_;
		gchar** _tmp43_;
		gint _tmp43__length1;
		const gchar* _tmp44_;
		void* _tmp45_;
		const gchar* _tmp62_;
#line 1075 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		len = (gsize) 1;
#line 1664 "tracker-query.c"
		{
			gboolean _tmp9_;
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
			i = 0;
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
			_tmp9_ = TRUE;
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
			while (TRUE) {
#line 1673 "tracker-query.c"
				gboolean _tmp11_ = FALSE;
				gboolean _tmp12_ = FALSE;
				gchar** _tmp13_;
				gint _tmp13__length1;
				gint _tmp21_ = 0;
				gchar** _tmp22_;
				gint _tmp22__length1;
				gint _tmp23_;
				const gchar* _tmp24_;
				gsize _tmp30_;
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				if (!_tmp9_) {
#line 1686 "tracker-query.c"
					gint _tmp10_;
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp10_ = i;
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					i = _tmp10_ + 1;
#line 1692 "tracker-query.c"
				}
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				_tmp9_ = FALSE;
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				_tmp13_ = str_array;
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				_tmp13__length1 = str_array_length1;
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				if (_tmp13__length1 != -1) {
#line 1702 "tracker-query.c"
					gint _tmp14_;
					gchar** _tmp15_;
					gint _tmp15__length1;
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp14_ = i;
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp15_ = str_array;
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp15__length1 = str_array_length1;
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp12_ = _tmp14_ < _tmp15__length1;
#line 1714 "tracker-query.c"
				} else {
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp12_ = FALSE;
#line 1718 "tracker-query.c"
				}
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				if (_tmp12_) {
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp11_ = TRUE;
#line 1724 "tracker-query.c"
				} else {
					gboolean _tmp16_ = FALSE;
					gchar** _tmp17_;
					gint _tmp17__length1;
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp17_ = str_array;
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp17__length1 = str_array_length1;
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					if (_tmp17__length1 == -1) {
#line 1735 "tracker-query.c"
						gchar** _tmp18_;
						gint _tmp18__length1;
						gint _tmp19_;
						const gchar* _tmp20_;
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
						_tmp18_ = str_array;
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
						_tmp18__length1 = str_array_length1;
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
						_tmp19_ = i;
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
						_tmp20_ = _tmp18_[_tmp19_];
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
						_tmp16_ = _tmp20_ != NULL;
#line 1750 "tracker-query.c"
					} else {
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
						_tmp16_ = FALSE;
#line 1754 "tracker-query.c"
					}
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp11_ = _tmp16_;
#line 1758 "tracker-query.c"
				}
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				if (!_tmp11_) {
#line 1076 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					break;
#line 1764 "tracker-query.c"
				}
#line 1077 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				_tmp22_ = str_array;
#line 1077 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				_tmp22__length1 = str_array_length1;
#line 1077 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				_tmp23_ = i;
#line 1077 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				_tmp24_ = _tmp22_[_tmp23_];
#line 1077 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				if (_tmp24_ != NULL) {
#line 1776 "tracker-query.c"
					gchar** _tmp25_;
					gint _tmp25__length1;
					gint _tmp26_;
					const gchar* _tmp27_;
					gint _tmp28_;
					gint _tmp29_;
#line 1077 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp25_ = str_array;
#line 1077 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp25__length1 = str_array_length1;
#line 1077 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp26_ = i;
#line 1077 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp27_ = _tmp25_[_tmp26_];
#line 1077 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp28_ = strlen ((const gchar*) _tmp27_);
#line 1077 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp29_ = _tmp28_;
#line 1077 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp21_ = _tmp29_;
#line 1797 "tracker-query.c"
				} else {
#line 1077 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp21_ = 0;
#line 1801 "tracker-query.c"
				}
#line 1077 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				_tmp30_ = len;
#line 1077 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				len = _tmp30_ + _tmp21_;
#line 1807 "tracker-query.c"
			}
		}
#line 1079 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp31_ = i;
#line 1079 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		if (_tmp31_ == 0) {
#line 1814 "tracker-query.c"
			gchar* _tmp32_;
#line 1080 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
			_tmp32_ = g_strdup ("");
#line 1080 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
			result = _tmp32_;
#line 1080 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
			return result;
#line 1822 "tracker-query.c"
		}
#line 1082 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp33_ = i;
#line 1082 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		str_array_length1 = _tmp33_;
#line 1082 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp34_ = str_array_length1;
#line 1083 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp35_ = len;
#line 1083 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp36_ = separator;
#line 1083 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp37_ = strlen ((const gchar*) _tmp36_);
#line 1083 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp38_ = _tmp37_;
#line 1083 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp39_ = i;
#line 1083 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		len = _tmp35_ + (_tmp38_ * (_tmp39_ - 1));
#line 1085 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp40_ = len;
#line 1085 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp41_ = g_malloc (_tmp40_);
#line 1085 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		res = _tmp41_;
#line 1086 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp42_ = res;
#line 1086 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp43_ = str_array;
#line 1086 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp43__length1 = str_array_length1;
#line 1086 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp44_ = _tmp43_[0];
#line 1086 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp45_ = g_stpcpy ((void*) _tmp42_, (const gchar*) _tmp44_);
#line 1086 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		ptr = _tmp45_;
#line 1860 "tracker-query.c"
		{
			gboolean _tmp46_;
#line 1087 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
			i = 1;
#line 1087 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
			_tmp46_ = TRUE;
#line 1087 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
			while (TRUE) {
#line 1869 "tracker-query.c"
				gint _tmp48_;
				gchar** _tmp49_;
				gint _tmp49__length1;
				void* _tmp50_;
				const gchar* _tmp51_;
				void* _tmp52_;
				const gchar* _tmp53_ = NULL;
				gchar** _tmp54_;
				gint _tmp54__length1;
				gint _tmp55_;
				const gchar* _tmp56_;
				void* _tmp60_;
				void* _tmp61_;
#line 1087 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				if (!_tmp46_) {
#line 1885 "tracker-query.c"
					gint _tmp47_;
#line 1087 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp47_ = i;
#line 1087 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					i = _tmp47_ + 1;
#line 1891 "tracker-query.c"
				}
#line 1087 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				_tmp46_ = FALSE;
#line 1087 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				_tmp48_ = i;
#line 1087 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				_tmp49_ = str_array;
#line 1087 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				_tmp49__length1 = str_array_length1;
#line 1087 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				if (!(_tmp48_ < _tmp49__length1)) {
#line 1087 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					break;
#line 1905 "tracker-query.c"
				}
#line 1088 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				_tmp50_ = ptr;
#line 1088 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				_tmp51_ = separator;
#line 1088 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				_tmp52_ = g_stpcpy (_tmp50_, (const gchar*) _tmp51_);
#line 1088 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				ptr = _tmp52_;
#line 1089 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				_tmp54_ = str_array;
#line 1089 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				_tmp54__length1 = str_array_length1;
#line 1089 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				_tmp55_ = i;
#line 1089 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				_tmp56_ = _tmp54_[_tmp55_];
#line 1089 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				if (_tmp56_ != NULL) {
#line 1925 "tracker-query.c"
					gchar** _tmp57_;
					gint _tmp57__length1;
					gint _tmp58_;
					const gchar* _tmp59_;
#line 1089 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp57_ = str_array;
#line 1089 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp57__length1 = str_array_length1;
#line 1089 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp58_ = i;
#line 1089 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp59_ = _tmp57_[_tmp58_];
#line 1089 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp53_ = (const gchar*) _tmp59_;
#line 1940 "tracker-query.c"
				} else {
#line 1089 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
					_tmp53_ = "";
#line 1944 "tracker-query.c"
				}
#line 1089 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				_tmp60_ = ptr;
#line 1089 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				_tmp61_ = g_stpcpy (_tmp60_, _tmp53_);
#line 1089 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
				ptr = _tmp61_;
#line 1952 "tracker-query.c"
			}
		}
#line 1092 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp62_ = res;
#line 1092 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		res = NULL;
#line 1092 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		result = (gchar*) _tmp62_;
#line 1092 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		return result;
#line 1963 "tracker-query.c"
	} else {
		gchar* _tmp63_;
#line 1094 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		_tmp63_ = g_strdup ("");
#line 1094 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		result = _tmp63_;
#line 1094 "/home/carlos/Build/gnome/share/vala-0.36/vapi/glib-2.0.vapi"
		return result;
#line 1972 "tracker-query.c"
	}
}


static void tracker_query_perform_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) {
	TrackerQueryPerformAsyncData* _data_;
#line 401 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_ = _user_data_;
#line 401 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_source_object_ = source_object;
#line 401 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_res_ = _res_;
#line 401 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	tracker_query_perform_async_co (_data_);
#line 1987 "tracker-query.c"
}


static gboolean tracker_query_perform_async_co (TrackerQueryPerformAsyncData* _data_) {
#line 339 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	switch (_data_->_state_) {
#line 339 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		case 0:
#line 1996 "tracker-query.c"
		goto _state_0;
#line 339 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		case 1:
#line 2000 "tracker-query.c"
		goto _state_1;
		default:
#line 339 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_assert_not_reached ();
#line 2005 "tracker-query.c"
	}
	_state_0:
#line 339 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp0_ = tracker_query_connection;
#line 339 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_vala_return_val_if_fail (_data_->_tmp0_ != NULL, "connection != null", FALSE);
#line 341 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->cursor = NULL;
#line 343 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp1_ = _data_->query_type;
#line 343 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp2_ = _data_->match_type;
#line 343 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp3_ = tracker_query_check_query_and_match_type (_data_->self, _data_->_tmp1_, _data_->_tmp2_);
#line 343 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (!_data_->_tmp3_) {
#line 344 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->result = NULL;
#line 344 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_g_object_unref0 (_data_->cursor);
#line 344 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 344 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (_data_->_state_ != 0) {
#line 344 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 344 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 2034 "tracker-query.c"
			}
		}
#line 344 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_object_unref (_data_->_async_result);
#line 344 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		return FALSE;
#line 2041 "tracker-query.c"
	}
#line 348 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp5_ = _data_->self->priv->_tags;
#line 348 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_tmp5_ != NULL) {
#line 348 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp6_ = _data_->self->priv->_tags;
#line 348 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp7_ = g_ptr_array_get_length (_data_->_tmp6_);
#line 348 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp8_ = _data_->_tmp7_;
#line 348 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp4_ = _data_->_tmp8_ > 0;
#line 2055 "tracker-query.c"
	} else {
#line 348 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp4_ = FALSE;
#line 2059 "tracker-query.c"
	}
#line 348 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_tmp4_) {
#line 349 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp10_ = _data_->match_type;
#line 349 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (_data_->_tmp10_ == TRACKER_QUERY_MATCH_FTS_INDIRECT) {
#line 349 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp9_ = TRUE;
#line 2069 "tracker-query.c"
		} else {
#line 350 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp11_ = _data_->match_type;
#line 350 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp9_ = _data_->_tmp11_ == TRACKER_QUERY_MATCH_TITLES_INDIRECT;
#line 2075 "tracker-query.c"
		}
#line 349 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (_data_->_tmp9_) {
#line 351 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->match_type = TRACKER_QUERY_MATCH_TAGS_ONLY_INDIRECT;
#line 2081 "tracker-query.c"
		} else {
#line 353 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->match_type = TRACKER_QUERY_MATCH_TAGS_ONLY;
#line 2085 "tracker-query.c"
		}
	}
#line 357 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp15_ = _data_->match_type;
#line 357 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_tmp15_ != TRACKER_QUERY_MATCH_NONE) {
#line 358 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp16_ = _data_->match_type;
#line 358 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp14_ = _data_->_tmp16_ != TRACKER_QUERY_MATCH_TAGS_ONLY;
#line 2096 "tracker-query.c"
	} else {
#line 357 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp14_ = FALSE;
#line 2100 "tracker-query.c"
	}
#line 357 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_tmp14_) {
#line 359 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp17_ = _data_->match_type;
#line 359 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp13_ = _data_->_tmp17_ != TRACKER_QUERY_MATCH_TAGS_ONLY_INDIRECT;
#line 2108 "tracker-query.c"
	} else {
#line 357 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp13_ = FALSE;
#line 2112 "tracker-query.c"
	}
#line 357 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_tmp13_) {
#line 360 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp19_ = _data_->self->priv->_criteria;
#line 360 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (_data_->_tmp19_ == NULL) {
#line 360 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp18_ = TRUE;
#line 2122 "tracker-query.c"
		} else {
#line 360 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp20_ = _data_->self->priv->_criteria;
#line 360 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp21_ = strlen (_data_->_tmp20_);
#line 360 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp22_ = _data_->_tmp21_;
#line 360 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp18_ = _data_->_tmp22_ < 1;
#line 2132 "tracker-query.c"
		}
#line 360 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp12_ = _data_->_tmp18_;
#line 2136 "tracker-query.c"
	} else {
#line 357 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp12_ = FALSE;
#line 2140 "tracker-query.c"
	}
#line 357 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_tmp12_) {
#line 361 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_warning ("tracker-query.vala:361: Criteria was NULL or an empty string no query " \
"performed");
#line 362 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->result = NULL;
#line 362 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_g_object_unref0 (_data_->cursor);
#line 362 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 362 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (_data_->_state_ != 0) {
#line 362 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 362 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 2158 "tracker-query.c"
			}
		}
#line 362 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_object_unref (_data_->_async_result);
#line 362 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		return FALSE;
#line 2165 "tracker-query.c"
	}
#line 365 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp23_ = _data_->self->priv->_limit;
#line 365 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_tmp23_ < ((guint) 1)) {
#line 366 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_warning ("tracker-query.vala:366: Limit was < 1, no query performed");
#line 367 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->result = NULL;
#line 367 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_g_object_unref0 (_data_->cursor);
#line 367 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 367 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (_data_->_state_ != 0) {
#line 367 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 367 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 2185 "tracker-query.c"
			}
		}
#line 367 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_object_unref (_data_->_async_result);
#line 367 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		return FALSE;
#line 2192 "tracker-query.c"
	}
#line 372 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp25_ = _data_->match_type;
#line 372 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_tmp25_ == TRACKER_QUERY_MATCH_TAGS_ONLY) {
#line 372 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp24_ = TRUE;
#line 2200 "tracker-query.c"
	} else {
#line 373 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp26_ = _data_->match_type;
#line 373 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp24_ = _data_->_tmp26_ == TRACKER_QUERY_MATCH_TAGS_ONLY_INDIRECT;
#line 2206 "tracker-query.c"
	}
#line 372 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_tmp24_) {
#line 374 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp27_ = _data_->self->priv->match_clauses;
#line 374 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp27__length1 = _data_->self->priv->match_clauses_length1;
#line 374 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp28_ = _data_->match_type;
#line 374 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp29_ = _data_->_tmp27_[_data_->_tmp28_];
#line 374 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp30_ = tracker_query_get_tags_filter (_data_->self);
#line 374 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp31_ = _data_->_tmp30_;
#line 374 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp32_ = g_strdup_printf (_data_->_tmp29_, _data_->_tmp31_);
#line 374 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_free (_data_->match);
#line 374 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->match = _data_->_tmp32_;
#line 374 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_free (_data_->_tmp31_);
#line 2230 "tracker-query.c"
	} else {
#line 376 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp33_ = _data_->self->priv->_criteria;
#line 376 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp34_ = tracker_sparql_escape_string (_data_->_tmp33_);
#line 376 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->criteria_escaped = _data_->_tmp34_;
#line 379 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp36_ = _data_->match_type;
#line 379 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (_data_->_tmp36_ == TRACKER_QUERY_MATCH_FTS) {
#line 379 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp35_ = TRUE;
#line 2244 "tracker-query.c"
		} else {
#line 380 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp37_ = _data_->match_type;
#line 380 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp35_ = _data_->_tmp37_ == TRACKER_QUERY_MATCH_FTS_INDIRECT;
#line 2250 "tracker-query.c"
		}
#line 379 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (_data_->_tmp35_) {
#line 381 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp38_ = _data_->self->priv->match_clauses;
#line 381 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp38__length1 = _data_->self->priv->match_clauses_length1;
#line 381 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp39_ = _data_->match_type;
#line 381 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp40_ = _data_->_tmp38_[_data_->_tmp39_];
#line 381 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp41_ = _data_->criteria_escaped;
#line 381 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp42_ = _data_->criteria_escaped;
#line 381 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp43_ = g_strdup_printf (_data_->_tmp40_, _data_->_tmp41_, _data_->_tmp42_);
#line 381 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			g_free (_data_->match);
#line 381 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->match = _data_->_tmp43_;
#line 2272 "tracker-query.c"
		} else {
#line 383 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp44_ = _data_->self->priv->match_clauses;
#line 383 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp44__length1 = _data_->self->priv->match_clauses_length1;
#line 383 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp45_ = _data_->match_type;
#line 383 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp46_ = _data_->_tmp44_[_data_->_tmp45_];
#line 383 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp47_ = _data_->criteria_escaped;
#line 383 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->_tmp48_ = g_strdup_printf (_data_->_tmp46_, _data_->_tmp47_);
#line 383 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			g_free (_data_->match);
#line 383 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_data_->match = _data_->_tmp48_;
#line 2290 "tracker-query.c"
		}
#line 372 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_free (_data_->criteria_escaped);
#line 2294 "tracker-query.c"
	}
#line 387 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp49_ = _data_->args;
#line 387 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp49__length1 = _data_->args_length1;
#line 387 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp50_ = _vala_g_strjoinv (" ", _data_->_tmp49_, _data_->_tmp49__length1);
#line 387 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp51_ = _data_->_tmp50_;
#line 387 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp52_ = g_strconcat ("SELECT ", _data_->_tmp51_, NULL);
#line 387 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp53_ = _data_->_tmp52_;
#line 387 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	tracker_query_set_query (_data_->self, _data_->_tmp53_);
#line 387 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_free (_data_->_tmp53_);
#line 387 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_free (_data_->_tmp51_);
#line 388 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp54_ = _data_->self->priv->where_clauses;
#line 388 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp54__length1 = _data_->self->priv->where_clauses_length1;
#line 388 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp55_ = _data_->query_type;
#line 388 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp56_ = _data_->_tmp54_[_data_->_tmp55_];
#line 388 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp57_ = strlen (_data_->_tmp56_);
#line 388 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp58_ = _data_->_tmp57_;
#line 388 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_tmp58_ > 0) {
#line 389 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp59_ = _data_->self->priv->_query;
#line 389 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp60_ = _data_->self->priv->where_clauses;
#line 389 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp60__length1 = _data_->self->priv->where_clauses_length1;
#line 389 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp61_ = _data_->query_type;
#line 389 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp62_ = _data_->_tmp60_[_data_->_tmp61_];
#line 389 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp63_ = _data_->match;
#line 389 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp64_ = g_strdup_printf (_data_->_tmp62_, _data_->_tmp63_);
#line 389 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp65_ = _data_->_tmp64_;
#line 389 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp66_ = g_strconcat (" ", _data_->_tmp65_, NULL);
#line 389 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp67_ = _data_->_tmp66_;
#line 389 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp68_ = g_strconcat (_data_->_tmp59_, _data_->_tmp67_, NULL);
#line 389 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp69_ = _data_->_tmp68_;
#line 389 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		tracker_query_set_query (_data_->self, _data_->_tmp69_);
#line 389 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_free (_data_->_tmp69_);
#line 389 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_free (_data_->_tmp67_);
#line 389 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_free (_data_->_tmp65_);
#line 2360 "tracker-query.c"
	}
#line 392 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp70_ = _data_->self->priv->sort_clauses;
#line 392 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp70__length1 = _data_->self->priv->sort_clauses_length1;
#line 392 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp71_ = _data_->query_type;
#line 392 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp72_ = _data_->_tmp70_[_data_->_tmp71_];
#line 392 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp73_ = strlen (_data_->_tmp72_);
#line 392 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp74_ = _data_->_tmp73_;
#line 392 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_tmp74_ > 0) {
#line 393 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp75_ = _data_->self->priv->_query;
#line 393 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp76_ = _data_->self->priv->sort_clauses;
#line 393 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp76__length1 = _data_->self->priv->sort_clauses_length1;
#line 393 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp77_ = _data_->query_type;
#line 393 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp78_ = _data_->_tmp76_[_data_->_tmp77_];
#line 393 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp79_ = g_strconcat (" ORDER BY ", _data_->_tmp78_, NULL);
#line 393 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp80_ = _data_->_tmp79_;
#line 393 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp81_ = g_strconcat (_data_->_tmp75_, _data_->_tmp80_, NULL);
#line 393 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp82_ = _data_->_tmp81_;
#line 393 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		tracker_query_set_query (_data_->self, _data_->_tmp82_);
#line 393 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_free (_data_->_tmp82_);
#line 393 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_free (_data_->_tmp80_);
#line 2400 "tracker-query.c"
	}
#line 396 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp83_ = _data_->self->priv->_query;
#line 396 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp84_ = _data_->self->priv->_offset;
#line 396 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp85_ = _data_->self->priv->_limit;
#line 396 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp86_ = g_strdup_printf (" OFFSET %u LIMIT %u", _data_->_tmp84_, _data_->_tmp85_);
#line 396 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp87_ = _data_->_tmp86_;
#line 396 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp88_ = g_strconcat (_data_->_tmp83_, _data_->_tmp87_, NULL);
#line 396 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp89_ = _data_->_tmp88_;
#line 396 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	tracker_query_set_query (_data_->self, _data_->_tmp89_);
#line 396 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_free (_data_->_tmp89_);
#line 396 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_free (_data_->_tmp87_);
#line 398 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->_tmp90_ = _data_->self->priv->_query;
#line 398 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_debug ("tracker-query.vala:398: Running query: '%s'", _data_->_tmp90_);
#line 2426 "tracker-query.c"
	{
#line 401 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp92_ = tracker_query_connection;
#line 401 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp93_ = _data_->self->priv->_query;
#line 401 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_state_ = 1;
#line 401 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		tracker_sparql_connection_query_async (_data_->_tmp92_, _data_->_tmp93_, NULL, tracker_query_perform_async_ready, _data_);
#line 401 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		return FALSE;
#line 2438 "tracker-query.c"
		_state_1:
#line 401 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp94_ = tracker_sparql_connection_query_finish (_data_->_tmp92_, _data_->_res_, &_data_->_inner_error_);
#line 401 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp91_ = _data_->_tmp94_;
#line 401 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 2446 "tracker-query.c"
			goto __catch5_g_error;
		}
#line 401 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp95_ = _data_->_tmp91_;
#line 401 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp91_ = NULL;
#line 401 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_g_object_unref0 (_data_->cursor);
#line 401 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->cursor = _data_->_tmp95_;
#line 400 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_g_object_unref0 (_data_->_tmp91_);
#line 2459 "tracker-query.c"
	}
	goto __finally5;
	__catch5_g_error:
	{
#line 400 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->e = _data_->_inner_error_;
#line 400 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_inner_error_ = NULL;
#line 403 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp96_ = _data_->e;
#line 403 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_data_->_tmp97_ = _data_->_tmp96_->message;
#line 403 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_warning ("tracker-query.vala:403: Could not run Sparql query: %s", _data_->_tmp97_);
#line 400 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		_g_error_free0 (_data_->e);
#line 2476 "tracker-query.c"
	}
	__finally5:
#line 400 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (G_UNLIKELY (_data_->_inner_error_ != NULL)) {
#line 400 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (_data_->_inner_error_->domain == G_IO_ERROR) {
#line 400 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			g_task_return_error (_data_->_async_result, _data_->_inner_error_);
#line 400 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			g_free (_data_->match);
#line 400 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_g_object_unref0 (_data_->cursor);
#line 400 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			g_object_unref (_data_->_async_result);
#line 400 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			return FALSE;
#line 2493 "tracker-query.c"
		} else {
#line 400 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			g_free (_data_->match);
#line 400 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			_g_object_unref0 (_data_->cursor);
#line 400 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error_->message, g_quark_to_string (_data_->_inner_error_->domain), _data_->_inner_error_->code);
#line 400 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			g_clear_error (&_data_->_inner_error_);
#line 400 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			return FALSE;
#line 2505 "tracker-query.c"
		}
	}
#line 406 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_debug ("tracker-query.vala:406: Done");
#line 408 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_data_->result = _data_->cursor;
#line 408 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_free (_data_->match);
#line 408 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 408 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_state_ != 0) {
#line 408 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 408 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 2522 "tracker-query.c"
		}
	}
#line 408 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_object_unref (_data_->_async_result);
#line 408 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return FALSE;
#line 339 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_free (_data_->match);
#line 339 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_g_object_unref0 (_data_->cursor);
#line 339 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
#line 339 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (_data_->_state_ != 0) {
#line 339 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		while (g_task_get_completed (_data_->_async_result) != TRUE) {
#line 339 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
#line 2541 "tracker-query.c"
		}
	}
#line 339 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_object_unref (_data_->_async_result);
#line 339 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return FALSE;
#line 2548 "tracker-query.c"
}


const gchar* tracker_query_get_criteria (TrackerQuery* self) {
	const gchar* result;
	const gchar* _tmp0_;
#line 216 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 216 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp0_ = self->priv->_criteria;
#line 216 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	result = _tmp0_;
#line 216 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return result;
#line 2563 "tracker-query.c"
}


void tracker_query_set_criteria (TrackerQuery* self, const gchar* value) {
	const gchar* _tmp0_;
	gchar* _tmp1_;
#line 216 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_return_if_fail (self != NULL);
#line 216 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp0_ = value;
#line 216 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 216 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_free (self->priv->_criteria);
#line 216 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	self->priv->_criteria = _tmp1_;
#line 2580 "tracker-query.c"
}


guint tracker_query_get_offset (TrackerQuery* self) {
	guint result;
	guint _tmp0_;
#line 217 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_return_val_if_fail (self != NULL, 0U);
#line 217 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp0_ = self->priv->_offset;
#line 217 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	result = _tmp0_;
#line 217 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return result;
#line 2595 "tracker-query.c"
}


void tracker_query_set_offset (TrackerQuery* self, guint value) {
	guint _tmp0_;
#line 217 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_return_if_fail (self != NULL);
#line 217 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp0_ = value;
#line 217 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	self->priv->_offset = _tmp0_;
#line 2607 "tracker-query.c"
}


guint tracker_query_get_limit (TrackerQuery* self) {
	guint result;
	guint _tmp0_;
#line 218 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_return_val_if_fail (self != NULL, 0U);
#line 218 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp0_ = self->priv->_limit;
#line 218 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	result = _tmp0_;
#line 218 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return result;
#line 2622 "tracker-query.c"
}


void tracker_query_set_limit (TrackerQuery* self, guint value) {
	guint _tmp0_;
#line 218 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_return_if_fail (self != NULL);
#line 218 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp0_ = value;
#line 218 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	self->priv->_limit = _tmp0_;
#line 2634 "tracker-query.c"
}


const gchar* tracker_query_get_query (TrackerQuery* self) {
	const gchar* result;
	const gchar* _tmp0_;
#line 219 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 219 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp0_ = self->priv->_query;
#line 219 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	result = _tmp0_;
#line 219 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return result;
#line 2649 "tracker-query.c"
}


static void tracker_query_set_query (TrackerQuery* self, const gchar* value) {
	const gchar* _tmp0_;
	gchar* _tmp1_;
#line 219 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_return_if_fail (self != NULL);
#line 219 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp0_ = value;
#line 219 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 219 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_free (self->priv->_query);
#line 219 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	self->priv->_query = _tmp1_;
#line 2666 "tracker-query.c"
}


GPtrArray* tracker_query_get_tags (TrackerQuery* self) {
	GPtrArray* result;
	GPtrArray* _tmp0_;
#line 221 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_return_val_if_fail (self != NULL, NULL);
#line 221 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp0_ = self->priv->_tags;
#line 221 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	result = _tmp0_;
#line 221 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return result;
#line 2681 "tracker-query.c"
}


static gpointer _g_ptr_array_ref0 (gpointer self) {
#line 221 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return self ? g_ptr_array_ref (self) : NULL;
#line 2688 "tracker-query.c"
}


void tracker_query_set_tags (TrackerQuery* self, GPtrArray* value) {
	GPtrArray* _tmp0_;
	GPtrArray* _tmp1_;
#line 221 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_return_if_fail (self != NULL);
#line 221 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp0_ = value;
#line 221 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp1_ = _g_ptr_array_ref0 (_tmp0_);
#line 221 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_g_ptr_array_unref0 (self->priv->_tags);
#line 221 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	self->priv->_tags = _tmp1_;
#line 2705 "tracker-query.c"
}


static void tracker_value_query_init (GValue* value) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	value->data[0].v_pointer = NULL;
#line 2712 "tracker-query.c"
}


static void tracker_value_query_free_value (GValue* value) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (value->data[0].v_pointer) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		tracker_query_unref (value->data[0].v_pointer);
#line 2721 "tracker-query.c"
	}
}


static void tracker_value_query_copy_value (const GValue* src_value, GValue* dest_value) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (src_value->data[0].v_pointer) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		dest_value->data[0].v_pointer = tracker_query_ref (src_value->data[0].v_pointer);
#line 2731 "tracker-query.c"
	} else {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		dest_value->data[0].v_pointer = NULL;
#line 2735 "tracker-query.c"
	}
}


static gpointer tracker_value_query_peek_pointer (const GValue* value) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return value->data[0].v_pointer;
#line 2743 "tracker-query.c"
}


static gchar* tracker_value_query_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (collect_values[0].v_pointer) {
#line 2750 "tracker-query.c"
		TrackerQuery * object;
		object = collect_values[0].v_pointer;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		if (object->parent_instance.g_class == NULL) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 2757 "tracker-query.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 2761 "tracker-query.c"
		}
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		value->data[0].v_pointer = tracker_query_ref (object);
#line 2765 "tracker-query.c"
	} else {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		value->data[0].v_pointer = NULL;
#line 2769 "tracker-query.c"
	}
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return NULL;
#line 2773 "tracker-query.c"
}


static gchar* tracker_value_query_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	TrackerQuery ** object_p;
	object_p = collect_values[0].v_pointer;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (!object_p) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 2784 "tracker-query.c"
	}
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (!value->data[0].v_pointer) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		*object_p = NULL;
#line 2790 "tracker-query.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		*object_p = value->data[0].v_pointer;
#line 2794 "tracker-query.c"
	} else {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		*object_p = tracker_query_ref (value->data[0].v_pointer);
#line 2798 "tracker-query.c"
	}
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return NULL;
#line 2802 "tracker-query.c"
}


GParamSpec* tracker_param_spec_query (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	TrackerParamSpecQuery* spec;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_return_val_if_fail (g_type_is_a (object_type, TRACKER_TYPE_QUERY), NULL);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return G_PARAM_SPEC (spec);
#line 2816 "tracker-query.c"
}


gpointer tracker_value_get_query (const GValue* value) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_TYPE_QUERY), NULL);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return value->data[0].v_pointer;
#line 2825 "tracker-query.c"
}


void tracker_value_set_query (GValue* value, gpointer v_object) {
	TrackerQuery * old;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_TYPE_QUERY));
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	old = value->data[0].v_pointer;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (v_object) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TRACKER_TYPE_QUERY));
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		value->data[0].v_pointer = v_object;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		tracker_query_ref (value->data[0].v_pointer);
#line 2845 "tracker-query.c"
	} else {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		value->data[0].v_pointer = NULL;
#line 2849 "tracker-query.c"
	}
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (old) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		tracker_query_unref (old);
#line 2855 "tracker-query.c"
	}
}


void tracker_value_take_query (GValue* value, gpointer v_object) {
	TrackerQuery * old;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_TYPE_QUERY));
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	old = value->data[0].v_pointer;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (v_object) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TRACKER_TYPE_QUERY));
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		value->data[0].v_pointer = v_object;
#line 2874 "tracker-query.c"
	} else {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		value->data[0].v_pointer = NULL;
#line 2878 "tracker-query.c"
	}
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (old) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		tracker_query_unref (old);
#line 2884 "tracker-query.c"
	}
}


static void tracker_query_class_init (TrackerQueryClass * klass) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	tracker_query_parent_class = g_type_class_peek_parent (klass);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	((TrackerQueryClass *) klass)->finalize = tracker_query_finalize;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_type_class_add_private (klass, sizeof (TrackerQueryPrivate));
#line 2896 "tracker-query.c"
}


static void tracker_query_instance_init (TrackerQuery * self) {
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	gchar* _tmp5_;
	gchar* _tmp6_;
	gchar** _tmp7_;
	gchar* _tmp8_;
	gchar* _tmp9_;
	gchar* _tmp10_;
	gchar* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	gchar* _tmp14_;
	gchar* _tmp15_;
	gchar* _tmp16_;
	gchar* _tmp17_;
	gchar* _tmp18_;
	gchar** _tmp19_;
	gchar* _tmp20_;
	gchar* _tmp21_;
	gchar* _tmp22_;
	gchar* _tmp23_;
	gchar* _tmp24_;
	gchar* _tmp25_;
	gchar* _tmp26_;
	gchar* _tmp27_;
	gchar* _tmp28_;
	gchar* _tmp29_;
	gchar* _tmp30_;
	gchar** _tmp31_;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	self->priv = TRACKER_QUERY_GET_PRIVATE (self);
#line 47 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp0_ = g_strdup ("");
#line 47 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp1_ = g_strdup ("{\n" \
"		   ?urn fts:match \"%s\"\n" \
"		 } UNION {\n" \
"		   ?urn nao:hasTag ?tag .\n" \
"                   FILTER (fn:contains (fn:lower-case (nao:prefLabel(?" \
"tag)), \"%s\"))\n" \
"		 }");
#line 47 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp2_ = g_strdup ("{\n" \
"		   ?match fts:match \"%s\"\n" \
"		 } UNION {\n" \
"		   ?match nao:hasTag ?tag .\n" \
"                   FILTER (fn:contains (fn:lower-case (nao:prefLabel(?" \
"tag)), \"%s\"))\n" \
"		 }");
#line 47 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp3_ = g_strdup ("FILTER (fn:contains (fn:lower-case (nfo:fileName(?urn)), \"%s\"))");
#line 47 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp4_ = g_strdup ("FILTER (fn:contains (fn:lower-case (nie:title(?match)), \"%s\"))");
#line 47 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp5_ = g_strdup ("?urn nao:hasTag ?tag .\n		 FILTER (nao:prefLabel(?tag) IN (%s))");
#line 47 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp6_ = g_strdup ("?match nao:hasTag ?tag .\n		 FILTER (nao:prefLabel(?tag) IN (%s))");
#line 47 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp7_ = g_new0 (gchar*, 7 + 1);
#line 47 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp7_[0] = _tmp0_;
#line 47 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp7_[1] = _tmp1_;
#line 47 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp7_[2] = _tmp2_;
#line 47 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp7_[3] = _tmp3_;
#line 47 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp7_[4] = _tmp4_;
#line 47 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp7_[5] = _tmp5_;
#line 47 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp7_[6] = _tmp6_;
#line 47 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	self->priv->match_clauses = _tmp7_;
#line 47 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	self->priv->match_clauses_length1 = 7;
#line 47 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	self->priv->_match_clauses_size_ = self->priv->match_clauses_length1;
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp8_ = g_strdup ("WHERE {\n" \
"		  %s .\n" \
"		  ?urn nfo:belongsToContainer ?parent ;\n" \
"		  tracker:available true .\n" \
"		}");
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp9_ = g_strdup ("");
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp10_ = g_strdup ("WHERE {\n		  ?urn a nfo:Software .\n		  %s\n		}");
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp11_ = g_strdup ("WHERE {\n" \
"		  {\n" \
"		    ?urn nmm:musicAlbum ?match\n" \
"		  } UNION {\n" \
"		    ?urn nmm:performer ?match\n" \
"		  } UNION {\n" \
"		    ?urn a nfo:Audio .\n" \
"		    ?match a nfo:Audio\n" \
"		    FILTER (?urn = ?match)\n" \
"		  }\n" \
"		  %s .\n" \
"		  ?urn nmm:performer [ nmm:artistName ?performer ] ;\n" \
"		       nmm:musicAlbum [ nie:title ?album ] ;\n" \
"		       nie:url ?tooltip .\n" \
"		}");
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp12_ = g_strdup ("WHERE {\n" \
"		  ?urn a nfo:Image ;\n" \
"		         nie:url ?tooltip .\n" \
"		  %s\n" \
"		}");
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp13_ = g_strdup ("WHERE {\n" \
"		  ?urn a nfo:Video ;\n" \
"		         nie:url ?tooltip .\n" \
"		  %s\n" \
"		}");
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp14_ = g_strdup ("WHERE {\n" \
"		  {\n" \
"		    ?urn nco:creator ?match\n" \
"		  } UNION {\n" \
"		    ?urn nco:publisher ?match\n" \
"		  } UNION {\n" \
"		    ?urn a nfo:Document .\n" \
"		    FILTER (! EXISTS { ?urn a nmo:Email } )\n" \
"		    ?match a nfo:Document\n" \
"		    FILTER (?urn = ?match)\n" \
"		  }\n" \
"		  %s .\n" \
"		  ?urn nie:url ?tooltip .\n" \
"		  OPTIONAL {\n" \
"		    ?urn nco:creator ?creator .\n" \
"		  }\n" \
"		  OPTIONAL {\n" \
"		    ?urn nco:publisher ?publisher .\n" \
"		  }\n" \
"		}");
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp15_ = g_strdup ("WHERE {\n" \
"		  ?urn a nmo:Email ;\n" \
"		         nmo:from ?sender ;\n" \
"		         nmo:to ?to .\n" \
"		  %s\n" \
"		}");
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp16_ = g_strdup ("");
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp17_ = g_strdup ("WHERE {\n" \
"		  ?urn a nfo:Folder ;\n" \
"		         nie:url ?tooltip .\n" \
"		  %s\n" \
"		  OPTIONAL {\n" \
"		    ?urn nfo:belongsToContainer ?parent .\n" \
"		  }\n" \
"		}");
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp18_ = g_strdup ("WHERE {\n" \
"		  ?urn a nfo:Bookmark ;\n" \
"                         nfo:bookmarks ?bookmark .\n" \
"		  %s\n" \
"		}");
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp19_ = g_new0 (gchar*, 11 + 1);
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp19_[0] = _tmp8_;
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp19_[1] = _tmp9_;
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp19_[2] = _tmp10_;
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp19_[3] = _tmp11_;
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp19_[4] = _tmp12_;
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp19_[5] = _tmp13_;
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp19_[6] = _tmp14_;
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp19_[7] = _tmp15_;
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp19_[8] = _tmp16_;
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp19_[9] = _tmp17_;
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp19_[10] = _tmp18_;
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	self->priv->where_clauses = _tmp19_;
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	self->priv->where_clauses_length1 = 11;
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	self->priv->_where_clauses_size_ = self->priv->where_clauses_length1;
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp20_ = g_strdup ("DESC(nfo:fileLastModified(?urn)) DESC(nie:contentCreated(?urn)) ASC(ni" \
"e:title(?urn))");
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp21_ = g_strdup ("ASC(nco:fullname(?urn))");
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp22_ = g_strdup ("ASC(nie:title(?urn)) ASC(nie:comment(?urn))");
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp23_ = g_strdup ("DESC(nfo:fileLastModified(?urn)) ASC(nie:title(?urn))");
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp24_ = g_strdup ("DESC(nfo:fileLastModified(?urn)) ASC(nie:title(?urn))");
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp25_ = g_strdup ("DESC(nfo:fileLastModified(?urn)) ASC(nie:title(?urn))");
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp26_ = g_strdup ("DESC(nfo:fileLastModified(?urn)) ASC(nie:title(?urn))");
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp27_ = g_strdup ("DESC(nmo:receivedDate(?urn)) ASC(nmo:messageSubject(?urn))");
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp28_ = g_strdup ("DESC(nie:contentCreated(?urn))");
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp29_ = g_strdup ("DESC(nfo:fileLastModified(?urn)) ASC(nie:title(?urn))");
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp30_ = g_strdup ("DESC(nie:contentLastModified(?urn)) ASC(nie:title(?urn))");
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp31_ = g_new0 (gchar*, 11 + 1);
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp31_[0] = _tmp20_;
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp31_[1] = _tmp21_;
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp31_[2] = _tmp22_;
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp31_[3] = _tmp23_;
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp31_[4] = _tmp24_;
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp31_[5] = _tmp25_;
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp31_[6] = _tmp26_;
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp31_[7] = _tmp27_;
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp31_[8] = _tmp28_;
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp31_[9] = _tmp29_;
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_tmp31_[10] = _tmp30_;
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	self->priv->sort_clauses = _tmp31_;
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	self->priv->sort_clauses_length1 = 11;
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	self->priv->_sort_clauses_size_ = self->priv->sort_clauses_length1;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	self->ref_count = 1;
#line 3077 "tracker-query.c"
}


static void tracker_query_finalize (TrackerQuery * obj) {
	TrackerQuery * self;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_TYPE_QUERY, TrackerQuery);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_signal_handlers_destroy (self);
#line 47 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	self->priv->match_clauses = (_vala_array_free (self->priv->match_clauses, self->priv->match_clauses_length1, (GDestroyNotify) g_free), NULL);
#line 82 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	self->priv->where_clauses = (_vala_array_free (self->priv->where_clauses, self->priv->where_clauses_length1, (GDestroyNotify) g_free), NULL);
#line 181 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	self->priv->sort_clauses = (_vala_array_free (self->priv->sort_clauses, self->priv->sort_clauses_length1, (GDestroyNotify) g_free), NULL);
#line 216 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_free (self->priv->_criteria);
#line 219 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_free (self->priv->_query);
#line 221 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	_g_ptr_array_unref0 (self->priv->_tags);
#line 3099 "tracker-query.c"
}


GType tracker_query_get_type (void) {
	static volatile gsize tracker_query_type_id__volatile = 0;
	if (g_once_init_enter (&tracker_query_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { tracker_value_query_init, tracker_value_query_free_value, tracker_value_query_copy_value, tracker_value_query_peek_pointer, "p", tracker_value_query_collect_value, "p", tracker_value_query_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (TrackerQueryClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_query_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerQuery), 0, (GInstanceInitFunc) tracker_query_instance_init, &g_define_type_value_table };
		static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
		GType tracker_query_type_id;
		tracker_query_type_id = g_type_register_fundamental (g_type_fundamental_next (), "TrackerQuery", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&tracker_query_type_id__volatile, tracker_query_type_id);
	}
	return tracker_query_type_id__volatile;
}


gpointer tracker_query_ref (gpointer instance) {
	TrackerQuery * self;
	self = instance;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	g_atomic_int_inc (&self->ref_count);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	return instance;
#line 3124 "tracker-query.c"
}


void tracker_query_unref (gpointer instance) {
	TrackerQuery * self;
	self = instance;
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		TRACKER_QUERY_GET_CLASS (self)->finalize (self);
#line 22 "/home/carlos/Source/gnome/tracker/src/tracker-needle/tracker-query.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 3137 "tracker-query.c"
	}
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}



