tracker-0.16.2/src/libtracker-direct/tracker-direct.c

Location Tool Test ID Function Issue
tracker-direct.c:599:29 gcc unused-but-set-variable block2_data_unref variable 'self' set but not used
tracker-direct.c:601:3 clang-analyzer Value stored to 'self' is never read
tracker-direct.c:639:28 gcc unused-but-set-variable __lambda3_ variable 'self' set but not used
tracker-direct.c:644:2 clang-analyzer Value stored to 'self' is never read
tracker-direct.c:1278:2 gcc unused-label tracker_direct_connection_finalize label '__finally0' defined but not used
   1 /* tracker-direct.c generated by valac 0.18.1, the Vala compiler
   2  * generated from tracker-direct.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 "libtracker-data/tracker-db-manager.h"
  27 #include "libtracker-data/tracker-data-manager.h"
  28 #include <gio/gio.h>
  29 #include <stdlib.h>
  30 #include <string.h>
  31 #include "libtracker-data/tracker-sparql-query.h"
  32 #include "libtracker-data/tracker-db-interface.h"
  33 #include "libtracker-common/tracker-date-time.h"
  34 
  35 
  36 #define TRACKER_DIRECT_TYPE_CONNECTION (tracker_direct_connection_get_type ())
  37 #define TRACKER_DIRECT_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_DIRECT_TYPE_CONNECTION, TrackerDirectConnection))
  38 #define TRACKER_DIRECT_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_DIRECT_TYPE_CONNECTION, TrackerDirectConnectionClass))
  39 #define TRACKER_DIRECT_IS_CONNECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_DIRECT_TYPE_CONNECTION))
  40 #define TRACKER_DIRECT_IS_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_DIRECT_TYPE_CONNECTION))
  41 #define TRACKER_DIRECT_CONNECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_DIRECT_TYPE_CONNECTION, TrackerDirectConnectionClass))
  42 
  43 typedef struct _TrackerDirectConnection TrackerDirectConnection;
  44 typedef struct _TrackerDirectConnectionClass TrackerDirectConnectionClass;
  45 typedef struct _TrackerDirectConnectionPrivate TrackerDirectConnectionPrivate;
  46 #define _g_free0(var) (var = (g_free (var), NULL))
  47 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
  48 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
  49 typedef struct _Block1Data Block1Data;
  50 typedef struct _Block2Data Block2Data;
  51 #define _g_main_context_unref0(var) ((var == NULL) ? NULL : (var = (g_main_context_unref (var), NULL)))
  52 #define _g_source_unref0(var) ((var == NULL) ? NULL : (var = (g_source_unref (var), NULL)))
  53 typedef struct _TrackerDirectConnectionQueryAsyncData TrackerDirectConnectionQueryAsyncData;
  54 
  55 struct _TrackerDirectConnection {
  56 	TrackerSparqlConnection parent_instance;
  57 	TrackerDirectConnectionPrivate * priv;
  58 };
  59 
  60 struct _TrackerDirectConnectionClass {
  61 	TrackerSparqlConnectionClass parent_class;
  62 };
  63 
  64 struct _TrackerDirectConnectionPrivate {
  65 	gboolean initialized;
  66 };
  67 
  68 struct _Block1Data {
  69 	int _ref_count_;
  70 	TrackerDirectConnection * self;
  71 	gchar* sparql;
  72 	GCancellable* cancellable;
  73 	gpointer _async_data_;
  74 };
  75 
  76 struct _Block2Data {
  77 	int _ref_count_;
  78 	Block1Data * _data1_;
  79 	GError* sparql_error;
  80 	GError* io_error;
  81 	GError* dbus_error;
  82 	TrackerSparqlCursor* _result_;
  83 	GMainContext* context;
  84 };
  85 
  86 struct _TrackerDirectConnectionQueryAsyncData {
  87 	int _state_;
  88 	GObject* _source_object_;
  89 	GAsyncResult* _res_;
  90 	GSimpleAsyncResult* _async_result;
  91 	TrackerDirectConnection* self;
  92 	gchar* sparql;
  93 	GCancellable* cancellable;
  94 	TrackerSparqlCursor* result;
  95 	Block1Data* _data1_;
  96 	const gchar* _tmp0_;
  97 	GCancellable* _tmp1_;
  98 	gboolean _tmp2_;
  99 	Block2Data* _data2_;
 100 	GMainContext* _tmp3_;
 101 	GMainContext* _tmp4_;
 102 	GError* _tmp5_;
 103 	GError* _tmp6_;
 104 	GError* _tmp7_;
 105 	GError* _tmp8_;
 106 	GError* _tmp9_;
 107 	GError* _tmp10_;
 108 	GError* _tmp11_;
 109 	GError* _tmp12_;
 110 	GError* _tmp13_;
 111 	TrackerSparqlCursor* _tmp14_;
 112 	TrackerSparqlCursor* _tmp15_;
 113 	const gchar* _tmp16_;
 114 	GCancellable* _tmp17_;
 115 	TrackerSparqlCursor* _tmp18_;
 116 	TrackerSparqlCursor* _tmp19_;
 117 	GError * _inner_error_;
 118 };
 119 
 120 
 121 static gpointer tracker_direct_connection_parent_class = NULL;
 122 static gint tracker_direct_connection_use_count;
 123 static gint tracker_direct_connection_use_count = 0;
 124 
 125 GType tracker_direct_connection_get_type (void) G_GNUC_CONST;
 126 #define TRACKER_DIRECT_CONNECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_DIRECT_TYPE_CONNECTION, TrackerDirectConnectionPrivate))
 127 enum  {
 128 	TRACKER_DIRECT_CONNECTION_DUMMY_PROPERTY
 129 };
 130 TrackerDirectConnection* tracker_direct_connection_new (GError** error);
 131 TrackerDirectConnection* tracker_direct_connection_construct (GType object_type, GError** error);
 132 static TrackerSparqlCursor* tracker_direct_connection_query_unlocked (TrackerDirectConnection* self, const gchar* sparql, GCancellable* cancellable, GError** error);
 133 static TrackerSparqlCursor* tracker_direct_connection_real_query (TrackerSparqlConnection* base, const gchar* sparql, GCancellable* cancellable, GError** error);
 134 static void tracker_direct_connection_real_query_async_data_free (gpointer _data);
 135 static void tracker_direct_connection_real_query_async (TrackerSparqlConnection* base, const gchar* sparql, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_);
 136 static gboolean tracker_direct_connection_real_query_async_co (TrackerDirectConnectionQueryAsyncData* _data_);
 137 static Block1Data* block1_data_ref (Block1Data* _data1_);
 138 static void block1_data_unref (void * _userdata_);
 139 static Block2Data* block2_data_ref (Block2Data* _data2_);
 140 static void block2_data_unref (void * _userdata_);
 141 static gboolean ___lambda2_ (Block2Data* _data2_, GIOSchedulerJob* job);
 142 static gboolean __lambda3_ (Block2Data* _data2_);
 143 static gboolean ___lambda3__gsource_func (gpointer self);
 144 static gboolean ____lambda2__gio_scheduler_job_func (GIOSchedulerJob* job, GCancellable* cancellable, gpointer self);
 145 static void tracker_direct_connection_finalize (GObject* obj);
 146 
 147 
 148 TrackerDirectConnection* tracker_direct_connection_construct (GType object_type, GError** error) {
 149 	TrackerDirectConnection * self = NULL;
 150 	GError * _inner_error_ = NULL;
 151 #line 24 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 152 	self = (TrackerDirectConnection*) tracker_sparql_connection_construct (object_type);
 153 #line 25 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 154 	tracker_db_manager_lock ();
 155 #line 156 "tracker-direct.c"
 156 	{
 157 		gint _tmp0_;
 158 		gint _tmp7_;
 159 #line 28 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 160 		_tmp0_ = tracker_direct_connection_use_count;
 161 #line 28 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 162 		if (_tmp0_ == 0) {
 163 #line 164 "tracker-direct.c"
 164 			guint select_cache_size;
 165 			const gchar* _tmp1_ = NULL;
 166 			gchar* _tmp2_;
 167 			gchar* env_cache_size;
 168 			const gchar* _tmp3_;
 169 			guint _tmp6_;
 170 #line 29 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 171 			select_cache_size = (guint) 100;
 172 #line 30 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 173 			_tmp1_ = g_getenv ("TRACKER_SPARQL_CACHE_SIZE");
 174 #line 30 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 175 			_tmp2_ = g_strdup (_tmp1_);
 176 #line 30 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 177 			env_cache_size = _tmp2_;
 178 #line 32 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 179 			_tmp3_ = env_cache_size;
 180 #line 32 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 181 			if (_tmp3_ != NULL) {
 182 #line 183 "tracker-direct.c"
 183 				const gchar* _tmp4_;
 184 				gint _tmp5_ = 0;
 185 #line 33 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 186 				_tmp4_ = env_cache_size;
 187 #line 33 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 188 				_tmp5_ = atoi (_tmp4_);
 189 #line 33 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 190 				select_cache_size = (guint) _tmp5_;
 191 #line 192 "tracker-direct.c"
 192 			}
 193 #line 36 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 194 			_tmp6_ = select_cache_size;
 195 #line 36 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 196 			tracker_data_manager_init (TRACKER_DB_MANAGER_READONLY, NULL, NULL, FALSE, FALSE, _tmp6_, (guint) 0, NULL, NULL, NULL, &_inner_error_);
 197 #line 36 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 198 			if (_inner_error_ != NULL) {
 199 #line 36 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 200 				_g_free0 (env_cache_size);
 201 #line 202 "tracker-direct.c"
 202 				goto __catch1_g_error;
 203 			}
 204 #line 28 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 205 			_g_free0 (env_cache_size);
 206 #line 207 "tracker-direct.c"
 207 		}
 208 #line 39 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 209 		_tmp7_ = tracker_direct_connection_use_count;
 210 #line 39 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 211 		tracker_direct_connection_use_count = _tmp7_ + 1;
 212 #line 40 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 213 		self->priv->initialized = TRUE;
 214 #line 215 "tracker-direct.c"
 215 	}
 216 	goto __finally1;
 217 	__catch1_g_error:
 218 	{
 219 		GError* e = NULL;
 220 		GError* _tmp8_;
 221 		const gchar* _tmp9_;
 222 		GError* _tmp10_;
 223 #line 27 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 224 		e = _inner_error_;
 225 #line 27 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 226 		_inner_error_ = NULL;
 227 #line 42 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 228 		_tmp8_ = e;
 229 #line 42 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 230 		_tmp9_ = _tmp8_->message;
 231 #line 42 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 232 		_tmp10_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_INTERNAL, _tmp9_);
 233 #line 42 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 234 		_inner_error_ = _tmp10_;
 235 #line 42 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 236 		_g_error_free0 (e);
 237 #line 238 "tracker-direct.c"
 238 		goto __finally1;
 239 	}
 240 	__finally1:
 241 	{
 242 #line 44 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 243 		tracker_db_manager_unlock ();
 244 #line 245 "tracker-direct.c"
 245 	}
 246 #line 27 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 247 	if (_inner_error_ != NULL) {
 248 #line 27 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 249 		if (((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == G_IO_ERROR)) || (_inner_error_->domain == G_DBUS_ERROR)) {
 250 #line 27 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 251 			g_propagate_error (error, _inner_error_);
 252 #line 27 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 253 			_g_object_unref0 (self);
 254 #line 27 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 255 			return NULL;
 256 #line 257 "tracker-direct.c"
 257 		} else {
 258 #line 27 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 259 			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);
 260 #line 27 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 261 			g_clear_error (&_inner_error_);
 262 #line 27 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 263 			return NULL;
 264 #line 265 "tracker-direct.c"
 265 		}
 266 	}
 267 #line 24 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 268 	return self;
 269 #line 270 "tracker-direct.c"
 270 }
 271 
 272 
 273 TrackerDirectConnection* tracker_direct_connection_new (GError** error) {
 274 #line 24 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 275 	return tracker_direct_connection_construct (TRACKER_DIRECT_TYPE_CONNECTION, error);
 276 #line 277 "tracker-direct.c"
 277 }
 278 
 279 
 280 static TrackerSparqlCursor* tracker_direct_connection_query_unlocked (TrackerDirectConnection* self, const gchar* sparql, GCancellable* cancellable, GError** error) {
 281 	TrackerSparqlCursor* result = NULL;
 282 	GError * _inner_error_ = NULL;
 283 #line 68 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 284 	g_return_val_if_fail (self != NULL, NULL);
 285 #line 68 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 286 	g_return_val_if_fail (sparql != NULL, NULL);
 287 #line 288 "tracker-direct.c"
 288 	{
 289 		const gchar* _tmp0_;
 290 		TrackerSparqlQuery* _tmp1_;
 291 		TrackerSparqlQuery* query_object;
 292 		TrackerSparqlQuery* _tmp2_;
 293 		TrackerDBCursor* _tmp3_ = NULL;
 294 		TrackerDBCursor* cursor;
 295 		TrackerDBCursor* _tmp4_;
 296 #line 70 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 297 		_tmp0_ = sparql;
 298 #line 70 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 299 		_tmp1_ = tracker_sparql_query_new (_tmp0_);
 300 #line 70 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 301 		query_object = _tmp1_;
 302 #line 71 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 303 		_tmp2_ = query_object;
 304 #line 71 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 305 		_tmp3_ = tracker_sparql_query_execute_cursor (_tmp2_, TRUE, &_inner_error_);
 306 #line 71 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 307 		cursor = _tmp3_;
 308 #line 71 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 309 		if (_inner_error_ != NULL) {
 310 #line 71 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 311 			_g_object_unref0 (query_object);
 312 #line 71 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 313 			if (_inner_error_->domain == TRACKER_DB_INTERFACE_ERROR) {
 314 #line 315 "tracker-direct.c"
 315 				goto __catch2_tracker_db_interface_error;
 316 			}
 317 #line 71 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 318 			if (_inner_error_->domain == TRACKER_DATE_ERROR) {
 319 #line 320 "tracker-direct.c"
 320 				goto __catch2_tracker_date_error;
 321 			}
 322 			goto __finally2;
 323 		}
 324 #line 72 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 325 		_tmp4_ = cursor;
 326 #line 72 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 327 		tracker_sparql_cursor_set_connection ((TrackerSparqlCursor*) _tmp4_, (TrackerSparqlConnection*) self);
 328 #line 73 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 329 		result = (TrackerSparqlCursor*) cursor;
 330 #line 73 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 331 		_g_object_unref0 (query_object);
 332 #line 73 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 333 		return result;
 334 #line 335 "tracker-direct.c"
 335 	}
 336 	goto __finally2;
 337 	__catch2_tracker_db_interface_error:
 338 	{
 339 		GError* e = NULL;
 340 		GError* _tmp5_;
 341 		const gchar* _tmp6_;
 342 		GError* _tmp7_;
 343 #line 69 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 344 		e = _inner_error_;
 345 #line 69 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 346 		_inner_error_ = NULL;
 347 #line 75 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 348 		_tmp5_ = e;
 349 #line 75 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 350 		_tmp6_ = _tmp5_->message;
 351 #line 75 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 352 		_tmp7_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_INTERNAL, _tmp6_);
 353 #line 75 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 354 		_inner_error_ = _tmp7_;
 355 #line 75 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 356 		_g_error_free0 (e);
 357 #line 358 "tracker-direct.c"
 358 		goto __finally2;
 359 	}
 360 	goto __finally2;
 361 	__catch2_tracker_date_error:
 362 	{
 363 		GError* e = NULL;
 364 		GError* _tmp8_;
 365 		const gchar* _tmp9_;
 366 		GError* _tmp10_;
 367 #line 69 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 368 		e = _inner_error_;
 369 #line 69 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 370 		_inner_error_ = NULL;
 371 #line 77 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 372 		_tmp8_ = e;
 373 #line 77 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 374 		_tmp9_ = _tmp8_->message;
 375 #line 77 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 376 		_tmp10_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_PARSE, _tmp9_);
 377 #line 77 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 378 		_inner_error_ = _tmp10_;
 379 #line 77 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 380 		_g_error_free0 (e);
 381 #line 382 "tracker-direct.c"
 382 		goto __finally2;
 383 	}
 384 	__finally2:
 385 #line 69 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 386 	if (((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == G_IO_ERROR)) || (_inner_error_->domain == G_DBUS_ERROR)) {
 387 #line 69 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 388 		g_propagate_error (error, _inner_error_);
 389 #line 69 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 390 		return NULL;
 391 #line 392 "tracker-direct.c"
 392 	} else {
 393 #line 69 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 394 		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);
 395 #line 69 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 396 		g_clear_error (&_inner_error_);
 397 #line 69 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 398 		return NULL;
 399 #line 400 "tracker-direct.c"
 400 	}
 401 }
 402 
 403 
 404 static TrackerSparqlCursor* tracker_direct_connection_real_query (TrackerSparqlConnection* base, const gchar* sparql, GCancellable* cancellable, GError** error) {
 405 	TrackerDirectConnection * self;
 406 	TrackerSparqlCursor* result = NULL;
 407 	GError * _inner_error_ = NULL;
 408 #line 81 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 409 	self = (TrackerDirectConnection*) base;
 410 #line 81 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 411 	g_return_val_if_fail (sparql != NULL, NULL);
 412 #line 82 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 413 	tracker_db_manager_lock ();
 414 #line 415 "tracker-direct.c"
 415 	{
 416 		const gchar* _tmp0_;
 417 		GCancellable* _tmp1_;
 418 		TrackerSparqlCursor* _tmp2_ = NULL;
 419 		TrackerSparqlCursor* _tmp3_;
 420 #line 84 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 421 		_tmp0_ = sparql;
 422 #line 84 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 423 		_tmp1_ = cancellable;
 424 #line 84 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 425 		_tmp2_ = tracker_direct_connection_query_unlocked (self, _tmp0_, _tmp1_, &_inner_error_);
 426 #line 84 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 427 		_tmp3_ = _tmp2_;
 428 #line 84 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 429 		if (_inner_error_ != NULL) {
 430 #line 431 "tracker-direct.c"
 431 			goto __finally3;
 432 		}
 433 #line 84 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 434 		result = _tmp3_;
 435 #line 436 "tracker-direct.c"
 436 		{
 437 #line 86 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 438 			tracker_db_manager_unlock ();
 439 #line 440 "tracker-direct.c"
 440 		}
 441 #line 84 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 442 		return result;
 443 #line 444 "tracker-direct.c"
 444 	}
 445 	__finally3:
 446 	{
 447 #line 86 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 448 		tracker_db_manager_unlock ();
 449 #line 450 "tracker-direct.c"
 450 	}
 451 #line 83 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 452 	if (((_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_inner_error_->domain == G_IO_ERROR)) || (_inner_error_->domain == G_DBUS_ERROR)) {
 453 #line 83 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 454 		g_propagate_error (error, _inner_error_);
 455 #line 83 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 456 		return NULL;
 457 #line 458 "tracker-direct.c"
 458 	} else {
 459 #line 83 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 460 		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);
 461 #line 83 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 462 		g_clear_error (&_inner_error_);
 463 #line 83 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 464 		return NULL;
 465 #line 466 "tracker-direct.c"
 466 	}
 467 }
 468 
 469 
 470 static void tracker_direct_connection_real_query_async_data_free (gpointer _data) {
 471 	TrackerDirectConnectionQueryAsyncData* _data_;
 472 	_data_ = _data;
 473 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 474 	_g_object_unref0 (_data_->result);
 475 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 476 	_g_object_unref0 (_data_->self);
 477 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 478 	g_slice_free (TrackerDirectConnectionQueryAsyncData, _data_);
 479 #line 480 "tracker-direct.c"
 480 }
 481 
 482 
 483 static gpointer _g_object_ref0 (gpointer self) {
 484 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 485 	return self ? g_object_ref (self) : NULL;
 486 #line 487 "tracker-direct.c"
 487 }
 488 
 489 
 490 static void tracker_direct_connection_real_query_async (TrackerSparqlConnection* base, const gchar* sparql, GCancellable* cancellable, GAsyncReadyCallback _callback_, gpointer _user_data_) {
 491 	TrackerDirectConnection * self;
 492 	TrackerDirectConnectionQueryAsyncData* _data_;
 493 	TrackerDirectConnection* _tmp0_;
 494 	const gchar* _tmp1_;
 495 	gchar* _tmp2_;
 496 	GCancellable* _tmp3_;
 497 	GCancellable* _tmp4_;
 498 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 499 	self = (TrackerDirectConnection*) base;
 500 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 501 	_data_ = g_slice_new0 (TrackerDirectConnectionQueryAsyncData);
 502 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 503 	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, tracker_direct_connection_real_query_async);
 504 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 505 	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_direct_connection_real_query_async_data_free);
 506 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 507 	_tmp0_ = _g_object_ref0 (self);
 508 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 509 	_data_->self = _tmp0_;
 510 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 511 	_tmp1_ = sparql;
 512 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 513 	_tmp2_ = g_strdup (_tmp1_);
 514 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 515 	_g_free0 (_data_->sparql);
 516 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 517 	_data_->sparql = _tmp2_;
 518 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 519 	_tmp3_ = cancellable;
 520 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 521 	_tmp4_ = _g_object_ref0 (_tmp3_);
 522 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 523 	_g_object_unref0 (_data_->cancellable);
 524 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 525 	_data_->cancellable = _tmp4_;
 526 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 527 	tracker_direct_connection_real_query_async_co (_data_);
 528 #line 529 "tracker-direct.c"
 529 }
 530 
 531 
 532 static TrackerSparqlCursor* tracker_direct_connection_real_query_finish (TrackerSparqlConnection* base, GAsyncResult* _res_, GError** error) {
 533 	TrackerSparqlCursor* result;
 534 	TrackerDirectConnectionQueryAsyncData* _data_;
 535 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 536 	if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) {
 537 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 538 		return NULL;
 539 #line 540 "tracker-direct.c"
 540 	}
 541 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 542 	_data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_));
 543 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 544 	result = _data_->result;
 545 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 546 	_data_->result = NULL;
 547 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 548 	return result;
 549 #line 550 "tracker-direct.c"
 550 }
 551 
 552 
 553 static Block1Data* block1_data_ref (Block1Data* _data1_) {
 554 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 555 	g_atomic_int_inc (&_data1_->_ref_count_);
 556 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 557 	return _data1_;
 558 #line 559 "tracker-direct.c"
 559 }
 560 
 561 
 562 static void block1_data_unref (void * _userdata_) {
 563 	Block1Data* _data1_;
 564 	_data1_ = (Block1Data*) _userdata_;
 565 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 566 	if (g_atomic_int_dec_and_test (&_data1_->_ref_count_)) {
 567 #line 568 "tracker-direct.c"
 568 		TrackerDirectConnection * self;
 569 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 570 		self = _data1_->self;
 571 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 572 		_g_free0 (_data1_->sparql);
 573 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 574 		_g_object_unref0 (_data1_->cancellable);
 575 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 576 		_g_object_unref0 (self);
 577 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 578 		g_slice_free (Block1Data, _data1_);
 579 #line 580 "tracker-direct.c"
 580 	}
 581 }
 582 
 583 
 584 static Block2Data* block2_data_ref (Block2Data* _data2_) {
 585 #line 91 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 586 	g_atomic_int_inc (&_data2_->_ref_count_);
 587 #line 91 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 588 	return _data2_;
 589 #line 590 "tracker-direct.c"
 590 }
 591 
 592 
 593 static void block2_data_unref (void * _userdata_) {
 594 	Block2Data* _data2_;
 595 	_data2_ = (Block2Data*) _userdata_;
 596 #line 91 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala"
 597 	if (g_atomic_int_dec_and_test (&_data2_->_ref_count_)) {
 598 #line 599 "tracker-direct.c"
 599 		TrackerDirectConnection * self;
variable 'self' set but not used
(emitted by gcc)
600 #line 91 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 601 self = _data2_->_data1_->self;
Value stored to 'self' is never read
(emitted by clang-analyzer)

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

602 #line 91 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 603 _g_main_context_unref0 (_data2_->context); 604 #line 91 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 605 _g_object_unref0 (_data2_->_result_); 606 #line 91 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 607 _g_error_free0 (_data2_->dbus_error); 608 #line 91 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 609 _g_error_free0 (_data2_->io_error); 610 #line 91 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 611 _g_error_free0 (_data2_->sparql_error); 612 #line 91 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 613 block1_data_unref (_data2_->_data1_); 614 #line 91 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 615 _data2_->_data1_ = NULL; 616 #line 91 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 617 g_slice_free (Block2Data, _data2_); 618 #line 619 "tracker-direct.c" 619 } 620 } 621 622 623 static gpointer _g_main_context_ref0 (gpointer self) { 624 #line 97 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 625 return self ? g_main_context_ref (self) : NULL; 626 #line 627 "tracker-direct.c" 627 } 628 629 630 static gpointer _g_error_copy0 (gpointer self) { 631 #line 103 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 632 return self ? g_error_copy (self) : NULL; 633 #line 634 "tracker-direct.c" 634 } 635 636 637 static gboolean __lambda3_ (Block2Data* _data2_) { 638 Block1Data* _data1_; 639 TrackerDirectConnection * self;
variable 'self' set but not used
(emitted by gcc)
640 gboolean result = FALSE; 641 #line 111 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 642 _data1_ = _data2_->_data1_; 643 #line 111 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 644 self = _data1_->self;
Value stored to 'self' is never read
(emitted by clang-analyzer)

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

645 #line 112 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 646 tracker_direct_connection_real_query_async_co (_data1_->_async_data_); 647 #line 113 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 648 result = FALSE; 649 #line 113 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 650 return result; 651 #line 652 "tracker-direct.c" 652 } 653 654 655 static gboolean ___lambda3__gsource_func (gpointer self) { 656 gboolean result; 657 result = __lambda3_ (self); 658 #line 111 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 659 return result; 660 #line 661 "tracker-direct.c" 661 } 662 663 664 static gboolean ___lambda2_ (Block2Data* _data2_, GIOSchedulerJob* job) { 665 Block1Data* _data1_; 666 TrackerDirectConnection * self; 667 gboolean result = FALSE; 668 GSource* _tmp10_; 669 GSource* source; 670 GMainContext* _tmp11_; 671 GError * _inner_error_ = NULL; 672 #line 99 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 673 _data1_ = _data2_->_data1_; 674 #line 99 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 675 self = _data1_->self; 676 #line 99 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 677 g_return_val_if_fail (job != NULL, FALSE); 678 #line 679 "tracker-direct.c" 679 { 680 const gchar* _tmp0_; 681 GCancellable* _tmp1_; 682 TrackerSparqlCursor* _tmp2_ = NULL; 683 TrackerSparqlCursor* _tmp3_; 684 #line 101 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 685 _tmp0_ = _data1_->sparql; 686 #line 101 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 687 _tmp1_ = _data1_->cancellable; 688 #line 101 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 689 _tmp2_ = tracker_sparql_connection_query ((TrackerSparqlConnection*) self, _tmp0_, _tmp1_, &_inner_error_); 690 #line 101 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 691 _tmp3_ = _tmp2_; 692 #line 101 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 693 if (_inner_error_ != NULL) { 694 #line 101 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 695 if (_inner_error_->domain == G_IO_ERROR) { 696 #line 697 "tracker-direct.c" 697 goto __catch4_g_io_error; 698 } 699 #line 101 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 700 if (_inner_error_->domain == TRACKER_SPARQL_ERROR) { 701 #line 702 "tracker-direct.c" 702 goto __catch4_tracker_sparql_error; 703 } 704 #line 101 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 705 if (_inner_error_->domain == G_DBUS_ERROR) { 706 #line 707 "tracker-direct.c" 707 goto __catch4_g_dbus_error; 708 } 709 #line 101 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 710 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); 711 #line 101 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 712 g_clear_error (&_inner_error_); 713 #line 101 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 714 return FALSE; 715 #line 716 "tracker-direct.c" 716 } 717 #line 101 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 718 _g_object_unref0 (_data2_->_result_); 719 #line 101 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 720 _data2_->_result_ = _tmp3_; 721 #line 722 "tracker-direct.c" 722 } 723 goto __finally4; 724 __catch4_g_io_error: 725 { 726 GError* e_io = NULL; 727 GError* _tmp4_; 728 GError* _tmp5_; 729 #line 100 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 730 e_io = _inner_error_; 731 #line 100 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 732 _inner_error_ = NULL; 733 #line 103 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 734 _tmp4_ = e_io; 735 #line 103 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 736 _tmp5_ = _g_error_copy0 (_tmp4_); 737 #line 103 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 738 _g_error_free0 (_data2_->io_error); 739 #line 103 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 740 _data2_->io_error = _tmp5_; 741 #line 100 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 742 _g_error_free0 (e_io); 743 #line 744 "tracker-direct.c" 744 } 745 goto __finally4; 746 __catch4_tracker_sparql_error: 747 { 748 GError* e_spql = NULL; 749 GError* _tmp6_; 750 GError* _tmp7_; 751 #line 100 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 752 e_spql = _inner_error_; 753 #line 100 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 754 _inner_error_ = NULL; 755 #line 105 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 756 _tmp6_ = e_spql; 757 #line 105 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 758 _tmp7_ = _g_error_copy0 (_tmp6_); 759 #line 105 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 760 _g_error_free0 (_data2_->sparql_error); 761 #line 105 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 762 _data2_->sparql_error = _tmp7_; 763 #line 100 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 764 _g_error_free0 (e_spql); 765 #line 766 "tracker-direct.c" 766 } 767 goto __finally4; 768 __catch4_g_dbus_error: 769 { 770 GError* e_dbus = NULL; 771 GError* _tmp8_; 772 GError* _tmp9_; 773 #line 100 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 774 e_dbus = _inner_error_; 775 #line 100 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 776 _inner_error_ = NULL; 777 #line 107 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 778 _tmp8_ = e_dbus; 779 #line 107 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 780 _tmp9_ = _g_error_copy0 (_tmp8_); 781 #line 107 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 782 _g_error_free0 (_data2_->dbus_error); 783 #line 107 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 784 _data2_->dbus_error = _tmp9_; 785 #line 100 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 786 _g_error_free0 (e_dbus); 787 #line 788 "tracker-direct.c" 788 } 789 __finally4: 790 #line 100 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 791 if (_inner_error_ != NULL) { 792 #line 100 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 793 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); 794 #line 100 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 795 g_clear_error (&_inner_error_); 796 #line 100 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 797 return FALSE; 798 #line 799 "tracker-direct.c" 799 } 800 #line 110 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 801 _tmp10_ = g_idle_source_new (); 802 #line 110 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 803 source = _tmp10_; 804 #line 111 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 805 g_source_set_callback (source, ___lambda3__gsource_func, block2_data_ref (_data2_), block2_data_unref); 806 #line 115 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 807 _tmp11_ = _data2_->context; 808 #line 115 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 809 g_source_attach (source, _tmp11_); 810 #line 117 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 811 result = FALSE; 812 #line 117 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 813 _g_source_unref0 (source); 814 #line 117 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 815 return result; 816 #line 817 "tracker-direct.c" 817 } 818 819 820 static gboolean ____lambda2__gio_scheduler_job_func (GIOSchedulerJob* job, GCancellable* cancellable, gpointer self) { 821 gboolean result; 822 result = ___lambda2_ (self, job); 823 #line 99 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 824 return result; 825 #line 826 "tracker-direct.c" 826 } 827 828 829 static gboolean tracker_direct_connection_real_query_async_co (TrackerDirectConnectionQueryAsyncData* _data_) { 830 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 831 switch (_data_->_state_) { 832 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 833 case 0: 834 #line 835 "tracker-direct.c" 835 goto _state_0; 836 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 837 case 1: 838 #line 839 "tracker-direct.c" 839 goto _state_1; 840 default: 841 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 842 g_assert_not_reached (); 843 #line 844 "tracker-direct.c" 844 } 845 _state_0: 846 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 847 _data_->_data1_ = g_slice_new0 (Block1Data); 848 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 849 _data_->_data1_->_ref_count_ = 1; 850 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 851 _data_->_data1_->self = g_object_ref (_data_->self); 852 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 853 _data_->_tmp0_ = _data_->sparql; 854 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 855 _g_free0 (_data_->_data1_->sparql); 856 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 857 _data_->_data1_->sparql = _data_->_tmp0_; 858 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 859 _data_->_tmp1_ = _data_->cancellable; 860 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 861 _g_object_unref0 (_data_->_data1_->cancellable); 862 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 863 _data_->_data1_->cancellable = _data_->_tmp1_; 864 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 865 _data_->_data1_->_async_data_ = _data_; 866 #line 91 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 867 _data_->_tmp2_ = FALSE; 868 #line 91 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 869 _data_->_tmp2_ = tracker_db_manager_trylock (); 870 #line 91 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 871 if (!_data_->_tmp2_) { 872 #line 91 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 873 _data_->_data2_ = g_slice_new0 (Block2Data); 874 #line 91 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 875 _data_->_data2_->_ref_count_ = 1; 876 #line 91 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 877 _data_->_data2_->_data1_ = block1_data_ref (_data_->_data1_); 878 #line 93 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 879 _data_->_data2_->sparql_error = NULL; 880 #line 94 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 881 _data_->_data2_->io_error = NULL; 882 #line 95 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 883 _data_->_data2_->dbus_error = NULL; 884 #line 96 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 885 _data_->_data2_->_result_ = NULL; 886 #line 97 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 887 _data_->_tmp3_ = NULL; 888 #line 97 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 889 _data_->_tmp3_ = g_main_context_get_thread_default (); 890 #line 97 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 891 _data_->_tmp4_ = _g_main_context_ref0 (_data_->_tmp3_); 892 #line 97 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 893 _data_->_data2_->context = _data_->_tmp4_; 894 #line 99 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 895 g_io_scheduler_push_job (____lambda2__gio_scheduler_job_func, block2_data_ref (_data_->_data2_), block2_data_unref, G_PRIORITY_DEFAULT, NULL); 896 #line 119 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 897 _data_->_state_ = 1; 898 #line 119 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 899 return FALSE; 900 #line 901 "tracker-direct.c" 901 _state_1: 902 ; 903 #line 121 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 904 _data_->_tmp5_ = _data_->_data2_->sparql_error; 905 #line 121 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 906 if (_data_->_tmp5_ != NULL) { 907 #line 122 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 908 _data_->_tmp6_ = _data_->_data2_->sparql_error; 909 #line 122 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 910 _data_->_tmp7_ = _g_error_copy0 (_data_->_tmp6_); 911 #line 122 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 912 _data_->_inner_error_ = _data_->_tmp7_; 913 #line 122 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 914 if (((_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_data_->_inner_error_->domain == G_IO_ERROR)) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) { 915 #line 122 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 916 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 917 #line 122 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 918 g_error_free (_data_->_inner_error_); 919 #line 122 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 920 block2_data_unref (_data_->_data2_); 921 #line 122 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 922 _data_->_data2_ = NULL; 923 #line 122 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 924 block1_data_unref (_data_->_data1_); 925 #line 122 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 926 _data_->_data1_ = NULL; 927 #line 122 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 928 if (_data_->_state_ == 0) { 929 #line 122 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 930 g_simple_async_result_complete_in_idle (_data_->_async_result); 931 #line 932 "tracker-direct.c" 932 } else { 933 #line 122 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 934 g_simple_async_result_complete (_data_->_async_result); 935 #line 936 "tracker-direct.c" 936 } 937 #line 122 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 938 g_object_unref (_data_->_async_result); 939 #line 122 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 940 return FALSE; 941 #line 942 "tracker-direct.c" 942 } else { 943 #line 122 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 944 block2_data_unref (_data_->_data2_); 945 #line 122 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 946 _data_->_data2_ = NULL; 947 #line 122 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 948 block1_data_unref (_data_->_data1_); 949 #line 122 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 950 _data_->_data1_ = NULL; 951 #line 122 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 952 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); 953 #line 122 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 954 g_clear_error (&_data_->_inner_error_); 955 #line 122 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 956 return FALSE; 957 #line 958 "tracker-direct.c" 958 } 959 } else { 960 #line 123 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 961 _data_->_tmp8_ = _data_->_data2_->io_error; 962 #line 123 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 963 if (_data_->_tmp8_ != NULL) { 964 #line 124 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 965 _data_->_tmp9_ = _data_->_data2_->io_error; 966 #line 124 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 967 _data_->_tmp10_ = _g_error_copy0 (_data_->_tmp9_); 968 #line 124 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 969 _data_->_inner_error_ = _data_->_tmp10_; 970 #line 124 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 971 if (((_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_data_->_inner_error_->domain == G_IO_ERROR)) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) { 972 #line 124 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 973 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 974 #line 124 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 975 g_error_free (_data_->_inner_error_); 976 #line 124 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 977 block2_data_unref (_data_->_data2_); 978 #line 124 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 979 _data_->_data2_ = NULL; 980 #line 124 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 981 block1_data_unref (_data_->_data1_); 982 #line 124 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 983 _data_->_data1_ = NULL; 984 #line 124 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 985 if (_data_->_state_ == 0) { 986 #line 124 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 987 g_simple_async_result_complete_in_idle (_data_->_async_result); 988 #line 989 "tracker-direct.c" 989 } else { 990 #line 124 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 991 g_simple_async_result_complete (_data_->_async_result); 992 #line 993 "tracker-direct.c" 993 } 994 #line 124 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 995 g_object_unref (_data_->_async_result); 996 #line 124 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 997 return FALSE; 998 #line 999 "tracker-direct.c" 999 } else { 1000 #line 124 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1001 block2_data_unref (_data_->_data2_); 1002 #line 124 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1003 _data_->_data2_ = NULL; 1004 #line 124 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1005 block1_data_unref (_data_->_data1_); 1006 #line 124 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1007 _data_->_data1_ = NULL; 1008 #line 124 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1009 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); 1010 #line 124 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1011 g_clear_error (&_data_->_inner_error_); 1012 #line 124 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1013 return FALSE; 1014 #line 1015 "tracker-direct.c" 1015 } 1016 } else { 1017 #line 125 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1018 _data_->_tmp11_ = _data_->_data2_->dbus_error; 1019 #line 125 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1020 if (_data_->_tmp11_ != NULL) { 1021 #line 126 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1022 _data_->_tmp12_ = _data_->_data2_->dbus_error; 1023 #line 126 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1024 _data_->_tmp13_ = _g_error_copy0 (_data_->_tmp12_); 1025 #line 126 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1026 _data_->_inner_error_ = _data_->_tmp13_; 1027 #line 126 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1028 if (((_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_data_->_inner_error_->domain == G_IO_ERROR)) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) { 1029 #line 126 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1030 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 1031 #line 126 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1032 g_error_free (_data_->_inner_error_); 1033 #line 126 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1034 block2_data_unref (_data_->_data2_); 1035 #line 126 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1036 _data_->_data2_ = NULL; 1037 #line 126 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1038 block1_data_unref (_data_->_data1_); 1039 #line 126 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1040 _data_->_data1_ = NULL; 1041 #line 126 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1042 if (_data_->_state_ == 0) { 1043 #line 126 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1044 g_simple_async_result_complete_in_idle (_data_->_async_result); 1045 #line 1046 "tracker-direct.c" 1046 } else { 1047 #line 126 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1048 g_simple_async_result_complete (_data_->_async_result); 1049 #line 1050 "tracker-direct.c" 1050 } 1051 #line 126 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1052 g_object_unref (_data_->_async_result); 1053 #line 126 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1054 return FALSE; 1055 #line 1056 "tracker-direct.c" 1056 } else { 1057 #line 126 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1058 block2_data_unref (_data_->_data2_); 1059 #line 126 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1060 _data_->_data2_ = NULL; 1061 #line 126 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1062 block1_data_unref (_data_->_data1_); 1063 #line 126 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1064 _data_->_data1_ = NULL; 1065 #line 126 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1066 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); 1067 #line 126 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1068 g_clear_error (&_data_->_inner_error_); 1069 #line 126 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1070 return FALSE; 1071 #line 1072 "tracker-direct.c" 1072 } 1073 } else { 1074 #line 128 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1075 _data_->_tmp14_ = _data_->_data2_->_result_; 1076 #line 128 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1077 _data_->_tmp15_ = _g_object_ref0 (_data_->_tmp14_); 1078 #line 128 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1079 _data_->result = _data_->_tmp15_; 1080 #line 128 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1081 block2_data_unref (_data_->_data2_); 1082 #line 128 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1083 _data_->_data2_ = NULL; 1084 #line 128 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1085 block1_data_unref (_data_->_data1_); 1086 #line 128 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1087 _data_->_data1_ = NULL; 1088 #line 128 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1089 if (_data_->_state_ == 0) { 1090 #line 128 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1091 g_simple_async_result_complete_in_idle (_data_->_async_result); 1092 #line 1093 "tracker-direct.c" 1093 } else { 1094 #line 128 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1095 g_simple_async_result_complete (_data_->_async_result); 1096 #line 1097 "tracker-direct.c" 1097 } 1098 #line 128 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1099 g_object_unref (_data_->_async_result); 1100 #line 128 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1101 return FALSE; 1102 #line 1103 "tracker-direct.c" 1103 } 1104 } 1105 } 1106 #line 91 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1107 block2_data_unref (_data_->_data2_); 1108 #line 91 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1109 _data_->_data2_ = NULL; 1110 #line 1111 "tracker-direct.c" 1111 } 1112 { 1113 #line 132 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1114 _data_->_tmp16_ = _data_->_data1_->sparql; 1115 #line 132 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1116 _data_->_tmp17_ = _data_->_data1_->cancellable; 1117 #line 132 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1118 _data_->_tmp18_ = NULL; 1119 #line 132 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1120 _data_->_tmp18_ = tracker_direct_connection_query_unlocked (_data_->self, _data_->_tmp16_, _data_->_tmp17_, &_data_->_inner_error_); 1121 #line 132 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1122 _data_->_tmp19_ = _data_->_tmp18_; 1123 #line 132 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1124 if (_data_->_inner_error_ != NULL) { 1125 #line 1126 "tracker-direct.c" 1126 goto __finally5; 1127 } 1128 #line 132 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1129 _data_->result = _data_->_tmp19_; 1130 #line 1131 "tracker-direct.c" 1131 { 1132 #line 134 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1133 tracker_db_manager_unlock (); 1134 #line 1135 "tracker-direct.c" 1135 } 1136 #line 132 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1137 block1_data_unref (_data_->_data1_); 1138 #line 132 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1139 _data_->_data1_ = NULL; 1140 #line 132 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1141 if (_data_->_state_ == 0) { 1142 #line 132 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1143 g_simple_async_result_complete_in_idle (_data_->_async_result); 1144 #line 1145 "tracker-direct.c" 1145 } else { 1146 #line 132 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1147 g_simple_async_result_complete (_data_->_async_result); 1148 #line 1149 "tracker-direct.c" 1149 } 1150 #line 132 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1151 g_object_unref (_data_->_async_result); 1152 #line 132 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1153 return FALSE; 1154 #line 1155 "tracker-direct.c" 1155 } 1156 __finally5: 1157 { 1158 #line 134 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1159 tracker_db_manager_unlock (); 1160 #line 1161 "tracker-direct.c" 1161 } 1162 #line 131 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1163 if (((_data_->_inner_error_->domain == TRACKER_SPARQL_ERROR) || (_data_->_inner_error_->domain == G_IO_ERROR)) || (_data_->_inner_error_->domain == G_DBUS_ERROR)) { 1164 #line 131 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1165 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 1166 #line 131 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1167 g_error_free (_data_->_inner_error_); 1168 #line 131 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1169 block1_data_unref (_data_->_data1_); 1170 #line 131 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1171 _data_->_data1_ = NULL; 1172 #line 131 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1173 if (_data_->_state_ == 0) { 1174 #line 131 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1175 g_simple_async_result_complete_in_idle (_data_->_async_result); 1176 #line 1177 "tracker-direct.c" 1177 } else { 1178 #line 131 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1179 g_simple_async_result_complete (_data_->_async_result); 1180 #line 1181 "tracker-direct.c" 1181 } 1182 #line 131 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1183 g_object_unref (_data_->_async_result); 1184 #line 131 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1185 return FALSE; 1186 #line 1187 "tracker-direct.c" 1187 } else { 1188 #line 131 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1189 block1_data_unref (_data_->_data1_); 1190 #line 131 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1191 _data_->_data1_ = NULL; 1192 #line 131 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1193 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); 1194 #line 131 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1195 g_clear_error (&_data_->_inner_error_); 1196 #line 131 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1197 return FALSE; 1198 #line 1199 "tracker-direct.c" 1199 } 1200 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1201 block1_data_unref (_data_->_data1_); 1202 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1203 _data_->_data1_ = NULL; 1204 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1205 if (_data_->_state_ == 0) { 1206 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1207 g_simple_async_result_complete_in_idle (_data_->_async_result); 1208 #line 1209 "tracker-direct.c" 1209 } else { 1210 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1211 g_simple_async_result_complete (_data_->_async_result); 1212 #line 1213 "tracker-direct.c" 1213 } 1214 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1215 g_object_unref (_data_->_async_result); 1216 #line 90 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1217 return FALSE; 1218 #line 1219 "tracker-direct.c" 1219 } 1220 1221 1222 static void tracker_direct_connection_class_init (TrackerDirectConnectionClass * klass) { 1223 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1224 tracker_direct_connection_parent_class = g_type_class_peek_parent (klass); 1225 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1226 g_type_class_add_private (klass, sizeof (TrackerDirectConnectionPrivate)); 1227 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1228 TRACKER_SPARQL_CONNECTION_CLASS (klass)->query = tracker_direct_connection_real_query; 1229 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1230 TRACKER_SPARQL_CONNECTION_CLASS (klass)->query_async = tracker_direct_connection_real_query_async; 1231 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1232 TRACKER_SPARQL_CONNECTION_CLASS (klass)->query_finish = tracker_direct_connection_real_query_finish; 1233 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1234 G_OBJECT_CLASS (klass)->finalize = tracker_direct_connection_finalize; 1235 #line 1236 "tracker-direct.c" 1236 } 1237 1238 1239 static void tracker_direct_connection_instance_init (TrackerDirectConnection * self) { 1240 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1241 self->priv = TRACKER_DIRECT_CONNECTION_GET_PRIVATE (self); 1242 #line 1243 "tracker-direct.c" 1243 } 1244 1245 1246 static void tracker_direct_connection_finalize (GObject* obj) { 1247 TrackerDirectConnection * self; 1248 gboolean _tmp0_; 1249 GError * _inner_error_ = NULL; 1250 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1251 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_DIRECT_TYPE_CONNECTION, TrackerDirectConnection); 1252 #line 49 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1253 _tmp0_ = self->priv->initialized; 1254 #line 49 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1255 if (!_tmp0_) { 1256 #line 1257 "tracker-direct.c" 1257 goto _return; 1258 } 1259 #line 55 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1260 tracker_db_manager_lock (); 1261 #line 1262 "tracker-direct.c" 1262 { 1263 gint _tmp1_; 1264 gint _tmp2_; 1265 #line 58 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1266 _tmp1_ = tracker_direct_connection_use_count; 1267 #line 58 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1268 tracker_direct_connection_use_count = _tmp1_ - 1; 1269 #line 60 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1270 _tmp2_ = tracker_direct_connection_use_count; 1271 #line 60 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1272 if (_tmp2_ == 0) { 1273 #line 61 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1274 tracker_data_manager_shutdown (); 1275 #line 1276 "tracker-direct.c" 1276 } 1277 } 1278 __finally0:
label '__finally0' defined but not used
(emitted by gcc)
1279 { 1280 #line 64 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1281 tracker_db_manager_unlock (); 1282 #line 1283 "tracker-direct.c" 1283 } 1284 #line 57 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1285 if (_inner_error_ != NULL) { 1286 #line 57 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1287 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); 1288 #line 57 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1289 g_clear_error (&_inner_error_); 1290 #line 1291 "tracker-direct.c" 1291 } 1292 _return: 1293 #line 20 "/home/martyn/Source/tracker/src/libtracker-direct/tracker-direct.vala" 1294 G_OBJECT_CLASS (tracker_direct_connection_parent_class)->finalize (obj); 1295 #line 1296 "tracker-direct.c" 1296 } 1297 1298 1299 GType tracker_direct_connection_get_type (void) { 1300 static volatile gsize tracker_direct_connection_type_id__volatile = 0; 1301 if (g_once_init_enter (&tracker_direct_connection_type_id__volatile)) { 1302 static const GTypeInfo g_define_type_info = { sizeof (TrackerDirectConnectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_direct_connection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerDirectConnection), 0, (GInstanceInitFunc) tracker_direct_connection_instance_init, NULL }; 1303 GType tracker_direct_connection_type_id; 1304 tracker_direct_connection_type_id = g_type_register_static (TRACKER_SPARQL_TYPE_CONNECTION, "TrackerDirectConnection", &g_define_type_info, 0); 1305 g_once_init_leave (&tracker_direct_connection_type_id__volatile, tracker_direct_connection_type_id); 1306 } 1307 return tracker_direct_connection_type_id__volatile; 1308 }