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

Location Tool Test ID Function Issue
tracker-dbus.c:308:14 gcc tracker_dbus_register_object expected 'void *' but argument is of type 'gconstpointer'
tracker-dbus.c:1248:16 gcc unused-but-set-variable tracker_dbus_finalize variable 'self' set but not used
tracker-dbus.c:1250:2 clang-analyzer Value stored to 'self' is never read
   1 /* tracker-dbus.c generated by valac 0.18.1, the Vala compiler
   2  * generated from tracker-dbus.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 <gobject/gvaluecollector.h>
  30 
  31 
  32 #define TRACKER_TYPE_DBUS (tracker_dbus_get_type ())
  33 #define TRACKER_DBUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_TYPE_DBUS, TrackerDBus))
  34 #define TRACKER_DBUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_DBUS, TrackerDBusClass))
  35 #define TRACKER_IS_DBUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_TYPE_DBUS))
  36 #define TRACKER_IS_DBUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_DBUS))
  37 #define TRACKER_DBUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_DBUS, TrackerDBusClass))
  38 
  39 typedef struct _TrackerDBus TrackerDBus;
  40 typedef struct _TrackerDBusClass TrackerDBusClass;
  41 typedef struct _TrackerDBusPrivate TrackerDBusPrivate;
  42 
  43 #define TRACKER_TYPE_STATISTICS (tracker_statistics_get_type ())
  44 #define TRACKER_STATISTICS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_TYPE_STATISTICS, TrackerStatistics))
  45 #define TRACKER_STATISTICS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_STATISTICS, TrackerStatisticsClass))
  46 #define TRACKER_IS_STATISTICS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_TYPE_STATISTICS))
  47 #define TRACKER_IS_STATISTICS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_STATISTICS))
  48 #define TRACKER_STATISTICS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_STATISTICS, TrackerStatisticsClass))
  49 
  50 typedef struct _TrackerStatistics TrackerStatistics;
  51 typedef struct _TrackerStatisticsClass TrackerStatisticsClass;
  52 
  53 #define TRACKER_TYPE_RESOURCES (tracker_resources_get_type ())
  54 #define TRACKER_RESOURCES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_TYPE_RESOURCES, TrackerResources))
  55 #define TRACKER_RESOURCES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_RESOURCES, TrackerResourcesClass))
  56 #define TRACKER_IS_RESOURCES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_TYPE_RESOURCES))
  57 #define TRACKER_IS_RESOURCES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_RESOURCES))
  58 #define TRACKER_RESOURCES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_RESOURCES, TrackerResourcesClass))
  59 
  60 typedef struct _TrackerResources TrackerResources;
  61 typedef struct _TrackerResourcesClass TrackerResourcesClass;
  62 
  63 #define TRACKER_TYPE_STEROIDS (tracker_steroids_get_type ())
  64 #define TRACKER_STEROIDS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_TYPE_STEROIDS, TrackerSteroids))
  65 #define TRACKER_STEROIDS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_STEROIDS, TrackerSteroidsClass))
  66 #define TRACKER_IS_STEROIDS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_TYPE_STEROIDS))
  67 #define TRACKER_IS_STEROIDS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_STEROIDS))
  68 #define TRACKER_STEROIDS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_STEROIDS, TrackerSteroidsClass))
  69 
  70 typedef struct _TrackerSteroids TrackerSteroids;
  71 typedef struct _TrackerSteroidsClass TrackerSteroidsClass;
  72 
  73 #define TRACKER_TYPE_STATUS (tracker_status_get_type ())
  74 #define TRACKER_STATUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_TYPE_STATUS, TrackerStatus))
  75 #define TRACKER_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_STATUS, TrackerStatusClass))
  76 #define TRACKER_IS_STATUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_TYPE_STATUS))
  77 #define TRACKER_IS_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_STATUS))
  78 #define TRACKER_STATUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_STATUS, TrackerStatusClass))
  79 
  80 typedef struct _TrackerStatus TrackerStatus;
  81 typedef struct _TrackerStatusClass TrackerStatusClass;
  82 
  83 #define TRACKER_TYPE_BACKUP (tracker_backup_get_type ())
  84 #define TRACKER_BACKUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_TYPE_BACKUP, TrackerBackup))
  85 #define TRACKER_BACKUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_BACKUP, TrackerBackupClass))
  86 #define TRACKER_IS_BACKUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_TYPE_BACKUP))
  87 #define TRACKER_IS_BACKUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_BACKUP))
  88 #define TRACKER_BACKUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_BACKUP, TrackerBackupClass))
  89 
  90 typedef struct _TrackerBackup TrackerBackup;
  91 typedef struct _TrackerBackupClass TrackerBackupClass;
  92 #define _g_variant_unref0(var) ((var == NULL) ? NULL : (var = (g_variant_unref (var), NULL)))
  93 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
  94 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
  95 typedef struct _TrackerParamSpecDBus TrackerParamSpecDBus;
  96 
  97 struct _TrackerDBus {
  98 	GTypeInstance parent_instance;
  99 	volatile int ref_count;
 100 	TrackerDBusPrivate * priv;
 101 };
 102 
 103 struct _TrackerDBusClass {
 104 	GTypeClass parent_class;
 105 	void (*finalize) (TrackerDBus *self);
 106 };
 107 
 108 struct _TrackerParamSpecDBus {
 109 	GParamSpec parent_instance;
 110 };
 111 
 112 
 113 static gpointer tracker_dbus_parent_class = NULL;
 114 static GDBusConnection* tracker_dbus_connection;
 115 static GDBusConnection* tracker_dbus_connection = NULL;
 116 static guint tracker_dbus_name_owner_changed_id;
 117 static guint tracker_dbus_name_owner_changed_id = 0U;
 118 static TrackerStatistics* tracker_dbus_statistics;
 119 static TrackerStatistics* tracker_dbus_statistics = NULL;
 120 static guint tracker_dbus_statistics_id;
 121 static guint tracker_dbus_statistics_id = 0U;
 122 static TrackerResources* tracker_dbus_resources;
 123 static TrackerResources* tracker_dbus_resources = NULL;
 124 static guint tracker_dbus_resources_id;
 125 static guint tracker_dbus_resources_id = 0U;
 126 static TrackerSteroids* tracker_dbus_steroids;
 127 static TrackerSteroids* tracker_dbus_steroids = NULL;
 128 static guint tracker_dbus_steroids_id;
 129 static guint tracker_dbus_steroids_id = 0U;
 130 static TrackerStatus* tracker_dbus_notifier;
 131 static TrackerStatus* tracker_dbus_notifier = NULL;
 132 static guint tracker_dbus_notifier_id;
 133 static guint tracker_dbus_notifier_id = 0U;
 134 static TrackerBackup* tracker_dbus_backup;
 135 static TrackerBackup* tracker_dbus_backup = NULL;
 136 static guint tracker_dbus_backup_id;
 137 static guint tracker_dbus_backup_id = 0U;
 138 
 139 gpointer tracker_dbus_ref (gpointer instance);
 140 void tracker_dbus_unref (gpointer instance);
 141 GParamSpec* tracker_param_spec_dbus (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
 142 void tracker_value_set_dbus (GValue* value, gpointer v_object);
 143 void tracker_value_take_dbus (GValue* value, gpointer v_object);
 144 gpointer tracker_value_get_dbus (const GValue* value);
 145 GType tracker_dbus_get_type (void) G_GNUC_CONST;
 146 enum  {
 147 	TRACKER_DBUS_DUMMY_PROPERTY
 148 };
 149 GType tracker_statistics_get_type (void) G_GNUC_CONST;
 150 guint tracker_statistics_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
 151 GType tracker_resources_get_type (void) G_GNUC_CONST;
 152 guint tracker_resources_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
 153 GType tracker_steroids_get_type (void) G_GNUC_CONST;
 154 guint tracker_steroids_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
 155 GType tracker_status_get_type (void) G_GNUC_CONST;
 156 guint tracker_status_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
 157 GType tracker_backup_get_type (void) G_GNUC_CONST;
 158 guint tracker_backup_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
 159 #define TRACKER_DBUS_SERVICE "org.freedesktop.Tracker1"
 160 static gboolean tracker_dbus_dbus_register_service (const gchar* name);
 161 static guint tracker_dbus_register_object (GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, GDBusConnection* lconnection, gconstpointer object, const gchar* path);
 162 static guint _vala_g_dbus_connection_register_object (GType type, void* object, GDBusConnection* connection, const gchar* path, GError** error);
 163 gboolean tracker_dbus_register_names (void);
 164 gboolean tracker_dbus_init (void);
 165 static void tracker_dbus_name_owner_changed_cb (GDBusConnection* connection, const gchar* sender_name, const gchar* object_path, const gchar* interface_name, const gchar* signal_name, GVariant* parameters);
 166 void tracker_resources_unreg_batches (TrackerResources* self, const gchar* old_owner);
 167 static void tracker_dbus_set_available (gboolean available);
 168 gboolean tracker_dbus_register_objects (void);
 169 void tracker_dbus_shutdown (void);
 170 TrackerStatus* tracker_dbus_register_notifier (void);
 171 TrackerStatus* tracker_status_new (void);
 172 TrackerStatus* tracker_status_construct (GType object_type);
 173 #define TRACKER_STATUS_PATH "/org/freedesktop/Tracker1/Status"
 174 TrackerStatistics* tracker_statistics_new (void);
 175 TrackerStatistics* tracker_statistics_construct (GType object_type);
 176 #define TRACKER_STATISTICS_PATH "/org/freedesktop/Tracker1/Statistics"
 177 TrackerResources* tracker_resources_new (GDBusConnection* connection);
 178 TrackerResources* tracker_resources_construct (GType object_type, GDBusConnection* connection);
 179 static void _tracker_dbus_name_owner_changed_cb_gd_bus_signal_callback (GDBusConnection* connection, const gchar* sender_name, const gchar* object_path, const gchar* interface_name, const gchar* signal_name, GVariant* parameters, gpointer self);
 180 #define TRACKER_RESOURCES_PATH "/org/freedesktop/Tracker1/Resources"
 181 TrackerSteroids* tracker_steroids_new (void);
 182 TrackerSteroids* tracker_steroids_construct (GType object_type);
 183 #define TRACKER_STEROIDS_PATH "/org/freedesktop/Tracker1/Steroids"
 184 TrackerBackup* tracker_backup_new (void);
 185 TrackerBackup* tracker_backup_construct (GType object_type);
 186 #define TRACKER_BACKUP_PATH "/org/freedesktop/Tracker1/Backup"
 187 gboolean tracker_dbus_register_prepare_class_signal (void);
 188 void tracker_resources_enable_signals (TrackerResources* self);
 189 GObject* tracker_dbus_get_object (GType type);
 190 TrackerDBus* tracker_dbus_new (void);
 191 TrackerDBus* tracker_dbus_construct (GType object_type);
 192 static void tracker_dbus_finalize (TrackerDBus* obj);
 193 
 194 
 195 static gboolean tracker_dbus_dbus_register_service (const gchar* name) {
 196 	gboolean result = FALSE;
 197 	const gchar* _tmp0_;
 198 	GError * _inner_error_ = NULL;
 199 #line 38 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 200 	g_return_val_if_fail (name != NULL, FALSE);
 201 #line 39 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 202 	_tmp0_ = name;
 203 #line 39 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 204 	g_message ("Registering D-Bus service...\n  Name:'%s'", _tmp0_);
 205 #line 206 "tracker-dbus.c"
 206 	{
 207 		GDBusConnection* _tmp1_;
 208 		const gchar* _tmp2_;
 209 		GVariant* _tmp3_;
 210 		GVariant* _tmp4_;
 211 		GVariant* _tmp5_ = NULL;
 212 		GVariant* _tmp6_;
 213 		GVariant* reply;
 214 		guint _result_ = 0U;
 215 		GVariant* _tmp7_;
 216 		guint _tmp8_;
 217 #line 42 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 218 		_tmp1_ = tracker_dbus_connection;
 219 #line 42 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 220 		_tmp2_ = name;
 221 #line 42 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 222 		_tmp3_ = g_variant_new ("(su)", _tmp2_, 1 << 2, NULL);
 223 #line 42 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 224 		g_variant_ref_sink (_tmp3_);
 225 #line 42 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 226 		_tmp4_ = _tmp3_;
 227 #line 42 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 228 		_tmp5_ = g_dbus_connection_call_sync (_tmp1_, "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus", "RequestName", _tmp4_, (const GVariantType*) "(u)", 0, -1, NULL, &_inner_error_);
 229 #line 42 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 230 		_tmp6_ = _tmp5_;
 231 #line 42 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 232 		_g_variant_unref0 (_tmp4_);
 233 #line 42 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 234 		reply = _tmp6_;
 235 #line 42 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 236 		if (_inner_error_ != NULL) {
 237 #line 238 "tracker-dbus.c"
 238 			goto __catch2_g_error;
 239 		}
 240 #line 50 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 241 		_tmp7_ = reply;
 242 #line 50 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 243 		g_variant_get (_tmp7_, "(u)", &_result_, NULL);
 244 #line 51 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 245 		_tmp8_ = _result_;
 246 #line 51 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 247 		if (_tmp8_ != ((guint) 1)) {
 248 #line 249 "tracker-dbus.c"
 249 			const gchar* _tmp9_;
 250 #line 52 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 251 			_tmp9_ = name;
 252 #line 52 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 253 			g_critical ("D-Bus service name:'%s' is already taken, " "perhaps the daemon is already running?", _tmp9_);
 254 #line 55 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 255 			result = FALSE;
 256 #line 55 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 257 			_g_variant_unref0 (reply);
 258 #line 55 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 259 			return result;
 260 #line 261 "tracker-dbus.c"
 261 		}
 262 #line 58 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 263 		result = TRUE;
 264 #line 58 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 265 		_g_variant_unref0 (reply);
 266 #line 58 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 267 		return result;
 268 #line 269 "tracker-dbus.c"
 269 	}
 270 	goto __finally2;
 271 	__catch2_g_error:
 272 	{
 273 		GError* e = NULL;
 274 		const gchar* _tmp10_;
 275 		GError* _tmp11_;
 276 		const gchar* _tmp12_;
 277 #line 41 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 278 		e = _inner_error_;
 279 #line 41 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 280 		_inner_error_ = NULL;
 281 #line 60 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 282 		_tmp10_ = name;
 283 #line 60 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 284 		_tmp11_ = e;
 285 #line 60 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 286 		_tmp12_ = _tmp11_->message;
 287 #line 60 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 288 		g_critical ("Could not aquire name:'%s', %s", _tmp10_, _tmp12_);
 289 #line 61 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 290 		result = FALSE;
 291 #line 61 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 292 		_g_error_free0 (e);
 293 #line 61 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 294 		return result;
 295 #line 296 "tracker-dbus.c"
 296 	}
 297 	__finally2:
 298 #line 41 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 299 	g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
 300 #line 41 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 301 	g_clear_error (&_inner_error_);
 302 #line 41 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala"
 303 	return FALSE;
 304 #line 305 "tracker-dbus.c"
 305 }
 306 
 307 
 308 static guint _vala_g_dbus_connection_register_object (GType type, void* object, GDBusConnection* connection, const gchar* path, GError** error) {
expected 'void *' but argument is of type 'gconstpointer'
(emitted by gcc)
309 void *func; 310 #line 71 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 311 func = g_type_get_qdata (type, g_quark_from_static_string ("vala-dbus-register-object")); 312 #line 71 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 313 if (!func) { 314 #line 71 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 315 g_set_error_literal (error, G_IO_ERROR, G_IO_ERROR_FAILED, "The specified type does not support D-Bus registration"); 316 #line 71 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 317 return 0; 318 #line 319 "tracker-dbus.c" 319 } 320 #line 71 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 321 return ((guint (*) (void *, GDBusConnection *, const gchar *, GError **)) func) (object, connection, path, error); 322 #line 323 "tracker-dbus.c" 323 } 324 325 326 static guint tracker_dbus_register_object (GType t_type, GBoxedCopyFunc t_dup_func, GDestroyNotify t_destroy_func, GDBusConnection* lconnection, gconstpointer object, const gchar* path) { 327 guint result = 0U; 328 const gchar* _tmp0_; 329 const gchar* _tmp1_ = NULL; 330 GError * _inner_error_ = NULL; 331 #line 65 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 332 g_return_val_if_fail (lconnection != NULL, 0U); 333 #line 65 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 334 g_return_val_if_fail (path != NULL, 0U); 335 #line 66 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 336 g_message ("Registering D-Bus object..."); 337 #line 67 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 338 _tmp0_ = path; 339 #line 67 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 340 g_message (" Path:'%s'", _tmp0_); 341 #line 68 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 342 _tmp1_ = g_type_name (t_type); 343 #line 68 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 344 g_message (" Type:'%s'", _tmp1_); 345 #line 346 "tracker-dbus.c" 346 { 347 GDBusConnection* _tmp2_; 348 const gchar* _tmp3_; 349 gconstpointer _tmp4_; 350 guint _tmp5_ = 0U; 351 guint id; 352 #line 71 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 353 _tmp2_ = lconnection; 354 #line 71 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 355 _tmp3_ = path; 356 #line 71 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 357 _tmp4_ = object; 358 #line 71 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 359 _tmp5_ = _vala_g_dbus_connection_register_object (t_type, _tmp4_, _tmp2_, _tmp3_, &_inner_error_); 360 #line 71 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 361 id = _tmp5_; 362 #line 71 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 363 if (_inner_error_ != NULL) { 364 #line 365 "tracker-dbus.c" 365 goto __catch3_g_error; 366 } 367 #line 72 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 368 result = id; 369 #line 72 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 370 return result; 371 #line 372 "tracker-dbus.c" 372 } 373 goto __finally3; 374 __catch3_g_error: 375 { 376 GError* e = NULL; 377 GError* _tmp6_; 378 const gchar* _tmp7_; 379 #line 70 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 380 e = _inner_error_; 381 #line 70 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 382 _inner_error_ = NULL; 383 #line 74 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 384 _tmp6_ = e; 385 #line 74 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 386 _tmp7_ = _tmp6_->message; 387 #line 74 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 388 g_critical ("Could not register D-Bus object: %s", _tmp7_); 389 #line 75 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 390 result = (guint) 0; 391 #line 75 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 392 _g_error_free0 (e); 393 #line 75 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 394 return result; 395 #line 396 "tracker-dbus.c" 396 } 397 __finally3: 398 #line 70 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 399 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 400 #line 70 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 401 g_clear_error (&_inner_error_); 402 #line 70 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 403 return 0U; 404 #line 405 "tracker-dbus.c" 405 } 406 407 408 gboolean tracker_dbus_register_names (void) { 409 gboolean result = FALSE; 410 gboolean _tmp0_ = FALSE; 411 #line 81 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 412 _tmp0_ = tracker_dbus_dbus_register_service (TRACKER_DBUS_SERVICE); 413 #line 81 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 414 if (!_tmp0_) { 415 #line 82 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 416 result = FALSE; 417 #line 82 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 418 return result; 419 #line 420 "tracker-dbus.c" 420 } 421 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 422 result = TRUE; 423 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 424 return result; 425 #line 426 "tracker-dbus.c" 426 } 427 428 429 gboolean tracker_dbus_init (void) { 430 gboolean result = FALSE; 431 GDBusConnection* _tmp0_; 432 GError * _inner_error_ = NULL; 433 #line 90 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 434 _tmp0_ = tracker_dbus_connection; 435 #line 90 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 436 if (_tmp0_ != NULL) { 437 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 438 result = TRUE; 439 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 440 return result; 441 #line 442 "tracker-dbus.c" 442 } 443 { 444 GDBusConnection* _tmp1_ = NULL; 445 GDBusConnection* _tmp2_; 446 #line 95 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 447 _tmp1_ = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &_inner_error_); 448 #line 95 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 449 _tmp2_ = _tmp1_; 450 #line 95 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 451 if (_inner_error_ != NULL) { 452 #line 453 "tracker-dbus.c" 453 goto __catch4_g_error; 454 } 455 #line 95 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 456 _g_object_unref0 (tracker_dbus_connection); 457 #line 95 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 458 tracker_dbus_connection = _tmp2_; 459 #line 460 "tracker-dbus.c" 460 } 461 goto __finally4; 462 __catch4_g_error: 463 { 464 GError* e = NULL; 465 GError* _tmp3_; 466 const gchar* _tmp4_; 467 #line 94 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 468 e = _inner_error_; 469 #line 94 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 470 _inner_error_ = NULL; 471 #line 97 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 472 _tmp3_ = e; 473 #line 97 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 474 _tmp4_ = _tmp3_->message; 475 #line 97 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 476 g_critical ("Could not connect to the D-Bus session bus, %s", _tmp4_); 477 #line 98 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 478 result = FALSE; 479 #line 98 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 480 _g_error_free0 (e); 481 #line 98 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 482 return result; 483 #line 484 "tracker-dbus.c" 484 } 485 __finally4: 486 #line 94 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 487 if (_inner_error_ != NULL) { 488 #line 94 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 489 g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code); 490 #line 94 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 491 g_clear_error (&_inner_error_); 492 #line 94 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 493 return FALSE; 494 #line 495 "tracker-dbus.c" 495 } 496 #line 101 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 497 result = TRUE; 498 #line 101 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 499 return result; 500 #line 501 "tracker-dbus.c" 501 } 502 503 504 static void tracker_dbus_name_owner_changed_cb (GDBusConnection* connection, const gchar* sender_name, const gchar* object_path, const gchar* interface_name, const gchar* signal_name, GVariant* parameters) { 505 const gchar* name = NULL; 506 const gchar* old_owner = NULL; 507 const gchar* new_owner = NULL; 508 GVariant* _tmp0_; 509 gboolean _tmp1_ = FALSE; 510 const gchar* _tmp2_; 511 gboolean _tmp4_; 512 #line 104 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 513 g_return_if_fail (connection != NULL); 514 #line 104 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 515 g_return_if_fail (sender_name != NULL); 516 #line 104 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 517 g_return_if_fail (object_path != NULL); 518 #line 104 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 519 g_return_if_fail (interface_name != NULL); 520 #line 104 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 521 g_return_if_fail (signal_name != NULL); 522 #line 104 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 523 g_return_if_fail (parameters != NULL); 524 #line 107 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 525 _tmp0_ = parameters; 526 #line 107 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 527 g_variant_get (_tmp0_, "(&s&s&s)", &name, &old_owner, &new_owner, NULL); 528 #line 109 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 529 _tmp2_ = old_owner; 530 #line 109 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 531 if (g_strcmp0 (_tmp2_, "") != 0) { 532 #line 533 "tracker-dbus.c" 533 const gchar* _tmp3_; 534 #line 109 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 535 _tmp3_ = new_owner; 536 #line 109 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 537 _tmp1_ = g_strcmp0 (_tmp3_, "") == 0; 538 #line 539 "tracker-dbus.c" 539 } else { 540 #line 109 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 541 _tmp1_ = FALSE; 542 #line 543 "tracker-dbus.c" 543 } 544 #line 109 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 545 _tmp4_ = _tmp1_; 546 #line 109 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 547 if (_tmp4_) { 548 #line 549 "tracker-dbus.c" 549 TrackerResources* _tmp5_; 550 const gchar* _tmp6_; 551 #line 111 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 552 _tmp5_ = tracker_dbus_resources; 553 #line 111 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 554 _tmp6_ = old_owner; 555 #line 111 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 556 tracker_resources_unreg_batches (_tmp5_, _tmp6_); 557 #line 558 "tracker-dbus.c" 558 } 559 } 560 561 562 static void tracker_dbus_set_available (gboolean available) { 563 gboolean _tmp0_; 564 #line 116 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 565 _tmp0_ = available; 566 #line 116 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 567 if (_tmp0_) { 568 #line 569 "tracker-dbus.c" 569 guint _tmp1_; 570 #line 117 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 571 _tmp1_ = tracker_dbus_resources_id; 572 #line 117 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 573 if (_tmp1_ == ((guint) 0)) { 574 #line 118 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 575 tracker_dbus_register_objects (); 576 #line 577 "tracker-dbus.c" 577 } 578 } else { 579 guint _tmp2_; 580 #line 121 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 581 _tmp2_ = tracker_dbus_resources_id; 582 #line 121 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 583 if (_tmp2_ != ((guint) 0)) { 584 #line 585 "tracker-dbus.c" 585 GDBusConnection* _tmp3_; 586 guint _tmp4_; 587 GDBusConnection* _tmp5_; 588 guint _tmp6_; 589 GDBusConnection* _tmp7_; 590 guint _tmp8_; 591 #line 122 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 592 _tmp3_ = tracker_dbus_connection; 593 #line 122 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 594 _tmp4_ = tracker_dbus_name_owner_changed_id; 595 #line 122 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 596 g_dbus_connection_signal_unsubscribe (_tmp3_, _tmp4_); 597 #line 123 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 598 tracker_dbus_name_owner_changed_id = (guint) 0; 599 #line 125 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 600 _tmp5_ = tracker_dbus_connection; 601 #line 125 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 602 _tmp6_ = tracker_dbus_resources_id; 603 #line 125 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 604 g_dbus_connection_unregister_object (_tmp5_, _tmp6_); 605 #line 126 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 606 _g_object_unref0 (tracker_dbus_resources); 607 #line 126 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 608 tracker_dbus_resources = NULL; 609 #line 127 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 610 tracker_dbus_resources_id = (guint) 0; 611 #line 129 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 612 _tmp7_ = tracker_dbus_connection; 613 #line 129 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 614 _tmp8_ = tracker_dbus_steroids_id; 615 #line 129 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 616 g_dbus_connection_unregister_object (_tmp7_, _tmp8_); 617 #line 130 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 618 _g_object_unref0 (tracker_dbus_steroids); 619 #line 130 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 620 tracker_dbus_steroids = NULL; 621 #line 131 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 622 tracker_dbus_steroids_id = (guint) 0; 623 #line 624 "tracker-dbus.c" 624 } 625 } 626 } 627 628 629 void tracker_dbus_shutdown (void) { 630 TrackerBackup* _tmp0_; 631 TrackerStatus* _tmp3_; 632 #line 137 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 633 tracker_dbus_set_available (FALSE); 634 #line 139 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 635 _tmp0_ = tracker_dbus_backup; 636 #line 139 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 637 if (_tmp0_ != NULL) { 638 #line 639 "tracker-dbus.c" 639 GDBusConnection* _tmp1_; 640 guint _tmp2_; 641 #line 140 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 642 _tmp1_ = tracker_dbus_connection; 643 #line 140 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 644 _tmp2_ = tracker_dbus_backup_id; 645 #line 140 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 646 g_dbus_connection_unregister_object (_tmp1_, _tmp2_); 647 #line 141 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 648 _g_object_unref0 (tracker_dbus_backup); 649 #line 141 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 650 tracker_dbus_backup = NULL; 651 #line 142 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 652 tracker_dbus_backup_id = (guint) 0; 653 #line 654 "tracker-dbus.c" 654 } 655 #line 145 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 656 _tmp3_ = tracker_dbus_notifier; 657 #line 145 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 658 if (_tmp3_ != NULL) { 659 #line 660 "tracker-dbus.c" 660 GDBusConnection* _tmp4_; 661 guint _tmp5_; 662 #line 146 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 663 _tmp4_ = tracker_dbus_connection; 664 #line 146 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 665 _tmp5_ = tracker_dbus_notifier_id; 666 #line 146 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 667 g_dbus_connection_unregister_object (_tmp4_, _tmp5_); 668 #line 147 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 669 _g_object_unref0 (tracker_dbus_notifier); 670 #line 147 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 671 tracker_dbus_notifier = NULL; 672 #line 148 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 673 tracker_dbus_notifier_id = (guint) 0; 674 #line 675 "tracker-dbus.c" 675 } 676 #line 151 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 677 _g_object_unref0 (tracker_dbus_connection); 678 #line 151 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 679 tracker_dbus_connection = NULL; 680 #line 681 "tracker-dbus.c" 681 } 682 683 684 static gpointer _g_object_ref0 (gpointer self) { 685 #line 169 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 686 return self ? g_object_ref (self) : NULL; 687 #line 688 "tracker-dbus.c" 688 } 689 690 691 TrackerStatus* tracker_dbus_register_notifier (void) { 692 TrackerStatus* result = NULL; 693 GDBusConnection* _tmp0_; 694 TrackerStatus* _tmp1_; 695 TrackerStatus* _tmp2_; 696 GDBusConnection* _tmp3_; 697 TrackerStatus* _tmp4_; 698 guint _tmp5_ = 0U; 699 TrackerStatus* _tmp6_; 700 TrackerStatus* _tmp7_; 701 #line 155 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 702 _tmp0_ = tracker_dbus_connection; 703 #line 155 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 704 if (_tmp0_ == NULL) { 705 #line 156 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 706 g_critical ("D-Bus support must be initialized before registering objects!"); 707 #line 157 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 708 result = NULL; 709 #line 157 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 710 return result; 711 #line 712 "tracker-dbus.c" 712 } 713 #line 161 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 714 _tmp1_ = tracker_status_new (); 715 #line 161 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 716 _g_object_unref0 (tracker_dbus_notifier); 717 #line 161 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 718 tracker_dbus_notifier = _tmp1_; 719 #line 162 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 720 _tmp2_ = tracker_dbus_notifier; 721 #line 162 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 722 if (_tmp2_ == NULL) { 723 #line 163 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 724 g_critical ("Could not create TrackerStatus object to register"); 725 #line 164 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 726 result = NULL; 727 #line 164 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 728 return result; 729 #line 730 "tracker-dbus.c" 730 } 731 #line 167 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 732 _tmp3_ = tracker_dbus_connection; 733 #line 167 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 734 _tmp4_ = tracker_dbus_notifier; 735 #line 167 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 736 _tmp5_ = tracker_dbus_register_object (TRACKER_TYPE_STATUS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp3_, _tmp4_, TRACKER_STATUS_PATH); 737 #line 167 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 738 tracker_dbus_notifier_id = _tmp5_; 739 #line 169 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 740 _tmp6_ = tracker_dbus_notifier; 741 #line 169 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 742 _tmp7_ = _g_object_ref0 (_tmp6_); 743 #line 169 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 744 result = _tmp7_; 745 #line 169 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 746 return result; 747 #line 748 "tracker-dbus.c" 748 } 749 750 751 static void _tracker_dbus_name_owner_changed_cb_gd_bus_signal_callback (GDBusConnection* connection, const gchar* sender_name, const gchar* object_path, const gchar* interface_name, const gchar* signal_name, GVariant* parameters, gpointer self) { 752 #line 196 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 753 tracker_dbus_name_owner_changed_cb (connection, sender_name, object_path, interface_name, signal_name, parameters); 754 #line 755 "tracker-dbus.c" 755 } 756 757 758 gboolean tracker_dbus_register_objects (void) { 759 gboolean result = FALSE; 760 GDBusConnection* _tmp0_; 761 TrackerStatistics* _tmp1_; 762 TrackerStatistics* _tmp2_; 763 GDBusConnection* _tmp3_; 764 TrackerStatistics* _tmp4_; 765 guint _tmp5_ = 0U; 766 GDBusConnection* _tmp6_; 767 TrackerResources* _tmp7_; 768 TrackerResources* _tmp8_; 769 GDBusConnection* _tmp9_; 770 guint _tmp10_ = 0U; 771 GDBusConnection* _tmp11_; 772 TrackerResources* _tmp12_; 773 guint _tmp13_ = 0U; 774 TrackerSteroids* _tmp14_; 775 TrackerSteroids* _tmp15_; 776 GDBusConnection* _tmp16_; 777 TrackerSteroids* _tmp17_; 778 guint _tmp18_ = 0U; 779 TrackerBackup* _tmp19_; 780 #line 175 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 781 _tmp0_ = tracker_dbus_connection; 782 #line 175 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 783 if (_tmp0_ == NULL) { 784 #line 176 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 785 g_critical ("D-Bus support must be initialized before registering objects!"); 786 #line 177 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 787 result = FALSE; 788 #line 177 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 789 return result; 790 #line 791 "tracker-dbus.c" 791 } 792 #line 181 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 793 _tmp1_ = tracker_statistics_new (); 794 #line 181 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 795 _g_object_unref0 (tracker_dbus_statistics); 796 #line 181 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 797 tracker_dbus_statistics = _tmp1_; 798 #line 182 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 799 _tmp2_ = tracker_dbus_statistics; 800 #line 182 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 801 if (_tmp2_ == NULL) { 802 #line 183 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 803 g_critical ("Could not create TrackerStatistics object to register"); 804 #line 184 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 805 result = FALSE; 806 #line 184 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 807 return result; 808 #line 809 "tracker-dbus.c" 809 } 810 #line 187 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 811 _tmp3_ = tracker_dbus_connection; 812 #line 187 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 813 _tmp4_ = tracker_dbus_statistics; 814 #line 187 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 815 _tmp5_ = tracker_dbus_register_object (TRACKER_TYPE_STATISTICS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp3_, _tmp4_, TRACKER_STATISTICS_PATH); 816 #line 187 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 817 tracker_dbus_statistics_id = _tmp5_; 818 #line 190 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 819 _tmp6_ = tracker_dbus_connection; 820 #line 190 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 821 _tmp7_ = tracker_resources_new (_tmp6_); 822 #line 190 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 823 _g_object_unref0 (tracker_dbus_resources); 824 #line 190 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 825 tracker_dbus_resources = _tmp7_; 826 #line 191 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 827 _tmp8_ = tracker_dbus_resources; 828 #line 191 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 829 if (_tmp8_ == NULL) { 830 #line 192 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 831 g_critical ("Could not create TrackerResources object to register"); 832 #line 193 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 833 result = FALSE; 834 #line 193 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 835 return result; 836 #line 837 "tracker-dbus.c" 837 } 838 #line 196 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 839 _tmp9_ = tracker_dbus_connection; 840 #line 196 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 841 _tmp10_ = g_dbus_connection_signal_subscribe (_tmp9_, "org.freedesktop.DBus", "org.freedesktop.DBus", "NameOwnerChanged", "/org/freedesktop/DBus", NULL, 0, _tracker_dbus_name_owner_changed_cb_gd_bus_signal_callback, NULL, NULL); 842 #line 196 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 843 tracker_dbus_name_owner_changed_id = _tmp10_; 844 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 845 _tmp11_ = tracker_dbus_connection; 846 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 847 _tmp12_ = tracker_dbus_resources; 848 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 849 _tmp13_ = tracker_dbus_register_object (TRACKER_TYPE_RESOURCES, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp11_, _tmp12_, TRACKER_RESOURCES_PATH); 850 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 851 tracker_dbus_resources_id = _tmp13_; 852 #line 206 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 853 _tmp14_ = tracker_steroids_new (); 854 #line 206 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 855 _g_object_unref0 (tracker_dbus_steroids); 856 #line 206 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 857 tracker_dbus_steroids = _tmp14_; 858 #line 207 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 859 _tmp15_ = tracker_dbus_steroids; 860 #line 207 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 861 if (_tmp15_ == NULL) { 862 #line 208 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 863 g_critical ("Could not create TrackerSteroids object to register"); 864 #line 209 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 865 result = FALSE; 866 #line 209 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 867 return result; 868 #line 869 "tracker-dbus.c" 869 } 870 #line 212 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 871 _tmp16_ = tracker_dbus_connection; 872 #line 212 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 873 _tmp17_ = tracker_dbus_steroids; 874 #line 212 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 875 _tmp18_ = tracker_dbus_register_object (TRACKER_TYPE_STEROIDS, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp16_, _tmp17_, TRACKER_STEROIDS_PATH); 876 #line 212 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 877 tracker_dbus_steroids_id = _tmp18_; 878 #line 214 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 879 _tmp19_ = tracker_dbus_backup; 880 #line 214 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 881 if (_tmp19_ == NULL) { 882 #line 883 "tracker-dbus.c" 883 TrackerBackup* _tmp20_; 884 TrackerBackup* _tmp21_; 885 GDBusConnection* _tmp22_; 886 TrackerBackup* _tmp23_; 887 guint _tmp24_ = 0U; 888 #line 216 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 889 _tmp20_ = tracker_backup_new (); 890 #line 216 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 891 _g_object_unref0 (tracker_dbus_backup); 892 #line 216 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 893 tracker_dbus_backup = _tmp20_; 894 #line 217 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 895 _tmp21_ = tracker_dbus_backup; 896 #line 217 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 897 if (_tmp21_ == NULL) { 898 #line 218 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 899 g_critical ("Could not create TrackerBackup object to register"); 900 #line 219 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 901 result = FALSE; 902 #line 219 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 903 return result; 904 #line 905 "tracker-dbus.c" 905 } 906 #line 222 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 907 _tmp22_ = tracker_dbus_connection; 908 #line 222 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 909 _tmp23_ = tracker_dbus_backup; 910 #line 222 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 911 _tmp24_ = tracker_dbus_register_object (TRACKER_TYPE_BACKUP, (GBoxedCopyFunc) g_object_ref, g_object_unref, _tmp22_, _tmp23_, TRACKER_BACKUP_PATH); 912 #line 222 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 913 tracker_dbus_backup_id = _tmp24_; 914 #line 915 "tracker-dbus.c" 915 } 916 #line 225 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 917 result = TRUE; 918 #line 225 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 919 return result; 920 #line 921 "tracker-dbus.c" 921 } 922 923 924 gboolean tracker_dbus_register_prepare_class_signal (void) { 925 gboolean result = FALSE; 926 TrackerResources* _tmp0_; 927 TrackerResources* _tmp1_; 928 #line 229 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 929 _tmp0_ = tracker_dbus_resources; 930 #line 229 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 931 if (_tmp0_ == NULL) { 932 #line 230 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 933 g_message ("Error during initialization, Resources DBus object not available"); 934 #line 231 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 935 result = FALSE; 936 #line 231 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 937 return result; 938 #line 939 "tracker-dbus.c" 939 } 940 #line 234 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 941 _tmp1_ = tracker_dbus_resources; 942 #line 234 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 943 tracker_resources_enable_signals (_tmp1_); 944 #line 236 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 945 result = TRUE; 946 #line 236 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 947 return result; 948 #line 949 "tracker-dbus.c" 949 } 950 951 952 GObject* tracker_dbus_get_object (GType type) { 953 GObject* result = NULL; 954 GType _tmp0_; 955 GType _tmp3_; 956 GType _tmp6_; 957 GType _tmp9_; 958 #line 240 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 959 _tmp0_ = type; 960 #line 240 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 961 if (_tmp0_ == TRACKER_TYPE_RESOURCES) { 962 #line 963 "tracker-dbus.c" 963 TrackerResources* _tmp1_; 964 GObject* _tmp2_; 965 #line 241 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 966 _tmp1_ = tracker_dbus_resources; 967 #line 241 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 968 _tmp2_ = _g_object_ref0 ((GObject*) _tmp1_); 969 #line 241 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 970 result = _tmp2_; 971 #line 241 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 972 return result; 973 #line 974 "tracker-dbus.c" 974 } 975 #line 244 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 976 _tmp3_ = type; 977 #line 244 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 978 if (_tmp3_ == TRACKER_TYPE_STEROIDS) { 979 #line 980 "tracker-dbus.c" 980 TrackerSteroids* _tmp4_; 981 GObject* _tmp5_; 982 #line 245 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 983 _tmp4_ = tracker_dbus_steroids; 984 #line 245 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 985 _tmp5_ = _g_object_ref0 ((GObject*) _tmp4_); 986 #line 245 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 987 result = _tmp5_; 988 #line 245 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 989 return result; 990 #line 991 "tracker-dbus.c" 991 } 992 #line 248 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 993 _tmp6_ = type; 994 #line 248 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 995 if (_tmp6_ == TRACKER_TYPE_STATUS) { 996 #line 997 "tracker-dbus.c" 997 TrackerStatus* _tmp7_; 998 GObject* _tmp8_; 999 #line 249 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1000 _tmp7_ = tracker_dbus_notifier; 1001 #line 249 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1002 _tmp8_ = _g_object_ref0 ((GObject*) _tmp7_); 1003 #line 249 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1004 result = _tmp8_; 1005 #line 249 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1006 return result; 1007 #line 1008 "tracker-dbus.c" 1008 } 1009 #line 252 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1010 _tmp9_ = type; 1011 #line 252 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1012 if (_tmp9_ == TRACKER_TYPE_BACKUP) { 1013 #line 1014 "tracker-dbus.c" 1014 TrackerBackup* _tmp10_; 1015 GObject* _tmp11_; 1016 #line 253 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1017 _tmp10_ = tracker_dbus_backup; 1018 #line 253 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1019 _tmp11_ = _g_object_ref0 ((GObject*) _tmp10_); 1020 #line 253 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1021 result = _tmp11_; 1022 #line 253 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1023 return result; 1024 #line 1025 "tracker-dbus.c" 1025 } 1026 #line 256 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1027 result = NULL; 1028 #line 256 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1029 return result; 1030 #line 1031 "tracker-dbus.c" 1031 } 1032 1033 1034 TrackerDBus* tracker_dbus_construct (GType object_type) { 1035 TrackerDBus* self = NULL; 1036 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1037 self = (TrackerDBus*) g_type_create_instance (object_type); 1038 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1039 return self; 1040 #line 1041 "tracker-dbus.c" 1041 } 1042 1043 1044 TrackerDBus* tracker_dbus_new (void) { 1045 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1046 return tracker_dbus_construct (TRACKER_TYPE_DBUS); 1047 #line 1048 "tracker-dbus.c" 1048 } 1049 1050 1051 static void tracker_value_dbus_init (GValue* value) { 1052 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1053 value->data[0].v_pointer = NULL; 1054 #line 1055 "tracker-dbus.c" 1055 } 1056 1057 1058 static void tracker_value_dbus_free_value (GValue* value) { 1059 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1060 if (value->data[0].v_pointer) { 1061 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1062 tracker_dbus_unref (value->data[0].v_pointer); 1063 #line 1064 "tracker-dbus.c" 1064 } 1065 } 1066 1067 1068 static void tracker_value_dbus_copy_value (const GValue* src_value, GValue* dest_value) { 1069 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1070 if (src_value->data[0].v_pointer) { 1071 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1072 dest_value->data[0].v_pointer = tracker_dbus_ref (src_value->data[0].v_pointer); 1073 #line 1074 "tracker-dbus.c" 1074 } else { 1075 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1076 dest_value->data[0].v_pointer = NULL; 1077 #line 1078 "tracker-dbus.c" 1078 } 1079 } 1080 1081 1082 static gpointer tracker_value_dbus_peek_pointer (const GValue* value) { 1083 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1084 return value->data[0].v_pointer; 1085 #line 1086 "tracker-dbus.c" 1086 } 1087 1088 1089 static gchar* tracker_value_dbus_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { 1090 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1091 if (collect_values[0].v_pointer) { 1092 #line 1093 "tracker-dbus.c" 1093 TrackerDBus* object; 1094 object = collect_values[0].v_pointer; 1095 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1096 if (object->parent_instance.g_class == NULL) { 1097 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1098 return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); 1099 #line 1100 "tracker-dbus.c" 1100 } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) { 1101 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1102 return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL); 1103 #line 1104 "tracker-dbus.c" 1104 } 1105 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1106 value->data[0].v_pointer = tracker_dbus_ref (object); 1107 #line 1108 "tracker-dbus.c" 1108 } else { 1109 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1110 value->data[0].v_pointer = NULL; 1111 #line 1112 "tracker-dbus.c" 1112 } 1113 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1114 return NULL; 1115 #line 1116 "tracker-dbus.c" 1116 } 1117 1118 1119 static gchar* tracker_value_dbus_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) { 1120 TrackerDBus** object_p; 1121 object_p = collect_values[0].v_pointer; 1122 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1123 if (!object_p) { 1124 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1125 return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value)); 1126 #line 1127 "tracker-dbus.c" 1127 } 1128 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1129 if (!value->data[0].v_pointer) { 1130 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1131 *object_p = NULL; 1132 #line 1133 "tracker-dbus.c" 1133 } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) { 1134 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1135 *object_p = value->data[0].v_pointer; 1136 #line 1137 "tracker-dbus.c" 1137 } else { 1138 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1139 *object_p = tracker_dbus_ref (value->data[0].v_pointer); 1140 #line 1141 "tracker-dbus.c" 1141 } 1142 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1143 return NULL; 1144 #line 1145 "tracker-dbus.c" 1145 } 1146 1147 1148 GParamSpec* tracker_param_spec_dbus (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) { 1149 TrackerParamSpecDBus* spec; 1150 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1151 g_return_val_if_fail (g_type_is_a (object_type, TRACKER_TYPE_DBUS), NULL); 1152 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1153 spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags); 1154 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1155 G_PARAM_SPEC (spec)->value_type = object_type; 1156 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1157 return G_PARAM_SPEC (spec); 1158 #line 1159 "tracker-dbus.c" 1159 } 1160 1161 1162 gpointer tracker_value_get_dbus (const GValue* value) { 1163 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1164 g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_TYPE_DBUS), NULL); 1165 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1166 return value->data[0].v_pointer; 1167 #line 1168 "tracker-dbus.c" 1168 } 1169 1170 1171 void tracker_value_set_dbus (GValue* value, gpointer v_object) { 1172 TrackerDBus* old; 1173 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1174 g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_TYPE_DBUS)); 1175 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1176 old = value->data[0].v_pointer; 1177 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1178 if (v_object) { 1179 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1180 g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TRACKER_TYPE_DBUS)); 1181 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1182 g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); 1183 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1184 value->data[0].v_pointer = v_object; 1185 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1186 tracker_dbus_ref (value->data[0].v_pointer); 1187 #line 1188 "tracker-dbus.c" 1188 } else { 1189 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1190 value->data[0].v_pointer = NULL; 1191 #line 1192 "tracker-dbus.c" 1192 } 1193 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1194 if (old) { 1195 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1196 tracker_dbus_unref (old); 1197 #line 1198 "tracker-dbus.c" 1198 } 1199 } 1200 1201 1202 void tracker_value_take_dbus (GValue* value, gpointer v_object) { 1203 TrackerDBus* old; 1204 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1205 g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_TYPE_DBUS)); 1206 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1207 old = value->data[0].v_pointer; 1208 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1209 if (v_object) { 1210 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1211 g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TRACKER_TYPE_DBUS)); 1212 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1213 g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value))); 1214 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1215 value->data[0].v_pointer = v_object; 1216 #line 1217 "tracker-dbus.c" 1217 } else { 1218 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1219 value->data[0].v_pointer = NULL; 1220 #line 1221 "tracker-dbus.c" 1221 } 1222 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1223 if (old) { 1224 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1225 tracker_dbus_unref (old); 1226 #line 1227 "tracker-dbus.c" 1227 } 1228 } 1229 1230 1231 static void tracker_dbus_class_init (TrackerDBusClass * klass) { 1232 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1233 tracker_dbus_parent_class = g_type_class_peek_parent (klass); 1234 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1235 TRACKER_DBUS_CLASS (klass)->finalize = tracker_dbus_finalize; 1236 #line 1237 "tracker-dbus.c" 1237 } 1238 1239 1240 static void tracker_dbus_instance_init (TrackerDBus * self) { 1241 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1242 self->ref_count = 1; 1243 #line 1244 "tracker-dbus.c" 1244 } 1245 1246 1247 static void tracker_dbus_finalize (TrackerDBus* obj) { 1248 TrackerDBus * self;
variable 'self' set but not used
(emitted by gcc)
1249 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1250 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_TYPE_DBUS, TrackerDBus);
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)

1251 #line 1252 "tracker-dbus.c" 1252 } 1253 1254 1255 GType tracker_dbus_get_type (void) { 1256 static volatile gsize tracker_dbus_type_id__volatile = 0; 1257 if (g_once_init_enter (&tracker_dbus_type_id__volatile)) { 1258 static const GTypeValueTable g_define_type_value_table = { tracker_value_dbus_init, tracker_value_dbus_free_value, tracker_value_dbus_copy_value, tracker_value_dbus_peek_pointer, "p", tracker_value_dbus_collect_value, "p", tracker_value_dbus_lcopy_value }; 1259 static const GTypeInfo g_define_type_info = { sizeof (TrackerDBusClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_dbus_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerDBus), 0, (GInstanceInitFunc) tracker_dbus_instance_init, &g_define_type_value_table }; 1260 static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) }; 1261 GType tracker_dbus_type_id; 1262 tracker_dbus_type_id = g_type_register_fundamental (g_type_fundamental_next (), "TrackerDBus", &g_define_type_info, &g_define_type_fundamental_info, 0); 1263 g_once_init_leave (&tracker_dbus_type_id__volatile, tracker_dbus_type_id); 1264 } 1265 return tracker_dbus_type_id__volatile; 1266 } 1267 1268 1269 gpointer tracker_dbus_ref (gpointer instance) { 1270 TrackerDBus* self; 1271 self = instance; 1272 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1273 g_atomic_int_inc (&self->ref_count); 1274 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1275 return instance; 1276 #line 1277 "tracker-dbus.c" 1277 } 1278 1279 1280 void tracker_dbus_unref (gpointer instance) { 1281 TrackerDBus* self; 1282 self = instance; 1283 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1284 if (g_atomic_int_dec_and_test (&self->ref_count)) { 1285 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1286 TRACKER_DBUS_GET_CLASS (self)->finalize (self); 1287 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-dbus.vala" 1288 g_type_free_instance ((GTypeInstance *) self); 1289 #line 1290 "tracker-dbus.c" 1290 } 1291 }