tracker-0.16.2/src/libtracker-sparql-backend/tracker-backend.c

Location Tool Test ID Function Issue
tracker-backend.c:558:3 gcc unused-label tracker_sparql_backend_real_dispose label '__finally1' defined but not used
tracker-backend.c:1204:39 gcc unused-but-set-variable tracker_sparql_backend_real_update_finish variable '_data_' set but not used
tracker-backend.c:1212:2 clang-analyzer Value stored to '_data_' is never read
tracker-backend.c:2007:37 gcc unused-but-set-variable tracker_sparql_backend_real_load_finish variable '_data_' set but not used
tracker-backend.c:2015:2 clang-analyzer Value stored to '_data_' is never read
   1 /* tracker-backend.c generated by valac 0.18.1, the Vala compiler
   2  * generated from tracker-backend.vala, do not modify */
   3 
   4 /*
   5  * Copyright (C) 2010, Nokia <ivan.frade@nokia.com>
   6  *
   7  * This library is free software; you can redistribute it and/or
   8  * modify it under the terms of the GNU Lesser General Public
   9  * License as published by the Free Software Foundation; either
  10  * version 2.1 of the License, or (at your option) any later version.
  11  *
  12  * This library is distributed in the hope that it will be useful,
  13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  15  * Lesser General Public License for more details.
  16  *
  17  * You should have received a copy of the GNU Lesser General Public
  18  * License along with this library; if not, write to the
  19  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  20  * Boston, MA  02110-1301, USA.
  21  */
  22 
  23 #include <glib.h>
  24 #include <glib-object.h>
  25 #include "libtracker-sparql/tracker-sparql.h"
  26 #include <gio/gio.h>
  27 #include <stdlib.h>
  28 #include <string.h>
  29 #include "libtracker-direct/tracker-direct.h"
  30 #include "libtracker-bus/tracker-bus.h"
  31 
  32 
  33 #define TRACKER_SPARQL_TYPE_BACKEND (tracker_sparql_backend_get_type ())
  34 #define TRACKER_SPARQL_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_SPARQL_TYPE_BACKEND, TrackerSparqlBackend))
  35 #define TRACKER_SPARQL_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_SPARQL_TYPE_BACKEND, TrackerSparqlBackendClass))
  36 #define TRACKER_SPARQL_IS_BACKEND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_SPARQL_TYPE_BACKEND))
  37 #define TRACKER_SPARQL_IS_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_SPARQL_TYPE_BACKEND))
  38 #define TRACKER_SPARQL_BACKEND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_SPARQL_TYPE_BACKEND, TrackerSparqlBackendClass))
  39 
  40 typedef struct _TrackerSparqlBackend TrackerSparqlBackend;
  41 typedef struct _TrackerSparqlBackendClass TrackerSparqlBackendClass;
  42 typedef struct _TrackerSparqlBackendPrivate TrackerSparqlBackendPrivate;
  43 
  44 #define TRACKER_SPARQL_BACKEND_TYPE_BACKEND (tracker_sparql_backend_backend_get_type ())
  45 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
  46 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
  47 #define _g_free0(var) (var = (g_free (var), NULL))
  48 typedef struct _TrackerSparqlBackendQueryAsyncData TrackerSparqlBackendQueryAsyncData;
  49 typedef struct _TrackerSparqlBackendUpdateAsyncData TrackerSparqlBackendUpdateAsyncData;
  50 #define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))
  51 typedef struct _TrackerSparqlBackendUpdateArrayAsyncData TrackerSparqlBackendUpdateArrayAsyncData;
  52 #define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
  53 typedef struct _TrackerSparqlBackendUpdateBlankAsyncData TrackerSparqlBackendUpdateBlankAsyncData;
  54 typedef struct _TrackerSparqlBackendLoadAsyncData TrackerSparqlBackendLoadAsyncData;
  55 typedef struct _TrackerSparqlBackendStatisticsAsyncData TrackerSparqlBackendStatisticsAsyncData;
  56 typedef struct _Block1Data Block1Data;
  57 #define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
  58 #define _g_main_context_unref0(var) ((var == NULL) ? NULL : (var = (g_main_context_unref (var), NULL)))
  59 typedef struct _Block2Data Block2Data;
  60 #define _g_source_unref0(var) ((var == NULL) ? NULL : (var = (g_source_unref (var), NULL)))
  61 typedef struct _TrackerSparqlBackendGetInternalAsyncData TrackerSparqlBackendGetInternalAsyncData;
  62 typedef struct _TrackerSparqlConnectionGetAsyncData TrackerSparqlConnectionGetAsyncData;
  63 typedef struct _TrackerSparqlConnectionGetDirectAsyncData TrackerSparqlConnectionGetDirectAsyncData;
  64 
  65 struct _TrackerSparqlBackend {
  66 	TrackerSparqlConnection parent_instance;
  67 	TrackerSparqlBackendPrivate * priv;
  68 };
  69 
  70 struct _TrackerSparqlBackendClass {
  71 	TrackerSparqlConnectionClass parent_class;
  72 };
  73 
  74 struct _TrackerSparqlBackendPrivate {
  75 	gboolean initialized;
  76 	TrackerSparqlConnection* direct;
  77 	TrackerSparqlConnection* bus;
  78 };
  79 
  80 typedef enum  {
  81 	TRACKER_SPARQL_BACKEND_BACKEND_AUTO,
  82 	TRACKER_SPARQL_BACKEND_BACKEND_DIRECT,
  83 	TRACKER_SPARQL_BACKEND_BACKEND_BUS
  84 } TrackerSparqlBackendBackend;
  85 
  86 struct _TrackerSparqlBackendQueryAsyncData {
  87 	int _state_;
  88 	GObject* _source_object_;
  89 	GAsyncResult* _res_;
  90 	GSimpleAsyncResult* _async_result;
  91 	TrackerSparqlBackend* self;
  92 	gchar* sparql;
  93 	GCancellable* cancellable;
  94 	TrackerSparqlCursor* result;
  95 	const gchar* _tmp0_;
  96 	TrackerSparqlConnection* _tmp1_;
  97 	TrackerSparqlConnection* _tmp2_;
  98 	const gchar* _tmp3_;
  99 	GCancellable* _tmp4_;
 100 	TrackerSparqlCursor* _tmp5_;
 101 	TrackerSparqlCursor* _tmp6_;
 102 	TrackerSparqlConnection* _tmp7_;
 103 	const gchar* _tmp8_;
 104 	GCancellable* _tmp9_;
 105 	TrackerSparqlCursor* _tmp10_;
 106 	TrackerSparqlCursor* _tmp11_;
 107 	GError * _inner_error_;
 108 };
 109 
 110 struct _TrackerSparqlBackendUpdateAsyncData {
 111 	int _state_;
 112 	GObject* _source_object_;
 113 	GAsyncResult* _res_;
 114 	GSimpleAsyncResult* _async_result;
 115 	TrackerSparqlBackend* self;
 116 	gchar* sparql;
 117 	gint priority;
 118 	GCancellable* cancellable;
 119 	gint _tmp0_;
 120 	const gchar* _tmp1_;
 121 	TrackerSparqlConnection* _tmp2_;
 122 	GError* _tmp3_;
 123 	TrackerSparqlConnection* _tmp4_;
 124 	const gchar* _tmp5_;
 125 	gint _tmp6_;
 126 	GCancellable* _tmp7_;
 127 	GError * _inner_error_;
 128 };
 129 
 130 struct _TrackerSparqlBackendUpdateArrayAsyncData {
 131 	int _state_;
 132 	GObject* _source_object_;
 133 	GAsyncResult* _res_;
 134 	GSimpleAsyncResult* _async_result;
 135 	TrackerSparqlBackend* self;
 136 	gchar** sparql;
 137 	gint sparql_length1;
 138 	gint priority;
 139 	GCancellable* cancellable;
 140 	GPtrArray* result;
 141 	TrackerSparqlConnection* _tmp0_;
 142 	GError* _tmp1_;
 143 	TrackerSparqlConnection* _tmp2_;
 144 	gchar** _tmp3_;
 145 	gint _tmp3__length1;
 146 	gint _tmp4_;
 147 	GCancellable* _tmp5_;
 148 	GPtrArray* _tmp6_;
 149 	GPtrArray* _tmp7_;
 150 	GError * _inner_error_;
 151 };
 152 
 153 struct _TrackerSparqlBackendUpdateBlankAsyncData {
 154 	int _state_;
 155 	GObject* _source_object_;
 156 	GAsyncResult* _res_;
 157 	GSimpleAsyncResult* _async_result;
 158 	TrackerSparqlBackend* self;
 159 	gchar* sparql;
 160 	gint priority;
 161 	GCancellable* cancellable;
 162 	GVariant* result;
 163 	gint _tmp0_;
 164 	const gchar* _tmp1_;
 165 	TrackerSparqlConnection* _tmp2_;
 166 	GError* _tmp3_;
 167 	TrackerSparqlConnection* _tmp4_;
 168 	const gchar* _tmp5_;
 169 	gint _tmp6_;
 170 	GCancellable* _tmp7_;
 171 	GVariant* _tmp8_;
 172 	GVariant* _tmp9_;
 173 	GError * _inner_error_;
 174 };
 175 
 176 struct _TrackerSparqlBackendLoadAsyncData {
 177 	int _state_;
 178 	GObject* _source_object_;
 179 	GAsyncResult* _res_;
 180 	GSimpleAsyncResult* _async_result;
 181 	TrackerSparqlBackend* self;
 182 	GFile* file;
 183 	GCancellable* cancellable;
 184 	GFile* _tmp0_;
 185 	gchar* _tmp1_;
 186 	gchar* uri;
 187 	const gchar* _tmp2_;
 188 	TrackerSparqlConnection* _tmp3_;
 189 	GError* _tmp4_;
 190 	TrackerSparqlConnection* _tmp5_;
 191 	GFile* _tmp6_;
 192 	GCancellable* _tmp7_;
 193 	GError * _inner_error_;
 194 };
 195 
 196 struct _TrackerSparqlBackendStatisticsAsyncData {
 197 	int _state_;
 198 	GObject* _source_object_;
 199 	GAsyncResult* _res_;
 200 	GSimpleAsyncResult* _async_result;
 201 	TrackerSparqlBackend* self;
 202 	GCancellable* cancellable;
 203 	TrackerSparqlCursor* result;
 204 	TrackerSparqlConnection* _tmp0_;
 205 	GError* _tmp1_;
 206 	TrackerSparqlConnection* _tmp2_;
 207 	GCancellable* _tmp3_;
 208 	TrackerSparqlCursor* _tmp4_;
 209 	TrackerSparqlCursor* _tmp5_;
 210 	GError * _inner_error_;
 211 };
 212 
 213 struct _Block1Data {
 214 	int _ref_count_;
 215 	GMainLoop* loop;
 216 	GAsyncResult* async_result;
 217 };
 218 
 219 struct _Block2Data {
 220 	int _ref_count_;
 221 	GError* sparql_error;
 222 	GError* io_error;
 223 	GError* dbus_error;
 224 	GError* spawn_error;
 225 	TrackerSparqlConnection* _result_;
 226 	GMainContext* context;
 227 	GCancellable* cancellable;
 228 	gpointer _async_data_;
 229 };
 230 
 231 struct _TrackerSparqlBackendGetInternalAsyncData {
 232 	int _state_;
 233 	GObject* _source_object_;
 234 	GAsyncResult* _res_;
 235 	GSimpleAsyncResult* _async_result;
 236 	GCancellable* cancellable;
 237 	TrackerSparqlConnection* result;
 238 	Block2Data* _data2_;
 239 	GCancellable* _tmp0_;
 240 	gboolean _tmp1_;
 241 	TrackerSparqlConnection* _tmp2_;
 242 	TrackerSparqlConnection* _tmp3_;
 243 	TrackerSparqlConnection* _result_;
 244 	TrackerSparqlConnection* _tmp4_;
 245 	GMainContext* _tmp5_;
 246 	GMainContext* _tmp6_;
 247 	GError* _tmp7_;
 248 	GError* _tmp8_;
 249 	GError* _tmp9_;
 250 	GError* _tmp10_;
 251 	GError* _tmp11_;
 252 	GError* _tmp12_;
 253 	GError* _tmp13_;
 254 	GError* _tmp14_;
 255 	GError* _tmp15_;
 256 	GError* _tmp16_;
 257 	GError* _tmp17_;
 258 	GError* _tmp18_;
 259 	TrackerSparqlConnection* _tmp19_;
 260 	TrackerSparqlConnection* _tmp20_;
 261 	GError * _inner_error_;
 262 };
 263 
 264 struct _TrackerSparqlConnectionGetAsyncData {
 265 	int _state_;
 266 	GObject* _source_object_;
 267 	GAsyncResult* _res_;
 268 	GSimpleAsyncResult* _async_result;
 269 	GCancellable* cancellable;
 270 	TrackerSparqlConnection* result;
 271 	GCancellable* _tmp0_;
 272 	TrackerSparqlConnection* _tmp1_;
 273 	TrackerSparqlConnection* _tmp2_;
 274 	GError * _inner_error_;
 275 };
 276 
 277 struct _TrackerSparqlConnectionGetDirectAsyncData {
 278 	int _state_;
 279 	GObject* _source_object_;
 280 	GAsyncResult* _res_;
 281 	GSimpleAsyncResult* _async_result;
 282 	GCancellable* cancellable;
 283 	TrackerSparqlConnection* result;
 284 	GCancellable* _tmp0_;
 285 	TrackerSparqlConnection* _tmp1_;
 286 	TrackerSparqlConnection* _tmp2_;
 287 	GError * _inner_error_;
 288 };
 289 
 290 
 291 static gpointer tracker_sparql_backend_parent_class = NULL;
 292 static TrackerSparqlConnection* tracker_sparql_backend_singleton;
 293 static TrackerSparqlConnection* tracker_sparql_backend_singleton = NULL;
 294 static gboolean tracker_sparql_backend_log_initialized;
 295 static gboolean tracker_sparql_backend_log_initialized = FALSE;
 296 static GMutex tracker_sparql_backend_door;
 297 static GMutex tracker_sparql_backend_door = {0};
 298 
 299 GType tracker_sparql_backend_get_type (void) G_GNUC_CONST;
 300 #define TRACKER_SPARQL_BACKEND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_SPARQL_TYPE_BACKEND, TrackerSparqlBackendPrivate))
 301 enum  {
 302 	TRACKER_SPARQL_BACKEND_DUMMY_PROPERTY
 303 };
 304 static GType tracker_sparql_backend_backend_get_type (void) G_GNUC_UNUSED;
 305 TrackerSparqlBackend* tracker_sparql_backend_new (GError** error);
 306 TrackerSparqlBackend* tracker_sparql_backend_construct (GType object_type, GError** error);
 307 static void tracker_sparql_backend_load_plugins (TrackerSparqlBackend* self, GError** error);
 308 static void tracker_sparql_backend_real_dispose (GObject* base);
 309 static TrackerSparqlCursor* tracker_sparql_backend_real_query (TrackerSparqlConnection* base, const gchar* sparql, GCancellable* cancellable, GError** error);
 310 static void tracker_sparql_backend_real_query_async_data_free (gpointer _data);
 311 static void tracker_sparql_backend_real_query_async (TrackerSparqlConnection* base, const gchar* sparql, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
 312 static gboolean tracker_sparql_backend_real_query_async_co (TrackerSparqlBackendQueryAsyncData* _data_);
 313 static void tracker_sparql_backend_query_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 314 static void tracker_sparql_backend_real_update (TrackerSparqlConnection* base, const gchar* sparql, gint priority, GCancellable* cancellable, GError** error);
 315 static GVariant* tracker_sparql_backend_real_update_blank (TrackerSparqlConnection* base, const gchar* sparql, gint priority, GCancellable* cancellable, GError** error);
 316 static void tracker_sparql_backend_real_update_async_data_free (gpointer _data);
 317 static void tracker_sparql_backend_real_update_async (TrackerSparqlConnection* base, const gchar* sparql, gint priority, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
 318 static gboolean tracker_sparql_backend_real_update_async_co (TrackerSparqlBackendUpdateAsyncData* _data_);
 319 static void tracker_sparql_backend_update_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 320 static void tracker_sparql_backend_real_update_array_async_data_free (gpointer _data);
 321 static void tracker_sparql_backend_real_update_array_async (TrackerSparqlConnection* base, gchar** sparql, int sparql_length1, gint priority, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
 322 static gboolean tracker_sparql_backend_real_update_array_async_co (TrackerSparqlBackendUpdateArrayAsyncData* _data_);
 323 static void tracker_sparql_backend_update_array_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 324 static void tracker_sparql_backend_real_update_blank_async_data_free (gpointer _data);
 325 static void tracker_sparql_backend_real_update_blank_async (TrackerSparqlConnection* base, const gchar* sparql, gint priority, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
 326 static gboolean tracker_sparql_backend_real_update_blank_async_co (TrackerSparqlBackendUpdateBlankAsyncData* _data_);
 327 static void tracker_sparql_backend_update_blank_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 328 static void tracker_sparql_backend_real_load (TrackerSparqlConnection* base, GFile* file, GCancellable* cancellable, GError** error);
 329 static void tracker_sparql_backend_real_load_async_data_free (gpointer _data);
 330 static void tracker_sparql_backend_real_load_async (TrackerSparqlConnection* base, GFile* file, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
 331 static gboolean tracker_sparql_backend_real_load_async_co (TrackerSparqlBackendLoadAsyncData* _data_);
 332 static void tracker_sparql_backend_load_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 333 static TrackerSparqlCursor* tracker_sparql_backend_real_statistics (TrackerSparqlConnection* base, GCancellable* cancellable, GError** error);
 334 static void tracker_sparql_backend_real_statistics_async_data_free (gpointer _data);
 335 static void tracker_sparql_backend_real_statistics_async (TrackerSparqlConnection* base, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
 336 static gboolean tracker_sparql_backend_real_statistics_async_co (TrackerSparqlBackendStatisticsAsyncData* _data_);
 337 static void tracker_sparql_backend_statistics_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 338 static TrackerSparqlConnection* tracker_sparql_backend_get (GCancellable* cancellable, GError** error);
 339 static void tracker_sparql_backend_log_init (void);
 340 TrackerSparqlConnection* tracker_sparql_backend_get_internal (GCancellable* cancellable, GError** error);
 341 static Block1Data* block1_data_ref (Block1Data* _data1_);
 342 static void block1_data_unref (void * _userdata_);
 343 void tracker_sparql_backend_get_internal_async (GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
 344 TrackerSparqlConnection* tracker_sparql_backend_get_internal_finish (GAsyncResult* _res_, GError** error);
 345 static void __lambda4_ (Block1Data* _data1_, GObject* obj, GAsyncResult* res);
 346 static void ___lambda4__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self);
 347 static void tracker_sparql_backend_get_internal_async_data_free (gpointer _data);
 348 static gboolean tracker_sparql_backend_get_internal_async_co (TrackerSparqlBackendGetInternalAsyncData* _data_);
 349 static Block2Data* block2_data_ref (Block2Data* _data2_);
 350 static void block2_data_unref (void * _userdata_);
 351 static gboolean __lambda2_ (Block2Data* _data2_, GIOSchedulerJob* job);
 352 static gboolean __lambda3_ (Block2Data* _data2_);
 353 static gboolean ___lambda3__gsource_func (gpointer self);
 354 static gboolean ___lambda2__gio_scheduler_job_func (GIOSchedulerJob* job, GCancellable* cancellable, gpointer self);
 355 static void tracker_sparql_backend_remove_log_handler (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message);
 356 static void _tracker_sparql_backend_remove_log_handler_glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self);
 357 static void tracker_sparql_backend_finalize (GObject* obj);
 358 static void tracker_sparql_connection_get_async_data_free (gpointer _data);
 359 void tracker_sparql_connection_get_async (GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
 360 TrackerSparqlConnection* tracker_sparql_connection_get_finish (GAsyncResult* _res_, GError** error);
 361 static gboolean tracker_sparql_connection_get_async_co (TrackerSparqlConnectionGetAsyncData* _data_);
 362 static void tracker_sparql_connection_get_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 363 TrackerSparqlConnection* tracker_sparql_connection_get (GCancellable* cancellable, GError** error);
 364 static void tracker_sparql_connection_get_direct_async_data_free (gpointer _data);
 365 void tracker_sparql_connection_get_direct_async (GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
 366 TrackerSparqlConnection* tracker_sparql_connection_get_direct_finish (GAsyncResult* _res_, GError** error);
 367 static gboolean tracker_sparql_connection_get_direct_async_co (TrackerSparqlConnectionGetDirectAsyncData* _data_);
 368 static void tracker_sparql_connection_get_direct_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 369 TrackerSparqlConnection* tracker_sparql_connection_get_direct (GCancellable* cancellable, GError** error);
 370 
 371 
 372 static GType tracker_sparql_backend_backend_get_type (void) {
 373 	static volatile gsize tracker_sparql_backend_backend_type_id__volatile = 0;
 374 	if (g_once_init_enter (&tracker_sparql_backend_backend_type_id__volatile)) {
 375 		static const GEnumValue values[] = {{TRACKER_SPARQL_BACKEND_BACKEND_AUTO, "TRACKER_SPARQL_BACKEND_BACKEND_AUTO", "auto"}, {TRACKER_SPARQL_BACKEND_BACKEND_DIRECT, "TRACKER_SPARQL_BACKEND_BACKEND_DIRECT", "direct"}, {TRACKER_SPARQL_BACKEND_BACKEND_BUS, "TRACKER_SPARQL_BACKEND_BACKEND_BUS", "bus"}, {0, NULL, NULL}};
 376 		GType tracker_sparql_backend_backend_type_id;
 377 		tracker_sparql_backend_backend_type_id = g_enum_register_static ("TrackerSparqlBackendBackend", values);
 378 		g_once_init_leave (&tracker_sparql_backend_backend_type_id__volatile, tracker_sparql_backend_backend_type_id);
 379 	}
 380 	return tracker_sparql_backend_backend_type_id__volatile;
 381 }
 382 
 383 
 384 TrackerSparqlBackend* tracker_sparql_backend_construct (GType object_type, GError** error) {
 385 	TrackerSparqlBackend * self = NULL;
 386 	GError * _inner_error_ = NULL;
 387 #line 30 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 388 	self = (TrackerSparqlBackend*) tracker_sparql_connection_construct (object_type);
 389 #line 390 "tracker-backend.c"
 390 	{
 391 		GDBusConnection* _tmp0_ = NULL;
 392 		GDBusConnection* bus;
 393 		GDBusMessage* _tmp1_;
 394 		GDBusMessage* msg;
 395 		GDBusConnection* _tmp2_;
 396 		GDBusMessage* _tmp3_;
 397 		gint _tmp4_;
 398 		GDBusMessage* _tmp5_ = NULL;
 399 		GDBusMessage* _tmp6_;
 400 		GDBusMessage* _tmp7_;
 401 #line 33 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 402 		g_debug ("tracker-backend.vala:33: Waiting for service to become available...");
 403 #line 37 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 404 		_tmp0_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error_);
 405 #line 37 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 406 		bus = _tmp0_;
 407 #line 37 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 408 		if (_inner_error_ != NULL) {
 409 #line 410 "tracker-backend.c"
 410 			goto __catch0_g_error;
 411 		}
 412 #line 38 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 413 		_tmp1_ = g_dbus_message_new_method_call (TRACKER_DBUS_SERVICE, TRACKER_DBUS_OBJECT_STATUS, TRACKER_DBUS_INTERFACE_STATUS, "Wait");
 414 #line 38 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 415 		msg = _tmp1_;
 416 #line 39 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 417 		_tmp2_ = bus;
 418 #line 39 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 419 		_tmp3_ = msg;
 420 #line 39 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 421 		_tmp4_ = G_MAXINT;
 422 #line 39 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 423 		_tmp5_ = g_dbus_connection_send_message_with_reply_sync (_tmp2_, _tmp3_, 0, _tmp4_, NULL, NULL, &_inner_error_);
 424 #line 39 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 425 		_tmp6_ = _tmp5_;
 426 #line 39 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 427 		if (_inner_error_ != NULL) {
 428 #line 39 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 429 			_g_object_unref0 (msg);
 430 #line 39 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 431 			_g_object_unref0 (bus);
 432 #line 433 "tracker-backend.c"
 433 			goto __catch0_g_error;
 434 		}
 435 #line 39 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 436 		_tmp7_ = _tmp6_;
 437 #line 39 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 438 		g_dbus_message_to_gerror (_tmp7_, &_inner_error_);
 439 #line 39 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 440 		_g_object_unref0 (_tmp7_);
 441 #line 39 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 442 		if (_inner_error_ != NULL) {
 443 #line 39 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 444 			_g_object_unref0 (msg);
 445 #line 39 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 446 			_g_object_unref0 (bus);
 447 #line 448 "tracker-backend.c"
 448 			goto __catch0_g_error;
 449 		}
 450 #line 41 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 451 		g_debug ("tracker-backend.vala:41: Service is ready");
 452 #line 43 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 453 		g_debug ("tracker-backend.vala:43: Constructing connection");
 454 #line 44 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 455 		tracker_sparql_backend_load_plugins (self, &_inner_error_);
 456 #line 44 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 457 		if (_inner_error_ != NULL) {
 458 #line 44 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 459 			_g_object_unref0 (msg);
 460 #line 44 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 461 			_g_object_unref0 (bus);
 462 #line 463 "tracker-backend.c"
 463 			goto __catch0_g_error;
 464 		}
 465 #line 45 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 466 		g_debug ("tracker-backend.vala:45: Backend is ready");
 467 #line 31 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 468 		_g_object_unref0 (msg);
 469 #line 31 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 470 		_g_object_unref0 (bus);
 471 #line 472 "tracker-backend.c"
 472 	}
 473 	goto __finally0;
 474 	__catch0_g_error:
 475 	{
 476 		GError* e = NULL;
 477 		GError* _tmp8_;
 478 		const gchar* _tmp9_;
 479 		GError* _tmp10_;
 480 #line 31 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 481 		e = _inner_error_;
 482 #line 31 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 483 		_inner_error_ = NULL;
 484 #line 47 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 485 		_tmp8_ = e;
 486 #line 47 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 487 		_tmp9_ = _tmp8_->message;
 488 #line 47 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 489 		_tmp10_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_INTERNAL, _tmp9_);
 490 #line 47 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 491 		_inner_error_ = _tmp10_;
 492 #line 47 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 493 		_g_error_free0 (e);
 494 #line 495 "tracker-backend.c"
 495 		goto __finally0;
 496 	}
 497 	__finally0:
 498 #line 31 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 499 	if (_inner_error_ != NULL) {
 500 #line 31 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 501 		if ((((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == G_IO_ERROR)) || (_inner_error_->domain == G_DBUS_ERROR)) || (_inner_error_->domain == G_SPAWN_ERROR)) {
 502 #line 31 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 503 			g_propagate_error (error, _inner_error_);
 504 #line 31 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 505 			_g_object_unref0 (self);
 506 #line 31 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 507 			return NULL;
 508 #line 509 "tracker-backend.c"
 509 		} else {
 510 #line 31 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 511 			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);
 512 #line 31 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 513 			g_clear_error (&_inner_error_);
 514 #line 31 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 515 			return NULL;
 516 #line 517 "tracker-backend.c"
 517 		}
 518 	}
 519 #line 50 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 520 	self->priv->initialized = TRUE;
 521 #line 30 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 522 	return self;
 523 #line 524 "tracker-backend.c"
 524 }
 525 
 526 
 527 TrackerSparqlBackend* tracker_sparql_backend_new (GError** error) {
 528 #line 30 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 529 	return tracker_sparql_backend_construct (TRACKER_SPARQL_TYPE_BACKEND, error);
 530 #line 531 "tracker-backend.c"
 531 }
 532 
 533 
 534 static void tracker_sparql_backend_real_dispose (GObject* base) {
 535 	TrackerSparqlBackend * self;
 536 	gboolean _tmp0_;
 537 	GError * _inner_error_ = NULL;
 538 #line 53 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 539 	self = (TrackerSparqlBackend*) base;
 540 #line 55 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 541 	_tmp0_ = self->priv->initialized;
 542 #line 55 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 543 	if (_tmp0_) {
 544 #line 56 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 545 		g_mutex_lock (&tracker_sparql_backend_door);
 546 #line 547 "tracker-backend.c"
 547 		{
 548 			TrackerSparqlConnection* _tmp1_;
 549 #line 63 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 550 			_tmp1_ = tracker_sparql_backend_singleton;
 551 #line 63 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 552 			if (_tmp1_ == G_TYPE_CHECK_INSTANCE_CAST (self, TRACKER_SPARQL_TYPE_CONNECTION, TrackerSparqlConnection)) {
 553 #line 64 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala"
 554 				tracker_sparql_backend_singleton = NULL;
 555 #line 556 "tracker-backend.c"
 556 			}
 557 		}
 558 		__finally1:
label '__finally1' defined but not used
(emitted by gcc)
559 { 560 #line 67 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 561 g_mutex_unlock (&tracker_sparql_backend_door); 562 #line 563 "tracker-backend.c" 563 } 564 #line 58 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 565 if (_inner_error_ != NULL) { 566 #line 58 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 567 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); 568 #line 58 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 569 g_clear_error (&_inner_error_); 570 #line 58 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 571 return; 572 #line 573 "tracker-backend.c" 573 } 574 } 575 #line 71 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 576 G_OBJECT_CLASS (tracker_sparql_backend_parent_class)->dispose ((GObject*) G_TYPE_CHECK_INSTANCE_CAST (self, TRACKER_SPARQL_TYPE_CONNECTION, TrackerSparqlConnection)); 577 #line 578 "tracker-backend.c" 578 } 579 580 581 static TrackerSparqlCursor* tracker_sparql_backend_real_query (TrackerSparqlConnection* base, const gchar* sparql, GCancellable* cancellable, GError** error) { 582 TrackerSparqlBackend * self; 583 TrackerSparqlCursor* result = NULL; 584 const gchar* _tmp0_; 585 TrackerSparqlConnection* _tmp1_; 586 GError * _inner_error_ = NULL; 587 #line 74 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 588 self = (TrackerSparqlBackend*) base; 589 #line 74 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 590 g_return_val_if_fail (sparql != NULL, NULL); 591 #line 75 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 592 _tmp0_ = sparql; 593 #line 75 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 594 g_debug ("tracker-backend.vala:75: %s(): '%s'", "Tracker.Sparql.Backend.query", _tmp0_); 595 #line 76 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 596 _tmp1_ = self->priv->direct; 597 #line 76 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 598 if (_tmp1_ != NULL) { 599 #line 600 "tracker-backend.c" 600 TrackerSparqlConnection* _tmp2_; 601 const gchar* _tmp3_; 602 GCancellable* _tmp4_; 603 TrackerSparqlCursor* _tmp5_ = NULL; 604 TrackerSparqlCursor* _tmp6_; 605 #line 77 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 606 _tmp2_ = self->priv->direct; 607 #line 77 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 608 _tmp3_ = sparql; 609 #line 77 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 610 _tmp4_ = cancellable; 611 #line 77 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 612 _tmp5_ = tracker_sparql_connection_query (_tmp2_, _tmp3_, _tmp4_, &_inner_error_); 613 #line 77 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 614 _tmp6_ = _tmp5_; 615 #line 77 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 616 if (_inner_error_ != NULL) { 617 #line 77 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 618 if (((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == G_IO_ERROR)) || (_inner_error_->domain == G_DBUS_ERROR)) { 619 #line 77 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 620 g_propagate_error (error, _inner_error_); 621 #line 77 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 622 return NULL; 623 #line 624 "tracker-backend.c" 624 } else { 625 #line 77 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 626 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); 627 #line 77 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 628 g_clear_error (&_inner_error_); 629 #line 77 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 630 return NULL; 631 #line 632 "tracker-backend.c" 632 } 633 } 634 #line 77 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 635 result = _tmp6_; 636 #line 77 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 637 return result; 638 #line 639 "tracker-backend.c" 639 } else { 640 TrackerSparqlConnection* _tmp7_; 641 const gchar* _tmp8_; 642 GCancellable* _tmp9_; 643 TrackerSparqlCursor* _tmp10_ = NULL; 644 TrackerSparqlCursor* _tmp11_; 645 #line 79 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 646 _tmp7_ = self->priv->bus; 647 #line 79 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 648 _tmp8_ = sparql; 649 #line 79 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 650 _tmp9_ = cancellable; 651 #line 79 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 652 _tmp10_ = tracker_sparql_connection_query (_tmp7_, _tmp8_, _tmp9_, &_inner_error_); 653 #line 79 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 654 _tmp11_ = _tmp10_; 655 #line 79 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 656 if (_inner_error_ != NULL) { 657 #line 79 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 658 if (((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == G_IO_ERROR)) || (_inner_error_->domain == G_DBUS_ERROR)) { 659 #line 79 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 660 g_propagate_error (error, _inner_error_); 661 #line 79 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 662 return NULL; 663 #line 664 "tracker-backend.c" 664 } else { 665 #line 79 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 666 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); 667 #line 79 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 668 g_clear_error (&_inner_error_); 669 #line 79 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 670 return NULL; 671 #line 672 "tracker-backend.c" 672 } 673 } 674 #line 79 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 675 result = _tmp11_; 676 #line 79 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 677 return result; 678 #line 679 "tracker-backend.c" 679 } 680 } 681 682 683 static void tracker_sparql_backend_real_query_async_data_free (gpointer _data) { 684 TrackerSparqlBackendQueryAsyncData* _data_; 685 _data_ = _data; 686 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 687 _g_free0 (_data_->sparql); 688 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 689 _g_object_unref0 (_data_->cancellable); 690 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 691 _g_object_unref0 (_data_->result); 692 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 693 _g_object_unref0 (_data_->self); 694 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 695 g_slice_free (TrackerSparqlBackendQueryAsyncData, _data_); 696 #line 697 "tracker-backend.c" 697 } 698 699 700 static gpointer _g_object_ref0 (gpointer self) { 701 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 702 return self ? g_object_ref (self) : NULL; 703 #line 704 "tracker-backend.c" 704 } 705 706 707 static void tracker_sparql_backend_real_query_async (TrackerSparqlConnection* base, const gchar* sparql, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) { 708 TrackerSparqlBackend * self; 709 TrackerSparqlBackendQueryAsyncData* _data_; 710 TrackerSparqlBackend* _tmp0_; 711 const gchar* _tmp1_; 712 gchar* _tmp2_; 713 GCancellable* _tmp3_; 714 GCancellable* _tmp4_; 715 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 716 self = (TrackerSparqlBackend*) base; 717 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 718 _data_ = g_slice_new0 (TrackerSparqlBackendQueryAsyncData); 719 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 720 _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, tracker_sparql_backend_real_query_async); 721 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 722 g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_sparql_backend_real_query_async_data_free); 723 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 724 _tmp0_ = _g_object_ref0 (self); 725 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 726 _data_->self = _tmp0_; 727 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 728 _tmp1_ = sparql; 729 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 730 _tmp2_ = g_strdup (_tmp1_); 731 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 732 _g_free0 (_data_->sparql); 733 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 734 _data_->sparql = _tmp2_; 735 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 736 _tmp3_ = cancellable; 737 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 738 _tmp4_ = _g_object_ref0 (_tmp3_); 739 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 740 _g_object_unref0 (_data_->cancellable); 741 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 742 _data_->cancellable = _tmp4_; 743 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 744 tracker_sparql_backend_real_query_async_co (_data_); 745 #line 746 "tracker-backend.c" 746 } 747 748 749 static TrackerSparqlCursor* tracker_sparql_backend_real_query_finish (TrackerSparqlConnection* base, GAsyncResult* _res_, GError** error) { 750 TrackerSparqlCursor* result; 751 TrackerSparqlBackendQueryAsyncData* _data_; 752 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 753 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) { 754 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 755 return NULL; 756 #line 757 "tracker-backend.c" 757 } 758 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 759 _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_)); 760 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 761 result = _data_->result; 762 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 763 _data_->result = NULL; 764 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 765 return result; 766 #line 767 "tracker-backend.c" 767 } 768 769 770 static void tracker_sparql_backend_query_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) { 771 TrackerSparqlBackendQueryAsyncData* _data_; 772 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 773 _data_ = _user_data_; 774 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 775 _data_->_source_object_ = source_object; 776 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 777 _data_->_res_ = _res_; 778 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 779 tracker_sparql_backend_real_query_async_co (_data_); 780 #line 781 "tracker-backend.c" 781 } 782 783 784 static gboolean tracker_sparql_backend_real_query_async_co (TrackerSparqlBackendQueryAsyncData* _data_) { 785 #line 83 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 786 switch (_data_->_state_) { 787 #line 83 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 788 case 0: 789 #line 790 "tracker-backend.c" 790 goto _state_0; 791 #line 83 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 792 case 1: 793 #line 794 "tracker-backend.c" 794 goto _state_1; 795 #line 83 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 796 case 2: 797 #line 798 "tracker-backend.c" 798 goto _state_2; 799 default: 800 #line 83 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 801 g_assert_not_reached (); 802 #line 803 "tracker-backend.c" 803 } 804 _state_0: 805 #line 84 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 806 _data_->_tmp0_ = _data_->sparql; 807 #line 84 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 808 g_debug ("tracker-backend.vala:84: %s(): '%s'", "Tracker.Sparql.Backend.query_async", _data_->_tmp0_); 809 #line 85 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 810 _data_->_tmp1_ = _data_->self->priv->direct; 811 #line 85 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 812 if (_data_->_tmp1_ != NULL) { 813 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 814 _data_->_tmp2_ = _data_->self->priv->direct; 815 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 816 _data_->_tmp3_ = _data_->sparql; 817 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 818 _data_->_tmp4_ = _data_->cancellable; 819 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 820 _data_->_state_ = 1; 821 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 822 tracker_sparql_connection_query_async (_data_->_tmp2_, _data_->_tmp3_, _data_->_tmp4_, tracker_sparql_backend_query_async_ready, _data_); 823 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 824 return FALSE; 825 #line 826 "tracker-backend.c" 826 _state_1: 827 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 828 _data_->_tmp5_ = NULL; 829 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 830 _data_->_tmp5_ = tracker_sparql_connection_query_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error_); 831 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 832 _data_->_tmp6_ = _data_->_tmp5_; 833 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 834 if (_data_->_inner_error_ != NULL) { 835 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 836 if (((_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_data_->_inner_error_->domain == G_IO_ERROR)) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) { 837 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 838 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 839 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 840 g_error_free (_data_->_inner_error_); 841 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 842 if (_data_->_state_ == 0) { 843 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 844 g_simple_async_result_complete_in_idle (_data_->_async_result); 845 #line 846 "tracker-backend.c" 846 } else { 847 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 848 g_simple_async_result_complete (_data_->_async_result); 849 #line 850 "tracker-backend.c" 850 } 851 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 852 g_object_unref (_data_->_async_result); 853 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 854 return FALSE; 855 #line 856 "tracker-backend.c" 856 } else { 857 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 858 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); 859 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 860 g_clear_error (&_data_->_inner_error_); 861 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 862 return FALSE; 863 #line 864 "tracker-backend.c" 864 } 865 } 866 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 867 _data_->result = _data_->_tmp6_; 868 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 869 if (_data_->_state_ == 0) { 870 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 871 g_simple_async_result_complete_in_idle (_data_->_async_result); 872 #line 873 "tracker-backend.c" 873 } else { 874 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 875 g_simple_async_result_complete (_data_->_async_result); 876 #line 877 "tracker-backend.c" 877 } 878 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 879 g_object_unref (_data_->_async_result); 880 #line 86 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 881 return FALSE; 882 #line 883 "tracker-backend.c" 883 } else { 884 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 885 _data_->_tmp7_ = _data_->self->priv->bus; 886 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 887 _data_->_tmp8_ = _data_->sparql; 888 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 889 _data_->_tmp9_ = _data_->cancellable; 890 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 891 _data_->_state_ = 2; 892 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 893 tracker_sparql_connection_query_async (_data_->_tmp7_, _data_->_tmp8_, _data_->_tmp9_, tracker_sparql_backend_query_async_ready, _data_); 894 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 895 return FALSE; 896 #line 897 "tracker-backend.c" 897 _state_2: 898 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 899 _data_->_tmp10_ = NULL; 900 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 901 _data_->_tmp10_ = tracker_sparql_connection_query_finish (_data_->_tmp7_, _data_->_res_, &_data_->_inner_error_); 902 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 903 _data_->_tmp11_ = _data_->_tmp10_; 904 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 905 if (_data_->_inner_error_ != NULL) { 906 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 907 if (((_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_data_->_inner_error_->domain == G_IO_ERROR)) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) { 908 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 909 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 910 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 911 g_error_free (_data_->_inner_error_); 912 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 913 if (_data_->_state_ == 0) { 914 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 915 g_simple_async_result_complete_in_idle (_data_->_async_result); 916 #line 917 "tracker-backend.c" 917 } else { 918 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 919 g_simple_async_result_complete (_data_->_async_result); 920 #line 921 "tracker-backend.c" 921 } 922 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 923 g_object_unref (_data_->_async_result); 924 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 925 return FALSE; 926 #line 927 "tracker-backend.c" 927 } else { 928 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 929 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); 930 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 931 g_clear_error (&_data_->_inner_error_); 932 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 933 return FALSE; 934 #line 935 "tracker-backend.c" 935 } 936 } 937 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 938 _data_->result = _data_->_tmp11_; 939 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 940 if (_data_->_state_ == 0) { 941 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 942 g_simple_async_result_complete_in_idle (_data_->_async_result); 943 #line 944 "tracker-backend.c" 944 } else { 945 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 946 g_simple_async_result_complete (_data_->_async_result); 947 #line 948 "tracker-backend.c" 948 } 949 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 950 g_object_unref (_data_->_async_result); 951 #line 88 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 952 return FALSE; 953 #line 954 "tracker-backend.c" 954 } 955 #line 83 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 956 if (_data_->_state_ == 0) { 957 #line 83 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 958 g_simple_async_result_complete_in_idle (_data_->_async_result); 959 #line 960 "tracker-backend.c" 960 } else { 961 #line 83 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 962 g_simple_async_result_complete (_data_->_async_result); 963 #line 964 "tracker-backend.c" 964 } 965 #line 83 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 966 g_object_unref (_data_->_async_result); 967 #line 83 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 968 return FALSE; 969 #line 970 "tracker-backend.c" 970 } 971 972 973 static void tracker_sparql_backend_real_update (TrackerSparqlConnection* base, const gchar* sparql, gint priority, GCancellable* cancellable, GError** error) { 974 TrackerSparqlBackend * self; 975 gint _tmp0_; 976 const gchar* _tmp1_; 977 TrackerSparqlConnection* _tmp2_; 978 TrackerSparqlConnection* _tmp4_; 979 const gchar* _tmp5_; 980 gint _tmp6_; 981 GCancellable* _tmp7_; 982 GError * _inner_error_ = NULL; 983 #line 92 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 984 self = (TrackerSparqlBackend*) base; 985 #line 92 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 986 g_return_if_fail (sparql != NULL); 987 #line 93 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 988 _tmp0_ = priority; 989 #line 93 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 990 _tmp1_ = sparql; 991 #line 93 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 992 g_debug ("tracker-backend.vala:93: %s(priority:%d): '%s'", "Tracker.Sparql.Backend.update", _tmp0_, _tmp1_); 993 #line 94 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 994 _tmp2_ = self->priv->bus; 995 #line 94 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 996 if (_tmp2_ == NULL) { 997 #line 998 "tracker-backend.c" 998 GError* _tmp3_; 999 #line 95 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1000 _tmp3_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_UNSUPPORTED, "Update support not available for direct-only connection"); 1001 #line 95 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1002 _inner_error_ = _tmp3_; 1003 #line 95 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1004 if (((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == G_IO_ERROR)) || (_inner_error_->domain == G_DBUS_ERROR)) { 1005 #line 95 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1006 g_propagate_error (error, _inner_error_); 1007 #line 95 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1008 return; 1009 #line 1010 "tracker-backend.c" 1010 } else { 1011 #line 95 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1012 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); 1013 #line 95 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1014 g_clear_error (&_inner_error_); 1015 #line 95 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1016 return; 1017 #line 1018 "tracker-backend.c" 1018 } 1019 } 1020 #line 97 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1021 _tmp4_ = self->priv->bus; 1022 #line 97 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1023 _tmp5_ = sparql; 1024 #line 97 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1025 _tmp6_ = priority; 1026 #line 97 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1027 _tmp7_ = cancellable; 1028 #line 97 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1029 tracker_sparql_connection_update (_tmp4_, _tmp5_, _tmp6_, _tmp7_, &_inner_error_); 1030 #line 97 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1031 if (_inner_error_ != NULL) { 1032 #line 97 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1033 if (((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == G_IO_ERROR)) || (_inner_error_->domain == G_DBUS_ERROR)) { 1034 #line 97 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1035 g_propagate_error (error, _inner_error_); 1036 #line 97 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1037 return; 1038 #line 1039 "tracker-backend.c" 1039 } else { 1040 #line 97 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1041 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); 1042 #line 97 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1043 g_clear_error (&_inner_error_); 1044 #line 97 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1045 return; 1046 #line 1047 "tracker-backend.c" 1047 } 1048 } 1049 } 1050 1051 1052 static GVariant* tracker_sparql_backend_real_update_blank (TrackerSparqlConnection* base, const gchar* sparql, gint priority, GCancellable* cancellable, GError** error) { 1053 TrackerSparqlBackend * self; 1054 GVariant* result = NULL; 1055 gint _tmp0_; 1056 const gchar* _tmp1_; 1057 TrackerSparqlConnection* _tmp2_; 1058 TrackerSparqlConnection* _tmp4_; 1059 const gchar* _tmp5_; 1060 gint _tmp6_; 1061 GCancellable* _tmp7_; 1062 GVariant* _tmp8_ = NULL; 1063 GVariant* _tmp9_; 1064 GError * _inner_error_ = NULL; 1065 #line 100 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1066 self = (TrackerSparqlBackend*) base; 1067 #line 100 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1068 g_return_val_if_fail (sparql != NULL, NULL); 1069 #line 101 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1070 _tmp0_ = priority; 1071 #line 101 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1072 _tmp1_ = sparql; 1073 #line 101 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1074 g_debug ("tracker-backend.vala:101: %s(priority:%d): '%s'", "Tracker.Sparql.Backend.update_blank", _tmp0_, _tmp1_); 1075 #line 102 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1076 _tmp2_ = self->priv->bus; 1077 #line 102 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1078 if (_tmp2_ == NULL) { 1079 #line 1080 "tracker-backend.c" 1080 GError* _tmp3_; 1081 #line 103 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1082 _tmp3_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_UNSUPPORTED, "Update support not available for direct-only connection"); 1083 #line 103 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1084 _inner_error_ = _tmp3_; 1085 #line 103 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1086 if (((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == G_IO_ERROR)) || (_inner_error_->domain == G_DBUS_ERROR)) { 1087 #line 103 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1088 g_propagate_error (error, _inner_error_); 1089 #line 103 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1090 return NULL; 1091 #line 1092 "tracker-backend.c" 1092 } else { 1093 #line 103 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1094 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); 1095 #line 103 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1096 g_clear_error (&_inner_error_); 1097 #line 103 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1098 return NULL; 1099 #line 1100 "tracker-backend.c" 1100 } 1101 } 1102 #line 105 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1103 _tmp4_ = self->priv->bus; 1104 #line 105 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1105 _tmp5_ = sparql; 1106 #line 105 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1107 _tmp6_ = priority; 1108 #line 105 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1109 _tmp7_ = cancellable; 1110 #line 105 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1111 _tmp8_ = tracker_sparql_connection_update_blank (_tmp4_, _tmp5_, _tmp6_, _tmp7_, &_inner_error_); 1112 #line 105 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1113 _tmp9_ = _tmp8_; 1114 #line 105 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1115 if (_inner_error_ != NULL) { 1116 #line 105 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1117 if (((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == G_IO_ERROR)) || (_inner_error_->domain == G_DBUS_ERROR)) { 1118 #line 105 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1119 g_propagate_error (error, _inner_error_); 1120 #line 105 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1121 return NULL; 1122 #line 1123 "tracker-backend.c" 1123 } else { 1124 #line 105 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1125 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); 1126 #line 105 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1127 g_clear_error (&_inner_error_); 1128 #line 105 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1129 return NULL; 1130 #line 1131 "tracker-backend.c" 1131 } 1132 } 1133 #line 105 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1134 result = _tmp9_; 1135 #line 105 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1136 return result; 1137 #line 1138 "tracker-backend.c" 1138 } 1139 1140 1141 static void tracker_sparql_backend_real_update_async_data_free (gpointer _data) { 1142 TrackerSparqlBackendUpdateAsyncData* _data_; 1143 _data_ = _data; 1144 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1145 _g_free0 (_data_->sparql); 1146 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1147 _g_object_unref0 (_data_->cancellable); 1148 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1149 _g_object_unref0 (_data_->self); 1150 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1151 g_slice_free (TrackerSparqlBackendUpdateAsyncData, _data_); 1152 #line 1153 "tracker-backend.c" 1153 } 1154 1155 1156 static void tracker_sparql_backend_real_update_async (TrackerSparqlConnection* base, const gchar* sparql, gint priority, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) { 1157 TrackerSparqlBackend * self; 1158 TrackerSparqlBackendUpdateAsyncData* _data_; 1159 TrackerSparqlBackend* _tmp0_; 1160 const gchar* _tmp1_; 1161 gchar* _tmp2_; 1162 gint _tmp3_; 1163 GCancellable* _tmp4_; 1164 GCancellable* _tmp5_; 1165 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1166 self = (TrackerSparqlBackend*) base; 1167 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1168 _data_ = g_slice_new0 (TrackerSparqlBackendUpdateAsyncData); 1169 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1170 _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, tracker_sparql_backend_real_update_async); 1171 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1172 g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_sparql_backend_real_update_async_data_free); 1173 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1174 _tmp0_ = _g_object_ref0 (self); 1175 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1176 _data_->self = _tmp0_; 1177 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1178 _tmp1_ = sparql; 1179 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1180 _tmp2_ = g_strdup (_tmp1_); 1181 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1182 _g_free0 (_data_->sparql); 1183 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1184 _data_->sparql = _tmp2_; 1185 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1186 _tmp3_ = priority; 1187 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1188 _data_->priority = _tmp3_; 1189 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1190 _tmp4_ = cancellable; 1191 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1192 _tmp5_ = _g_object_ref0 (_tmp4_); 1193 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1194 _g_object_unref0 (_data_->cancellable); 1195 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1196 _data_->cancellable = _tmp5_; 1197 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1198 tracker_sparql_backend_real_update_async_co (_data_); 1199 #line 1200 "tracker-backend.c" 1200 } 1201 1202 1203 static void tracker_sparql_backend_real_update_finish (TrackerSparqlConnection* base, GAsyncResult* _res_, GError** error) { 1204 TrackerSparqlBackendUpdateAsyncData* _data_;
variable '_data_' set but not used
(emitted by gcc)
1205 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1206 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) { 1207 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1208 return; 1209 #line 1210 "tracker-backend.c" 1210 } 1211 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1212 _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
Value stored to '_data_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

1213 #line 1214 "tracker-backend.c" 1214 } 1215 1216 1217 static void tracker_sparql_backend_update_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) { 1218 TrackerSparqlBackendUpdateAsyncData* _data_; 1219 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1220 _data_ = _user_data_; 1221 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1222 _data_->_source_object_ = source_object; 1223 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1224 _data_->_res_ = _res_; 1225 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1226 tracker_sparql_backend_real_update_async_co (_data_); 1227 #line 1228 "tracker-backend.c" 1228 } 1229 1230 1231 static gboolean tracker_sparql_backend_real_update_async_co (TrackerSparqlBackendUpdateAsyncData* _data_) { 1232 #line 108 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1233 switch (_data_->_state_) { 1234 #line 108 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1235 case 0: 1236 #line 1237 "tracker-backend.c" 1237 goto _state_0; 1238 #line 108 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1239 case 1: 1240 #line 1241 "tracker-backend.c" 1241 goto _state_1; 1242 default: 1243 #line 108 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1244 g_assert_not_reached (); 1245 #line 1246 "tracker-backend.c" 1246 } 1247 _state_0: 1248 #line 109 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1249 _data_->_tmp0_ = _data_->priority; 1250 #line 109 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1251 _data_->_tmp1_ = _data_->sparql; 1252 #line 109 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1253 g_debug ("tracker-backend.vala:109: %s(priority:%d): '%s'", "Tracker.Sparql.Backend.update_async", _data_->_tmp0_, _data_->_tmp1_); 1254 #line 110 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1255 _data_->_tmp2_ = _data_->self->priv->bus; 1256 #line 110 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1257 if (_data_->_tmp2_ == NULL) { 1258 #line 111 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1259 _data_->_tmp3_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_UNSUPPORTED, "Update support not available for direct-only connection"); 1260 #line 111 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1261 _data_->_inner_error_ = _data_->_tmp3_; 1262 #line 111 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1263 if (((_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_data_->_inner_error_->domain == G_IO_ERROR)) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) { 1264 #line 111 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1265 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 1266 #line 111 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1267 g_error_free (_data_->_inner_error_); 1268 #line 111 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1269 if (_data_->_state_ == 0) { 1270 #line 111 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1271 g_simple_async_result_complete_in_idle (_data_->_async_result); 1272 #line 1273 "tracker-backend.c" 1273 } else { 1274 #line 111 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1275 g_simple_async_result_complete (_data_->_async_result); 1276 #line 1277 "tracker-backend.c" 1277 } 1278 #line 111 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1279 g_object_unref (_data_->_async_result); 1280 #line 111 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1281 return FALSE; 1282 #line 1283 "tracker-backend.c" 1283 } else { 1284 #line 111 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1285 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); 1286 #line 111 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1287 g_clear_error (&_data_->_inner_error_); 1288 #line 111 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1289 return FALSE; 1290 #line 1291 "tracker-backend.c" 1291 } 1292 } 1293 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1294 _data_->_tmp4_ = _data_->self->priv->bus; 1295 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1296 _data_->_tmp5_ = _data_->sparql; 1297 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1298 _data_->_tmp6_ = _data_->priority; 1299 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1300 _data_->_tmp7_ = _data_->cancellable; 1301 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1302 _data_->_state_ = 1; 1303 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1304 tracker_sparql_connection_update_async (_data_->_tmp4_, _data_->_tmp5_, _data_->_tmp6_, _data_->_tmp7_, tracker_sparql_backend_update_async_ready, _data_); 1305 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1306 return FALSE; 1307 #line 1308 "tracker-backend.c" 1308 _state_1: 1309 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1310 tracker_sparql_connection_update_finish (_data_->_tmp4_, _data_->_res_, &_data_->_inner_error_); 1311 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1312 if (_data_->_inner_error_ != NULL) { 1313 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1314 if (((_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_data_->_inner_error_->domain == G_IO_ERROR)) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) { 1315 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1316 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 1317 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1318 g_error_free (_data_->_inner_error_); 1319 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1320 if (_data_->_state_ == 0) { 1321 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1322 g_simple_async_result_complete_in_idle (_data_->_async_result); 1323 #line 1324 "tracker-backend.c" 1324 } else { 1325 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1326 g_simple_async_result_complete (_data_->_async_result); 1327 #line 1328 "tracker-backend.c" 1328 } 1329 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1330 g_object_unref (_data_->_async_result); 1331 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1332 return FALSE; 1333 #line 1334 "tracker-backend.c" 1334 } else { 1335 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1336 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); 1337 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1338 g_clear_error (&_data_->_inner_error_); 1339 #line 113 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1340 return FALSE; 1341 #line 1342 "tracker-backend.c" 1342 } 1343 } 1344 #line 108 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1345 if (_data_->_state_ == 0) { 1346 #line 108 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1347 g_simple_async_result_complete_in_idle (_data_->_async_result); 1348 #line 1349 "tracker-backend.c" 1349 } else { 1350 #line 108 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1351 g_simple_async_result_complete (_data_->_async_result); 1352 #line 1353 "tracker-backend.c" 1353 } 1354 #line 108 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1355 g_object_unref (_data_->_async_result); 1356 #line 108 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1357 return FALSE; 1358 #line 1359 "tracker-backend.c" 1359 } 1360 1361 1362 static void tracker_sparql_backend_real_update_array_async_data_free (gpointer _data) { 1363 TrackerSparqlBackendUpdateArrayAsyncData* _data_; 1364 _data_ = _data; 1365 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1366 _g_object_unref0 (_data_->cancellable); 1367 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1368 _g_ptr_array_unref0 (_data_->result); 1369 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1370 _g_object_unref0 (_data_->self); 1371 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1372 g_slice_free (TrackerSparqlBackendUpdateArrayAsyncData, _data_); 1373 #line 1374 "tracker-backend.c" 1374 } 1375 1376 1377 static void tracker_sparql_backend_real_update_array_async (TrackerSparqlConnection* base, gchar** sparql, int sparql_length1, gint priority, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) { 1378 TrackerSparqlBackend * self; 1379 TrackerSparqlBackendUpdateArrayAsyncData* _data_; 1380 TrackerSparqlBackend* _tmp0_; 1381 gchar** _tmp1_; 1382 gint _tmp1__length1; 1383 gint _tmp2_; 1384 GCancellable* _tmp3_; 1385 GCancellable* _tmp4_; 1386 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1387 self = (TrackerSparqlBackend*) base; 1388 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1389 _data_ = g_slice_new0 (TrackerSparqlBackendUpdateArrayAsyncData); 1390 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1391 _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, tracker_sparql_backend_real_update_array_async); 1392 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1393 g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_sparql_backend_real_update_array_async_data_free); 1394 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1395 _tmp0_ = _g_object_ref0 (self); 1396 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1397 _data_->self = _tmp0_; 1398 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1399 _tmp1_ = sparql; 1400 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1401 _tmp1__length1 = sparql_length1; 1402 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1403 _data_->sparql = _tmp1_; 1404 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1405 _data_->sparql_length1 = _tmp1__length1; 1406 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1407 _tmp2_ = priority; 1408 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1409 _data_->priority = _tmp2_; 1410 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1411 _tmp3_ = cancellable; 1412 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1413 _tmp4_ = _g_object_ref0 (_tmp3_); 1414 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1415 _g_object_unref0 (_data_->cancellable); 1416 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1417 _data_->cancellable = _tmp4_; 1418 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1419 tracker_sparql_backend_real_update_array_async_co (_data_); 1420 #line 1421 "tracker-backend.c" 1421 } 1422 1423 1424 static GPtrArray* tracker_sparql_backend_real_update_array_finish (TrackerSparqlConnection* base, GAsyncResult* _res_, GError** error) { 1425 GPtrArray* result; 1426 TrackerSparqlBackendUpdateArrayAsyncData* _data_; 1427 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1428 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) { 1429 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1430 return NULL; 1431 #line 1432 "tracker-backend.c" 1432 } 1433 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1434 _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_)); 1435 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1436 result = _data_->result; 1437 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1438 _data_->result = NULL; 1439 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1440 return result; 1441 #line 1442 "tracker-backend.c" 1442 } 1443 1444 1445 static void tracker_sparql_backend_update_array_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) { 1446 TrackerSparqlBackendUpdateArrayAsyncData* _data_; 1447 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1448 _data_ = _user_data_; 1449 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1450 _data_->_source_object_ = source_object; 1451 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1452 _data_->_res_ = _res_; 1453 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1454 tracker_sparql_backend_real_update_array_async_co (_data_); 1455 #line 1456 "tracker-backend.c" 1456 } 1457 1458 1459 static gboolean tracker_sparql_backend_real_update_array_async_co (TrackerSparqlBackendUpdateArrayAsyncData* _data_) { 1460 #line 116 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1461 switch (_data_->_state_) { 1462 #line 116 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1463 case 0: 1464 #line 1465 "tracker-backend.c" 1465 goto _state_0; 1466 #line 116 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1467 case 1: 1468 #line 1469 "tracker-backend.c" 1469 goto _state_1; 1470 default: 1471 #line 116 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1472 g_assert_not_reached (); 1473 #line 1474 "tracker-backend.c" 1474 } 1475 _state_0: 1476 #line 117 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1477 _data_->_tmp0_ = _data_->self->priv->bus; 1478 #line 117 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1479 if (_data_->_tmp0_ == NULL) { 1480 #line 118 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1481 _data_->_tmp1_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_UNSUPPORTED, "Update support not available for direct-only connection"); 1482 #line 118 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1483 _data_->_inner_error_ = _data_->_tmp1_; 1484 #line 118 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1485 if (((_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_data_->_inner_error_->domain == G_IO_ERROR)) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) { 1486 #line 118 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1487 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 1488 #line 118 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1489 g_error_free (_data_->_inner_error_); 1490 #line 118 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1491 if (_data_->_state_ == 0) { 1492 #line 118 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1493 g_simple_async_result_complete_in_idle (_data_->_async_result); 1494 #line 1495 "tracker-backend.c" 1495 } else { 1496 #line 118 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1497 g_simple_async_result_complete (_data_->_async_result); 1498 #line 1499 "tracker-backend.c" 1499 } 1500 #line 118 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1501 g_object_unref (_data_->_async_result); 1502 #line 118 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1503 return FALSE; 1504 #line 1505 "tracker-backend.c" 1505 } else { 1506 #line 118 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1507 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); 1508 #line 118 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1509 g_clear_error (&_data_->_inner_error_); 1510 #line 118 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1511 return FALSE; 1512 #line 1513 "tracker-backend.c" 1513 } 1514 } 1515 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1516 _data_->_tmp2_ = _data_->self->priv->bus; 1517 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1518 _data_->_tmp3_ = _data_->sparql; 1519 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1520 _data_->_tmp3__length1 = _data_->sparql_length1; 1521 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1522 _data_->_tmp4_ = _data_->priority; 1523 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1524 _data_->_tmp5_ = _data_->cancellable; 1525 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1526 _data_->_state_ = 1; 1527 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1528 tracker_sparql_connection_update_array_async (_data_->_tmp2_, _data_->_tmp3_, _data_->_tmp3__length1, _data_->_tmp4_, _data_->_tmp5_, tracker_sparql_backend_update_array_async_ready, _data_); 1529 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1530 return FALSE; 1531 #line 1532 "tracker-backend.c" 1532 _state_1: 1533 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1534 _data_->_tmp6_ = NULL; 1535 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1536 _data_->_tmp6_ = tracker_sparql_connection_update_array_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error_); 1537 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1538 _data_->_tmp7_ = _data_->_tmp6_; 1539 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1540 if (_data_->_inner_error_ != NULL) { 1541 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1542 if (((_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_data_->_inner_error_->domain == G_IO_ERROR)) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) { 1543 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1544 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 1545 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1546 g_error_free (_data_->_inner_error_); 1547 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1548 if (_data_->_state_ == 0) { 1549 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1550 g_simple_async_result_complete_in_idle (_data_->_async_result); 1551 #line 1552 "tracker-backend.c" 1552 } else { 1553 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1554 g_simple_async_result_complete (_data_->_async_result); 1555 #line 1556 "tracker-backend.c" 1556 } 1557 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1558 g_object_unref (_data_->_async_result); 1559 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1560 return FALSE; 1561 #line 1562 "tracker-backend.c" 1562 } else { 1563 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1564 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); 1565 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1566 g_clear_error (&_data_->_inner_error_); 1567 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1568 return FALSE; 1569 #line 1570 "tracker-backend.c" 1570 } 1571 } 1572 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1573 _data_->result = _data_->_tmp7_; 1574 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1575 if (_data_->_state_ == 0) { 1576 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1577 g_simple_async_result_complete_in_idle (_data_->_async_result); 1578 #line 1579 "tracker-backend.c" 1579 } else { 1580 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1581 g_simple_async_result_complete (_data_->_async_result); 1582 #line 1583 "tracker-backend.c" 1583 } 1584 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1585 g_object_unref (_data_->_async_result); 1586 #line 120 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1587 return FALSE; 1588 #line 116 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1589 if (_data_->_state_ == 0) { 1590 #line 116 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1591 g_simple_async_result_complete_in_idle (_data_->_async_result); 1592 #line 1593 "tracker-backend.c" 1593 } else { 1594 #line 116 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1595 g_simple_async_result_complete (_data_->_async_result); 1596 #line 1597 "tracker-backend.c" 1597 } 1598 #line 116 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1599 g_object_unref (_data_->_async_result); 1600 #line 116 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1601 return FALSE; 1602 #line 1603 "tracker-backend.c" 1603 } 1604 1605 1606 static void tracker_sparql_backend_real_update_blank_async_data_free (gpointer _data) { 1607 TrackerSparqlBackendUpdateBlankAsyncData* _data_; 1608 _data_ = _data; 1609 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1610 _g_free0 (_data_->sparql); 1611 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1612 _g_object_unref0 (_data_->cancellable); 1613 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1614 _g_variant_unref0 (_data_->result); 1615 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1616 _g_object_unref0 (_data_->self); 1617 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1618 g_slice_free (TrackerSparqlBackendUpdateBlankAsyncData, _data_); 1619 #line 1620 "tracker-backend.c" 1620 } 1621 1622 1623 static void tracker_sparql_backend_real_update_blank_async (TrackerSparqlConnection* base, const gchar* sparql, gint priority, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) { 1624 TrackerSparqlBackend * self; 1625 TrackerSparqlBackendUpdateBlankAsyncData* _data_; 1626 TrackerSparqlBackend* _tmp0_; 1627 const gchar* _tmp1_; 1628 gchar* _tmp2_; 1629 gint _tmp3_; 1630 GCancellable* _tmp4_; 1631 GCancellable* _tmp5_; 1632 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1633 self = (TrackerSparqlBackend*) base; 1634 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1635 _data_ = g_slice_new0 (TrackerSparqlBackendUpdateBlankAsyncData); 1636 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1637 _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, tracker_sparql_backend_real_update_blank_async); 1638 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1639 g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_sparql_backend_real_update_blank_async_data_free); 1640 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1641 _tmp0_ = _g_object_ref0 (self); 1642 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1643 _data_->self = _tmp0_; 1644 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1645 _tmp1_ = sparql; 1646 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1647 _tmp2_ = g_strdup (_tmp1_); 1648 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1649 _g_free0 (_data_->sparql); 1650 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1651 _data_->sparql = _tmp2_; 1652 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1653 _tmp3_ = priority; 1654 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1655 _data_->priority = _tmp3_; 1656 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1657 _tmp4_ = cancellable; 1658 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1659 _tmp5_ = _g_object_ref0 (_tmp4_); 1660 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1661 _g_object_unref0 (_data_->cancellable); 1662 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1663 _data_->cancellable = _tmp5_; 1664 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1665 tracker_sparql_backend_real_update_blank_async_co (_data_); 1666 #line 1667 "tracker-backend.c" 1667 } 1668 1669 1670 static GVariant* tracker_sparql_backend_real_update_blank_finish (TrackerSparqlConnection* base, GAsyncResult* _res_, GError** error) { 1671 GVariant* result; 1672 TrackerSparqlBackendUpdateBlankAsyncData* _data_; 1673 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1674 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) { 1675 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1676 return NULL; 1677 #line 1678 "tracker-backend.c" 1678 } 1679 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1680 _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_)); 1681 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1682 result = _data_->result; 1683 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1684 _data_->result = NULL; 1685 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1686 return result; 1687 #line 1688 "tracker-backend.c" 1688 } 1689 1690 1691 static void tracker_sparql_backend_update_blank_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) { 1692 TrackerSparqlBackendUpdateBlankAsyncData* _data_; 1693 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1694 _data_ = _user_data_; 1695 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1696 _data_->_source_object_ = source_object; 1697 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1698 _data_->_res_ = _res_; 1699 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1700 tracker_sparql_backend_real_update_blank_async_co (_data_); 1701 #line 1702 "tracker-backend.c" 1702 } 1703 1704 1705 static gboolean tracker_sparql_backend_real_update_blank_async_co (TrackerSparqlBackendUpdateBlankAsyncData* _data_) { 1706 #line 123 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1707 switch (_data_->_state_) { 1708 #line 123 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1709 case 0: 1710 #line 1711 "tracker-backend.c" 1711 goto _state_0; 1712 #line 123 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1713 case 1: 1714 #line 1715 "tracker-backend.c" 1715 goto _state_1; 1716 default: 1717 #line 123 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1718 g_assert_not_reached (); 1719 #line 1720 "tracker-backend.c" 1720 } 1721 _state_0: 1722 #line 124 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1723 _data_->_tmp0_ = _data_->priority; 1724 #line 124 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1725 _data_->_tmp1_ = _data_->sparql; 1726 #line 124 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1727 g_debug ("tracker-backend.vala:124: %s(priority:%d): '%s'", "Tracker.Sparql.Backend.update_blank_async", _data_->_tmp0_, _data_->_tmp1_); 1728 #line 125 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1729 _data_->_tmp2_ = _data_->self->priv->bus; 1730 #line 125 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1731 if (_data_->_tmp2_ == NULL) { 1732 #line 126 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1733 _data_->_tmp3_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_UNSUPPORTED, "Update support not available for direct-only connection"); 1734 #line 126 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1735 _data_->_inner_error_ = _data_->_tmp3_; 1736 #line 126 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1737 if (((_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_data_->_inner_error_->domain == G_IO_ERROR)) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) { 1738 #line 126 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1739 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 1740 #line 126 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1741 g_error_free (_data_->_inner_error_); 1742 #line 126 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1743 if (_data_->_state_ == 0) { 1744 #line 126 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1745 g_simple_async_result_complete_in_idle (_data_->_async_result); 1746 #line 1747 "tracker-backend.c" 1747 } else { 1748 #line 126 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1749 g_simple_async_result_complete (_data_->_async_result); 1750 #line 1751 "tracker-backend.c" 1751 } 1752 #line 126 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1753 g_object_unref (_data_->_async_result); 1754 #line 126 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1755 return FALSE; 1756 #line 1757 "tracker-backend.c" 1757 } else { 1758 #line 126 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1759 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); 1760 #line 126 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1761 g_clear_error (&_data_->_inner_error_); 1762 #line 126 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1763 return FALSE; 1764 #line 1765 "tracker-backend.c" 1765 } 1766 } 1767 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1768 _data_->_tmp4_ = _data_->self->priv->bus; 1769 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1770 _data_->_tmp5_ = _data_->sparql; 1771 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1772 _data_->_tmp6_ = _data_->priority; 1773 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1774 _data_->_tmp7_ = _data_->cancellable; 1775 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1776 _data_->_state_ = 1; 1777 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1778 tracker_sparql_connection_update_blank_async (_data_->_tmp4_, _data_->_tmp5_, _data_->_tmp6_, _data_->_tmp7_, tracker_sparql_backend_update_blank_async_ready, _data_); 1779 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1780 return FALSE; 1781 #line 1782 "tracker-backend.c" 1782 _state_1: 1783 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1784 _data_->_tmp8_ = NULL; 1785 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1786 _data_->_tmp8_ = tracker_sparql_connection_update_blank_finish (_data_->_tmp4_, _data_->_res_, &_data_->_inner_error_); 1787 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1788 _data_->_tmp9_ = _data_->_tmp8_; 1789 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1790 if (_data_->_inner_error_ != NULL) { 1791 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1792 if (((_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_data_->_inner_error_->domain == G_IO_ERROR)) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) { 1793 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1794 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 1795 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1796 g_error_free (_data_->_inner_error_); 1797 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1798 if (_data_->_state_ == 0) { 1799 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1800 g_simple_async_result_complete_in_idle (_data_->_async_result); 1801 #line 1802 "tracker-backend.c" 1802 } else { 1803 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1804 g_simple_async_result_complete (_data_->_async_result); 1805 #line 1806 "tracker-backend.c" 1806 } 1807 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1808 g_object_unref (_data_->_async_result); 1809 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1810 return FALSE; 1811 #line 1812 "tracker-backend.c" 1812 } else { 1813 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1814 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); 1815 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1816 g_clear_error (&_data_->_inner_error_); 1817 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1818 return FALSE; 1819 #line 1820 "tracker-backend.c" 1820 } 1821 } 1822 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1823 _data_->result = _data_->_tmp9_; 1824 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1825 if (_data_->_state_ == 0) { 1826 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1827 g_simple_async_result_complete_in_idle (_data_->_async_result); 1828 #line 1829 "tracker-backend.c" 1829 } else { 1830 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1831 g_simple_async_result_complete (_data_->_async_result); 1832 #line 1833 "tracker-backend.c" 1833 } 1834 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1835 g_object_unref (_data_->_async_result); 1836 #line 128 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1837 return FALSE; 1838 #line 123 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1839 if (_data_->_state_ == 0) { 1840 #line 123 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1841 g_simple_async_result_complete_in_idle (_data_->_async_result); 1842 #line 1843 "tracker-backend.c" 1843 } else { 1844 #line 123 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1845 g_simple_async_result_complete (_data_->_async_result); 1846 #line 1847 "tracker-backend.c" 1847 } 1848 #line 123 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1849 g_object_unref (_data_->_async_result); 1850 #line 123 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1851 return FALSE; 1852 #line 1853 "tracker-backend.c" 1853 } 1854 1855 1856 static void tracker_sparql_backend_real_load (TrackerSparqlConnection* base, GFile* file, GCancellable* cancellable, GError** error) { 1857 TrackerSparqlBackend * self; 1858 GFile* _tmp0_; 1859 gchar* _tmp1_ = NULL; 1860 gchar* uri; 1861 const gchar* _tmp2_; 1862 TrackerSparqlConnection* _tmp3_; 1863 TrackerSparqlConnection* _tmp5_; 1864 GFile* _tmp6_; 1865 GCancellable* _tmp7_; 1866 GError * _inner_error_ = NULL; 1867 #line 131 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1868 self = (TrackerSparqlBackend*) base; 1869 #line 131 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1870 g_return_if_fail (file != NULL); 1871 #line 132 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1872 _tmp0_ = file; 1873 #line 132 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1874 _tmp1_ = g_file_get_uri (_tmp0_); 1875 #line 132 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1876 uri = _tmp1_; 1877 #line 133 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1878 _tmp2_ = uri; 1879 #line 133 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1880 g_debug ("tracker-backend.vala:133: %s(): '%s'", "Tracker.Sparql.Backend.load", _tmp2_); 1881 #line 134 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1882 _tmp3_ = self->priv->bus; 1883 #line 134 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1884 if (_tmp3_ == NULL) { 1885 #line 1886 "tracker-backend.c" 1886 GError* _tmp4_; 1887 #line 135 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1888 _tmp4_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_UNSUPPORTED, "Update support not available for direct-only connection"); 1889 #line 135 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1890 _inner_error_ = _tmp4_; 1891 #line 135 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1892 if (((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == G_IO_ERROR)) || (_inner_error_->domain == G_DBUS_ERROR)) { 1893 #line 135 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1894 g_propagate_error (error, _inner_error_); 1895 #line 135 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1896 _g_free0 (uri); 1897 #line 135 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1898 return; 1899 #line 1900 "tracker-backend.c" 1900 } else { 1901 #line 135 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1902 _g_free0 (uri); 1903 #line 135 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1904 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); 1905 #line 135 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1906 g_clear_error (&_inner_error_); 1907 #line 135 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1908 return; 1909 #line 1910 "tracker-backend.c" 1910 } 1911 } 1912 #line 137 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1913 _tmp5_ = self->priv->bus; 1914 #line 137 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1915 _tmp6_ = file; 1916 #line 137 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1917 _tmp7_ = cancellable; 1918 #line 137 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1919 tracker_sparql_connection_load (_tmp5_, _tmp6_, _tmp7_, &_inner_error_); 1920 #line 137 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1921 if (_inner_error_ != NULL) { 1922 #line 137 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1923 if (((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == G_IO_ERROR)) || (_inner_error_->domain == G_DBUS_ERROR)) { 1924 #line 137 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1925 g_propagate_error (error, _inner_error_); 1926 #line 137 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1927 _g_free0 (uri); 1928 #line 137 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1929 return; 1930 #line 1931 "tracker-backend.c" 1931 } else { 1932 #line 137 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1933 _g_free0 (uri); 1934 #line 137 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1935 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); 1936 #line 137 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1937 g_clear_error (&_inner_error_); 1938 #line 137 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1939 return; 1940 #line 1941 "tracker-backend.c" 1941 } 1942 } 1943 #line 131 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1944 _g_free0 (uri); 1945 #line 1946 "tracker-backend.c" 1946 } 1947 1948 1949 static void tracker_sparql_backend_real_load_async_data_free (gpointer _data) { 1950 TrackerSparqlBackendLoadAsyncData* _data_; 1951 _data_ = _data; 1952 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1953 _g_object_unref0 (_data_->file); 1954 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1955 _g_object_unref0 (_data_->cancellable); 1956 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1957 _g_object_unref0 (_data_->self); 1958 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1959 g_slice_free (TrackerSparqlBackendLoadAsyncData, _data_); 1960 #line 1961 "tracker-backend.c" 1961 } 1962 1963 1964 static void tracker_sparql_backend_real_load_async (TrackerSparqlConnection* base, GFile* file, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) { 1965 TrackerSparqlBackend * self; 1966 TrackerSparqlBackendLoadAsyncData* _data_; 1967 TrackerSparqlBackend* _tmp0_; 1968 GFile* _tmp1_; 1969 GFile* _tmp2_; 1970 GCancellable* _tmp3_; 1971 GCancellable* _tmp4_; 1972 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1973 self = (TrackerSparqlBackend*) base; 1974 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1975 _data_ = g_slice_new0 (TrackerSparqlBackendLoadAsyncData); 1976 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1977 _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, tracker_sparql_backend_real_load_async); 1978 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1979 g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_sparql_backend_real_load_async_data_free); 1980 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1981 _tmp0_ = _g_object_ref0 (self); 1982 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1983 _data_->self = _tmp0_; 1984 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1985 _tmp1_ = file; 1986 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1987 _tmp2_ = _g_object_ref0 (_tmp1_); 1988 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1989 _g_object_unref0 (_data_->file); 1990 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1991 _data_->file = _tmp2_; 1992 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1993 _tmp3_ = cancellable; 1994 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1995 _tmp4_ = _g_object_ref0 (_tmp3_); 1996 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1997 _g_object_unref0 (_data_->cancellable); 1998 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 1999 _data_->cancellable = _tmp4_; 2000 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2001 tracker_sparql_backend_real_load_async_co (_data_); 2002 #line 2003 "tracker-backend.c" 2003 } 2004 2005 2006 static void tracker_sparql_backend_real_load_finish (TrackerSparqlConnection* base, GAsyncResult* _res_, GError** error) { 2007 TrackerSparqlBackendLoadAsyncData* _data_;
variable '_data_' set but not used
(emitted by gcc)
2008 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2009 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) { 2010 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2011 return; 2012 #line 2013 "tracker-backend.c" 2013 } 2014 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2015 _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
Value stored to '_data_' is never read
(emitted by clang-analyzer)

TODO: a detailed trace is available in the data model (not yet rendered in this report)

2016 #line 2017 "tracker-backend.c" 2017 } 2018 2019 2020 static void tracker_sparql_backend_load_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) { 2021 TrackerSparqlBackendLoadAsyncData* _data_; 2022 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2023 _data_ = _user_data_; 2024 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2025 _data_->_source_object_ = source_object; 2026 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2027 _data_->_res_ = _res_; 2028 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2029 tracker_sparql_backend_real_load_async_co (_data_); 2030 #line 2031 "tracker-backend.c" 2031 } 2032 2033 2034 static gboolean tracker_sparql_backend_real_load_async_co (TrackerSparqlBackendLoadAsyncData* _data_) { 2035 #line 140 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2036 switch (_data_->_state_) { 2037 #line 140 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2038 case 0: 2039 #line 2040 "tracker-backend.c" 2040 goto _state_0; 2041 #line 140 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2042 case 1: 2043 #line 2044 "tracker-backend.c" 2044 goto _state_1; 2045 default: 2046 #line 140 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2047 g_assert_not_reached (); 2048 #line 2049 "tracker-backend.c" 2049 } 2050 _state_0: 2051 #line 141 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2052 _data_->_tmp0_ = _data_->file; 2053 #line 141 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2054 _data_->_tmp1_ = NULL; 2055 #line 141 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2056 _data_->_tmp1_ = g_file_get_uri (_data_->_tmp0_); 2057 #line 141 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2058 _data_->uri = _data_->_tmp1_; 2059 #line 142 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2060 _data_->_tmp2_ = _data_->uri; 2061 #line 142 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2062 g_debug ("tracker-backend.vala:142: %s(): '%s'", "Tracker.Sparql.Backend.load_async", _data_->_tmp2_); 2063 #line 143 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2064 _data_->_tmp3_ = _data_->self->priv->bus; 2065 #line 143 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2066 if (_data_->_tmp3_ == NULL) { 2067 #line 144 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2068 _data_->_tmp4_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_UNSUPPORTED, "Update support not available for direct-only connection"); 2069 #line 144 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2070 _data_->_inner_error_ = _data_->_tmp4_; 2071 #line 144 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2072 if (((_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_data_->_inner_error_->domain == G_IO_ERROR)) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) { 2073 #line 144 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2074 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 2075 #line 144 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2076 g_error_free (_data_->_inner_error_); 2077 #line 144 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2078 _g_free0 (_data_->uri); 2079 #line 144 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2080 if (_data_->_state_ == 0) { 2081 #line 144 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2082 g_simple_async_result_complete_in_idle (_data_->_async_result); 2083 #line 2084 "tracker-backend.c" 2084 } else { 2085 #line 144 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2086 g_simple_async_result_complete (_data_->_async_result); 2087 #line 2088 "tracker-backend.c" 2088 } 2089 #line 144 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2090 g_object_unref (_data_->_async_result); 2091 #line 144 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2092 return FALSE; 2093 #line 2094 "tracker-backend.c" 2094 } else { 2095 #line 144 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2096 _g_free0 (_data_->uri); 2097 #line 144 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2098 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); 2099 #line 144 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2100 g_clear_error (&_data_->_inner_error_); 2101 #line 144 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2102 return FALSE; 2103 #line 2104 "tracker-backend.c" 2104 } 2105 } 2106 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2107 _data_->_tmp5_ = _data_->self->priv->bus; 2108 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2109 _data_->_tmp6_ = _data_->file; 2110 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2111 _data_->_tmp7_ = _data_->cancellable; 2112 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2113 _data_->_state_ = 1; 2114 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2115 tracker_sparql_connection_load_async (_data_->_tmp5_, _data_->_tmp6_, _data_->_tmp7_, tracker_sparql_backend_load_async_ready, _data_); 2116 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2117 return FALSE; 2118 #line 2119 "tracker-backend.c" 2119 _state_1: 2120 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2121 tracker_sparql_connection_load_finish (_data_->_tmp5_, _data_->_res_, &_data_->_inner_error_); 2122 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2123 if (_data_->_inner_error_ != NULL) { 2124 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2125 if (((_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_data_->_inner_error_->domain == G_IO_ERROR)) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) { 2126 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2127 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 2128 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2129 g_error_free (_data_->_inner_error_); 2130 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2131 _g_free0 (_data_->uri); 2132 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2133 if (_data_->_state_ == 0) { 2134 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2135 g_simple_async_result_complete_in_idle (_data_->_async_result); 2136 #line 2137 "tracker-backend.c" 2137 } else { 2138 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2139 g_simple_async_result_complete (_data_->_async_result); 2140 #line 2141 "tracker-backend.c" 2141 } 2142 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2143 g_object_unref (_data_->_async_result); 2144 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2145 return FALSE; 2146 #line 2147 "tracker-backend.c" 2147 } else { 2148 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2149 _g_free0 (_data_->uri); 2150 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2151 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); 2152 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2153 g_clear_error (&_data_->_inner_error_); 2154 #line 146 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2155 return FALSE; 2156 #line 2157 "tracker-backend.c" 2157 } 2158 } 2159 #line 140 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2160 _g_free0 (_data_->uri); 2161 #line 140 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2162 if (_data_->_state_ == 0) { 2163 #line 140 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2164 g_simple_async_result_complete_in_idle (_data_->_async_result); 2165 #line 2166 "tracker-backend.c" 2166 } else { 2167 #line 140 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2168 g_simple_async_result_complete (_data_->_async_result); 2169 #line 2170 "tracker-backend.c" 2170 } 2171 #line 140 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2172 g_object_unref (_data_->_async_result); 2173 #line 140 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2174 return FALSE; 2175 #line 2176 "tracker-backend.c" 2176 } 2177 2178 2179 static TrackerSparqlCursor* tracker_sparql_backend_real_statistics (TrackerSparqlConnection* base, GCancellable* cancellable, GError** error) { 2180 TrackerSparqlBackend * self; 2181 TrackerSparqlCursor* result = NULL; 2182 TrackerSparqlConnection* _tmp0_; 2183 TrackerSparqlConnection* _tmp2_; 2184 GCancellable* _tmp3_; 2185 TrackerSparqlCursor* _tmp4_ = NULL; 2186 TrackerSparqlCursor* _tmp5_; 2187 GError * _inner_error_ = NULL; 2188 #line 149 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2189 self = (TrackerSparqlBackend*) base; 2190 #line 150 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2191 g_debug ("tracker-backend.vala:150: %s()", "Tracker.Sparql.Backend.statistics"); 2192 #line 151 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2193 _tmp0_ = self->priv->bus; 2194 #line 151 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2195 if (_tmp0_ == NULL) { 2196 #line 2197 "tracker-backend.c" 2197 GError* _tmp1_; 2198 #line 152 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2199 _tmp1_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_UNSUPPORTED, "Statistics support not available for direct-only connection"); 2200 #line 152 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2201 _inner_error_ = _tmp1_; 2202 #line 152 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2203 if (((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == G_IO_ERROR)) || (_inner_error_->domain == G_DBUS_ERROR)) { 2204 #line 152 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2205 g_propagate_error (error, _inner_error_); 2206 #line 152 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2207 return NULL; 2208 #line 2209 "tracker-backend.c" 2209 } else { 2210 #line 152 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2211 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); 2212 #line 152 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2213 g_clear_error (&_inner_error_); 2214 #line 152 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2215 return NULL; 2216 #line 2217 "tracker-backend.c" 2217 } 2218 } 2219 #line 154 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2220 _tmp2_ = self->priv->bus; 2221 #line 154 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2222 _tmp3_ = cancellable; 2223 #line 154 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2224 _tmp4_ = tracker_sparql_connection_statistics (_tmp2_, _tmp3_, &_inner_error_); 2225 #line 154 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2226 _tmp5_ = _tmp4_; 2227 #line 154 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2228 if (_inner_error_ != NULL) { 2229 #line 154 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2230 if (((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == G_IO_ERROR)) || (_inner_error_->domain == G_DBUS_ERROR)) { 2231 #line 154 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2232 g_propagate_error (error, _inner_error_); 2233 #line 154 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2234 return NULL; 2235 #line 2236 "tracker-backend.c" 2236 } else { 2237 #line 154 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2238 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); 2239 #line 154 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2240 g_clear_error (&_inner_error_); 2241 #line 154 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2242 return NULL; 2243 #line 2244 "tracker-backend.c" 2244 } 2245 } 2246 #line 154 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2247 result = _tmp5_; 2248 #line 154 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2249 return result; 2250 #line 2251 "tracker-backend.c" 2251 } 2252 2253 2254 static void tracker_sparql_backend_real_statistics_async_data_free (gpointer _data) { 2255 TrackerSparqlBackendStatisticsAsyncData* _data_; 2256 _data_ = _data; 2257 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2258 _g_object_unref0 (_data_->cancellable); 2259 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2260 _g_object_unref0 (_data_->result); 2261 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2262 _g_object_unref0 (_data_->self); 2263 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2264 g_slice_free (TrackerSparqlBackendStatisticsAsyncData, _data_); 2265 #line 2266 "tracker-backend.c" 2266 } 2267 2268 2269 static void tracker_sparql_backend_real_statistics_async (TrackerSparqlConnection* base, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) { 2270 TrackerSparqlBackend * self; 2271 TrackerSparqlBackendStatisticsAsyncData* _data_; 2272 TrackerSparqlBackend* _tmp0_; 2273 GCancellable* _tmp1_; 2274 GCancellable* _tmp2_; 2275 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2276 self = (TrackerSparqlBackend*) base; 2277 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2278 _data_ = g_slice_new0 (TrackerSparqlBackendStatisticsAsyncData); 2279 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2280 _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, tracker_sparql_backend_real_statistics_async); 2281 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2282 g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_sparql_backend_real_statistics_async_data_free); 2283 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2284 _tmp0_ = _g_object_ref0 (self); 2285 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2286 _data_->self = _tmp0_; 2287 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2288 _tmp1_ = cancellable; 2289 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2290 _tmp2_ = _g_object_ref0 (_tmp1_); 2291 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2292 _g_object_unref0 (_data_->cancellable); 2293 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2294 _data_->cancellable = _tmp2_; 2295 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2296 tracker_sparql_backend_real_statistics_async_co (_data_); 2297 #line 2298 "tracker-backend.c" 2298 } 2299 2300 2301 static TrackerSparqlCursor* tracker_sparql_backend_real_statistics_finish (TrackerSparqlConnection* base, GAsyncResult* _res_, GError** error) { 2302 TrackerSparqlCursor* result; 2303 TrackerSparqlBackendStatisticsAsyncData* _data_; 2304 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2305 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) { 2306 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2307 return NULL; 2308 #line 2309 "tracker-backend.c" 2309 } 2310 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2311 _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_)); 2312 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2313 result = _data_->result; 2314 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2315 _data_->result = NULL; 2316 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2317 return result; 2318 #line 2319 "tracker-backend.c" 2319 } 2320 2321 2322 static void tracker_sparql_backend_statistics_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) { 2323 TrackerSparqlBackendStatisticsAsyncData* _data_; 2324 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2325 _data_ = _user_data_; 2326 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2327 _data_->_source_object_ = source_object; 2328 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2329 _data_->_res_ = _res_; 2330 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2331 tracker_sparql_backend_real_statistics_async_co (_data_); 2332 #line 2333 "tracker-backend.c" 2333 } 2334 2335 2336 static gboolean tracker_sparql_backend_real_statistics_async_co (TrackerSparqlBackendStatisticsAsyncData* _data_) { 2337 #line 157 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2338 switch (_data_->_state_) { 2339 #line 157 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2340 case 0: 2341 #line 2342 "tracker-backend.c" 2342 goto _state_0; 2343 #line 157 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2344 case 1: 2345 #line 2346 "tracker-backend.c" 2346 goto _state_1; 2347 default: 2348 #line 157 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2349 g_assert_not_reached (); 2350 #line 2351 "tracker-backend.c" 2351 } 2352 _state_0: 2353 #line 158 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2354 g_debug ("tracker-backend.vala:158: %s()", "Tracker.Sparql.Backend.statistics_async"); 2355 #line 159 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2356 _data_->_tmp0_ = _data_->self->priv->bus; 2357 #line 159 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2358 if (_data_->_tmp0_ == NULL) { 2359 #line 160 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2360 _data_->_tmp1_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_UNSUPPORTED, "Statistics support not available for direct-only connection"); 2361 #line 160 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2362 _data_->_inner_error_ = _data_->_tmp1_; 2363 #line 160 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2364 if (((_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_data_->_inner_error_->domain == G_IO_ERROR)) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) { 2365 #line 160 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2366 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 2367 #line 160 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2368 g_error_free (_data_->_inner_error_); 2369 #line 160 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2370 if (_data_->_state_ == 0) { 2371 #line 160 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2372 g_simple_async_result_complete_in_idle (_data_->_async_result); 2373 #line 2374 "tracker-backend.c" 2374 } else { 2375 #line 160 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2376 g_simple_async_result_complete (_data_->_async_result); 2377 #line 2378 "tracker-backend.c" 2378 } 2379 #line 160 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2380 g_object_unref (_data_->_async_result); 2381 #line 160 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2382 return FALSE; 2383 #line 2384 "tracker-backend.c" 2384 } else { 2385 #line 160 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2386 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); 2387 #line 160 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2388 g_clear_error (&_data_->_inner_error_); 2389 #line 160 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2390 return FALSE; 2391 #line 2392 "tracker-backend.c" 2392 } 2393 } 2394 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2395 _data_->_tmp2_ = _data_->self->priv->bus; 2396 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2397 _data_->_tmp3_ = _data_->cancellable; 2398 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2399 _data_->_state_ = 1; 2400 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2401 tracker_sparql_connection_statistics_async (_data_->_tmp2_, _data_->_tmp3_, tracker_sparql_backend_statistics_async_ready, _data_); 2402 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2403 return FALSE; 2404 #line 2405 "tracker-backend.c" 2405 _state_1: 2406 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2407 _data_->_tmp4_ = NULL; 2408 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2409 _data_->_tmp4_ = tracker_sparql_connection_statistics_finish (_data_->_tmp2_, _data_->_res_, &_data_->_inner_error_); 2410 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2411 _data_->_tmp5_ = _data_->_tmp4_; 2412 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2413 if (_data_->_inner_error_ != NULL) { 2414 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2415 if (((_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_data_->_inner_error_->domain == G_IO_ERROR)) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) { 2416 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2417 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 2418 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2419 g_error_free (_data_->_inner_error_); 2420 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2421 if (_data_->_state_ == 0) { 2422 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2423 g_simple_async_result_complete_in_idle (_data_->_async_result); 2424 #line 2425 "tracker-backend.c" 2425 } else { 2426 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2427 g_simple_async_result_complete (_data_->_async_result); 2428 #line 2429 "tracker-backend.c" 2429 } 2430 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2431 g_object_unref (_data_->_async_result); 2432 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2433 return FALSE; 2434 #line 2435 "tracker-backend.c" 2435 } else { 2436 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2437 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); 2438 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2439 g_clear_error (&_data_->_inner_error_); 2440 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2441 return FALSE; 2442 #line 2443 "tracker-backend.c" 2443 } 2444 } 2445 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2446 _data_->result = _data_->_tmp5_; 2447 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2448 if (_data_->_state_ == 0) { 2449 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2450 g_simple_async_result_complete_in_idle (_data_->_async_result); 2451 #line 2452 "tracker-backend.c" 2452 } else { 2453 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2454 g_simple_async_result_complete (_data_->_async_result); 2455 #line 2456 "tracker-backend.c" 2456 } 2457 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2458 g_object_unref (_data_->_async_result); 2459 #line 162 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2460 return FALSE; 2461 #line 157 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2462 if (_data_->_state_ == 0) { 2463 #line 157 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2464 g_simple_async_result_complete_in_idle (_data_->_async_result); 2465 #line 2466 "tracker-backend.c" 2466 } else { 2467 #line 157 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2468 g_simple_async_result_complete (_data_->_async_result); 2469 #line 2470 "tracker-backend.c" 2470 } 2471 #line 157 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2472 g_object_unref (_data_->_async_result); 2473 #line 157 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2474 return FALSE; 2475 #line 2476 "tracker-backend.c" 2476 } 2477 2478 2479 static void tracker_sparql_backend_load_plugins (TrackerSparqlBackend* self, GError** error) { 2480 const gchar* _tmp0_ = NULL; 2481 gchar* _tmp1_; 2482 gchar* env_backend; 2483 TrackerSparqlBackendBackend backend; 2484 const gchar* _tmp2_; 2485 TrackerSparqlBackendBackend _tmp8_; 2486 TrackerSparqlBackendBackend _tmp9_; 2487 GError * _inner_error_ = NULL; 2488 #line 166 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2489 g_return_if_fail (self != NULL); 2490 #line 167 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2491 _tmp0_ = g_getenv ("TRACKER_SPARQL_BACKEND"); 2492 #line 167 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2493 _tmp1_ = g_strdup (_tmp0_); 2494 #line 167 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2495 env_backend = _tmp1_; 2496 #line 168 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2497 backend = TRACKER_SPARQL_BACKEND_BACKEND_AUTO; 2498 #line 170 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2499 _tmp2_ = env_backend; 2500 #line 170 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2501 if (_tmp2_ != NULL) { 2502 #line 2503 "tracker-backend.c" 2503 const gchar* _tmp3_; 2504 gint _tmp4_ = 0; 2505 #line 171 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2506 _tmp3_ = env_backend; 2507 #line 171 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2508 _tmp4_ = g_ascii_strcasecmp (_tmp3_, "direct"); 2509 #line 171 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2510 if (_tmp4_ == 0) { 2511 #line 172 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2512 backend = TRACKER_SPARQL_BACKEND_BACKEND_DIRECT; 2513 #line 173 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2514 g_debug ("tracker-backend.vala:173: Using backend = 'DIRECT'"); 2515 #line 2516 "tracker-backend.c" 2516 } else { 2517 const gchar* _tmp5_; 2518 gint _tmp6_ = 0; 2519 #line 174 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2520 _tmp5_ = env_backend; 2521 #line 174 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2522 _tmp6_ = g_ascii_strcasecmp (_tmp5_, "bus"); 2523 #line 174 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2524 if (_tmp6_ == 0) { 2525 #line 175 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2526 backend = TRACKER_SPARQL_BACKEND_BACKEND_BUS; 2527 #line 176 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2528 g_debug ("tracker-backend.vala:176: Using backend = 'BUS'"); 2529 #line 2530 "tracker-backend.c" 2530 } else { 2531 const gchar* _tmp7_; 2532 #line 178 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2533 _tmp7_ = env_backend; 2534 #line 178 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2535 g_warning ("tracker-backend.vala:178: Environment variable TRACKER_SPARQL_BACKEND " \ 2536 "set to unknown value '%s'", _tmp7_); 2537 #line 2537 "tracker-backend.c" 2538 } 2539 } 2540 } 2541 #line 182 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2542 _tmp8_ = backend; 2543 #line 182 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2544 if (_tmp8_ == TRACKER_SPARQL_BACKEND_BACKEND_AUTO) { 2545 #line 183 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2546 g_debug ("tracker-backend.vala:183: Using backend = 'AUTO'"); 2547 #line 2547 "tracker-backend.c" 2548 } 2549 #line 186 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2550 _tmp9_ = backend; 2551 #line 186 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2552 switch (_tmp9_) { 2553 #line 186 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2554 case TRACKER_SPARQL_BACKEND_BACKEND_AUTO: 2555 #line 2555 "tracker-backend.c" 2556 { 2557 TrackerBusConnection* _tmp16_; 2558 TrackerBusConnection* _tmp17_; 2559 { 2560 TrackerDirectConnection* _tmp10_; 2561 TrackerDirectConnection* _tmp11_; 2562 #line 189 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2563 _tmp10_ = tracker_direct_connection_new (&_inner_error_); 2564 #line 189 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2565 _tmp11_ = _tmp10_; 2566 #line 189 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2567 if (_inner_error_ != NULL) { 2568 #line 189 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2569 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) { 2570 #line 2570 "tracker-backend.c" 2571 goto __catch2_tracker_sparql_error; 2572 } 2573 goto __finally2; 2574 } 2575 #line 189 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2576 _g_object_unref0 (self->priv->direct); 2577 #line 189 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2578 self->priv->direct = (TrackerSparqlConnection*) _tmp11_; 2579 #line 2579 "tracker-backend.c" 2580 } 2581 goto __finally2; 2582 __catch2_tracker_sparql_error: 2583 { 2584 GError* e = NULL; 2585 GError* _tmp12_; 2586 const gchar* _tmp13_; 2587 gchar* _tmp14_; 2588 gchar* _tmp15_; 2589 #line 188 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2590 e = _inner_error_; 2591 #line 188 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2592 _inner_error_ = NULL; 2593 #line 191 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2594 _tmp12_ = e; 2595 #line 191 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2596 _tmp13_ = _tmp12_->message; 2597 #line 191 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2598 _tmp14_ = g_strconcat ("Unable to initialize direct backend: ", _tmp13_, NULL); 2599 #line 191 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2600 _tmp15_ = _tmp14_; 2601 #line 191 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2602 g_debug ("tracker-backend.vala:191: %s", _tmp15_); 2603 #line 191 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2604 _g_free0 (_tmp15_); 2605 #line 188 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2606 _g_error_free0 (e); 2607 #line 2607 "tracker-backend.c" 2608 } 2609 __finally2: 2610 #line 188 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2611 if (_inner_error_ != NULL) { 2612 #line 188 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2613 g_propagate_error (error, _inner_error_); 2614 #line 188 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2615 _g_free0 (env_backend); 2616 #line 188 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2617 return; 2618 #line 2618 "tracker-backend.c" 2619 } 2620 #line 194 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2621 _tmp16_ = tracker_bus_connection_new (&_inner_error_); 2622 #line 194 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2623 _tmp17_ = _tmp16_; 2624 #line 194 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2625 if (_inner_error_ != NULL) { 2626 #line 194 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2627 g_propagate_error (error, _inner_error_); 2628 #line 194 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2629 _g_free0 (env_backend); 2630 #line 194 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2631 return; 2632 #line 2632 "tracker-backend.c" 2633 } 2634 #line 194 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2635 _g_object_unref0 (self->priv->bus); 2636 #line 194 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2637 self->priv->bus = (TrackerSparqlConnection*) _tmp17_; 2638 #line 195 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2639 break; 2640 #line 2640 "tracker-backend.c" 2641 } 2642 #line 186 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2643 case TRACKER_SPARQL_BACKEND_BACKEND_DIRECT: 2644 #line 2644 "tracker-backend.c" 2645 { 2646 TrackerDirectConnection* _tmp18_; 2647 TrackerDirectConnection* _tmp19_; 2648 #line 198 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2649 _tmp18_ = tracker_direct_connection_new (&_inner_error_); 2650 #line 198 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2651 _tmp19_ = _tmp18_; 2652 #line 198 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2653 if (_inner_error_ != NULL) { 2654 #line 198 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2655 g_propagate_error (error, _inner_error_); 2656 #line 198 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2657 _g_free0 (env_backend); 2658 #line 198 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2659 return; 2660 #line 2660 "tracker-backend.c" 2661 } 2662 #line 198 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2663 _g_object_unref0 (self->priv->direct); 2664 #line 198 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2665 self->priv->direct = (TrackerSparqlConnection*) _tmp19_; 2666 #line 199 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2667 break; 2668 #line 2668 "tracker-backend.c" 2669 } 2670 #line 186 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2671 case TRACKER_SPARQL_BACKEND_BACKEND_BUS: 2672 #line 2672 "tracker-backend.c" 2673 { 2674 TrackerBusConnection* _tmp20_; 2675 TrackerBusConnection* _tmp21_; 2676 #line 202 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2677 _tmp20_ = tracker_bus_connection_new (&_inner_error_); 2678 #line 202 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2679 _tmp21_ = _tmp20_; 2680 #line 202 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2681 if (_inner_error_ != NULL) { 2682 #line 202 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2683 g_propagate_error (error, _inner_error_); 2684 #line 202 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2685 _g_free0 (env_backend); 2686 #line 202 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2687 return; 2688 #line 2688 "tracker-backend.c" 2689 } 2690 #line 202 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2691 _g_object_unref0 (self->priv->bus); 2692 #line 202 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2693 self->priv->bus = (TrackerSparqlConnection*) _tmp21_; 2694 #line 203 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2695 break; 2696 #line 2696 "tracker-backend.c" 2697 } 2698 default: 2699 { 2700 #line 206 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2701 g_assert_not_reached (); 2702 #line 2702 "tracker-backend.c" 2703 } 2704 } 2705 #line 166 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2706 _g_free0 (env_backend); 2707 #line 2707 "tracker-backend.c" 2708 } 2709 2710 2711 static TrackerSparqlConnection* tracker_sparql_backend_get (GCancellable* cancellable, GError** error) { 2712 TrackerSparqlConnection* result = NULL; 2713 GError * _inner_error_ = NULL; 2714 #line 215 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2715 g_mutex_lock (&tracker_sparql_backend_door); 2716 #line 2716 "tracker-backend.c" 2717 { 2718 TrackerSparqlConnection* _tmp0_; 2719 TrackerSparqlConnection* _tmp1_; 2720 TrackerSparqlConnection* _result_; 2721 TrackerSparqlConnection* _tmp2_; 2722 #line 219 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2723 _tmp0_ = tracker_sparql_backend_singleton; 2724 #line 219 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2725 _tmp1_ = _g_object_ref0 (_tmp0_); 2726 #line 219 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2727 _result_ = _tmp1_; 2728 #line 221 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2729 _tmp2_ = _result_; 2730 #line 221 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2731 if (_tmp2_ == NULL) { 2732 #line 2732 "tracker-backend.c" 2733 TrackerSparqlBackend* _tmp3_; 2734 TrackerSparqlBackend* _tmp4_; 2735 gboolean _tmp5_ = FALSE; 2736 GCancellable* _tmp6_; 2737 gboolean _tmp9_; 2738 TrackerSparqlConnection* _tmp11_; 2739 #line 222 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2740 tracker_sparql_backend_log_init (); 2741 #line 224 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2742 _tmp3_ = tracker_sparql_backend_new (&_inner_error_); 2743 #line 224 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2744 _tmp4_ = _tmp3_; 2745 #line 224 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2746 if (_inner_error_ != NULL) { 2747 #line 224 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2748 _g_object_unref0 (_result_); 2749 #line 2749 "tracker-backend.c" 2750 goto __finally3; 2751 } 2752 #line 224 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2753 _g_object_unref0 (_result_); 2754 #line 224 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2755 _result_ = (TrackerSparqlConnection*) _tmp4_; 2756 #line 226 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2757 _tmp6_ = cancellable; 2758 #line 226 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2759 if (_tmp6_ != NULL) { 2760 #line 2760 "tracker-backend.c" 2761 GCancellable* _tmp7_; 2762 gboolean _tmp8_ = FALSE; 2763 #line 226 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2764 _tmp7_ = cancellable; 2765 #line 226 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2766 _tmp8_ = g_cancellable_is_cancelled (_tmp7_); 2767 #line 226 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2768 _tmp5_ = _tmp8_; 2769 #line 2769 "tracker-backend.c" 2770 } else { 2771 #line 226 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2772 _tmp5_ = FALSE; 2773 #line 2773 "tracker-backend.c" 2774 } 2775 #line 226 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2776 _tmp9_ = _tmp5_; 2777 #line 226 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2778 if (_tmp9_) { 2779 #line 2779 "tracker-backend.c" 2780 GError* _tmp10_; 2781 #line 227 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2782 _tmp10_ = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_CANCELLED, "Operation was cancelled"); 2783 #line 227 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2784 _inner_error_ = _tmp10_; 2785 #line 227 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2786 _g_object_unref0 (_result_); 2787 #line 2787 "tracker-backend.c" 2788 goto __finally3; 2789 } 2790 #line 230 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2791 _tmp11_ = _result_; 2792 #line 230 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2793 tracker_sparql_backend_singleton = _tmp11_; 2794 #line 2794 "tracker-backend.c" 2795 } 2796 #line 233 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2797 result = _result_; 2798 #line 2798 "tracker-backend.c" 2799 { 2800 #line 235 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2801 g_mutex_unlock (&tracker_sparql_backend_door); 2802 #line 2802 "tracker-backend.c" 2803 } 2804 #line 233 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2805 return result; 2806 #line 2806 "tracker-backend.c" 2807 } 2808 __finally3: 2809 { 2810 #line 235 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2811 g_mutex_unlock (&tracker_sparql_backend_door); 2812 #line 2812 "tracker-backend.c" 2813 } 2814 #line 217 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2815 if ((((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == G_IO_ERROR)) || (_inner_error_->domain == G_DBUS_ERROR)) || (_inner_error_->domain == G_SPAWN_ERROR)) { 2816 #line 217 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2817 g_propagate_error (error, _inner_error_); 2818 #line 217 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2819 return NULL; 2820 #line 2820 "tracker-backend.c" 2821 } else { 2822 #line 217 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2823 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); 2824 #line 217 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2825 g_clear_error (&_inner_error_); 2826 #line 217 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2827 return NULL; 2828 #line 2828 "tracker-backend.c" 2829 } 2830 } 2831 2832 2833 static Block1Data* block1_data_ref (Block1Data* _data1_) { 2834 #line 239 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2835 g_atomic_int_inc (&_data1_->_ref_count_); 2836 #line 239 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2837 return _data1_; 2838 #line 2838 "tracker-backend.c" 2839 } 2840 2841 2842 static void block1_data_unref (void * _userdata_) { 2843 Block1Data* _data1_; 2844 _data1_ = (Block1Data*) _userdata_; 2845 #line 239 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2846 if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) { 2847 #line 239 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2848 _g_object_unref0 (_data1_->async_result); 2849 #line 239 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2850 _g_main_loop_unref0 (_data1_->loop); 2851 #line 239 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2852 g_slice_free (Block1Data, _data1_); 2853 #line 2853 "tracker-backend.c" 2854 } 2855 } 2856 2857 2858 static void __lambda4_ (Block1Data* _data1_, GObject* obj, GAsyncResult* res) { 2859 GAsyncResult* _tmp0_; 2860 GAsyncResult* _tmp1_; 2861 GMainLoop* _tmp2_; 2862 #line 252 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2863 g_return_if_fail (res != NULL); 2864 #line 253 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2865 _tmp0_ = res; 2866 #line 253 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2867 _tmp1_ = _g_object_ref0 (_tmp0_); 2868 #line 253 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2869 _g_object_unref0 (_data1_->async_result); 2870 #line 253 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2871 _data1_->async_result = _tmp1_; 2872 #line 254 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2873 _tmp2_ = _data1_->loop; 2874 #line 254 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2875 g_main_loop_quit (_tmp2_); 2876 #line 2876 "tracker-backend.c" 2877 } 2878 2879 2880 static void ___lambda4__gasync_ready_callback (GObject* source_object, GAsyncResult* res, gpointer self) { 2881 #line 252 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2882 __lambda4_ (self, source_object, res); 2883 #line 252 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2884 block1_data_unref (self); 2885 #line 2885 "tracker-backend.c" 2886 } 2887 2888 2889 TrackerSparqlConnection* tracker_sparql_backend_get_internal (GCancellable* cancellable, GError** error) { 2890 TrackerSparqlConnection* result = NULL; 2891 Block1Data* _data1_; 2892 GMainContext* _tmp0_ = NULL; 2893 GMainContext* _tmp4_; 2894 GMainContext* context; 2895 GMainContext* _tmp5_; 2896 GMainLoop* _tmp6_; 2897 GMainContext* _tmp7_; 2898 GCancellable* _tmp8_; 2899 GMainLoop* _tmp9_; 2900 GMainContext* _tmp10_; 2901 GAsyncResult* _tmp11_; 2902 TrackerSparqlConnection* _tmp12_ = NULL; 2903 TrackerSparqlConnection* _tmp13_; 2904 GError * _inner_error_ = NULL; 2905 #line 239 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2906 _data1_ = g_slice_new0 (Block1Data); 2907 #line 239 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2908 _data1_->_ref_count_ = 1; 2909 #line 240 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2910 _tmp0_ = g_main_context_get_thread_default (); 2911 #line 240 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2912 if (_tmp0_ == NULL) { 2913 #line 2913 "tracker-backend.c" 2914 GCancellable* _tmp1_; 2915 TrackerSparqlConnection* _tmp2_ = NULL; 2916 TrackerSparqlConnection* _tmp3_; 2917 #line 242 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2918 _tmp1_ = cancellable; 2919 #line 242 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2920 _tmp2_ = tracker_sparql_backend_get (_tmp1_, &_inner_error_); 2921 #line 242 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2922 _tmp3_ = _tmp2_; 2923 #line 242 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2924 if (_inner_error_ != NULL) { 2925 #line 242 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2926 if ((((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == G_IO_ERROR)) || (_inner_error_->domain == G_DBUS_ERROR)) || (_inner_error_->domain == G_SPAWN_ERROR)) { 2927 #line 242 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2928 g_propagate_error (error, _inner_error_); 2929 #line 242 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2930 block1_data_unref (_data1_); 2931 #line 242 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2932 _data1_ = NULL; 2933 #line 242 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2934 return NULL; 2935 #line 2935 "tracker-backend.c" 2936 } else { 2937 #line 242 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2938 block1_data_unref (_data1_); 2939 #line 242 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2940 _data1_ = NULL; 2941 #line 242 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2942 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); 2943 #line 242 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2944 g_clear_error (&_inner_error_); 2945 #line 242 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2946 return NULL; 2947 #line 2947 "tracker-backend.c" 2948 } 2949 } 2950 #line 242 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2951 result = _tmp3_; 2952 #line 242 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2953 block1_data_unref (_data1_); 2954 #line 242 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2955 _data1_ = NULL; 2956 #line 242 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2957 return result; 2958 #line 2958 "tracker-backend.c" 2959 } 2960 #line 246 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2961 _tmp4_ = g_main_context_new (); 2962 #line 246 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2963 context = _tmp4_; 2964 #line 247 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2965 _tmp5_ = context; 2966 #line 247 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2967 _tmp6_ = g_main_loop_new (_tmp5_, FALSE); 2968 #line 247 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2969 _data1_->loop = _tmp6_; 2970 #line 248 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2971 _data1_->async_result = NULL; 2972 #line 250 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2973 _tmp7_ = context; 2974 #line 250 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2975 g_main_context_push_thread_default (_tmp7_); 2976 #line 252 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2977 _tmp8_ = cancellable; 2978 #line 252 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2979 tracker_sparql_backend_get_internal_async (_tmp8_, ___lambda4__gasync_ready_callback, block1_data_ref (_data1_)); 2980 #line 257 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2981 _tmp9_ = _data1_->loop; 2982 #line 257 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2983 g_main_loop_run (_tmp9_); 2984 #line 259 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2985 _tmp10_ = context; 2986 #line 259 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2987 g_main_context_pop_thread_default (_tmp10_); 2988 #line 261 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2989 _tmp11_ = _data1_->async_result; 2990 #line 261 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2991 _tmp12_ = tracker_sparql_backend_get_internal_finish (_tmp11_, &_inner_error_); 2992 #line 261 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2993 _tmp13_ = _tmp12_; 2994 #line 261 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2995 if (_inner_error_ != NULL) { 2996 #line 261 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2997 if ((((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == G_IO_ERROR)) || (_inner_error_->domain == G_DBUS_ERROR)) || (_inner_error_->domain == G_SPAWN_ERROR)) { 2998 #line 261 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 2999 g_propagate_error (error, _inner_error_); 3000 #line 261 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3001 _g_main_context_unref0 (context); 3002 #line 261 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3003 block1_data_unref (_data1_); 3004 #line 261 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3005 _data1_ = NULL; 3006 #line 261 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3007 return NULL; 3008 #line 3008 "tracker-backend.c" 3009 } else { 3010 #line 261 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3011 _g_main_context_unref0 (context); 3012 #line 261 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3013 block1_data_unref (_data1_); 3014 #line 261 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3015 _data1_ = NULL; 3016 #line 261 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3017 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); 3018 #line 261 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3019 g_clear_error (&_inner_error_); 3020 #line 261 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3021 return NULL; 3022 #line 3022 "tracker-backend.c" 3023 } 3024 } 3025 #line 261 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3026 result = _tmp13_; 3027 #line 261 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3028 _g_main_context_unref0 (context); 3029 #line 261 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3030 block1_data_unref (_data1_); 3031 #line 261 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3032 _data1_ = NULL; 3033 #line 261 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3034 return result; 3035 #line 3035 "tracker-backend.c" 3036 } 3037 3038 3039 static void tracker_sparql_backend_get_internal_async_data_free (gpointer _data) { 3040 TrackerSparqlBackendGetInternalAsyncData* _data_; 3041 _data_ = _data; 3042 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3043 _g_object_unref0 (_data_->result); 3044 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3045 g_slice_free (TrackerSparqlBackendGetInternalAsyncData, _data_); 3046 #line 3046 "tracker-backend.c" 3047 } 3048 3049 3050 void tracker_sparql_backend_get_internal_async (GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) { 3051 TrackerSparqlBackendGetInternalAsyncData* _data_; 3052 GCancellable* _tmp0_; 3053 GCancellable* _tmp1_; 3054 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3055 _data_ = g_slice_new0 (TrackerSparqlBackendGetInternalAsyncData); 3056 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3057 _data_->_async_result = g_simple_async_result_new (NULL, _callback_, _user_data_, tracker_sparql_backend_get_internal_async); 3058 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3059 g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_sparql_backend_get_internal_async_data_free); 3060 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3061 _tmp0_ = cancellable; 3062 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3063 _tmp1_ = _g_object_ref0 (_tmp0_); 3064 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3065 _g_object_unref0 (_data_->cancellable); 3066 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3067 _data_->cancellable = _tmp1_; 3068 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3069 tracker_sparql_backend_get_internal_async_co (_data_); 3070 #line 3070 "tracker-backend.c" 3071 } 3072 3073 3074 TrackerSparqlConnection* tracker_sparql_backend_get_internal_finish (GAsyncResult* _res_, GError** error) { 3075 TrackerSparqlConnection* result; 3076 TrackerSparqlBackendGetInternalAsyncData* _data_; 3077 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3078 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) { 3079 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3080 return NULL; 3081 #line 3081 "tracker-backend.c" 3082 } 3083 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3084 _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_)); 3085 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3086 result = _data_->result; 3087 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3088 _data_->result = NULL; 3089 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3090 return result; 3091 #line 3091 "tracker-backend.c" 3092 } 3093 3094 3095 static Block2Data* block2_data_ref (Block2Data* _data2_) { 3096 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3097 g_atomic_int_inc (&_data2_->_ref_count_); 3098 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3099 return _data2_; 3100 #line 3100 "tracker-backend.c" 3101 } 3102 3103 3104 static void block2_data_unref (void * _userdata_) { 3105 Block2Data* _data2_; 3106 _data2_ = (Block2Data*) _userdata_; 3107 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3108 if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) { 3109 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3110 _g_main_context_unref0 (_data2_->context); 3111 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3112 _g_object_unref0 (_data2_->_result_); 3113 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3114 _g_error_free0 (_data2_->spawn_error); 3115 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3116 _g_error_free0 (_data2_->dbus_error); 3117 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3118 _g_error_free0 (_data2_->io_error); 3119 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3120 _g_error_free0 (_data2_->sparql_error); 3121 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3122 _g_object_unref0 (_data2_->cancellable); 3123 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3124 g_slice_free (Block2Data, _data2_); 3125 #line 3125 "tracker-backend.c" 3126 } 3127 } 3128 3129 3130 static gpointer _g_main_context_ref0 (gpointer self) { 3131 #line 283 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3132 return self ? g_main_context_ref (self) : NULL; 3133 #line 3133 "tracker-backend.c" 3134 } 3135 3136 3137 static gpointer _g_error_copy0 (gpointer self) { 3138 #line 289 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3139 return self ? g_error_copy (self) : NULL; 3140 #line 3140 "tracker-backend.c" 3141 } 3142 3143 3144 static gboolean __lambda3_ (Block2Data* _data2_) { 3145 gboolean result = FALSE; 3146 #line 300 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3147 tracker_sparql_backend_get_internal_async_co (_data2_->_async_data_); 3148 #line 301 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3149 result = FALSE; 3150 #line 301 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3151 return result; 3152 #line 3152 "tracker-backend.c" 3153 } 3154 3155 3156 static gboolean ___lambda3__gsource_func (gpointer self) { 3157 gboolean result; 3158 result = __lambda3_ (self); 3159 #line 299 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3160 return result; 3161 #line 3161 "tracker-backend.c" 3162 } 3163 3164 3165 static gboolean __lambda2_ (Block2Data* _data2_, GIOSchedulerJob* job) { 3166 gboolean result = FALSE; 3167 GSource* _tmp11_; 3168 GSource* source; 3169 GMainContext* _tmp12_; 3170 GError * _inner_error_ = NULL; 3171 #line 285 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3172 g_return_val_if_fail (job != NULL, FALSE); 3173 #line 3173 "tracker-backend.c" 3174 { 3175 GCancellable* _tmp0_; 3176 TrackerSparqlConnection* _tmp1_ = NULL; 3177 TrackerSparqlConnection* _tmp2_; 3178 #line 287 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3179 _tmp0_ = _data2_->cancellable; 3180 #line 287 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3181 _tmp1_ = tracker_sparql_backend_get (_tmp0_, &_inner_error_); 3182 #line 287 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3183 _tmp2_ = _tmp1_; 3184 #line 287 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3185 if (_inner_error_ != NULL) { 3186 #line 287 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3187 if (_inner_error_->domain == G_IO_ERROR) { 3188 #line 3188 "tracker-backend.c" 3189 goto __catch4_g_io_error; 3190 } 3191 #line 287 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3192 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) { 3193 #line 3193 "tracker-backend.c" 3194 goto __catch4_tracker_sparql_error; 3195 } 3196 #line 287 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3197 if (_inner_error_->domain == G_DBUS_ERROR) { 3198 #line 3198 "tracker-backend.c" 3199 goto __catch4_g_dbus_error; 3200 } 3201 #line 287 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3202 if (_inner_error_->domain == G_SPAWN_ERROR) { 3203 #line 3203 "tracker-backend.c" 3204 goto __catch4_g_spawn_error; 3205 } 3206 #line 287 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3207 g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 3208 #line 287 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3209 g_clear_error (&_inner_error_); 3210 #line 287 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3211 return FALSE; 3212 #line 3212 "tracker-backend.c" 3213 } 3214 #line 287 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3215 _g_object_unref0 (_data2_->_result_); 3216 #line 287 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3217 _data2_->_result_ = _tmp2_; 3218 #line 3218 "tracker-backend.c" 3219 } 3220 goto __finally4; 3221 __catch4_g_io_error: 3222 { 3223 GError* e_io = NULL; 3224 GError* _tmp3_; 3225 GError* _tmp4_; 3226 #line 286 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3227 e_io = _inner_error_; 3228 #line 286 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3229 _inner_error_ = NULL; 3230 #line 289 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3231 _tmp3_ = e_io; 3232 #line 289 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3233 _tmp4_ = _g_error_copy0 (_tmp3_); 3234 #line 289 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3235 _g_error_free0 (_data2_->io_error); 3236 #line 289 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3237 _data2_->io_error = _tmp4_; 3238 #line 286 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3239 _g_error_free0 (e_io); 3240 #line 3240 "tracker-backend.c" 3241 } 3242 goto __finally4; 3243 __catch4_tracker_sparql_error: 3244 { 3245 GError* e_spql = NULL; 3246 GError* _tmp5_; 3247 GError* _tmp6_; 3248 #line 286 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3249 e_spql = _inner_error_; 3250 #line 286 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3251 _inner_error_ = NULL; 3252 #line 291 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3253 _tmp5_ = e_spql; 3254 #line 291 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3255 _tmp6_ = _g_error_copy0 (_tmp5_); 3256 #line 291 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3257 _g_error_free0 (_data2_->sparql_error); 3258 #line 291 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3259 _data2_->sparql_error = _tmp6_; 3260 #line 286 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3261 _g_error_free0 (e_spql); 3262 #line 3262 "tracker-backend.c" 3263 } 3264 goto __finally4; 3265 __catch4_g_dbus_error: 3266 { 3267 GError* e_dbus = NULL; 3268 GError* _tmp7_; 3269 GError* _tmp8_; 3270 #line 286 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3271 e_dbus = _inner_error_; 3272 #line 286 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3273 _inner_error_ = NULL; 3274 #line 293 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3275 _tmp7_ = e_dbus; 3276 #line 293 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3277 _tmp8_ = _g_error_copy0 (_tmp7_); 3278 #line 293 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3279 _g_error_free0 (_data2_->dbus_error); 3280 #line 293 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3281 _data2_->dbus_error = _tmp8_; 3282 #line 286 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3283 _g_error_free0 (e_dbus); 3284 #line 3284 "tracker-backend.c" 3285 } 3286 goto __finally4; 3287 __catch4_g_spawn_error: 3288 { 3289 GError* e_spawn = NULL; 3290 GError* _tmp9_; 3291 GError* _tmp10_; 3292 #line 286 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3293 e_spawn = _inner_error_; 3294 #line 286 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3295 _inner_error_ = NULL; 3296 #line 295 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3297 _tmp9_ = e_spawn; 3298 #line 295 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3299 _tmp10_ = _g_error_copy0 (_tmp9_); 3300 #line 295 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3301 _g_error_free0 (_data2_->spawn_error); 3302 #line 295 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3303 _data2_->spawn_error = _tmp10_; 3304 #line 286 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3305 _g_error_free0 (e_spawn); 3306 #line 3306 "tracker-backend.c" 3307 } 3308 __finally4: 3309 #line 286 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3310 if (_inner_error_ != NULL) { 3311 #line 286 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3312 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); 3313 #line 286 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3314 g_clear_error (&_inner_error_); 3315 #line 286 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3316 return FALSE; 3317 #line 3317 "tracker-backend.c" 3318 } 3319 #line 298 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3320 _tmp11_ = g_idle_source_new (); 3321 #line 298 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3322 source = _tmp11_; 3323 #line 299 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3324 g_source_set_callback (source, ___lambda3__gsource_func, block2_data_ref (_data2_), block2_data_unref); 3325 #line 303 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3326 _tmp12_ = _data2_->context; 3327 #line 303 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3328 g_source_attach (source, _tmp12_); 3329 #line 305 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3330 result = FALSE; 3331 #line 305 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3332 _g_source_unref0 (source); 3333 #line 305 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3334 return result; 3335 #line 3335 "tracker-backend.c" 3336 } 3337 3338 3339 static gboolean ___lambda2__gio_scheduler_job_func (GIOSchedulerJob* job, GCancellable* cancellable, gpointer self) { 3340 gboolean result; 3341 result = __lambda2_ (self, job); 3342 #line 285 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3343 return result; 3344 #line 3344 "tracker-backend.c" 3345 } 3346 3347 3348 static gboolean tracker_sparql_backend_get_internal_async_co (TrackerSparqlBackendGetInternalAsyncData* _data_) { 3349 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3350 switch (_data_->_state_) { 3351 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3352 case 0: 3353 #line 3353 "tracker-backend.c" 3354 goto _state_0; 3355 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3356 case 1: 3357 #line 3357 "tracker-backend.c" 3358 goto _state_1; 3359 default: 3360 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3361 g_assert_not_reached (); 3362 #line 3362 "tracker-backend.c" 3363 } 3364 _state_0: 3365 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3366 _data_->_data2_ = g_slice_new0 (Block2Data); 3367 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3368 _data_->_data2_->_ref_count_ = 1; 3369 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3370 _data_->_tmp0_ = _data_->cancellable; 3371 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3372 _g_object_unref0 (_data_->_data2_->cancellable); 3373 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3374 _data_->_data2_->cancellable = _data_->_tmp0_; 3375 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3376 _data_->_data2_->_async_data_ = _data_; 3377 #line 266 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3378 _data_->_tmp1_ = FALSE; 3379 #line 266 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3380 _data_->_tmp1_ = g_mutex_trylock (&tracker_sparql_backend_door); 3381 #line 266 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3382 if (_data_->_tmp1_) { 3383 #line 268 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3384 _data_->_tmp2_ = tracker_sparql_backend_singleton; 3385 #line 268 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3386 _data_->_tmp3_ = _g_object_ref0 (_data_->_tmp2_); 3387 #line 268 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3388 _data_->_result_ = _data_->_tmp3_; 3389 #line 270 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3390 g_mutex_unlock (&tracker_sparql_backend_door); 3391 #line 272 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3392 _data_->_tmp4_ = _data_->_result_; 3393 #line 272 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3394 if (_data_->_tmp4_ != NULL) { 3395 #line 273 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3396 _data_->result = _data_->_result_; 3397 #line 273 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3398 block2_data_unref (_data_->_data2_); 3399 #line 273 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3400 _data_->_data2_ = NULL; 3401 #line 273 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3402 if (_data_->_state_ == 0) { 3403 #line 273 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3404 g_simple_async_result_complete_in_idle (_data_->_async_result); 3405 #line 3405 "tracker-backend.c" 3406 } else { 3407 #line 273 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3408 g_simple_async_result_complete (_data_->_async_result); 3409 #line 3409 "tracker-backend.c" 3410 } 3411 #line 273 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3412 g_object_unref (_data_->_async_result); 3413 #line 273 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3414 return FALSE; 3415 #line 3415 "tracker-backend.c" 3416 } 3417 #line 266 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3418 _g_object_unref0 (_data_->_result_); 3419 #line 3419 "tracker-backend.c" 3420 } 3421 #line 278 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3422 _data_->_data2_->sparql_error = NULL; 3423 #line 279 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3424 _data_->_data2_->io_error = NULL; 3425 #line 280 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3426 _data_->_data2_->dbus_error = NULL; 3427 #line 281 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3428 _data_->_data2_->spawn_error = NULL; 3429 #line 282 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3430 _data_->_data2_->_result_ = NULL; 3431 #line 283 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3432 _data_->_tmp5_ = NULL; 3433 #line 283 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3434 _data_->_tmp5_ = g_main_context_get_thread_default (); 3435 #line 283 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3436 _data_->_tmp6_ = _g_main_context_ref0 (_data_->_tmp5_); 3437 #line 283 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3438 _data_->_data2_->context = _data_->_tmp6_; 3439 #line 285 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3440 g_io_scheduler_push_job (___lambda2__gio_scheduler_job_func, block2_data_ref (_data_->_data2_), block2_data_unref, G_PRIORITY_DEFAULT, NULL); 3441 #line 307 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3442 _data_->_state_ = 1; 3443 #line 307 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3444 return FALSE; 3445 #line 3445 "tracker-backend.c" 3446 _state_1: 3447 ; 3448 #line 309 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3449 _data_->_tmp7_ = _data_->_data2_->sparql_error; 3450 #line 309 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3451 if (_data_->_tmp7_ != NULL) { 3452 #line 310 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3453 _data_->_tmp8_ = _data_->_data2_->sparql_error; 3454 #line 310 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3455 _data_->_tmp9_ = _g_error_copy0 (_data_->_tmp8_); 3456 #line 310 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3457 _data_->_inner_error_ = _data_->_tmp9_; 3458 #line 310 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3459 if ((((_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_data_->_inner_error_->domain == G_IO_ERROR)) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) || (_data_->_inner_error_->domain == G_SPAWN_ERROR)) { 3460 #line 310 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3461 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 3462 #line 310 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3463 g_error_free (_data_->_inner_error_); 3464 #line 310 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3465 block2_data_unref (_data_->_data2_); 3466 #line 310 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3467 _data_->_data2_ = NULL; 3468 #line 310 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3469 if (_data_->_state_ == 0) { 3470 #line 310 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3471 g_simple_async_result_complete_in_idle (_data_->_async_result); 3472 #line 3472 "tracker-backend.c" 3473 } else { 3474 #line 310 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3475 g_simple_async_result_complete (_data_->_async_result); 3476 #line 3476 "tracker-backend.c" 3477 } 3478 #line 310 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3479 g_object_unref (_data_->_async_result); 3480 #line 310 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3481 return FALSE; 3482 #line 3482 "tracker-backend.c" 3483 } else { 3484 #line 310 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3485 block2_data_unref (_data_->_data2_); 3486 #line 310 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3487 _data_->_data2_ = NULL; 3488 #line 310 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3489 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); 3490 #line 310 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3491 g_clear_error (&_data_->_inner_error_); 3492 #line 310 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3493 return FALSE; 3494 #line 3494 "tracker-backend.c" 3495 } 3496 } else { 3497 #line 311 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3498 _data_->_tmp10_ = _data_->_data2_->io_error; 3499 #line 311 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3500 if (_data_->_tmp10_ != NULL) { 3501 #line 312 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3502 _data_->_tmp11_ = _data_->_data2_->io_error; 3503 #line 312 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3504 _data_->_tmp12_ = _g_error_copy0 (_data_->_tmp11_); 3505 #line 312 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3506 _data_->_inner_error_ = _data_->_tmp12_; 3507 #line 312 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3508 if ((((_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_data_->_inner_error_->domain == G_IO_ERROR)) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) || (_data_->_inner_error_->domain == G_SPAWN_ERROR)) { 3509 #line 312 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3510 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 3511 #line 312 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3512 g_error_free (_data_->_inner_error_); 3513 #line 312 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3514 block2_data_unref (_data_->_data2_); 3515 #line 312 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3516 _data_->_data2_ = NULL; 3517 #line 312 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3518 if (_data_->_state_ == 0) { 3519 #line 312 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3520 g_simple_async_result_complete_in_idle (_data_->_async_result); 3521 #line 3521 "tracker-backend.c" 3522 } else { 3523 #line 312 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3524 g_simple_async_result_complete (_data_->_async_result); 3525 #line 3525 "tracker-backend.c" 3526 } 3527 #line 312 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3528 g_object_unref (_data_->_async_result); 3529 #line 312 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3530 return FALSE; 3531 #line 3531 "tracker-backend.c" 3532 } else { 3533 #line 312 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3534 block2_data_unref (_data_->_data2_); 3535 #line 312 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3536 _data_->_data2_ = NULL; 3537 #line 312 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3538 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); 3539 #line 312 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3540 g_clear_error (&_data_->_inner_error_); 3541 #line 312 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3542 return FALSE; 3543 #line 3543 "tracker-backend.c" 3544 } 3545 } else { 3546 #line 313 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3547 _data_->_tmp13_ = _data_->_data2_->dbus_error; 3548 #line 313 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3549 if (_data_->_tmp13_ != NULL) { 3550 #line 314 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3551 _data_->_tmp14_ = _data_->_data2_->dbus_error; 3552 #line 314 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3553 _data_->_tmp15_ = _g_error_copy0 (_data_->_tmp14_); 3554 #line 314 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3555 _data_->_inner_error_ = _data_->_tmp15_; 3556 #line 314 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3557 if ((((_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_data_->_inner_error_->domain == G_IO_ERROR)) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) || (_data_->_inner_error_->domain == G_SPAWN_ERROR)) { 3558 #line 314 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3559 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 3560 #line 314 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3561 g_error_free (_data_->_inner_error_); 3562 #line 314 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3563 block2_data_unref (_data_->_data2_); 3564 #line 314 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3565 _data_->_data2_ = NULL; 3566 #line 314 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3567 if (_data_->_state_ == 0) { 3568 #line 314 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3569 g_simple_async_result_complete_in_idle (_data_->_async_result); 3570 #line 3570 "tracker-backend.c" 3571 } else { 3572 #line 314 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3573 g_simple_async_result_complete (_data_->_async_result); 3574 #line 3574 "tracker-backend.c" 3575 } 3576 #line 314 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3577 g_object_unref (_data_->_async_result); 3578 #line 314 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3579 return FALSE; 3580 #line 3580 "tracker-backend.c" 3581 } else { 3582 #line 314 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3583 block2_data_unref (_data_->_data2_); 3584 #line 314 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3585 _data_->_data2_ = NULL; 3586 #line 314 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3587 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); 3588 #line 314 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3589 g_clear_error (&_data_->_inner_error_); 3590 #line 314 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3591 return FALSE; 3592 #line 3592 "tracker-backend.c" 3593 } 3594 } else { 3595 #line 315 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3596 _data_->_tmp16_ = _data_->_data2_->spawn_error; 3597 #line 315 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3598 if (_data_->_tmp16_ != NULL) { 3599 #line 316 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3600 _data_->_tmp17_ = _data_->_data2_->spawn_error; 3601 #line 316 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3602 _data_->_tmp18_ = _g_error_copy0 (_data_->_tmp17_); 3603 #line 316 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3604 _data_->_inner_error_ = _data_->_tmp18_; 3605 #line 316 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3606 if ((((_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_data_->_inner_error_->domain == G_IO_ERROR)) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) || (_data_->_inner_error_->domain == G_SPAWN_ERROR)) { 3607 #line 316 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3608 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 3609 #line 316 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3610 g_error_free (_data_->_inner_error_); 3611 #line 316 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3612 block2_data_unref (_data_->_data2_); 3613 #line 316 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3614 _data_->_data2_ = NULL; 3615 #line 316 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3616 if (_data_->_state_ == 0) { 3617 #line 316 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3618 g_simple_async_result_complete_in_idle (_data_->_async_result); 3619 #line 3619 "tracker-backend.c" 3620 } else { 3621 #line 316 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3622 g_simple_async_result_complete (_data_->_async_result); 3623 #line 3623 "tracker-backend.c" 3624 } 3625 #line 316 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3626 g_object_unref (_data_->_async_result); 3627 #line 316 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3628 return FALSE; 3629 #line 3629 "tracker-backend.c" 3630 } else { 3631 #line 316 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3632 block2_data_unref (_data_->_data2_); 3633 #line 316 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3634 _data_->_data2_ = NULL; 3635 #line 316 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3636 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); 3637 #line 316 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3638 g_clear_error (&_data_->_inner_error_); 3639 #line 316 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3640 return FALSE; 3641 #line 3641 "tracker-backend.c" 3642 } 3643 } else { 3644 #line 318 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3645 _data_->_tmp19_ = _data_->_data2_->_result_; 3646 #line 318 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3647 _data_->_tmp20_ = _g_object_ref0 (_data_->_tmp19_); 3648 #line 318 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3649 _data_->result = _data_->_tmp20_; 3650 #line 318 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3651 block2_data_unref (_data_->_data2_); 3652 #line 318 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3653 _data_->_data2_ = NULL; 3654 #line 318 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3655 if (_data_->_state_ == 0) { 3656 #line 318 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3657 g_simple_async_result_complete_in_idle (_data_->_async_result); 3658 #line 3658 "tracker-backend.c" 3659 } else { 3660 #line 318 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3661 g_simple_async_result_complete (_data_->_async_result); 3662 #line 3662 "tracker-backend.c" 3663 } 3664 #line 318 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3665 g_object_unref (_data_->_async_result); 3666 #line 318 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3667 return FALSE; 3668 #line 3668 "tracker-backend.c" 3669 } 3670 } 3671 } 3672 } 3673 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3674 block2_data_unref (_data_->_data2_); 3675 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3676 _data_->_data2_ = NULL; 3677 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3678 if (_data_->_state_ == 0) { 3679 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3680 g_simple_async_result_complete_in_idle (_data_->_async_result); 3681 #line 3681 "tracker-backend.c" 3682 } else { 3683 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3684 g_simple_async_result_complete (_data_->_async_result); 3685 #line 3685 "tracker-backend.c" 3686 } 3687 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3688 g_object_unref (_data_->_async_result); 3689 #line 264 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3690 return FALSE; 3691 #line 3691 "tracker-backend.c" 3692 } 3693 3694 3695 static void _tracker_sparql_backend_remove_log_handler_glog_func (const gchar* log_domain, GLogLevelFlags log_levels, const gchar* message, gpointer self) { 3696 #line 368 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3697 tracker_sparql_backend_remove_log_handler (log_domain, log_levels, message); 3698 #line 3698 "tracker-backend.c" 3699 } 3700 3701 3702 static void tracker_sparql_backend_log_init (void) { 3703 gboolean _tmp0_; 3704 gint verbosity; 3705 const gchar* _tmp1_ = NULL; 3706 gchar* _tmp2_; 3707 gchar* env_verbosity; 3708 const gchar* _tmp3_; 3709 GLogLevelFlags remove_levels; 3710 gint _tmp6_; 3711 gint _tmp7_; 3712 GLogLevelFlags _tmp8_; 3713 #line 323 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3714 _tmp0_ = tracker_sparql_backend_log_initialized; 3715 #line 323 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3716 if (_tmp0_) { 3717 #line 324 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3718 return; 3719 #line 3719 "tracker-backend.c" 3720 } 3721 #line 327 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3722 tracker_sparql_backend_log_initialized = TRUE; 3723 #line 330 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3724 verbosity = 0; 3725 #line 331 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3726 _tmp1_ = g_getenv ("TRACKER_VERBOSITY"); 3727 #line 331 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3728 _tmp2_ = g_strdup (_tmp1_); 3729 #line 331 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3730 env_verbosity = _tmp2_; 3731 #line 332 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3732 _tmp3_ = env_verbosity; 3733 #line 332 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3734 if (_tmp3_ != NULL) { 3735 #line 3735 "tracker-backend.c" 3736 const gchar* _tmp4_; 3737 gint _tmp5_ = 0; 3738 #line 333 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3739 _tmp4_ = env_verbosity; 3740 #line 333 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3741 _tmp5_ = atoi (_tmp4_); 3742 #line 333 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3743 verbosity = _tmp5_; 3744 #line 3744 "tracker-backend.c" 3745 } 3746 #line 335 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3747 remove_levels = 0; 3748 #line 339 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3749 _tmp6_ = verbosity; 3750 #line 339 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3751 if (_tmp6_ > 2) { 3752 #line 340 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3753 g_setenv ("G_MESSAGES_DEBUG", "all", TRUE); 3754 #line 3754 "tracker-backend.c" 3755 } 3756 #line 342 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3757 _tmp7_ = verbosity; 3758 #line 342 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3759 switch (_tmp7_) { 3760 #line 342 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3761 case 3: 3762 #line 3762 "tracker-backend.c" 3763 { 3764 #line 345 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3765 break; 3766 #line 3766 "tracker-backend.c" 3767 } 3768 #line 342 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3769 case 2: 3770 #line 3770 "tracker-backend.c" 3771 { 3772 #line 349 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3773 remove_levels = G_LOG_LEVEL_DEBUG; 3774 #line 350 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3775 break; 3776 #line 3776 "tracker-backend.c" 3777 } 3778 #line 342 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3779 case 1: 3780 #line 3780 "tracker-backend.c" 3781 { 3782 #line 354 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3783 remove_levels = G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_MESSAGE; 3784 #line 356 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3785 break; 3786 #line 3786 "tracker-backend.c" 3787 } 3788 default: 3789 #line 342 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3790 case 0: 3791 #line 3791 "tracker-backend.c" 3792 { 3793 #line 361 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3794 remove_levels = (G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_MESSAGE) | G_LOG_LEVEL_INFO; 3795 #line 364 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3796 break; 3797 #line 3797 "tracker-backend.c" 3798 } 3799 } 3800 #line 367 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3801 _tmp8_ = remove_levels; 3802 #line 367 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3803 if (_tmp8_ != 0) { 3804 #line 3804 "tracker-backend.c" 3805 GLogLevelFlags _tmp9_; 3806 #line 368 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3807 _tmp9_ = remove_levels; 3808 #line 368 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3809 g_log_set_handler ("Tracker", _tmp9_, _tracker_sparql_backend_remove_log_handler_glog_func, NULL); 3810 #line 3810 "tracker-backend.c" 3811 } 3812 #line 322 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3813 _g_free0 (env_verbosity); 3814 #line 3814 "tracker-backend.c" 3815 } 3816 3817 3818 static void tracker_sparql_backend_remove_log_handler (const gchar* log_domain, GLogLevelFlags log_level, const gchar* message) { 3819 #line 372 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3820 g_return_if_fail (message != NULL); 3821 #line 3821 "tracker-backend.c" 3822 } 3823 3824 3825 static void tracker_sparql_backend_class_init (TrackerSparqlBackendClass * klass) { 3826 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3827 tracker_sparql_backend_parent_class = g_type_class_peek_parent (klass); 3828 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3829 g_type_class_add_private (klass, sizeof (TrackerSparqlBackendPrivate)); 3830 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3831 G_OBJECT_CLASS (klass)->dispose = tracker_sparql_backend_real_dispose; 3832 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3833 TRACKER_SPARQL_CONNECTION_CLASS (klass)->query = tracker_sparql_backend_real_query; 3834 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3835 TRACKER_SPARQL_CONNECTION_CLASS (klass)->query_async = tracker_sparql_backend_real_query_async; 3836 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3837 TRACKER_SPARQL_CONNECTION_CLASS (klass)->query_finish = tracker_sparql_backend_real_query_finish; 3838 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3839 TRACKER_SPARQL_CONNECTION_CLASS (klass)->update = tracker_sparql_backend_real_update; 3840 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3841 TRACKER_SPARQL_CONNECTION_CLASS (klass)->update_blank = tracker_sparql_backend_real_update_blank; 3842 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3843 TRACKER_SPARQL_CONNECTION_CLASS (klass)->update_async = tracker_sparql_backend_real_update_async; 3844 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3845 TRACKER_SPARQL_CONNECTION_CLASS (klass)->update_finish = tracker_sparql_backend_real_update_finish; 3846 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3847 TRACKER_SPARQL_CONNECTION_CLASS (klass)->update_array_async = tracker_sparql_backend_real_update_array_async; 3848 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3849 TRACKER_SPARQL_CONNECTION_CLASS (klass)->update_array_finish = tracker_sparql_backend_real_update_array_finish; 3850 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3851 TRACKER_SPARQL_CONNECTION_CLASS (klass)->update_blank_async = tracker_sparql_backend_real_update_blank_async; 3852 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3853 TRACKER_SPARQL_CONNECTION_CLASS (klass)->update_blank_finish = tracker_sparql_backend_real_update_blank_finish; 3854 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3855 TRACKER_SPARQL_CONNECTION_CLASS (klass)->load = tracker_sparql_backend_real_load; 3856 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3857 TRACKER_SPARQL_CONNECTION_CLASS (klass)->load_async = tracker_sparql_backend_real_load_async; 3858 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3859 TRACKER_SPARQL_CONNECTION_CLASS (klass)->load_finish = tracker_sparql_backend_real_load_finish; 3860 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3861 TRACKER_SPARQL_CONNECTION_CLASS (klass)->statistics = tracker_sparql_backend_real_statistics; 3862 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3863 TRACKER_SPARQL_CONNECTION_CLASS (klass)->statistics_async = tracker_sparql_backend_real_statistics_async; 3864 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3865 TRACKER_SPARQL_CONNECTION_CLASS (klass)->statistics_finish = tracker_sparql_backend_real_statistics_finish; 3866 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3867 G_OBJECT_CLASS (klass)->finalize = tracker_sparql_backend_finalize; 3868 #line 3868 "tracker-backend.c" 3869 } 3870 3871 3872 static void tracker_sparql_backend_instance_init (TrackerSparqlBackend * self) { 3873 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3874 self->priv = TRACKER_SPARQL_BACKEND_GET_PRIVATE (self); 3875 #line 22 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3876 self->priv->direct = NULL; 3877 #line 23 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3878 self->priv->bus = NULL; 3879 #line 3879 "tracker-backend.c" 3880 } 3881 3882 3883 static void tracker_sparql_backend_finalize (GObject* obj) { 3884 TrackerSparqlBackend * self; 3885 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3886 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_SPARQL_TYPE_BACKEND, TrackerSparqlBackend); 3887 #line 22 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3888 _g_object_unref0 (self->priv->direct); 3889 #line 23 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3890 _g_object_unref0 (self->priv->bus); 3891 #line 20 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3892 G_OBJECT_CLASS (tracker_sparql_backend_parent_class)->finalize (obj); 3893 #line 3893 "tracker-backend.c" 3894 } 3895 3896 3897 GType tracker_sparql_backend_get_type (void) { 3898 static volatile gsize tracker_sparql_backend_type_id__volatile = 0; 3899 if (g_once_init_enter (&tracker_sparql_backend_type_id__volatile)) { 3900 static const GTypeInfo g_define_type_info = { sizeof (TrackerSparqlBackendClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_sparql_backend_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerSparqlBackend), 0, (GInstanceInitFunc) tracker_sparql_backend_instance_init, NULL }; 3901 GType tracker_sparql_backend_type_id; 3902 tracker_sparql_backend_type_id = g_type_register_static (TRACKER_SPARQL_TYPE_CONNECTION, "TrackerSparqlBackend", &g_define_type_info, 0); 3903 g_once_init_leave (&tracker_sparql_backend_type_id__volatile, tracker_sparql_backend_type_id); 3904 } 3905 return tracker_sparql_backend_type_id__volatile; 3906 } 3907 3908 3909 static void tracker_sparql_connection_get_async_data_free (gpointer _data) { 3910 TrackerSparqlConnectionGetAsyncData* _data_; 3911 _data_ = _data; 3912 _g_object_unref0 (_data_->cancellable); 3913 _g_object_unref0 (_data_->result); 3914 g_slice_free (TrackerSparqlConnectionGetAsyncData, _data_); 3915 } 3916 3917 3918 void tracker_sparql_connection_get_async (GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) { 3919 TrackerSparqlConnectionGetAsyncData* _data_; 3920 GCancellable* _tmp0_; 3921 GCancellable* _tmp1_; 3922 _data_ = g_slice_new0 (TrackerSparqlConnectionGetAsyncData); 3923 _data_->_async_result = g_simple_async_result_new (NULL, _callback_, _user_data_, tracker_sparql_connection_get_async); 3924 g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_sparql_connection_get_async_data_free); 3925 _tmp0_ = cancellable; 3926 _tmp1_ = _g_object_ref0 (_tmp0_); 3927 _g_object_unref0 (_data_->cancellable); 3928 _data_->cancellable = _tmp1_; 3929 tracker_sparql_connection_get_async_co (_data_); 3930 } 3931 3932 3933 TrackerSparqlConnection* tracker_sparql_connection_get_finish (GAsyncResult* _res_, GError** error) { 3934 TrackerSparqlConnection* result; 3935 TrackerSparqlConnectionGetAsyncData* _data_; 3936 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) { 3937 return NULL; 3938 } 3939 _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_)); 3940 result = _data_->result; 3941 _data_->result = NULL; 3942 return result; 3943 } 3944 3945 3946 static void tracker_sparql_connection_get_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) { 3947 TrackerSparqlConnectionGetAsyncData* _data_; 3948 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3949 _data_ = _user_data_; 3950 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3951 _data_->_source_object_ = source_object; 3952 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3953 _data_->_res_ = _res_; 3954 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3955 tracker_sparql_connection_get_async_co (_data_); 3956 #line 3956 "tracker-backend.c" 3957 } 3958 3959 3960 static gboolean tracker_sparql_connection_get_async_co (TrackerSparqlConnectionGetAsyncData* _data_) { 3961 #line 377 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3962 switch (_data_->_state_) { 3963 #line 377 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3964 case 0: 3965 #line 3965 "tracker-backend.c" 3966 goto _state_0; 3967 #line 377 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3968 case 1: 3969 #line 3969 "tracker-backend.c" 3970 goto _state_1; 3971 default: 3972 #line 377 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3973 g_assert_not_reached (); 3974 #line 3974 "tracker-backend.c" 3975 } 3976 _state_0: 3977 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3978 _data_->_tmp0_ = _data_->cancellable; 3979 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3980 _data_->_state_ = 1; 3981 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3982 tracker_sparql_backend_get_internal_async (_data_->_tmp0_, tracker_sparql_connection_get_async_ready, _data_); 3983 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3984 return FALSE; 3985 #line 3985 "tracker-backend.c" 3986 _state_1: 3987 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3988 _data_->_tmp1_ = NULL; 3989 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3990 _data_->_tmp1_ = tracker_sparql_backend_get_internal_finish (_data_->_res_, &_data_->_inner_error_); 3991 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3992 _data_->_tmp2_ = _data_->_tmp1_; 3993 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3994 if (_data_->_inner_error_ != NULL) { 3995 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3996 if ((((_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_data_->_inner_error_->domain == G_IO_ERROR)) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) || (_data_->_inner_error_->domain == G_SPAWN_ERROR)) { 3997 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 3998 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 3999 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4000 g_error_free (_data_->_inner_error_); 4001 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4002 if (_data_->_state_ == 0) { 4003 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4004 g_simple_async_result_complete_in_idle (_data_->_async_result); 4005 #line 4005 "tracker-backend.c" 4006 } else { 4007 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4008 g_simple_async_result_complete (_data_->_async_result); 4009 #line 4009 "tracker-backend.c" 4010 } 4011 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4012 g_object_unref (_data_->_async_result); 4013 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4014 return FALSE; 4015 #line 4015 "tracker-backend.c" 4016 } else { 4017 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4018 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); 4019 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4020 g_clear_error (&_data_->_inner_error_); 4021 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4022 return FALSE; 4023 #line 4023 "tracker-backend.c" 4024 } 4025 } 4026 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4027 _data_->result = _data_->_tmp2_; 4028 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4029 if (_data_->_state_ == 0) { 4030 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4031 g_simple_async_result_complete_in_idle (_data_->_async_result); 4032 #line 4032 "tracker-backend.c" 4033 } else { 4034 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4035 g_simple_async_result_complete (_data_->_async_result); 4036 #line 4036 "tracker-backend.c" 4037 } 4038 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4039 g_object_unref (_data_->_async_result); 4040 #line 378 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4041 return FALSE; 4042 #line 377 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4043 if (_data_->_state_ == 0) { 4044 #line 377 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4045 g_simple_async_result_complete_in_idle (_data_->_async_result); 4046 #line 4046 "tracker-backend.c" 4047 } else { 4048 #line 377 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4049 g_simple_async_result_complete (_data_->_async_result); 4050 #line 4050 "tracker-backend.c" 4051 } 4052 #line 377 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4053 g_object_unref (_data_->_async_result); 4054 #line 377 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4055 return FALSE; 4056 #line 4056 "tracker-backend.c" 4057 } 4058 4059 4060 TrackerSparqlConnection* tracker_sparql_connection_get (GCancellable* cancellable, GError** error) { 4061 TrackerSparqlConnection* result = NULL; 4062 GCancellable* _tmp0_; 4063 TrackerSparqlConnection* _tmp1_ = NULL; 4064 TrackerSparqlConnection* _tmp2_; 4065 GError * _inner_error_ = NULL; 4066 #line 382 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4067 _tmp0_ = cancellable; 4068 #line 382 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4069 _tmp1_ = tracker_sparql_backend_get_internal (_tmp0_, &_inner_error_); 4070 #line 382 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4071 _tmp2_ = _tmp1_; 4072 #line 382 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4073 if (_inner_error_ != NULL) { 4074 #line 382 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4075 if ((((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == G_IO_ERROR)) || (_inner_error_->domain == G_DBUS_ERROR)) || (_inner_error_->domain == G_SPAWN_ERROR)) { 4076 #line 382 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4077 g_propagate_error (error, _inner_error_); 4078 #line 382 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4079 return NULL; 4080 #line 4080 "tracker-backend.c" 4081 } else { 4082 #line 382 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4083 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); 4084 #line 382 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4085 g_clear_error (&_inner_error_); 4086 #line 382 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4087 return NULL; 4088 #line 4088 "tracker-backend.c" 4089 } 4090 } 4091 #line 382 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4092 result = _tmp2_; 4093 #line 382 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4094 return result; 4095 #line 4095 "tracker-backend.c" 4096 } 4097 4098 4099 static void tracker_sparql_connection_get_direct_async_data_free (gpointer _data) { 4100 TrackerSparqlConnectionGetDirectAsyncData* _data_; 4101 _data_ = _data; 4102 _g_object_unref0 (_data_->cancellable); 4103 _g_object_unref0 (_data_->result); 4104 g_slice_free (TrackerSparqlConnectionGetDirectAsyncData, _data_); 4105 } 4106 4107 4108 void tracker_sparql_connection_get_direct_async (GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) { 4109 TrackerSparqlConnectionGetDirectAsyncData* _data_; 4110 GCancellable* _tmp0_; 4111 GCancellable* _tmp1_; 4112 _data_ = g_slice_new0 (TrackerSparqlConnectionGetDirectAsyncData); 4113 _data_->_async_result = g_simple_async_result_new (NULL, _callback_, _user_data_, tracker_sparql_connection_get_direct_async); 4114 g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_sparql_connection_get_direct_async_data_free); 4115 _tmp0_ = cancellable; 4116 _tmp1_ = _g_object_ref0 (_tmp0_); 4117 _g_object_unref0 (_data_->cancellable); 4118 _data_->cancellable = _tmp1_; 4119 tracker_sparql_connection_get_direct_async_co (_data_); 4120 } 4121 4122 4123 TrackerSparqlConnection* tracker_sparql_connection_get_direct_finish (GAsyncResult* _res_, GError** error) { 4124 TrackerSparqlConnection* result; 4125 TrackerSparqlConnectionGetDirectAsyncData* _data_; 4126 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) { 4127 return NULL; 4128 } 4129 _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_)); 4130 result = _data_->result; 4131 _data_->result = NULL; 4132 return result; 4133 } 4134 4135 4136 static void tracker_sparql_connection_get_direct_async_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) { 4137 TrackerSparqlConnectionGetDirectAsyncData* _data_; 4138 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4139 _data_ = _user_data_; 4140 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4141 _data_->_source_object_ = source_object; 4142 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4143 _data_->_res_ = _res_; 4144 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4145 tracker_sparql_connection_get_direct_async_co (_data_); 4146 #line 4146 "tracker-backend.c" 4147 } 4148 4149 4150 static gboolean tracker_sparql_connection_get_direct_async_co (TrackerSparqlConnectionGetDirectAsyncData* _data_) { 4151 #line 385 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4152 switch (_data_->_state_) { 4153 #line 385 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4154 case 0: 4155 #line 4155 "tracker-backend.c" 4156 goto _state_0; 4157 #line 385 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4158 case 1: 4159 #line 4159 "tracker-backend.c" 4160 goto _state_1; 4161 default: 4162 #line 385 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4163 g_assert_not_reached (); 4164 #line 4164 "tracker-backend.c" 4165 } 4166 _state_0: 4167 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4168 _data_->_tmp0_ = _data_->cancellable; 4169 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4170 _data_->_state_ = 1; 4171 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4172 tracker_sparql_backend_get_internal_async (_data_->_tmp0_, tracker_sparql_connection_get_direct_async_ready, _data_); 4173 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4174 return FALSE; 4175 #line 4175 "tracker-backend.c" 4176 _state_1: 4177 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4178 _data_->_tmp1_ = NULL; 4179 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4180 _data_->_tmp1_ = tracker_sparql_backend_get_internal_finish (_data_->_res_, &_data_->_inner_error_); 4181 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4182 _data_->_tmp2_ = _data_->_tmp1_; 4183 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4184 if (_data_->_inner_error_ != NULL) { 4185 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4186 if ((((_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_data_->_inner_error_->domain == G_IO_ERROR)) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) || (_data_->_inner_error_->domain == G_SPAWN_ERROR)) { 4187 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4188 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 4189 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4190 g_error_free (_data_->_inner_error_); 4191 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4192 if (_data_->_state_ == 0) { 4193 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4194 g_simple_async_result_complete_in_idle (_data_->_async_result); 4195 #line 4195 "tracker-backend.c" 4196 } else { 4197 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4198 g_simple_async_result_complete (_data_->_async_result); 4199 #line 4199 "tracker-backend.c" 4200 } 4201 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4202 g_object_unref (_data_->_async_result); 4203 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4204 return FALSE; 4205 #line 4205 "tracker-backend.c" 4206 } else { 4207 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4208 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); 4209 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4210 g_clear_error (&_data_->_inner_error_); 4211 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4212 return FALSE; 4213 #line 4213 "tracker-backend.c" 4214 } 4215 } 4216 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4217 _data_->result = _data_->_tmp2_; 4218 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4219 if (_data_->_state_ == 0) { 4220 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4221 g_simple_async_result_complete_in_idle (_data_->_async_result); 4222 #line 4222 "tracker-backend.c" 4223 } else { 4224 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4225 g_simple_async_result_complete (_data_->_async_result); 4226 #line 4226 "tracker-backend.c" 4227 } 4228 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4229 g_object_unref (_data_->_async_result); 4230 #line 386 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4231 return FALSE; 4232 #line 385 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4233 if (_data_->_state_ == 0) { 4234 #line 385 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4235 g_simple_async_result_complete_in_idle (_data_->_async_result); 4236 #line 4236 "tracker-backend.c" 4237 } else { 4238 #line 385 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4239 g_simple_async_result_complete (_data_->_async_result); 4240 #line 4240 "tracker-backend.c" 4241 } 4242 #line 385 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4243 g_object_unref (_data_->_async_result); 4244 #line 385 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4245 return FALSE; 4246 #line 4246 "tracker-backend.c" 4247 } 4248 4249 4250 TrackerSparqlConnection* tracker_sparql_connection_get_direct (GCancellable* cancellable, GError** error) { 4251 TrackerSparqlConnection* result = NULL; 4252 GCancellable* _tmp0_; 4253 TrackerSparqlConnection* _tmp1_ = NULL; 4254 TrackerSparqlConnection* _tmp2_; 4255 GError * _inner_error_ = NULL; 4256 #line 390 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4257 _tmp0_ = cancellable; 4258 #line 390 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4259 _tmp1_ = tracker_sparql_backend_get_internal (_tmp0_, &_inner_error_); 4260 #line 390 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4261 _tmp2_ = _tmp1_; 4262 #line 390 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4263 if (_inner_error_ != NULL) { 4264 #line 390 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4265 if ((((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == G_IO_ERROR)) || (_inner_error_->domain == G_DBUS_ERROR)) || (_inner_error_->domain == G_SPAWN_ERROR)) { 4266 #line 390 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4267 g_propagate_error (error, _inner_error_); 4268 #line 390 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4269 return NULL; 4270 #line 4270 "tracker-backend.c" 4271 } else { 4272 #line 390 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4273 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); 4274 #line 390 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4275 g_clear_error (&_inner_error_); 4276 #line 390 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4277 return NULL; 4278 #line 4278 "tracker-backend.c" 4279 } 4280 } 4281 #line 390 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4282 result = _tmp2_; 4283 #line 390 "/home/martyn/Source/tracker/src/libtracker-sparql-backend/tracker-backend.vala" 4284 return result; 4285 #line 4285 "tracker-backend.c" 4286 }