tracker-0.16.2/src/tracker-store/tracker-resources.c

Location Tool Test ID Function Issue
tracker-resources.c:495:28 gcc unused-but-set-variable tracker_resources_load_finish variable '_data_' set but not used
tracker-resources.c:503:2 clang-analyzer Value stored to '_data_' is never read
tracker-resources.c:806:21 gcc unused-but-set-variable ___lambda4_ variable 'self' set but not used
tracker-resources.c:809:2 clang-analyzer Value stored to 'self' is never read
tracker-resources.c:1213:36 gcc unused-but-set-variable tracker_resources_sparql_update_finish variable '_data_' set but not used
tracker-resources.c:1221:2 clang-analyzer Value stored to '_data_' is never read
tracker-resources.c:1756:41 gcc unused-but-set-variable tracker_resources_batch_sparql_update_finish variable '_data_' set but not used
tracker-resources.c:1764:2 clang-analyzer Value stored to '_data_' is never read
tracker-resources.c:1982:21 gcc unused-but-set-variable ___lambda5_ variable 'self' set but not used
tracker-resources.c:1989:2 clang-analyzer Value stored to 'self' is never read
tracker-resources.c:2014:21 gcc unused-but-set-variable ___lambda6_ variable 'self' set but not used
tracker-resources.c:2021:2 clang-analyzer Value stored to 'self' is never read
tracker-resources.c:2203:3 clang-analyzer Value stored to 'cl_collection_length1' is never read
tracker-resources.c:2427:3 clang-analyzer Value stored to 'cl_collection_length1' is never read
tracker-resources.c:3027:10 gcc unused-variable _dbus_tracker_resources_sync unused variable 'error'
tracker-resources.c:3080:10 gcc unused-variable _dbus_tracker_resources_batch_commit unused variable 'error'
tracker-resources.c:3124:11 gcc unused-but-set-variable tracker_resources_dbus_interface_get_property variable 'object' set but not used
tracker-resources.c:3126:2 clang-analyzer Value stored to 'object' is never read
tracker-resources.c:3133:11 gcc unused-but-set-variable tracker_resources_dbus_interface_set_property variable 'object' set but not used
tracker-resources.c:3135:2 clang-analyzer Value stored to 'object' is never read
   1 /* tracker-resources.c generated by valac 0.18.1, the Vala compiler
   2  * generated from tracker-resources.vala, do not modify */
   3 
   4 /*
   5  * Copyright (C) 2006, Jamie McCracken <jamiemcc@gnome.org>
   6  * Copyright (C) 2008-2011, Nokia <ivan.frade@nokia.com>
   7  *
   8  * This library is free software; you can redistribute it and/or
   9  * modify it under the terms of the GNU General Public
  10  * License as published by the Free Software Foundation; either
  11  * version 2 of the License, or (at your option) any later version.
  12  *
  13  * This library is distributed in the hope that it will be useful,
  14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16  * General Public License for more details.
  17  *
  18  * You should have received a copy of the GNU General Public
  19  * License along with this library; if not, write to the
  20  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  21  * Boston, MA  02110-1301, USA.
  22  */
  23 
  24 #include <glib.h>
  25 #include <glib-object.h>
  26 #include <gio/gio.h>
  27 #include <stdlib.h>
  28 #include <string.h>
  29 #include "libtracker-common/tracker-common.h"
  30 #include "libtracker-data/tracker-db-interface.h"
  31 #include "libtracker-sparql/tracker-sparql.h"
  32 #include "libtracker-data/tracker-data-query.h"
  33 #include "libtracker-data/tracker-data-update.h"
  34 #include "libtracker-data/tracker-data-backup.h"
  35 #include "libtracker-data/tracker-class.h"
  36 #include "tracker-store/tracker-events.h"
  37 #include "tracker-store/tracker-writeback.h"
  38 
  39 
  40 #define TRACKER_TYPE_RESOURCES (tracker_resources_get_type ())
  41 #define TRACKER_RESOURCES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_TYPE_RESOURCES, TrackerResources))
  42 #define TRACKER_RESOURCES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_RESOURCES, TrackerResourcesClass))
  43 #define TRACKER_IS_RESOURCES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_TYPE_RESOURCES))
  44 #define TRACKER_IS_RESOURCES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_RESOURCES))
  45 #define TRACKER_RESOURCES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_RESOURCES, TrackerResourcesClass))
  46 
  47 typedef struct _TrackerResources TrackerResources;
  48 typedef struct _TrackerResourcesClass TrackerResourcesClass;
  49 typedef struct _TrackerResourcesPrivate TrackerResourcesPrivate;
  50 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
  51 #define _g_free0(var) (var = (g_free (var), NULL))
  52 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
  53 typedef struct _TrackerResourcesLoadData TrackerResourcesLoadData;
  54 #define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
  55 typedef struct _Block3Data Block3Data;
  56 #define _g_variant_builder_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_builder_unref (var), NULL)))
  57 
  58 #define TRACKER_STORE_TYPE_PRIORITY (tracker_store_priority_get_type ())
  59 typedef struct _TrackerResourcesSparqlQueryData TrackerResourcesSparqlQueryData;
  60 typedef struct _TrackerResourcesSparqlUpdateData TrackerResourcesSparqlUpdateData;
  61 typedef struct _TrackerResourcesSparqlUpdateBlankData TrackerResourcesSparqlUpdateBlankData;
  62 typedef struct _TrackerResourcesBatchSparqlUpdateData TrackerResourcesBatchSparqlUpdateData;
  63 typedef struct _Block4Data Block4Data;
  64 #define _g_hash_table_unref0(var) ((var == NULL) ? NULL : (var = (g_hash_table_unref (var), NULL)))
  65 
  66 struct _TrackerResources {
  67 	GObject parent_instance;
  68 	TrackerResourcesPrivate * priv;
  69 };
  70 
  71 struct _TrackerResourcesClass {
  72 	GObjectClass parent_class;
  73 };
  74 
  75 struct _TrackerResourcesPrivate {
  76 	GDBusConnection* connection;
  77 	guint signal_timeout;
  78 	gboolean regular_commit_pending;
  79 };
  80 
  81 struct _TrackerResourcesLoadData {
  82 	int _state_;
  83 	GObject* _source_object_;
  84 	GAsyncResult* _res_;
  85 	GSimpleAsyncResult* _async_result;
  86 	TrackerResources* self;
  87 	char* sender;
  88 	gchar* uri;
  89 	const char* _tmp0_;
  90 	const gchar* _tmp1_;
  91 	TrackerDBusRequest* _tmp2_;
  92 	TrackerDBusRequest* request;
  93 	const gchar* _tmp3_;
  94 	GFile* _tmp4_;
  95 	GFile* file;
  96 	const char* _tmp5_;
  97 	GError* ie;
  98 	GError* _tmp6_;
  99 	const gchar* _tmp7_;
 100 	GError* _tmp8_;
 101 	GError* e;
 102 	GError* _tmp9_;
 103 	GError* _tmp10_;
 104 	GError* _tmp11_;
 105 	GError* _tmp12_;
 106 	GError* _tmp13_;
 107 	const gchar* _tmp14_;
 108 	GError* _tmp15_;
 109 	GError * _inner_error_;
 110 };
 111 
 112 struct _Block3Data {
 113 	int _ref_count_;
 114 	TrackerResources * self;
 115 	GVariantBuilder* builder;
 116 };
 117 
 118 typedef enum  {
 119 	TRACKER_STORE_PRIORITY_HIGH,
 120 	TRACKER_STORE_PRIORITY_LOW,
 121 	TRACKER_STORE_PRIORITY_TURTLE,
 122 	TRACKER_STORE_PRIORITY_N_PRIORITIES
 123 } TrackerStorePriority;
 124 
 125 typedef void (*TrackerStoreSparqlQueryInThread) (TrackerDBCursor* cursor, void* user_data, GError** error);
 126 struct _TrackerResourcesSparqlQueryData {
 127 	int _state_;
 128 	GObject* _source_object_;
 129 	GAsyncResult* _res_;
 130 	GSimpleAsyncResult* _async_result;
 131 	TrackerResources* self;
 132 	char* sender;
 133 	gchar* query;
 134 	GVariant* result;
 135 	const char* _tmp0_;
 136 	TrackerDBusRequest* _tmp1_;
 137 	TrackerDBusRequest* request;
 138 	TrackerDBusRequest* _tmp2_;
 139 	const gchar* _tmp3_;
 140 	Block3Data* _data3_;
 141 	GVariantBuilder* _tmp4_;
 142 	const gchar* _tmp5_;
 143 	const char* _tmp6_;
 144 	GVariantBuilder* _tmp7_;
 145 	GVariant* _tmp8_;
 146 	GVariant* _result_;
 147 	GVariant* _tmp9_;
 148 	gsize _tmp10_;
 149 	GError* _tmp11_;
 150 	TrackerDBusRequest* _tmp12_;
 151 	GError* e;
 152 	TrackerDBusRequest* _tmp13_;
 153 	GError* _tmp14_;
 154 	GError* _tmp15_;
 155 	GError* _tmp16_;
 156 	GError* _tmp17_;
 157 	GError* _tmp18_;
 158 	const gchar* _tmp19_;
 159 	GError* _tmp20_;
 160 	GError * _inner_error_;
 161 };
 162 
 163 struct _TrackerResourcesSparqlUpdateData {
 164 	int _state_;
 165 	GObject* _source_object_;
 166 	GAsyncResult* _res_;
 167 	GSimpleAsyncResult* _async_result;
 168 	TrackerResources* self;
 169 	char* sender;
 170 	gchar* update;
 171 	const char* _tmp0_;
 172 	TrackerDBusRequest* _tmp1_;
 173 	TrackerDBusRequest* request;
 174 	const gchar* _tmp2_;
 175 	const gchar* _tmp3_;
 176 	const char* _tmp4_;
 177 	GError* ie;
 178 	GError* _tmp5_;
 179 	const gchar* _tmp6_;
 180 	GError* _tmp7_;
 181 	GError* e;
 182 	GError* _tmp8_;
 183 	GError* _tmp9_;
 184 	GError* _tmp10_;
 185 	GError* _tmp11_;
 186 	GError* _tmp12_;
 187 	const gchar* _tmp13_;
 188 	GError* _tmp14_;
 189 	GError * _inner_error_;
 190 };
 191 
 192 struct _TrackerResourcesSparqlUpdateBlankData {
 193 	int _state_;
 194 	GObject* _source_object_;
 195 	GAsyncResult* _res_;
 196 	GSimpleAsyncResult* _async_result;
 197 	TrackerResources* self;
 198 	char* sender;
 199 	gchar* update;
 200 	GVariant* result;
 201 	const char* _tmp0_;
 202 	TrackerDBusRequest* _tmp1_;
 203 	TrackerDBusRequest* request;
 204 	TrackerDBusRequest* _tmp2_;
 205 	const gchar* _tmp3_;
 206 	const gchar* _tmp4_;
 207 	const char* _tmp5_;
 208 	GVariant* _tmp6_;
 209 	GVariant* variant;
 210 	TrackerDBusRequest* _tmp7_;
 211 	GError* ie;
 212 	GError* _tmp8_;
 213 	const gchar* _tmp9_;
 214 	GError* _tmp10_;
 215 	GError* e;
 216 	TrackerDBusRequest* _tmp11_;
 217 	GError* _tmp12_;
 218 	GError* _tmp13_;
 219 	GError* _tmp14_;
 220 	GError* _tmp15_;
 221 	GError* _tmp16_;
 222 	const gchar* _tmp17_;
 223 	GError* _tmp18_;
 224 	GError * _inner_error_;
 225 };
 226 
 227 struct _TrackerResourcesBatchSparqlUpdateData {
 228 	int _state_;
 229 	GObject* _source_object_;
 230 	GAsyncResult* _res_;
 231 	GSimpleAsyncResult* _async_result;
 232 	TrackerResources* self;
 233 	char* sender;
 234 	gchar* update;
 235 	const char* _tmp0_;
 236 	TrackerDBusRequest* _tmp1_;
 237 	TrackerDBusRequest* request;
 238 	const gchar* _tmp2_;
 239 	const gchar* _tmp3_;
 240 	const char* _tmp4_;
 241 	GError* ie;
 242 	GError* _tmp5_;
 243 	const gchar* _tmp6_;
 244 	GError* _tmp7_;
 245 	GError* e;
 246 	GError* _tmp8_;
 247 	GError* _tmp9_;
 248 	GError* _tmp10_;
 249 	GError* _tmp11_;
 250 	GError* _tmp12_;
 251 	const gchar* _tmp13_;
 252 	GError* _tmp14_;
 253 	GError * _inner_error_;
 254 };
 255 
 256 struct _Block4Data {
 257 	int _ref_count_;
 258 	TrackerResources * self;
 259 	GVariantBuilder* builder;
 260 };
 261 
 262 
 263 static gpointer tracker_resources_parent_class = NULL;
 264 
 265 GType tracker_resources_get_type (void) G_GNUC_CONST;
 266 guint tracker_resources_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
 267 #define TRACKER_RESOURCES_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TRACKER_TYPE_RESOURCES, TrackerResourcesPrivate))
 268 enum  {
 269 	TRACKER_RESOURCES_DUMMY_PROPERTY
 270 };
 271 void tracker_resources_disable_signals (TrackerResources* self);
 272 #define TRACKER_RESOURCES_PATH "/org/freedesktop/Tracker1/Resources"
 273 #define TRACKER_RESOURCES_GRAPH_UPDATED_IMMEDIATE_EMIT_AT 50000
 274 #define TRACKER_RESOURCES_SIGNALS_SECONDS_PER_EMIT 1
 275 #define TRACKER_RESOURCES_DBUS_ARBITRARY_MAX_MSG_SIZE 10000000
 276 TrackerResources* tracker_resources_new (GDBusConnection* connection);
 277 TrackerResources* tracker_resources_construct (GType object_type, GDBusConnection* connection);
 278 static void tracker_resources_load_data_free (gpointer _data);
 279 void tracker_resources_load (TrackerResources* self, const char* sender, const gchar* uri, GAsyncReadyCallback _callback_, gpointer _user_data_);
 280 void tracker_resources_load_finish (TrackerResources* self, GAsyncResult* _res_, GError** error);
 281 static gboolean tracker_resources_load_co (TrackerResourcesLoadData* _data_);
 282 void tracker_store_queue_turtle_import (GFile* file, const gchar* client_id, GAsyncReadyCallback _callback_, gpointer _user_data_);
 283 void tracker_store_queue_turtle_import_finish (GAsyncResult* _res_, GError** error);
 284 static void tracker_resources_load_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 285 static void tracker_resources_sparql_query_data_free (gpointer _data);
 286 void tracker_resources_sparql_query (TrackerResources* self, const char* sender, const gchar* query, GAsyncReadyCallback _callback_, gpointer _user_data_);
 287 GVariant* tracker_resources_sparql_query_finish (TrackerResources* self, GAsyncResult* _res_, GError** error);
 288 static gboolean tracker_resources_sparql_query_co (TrackerResourcesSparqlQueryData* _data_);
 289 static Block3Data* block3_data_ref (Block3Data* _data3_);
 290 static void block3_data_unref (void * _userdata_);
 291 GType tracker_store_priority_get_type (void) G_GNUC_CONST;
 292 void tracker_store_sparql_query (const gchar* sparql, TrackerStorePriority priority, TrackerStoreSparqlQueryInThread in_thread, void* in_thread_target, const gchar* client_id, GAsyncReadyCallback _callback_, gpointer _user_data_);
 293 void tracker_store_sparql_query_finish (GAsyncResult* _res_, GError** error);
 294 static void ___lambda4_ (Block3Data* _data3_, TrackerDBCursor* cursor, GError** error);
 295 static void ____lambda4__tracker_store_sparql_query_in_thread (TrackerDBCursor* cursor, gpointer self, GError** error);
 296 static void tracker_resources_sparql_query_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 297 static void tracker_resources_sparql_update_data_free (gpointer _data);
 298 void tracker_resources_sparql_update (TrackerResources* self, const char* sender, const gchar* update, GAsyncReadyCallback _callback_, gpointer _user_data_);
 299 void tracker_resources_sparql_update_finish (TrackerResources* self, GAsyncResult* _res_, GError** error);
 300 static gboolean tracker_resources_sparql_update_co (TrackerResourcesSparqlUpdateData* _data_);
 301 void tracker_store_sparql_update (const gchar* sparql, TrackerStorePriority priority, const gchar* client_id, GAsyncReadyCallback _callback_, gpointer _user_data_);
 302 void tracker_store_sparql_update_finish (GAsyncResult* _res_, GError** error);
 303 static void tracker_resources_sparql_update_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 304 static void tracker_resources_sparql_update_blank_data_free (gpointer _data);
 305 void tracker_resources_sparql_update_blank (TrackerResources* self, const char* sender, const gchar* update, GAsyncReadyCallback _callback_, gpointer _user_data_);
 306 GVariant* tracker_resources_sparql_update_blank_finish (TrackerResources* self, GAsyncResult* _res_, GError** error);
 307 static gboolean tracker_resources_sparql_update_blank_co (TrackerResourcesSparqlUpdateBlankData* _data_);
 308 void tracker_store_sparql_update_blank (const gchar* sparql, TrackerStorePriority priority, const gchar* client_id, GAsyncReadyCallback _callback_, gpointer _user_data_);
 309 GVariant* tracker_store_sparql_update_blank_finish (GAsyncResult* _res_, GError** error);
 310 static void tracker_resources_sparql_update_blank_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 311 void tracker_resources_sync (TrackerResources* self, const char* sender);
 312 void tracker_store_wal_checkpoint (void);
 313 static void tracker_resources_batch_sparql_update_data_free (gpointer _data);
 314 void tracker_resources_batch_sparql_update (TrackerResources* self, const char* sender, const gchar* update, GAsyncReadyCallback _callback_, gpointer _user_data_);
 315 void tracker_resources_batch_sparql_update_finish (TrackerResources* self, GAsyncResult* _res_, GError** error);
 316 static gboolean tracker_resources_batch_sparql_update_co (TrackerResourcesBatchSparqlUpdateData* _data_);
 317 static void tracker_resources_batch_sparql_update_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_);
 318 void tracker_resources_batch_commit (TrackerResources* self);
 319 static gboolean tracker_resources_emit_graph_updated (TrackerResources* self, TrackerClass* cl);
 320 static Block4Data* block4_data_ref (Block4Data* _data4_);
 321 static void block4_data_unref (void * _userdata_);
 322 static void ___lambda5_ (Block4Data* _data4_, gint graph_id, gint subject_id, gint pred_id, gint object_id);
 323 static void ____lambda5__tracker_events_foreach (gint graph_id, gint subject_id, gint pred_id, gint object_id, gpointer self);
 324 static void ___lambda6_ (Block4Data* _data4_, gint graph_id, gint subject_id, gint pred_id, gint object_id);
 325 static void ____lambda6__tracker_events_foreach (gint graph_id, gint subject_id, gint pred_id, gint object_id, gpointer self);
 326 static gboolean tracker_resources_on_emit_signals (TrackerResources* self);
 327 static void tracker_resources_on_statements_committed (TrackerResources* self, TrackerDataCommitType commit_type);
 328 static gboolean _tracker_resources_on_emit_signals_gsource_func (gpointer self);
 329 static void tracker_resources_on_statements_rolled_back (TrackerResources* self, TrackerDataCommitType commit_type);
 330 static void tracker_resources_check_graph_updated_signal (TrackerResources* self);
 331 static void tracker_resources_on_statement_inserted (TrackerResources* self, gint graph_id, const gchar* graph, gint subject_id, const gchar* subject, gint pred_id, gint object_id, const gchar* object, GPtrArray* rdf_types);
 332 static void tracker_resources_on_statement_deleted (TrackerResources* self, gint graph_id, const gchar* graph, gint subject_id, const gchar* subject, gint pred_id, gint object_id, const gchar* object, GPtrArray* rdf_types);
 333 void tracker_resources_enable_signals (TrackerResources* self);
 334 static void _tracker_resources_on_statement_inserted_tracker_statement_callback (gint graph_id, const gchar* graph, gint subject_id, const gchar* subject, gint predicate_id, gint object_id, const gchar* object, GPtrArray* rdf_types, gpointer self);
 335 static void _tracker_resources_on_statement_deleted_tracker_statement_callback (gint graph_id, const gchar* graph, gint subject_id, const gchar* subject, gint predicate_id, gint object_id, const gchar* object, GPtrArray* rdf_types, gpointer self);
 336 static void _tracker_resources_on_statements_committed_tracker_commit_callback (TrackerDataCommitType commit_type, gpointer self);
 337 static void _tracker_resources_on_statements_rolled_back_tracker_commit_callback (TrackerDataCommitType commit_type, gpointer self);
 338 void tracker_resources_unreg_batches (TrackerResources* self, const gchar* old_owner);
 339 void tracker_store_unreg_batches (const gchar* client_id);
 340 static void g_cclosure_user_marshal_VOID__VARIANT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
 341 static void g_cclosure_user_marshal_VOID__STRING_VARIANT_VARIANT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data);
 342 static void tracker_resources_finalize (GObject* obj);
 343 static void _dbus_tracker_resources_load (TrackerResources* self, GVariant* parameters, GDBusMethodInvocation* invocation);
 344 static void _dbus_tracker_resources_load_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
 345 static void _dbus_tracker_resources_sparql_query (TrackerResources* self, GVariant* parameters, GDBusMethodInvocation* invocation);
 346 static void _dbus_tracker_resources_sparql_query_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
 347 static void _dbus_tracker_resources_sparql_update (TrackerResources* self, GVariant* parameters, GDBusMethodInvocation* invocation);
 348 static void _dbus_tracker_resources_sparql_update_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
 349 static void _dbus_tracker_resources_sparql_update_blank (TrackerResources* self, GVariant* parameters, GDBusMethodInvocation* invocation);
 350 static void _dbus_tracker_resources_sparql_update_blank_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
 351 static void _dbus_tracker_resources_sync (TrackerResources* self, GVariant* parameters, GDBusMethodInvocation* invocation);
 352 static void _dbus_tracker_resources_batch_sparql_update (TrackerResources* self, GVariant* parameters, GDBusMethodInvocation* invocation);
 353 static void _dbus_tracker_resources_batch_sparql_update_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_);
 354 static void _dbus_tracker_resources_batch_commit (TrackerResources* self, GVariant* parameters, GDBusMethodInvocation* invocation);
 355 static void tracker_resources_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data);
 356 static GVariant* tracker_resources_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data);
 357 static gboolean tracker_resources_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data);
 358 static void _dbus_tracker_resources_writeback (GObject* _sender, GVariant* subjects, gpointer* _data);
 359 static void _dbus_tracker_resources_graph_updated (GObject* _sender, const gchar* classname, GVariant* deletes, GVariant* inserts, gpointer* _data);
 360 static void _tracker_resources_unregister_object (gpointer user_data);
 361 
 362 static const GDBusArgInfo _tracker_resources_dbus_arg_info_load_uri = {-1, "uri", "s"};
 363 static const GDBusArgInfo * const _tracker_resources_dbus_arg_info_load_in[] = {&_tracker_resources_dbus_arg_info_load_uri, NULL};
 364 static const GDBusArgInfo * const _tracker_resources_dbus_arg_info_load_out[] = {NULL};
 365 static const GDBusMethodInfo _tracker_resources_dbus_method_info_load = {-1, "Load", (GDBusArgInfo **) (&_tracker_resources_dbus_arg_info_load_in), (GDBusArgInfo **) (&_tracker_resources_dbus_arg_info_load_out)};
 366 static const GDBusArgInfo _tracker_resources_dbus_arg_info_sparql_query_query = {-1, "query", "s"};
 367 static const GDBusArgInfo _tracker_resources_dbus_arg_info_sparql_query_result = {-1, "result", "aas"};
 368 static const GDBusArgInfo * const _tracker_resources_dbus_arg_info_sparql_query_in[] = {&_tracker_resources_dbus_arg_info_sparql_query_query, NULL};
 369 static const GDBusArgInfo * const _tracker_resources_dbus_arg_info_sparql_query_out[] = {&_tracker_resources_dbus_arg_info_sparql_query_result, NULL};
 370 static const GDBusMethodInfo _tracker_resources_dbus_method_info_sparql_query = {-1, "SparqlQuery", (GDBusArgInfo **) (&_tracker_resources_dbus_arg_info_sparql_query_in), (GDBusArgInfo **) (&_tracker_resources_dbus_arg_info_sparql_query_out)};
 371 static const GDBusArgInfo _tracker_resources_dbus_arg_info_sparql_update_update = {-1, "update", "s"};
 372 static const GDBusArgInfo * const _tracker_resources_dbus_arg_info_sparql_update_in[] = {&_tracker_resources_dbus_arg_info_sparql_update_update, NULL};
 373 static const GDBusArgInfo * const _tracker_resources_dbus_arg_info_sparql_update_out[] = {NULL};
 374 static const GDBusMethodInfo _tracker_resources_dbus_method_info_sparql_update = {-1, "SparqlUpdate", (GDBusArgInfo **) (&_tracker_resources_dbus_arg_info_sparql_update_in), (GDBusArgInfo **) (&_tracker_resources_dbus_arg_info_sparql_update_out)};
 375 static const GDBusArgInfo _tracker_resources_dbus_arg_info_sparql_update_blank_update = {-1, "update", "s"};
 376 static const GDBusArgInfo _tracker_resources_dbus_arg_info_sparql_update_blank_result = {-1, "result", "aaa{ss}"};
 377 static const GDBusArgInfo * const _tracker_resources_dbus_arg_info_sparql_update_blank_in[] = {&_tracker_resources_dbus_arg_info_sparql_update_blank_update, NULL};
 378 static const GDBusArgInfo * const _tracker_resources_dbus_arg_info_sparql_update_blank_out[] = {&_tracker_resources_dbus_arg_info_sparql_update_blank_result, NULL};
 379 static const GDBusMethodInfo _tracker_resources_dbus_method_info_sparql_update_blank = {-1, "SparqlUpdateBlank", (GDBusArgInfo **) (&_tracker_resources_dbus_arg_info_sparql_update_blank_in), (GDBusArgInfo **) (&_tracker_resources_dbus_arg_info_sparql_update_blank_out)};
 380 static const GDBusArgInfo * const _tracker_resources_dbus_arg_info_sync_in[] = {NULL};
 381 static const GDBusArgInfo * const _tracker_resources_dbus_arg_info_sync_out[] = {NULL};
 382 static const GDBusMethodInfo _tracker_resources_dbus_method_info_sync = {-1, "Sync", (GDBusArgInfo **) (&_tracker_resources_dbus_arg_info_sync_in), (GDBusArgInfo **) (&_tracker_resources_dbus_arg_info_sync_out)};
 383 static const GDBusArgInfo _tracker_resources_dbus_arg_info_batch_sparql_update_update = {-1, "update", "s"};
 384 static const GDBusArgInfo * const _tracker_resources_dbus_arg_info_batch_sparql_update_in[] = {&_tracker_resources_dbus_arg_info_batch_sparql_update_update, NULL};
 385 static const GDBusArgInfo * const _tracker_resources_dbus_arg_info_batch_sparql_update_out[] = {NULL};
 386 static const GDBusMethodInfo _tracker_resources_dbus_method_info_batch_sparql_update = {-1, "BatchSparqlUpdate", (GDBusArgInfo **) (&_tracker_resources_dbus_arg_info_batch_sparql_update_in), (GDBusArgInfo **) (&_tracker_resources_dbus_arg_info_batch_sparql_update_out)};
 387 static const GDBusArgInfo * const _tracker_resources_dbus_arg_info_batch_commit_in[] = {NULL};
 388 static const GDBusArgInfo * const _tracker_resources_dbus_arg_info_batch_commit_out[] = {NULL};
 389 static const GDBusMethodInfo _tracker_resources_dbus_method_info_batch_commit = {-1, "BatchCommit", (GDBusArgInfo **) (&_tracker_resources_dbus_arg_info_batch_commit_in), (GDBusArgInfo **) (&_tracker_resources_dbus_arg_info_batch_commit_out)};
 390 static const GDBusMethodInfo * const _tracker_resources_dbus_method_info[] = {&_tracker_resources_dbus_method_info_load, &_tracker_resources_dbus_method_info_sparql_query, &_tracker_resources_dbus_method_info_sparql_update, &_tracker_resources_dbus_method_info_sparql_update_blank, &_tracker_resources_dbus_method_info_sync, &_tracker_resources_dbus_method_info_batch_sparql_update, &_tracker_resources_dbus_method_info_batch_commit, NULL};
 391 static const GDBusArgInfo _tracker_resources_dbus_arg_info_writeback_subjects = {-1, "subjects", "a{iai}"};
 392 static const GDBusArgInfo * const _tracker_resources_dbus_arg_info_writeback[] = {&_tracker_resources_dbus_arg_info_writeback_subjects, NULL};
 393 static const GDBusSignalInfo _tracker_resources_dbus_signal_info_writeback = {-1, "Writeback", (GDBusArgInfo **) (&_tracker_resources_dbus_arg_info_writeback)};
 394 static const GDBusArgInfo _tracker_resources_dbus_arg_info_graph_updated_classname = {-1, "classname", "s"};
 395 static const GDBusArgInfo _tracker_resources_dbus_arg_info_graph_updated_deletes = {-1, "deletes", "a(iiii)"};
 396 static const GDBusArgInfo _tracker_resources_dbus_arg_info_graph_updated_inserts = {-1, "inserts", "a(iiii)"};
 397 static const GDBusArgInfo * const _tracker_resources_dbus_arg_info_graph_updated[] = {&_tracker_resources_dbus_arg_info_graph_updated_classname, &_tracker_resources_dbus_arg_info_graph_updated_deletes, &_tracker_resources_dbus_arg_info_graph_updated_inserts, NULL};
 398 static const GDBusSignalInfo _tracker_resources_dbus_signal_info_graph_updated = {-1, "GraphUpdated", (GDBusArgInfo **) (&_tracker_resources_dbus_arg_info_graph_updated)};
 399 static const GDBusSignalInfo * const _tracker_resources_dbus_signal_info[] = {&_tracker_resources_dbus_signal_info_writeback, &_tracker_resources_dbus_signal_info_graph_updated, NULL};
 400 static const GDBusPropertyInfo * const _tracker_resources_dbus_property_info[] = {NULL};
 401 static const GDBusInterfaceInfo _tracker_resources_dbus_interface_info = {-1, "org.freedesktop.Tracker1.Resources", (GDBusMethodInfo **) (&_tracker_resources_dbus_method_info), (GDBusSignalInfo **) (&_tracker_resources_dbus_signal_info), (GDBusPropertyInfo **) (&_tracker_resources_dbus_property_info)};
 402 static const GDBusInterfaceVTable _tracker_resources_dbus_interface_vtable = {tracker_resources_dbus_interface_method_call, tracker_resources_dbus_interface_get_property, tracker_resources_dbus_interface_set_property};
 403 
 404 static gpointer _g_object_ref0 (gpointer self) {
 405 #line 61 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 406 	return self ? g_object_ref (self) : NULL;
 407 #line 408 "tracker-resources.c"
 408 }
 409 
 410 
 411 TrackerResources* tracker_resources_construct (GType object_type, GDBusConnection* connection) {
 412 	TrackerResources * self = NULL;
 413 	GDBusConnection* _tmp0_;
 414 	GDBusConnection* _tmp1_;
 415 #line 60 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 416 	g_return_val_if_fail (connection != NULL, NULL);
 417 #line 60 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 418 	self = (TrackerResources*) g_object_new (object_type, NULL);
 419 #line 61 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 420 	_tmp0_ = connection;
 421 #line 61 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 422 	_tmp1_ = _g_object_ref0 (_tmp0_);
 423 #line 61 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 424 	_g_object_unref0 (self->priv->connection);
 425 #line 61 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 426 	self->priv->connection = _tmp1_;
 427 #line 60 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 428 	return self;
 429 #line 430 "tracker-resources.c"
 430 }
 431 
 432 
 433 TrackerResources* tracker_resources_new (GDBusConnection* connection) {
 434 #line 60 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 435 	return tracker_resources_construct (TRACKER_TYPE_RESOURCES, connection);
 436 #line 437 "tracker-resources.c"
 437 }
 438 
 439 
 440 static void tracker_resources_load_data_free (gpointer _data) {
 441 	TrackerResourcesLoadData* _data_;
 442 	_data_ = _data;
 443 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 444 	_g_free0 (_data_->sender);
 445 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 446 	_g_free0 (_data_->uri);
 447 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 448 	_g_object_unref0 (_data_->self);
 449 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 450 	g_slice_free (TrackerResourcesLoadData, _data_);
 451 #line 452 "tracker-resources.c"
 452 }
 453 
 454 
 455 void tracker_resources_load (TrackerResources* self, const char* sender, const gchar* uri, GAsyncReadyCallback _callback_, gpointer _user_data_) {
 456 	TrackerResourcesLoadData* _data_;
 457 	TrackerResources* _tmp0_;
 458 	const char* _tmp1_;
 459 	char* _tmp2_;
 460 	const gchar* _tmp3_;
 461 	gchar* _tmp4_;
 462 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 463 	_data_ = g_slice_new0 (TrackerResourcesLoadData);
 464 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 465 	_data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, tracker_resources_load);
 466 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 467 	g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_resources_load_data_free);
 468 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 469 	_tmp0_ = _g_object_ref0 (self);
 470 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 471 	_data_->self = _tmp0_;
 472 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 473 	_tmp1_ = sender;
 474 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 475 	_tmp2_ = g_strdup (_tmp1_);
 476 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 477 	_g_free0 (_data_->sender);
 478 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 479 	_data_->sender = _tmp2_;
 480 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 481 	_tmp3_ = uri;
 482 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 483 	_tmp4_ = g_strdup (_tmp3_);
 484 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 485 	_g_free0 (_data_->uri);
 486 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 487 	_data_->uri = _tmp4_;
 488 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala"
 489 	tracker_resources_load_co (_data_);
 490 #line 491 "tracker-resources.c"
 491 }
 492 
 493 
 494 void tracker_resources_load_finish (TrackerResources* self, GAsyncResult* _res_, GError** error) {
 495 	TrackerResourcesLoadData* _data_;
variable '_data_' set but not used
(emitted by gcc)
496 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 497 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) { 498 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 499 return; 500 #line 501 "tracker-resources.c" 501 } 502 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 503 _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)

504 #line 505 "tracker-resources.c" 505 } 506 507 508 static void tracker_resources_load_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) { 509 TrackerResourcesLoadData* _data_; 510 #line 69 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 511 _data_ = _user_data_; 512 #line 69 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 513 _data_->_source_object_ = source_object; 514 #line 69 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 515 _data_->_res_ = _res_; 516 #line 69 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 517 tracker_resources_load_co (_data_); 518 #line 519 "tracker-resources.c" 519 } 520 521 522 static gpointer _g_error_copy0 (gpointer self) { 523 #line 77 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 524 return self ? g_error_copy (self) : NULL; 525 #line 526 "tracker-resources.c" 526 } 527 528 529 static gboolean tracker_resources_load_co (TrackerResourcesLoadData* _data_) { 530 #line 64 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 531 switch (_data_->_state_) { 532 #line 64 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 533 case 0: 534 #line 535 "tracker-resources.c" 535 goto _state_0; 536 #line 64 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 537 case 1: 538 #line 539 "tracker-resources.c" 539 goto _state_1; 540 default: 541 #line 64 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 542 g_assert_not_reached (); 543 #line 544 "tracker-resources.c" 544 } 545 _state_0: 546 #line 65 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 547 _data_->_tmp0_ = _data_->sender; 548 #line 65 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 549 _data_->_tmp1_ = _data_->uri; 550 #line 65 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 551 _data_->_tmp2_ = NULL; 552 #line 65 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 553 _data_->_tmp2_ = tracker_dbus_request_begin ((const gchar*) _data_->_tmp0_, "Resources.Load (uri: '%s')", _data_->_tmp1_, NULL); 554 #line 65 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 555 _data_->request = _data_->_tmp2_; 556 #line 557 "tracker-resources.c" 557 { 558 #line 67 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 559 _data_->_tmp3_ = _data_->uri; 560 #line 67 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 561 _data_->_tmp4_ = NULL; 562 #line 67 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 563 _data_->_tmp4_ = g_file_new_for_uri (_data_->_tmp3_); 564 #line 67 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 565 _data_->file = _data_->_tmp4_; 566 #line 69 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 567 _data_->_tmp5_ = _data_->sender; 568 #line 69 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 569 _data_->_state_ = 1; 570 #line 69 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 571 tracker_store_queue_turtle_import (_data_->file, (const gchar*) _data_->_tmp5_, tracker_resources_load_ready, _data_); 572 #line 69 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 573 return FALSE; 574 #line 575 "tracker-resources.c" 575 _state_1: 576 #line 69 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 577 tracker_store_queue_turtle_import_finish (_data_->_res_, &_data_->_inner_error_); 578 #line 69 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 579 if (_data_->_inner_error_ != NULL) { 580 #line 69 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 581 _g_object_unref0 (_data_->file); 582 #line 69 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 583 if (g_error_matches (_data_->_inner_error_, TRACKER_DB_INTERFACE_ERROR, TRACKER_DB_NO_SPACE)) { 584 #line 585 "tracker-resources.c" 585 goto __catch8_tracker_db_no_space; 586 } 587 goto __catch8_g_error; 588 } 589 #line 71 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 590 tracker_dbus_request_end (_data_->request, NULL); 591 #line 66 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 592 _g_object_unref0 (_data_->file); 593 #line 594 "tracker-resources.c" 594 } 595 goto __finally8; 596 __catch8_tracker_db_no_space: 597 { 598 #line 66 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 599 _data_->ie = _data_->_inner_error_; 600 #line 66 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 601 _data_->_inner_error_ = NULL; 602 #line 73 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 603 _data_->_tmp6_ = _data_->ie; 604 #line 73 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 605 _data_->_tmp7_ = _data_->_tmp6_->message; 606 #line 73 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 607 _data_->_tmp8_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_NO_SPACE, _data_->_tmp7_); 608 #line 73 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 609 _data_->_inner_error_ = _data_->_tmp8_; 610 #line 73 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 611 _g_error_free0 (_data_->ie); 612 #line 613 "tracker-resources.c" 613 goto __finally8; 614 } 615 goto __finally8; 616 __catch8_g_error: 617 { 618 #line 66 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 619 _data_->e = _data_->_inner_error_; 620 #line 66 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 621 _data_->_inner_error_ = NULL; 622 #line 75 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 623 _data_->_tmp9_ = _data_->e; 624 #line 75 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 625 tracker_dbus_request_end (_data_->request, _data_->_tmp9_); 626 #line 76 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 627 _data_->_tmp10_ = _data_->e; 628 #line 76 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 629 if (_data_->_tmp10_->domain == TRACKER_SPARQL_ERROR) { 630 #line 77 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 631 _data_->_tmp11_ = _data_->e; 632 #line 77 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 633 _data_->_tmp12_ = _g_error_copy0 (_data_->_tmp11_); 634 #line 77 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 635 _data_->_inner_error_ = _data_->_tmp12_; 636 #line 77 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 637 _g_error_free0 (_data_->e); 638 #line 639 "tracker-resources.c" 639 goto __finally8; 640 } else { 641 #line 79 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 642 _data_->_tmp13_ = _data_->e; 643 #line 79 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 644 _data_->_tmp14_ = _data_->_tmp13_->message; 645 #line 79 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 646 _data_->_tmp15_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_INTERNAL, _data_->_tmp14_); 647 #line 79 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 648 _data_->_inner_error_ = _data_->_tmp15_; 649 #line 79 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 650 _g_error_free0 (_data_->e); 651 #line 652 "tracker-resources.c" 652 goto __finally8; 653 } 654 #line 66 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 655 _g_error_free0 (_data_->e); 656 #line 657 "tracker-resources.c" 657 } 658 __finally8: 659 #line 66 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 660 if (_data_->_inner_error_ != NULL) { 661 #line 66 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 662 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 663 #line 66 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 664 g_error_free (_data_->_inner_error_); 665 #line 66 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 666 if (_data_->_state_ == 0) { 667 #line 66 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 668 g_simple_async_result_complete_in_idle (_data_->_async_result); 669 #line 670 "tracker-resources.c" 670 } else { 671 #line 66 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 672 g_simple_async_result_complete (_data_->_async_result); 673 #line 674 "tracker-resources.c" 674 } 675 #line 66 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 676 g_object_unref (_data_->_async_result); 677 #line 66 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 678 return FALSE; 679 #line 680 "tracker-resources.c" 680 } 681 #line 64 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 682 if (_data_->_state_ == 0) { 683 #line 64 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 684 g_simple_async_result_complete_in_idle (_data_->_async_result); 685 #line 686 "tracker-resources.c" 686 } else { 687 #line 64 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 688 g_simple_async_result_complete (_data_->_async_result); 689 #line 690 "tracker-resources.c" 690 } 691 #line 64 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 692 g_object_unref (_data_->_async_result); 693 #line 64 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 694 return FALSE; 695 #line 696 "tracker-resources.c" 696 } 697 698 699 static void tracker_resources_sparql_query_data_free (gpointer _data) { 700 TrackerResourcesSparqlQueryData* _data_; 701 _data_ = _data; 702 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 703 _g_free0 (_data_->sender); 704 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 705 _g_free0 (_data_->query); 706 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 707 _g_variant_unref0 (_data_->result); 708 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 709 _g_object_unref0 (_data_->self); 710 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 711 g_slice_free (TrackerResourcesSparqlQueryData, _data_); 712 #line 713 "tracker-resources.c" 713 } 714 715 716 void tracker_resources_sparql_query (TrackerResources* self, const char* sender, const gchar* query, GAsyncReadyCallback _callback_, gpointer _user_data_) { 717 TrackerResourcesSparqlQueryData* _data_; 718 TrackerResources* _tmp0_; 719 const char* _tmp1_; 720 char* _tmp2_; 721 const gchar* _tmp3_; 722 gchar* _tmp4_; 723 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 724 _data_ = g_slice_new0 (TrackerResourcesSparqlQueryData); 725 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 726 _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, tracker_resources_sparql_query); 727 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 728 g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_resources_sparql_query_data_free); 729 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 730 _tmp0_ = _g_object_ref0 (self); 731 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 732 _data_->self = _tmp0_; 733 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 734 _tmp1_ = sender; 735 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 736 _tmp2_ = g_strdup (_tmp1_); 737 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 738 _g_free0 (_data_->sender); 739 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 740 _data_->sender = _tmp2_; 741 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 742 _tmp3_ = query; 743 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 744 _tmp4_ = g_strdup (_tmp3_); 745 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 746 _g_free0 (_data_->query); 747 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 748 _data_->query = _tmp4_; 749 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 750 tracker_resources_sparql_query_co (_data_); 751 #line 752 "tracker-resources.c" 752 } 753 754 755 GVariant* tracker_resources_sparql_query_finish (TrackerResources* self, GAsyncResult* _res_, GError** error) { 756 GVariant* result; 757 TrackerResourcesSparqlQueryData* _data_; 758 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 759 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) { 760 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 761 return NULL; 762 #line 763 "tracker-resources.c" 763 } 764 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 765 _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_)); 766 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 767 result = _data_->result; 768 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 769 _data_->result = NULL; 770 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 771 return result; 772 #line 773 "tracker-resources.c" 773 } 774 775 776 static Block3Data* block3_data_ref (Block3Data* _data3_) { 777 #line 88 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 778 g_atomic_int_inc (&_data3_->_ref_count_); 779 #line 88 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 780 return _data3_; 781 #line 782 "tracker-resources.c" 782 } 783 784 785 static void block3_data_unref (void * _userdata_) { 786 Block3Data* _data3_; 787 _data3_ = (Block3Data*) _userdata_; 788 #line 88 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 789 if (g_atomic_int_dec_and_test (&_data3_->_ref_count_)) { 790 #line 791 "tracker-resources.c" 791 TrackerResources * self; 792 #line 88 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 793 self = _data3_->self; 794 #line 88 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 795 _g_variant_builder_unref0 (_data3_->builder); 796 #line 88 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 797 _g_object_unref0 (self); 798 #line 88 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 799 g_slice_free (Block3Data, _data3_); 800 #line 801 "tracker-resources.c" 801 } 802 } 803 804 805 static void ___lambda4_ (Block3Data* _data3_, TrackerDBCursor* cursor, GError** error) { 806 TrackerResources * self;
variable 'self' set but not used
(emitted by gcc)
807 GError * _inner_error_ = NULL; 808 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 809 self = _data3_->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)

810 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 811 g_return_if_fail (cursor != NULL); 812 #line 92 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 813 while (TRUE) { 814 #line 815 "tracker-resources.c" 815 TrackerDBCursor* _tmp0_; 816 gboolean _tmp1_ = FALSE; 817 gboolean _tmp2_; 818 GVariantBuilder* _tmp3_; 819 GVariantBuilder* _tmp17_; 820 #line 92 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 821 _tmp0_ = cursor; 822 #line 92 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 823 _tmp1_ = tracker_sparql_cursor_next ((TrackerSparqlCursor*) _tmp0_, NULL, &_inner_error_); 824 #line 92 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 825 _tmp2_ = _tmp1_; 826 #line 92 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 827 if (_inner_error_ != NULL) { 828 #line 92 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 829 g_propagate_error (error, _inner_error_); 830 #line 92 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 831 return; 832 #line 833 "tracker-resources.c" 833 } 834 #line 92 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 835 if (!_tmp2_) { 836 #line 92 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 837 break; 838 #line 839 "tracker-resources.c" 839 } 840 #line 93 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 841 _tmp3_ = _data3_->builder; 842 #line 93 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 843 g_variant_builder_open (_tmp3_, (const GVariantType*) "as"); 844 #line 845 "tracker-resources.c" 845 { 846 gint i; 847 #line 95 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 848 i = 0; 849 #line 850 "tracker-resources.c" 850 { 851 gboolean _tmp4_; 852 #line 95 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 853 _tmp4_ = TRUE; 854 #line 95 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 855 while (TRUE) { 856 #line 857 "tracker-resources.c" 857 gboolean _tmp5_; 858 gint _tmp7_; 859 TrackerDBCursor* _tmp8_; 860 gint _tmp9_; 861 gint _tmp10_; 862 TrackerDBCursor* _tmp11_; 863 gint _tmp12_; 864 const gchar* _tmp13_ = NULL; 865 const gchar* str; 866 const gchar* _tmp14_; 867 GVariantBuilder* _tmp15_; 868 const gchar* _tmp16_; 869 #line 95 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 870 _tmp5_ = _tmp4_; 871 #line 95 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 872 if (!_tmp5_) { 873 #line 874 "tracker-resources.c" 874 gint _tmp6_; 875 #line 95 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 876 _tmp6_ = i; 877 #line 95 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 878 i = _tmp6_ + 1; 879 #line 880 "tracker-resources.c" 880 } 881 #line 95 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 882 _tmp4_ = FALSE; 883 #line 95 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 884 _tmp7_ = i; 885 #line 95 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 886 _tmp8_ = cursor; 887 #line 95 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 888 _tmp9_ = tracker_sparql_cursor_get_n_columns ((TrackerSparqlCursor*) _tmp8_); 889 #line 95 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 890 _tmp10_ = _tmp9_; 891 #line 95 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 892 if (!(_tmp7_ < _tmp10_)) { 893 #line 95 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 894 break; 895 #line 896 "tracker-resources.c" 896 } 897 #line 96 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 898 _tmp11_ = cursor; 899 #line 96 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 900 _tmp12_ = i; 901 #line 96 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 902 _tmp13_ = tracker_sparql_cursor_get_string ((TrackerSparqlCursor*) _tmp11_, _tmp12_, NULL); 903 #line 96 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 904 str = _tmp13_; 905 #line 98 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 906 _tmp14_ = str; 907 #line 98 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 908 if (_tmp14_ == NULL) { 909 #line 99 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 910 str = ""; 911 #line 912 "tracker-resources.c" 912 } 913 #line 102 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 914 _tmp15_ = _data3_->builder; 915 #line 102 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 916 _tmp16_ = str; 917 #line 102 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 918 g_variant_builder_add (_tmp15_, "s", _tmp16_, NULL); 919 #line 920 "tracker-resources.c" 920 } 921 } 922 } 923 #line 105 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 924 _tmp17_ = _data3_->builder; 925 #line 105 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 926 g_variant_builder_close (_tmp17_); 927 #line 928 "tracker-resources.c" 928 } 929 } 930 931 932 static void ____lambda4__tracker_store_sparql_query_in_thread (TrackerDBCursor* cursor, gpointer self, GError** error) { 933 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 934 ___lambda4_ (self, cursor, error); 935 #line 936 "tracker-resources.c" 936 } 937 938 939 static void tracker_resources_sparql_query_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) { 940 TrackerResourcesSparqlQueryData* _data_; 941 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 942 _data_ = _user_data_; 943 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 944 _data_->_source_object_ = source_object; 945 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 946 _data_->_res_ = _res_; 947 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 948 tracker_resources_sparql_query_co (_data_); 949 #line 950 "tracker-resources.c" 950 } 951 952 953 static gboolean tracker_resources_sparql_query_co (TrackerResourcesSparqlQueryData* _data_) { 954 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 955 switch (_data_->_state_) { 956 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 957 case 0: 958 #line 959 "tracker-resources.c" 959 goto _state_0; 960 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 961 case 1: 962 #line 963 "tracker-resources.c" 963 goto _state_1; 964 default: 965 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 966 g_assert_not_reached (); 967 #line 968 "tracker-resources.c" 968 } 969 _state_0: 970 #line 86 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 971 _data_->_tmp0_ = _data_->sender; 972 #line 86 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 973 _data_->_tmp1_ = NULL; 974 #line 86 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 975 _data_->_tmp1_ = tracker_dbus_request_begin ((const gchar*) _data_->_tmp0_, "Resources.SparqlQuery", NULL); 976 #line 86 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 977 _data_->request = _data_->_tmp1_; 978 #line 87 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 979 _data_->_tmp2_ = _data_->request; 980 #line 87 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 981 _data_->_tmp3_ = _data_->query; 982 #line 87 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 983 tracker_dbus_request_debug (_data_->_tmp2_, "query: %s", _data_->_tmp3_, NULL); 984 #line 985 "tracker-resources.c" 985 { 986 #line 88 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 987 _data_->_data3_ = g_slice_new0 (Block3Data); 988 #line 88 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 989 _data_->_data3_->_ref_count_ = 1; 990 #line 88 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 991 _data_->_data3_->self = g_object_ref (_data_->self); 992 #line 89 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 993 _data_->_tmp4_ = g_variant_builder_new ((const GVariantType*) "aas"); 994 #line 89 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 995 _data_->_data3_->builder = _data_->_tmp4_; 996 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 997 _data_->_tmp5_ = _data_->query; 998 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 999 _data_->_tmp6_ = _data_->sender; 1000 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1001 _data_->_state_ = 1; 1002 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1003 tracker_store_sparql_query (_data_->_tmp5_, TRACKER_STORE_PRIORITY_HIGH, ____lambda4__tracker_store_sparql_query_in_thread, _data_->_data3_, (const gchar*) _data_->_tmp6_, tracker_resources_sparql_query_ready, _data_); 1004 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1005 return FALSE; 1006 #line 1007 "tracker-resources.c" 1007 _state_1: 1008 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1009 tracker_store_sparql_query_finish (_data_->_res_, &_data_->_inner_error_); 1010 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1011 if (_data_->_inner_error_ != NULL) { 1012 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1013 block3_data_unref (_data_->_data3_); 1014 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1015 _data_->_data3_ = NULL; 1016 #line 1017 "tracker-resources.c" 1017 goto __catch9_g_error; 1018 } 1019 #line 109 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1020 _data_->_tmp7_ = _data_->_data3_->builder; 1021 #line 109 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1022 _data_->_tmp8_ = NULL; 1023 #line 109 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1024 _data_->_tmp8_ = g_variant_builder_end (_data_->_tmp7_); 1025 #line 109 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1026 g_variant_ref_sink (_data_->_tmp8_); 1027 #line 109 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1028 _data_->_result_ = _data_->_tmp8_; 1029 #line 110 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1030 _data_->_tmp9_ = _data_->_result_; 1031 #line 110 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1032 _data_->_tmp10_ = 0UL; 1033 #line 110 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1034 _data_->_tmp10_ = g_variant_get_size (_data_->_tmp9_); 1035 #line 110 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1036 if (_data_->_tmp10_ > ((gsize) TRACKER_RESOURCES_DBUS_ARBITRARY_MAX_MSG_SIZE)) { 1037 #line 111 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1038 _data_->_tmp11_ = g_error_new_literal (G_DBUS_ERROR, G_DBUS_ERROR_FAILED, "result set of the query is too large"); 1039 #line 111 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1040 _data_->_inner_error_ = _data_->_tmp11_; 1041 #line 111 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1042 _g_variant_unref0 (_data_->_result_); 1043 #line 111 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1044 block3_data_unref (_data_->_data3_); 1045 #line 111 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1046 _data_->_data3_ = NULL; 1047 #line 1048 "tracker-resources.c" 1048 goto __catch9_g_error; 1049 } 1050 #line 114 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1051 _data_->_tmp12_ = _data_->request; 1052 #line 114 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1053 tracker_dbus_request_end (_data_->_tmp12_, NULL); 1054 #line 116 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1055 _data_->result = _data_->_result_; 1056 #line 116 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1057 block3_data_unref (_data_->_data3_); 1058 #line 116 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1059 _data_->_data3_ = NULL; 1060 #line 116 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1061 if (_data_->_state_ == 0) { 1062 #line 116 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1063 g_simple_async_result_complete_in_idle (_data_->_async_result); 1064 #line 1065 "tracker-resources.c" 1065 } else { 1066 #line 116 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1067 g_simple_async_result_complete (_data_->_async_result); 1068 #line 1069 "tracker-resources.c" 1069 } 1070 #line 116 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1071 g_object_unref (_data_->_async_result); 1072 #line 116 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1073 return FALSE; 1074 #line 1075 "tracker-resources.c" 1075 } 1076 goto __finally9; 1077 __catch9_g_error: 1078 { 1079 #line 88 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1080 _data_->e = _data_->_inner_error_; 1081 #line 88 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1082 _data_->_inner_error_ = NULL; 1083 #line 118 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1084 _data_->_tmp13_ = _data_->request; 1085 #line 118 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1086 _data_->_tmp14_ = _data_->e; 1087 #line 118 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1088 tracker_dbus_request_end (_data_->_tmp13_, _data_->_tmp14_); 1089 #line 119 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1090 _data_->_tmp15_ = _data_->e; 1091 #line 119 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1092 if (_data_->_tmp15_->domain == TRACKER_SPARQL_ERROR) { 1093 #line 120 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1094 _data_->_tmp16_ = _data_->e; 1095 #line 120 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1096 _data_->_tmp17_ = _g_error_copy0 (_data_->_tmp16_); 1097 #line 120 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1098 _data_->_inner_error_ = _data_->_tmp17_; 1099 #line 120 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1100 _g_error_free0 (_data_->e); 1101 #line 1102 "tracker-resources.c" 1102 goto __finally9; 1103 } else { 1104 #line 122 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1105 _data_->_tmp18_ = _data_->e; 1106 #line 122 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1107 _data_->_tmp19_ = _data_->_tmp18_->message; 1108 #line 122 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1109 _data_->_tmp20_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_INTERNAL, _data_->_tmp19_); 1110 #line 122 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1111 _data_->_inner_error_ = _data_->_tmp20_; 1112 #line 122 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1113 _g_error_free0 (_data_->e); 1114 #line 1115 "tracker-resources.c" 1115 goto __finally9; 1116 } 1117 #line 88 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1118 _g_error_free0 (_data_->e); 1119 #line 1120 "tracker-resources.c" 1120 } 1121 __finally9: 1122 #line 88 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1123 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 1124 #line 88 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1125 g_error_free (_data_->_inner_error_); 1126 #line 88 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1127 if (_data_->_state_ == 0) { 1128 #line 88 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1129 g_simple_async_result_complete_in_idle (_data_->_async_result); 1130 #line 1131 "tracker-resources.c" 1131 } else { 1132 #line 88 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1133 g_simple_async_result_complete (_data_->_async_result); 1134 #line 1135 "tracker-resources.c" 1135 } 1136 #line 88 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1137 g_object_unref (_data_->_async_result); 1138 #line 88 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1139 return FALSE; 1140 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1141 if (_data_->_state_ == 0) { 1142 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1143 g_simple_async_result_complete_in_idle (_data_->_async_result); 1144 #line 1145 "tracker-resources.c" 1145 } else { 1146 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1147 g_simple_async_result_complete (_data_->_async_result); 1148 #line 1149 "tracker-resources.c" 1149 } 1150 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1151 g_object_unref (_data_->_async_result); 1152 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1153 return FALSE; 1154 #line 1155 "tracker-resources.c" 1155 } 1156 1157 1158 static void tracker_resources_sparql_update_data_free (gpointer _data) { 1159 TrackerResourcesSparqlUpdateData* _data_; 1160 _data_ = _data; 1161 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1162 _g_free0 (_data_->sender); 1163 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1164 _g_free0 (_data_->update); 1165 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1166 _g_object_unref0 (_data_->self); 1167 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1168 g_slice_free (TrackerResourcesSparqlUpdateData, _data_); 1169 #line 1170 "tracker-resources.c" 1170 } 1171 1172 1173 void tracker_resources_sparql_update (TrackerResources* self, const char* sender, const gchar* update, GAsyncReadyCallback _callback_, gpointer _user_data_) { 1174 TrackerResourcesSparqlUpdateData* _data_; 1175 TrackerResources* _tmp0_; 1176 const char* _tmp1_; 1177 char* _tmp2_; 1178 const gchar* _tmp3_; 1179 gchar* _tmp4_; 1180 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1181 _data_ = g_slice_new0 (TrackerResourcesSparqlUpdateData); 1182 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1183 _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, tracker_resources_sparql_update); 1184 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1185 g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_resources_sparql_update_data_free); 1186 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1187 _tmp0_ = _g_object_ref0 (self); 1188 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1189 _data_->self = _tmp0_; 1190 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1191 _tmp1_ = sender; 1192 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1193 _tmp2_ = g_strdup (_tmp1_); 1194 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1195 _g_free0 (_data_->sender); 1196 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1197 _data_->sender = _tmp2_; 1198 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1199 _tmp3_ = update; 1200 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1201 _tmp4_ = g_strdup (_tmp3_); 1202 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1203 _g_free0 (_data_->update); 1204 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1205 _data_->update = _tmp4_; 1206 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1207 tracker_resources_sparql_update_co (_data_); 1208 #line 1209 "tracker-resources.c" 1209 } 1210 1211 1212 void tracker_resources_sparql_update_finish (TrackerResources* self, GAsyncResult* _res_, GError** error) { 1213 TrackerResourcesSparqlUpdateData* _data_;
variable '_data_' set but not used
(emitted by gcc)
1214 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1215 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) { 1216 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1217 return; 1218 #line 1219 "tracker-resources.c" 1219 } 1220 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1221 _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)

1222 #line 1223 "tracker-resources.c" 1223 } 1224 1225 1226 static void tracker_resources_sparql_update_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) { 1227 TrackerResourcesSparqlUpdateData* _data_; 1228 #line 131 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1229 _data_ = _user_data_; 1230 #line 131 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1231 _data_->_source_object_ = source_object; 1232 #line 131 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1233 _data_->_res_ = _res_; 1234 #line 131 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1235 tracker_resources_sparql_update_co (_data_); 1236 #line 1237 "tracker-resources.c" 1237 } 1238 1239 1240 static gboolean tracker_resources_sparql_update_co (TrackerResourcesSparqlUpdateData* _data_) { 1241 #line 127 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1242 switch (_data_->_state_) { 1243 #line 127 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1244 case 0: 1245 #line 1246 "tracker-resources.c" 1246 goto _state_0; 1247 #line 127 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1248 case 1: 1249 #line 1250 "tracker-resources.c" 1250 goto _state_1; 1251 default: 1252 #line 127 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1253 g_assert_not_reached (); 1254 #line 1255 "tracker-resources.c" 1255 } 1256 _state_0: 1257 #line 128 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1258 _data_->_tmp0_ = _data_->sender; 1259 #line 128 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1260 _data_->_tmp1_ = NULL; 1261 #line 128 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1262 _data_->_tmp1_ = tracker_dbus_request_begin ((const gchar*) _data_->_tmp0_, "Resources.SparqlUpdate", NULL); 1263 #line 128 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1264 _data_->request = _data_->_tmp1_; 1265 #line 129 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1266 _data_->_tmp2_ = _data_->update; 1267 #line 129 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1268 tracker_dbus_request_debug (_data_->request, "query: %s", _data_->_tmp2_, NULL); 1269 #line 1270 "tracker-resources.c" 1270 { 1271 #line 131 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1272 _data_->_tmp3_ = _data_->update; 1273 #line 131 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1274 _data_->_tmp4_ = _data_->sender; 1275 #line 131 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1276 _data_->_state_ = 1; 1277 #line 131 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1278 tracker_store_sparql_update (_data_->_tmp3_, TRACKER_STORE_PRIORITY_HIGH, (const gchar*) _data_->_tmp4_, tracker_resources_sparql_update_ready, _data_); 1279 #line 131 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1280 return FALSE; 1281 #line 1282 "tracker-resources.c" 1282 _state_1: 1283 #line 131 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1284 tracker_store_sparql_update_finish (_data_->_res_, &_data_->_inner_error_); 1285 #line 131 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1286 if (_data_->_inner_error_ != NULL) { 1287 #line 131 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1288 if (g_error_matches (_data_->_inner_error_, TRACKER_DB_INTERFACE_ERROR, TRACKER_DB_NO_SPACE)) { 1289 #line 1290 "tracker-resources.c" 1290 goto __catch10_tracker_db_no_space; 1291 } 1292 goto __catch10_g_error; 1293 } 1294 #line 133 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1295 tracker_dbus_request_end (_data_->request, NULL); 1296 #line 1297 "tracker-resources.c" 1297 } 1298 goto __finally10; 1299 __catch10_tracker_db_no_space: 1300 { 1301 #line 130 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1302 _data_->ie = _data_->_inner_error_; 1303 #line 130 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1304 _data_->_inner_error_ = NULL; 1305 #line 135 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1306 _data_->_tmp5_ = _data_->ie; 1307 #line 135 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1308 _data_->_tmp6_ = _data_->_tmp5_->message; 1309 #line 135 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1310 _data_->_tmp7_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_NO_SPACE, _data_->_tmp6_); 1311 #line 135 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1312 _data_->_inner_error_ = _data_->_tmp7_; 1313 #line 135 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1314 _g_error_free0 (_data_->ie); 1315 #line 1316 "tracker-resources.c" 1316 goto __finally10; 1317 } 1318 goto __finally10; 1319 __catch10_g_error: 1320 { 1321 #line 130 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1322 _data_->e = _data_->_inner_error_; 1323 #line 130 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1324 _data_->_inner_error_ = NULL; 1325 #line 137 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1326 _data_->_tmp8_ = _data_->e; 1327 #line 137 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1328 tracker_dbus_request_end (_data_->request, _data_->_tmp8_); 1329 #line 138 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1330 _data_->_tmp9_ = _data_->e; 1331 #line 138 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1332 if (_data_->_tmp9_->domain == TRACKER_SPARQL_ERROR) { 1333 #line 139 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1334 _data_->_tmp10_ = _data_->e; 1335 #line 139 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1336 _data_->_tmp11_ = _g_error_copy0 (_data_->_tmp10_); 1337 #line 139 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1338 _data_->_inner_error_ = _data_->_tmp11_; 1339 #line 139 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1340 _g_error_free0 (_data_->e); 1341 #line 1342 "tracker-resources.c" 1342 goto __finally10; 1343 } else { 1344 #line 141 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1345 _data_->_tmp12_ = _data_->e; 1346 #line 141 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1347 _data_->_tmp13_ = _data_->_tmp12_->message; 1348 #line 141 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1349 _data_->_tmp14_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_INTERNAL, _data_->_tmp13_); 1350 #line 141 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1351 _data_->_inner_error_ = _data_->_tmp14_; 1352 #line 141 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1353 _g_error_free0 (_data_->e); 1354 #line 1355 "tracker-resources.c" 1355 goto __finally10; 1356 } 1357 #line 130 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1358 _g_error_free0 (_data_->e); 1359 #line 1360 "tracker-resources.c" 1360 } 1361 __finally10: 1362 #line 130 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1363 if (_data_->_inner_error_ != NULL) { 1364 #line 130 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1365 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 1366 #line 130 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1367 g_error_free (_data_->_inner_error_); 1368 #line 130 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1369 if (_data_->_state_ == 0) { 1370 #line 130 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1371 g_simple_async_result_complete_in_idle (_data_->_async_result); 1372 #line 1373 "tracker-resources.c" 1373 } else { 1374 #line 130 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1375 g_simple_async_result_complete (_data_->_async_result); 1376 #line 1377 "tracker-resources.c" 1377 } 1378 #line 130 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1379 g_object_unref (_data_->_async_result); 1380 #line 130 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1381 return FALSE; 1382 #line 1383 "tracker-resources.c" 1383 } 1384 #line 127 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1385 if (_data_->_state_ == 0) { 1386 #line 127 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1387 g_simple_async_result_complete_in_idle (_data_->_async_result); 1388 #line 1389 "tracker-resources.c" 1389 } else { 1390 #line 127 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1391 g_simple_async_result_complete (_data_->_async_result); 1392 #line 1393 "tracker-resources.c" 1393 } 1394 #line 127 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1395 g_object_unref (_data_->_async_result); 1396 #line 127 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1397 return FALSE; 1398 #line 1399 "tracker-resources.c" 1399 } 1400 1401 1402 static void tracker_resources_sparql_update_blank_data_free (gpointer _data) { 1403 TrackerResourcesSparqlUpdateBlankData* _data_; 1404 _data_ = _data; 1405 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1406 _g_free0 (_data_->sender); 1407 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1408 _g_free0 (_data_->update); 1409 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1410 _g_variant_unref0 (_data_->result); 1411 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1412 _g_object_unref0 (_data_->self); 1413 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1414 g_slice_free (TrackerResourcesSparqlUpdateBlankData, _data_); 1415 #line 1416 "tracker-resources.c" 1416 } 1417 1418 1419 void tracker_resources_sparql_update_blank (TrackerResources* self, const char* sender, const gchar* update, GAsyncReadyCallback _callback_, gpointer _user_data_) { 1420 TrackerResourcesSparqlUpdateBlankData* _data_; 1421 TrackerResources* _tmp0_; 1422 const char* _tmp1_; 1423 char* _tmp2_; 1424 const gchar* _tmp3_; 1425 gchar* _tmp4_; 1426 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1427 _data_ = g_slice_new0 (TrackerResourcesSparqlUpdateBlankData); 1428 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1429 _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, tracker_resources_sparql_update_blank); 1430 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1431 g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_resources_sparql_update_blank_data_free); 1432 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1433 _tmp0_ = _g_object_ref0 (self); 1434 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1435 _data_->self = _tmp0_; 1436 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1437 _tmp1_ = sender; 1438 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1439 _tmp2_ = g_strdup (_tmp1_); 1440 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1441 _g_free0 (_data_->sender); 1442 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1443 _data_->sender = _tmp2_; 1444 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1445 _tmp3_ = update; 1446 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1447 _tmp4_ = g_strdup (_tmp3_); 1448 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1449 _g_free0 (_data_->update); 1450 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1451 _data_->update = _tmp4_; 1452 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1453 tracker_resources_sparql_update_blank_co (_data_); 1454 #line 1455 "tracker-resources.c" 1455 } 1456 1457 1458 GVariant* tracker_resources_sparql_update_blank_finish (TrackerResources* self, GAsyncResult* _res_, GError** error) { 1459 GVariant* result; 1460 TrackerResourcesSparqlUpdateBlankData* _data_; 1461 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1462 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) { 1463 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1464 return NULL; 1465 #line 1466 "tracker-resources.c" 1466 } 1467 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1468 _data_ = g_simple_async_result_get_op_res_gpointer (G_SIMPLE_ASYNC_RESULT (_res_)); 1469 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1470 result = _data_->result; 1471 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1472 _data_->result = NULL; 1473 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1474 return result; 1475 #line 1476 "tracker-resources.c" 1476 } 1477 1478 1479 static void tracker_resources_sparql_update_blank_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) { 1480 TrackerResourcesSparqlUpdateBlankData* _data_; 1481 #line 151 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1482 _data_ = _user_data_; 1483 #line 151 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1484 _data_->_source_object_ = source_object; 1485 #line 151 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1486 _data_->_res_ = _res_; 1487 #line 151 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1488 tracker_resources_sparql_update_blank_co (_data_); 1489 #line 1490 "tracker-resources.c" 1490 } 1491 1492 1493 static gboolean tracker_resources_sparql_update_blank_co (TrackerResourcesSparqlUpdateBlankData* _data_) { 1494 #line 147 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1495 switch (_data_->_state_) { 1496 #line 147 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1497 case 0: 1498 #line 1499 "tracker-resources.c" 1499 goto _state_0; 1500 #line 147 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1501 case 1: 1502 #line 1503 "tracker-resources.c" 1503 goto _state_1; 1504 default: 1505 #line 147 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1506 g_assert_not_reached (); 1507 #line 1508 "tracker-resources.c" 1508 } 1509 _state_0: 1510 #line 148 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1511 _data_->_tmp0_ = _data_->sender; 1512 #line 148 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1513 _data_->_tmp1_ = NULL; 1514 #line 148 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1515 _data_->_tmp1_ = tracker_dbus_request_begin ((const gchar*) _data_->_tmp0_, "Resources.SparqlUpdateBlank", NULL); 1516 #line 148 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1517 _data_->request = _data_->_tmp1_; 1518 #line 149 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1519 _data_->_tmp2_ = _data_->request; 1520 #line 149 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1521 _data_->_tmp3_ = _data_->update; 1522 #line 149 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1523 tracker_dbus_request_debug (_data_->_tmp2_, "query: %s", _data_->_tmp3_, NULL); 1524 #line 1525 "tracker-resources.c" 1525 { 1526 #line 151 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1527 _data_->_tmp4_ = _data_->update; 1528 #line 151 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1529 _data_->_tmp5_ = _data_->sender; 1530 #line 151 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1531 _data_->_state_ = 1; 1532 #line 151 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1533 tracker_store_sparql_update_blank (_data_->_tmp4_, TRACKER_STORE_PRIORITY_HIGH, (const gchar*) _data_->_tmp5_, tracker_resources_sparql_update_blank_ready, _data_); 1534 #line 151 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1535 return FALSE; 1536 #line 1537 "tracker-resources.c" 1537 _state_1: 1538 #line 151 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1539 _data_->_tmp6_ = NULL; 1540 #line 151 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1541 _data_->_tmp6_ = tracker_store_sparql_update_blank_finish (_data_->_res_, &_data_->_inner_error_); 1542 #line 151 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1543 _data_->variant = _data_->_tmp6_; 1544 #line 151 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1545 if (_data_->_inner_error_ != NULL) { 1546 #line 151 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1547 if (g_error_matches (_data_->_inner_error_, TRACKER_DB_INTERFACE_ERROR, TRACKER_DB_NO_SPACE)) { 1548 #line 1549 "tracker-resources.c" 1549 goto __catch11_tracker_db_no_space; 1550 } 1551 goto __catch11_g_error; 1552 } 1553 #line 153 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1554 _data_->_tmp7_ = _data_->request; 1555 #line 153 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1556 tracker_dbus_request_end (_data_->_tmp7_, NULL); 1557 #line 155 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1558 _data_->result = _data_->variant; 1559 #line 155 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1560 if (_data_->_state_ == 0) { 1561 #line 155 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1562 g_simple_async_result_complete_in_idle (_data_->_async_result); 1563 #line 1564 "tracker-resources.c" 1564 } else { 1565 #line 155 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1566 g_simple_async_result_complete (_data_->_async_result); 1567 #line 1568 "tracker-resources.c" 1568 } 1569 #line 155 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1570 g_object_unref (_data_->_async_result); 1571 #line 155 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1572 return FALSE; 1573 #line 1574 "tracker-resources.c" 1574 } 1575 goto __finally11; 1576 __catch11_tracker_db_no_space: 1577 { 1578 #line 150 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1579 _data_->ie = _data_->_inner_error_; 1580 #line 150 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1581 _data_->_inner_error_ = NULL; 1582 #line 157 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1583 _data_->_tmp8_ = _data_->ie; 1584 #line 157 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1585 _data_->_tmp9_ = _data_->_tmp8_->message; 1586 #line 157 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1587 _data_->_tmp10_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_NO_SPACE, _data_->_tmp9_); 1588 #line 157 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1589 _data_->_inner_error_ = _data_->_tmp10_; 1590 #line 157 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1591 _g_error_free0 (_data_->ie); 1592 #line 1593 "tracker-resources.c" 1593 goto __finally11; 1594 } 1595 goto __finally11; 1596 __catch11_g_error: 1597 { 1598 #line 150 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1599 _data_->e = _data_->_inner_error_; 1600 #line 150 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1601 _data_->_inner_error_ = NULL; 1602 #line 159 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1603 _data_->_tmp11_ = _data_->request; 1604 #line 159 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1605 _data_->_tmp12_ = _data_->e; 1606 #line 159 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1607 tracker_dbus_request_end (_data_->_tmp11_, _data_->_tmp12_); 1608 #line 160 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1609 _data_->_tmp13_ = _data_->e; 1610 #line 160 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1611 if (_data_->_tmp13_->domain == TRACKER_SPARQL_ERROR) { 1612 #line 161 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1613 _data_->_tmp14_ = _data_->e; 1614 #line 161 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1615 _data_->_tmp15_ = _g_error_copy0 (_data_->_tmp14_); 1616 #line 161 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1617 _data_->_inner_error_ = _data_->_tmp15_; 1618 #line 161 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1619 _g_error_free0 (_data_->e); 1620 #line 1621 "tracker-resources.c" 1621 goto __finally11; 1622 } else { 1623 #line 163 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1624 _data_->_tmp16_ = _data_->e; 1625 #line 163 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1626 _data_->_tmp17_ = _data_->_tmp16_->message; 1627 #line 163 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1628 _data_->_tmp18_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_INTERNAL, _data_->_tmp17_); 1629 #line 163 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1630 _data_->_inner_error_ = _data_->_tmp18_; 1631 #line 163 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1632 _g_error_free0 (_data_->e); 1633 #line 1634 "tracker-resources.c" 1634 goto __finally11; 1635 } 1636 #line 150 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1637 _g_error_free0 (_data_->e); 1638 #line 1639 "tracker-resources.c" 1639 } 1640 __finally11: 1641 #line 150 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1642 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 1643 #line 150 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1644 g_error_free (_data_->_inner_error_); 1645 #line 150 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1646 if (_data_->_state_ == 0) { 1647 #line 150 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1648 g_simple_async_result_complete_in_idle (_data_->_async_result); 1649 #line 1650 "tracker-resources.c" 1650 } else { 1651 #line 150 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1652 g_simple_async_result_complete (_data_->_async_result); 1653 #line 1654 "tracker-resources.c" 1654 } 1655 #line 150 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1656 g_object_unref (_data_->_async_result); 1657 #line 150 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1658 return FALSE; 1659 #line 147 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1660 if (_data_->_state_ == 0) { 1661 #line 147 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1662 g_simple_async_result_complete_in_idle (_data_->_async_result); 1663 #line 1664 "tracker-resources.c" 1664 } else { 1665 #line 147 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1666 g_simple_async_result_complete (_data_->_async_result); 1667 #line 1668 "tracker-resources.c" 1668 } 1669 #line 147 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1670 g_object_unref (_data_->_async_result); 1671 #line 147 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1672 return FALSE; 1673 #line 1674 "tracker-resources.c" 1674 } 1675 1676 1677 void tracker_resources_sync (TrackerResources* self, const char* sender) { 1678 const char* _tmp0_; 1679 TrackerDBusRequest* _tmp1_ = NULL; 1680 TrackerDBusRequest* request; 1681 #line 168 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1682 g_return_if_fail (self != NULL); 1683 #line 168 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1684 g_return_if_fail (sender != NULL); 1685 #line 169 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1686 _tmp0_ = sender; 1687 #line 169 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1688 _tmp1_ = tracker_dbus_request_begin ((const gchar*) _tmp0_, "Resources.Sync", NULL); 1689 #line 169 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1690 request = _tmp1_; 1691 #line 172 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1692 tracker_store_wal_checkpoint (); 1693 #line 174 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1694 tracker_data_sync (); 1695 #line 176 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1696 tracker_dbus_request_end (request, NULL); 1697 #line 1698 "tracker-resources.c" 1698 } 1699 1700 1701 static void tracker_resources_batch_sparql_update_data_free (gpointer _data) { 1702 TrackerResourcesBatchSparqlUpdateData* _data_; 1703 _data_ = _data; 1704 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1705 _g_free0 (_data_->sender); 1706 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1707 _g_free0 (_data_->update); 1708 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1709 _g_object_unref0 (_data_->self); 1710 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1711 g_slice_free (TrackerResourcesBatchSparqlUpdateData, _data_); 1712 #line 1713 "tracker-resources.c" 1713 } 1714 1715 1716 void tracker_resources_batch_sparql_update (TrackerResources* self, const char* sender, const gchar* update, GAsyncReadyCallback _callback_, gpointer _user_data_) { 1717 TrackerResourcesBatchSparqlUpdateData* _data_; 1718 TrackerResources* _tmp0_; 1719 const char* _tmp1_; 1720 char* _tmp2_; 1721 const gchar* _tmp3_; 1722 gchar* _tmp4_; 1723 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1724 _data_ = g_slice_new0 (TrackerResourcesBatchSparqlUpdateData); 1725 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1726 _data_->_async_result = g_simple_async_result_new (G_OBJECT (self), _callback_, _user_data_, tracker_resources_batch_sparql_update); 1727 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1728 g_simple_async_result_set_op_res_gpointer (_data_->_async_result, _data_, tracker_resources_batch_sparql_update_data_free); 1729 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1730 _tmp0_ = _g_object_ref0 (self); 1731 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1732 _data_->self = _tmp0_; 1733 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1734 _tmp1_ = sender; 1735 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1736 _tmp2_ = g_strdup (_tmp1_); 1737 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1738 _g_free0 (_data_->sender); 1739 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1740 _data_->sender = _tmp2_; 1741 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1742 _tmp3_ = update; 1743 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1744 _tmp4_ = g_strdup (_tmp3_); 1745 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1746 _g_free0 (_data_->update); 1747 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1748 _data_->update = _tmp4_; 1749 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1750 tracker_resources_batch_sparql_update_co (_data_); 1751 #line 1752 "tracker-resources.c" 1752 } 1753 1754 1755 void tracker_resources_batch_sparql_update_finish (TrackerResources* self, GAsyncResult* _res_, GError** error) { 1756 TrackerResourcesBatchSparqlUpdateData* _data_;
variable '_data_' set but not used
(emitted by gcc)
1757 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1758 if (g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (_res_), error)) { 1759 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1760 return; 1761 #line 1762 "tracker-resources.c" 1762 } 1763 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1764 _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)

1765 #line 1766 "tracker-resources.c" 1766 } 1767 1768 1769 static void tracker_resources_batch_sparql_update_ready (GObject* source_object, GAsyncResult* _res_, gpointer _user_data_) { 1770 TrackerResourcesBatchSparqlUpdateData* _data_; 1771 #line 183 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1772 _data_ = _user_data_; 1773 #line 183 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1774 _data_->_source_object_ = source_object; 1775 #line 183 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1776 _data_->_res_ = _res_; 1777 #line 183 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1778 tracker_resources_batch_sparql_update_co (_data_); 1779 #line 1780 "tracker-resources.c" 1780 } 1781 1782 1783 static gboolean tracker_resources_batch_sparql_update_co (TrackerResourcesBatchSparqlUpdateData* _data_) { 1784 #line 179 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1785 switch (_data_->_state_) { 1786 #line 179 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1787 case 0: 1788 #line 1789 "tracker-resources.c" 1789 goto _state_0; 1790 #line 179 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1791 case 1: 1792 #line 1793 "tracker-resources.c" 1793 goto _state_1; 1794 default: 1795 #line 179 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1796 g_assert_not_reached (); 1797 #line 1798 "tracker-resources.c" 1798 } 1799 _state_0: 1800 #line 180 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1801 _data_->_tmp0_ = _data_->sender; 1802 #line 180 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1803 _data_->_tmp1_ = NULL; 1804 #line 180 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1805 _data_->_tmp1_ = tracker_dbus_request_begin ((const gchar*) _data_->_tmp0_, "Resources.BatchSparqlUpdate", NULL); 1806 #line 180 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1807 _data_->request = _data_->_tmp1_; 1808 #line 181 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1809 _data_->_tmp2_ = _data_->update; 1810 #line 181 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1811 tracker_dbus_request_debug (_data_->request, "query: %s", _data_->_tmp2_, NULL); 1812 #line 1813 "tracker-resources.c" 1813 { 1814 #line 183 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1815 _data_->_tmp3_ = _data_->update; 1816 #line 183 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1817 _data_->_tmp4_ = _data_->sender; 1818 #line 183 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1819 _data_->_state_ = 1; 1820 #line 183 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1821 tracker_store_sparql_update (_data_->_tmp3_, TRACKER_STORE_PRIORITY_LOW, (const gchar*) _data_->_tmp4_, tracker_resources_batch_sparql_update_ready, _data_); 1822 #line 183 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1823 return FALSE; 1824 #line 1825 "tracker-resources.c" 1825 _state_1: 1826 #line 183 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1827 tracker_store_sparql_update_finish (_data_->_res_, &_data_->_inner_error_); 1828 #line 183 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1829 if (_data_->_inner_error_ != NULL) { 1830 #line 183 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1831 if (g_error_matches (_data_->_inner_error_, TRACKER_DB_INTERFACE_ERROR, TRACKER_DB_NO_SPACE)) { 1832 #line 1833 "tracker-resources.c" 1833 goto __catch12_tracker_db_no_space; 1834 } 1835 goto __catch12_g_error; 1836 } 1837 #line 185 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1838 tracker_dbus_request_end (_data_->request, NULL); 1839 #line 1840 "tracker-resources.c" 1840 } 1841 goto __finally12; 1842 __catch12_tracker_db_no_space: 1843 { 1844 #line 182 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1845 _data_->ie = _data_->_inner_error_; 1846 #line 182 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1847 _data_->_inner_error_ = NULL; 1848 #line 187 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1849 _data_->_tmp5_ = _data_->ie; 1850 #line 187 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1851 _data_->_tmp6_ = _data_->_tmp5_->message; 1852 #line 187 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1853 _data_->_tmp7_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_NO_SPACE, _data_->_tmp6_); 1854 #line 187 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1855 _data_->_inner_error_ = _data_->_tmp7_; 1856 #line 187 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1857 _g_error_free0 (_data_->ie); 1858 #line 1859 "tracker-resources.c" 1859 goto __finally12; 1860 } 1861 goto __finally12; 1862 __catch12_g_error: 1863 { 1864 #line 182 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1865 _data_->e = _data_->_inner_error_; 1866 #line 182 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1867 _data_->_inner_error_ = NULL; 1868 #line 189 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1869 _data_->_tmp8_ = _data_->e; 1870 #line 189 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1871 tracker_dbus_request_end (_data_->request, _data_->_tmp8_); 1872 #line 190 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1873 _data_->_tmp9_ = _data_->e; 1874 #line 190 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1875 if (_data_->_tmp9_->domain == TRACKER_SPARQL_ERROR) { 1876 #line 191 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1877 _data_->_tmp10_ = _data_->e; 1878 #line 191 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1879 _data_->_tmp11_ = _g_error_copy0 (_data_->_tmp10_); 1880 #line 191 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1881 _data_->_inner_error_ = _data_->_tmp11_; 1882 #line 191 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1883 _g_error_free0 (_data_->e); 1884 #line 1885 "tracker-resources.c" 1885 goto __finally12; 1886 } else { 1887 #line 193 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1888 _data_->_tmp12_ = _data_->e; 1889 #line 193 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1890 _data_->_tmp13_ = _data_->_tmp12_->message; 1891 #line 193 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1892 _data_->_tmp14_ = g_error_new_literal (TRACKER_SPARQL_ERROR, TRACKER_SPARQL_ERROR_INTERNAL, _data_->_tmp13_); 1893 #line 193 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1894 _data_->_inner_error_ = _data_->_tmp14_; 1895 #line 193 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1896 _g_error_free0 (_data_->e); 1897 #line 1898 "tracker-resources.c" 1898 goto __finally12; 1899 } 1900 #line 182 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1901 _g_error_free0 (_data_->e); 1902 #line 1903 "tracker-resources.c" 1903 } 1904 __finally12: 1905 #line 182 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1906 if (_data_->_inner_error_ != NULL) { 1907 #line 182 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1908 g_simple_async_result_set_from_error (_data_->_async_result, _data_->_inner_error_); 1909 #line 182 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1910 g_error_free (_data_->_inner_error_); 1911 #line 182 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1912 if (_data_->_state_ == 0) { 1913 #line 182 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1914 g_simple_async_result_complete_in_idle (_data_->_async_result); 1915 #line 1916 "tracker-resources.c" 1916 } else { 1917 #line 182 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1918 g_simple_async_result_complete (_data_->_async_result); 1919 #line 1920 "tracker-resources.c" 1920 } 1921 #line 182 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1922 g_object_unref (_data_->_async_result); 1923 #line 182 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1924 return FALSE; 1925 #line 1926 "tracker-resources.c" 1926 } 1927 #line 179 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1928 if (_data_->_state_ == 0) { 1929 #line 179 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1930 g_simple_async_result_complete_in_idle (_data_->_async_result); 1931 #line 1932 "tracker-resources.c" 1932 } else { 1933 #line 179 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1934 g_simple_async_result_complete (_data_->_async_result); 1935 #line 1936 "tracker-resources.c" 1936 } 1937 #line 179 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1938 g_object_unref (_data_->_async_result); 1939 #line 179 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1940 return FALSE; 1941 #line 1942 "tracker-resources.c" 1942 } 1943 1944 1945 void tracker_resources_batch_commit (TrackerResources* self) { 1946 #line 198 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1947 g_return_if_fail (self != NULL); 1948 #line 1949 "tracker-resources.c" 1949 } 1950 1951 1952 static Block4Data* block4_data_ref (Block4Data* _data4_) { 1953 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1954 g_atomic_int_inc (&_data4_->_ref_count_); 1955 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1956 return _data4_; 1957 #line 1958 "tracker-resources.c" 1958 } 1959 1960 1961 static void block4_data_unref (void * _userdata_) { 1962 Block4Data* _data4_; 1963 _data4_ = (Block4Data*) _userdata_; 1964 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1965 if (g_atomic_int_dec_and_test (&_data4_->_ref_count_)) { 1966 #line 1967 "tracker-resources.c" 1967 TrackerResources * self; 1968 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1969 self = _data4_->self; 1970 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1971 _g_variant_builder_unref0 (_data4_->builder); 1972 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1973 _g_object_unref0 (self); 1974 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1975 g_slice_free (Block4Data, _data4_); 1976 #line 1977 "tracker-resources.c" 1977 } 1978 } 1979 1980 1981 static void ___lambda5_ (Block4Data* _data4_, gint graph_id, gint subject_id, gint pred_id, gint object_id) { 1982 TrackerResources * self;
variable 'self' set but not used
(emitted by gcc)
1983 GVariantBuilder* _tmp0_; 1984 gint _tmp1_; 1985 gint _tmp2_; 1986 gint _tmp3_; 1987 gint _tmp4_; 1988 #line 205 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1989 self = _data4_->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)

1990 #line 206 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1991 _tmp0_ = _data4_->builder; 1992 #line 206 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1993 _tmp1_ = graph_id; 1994 #line 206 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1995 _tmp2_ = subject_id; 1996 #line 206 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1997 _tmp3_ = pred_id; 1998 #line 206 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 1999 _tmp4_ = object_id; 2000 #line 206 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2001 g_variant_builder_add (_tmp0_, "(iiii)", _tmp1_, _tmp2_, _tmp3_, _tmp4_, NULL); 2002 #line 2003 "tracker-resources.c" 2003 } 2004 2005 2006 static void ____lambda5__tracker_events_foreach (gint graph_id, gint subject_id, gint pred_id, gint object_id, gpointer self) { 2007 #line 205 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2008 ___lambda5_ (self, graph_id, subject_id, pred_id, object_id); 2009 #line 2010 "tracker-resources.c" 2010 } 2011 2012 2013 static void ___lambda6_ (Block4Data* _data4_, gint graph_id, gint subject_id, gint pred_id, gint object_id) { 2014 TrackerResources * self;
variable 'self' set but not used
(emitted by gcc)
2015 GVariantBuilder* _tmp0_; 2016 gint _tmp1_; 2017 gint _tmp2_; 2018 gint _tmp3_; 2019 gint _tmp4_; 2020 #line 211 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2021 self = _data4_->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)

2022 #line 212 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2023 _tmp0_ = _data4_->builder; 2024 #line 212 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2025 _tmp1_ = graph_id; 2026 #line 212 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2027 _tmp2_ = subject_id; 2028 #line 212 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2029 _tmp3_ = pred_id; 2030 #line 212 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2031 _tmp4_ = object_id; 2032 #line 212 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2033 g_variant_builder_add (_tmp0_, "(iiii)", _tmp1_, _tmp2_, _tmp3_, _tmp4_, NULL); 2034 #line 2035 "tracker-resources.c" 2035 } 2036 2037 2038 static void ____lambda6__tracker_events_foreach (gint graph_id, gint subject_id, gint pred_id, gint object_id, gpointer self) { 2039 #line 211 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2040 ___lambda6_ (self, graph_id, subject_id, pred_id, object_id); 2041 #line 2042 "tracker-resources.c" 2042 } 2043 2044 2045 static gboolean tracker_resources_emit_graph_updated (TrackerResources* self, TrackerClass* cl) { 2046 gboolean result = FALSE; 2047 gboolean _tmp0_ = FALSE; 2048 TrackerClass* _tmp1_; 2049 gboolean _tmp2_ = FALSE; 2050 gboolean _tmp5_; 2051 #line 202 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2052 g_return_val_if_fail (self != NULL, FALSE); 2053 #line 202 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2054 g_return_val_if_fail (cl != NULL, FALSE); 2055 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2056 _tmp1_ = cl; 2057 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2058 _tmp2_ = tracker_class_has_insert_events (_tmp1_); 2059 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2060 if (_tmp2_) { 2061 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2062 _tmp0_ = TRUE; 2063 #line 2064 "tracker-resources.c" 2064 } else { 2065 TrackerClass* _tmp3_; 2066 gboolean _tmp4_ = FALSE; 2067 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2068 _tmp3_ = cl; 2069 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2070 _tmp4_ = tracker_class_has_delete_events (_tmp3_); 2071 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2072 _tmp0_ = _tmp4_; 2073 #line 2074 "tracker-resources.c" 2074 } 2075 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2076 _tmp5_ = _tmp0_; 2077 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2078 if (_tmp5_) { 2079 #line 2080 "tracker-resources.c" 2080 Block4Data* _data4_; 2081 GVariantBuilder* _tmp6_; 2082 TrackerClass* _tmp7_; 2083 GVariantBuilder* _tmp8_; 2084 GVariant* _tmp9_ = NULL; 2085 GVariant* deletes; 2086 GVariantBuilder* _tmp10_; 2087 TrackerClass* _tmp11_; 2088 GVariantBuilder* _tmp12_; 2089 GVariant* _tmp13_ = NULL; 2090 GVariant* inserts; 2091 TrackerClass* _tmp14_; 2092 const gchar* _tmp15_; 2093 const gchar* _tmp16_; 2094 GVariant* _tmp17_; 2095 GVariant* _tmp18_; 2096 TrackerClass* _tmp19_; 2097 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2098 _data4_ = g_slice_new0 (Block4Data); 2099 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2100 _data4_->_ref_count_ = 1; 2101 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2102 _data4_->self = g_object_ref (self); 2103 #line 204 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2104 _tmp6_ = g_variant_builder_new ((const GVariantType*) "a(iiii)"); 2105 #line 204 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2106 _data4_->builder = _tmp6_; 2107 #line 205 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2108 _tmp7_ = cl; 2109 #line 205 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2110 tracker_class_foreach_delete_event (_tmp7_, ____lambda5__tracker_events_foreach, _data4_); 2111 #line 208 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2112 _tmp8_ = _data4_->builder; 2113 #line 208 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2114 _tmp9_ = g_variant_builder_end (_tmp8_); 2115 #line 208 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2116 g_variant_ref_sink (_tmp9_); 2117 #line 208 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2118 deletes = _tmp9_; 2119 #line 210 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2120 _tmp10_ = g_variant_builder_new ((const GVariantType*) "a(iiii)"); 2121 #line 210 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2122 _g_variant_builder_unref0 (_data4_->builder); 2123 #line 210 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2124 _data4_->builder = _tmp10_; 2125 #line 211 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2126 _tmp11_ = cl; 2127 #line 211 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2128 tracker_class_foreach_insert_event (_tmp11_, ____lambda6__tracker_events_foreach, _data4_); 2129 #line 214 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2130 _tmp12_ = _data4_->builder; 2131 #line 214 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2132 _tmp13_ = g_variant_builder_end (_tmp12_); 2133 #line 214 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2134 g_variant_ref_sink (_tmp13_); 2135 #line 214 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2136 inserts = _tmp13_; 2137 #line 216 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2138 _tmp14_ = cl; 2139 #line 216 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2140 _tmp15_ = tracker_class_get_uri (_tmp14_); 2141 #line 216 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2142 _tmp16_ = _tmp15_; 2143 #line 216 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2144 _tmp17_ = deletes; 2145 #line 216 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2146 _tmp18_ = inserts; 2147 #line 216 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2148 g_signal_emit_by_name (self, "graph-updated", _tmp16_, _tmp17_, _tmp18_); 2149 #line 218 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2150 _tmp19_ = cl; 2151 #line 218 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2152 tracker_class_reset_ready_events (_tmp19_); 2153 #line 220 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2154 result = TRUE; 2155 #line 220 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2156 _g_variant_unref0 (inserts); 2157 #line 220 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2158 _g_variant_unref0 (deletes); 2159 #line 220 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2160 block4_data_unref (_data4_); 2161 #line 220 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2162 _data4_ = NULL; 2163 #line 220 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2164 return result; 2165 #line 2166 "tracker-resources.c" 2166 } 2167 #line 222 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2168 result = FALSE; 2169 #line 222 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2170 return result; 2171 #line 2172 "tracker-resources.c" 2172 } 2173 2174 2175 static gpointer _g_hash_table_ref0 (gpointer self) { 2176 #line 234 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2177 return self ? g_hash_table_ref (self) : NULL; 2178 #line 2179 "tracker-resources.c" 2179 } 2180 2181 2182 static gboolean tracker_resources_on_emit_signals (TrackerResources* self) { 2183 gboolean result = FALSE; 2184 gint _tmp0_ = 0; 2185 TrackerClass** _tmp1_ = NULL; 2186 GHashTable* _tmp4_ = NULL; 2187 GHashTable* _tmp5_; 2188 GHashTable* writebacks; 2189 GHashTable* _tmp6_; 2190 #line 225 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2191 g_return_val_if_fail (self != NULL, FALSE); 2192 #line 226 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2193 _tmp1_ = tracker_events_get_classes (&_tmp0_); 2194 #line 2195 "tracker-resources.c" 2195 { 2196 TrackerClass** cl_collection = NULL; 2197 gint cl_collection_length1 = 0; 2198 gint _cl_collection_size_ = 0; 2199 gint cl_it = 0; 2200 #line 226 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2201 cl_collection = _tmp1_; 2202 #line 226 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2203 cl_collection_length1 = _tmp0_;
Value stored to 'cl_collection_length1' is never read
(emitted by clang-analyzer)

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

2204 #line 226 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2205 for (cl_it = 0; cl_it < _tmp0_; cl_it = cl_it + 1) { 2206 #line 2207 "tracker-resources.c" 2207 TrackerClass* _tmp2_; 2208 TrackerClass* cl = NULL; 2209 #line 226 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2210 _tmp2_ = _g_object_ref0 (cl_collection[cl_it]); 2211 #line 226 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2212 cl = _tmp2_; 2213 #line 2214 "tracker-resources.c" 2214 { 2215 TrackerClass* _tmp3_; 2216 #line 227 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2217 _tmp3_ = cl; 2218 #line 227 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2219 tracker_resources_emit_graph_updated (self, _tmp3_); 2220 #line 226 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2221 _g_object_unref0 (cl); 2222 #line 2223 "tracker-resources.c" 2223 } 2224 } 2225 } 2226 #line 231 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2227 tracker_events_get_total (TRUE); 2228 #line 234 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2229 _tmp4_ = tracker_writeback_get_ready (); 2230 #line 234 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2231 _tmp5_ = _g_hash_table_ref0 (_tmp4_); 2232 #line 234 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2233 writebacks = _tmp5_; 2234 #line 236 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2235 _tmp6_ = writebacks; 2236 #line 236 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2237 if (_tmp6_ != NULL) { 2238 #line 2239 "tracker-resources.c" 2239 GVariantBuilder* _tmp7_; 2240 GVariantBuilder* builder; 2241 GHashTable* _tmp8_; 2242 GHashTableIter wb_iter = {0}; 2243 gint subject_id = 0; 2244 GArray* types = NULL; 2245 GVariantBuilder* _tmp28_; 2246 GVariant* _tmp29_ = NULL; 2247 GVariant* _tmp30_; 2248 #line 237 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2249 _tmp7_ = g_variant_builder_new ((const GVariantType*) "a{iai}"); 2250 #line 237 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2251 builder = _tmp7_; 2252 #line 239 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2253 _tmp8_ = writebacks; 2254 #line 239 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2255 g_hash_table_iter_init (&wb_iter, _tmp8_); 2256 #line 243 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2257 while (TRUE) { 2258 #line 2259 "tracker-resources.c" 2259 gconstpointer _tmp9_ = NULL; 2260 gconstpointer _tmp10_ = NULL; 2261 gboolean _tmp11_ = FALSE; 2262 GVariantBuilder* _tmp12_; 2263 GVariantBuilder* _tmp13_; 2264 gint _tmp14_; 2265 GVariantBuilder* _tmp15_; 2266 GVariantBuilder* _tmp26_; 2267 GVariantBuilder* _tmp27_; 2268 #line 243 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2269 _tmp11_ = g_hash_table_iter_next (&wb_iter, &_tmp9_, &_tmp10_); 2270 #line 243 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2271 subject_id = _tmp9_; 2272 #line 243 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2273 types = _tmp10_; 2274 #line 243 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2275 if (!_tmp11_) { 2276 #line 243 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2277 break; 2278 #line 2279 "tracker-resources.c" 2279 } 2280 #line 244 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2281 _tmp12_ = builder; 2282 #line 244 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2283 g_variant_builder_open (_tmp12_, (const GVariantType*) "{iai}"); 2284 #line 246 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2285 _tmp13_ = builder; 2286 #line 246 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2287 _tmp14_ = subject_id; 2288 #line 246 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2289 g_variant_builder_add (_tmp13_, "i", _tmp14_, NULL); 2290 #line 248 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2291 _tmp15_ = builder; 2292 #line 248 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2293 g_variant_builder_open (_tmp15_, (const GVariantType*) "ai"); 2294 #line 2295 "tracker-resources.c" 2295 { 2296 gint i; 2297 #line 249 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2298 i = 0; 2299 #line 2300 "tracker-resources.c" 2300 { 2301 gboolean _tmp16_; 2302 #line 249 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2303 _tmp16_ = TRUE; 2304 #line 249 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2305 while (TRUE) { 2306 #line 2307 "tracker-resources.c" 2307 gboolean _tmp17_; 2308 gint _tmp19_; 2309 GArray* _tmp20_; 2310 guint _tmp21_; 2311 GVariantBuilder* _tmp22_; 2312 GArray* _tmp23_; 2313 gint _tmp24_; 2314 gint _tmp25_ = 0; 2315 #line 249 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2316 _tmp17_ = _tmp16_; 2317 #line 249 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2318 if (!_tmp17_) { 2319 #line 2320 "tracker-resources.c" 2320 gint _tmp18_; 2321 #line 249 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2322 _tmp18_ = i; 2323 #line 249 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2324 i = _tmp18_ + 1; 2325 #line 2326 "tracker-resources.c" 2326 } 2327 #line 249 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2328 _tmp16_ = FALSE; 2329 #line 249 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2330 _tmp19_ = i; 2331 #line 249 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2332 _tmp20_ = types; 2333 #line 249 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2334 _tmp21_ = _tmp20_->len; 2335 #line 249 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2336 if (!(((guint) _tmp19_) < _tmp21_)) { 2337 #line 249 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2338 break; 2339 #line 2340 "tracker-resources.c" 2340 } 2341 #line 250 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2342 _tmp22_ = builder; 2343 #line 250 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2344 _tmp23_ = types; 2345 #line 250 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2346 _tmp24_ = i; 2347 #line 250 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2348 _tmp25_ = g_array_index (_tmp23_, gint, (guint) _tmp24_); 2349 #line 250 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2350 g_variant_builder_add (_tmp22_, "i", _tmp25_, NULL); 2351 #line 2352 "tracker-resources.c" 2352 } 2353 } 2354 } 2355 #line 252 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2356 _tmp26_ = builder; 2357 #line 252 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2358 g_variant_builder_close (_tmp26_); 2359 #line 254 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2360 _tmp27_ = builder; 2361 #line 254 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2362 g_variant_builder_close (_tmp27_); 2363 #line 2364 "tracker-resources.c" 2364 } 2365 #line 257 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2366 _tmp28_ = builder; 2367 #line 257 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2368 _tmp29_ = g_variant_builder_end (_tmp28_); 2369 #line 257 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2370 g_variant_ref_sink (_tmp29_); 2371 #line 257 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2372 _tmp30_ = _tmp29_; 2373 #line 257 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2374 g_signal_emit_by_name (self, "writeback", _tmp30_); 2375 #line 257 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2376 _g_variant_unref0 (_tmp30_); 2377 #line 236 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2378 _g_variant_builder_unref0 (builder); 2379 #line 2380 "tracker-resources.c" 2380 } 2381 #line 260 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2382 tracker_writeback_reset_ready (); 2383 #line 262 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2384 self->priv->regular_commit_pending = FALSE; 2385 #line 263 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2386 self->priv->signal_timeout = (guint) 0; 2387 #line 264 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2388 result = FALSE; 2389 #line 264 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2390 _g_hash_table_unref0 (writebacks); 2391 #line 264 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2392 return result; 2393 #line 2394 "tracker-resources.c" 2394 } 2395 2396 2397 static gboolean _tracker_resources_on_emit_signals_gsource_func (gpointer self) { 2398 gboolean result; 2399 result = tracker_resources_on_emit_signals (self); 2400 #line 296 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2401 return result; 2402 #line 2403 "tracker-resources.c" 2403 } 2404 2405 2406 static void tracker_resources_on_statements_committed (TrackerResources* self, TrackerDataCommitType commit_type) { 2407 gint _tmp0_ = 0; 2408 TrackerClass** _tmp1_ = NULL; 2409 gboolean _tmp4_; 2410 TrackerDataCommitType _tmp7_; 2411 gboolean _tmp8_ = FALSE; 2412 gboolean _tmp9_; 2413 gboolean _tmp11_; 2414 #line 267 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2415 g_return_if_fail (self != NULL); 2416 #line 270 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2417 _tmp1_ = tracker_events_get_classes (&_tmp0_); 2418 #line 2419 "tracker-resources.c" 2419 { 2420 TrackerClass** cl_collection = NULL; 2421 gint cl_collection_length1 = 0; 2422 gint _cl_collection_size_ = 0; 2423 gint cl_it = 0; 2424 #line 270 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2425 cl_collection = _tmp1_; 2426 #line 270 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2427 cl_collection_length1 = _tmp0_;
Value stored to 'cl_collection_length1' is never read
(emitted by clang-analyzer)

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

2428 #line 270 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2429 for (cl_it = 0; cl_it < _tmp0_; cl_it = cl_it + 1) { 2430 #line 2431 "tracker-resources.c" 2431 TrackerClass* _tmp2_; 2432 TrackerClass* cl = NULL; 2433 #line 270 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2434 _tmp2_ = _g_object_ref0 (cl_collection[cl_it]); 2435 #line 270 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2436 cl = _tmp2_; 2437 #line 2438 "tracker-resources.c" 2438 { 2439 TrackerClass* _tmp3_; 2440 #line 271 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2441 _tmp3_ = cl; 2442 #line 271 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2443 tracker_class_transact_events (_tmp3_); 2444 #line 270 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2445 _g_object_unref0 (cl); 2446 #line 2447 "tracker-resources.c" 2447 } 2448 } 2449 } 2450 #line 274 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2451 _tmp4_ = self->priv->regular_commit_pending; 2452 #line 274 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2453 if (!_tmp4_) { 2454 #line 2455 "tracker-resources.c" 2455 guint _tmp5_; 2456 #line 283 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2457 _tmp5_ = self->priv->signal_timeout; 2458 #line 283 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2459 if (_tmp5_ != ((guint) 0)) { 2460 #line 2461 "tracker-resources.c" 2461 guint _tmp6_; 2462 #line 284 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2463 _tmp6_ = self->priv->signal_timeout; 2464 #line 284 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2465 g_source_remove (_tmp6_); 2466 #line 285 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2467 self->priv->signal_timeout = (guint) 0; 2468 #line 2469 "tracker-resources.c" 2469 } 2470 } 2471 #line 289 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2472 _tmp7_ = commit_type; 2473 #line 289 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2474 if (_tmp7_ == TRACKER_DATA_COMMIT_REGULAR) { 2475 #line 290 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2476 self->priv->regular_commit_pending = TRUE; 2477 #line 2478 "tracker-resources.c" 2478 } 2479 #line 293 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2480 _tmp9_ = self->priv->regular_commit_pending; 2481 #line 293 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2482 if (_tmp9_) { 2483 #line 293 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2484 _tmp8_ = TRUE; 2485 #line 2486 "tracker-resources.c" 2486 } else { 2487 TrackerDataCommitType _tmp10_; 2488 #line 293 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2489 _tmp10_ = commit_type; 2490 #line 293 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2491 _tmp8_ = _tmp10_ == TRACKER_DATA_COMMIT_BATCH_LAST; 2492 #line 2493 "tracker-resources.c" 2493 } 2494 #line 293 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2495 _tmp11_ = _tmp8_; 2496 #line 293 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2497 if (_tmp11_) { 2498 #line 2499 "tracker-resources.c" 2499 guint _tmp12_; 2500 #line 295 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2501 _tmp12_ = self->priv->signal_timeout; 2502 #line 295 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2503 if (_tmp12_ == ((guint) 0)) { 2504 #line 2505 "tracker-resources.c" 2505 guint _tmp13_ = 0U; 2506 #line 296 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2507 _tmp13_ = g_timeout_add_full (G_PRIORITY_DEFAULT, (guint) (TRACKER_RESOURCES_SIGNALS_SECONDS_PER_EMIT * 1000), _tracker_resources_on_emit_signals_gsource_func, g_object_ref (self), g_object_unref); 2508 #line 296 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2509 self->priv->signal_timeout = _tmp13_; 2510 #line 2511 "tracker-resources.c" 2511 } 2512 } 2513 #line 301 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2514 tracker_writeback_transact (); 2515 #line 2516 "tracker-resources.c" 2516 } 2517 2518 2519 static void tracker_resources_on_statements_rolled_back (TrackerResources* self, TrackerDataCommitType commit_type) { 2520 #line 304 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2521 g_return_if_fail (self != NULL); 2522 #line 305 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2523 tracker_events_reset_pending (); 2524 #line 306 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2525 tracker_writeback_reset_pending (); 2526 #line 2527 "tracker-resources.c" 2527 } 2528 2529 2530 static void tracker_resources_check_graph_updated_signal (TrackerResources* self) { 2531 guint _tmp0_ = 0U; 2532 #line 309 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2533 g_return_if_fail (self != NULL); 2534 #line 311 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2535 _tmp0_ = tracker_events_get_total (FALSE); 2536 #line 311 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2537 if (_tmp0_ > ((guint) TRACKER_RESOURCES_GRAPH_UPDATED_IMMEDIATE_EMIT_AT)) { 2538 #line 2539 "tracker-resources.c" 2539 guint _tmp1_; 2540 #line 315 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2541 _tmp1_ = self->priv->signal_timeout; 2542 #line 315 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2543 if (_tmp1_ != ((guint) 0)) { 2544 #line 2545 "tracker-resources.c" 2545 guint _tmp2_; 2546 #line 316 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2547 _tmp2_ = self->priv->signal_timeout; 2548 #line 316 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2549 g_source_remove (_tmp2_); 2550 #line 317 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2551 self->priv->signal_timeout = (guint) 0; 2552 #line 2553 "tracker-resources.c" 2553 } 2554 #line 321 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2555 tracker_resources_on_emit_signals (self); 2556 #line 2557 "tracker-resources.c" 2557 } 2558 } 2559 2560 2561 static void tracker_resources_on_statement_inserted (TrackerResources* self, gint graph_id, const gchar* graph, gint subject_id, const gchar* subject, gint pred_id, gint object_id, const gchar* object, GPtrArray* rdf_types) { 2562 gint _tmp0_; 2563 gint _tmp1_; 2564 const gchar* _tmp2_; 2565 gint _tmp3_; 2566 gint _tmp4_; 2567 const gchar* _tmp5_; 2568 GPtrArray* _tmp6_; 2569 gint _tmp7_; 2570 const gchar* _tmp8_; 2571 gint _tmp9_; 2572 const gchar* _tmp10_; 2573 gint _tmp11_; 2574 gint _tmp12_; 2575 const gchar* _tmp13_; 2576 GPtrArray* _tmp14_; 2577 #line 325 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2578 g_return_if_fail (self != NULL); 2579 #line 325 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2580 g_return_if_fail (subject != NULL); 2581 #line 325 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2582 g_return_if_fail (rdf_types != NULL); 2583 #line 326 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2584 _tmp0_ = graph_id; 2585 #line 326 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2586 _tmp1_ = subject_id; 2587 #line 326 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2588 _tmp2_ = subject; 2589 #line 326 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2590 _tmp3_ = pred_id; 2591 #line 326 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2592 _tmp4_ = object_id; 2593 #line 326 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2594 _tmp5_ = object; 2595 #line 326 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2596 _tmp6_ = rdf_types; 2597 #line 326 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2598 tracker_events_add_insert (_tmp0_, _tmp1_, _tmp2_, _tmp3_, _tmp4_, _tmp5_, _tmp6_); 2599 #line 327 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2600 _tmp7_ = graph_id; 2601 #line 327 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2602 _tmp8_ = graph; 2603 #line 327 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2604 _tmp9_ = subject_id; 2605 #line 327 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2606 _tmp10_ = subject; 2607 #line 327 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2608 _tmp11_ = pred_id; 2609 #line 327 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2610 _tmp12_ = object_id; 2611 #line 327 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2612 _tmp13_ = object; 2613 #line 327 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2614 _tmp14_ = rdf_types; 2615 #line 327 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2616 tracker_writeback_check (_tmp7_, _tmp8_, _tmp9_, _tmp10_, _tmp11_, _tmp12_, _tmp13_, _tmp14_); 2617 #line 328 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2618 tracker_resources_check_graph_updated_signal (self); 2619 #line 2620 "tracker-resources.c" 2620 } 2621 2622 2623 static void tracker_resources_on_statement_deleted (TrackerResources* self, gint graph_id, const gchar* graph, gint subject_id, const gchar* subject, gint pred_id, gint object_id, const gchar* object, GPtrArray* rdf_types) { 2624 gint _tmp0_; 2625 gint _tmp1_; 2626 const gchar* _tmp2_; 2627 gint _tmp3_; 2628 gint _tmp4_; 2629 const gchar* _tmp5_; 2630 GPtrArray* _tmp6_; 2631 gint _tmp7_; 2632 const gchar* _tmp8_; 2633 gint _tmp9_; 2634 const gchar* _tmp10_; 2635 gint _tmp11_; 2636 gint _tmp12_; 2637 const gchar* _tmp13_; 2638 GPtrArray* _tmp14_; 2639 #line 331 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2640 g_return_if_fail (self != NULL); 2641 #line 331 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2642 g_return_if_fail (subject != NULL); 2643 #line 331 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2644 g_return_if_fail (rdf_types != NULL); 2645 #line 332 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2646 _tmp0_ = graph_id; 2647 #line 332 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2648 _tmp1_ = subject_id; 2649 #line 332 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2650 _tmp2_ = subject; 2651 #line 332 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2652 _tmp3_ = pred_id; 2653 #line 332 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2654 _tmp4_ = object_id; 2655 #line 332 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2656 _tmp5_ = object; 2657 #line 332 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2658 _tmp6_ = rdf_types; 2659 #line 332 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2660 tracker_events_add_delete (_tmp0_, _tmp1_, _tmp2_, _tmp3_, _tmp4_, _tmp5_, _tmp6_); 2661 #line 333 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2662 _tmp7_ = graph_id; 2663 #line 333 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2664 _tmp8_ = graph; 2665 #line 333 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2666 _tmp9_ = subject_id; 2667 #line 333 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2668 _tmp10_ = subject; 2669 #line 333 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2670 _tmp11_ = pred_id; 2671 #line 333 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2672 _tmp12_ = object_id; 2673 #line 333 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2674 _tmp13_ = object; 2675 #line 333 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2676 _tmp14_ = rdf_types; 2677 #line 333 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2678 tracker_writeback_check (_tmp7_, _tmp8_, _tmp9_, _tmp10_, _tmp11_, _tmp12_, _tmp13_, _tmp14_); 2679 #line 334 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2680 tracker_resources_check_graph_updated_signal (self); 2681 #line 2682 "tracker-resources.c" 2682 } 2683 2684 2685 static void _tracker_resources_on_statement_inserted_tracker_statement_callback (gint graph_id, const gchar* graph, gint subject_id, const gchar* subject, gint predicate_id, gint object_id, const gchar* object, GPtrArray* rdf_types, gpointer self) { 2686 #line 339 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2687 tracker_resources_on_statement_inserted (self, graph_id, graph, subject_id, subject, predicate_id, object_id, object, rdf_types); 2688 #line 2689 "tracker-resources.c" 2689 } 2690 2691 2692 static void _tracker_resources_on_statement_deleted_tracker_statement_callback (gint graph_id, const gchar* graph, gint subject_id, const gchar* subject, gint predicate_id, gint object_id, const gchar* object, GPtrArray* rdf_types, gpointer self) { 2693 #line 340 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2694 tracker_resources_on_statement_deleted (self, graph_id, graph, subject_id, subject, predicate_id, object_id, object, rdf_types); 2695 #line 2696 "tracker-resources.c" 2696 } 2697 2698 2699 static void _tracker_resources_on_statements_committed_tracker_commit_callback (TrackerDataCommitType commit_type, gpointer self) { 2700 #line 341 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2701 tracker_resources_on_statements_committed (self, commit_type); 2702 #line 2703 "tracker-resources.c" 2703 } 2704 2705 2706 static void _tracker_resources_on_statements_rolled_back_tracker_commit_callback (TrackerDataCommitType commit_type, gpointer self) { 2707 #line 342 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2708 tracker_resources_on_statements_rolled_back (self, commit_type); 2709 #line 2710 "tracker-resources.c" 2710 } 2711 2712 2713 void tracker_resources_enable_signals (TrackerResources* self) { 2714 #line 338 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2715 g_return_if_fail (self != NULL); 2716 #line 339 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2717 tracker_data_add_insert_statement_callback (_tracker_resources_on_statement_inserted_tracker_statement_callback, self); 2718 #line 340 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2719 tracker_data_add_delete_statement_callback (_tracker_resources_on_statement_deleted_tracker_statement_callback, self); 2720 #line 341 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2721 tracker_data_add_commit_statement_callback (_tracker_resources_on_statements_committed_tracker_commit_callback, self); 2722 #line 342 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2723 tracker_data_add_rollback_statement_callback (_tracker_resources_on_statements_rolled_back_tracker_commit_callback, self); 2724 #line 2725 "tracker-resources.c" 2725 } 2726 2727 2728 void tracker_resources_disable_signals (TrackerResources* self) { 2729 guint _tmp0_; 2730 #line 346 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2731 g_return_if_fail (self != NULL); 2732 #line 347 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2733 tracker_data_remove_insert_statement_callback (_tracker_resources_on_statement_inserted_tracker_statement_callback, self); 2734 #line 348 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2735 tracker_data_remove_delete_statement_callback (_tracker_resources_on_statement_deleted_tracker_statement_callback, self); 2736 #line 349 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2737 tracker_data_remove_commit_statement_callback (_tracker_resources_on_statements_committed_tracker_commit_callback, self); 2738 #line 350 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2739 tracker_data_remove_rollback_statement_callback (_tracker_resources_on_statements_rolled_back_tracker_commit_callback, self); 2740 #line 352 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2741 _tmp0_ = self->priv->signal_timeout; 2742 #line 352 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2743 if (_tmp0_ != ((guint) 0)) { 2744 #line 2745 "tracker-resources.c" 2745 guint _tmp1_; 2746 #line 353 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2747 _tmp1_ = self->priv->signal_timeout; 2748 #line 353 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2749 g_source_remove (_tmp1_); 2750 #line 2751 "tracker-resources.c" 2751 } 2752 } 2753 2754 2755 void tracker_resources_unreg_batches (TrackerResources* self, const gchar* old_owner) { 2756 const gchar* _tmp0_; 2757 #line 362 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2758 g_return_if_fail (self != NULL); 2759 #line 362 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2760 g_return_if_fail (old_owner != NULL); 2761 #line 363 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2762 _tmp0_ = old_owner; 2763 #line 363 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2764 tracker_store_unreg_batches (_tmp0_); 2765 #line 2766 "tracker-resources.c" 2766 } 2767 2768 2769 static void g_cclosure_user_marshal_VOID__VARIANT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { 2770 typedef void (*GMarshalFunc_VOID__VARIANT) (gpointer data1, gpointer arg_1, gpointer data2); 2771 register GMarshalFunc_VOID__VARIANT callback; 2772 register GCClosure * cc; 2773 register gpointer data1; 2774 register gpointer data2; 2775 cc = (GCClosure *) closure; 2776 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2777 g_return_if_fail (n_param_values == 2); 2778 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2779 if (G_CCLOSURE_SWAP_DATA (closure)) { 2780 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2781 data1 = closure->data; 2782 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2783 data2 = param_values->data[0].v_pointer; 2784 #line 2785 "tracker-resources.c" 2785 } else { 2786 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2787 data1 = param_values->data[0].v_pointer; 2788 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2789 data2 = closure->data; 2790 #line 2791 "tracker-resources.c" 2791 } 2792 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2793 callback = (GMarshalFunc_VOID__VARIANT) (marshal_data ? marshal_data : cc->callback); 2794 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2795 callback (data1, g_value_get_variant (param_values + 1), data2); 2796 #line 2797 "tracker-resources.c" 2797 } 2798 2799 2800 static void g_cclosure_user_marshal_VOID__STRING_VARIANT_VARIANT (GClosure * closure, GValue * return_value, guint n_param_values, const GValue * param_values, gpointer invocation_hint, gpointer marshal_data) { 2801 typedef void (*GMarshalFunc_VOID__STRING_VARIANT_VARIANT) (gpointer data1, const char* arg_1, gpointer arg_2, gpointer arg_3, gpointer data2); 2802 register GMarshalFunc_VOID__STRING_VARIANT_VARIANT callback; 2803 register GCClosure * cc; 2804 register gpointer data1; 2805 register gpointer data2; 2806 cc = (GCClosure *) closure; 2807 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2808 g_return_if_fail (n_param_values == 4); 2809 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2810 if (G_CCLOSURE_SWAP_DATA (closure)) { 2811 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2812 data1 = closure->data; 2813 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2814 data2 = param_values->data[0].v_pointer; 2815 #line 2816 "tracker-resources.c" 2816 } else { 2817 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2818 data1 = param_values->data[0].v_pointer; 2819 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2820 data2 = closure->data; 2821 #line 2822 "tracker-resources.c" 2822 } 2823 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2824 callback = (GMarshalFunc_VOID__STRING_VARIANT_VARIANT) (marshal_data ? marshal_data : cc->callback); 2825 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2826 callback (data1, g_value_get_string (param_values + 1), g_value_get_variant (param_values + 2), g_value_get_variant (param_values + 3), data2); 2827 #line 2828 "tracker-resources.c" 2828 } 2829 2830 2831 static void tracker_resources_class_init (TrackerResourcesClass * klass) { 2832 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2833 tracker_resources_parent_class = g_type_class_peek_parent (klass); 2834 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2835 g_type_class_add_private (klass, sizeof (TrackerResourcesPrivate)); 2836 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2837 G_OBJECT_CLASS (klass)->finalize = tracker_resources_finalize; 2838 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2839 g_signal_new ("writeback", TRACKER_TYPE_RESOURCES, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__VARIANT, G_TYPE_NONE, 1, G_TYPE_VARIANT); 2840 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2841 g_signal_new ("graph_updated", TRACKER_TYPE_RESOURCES, G_SIGNAL_RUN_LAST, 0, NULL, NULL, g_cclosure_user_marshal_VOID__STRING_VARIANT_VARIANT, G_TYPE_NONE, 3, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_VARIANT); 2842 #line 2843 "tracker-resources.c" 2843 } 2844 2845 2846 static void tracker_resources_instance_init (TrackerResources * self) { 2847 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2848 self->priv = TRACKER_RESOURCES_GET_PRIVATE (self); 2849 #line 2850 "tracker-resources.c" 2850 } 2851 2852 2853 static void tracker_resources_finalize (GObject* obj) { 2854 TrackerResources * self; 2855 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2856 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_TYPE_RESOURCES, TrackerResources); 2857 #line 358 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2858 tracker_resources_disable_signals (self); 2859 #line 53 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2860 _g_object_unref0 (self->priv->connection); 2861 #line 22 "/home/martyn/Source/tracker/src/tracker-store/tracker-resources.vala" 2862 G_OBJECT_CLASS (tracker_resources_parent_class)->finalize (obj); 2863 #line 2864 "tracker-resources.c" 2864 } 2865 2866 2867 GType tracker_resources_get_type (void) { 2868 static volatile gsize tracker_resources_type_id__volatile = 0; 2869 if (g_once_init_enter (&tracker_resources_type_id__volatile)) { 2870 static const GTypeInfo g_define_type_info = { sizeof (TrackerResourcesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_resources_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerResources), 0, (GInstanceInitFunc) tracker_resources_instance_init, NULL }; 2871 GType tracker_resources_type_id; 2872 tracker_resources_type_id = g_type_register_static (G_TYPE_OBJECT, "TrackerResources", &g_define_type_info, 0); 2873 g_type_set_qdata (tracker_resources_type_id, g_quark_from_static_string ("vala-dbus-register-object"), (void*) tracker_resources_register_object); 2874 g_once_init_leave (&tracker_resources_type_id__volatile, tracker_resources_type_id); 2875 } 2876 return tracker_resources_type_id__volatile; 2877 } 2878 2879 2880 static void _dbus_tracker_resources_load (TrackerResources* self, GVariant* parameters, GDBusMethodInvocation* invocation) { 2881 GVariantIter _arguments_iter; 2882 gchar* uri = NULL; 2883 GVariant* _tmp2_; 2884 g_variant_iter_init (&_arguments_iter, parameters); 2885 _tmp2_ = g_variant_iter_next_value (&_arguments_iter); 2886 uri = g_variant_dup_string (_tmp2_, NULL); 2887 g_variant_unref (_tmp2_); 2888 tracker_resources_load (self, g_dbus_method_invocation_get_sender (invocation), uri, (GAsyncReadyCallback) _dbus_tracker_resources_load_ready, invocation); 2889 _g_free0 (uri); 2890 } 2891 2892 2893 static void _dbus_tracker_resources_load_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) { 2894 GDBusMethodInvocation * invocation; 2895 GError* error = NULL; 2896 GDBusMessage* _reply_message; 2897 GVariant* _reply; 2898 GVariantBuilder _reply_builder; 2899 invocation = _user_data_; 2900 tracker_resources_load_finish ((TrackerResources*) source_object, _res_, &error); 2901 if (error) { 2902 g_dbus_method_invocation_return_gerror (invocation, error); 2903 return; 2904 } 2905 _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); 2906 g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); 2907 _reply = g_variant_builder_end (&_reply_builder); 2908 g_dbus_message_set_body (_reply_message, _reply); 2909 g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); 2910 g_object_unref (invocation); 2911 g_object_unref (_reply_message); 2912 } 2913 2914 2915 static void _dbus_tracker_resources_sparql_query (TrackerResources* self, GVariant* parameters, GDBusMethodInvocation* invocation) { 2916 GVariantIter _arguments_iter; 2917 gchar* query = NULL; 2918 GVariant* _tmp3_; 2919 g_variant_iter_init (&_arguments_iter, parameters); 2920 _tmp3_ = g_variant_iter_next_value (&_arguments_iter); 2921 query = g_variant_dup_string (_tmp3_, NULL); 2922 g_variant_unref (_tmp3_); 2923 tracker_resources_sparql_query (self, g_dbus_method_invocation_get_sender (invocation), query, (GAsyncReadyCallback) _dbus_tracker_resources_sparql_query_ready, invocation); 2924 _g_free0 (query); 2925 } 2926 2927 2928 static void _dbus_tracker_resources_sparql_query_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) { 2929 GDBusMethodInvocation * invocation; 2930 GError* error = NULL; 2931 GDBusMessage* _reply_message; 2932 GVariant* _reply; 2933 GVariantBuilder _reply_builder; 2934 GVariant* result; 2935 invocation = _user_data_; 2936 result = tracker_resources_sparql_query_finish ((TrackerResources*) source_object, _res_, &error); 2937 if (error) { 2938 g_dbus_method_invocation_return_gerror (invocation, error); 2939 return; 2940 } 2941 _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); 2942 g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); 2943 g_variant_builder_add_value (&_reply_builder, result); 2944 _g_variant_unref0 (result); 2945 _reply = g_variant_builder_end (&_reply_builder); 2946 g_dbus_message_set_body (_reply_message, _reply); 2947 g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); 2948 g_object_unref (invocation); 2949 g_object_unref (_reply_message); 2950 } 2951 2952 2953 static void _dbus_tracker_resources_sparql_update (TrackerResources* self, GVariant* parameters, GDBusMethodInvocation* invocation) { 2954 GVariantIter _arguments_iter; 2955 gchar* update = NULL; 2956 GVariant* _tmp4_; 2957 g_variant_iter_init (&_arguments_iter, parameters); 2958 _tmp4_ = g_variant_iter_next_value (&_arguments_iter); 2959 update = g_variant_dup_string (_tmp4_, NULL); 2960 g_variant_unref (_tmp4_); 2961 tracker_resources_sparql_update (self, g_dbus_method_invocation_get_sender (invocation), update, (GAsyncReadyCallback) _dbus_tracker_resources_sparql_update_ready, invocation); 2962 _g_free0 (update); 2963 } 2964 2965 2966 static void _dbus_tracker_resources_sparql_update_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) { 2967 GDBusMethodInvocation * invocation; 2968 GError* error = NULL; 2969 GDBusMessage* _reply_message; 2970 GVariant* _reply; 2971 GVariantBuilder _reply_builder; 2972 invocation = _user_data_; 2973 tracker_resources_sparql_update_finish ((TrackerResources*) source_object, _res_, &error); 2974 if (error) { 2975 g_dbus_method_invocation_return_gerror (invocation, error); 2976 return; 2977 } 2978 _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); 2979 g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); 2980 _reply = g_variant_builder_end (&_reply_builder); 2981 g_dbus_message_set_body (_reply_message, _reply); 2982 g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); 2983 g_object_unref (invocation); 2984 g_object_unref (_reply_message); 2985 } 2986 2987 2988 static void _dbus_tracker_resources_sparql_update_blank (TrackerResources* self, GVariant* parameters, GDBusMethodInvocation* invocation) { 2989 GVariantIter _arguments_iter; 2990 gchar* update = NULL; 2991 GVariant* _tmp5_; 2992 g_variant_iter_init (&_arguments_iter, parameters); 2993 _tmp5_ = g_variant_iter_next_value (&_arguments_iter); 2994 update = g_variant_dup_string (_tmp5_, NULL); 2995 g_variant_unref (_tmp5_); 2996 tracker_resources_sparql_update_blank (self, g_dbus_method_invocation_get_sender (invocation), update, (GAsyncReadyCallback) _dbus_tracker_resources_sparql_update_blank_ready, invocation); 2997 _g_free0 (update); 2998 } 2999 3000 3001 static void _dbus_tracker_resources_sparql_update_blank_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) { 3002 GDBusMethodInvocation * invocation; 3003 GError* error = NULL; 3004 GDBusMessage* _reply_message; 3005 GVariant* _reply; 3006 GVariantBuilder _reply_builder; 3007 GVariant* result; 3008 invocation = _user_data_; 3009 result = tracker_resources_sparql_update_blank_finish ((TrackerResources*) source_object, _res_, &error); 3010 if (error) { 3011 g_dbus_method_invocation_return_gerror (invocation, error); 3012 return; 3013 } 3014 _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); 3015 g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); 3016 g_variant_builder_add_value (&_reply_builder, result); 3017 _g_variant_unref0 (result); 3018 _reply = g_variant_builder_end (&_reply_builder); 3019 g_dbus_message_set_body (_reply_message, _reply); 3020 g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); 3021 g_object_unref (invocation); 3022 g_object_unref (_reply_message); 3023 } 3024 3025 3026 static void _dbus_tracker_resources_sync (TrackerResources* self, GVariant* parameters, GDBusMethodInvocation* invocation) { 3027 GError* error = NULL;
unused variable 'error'
(emitted by gcc)
3028 GVariantIter _arguments_iter; 3029 GDBusMessage* _reply_message; 3030 GVariant* _reply; 3031 GVariantBuilder _reply_builder; 3032 g_variant_iter_init (&_arguments_iter, parameters); 3033 tracker_resources_sync (self, g_dbus_method_invocation_get_sender (invocation)); 3034 _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); 3035 g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); 3036 _reply = g_variant_builder_end (&_reply_builder); 3037 g_dbus_message_set_body (_reply_message, _reply); 3038 g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); 3039 g_object_unref (invocation); 3040 g_object_unref (_reply_message); 3041 } 3042 3043 3044 static void _dbus_tracker_resources_batch_sparql_update (TrackerResources* self, GVariant* parameters, GDBusMethodInvocation* invocation) { 3045 GVariantIter _arguments_iter; 3046 gchar* update = NULL; 3047 GVariant* _tmp6_; 3048 g_variant_iter_init (&_arguments_iter, parameters); 3049 _tmp6_ = g_variant_iter_next_value (&_arguments_iter); 3050 update = g_variant_dup_string (_tmp6_, NULL); 3051 g_variant_unref (_tmp6_); 3052 tracker_resources_batch_sparql_update (self, g_dbus_method_invocation_get_sender (invocation), update, (GAsyncReadyCallback) _dbus_tracker_resources_batch_sparql_update_ready, invocation); 3053 _g_free0 (update); 3054 } 3055 3056 3057 static void _dbus_tracker_resources_batch_sparql_update_ready (GObject * source_object, GAsyncResult * _res_, gpointer _user_data_) { 3058 GDBusMethodInvocation * invocation; 3059 GError* error = NULL; 3060 GDBusMessage* _reply_message; 3061 GVariant* _reply; 3062 GVariantBuilder _reply_builder; 3063 invocation = _user_data_; 3064 tracker_resources_batch_sparql_update_finish ((TrackerResources*) source_object, _res_, &error); 3065 if (error) { 3066 g_dbus_method_invocation_return_gerror (invocation, error); 3067 return; 3068 } 3069 _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); 3070 g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); 3071 _reply = g_variant_builder_end (&_reply_builder); 3072 g_dbus_message_set_body (_reply_message, _reply); 3073 g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); 3074 g_object_unref (invocation); 3075 g_object_unref (_reply_message); 3076 } 3077 3078 3079 static void _dbus_tracker_resources_batch_commit (TrackerResources* self, GVariant* parameters, GDBusMethodInvocation* invocation) { 3080 GError* error = NULL;
unused variable 'error'
(emitted by gcc)
3081 GVariantIter _arguments_iter; 3082 GDBusMessage* _reply_message; 3083 GVariant* _reply; 3084 GVariantBuilder _reply_builder; 3085 g_variant_iter_init (&_arguments_iter, parameters); 3086 tracker_resources_batch_commit (self); 3087 _reply_message = g_dbus_message_new_method_reply (g_dbus_method_invocation_get_message (invocation)); 3088 g_variant_builder_init (&_reply_builder, G_VARIANT_TYPE_TUPLE); 3089 _reply = g_variant_builder_end (&_reply_builder); 3090 g_dbus_message_set_body (_reply_message, _reply); 3091 g_dbus_connection_send_message (g_dbus_method_invocation_get_connection (invocation), _reply_message, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL); 3092 g_object_unref (invocation); 3093 g_object_unref (_reply_message); 3094 } 3095 3096 3097 static void tracker_resources_dbus_interface_method_call (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* method_name, GVariant* parameters, GDBusMethodInvocation* invocation, gpointer user_data) { 3098 gpointer* data; 3099 gpointer object; 3100 data = user_data; 3101 object = data[0]; 3102 if (strcmp (method_name, "Load") == 0) { 3103 _dbus_tracker_resources_load (object, parameters, invocation); 3104 } else if (strcmp (method_name, "SparqlQuery") == 0) { 3105 _dbus_tracker_resources_sparql_query (object, parameters, invocation); 3106 } else if (strcmp (method_name, "SparqlUpdate") == 0) { 3107 _dbus_tracker_resources_sparql_update (object, parameters, invocation); 3108 } else if (strcmp (method_name, "SparqlUpdateBlank") == 0) { 3109 _dbus_tracker_resources_sparql_update_blank (object, parameters, invocation); 3110 } else if (strcmp (method_name, "Sync") == 0) { 3111 _dbus_tracker_resources_sync (object, parameters, invocation); 3112 } else if (strcmp (method_name, "BatchSparqlUpdate") == 0) { 3113 _dbus_tracker_resources_batch_sparql_update (object, parameters, invocation); 3114 } else if (strcmp (method_name, "BatchCommit") == 0) { 3115 _dbus_tracker_resources_batch_commit (object, parameters, invocation); 3116 } else { 3117 g_object_unref (invocation); 3118 } 3119 } 3120 3121 3122 static GVariant* tracker_resources_dbus_interface_get_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GError** error, gpointer user_data) { 3123 gpointer* data; 3124 gpointer object;
variable 'object' set but not used
(emitted by gcc)
3125 data = user_data; 3126 object = data[0];
Value stored to 'object' is never read
(emitted by clang-analyzer)

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

3127 return NULL; 3128 } 3129 3130 3131 static gboolean tracker_resources_dbus_interface_set_property (GDBusConnection* connection, const gchar* sender, const gchar* object_path, const gchar* interface_name, const gchar* property_name, GVariant* value, GError** error, gpointer user_data) { 3132 gpointer* data; 3133 gpointer object;
variable 'object' set but not used
(emitted by gcc)
3134 data = user_data; 3135 object = data[0];
Value stored to 'object' is never read
(emitted by clang-analyzer)

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

3136 return FALSE; 3137 } 3138 3139 3140 static void _dbus_tracker_resources_writeback (GObject* _sender, GVariant* subjects, gpointer* _data) { 3141 GDBusConnection * _connection; 3142 const gchar * _path; 3143 GVariant *_arguments; 3144 GVariantBuilder _arguments_builder; 3145 _connection = _data[1]; 3146 _path = _data[2]; 3147 g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); 3148 g_variant_builder_add_value (&_arguments_builder, subjects); 3149 _arguments = g_variant_builder_end (&_arguments_builder); 3150 g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.Tracker1.Resources", "Writeback", _arguments, NULL); 3151 } 3152 3153 3154 static void _dbus_tracker_resources_graph_updated (GObject* _sender, const gchar* classname, GVariant* deletes, GVariant* inserts, gpointer* _data) { 3155 GDBusConnection * _connection; 3156 const gchar * _path; 3157 GVariant *_arguments; 3158 GVariantBuilder _arguments_builder; 3159 _connection = _data[1]; 3160 _path = _data[2]; 3161 g_variant_builder_init (&_arguments_builder, G_VARIANT_TYPE_TUPLE); 3162 g_variant_builder_add_value (&_arguments_builder, g_variant_new_string (classname)); 3163 g_variant_builder_add_value (&_arguments_builder, deletes); 3164 g_variant_builder_add_value (&_arguments_builder, inserts); 3165 _arguments = g_variant_builder_end (&_arguments_builder); 3166 g_dbus_connection_emit_signal (_connection, NULL, _path, "org.freedesktop.Tracker1.Resources", "GraphUpdated", _arguments, NULL); 3167 } 3168 3169 3170 guint tracker_resources_register_object (gpointer object, GDBusConnection* connection, const gchar* path, GError** error) { 3171 guint result; 3172 gpointer *data; 3173 data = g_new (gpointer, 3); 3174 data[0] = g_object_ref (object); 3175 data[1] = g_object_ref (connection); 3176 data[2] = g_strdup (path); 3177 result = g_dbus_connection_register_object (connection, path, (GDBusInterfaceInfo *) (&_tracker_resources_dbus_interface_info), &_tracker_resources_dbus_interface_vtable, data, _tracker_resources_unregister_object, error); 3178 if (!result) { 3179 return 0; 3180 } 3181 g_signal_connect (object, "writeback", (GCallback) _dbus_tracker_resources_writeback, data); 3182 g_signal_connect (object, "graph-updated", (GCallback) _dbus_tracker_resources_graph_updated, data); 3183 return result; 3184 } 3185 3186 3187 static void _tracker_resources_unregister_object (gpointer user_data) { 3188 gpointer* data; 3189 data = user_data; 3190 g_signal_handlers_disconnect_by_func (data[0], _dbus_tracker_resources_writeback, data); 3191 g_signal_handlers_disconnect_by_func (data[0], _dbus_tracker_resources_graph_updated, data); 3192 g_object_unref (data[0]); 3193 g_object_unref (data[1]); 3194 g_free (data[2]); 3195 g_free (data); 3196 }