1 /* tracker-main.c generated by valac 0.18.1, the Vala compiler
2 * generated from tracker-main.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 <stdlib.h>
27 #include <string.h>
28 #include "tracker-store/tracker-config.h"
29 #include <signal.h>
30 #include <sys/select.h>
31 #include "libtracker-common/tracker-common.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-db-interface.h"
36 #include "libtracker-sparql/tracker-sparql.h"
37 #include <locale.h>
38 #include <glib/gi18n-lib.h>
39 #include "libtracker-data/tracker-db-config.h"
40 #include "libtracker-data/tracker-db-manager.h"
41 #include <gio/gio.h>
42 #include "libtracker-data/tracker-data-manager.h"
43 #include "tracker-store/tracker-locale-change.h"
44 #include "tracker-store/tracker-events.h"
45 #include "tracker-store/tracker-writeback.h"
46 #include <gobject/gvaluecollector.h>
47
48
49 #define TRACKER_TYPE_MAIN (tracker_main_get_type ())
50 #define TRACKER_MAIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_TYPE_MAIN, TrackerMain))
51 #define TRACKER_MAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_MAIN, TrackerMainClass))
52 #define TRACKER_IS_MAIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_TYPE_MAIN))
53 #define TRACKER_IS_MAIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_MAIN))
54 #define TRACKER_MAIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_MAIN, TrackerMainClass))
55
56 typedef struct _TrackerMain TrackerMain;
57 typedef struct _TrackerMainClass TrackerMainClass;
58 typedef struct _TrackerMainPrivate TrackerMainPrivate;
59 #define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
60 #define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
61 #define _g_option_context_free0(var) ((var == NULL) ? NULL : (var = (g_option_context_free (var), NULL)))
62 #define _g_free0(var) (var = (g_free (var), NULL))
63
64 #define TRACKER_TYPE_STATUS (tracker_status_get_type ())
65 #define TRACKER_STATUS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TRACKER_TYPE_STATUS, TrackerStatus))
66 #define TRACKER_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TRACKER_TYPE_STATUS, TrackerStatusClass))
67 #define TRACKER_IS_STATUS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TRACKER_TYPE_STATUS))
68 #define TRACKER_IS_STATUS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TRACKER_TYPE_STATUS))
69 #define TRACKER_STATUS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TRACKER_TYPE_STATUS, TrackerStatusClass))
70
71 typedef struct _TrackerStatus TrackerStatus;
72 typedef struct _TrackerStatusClass TrackerStatusClass;
73 #define _g_main_loop_unref0(var) ((var == NULL) ? NULL : (var = (g_main_loop_unref (var), NULL)))
74 typedef struct _TrackerParamSpecMain TrackerParamSpecMain;
75
76 struct _TrackerMain {
77 GTypeInstance parent_instance;
78 volatile int ref_count;
79 TrackerMainPrivate * priv;
80 };
81
82 struct _TrackerMainClass {
83 GTypeClass parent_class;
84 void (*finalize) (TrackerMain *self);
85 };
86
87 struct _TrackerParamSpecMain {
88 GParamSpec parent_instance;
89 };
90
91
92 static gpointer tracker_main_parent_class = NULL;
93 static GMainLoop* tracker_main_main_loop;
94 static GMainLoop* tracker_main_main_loop = NULL;
95 static gchar* tracker_main_log_filename;
96 static gchar* tracker_main_log_filename = NULL;
97 static gboolean tracker_main_shutdown;
98 static gboolean tracker_main_shutdown = FALSE;
99 static gboolean tracker_main_version;
100 static gboolean tracker_main_version = FALSE;
101 static gint tracker_main_verbosity;
102 static gint tracker_main_verbosity = 0;
103 static gboolean tracker_main_force_reindex;
104 static gboolean tracker_main_force_reindex = FALSE;
105 static gboolean tracker_main_readonly_mode;
106 static gboolean tracker_main_readonly_mode = FALSE;
107 static gboolean tracker_main_in_loop;
108 static gboolean tracker_main_in_loop = FALSE;
109
110 gpointer tracker_main_ref (gpointer instance);
111 void tracker_main_unref (gpointer instance);
112 GParamSpec* tracker_param_spec_main (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
113 void tracker_value_set_main (GValue* value, gpointer v_object);
114 void tracker_value_take_main (GValue* value, gpointer v_object);
115 gpointer tracker_value_get_main (const GValue* value);
116 GType tracker_main_get_type (void) G_GNUC_CONST;
117 enum {
118 TRACKER_MAIN_DUMMY_PROPERTY
119 };
120 #define TRACKER_MAIN_LICENSE "This program is free software and comes without any warranty.\n" \
121 "It is licensed under version 2 or later of the General Public\n" \
122 "License which can be viewed at:\n" \
123 " http://www.gnu.org/licenses/gpl.txt\n"
124 #define TRACKER_MAIN_SELECT_CACHE_SIZE 100
125 #define TRACKER_MAIN_UPDATE_CACHE_SIZE 100
126 static void tracker_main_sanity_check_option_values (TrackerConfig* config);
127 static void tracker_main_do_shutdown (void);
128 static gboolean tracker_main_shutdown_timeout_cb (void);
129 static void tracker_main_signal_handler (gint signo);
130 static void tracker_main_initialize_signal_handler (void);
131 static void _tracker_main_signal_handler_sighandler_t (gint signal);
132 static void tracker_main_initialize_priority (void);
133 static gchar** tracker_main_get_writeback_predicates (void);
134 static void _vala_array_add1 (gchar*** array, int* length, int* size, gchar* value);
135 static void tracker_main_config_verbosity_changed_cb (GObject* object, GParamSpec* spec);
136 static gint tracker_main_main (gchar** args, int args_length1);
137 void tzset (void);
138 gboolean tracker_dbus_init (void);
139 static void _tracker_main_config_verbosity_changed_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self);
140 GType tracker_status_get_type (void) G_GNUC_CONST;
141 guint tracker_status_register_object (void* object, GDBusConnection* connection, const gchar* path, GError** error);
142 TrackerStatus* tracker_dbus_register_notifier (void);
143 TrackerBusyCallback tracker_status_get_callback (TrackerStatus* self, void** result_target, GDestroyNotify* result_target_destroy_notify);
144 void tracker_store_init (void);
145 gboolean tracker_dbus_register_objects (void);
146 gboolean tracker_dbus_register_names (void);
147 gboolean tracker_dbus_register_prepare_class_signal (void);
148 static gchar** _tracker_main_get_writeback_predicates_tracker_writeback_get_predicates_func (int* result_length1);
149 void tracker_store_resume (void);
150 void tracker_store_shutdown (void);
151 static gboolean _tracker_main_shutdown_timeout_cb_gsource_func (gpointer self);
152 void tracker_dbus_shutdown (void);
153 TrackerMain* tracker_main_new (void);
154 TrackerMain* tracker_main_construct (GType object_type);
155 static void tracker_main_finalize (TrackerMain* obj);
156 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
157 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);
158
159 static const GOptionEntry TRACKER_MAIN_entries[5] = {{"version", 'V', 0, G_OPTION_ARG_NONE, &tracker_main_version, "Displays version information", NULL}, {"verbosity", 'v', 0, G_OPTION_ARG_INT, &tracker_main_verbosity, "Logging, 0 = errors only, 1 = minimal, 2 = detailed and 3 = debug (def" \
160 "ault = 0)", NULL}, {"force-reindex", 'r', 0, G_OPTION_ARG_NONE, &tracker_main_force_reindex, "Force a re-index of all content", NULL}, {"readonly-mode", 'n', 0, G_OPTION_ARG_NONE, &tracker_main_readonly_mode, "Only allow read based actions on the database", NULL}, {NULL}};
161
162 static void tracker_main_sanity_check_option_values (TrackerConfig* config) {
163 TrackerConfig* _tmp0_;
164 gint _tmp1_;
165 gint _tmp2_;
166 const gchar* _tmp3_ = NULL;
167 gboolean _tmp4_;
168 const gchar* _tmp5_;
169 #line 56 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
170 g_return_if_fail (config != NULL);
171 #line 57 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
172 g_message ("General options:");
173 #line 58 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
174 _tmp0_ = config;
175 #line 58 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
176 _tmp1_ = tracker_config_get_verbosity (_tmp0_);
177 #line 58 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
178 _tmp2_ = _tmp1_;
179 #line 58 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
180 g_message (" Verbosity ............................ %d", _tmp2_);
181 #line 60 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
182 g_message ("Store options:");
183 #line 61 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
184 _tmp4_ = tracker_main_readonly_mode;
185 #line 61 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
186 if (_tmp4_) {
187 #line 61 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
188 _tmp3_ = "yes";
189 #line 186 "tracker-main.c"
190 } else {
191 #line 61 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
192 _tmp3_ = "no";
193 #line 190 "tracker-main.c"
194 }
195 #line 61 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
196 _tmp5_ = _tmp3_;
197 #line 61 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
198 g_message (" Readonly mode ........................ %s", _tmp5_);
199 #line 196 "tracker-main.c"
200 }
201
202
203 static void tracker_main_do_shutdown (void) {
204 GMainLoop* _tmp0_;
205 #line 65 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
206 _tmp0_ = tracker_main_main_loop;
207 #line 65 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
208 if (_tmp0_ != NULL) {
209 #line 206 "tracker-main.c"
210 GMainLoop* _tmp1_;
211 #line 66 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
212 _tmp1_ = tracker_main_main_loop;
213 #line 66 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
214 g_main_loop_quit (_tmp1_);
215 #line 212 "tracker-main.c"
216 }
217 #line 69 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
218 tracker_main_shutdown = TRUE;
219 #line 216 "tracker-main.c"
220 }
221
222
223 static gboolean tracker_main_shutdown_timeout_cb (void) {
224 gboolean result = FALSE;
225 #line 73 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
226 g_critical ("Could not exit in a timely fashion - terminating...");
227 #line 74 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
228 exit (1);
229 #line 72 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
230 return result;
231 #line 228 "tracker-main.c"
232 }
233
234
235 static void tracker_main_signal_handler (gint signo) {
236 gboolean _tmp0_;
237 gint _tmp1_;
238 #line 81 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
239 _tmp0_ = tracker_main_in_loop;
240 #line 81 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
241 if (_tmp0_) {
242 #line 82 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
243 exit (1);
244 #line 241 "tracker-main.c"
245 }
246 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
247 _tmp1_ = signo;
248 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
249 switch (_tmp1_) {
250 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
251 case SIGTERM:
252 #line 85 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
253 case SIGINT:
254 #line 251 "tracker-main.c"
255 {
256 gint _tmp2_;
257 const gchar* _tmp3_ = NULL;
258 #line 88 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
259 tracker_main_in_loop = TRUE;
260 #line 89 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
261 tracker_main_do_shutdown ();
262 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
263 _tmp2_ = signo;
264 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
265 _tmp3_ = g_strsignal (_tmp2_);
266 #line 91 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
267 if (_tmp3_ != NULL) {
268 #line 265 "tracker-main.c"
269 gint _tmp4_;
270 gint _tmp5_;
271 const gchar* _tmp6_ = NULL;
272 #line 92 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
273 g_print ("\n");
274 #line 93 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
275 _tmp4_ = signo;
276 #line 93 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
277 _tmp5_ = signo;
278 #line 93 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
279 _tmp6_ = g_strsignal (_tmp5_);
280 #line 93 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
281 g_print ("Received signal:%d->'%s'", _tmp4_, _tmp6_);
282 #line 279 "tracker-main.c"
283 }
284 #line 95 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
285 break;
286 #line 283 "tracker-main.c"
287 }
288 default:
289 {
290 gint _tmp7_;
291 const gchar* _tmp8_ = NULL;
292 #line 97 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
293 _tmp7_ = signo;
294 #line 97 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
295 _tmp8_ = g_strsignal (_tmp7_);
296 #line 97 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
297 if (_tmp8_ != NULL) {
298 #line 295 "tracker-main.c"
299 gint _tmp9_;
300 gint _tmp10_;
301 const gchar* _tmp11_ = NULL;
302 #line 98 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
303 g_print ("\n");
304 #line 99 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
305 _tmp9_ = signo;
306 #line 99 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
307 _tmp10_ = signo;
308 #line 99 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
309 _tmp11_ = g_strsignal (_tmp10_);
310 #line 99 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
311 g_print ("Received signal:%d->'%s'", _tmp9_, _tmp11_);
312 #line 309 "tracker-main.c"
313 }
314 #line 101 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
315 break;
316 #line 313 "tracker-main.c"
317 }
318 }
319 }
320
321
322 static void _tracker_main_signal_handler_sighandler_t (gint signal) {
323 #line 110 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
324 tracker_main_signal_handler (signal);
325 #line 322 "tracker-main.c"
326 }
missing braces around initializer
(emitted by gcc)
327
328
329 static void tracker_main_initialize_signal_handler (void) {
330 sigset_t empty_mask = {0};
331 sigset_t _tmp0_;
332 struct sigaction act = {0};
333 sigset_t _tmp1_;
334 struct sigaction _tmp2_;
335 struct sigaction _tmp3_;
336 struct sigaction _tmp4_;
337 #line 106 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
338 memset (&empty_mask, 0, sizeof (sigset_t));
339 #line 107 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
340 _tmp0_ = empty_mask;
341 #line 107 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
342 sigemptyset (&_tmp0_);
343 #line 109 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
344 memset (&act, 0, sizeof (struct sigaction));
345 #line 110 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
346 act.sa_handler = _tracker_main_signal_handler_sighandler_t;
347 #line 111 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
348 _tmp1_ = empty_mask;
349 #line 111 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
350 act.sa_mask = _tmp1_;
351 #line 112 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
352 act.sa_flags = 0;
353 #line 114 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
354 _tmp2_ = act;
355 #line 114 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
356 sigaction (SIGTERM, &_tmp2_, NULL);
357 #line 115 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
358 _tmp3_ = act;
359 #line 115 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
360 sigaction (SIGINT, &_tmp3_, NULL);
361 #line 116 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
362 _tmp4_ = act;
363 #line 116 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
364 sigaction (SIGHUP, &_tmp4_, NULL);
365 #line 362 "tracker-main.c"
366 }
367
368
369 static void tracker_main_initialize_priority (void) {
370 #line 121 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
371 tracker_ioprio_init ();
372 #line 369 "tracker-main.c"
373 }
374
375
376 static void _vala_array_add1 (gchar*** array, int* length, int* size, gchar* value) {
377 #line 137 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
378 if ((*length) == (*size)) {
379 #line 137 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
380 *size = (*size) ? (2 * (*size)) : 4;
381 #line 137 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
382 *array = g_renew (gchar*, *array, (*size) + 1);
383 #line 380 "tracker-main.c"
384 }
385 #line 137 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
386 (*array)[(*length)++] = value;
387 #line 137 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
388 (*array)[*length] = NULL;
389 #line 386 "tracker-main.c"
390 }
391
392
393 static gchar** tracker_main_get_writeback_predicates (void) {
394 gchar** result = NULL;
395 gchar** predicates_to_signal;
396 gint predicates_to_signal_length1;
397 gint _predicates_to_signal_size_;
398 GError * _inner_error_ = NULL;
399 #line 131 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
400 predicates_to_signal = NULL;
401 #line 131 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
402 predicates_to_signal_length1 = 0;
403 #line 131 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
404 _predicates_to_signal_size_ = predicates_to_signal_length1;
405 #line 402 "tracker-main.c"
406 {
407 TrackerDBCursor* _tmp0_ = NULL;
408 TrackerDBCursor* cursor;
409 #line 134 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
410 _tmp0_ = tracker_data_query_sparql_cursor ("SELECT ?predicate WHERE { ?predicate tracker:writeback true }", &_inner_error_);
411 #line 134 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
412 cursor = _tmp0_;
413 #line 134 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
414 if (_inner_error_ != NULL) {
415 #line 412 "tracker-main.c"
416 goto __catch5_g_error;
417 }
418 #line 136 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
419 while (TRUE) {
420 #line 417 "tracker-main.c"
421 TrackerDBCursor* _tmp1_;
variable '_tmp4__length1' set but not used
(emitted by gcc)
422 gboolean _tmp2_ = FALSE;
423 gboolean _tmp3_;
424 gchar** _tmp4_;
425 gint _tmp4__length1;
426 TrackerDBCursor* _tmp5_;
427 const gchar* _tmp6_ = NULL;
428 gchar* _tmp7_;
429 #line 136 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
430 _tmp1_ = cursor;
431 #line 136 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
432 _tmp2_ = tracker_sparql_cursor_next ((TrackerSparqlCursor*) _tmp1_, NULL, &_inner_error_);
433 #line 136 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
434 _tmp3_ = _tmp2_;
435 #line 136 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
436 if (_inner_error_ != NULL) {
437 #line 136 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
438 _g_object_unref0 (cursor);
439 #line 436 "tracker-main.c"
440 goto __catch5_g_error;
441 }
442 #line 136 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
443 if (!_tmp3_) {
444 #line 136 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
445 break;
446 #line 443 "tracker-main.c"
447 }
448 #line 137 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
449 _tmp4_ = predicates_to_signal;
450 #line 137 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
451 _tmp4__length1 = predicates_to_signal_length1;
452 #line 137 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
453 _tmp5_ = cursor;
454 #line 137 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
455 _tmp6_ = tracker_sparql_cursor_get_string ((TrackerSparqlCursor*) _tmp5_, 0, NULL);
456 #line 137 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
457 _tmp7_ = g_strdup (_tmp6_);
458 #line 137 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
459 _vala_array_add1 (&predicates_to_signal, &predicates_to_signal_length1, &_predicates_to_signal_size_, _tmp7_);
460 #line 457 "tracker-main.c"
461 }
462 #line 133 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
463 _g_object_unref0 (cursor);
464 #line 461 "tracker-main.c"
465 }
466 goto __finally5;
467 __catch5_g_error:
468 {
469 GError* e = NULL;
470 GError* _tmp8_;
471 const gchar* _tmp9_;
472 #line 133 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
473 e = _inner_error_;
474 #line 133 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
475 _inner_error_ = NULL;
476 #line 140 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
477 _tmp8_ = e;
478 #line 140 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
479 _tmp9_ = _tmp8_->message;
480 #line 140 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
481 g_critical ("Unable to retrieve tracker:writeback properties: %s", _tmp9_);
482 #line 133 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
483 _g_error_free0 (e);
484 #line 481 "tracker-main.c"
485 }
486 __finally5:
487 #line 133 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
488 if (_inner_error_ != NULL) {
489 #line 133 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
490 predicates_to_signal = (_vala_array_free (predicates_to_signal, predicates_to_signal_length1, (GDestroyNotify) g_free), NULL);
491 #line 133 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
492 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);
493 #line 133 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
494 g_clear_error (&_inner_error_);
495 #line 133 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
496 return NULL;
497 #line 494 "tracker-main.c"
498 }
499 #line 143 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
500 result = predicates_to_signal;
501 #line 143 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
502 return result;
503 #line 500 "tracker-main.c"
504 }
505
506
507 static void tracker_main_config_verbosity_changed_cb (GObject* object, GParamSpec* spec) {
508 GObject* _tmp0_;
509 gint _tmp1_;
510 gint _tmp2_;
511 gint verbosity;
512 const gchar* _tmp3_ = NULL;
513 gint _tmp4_;
514 gint _tmp5_;
515 const gchar* _tmp6_;
516 gint _tmp7_;
517 #line 146 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
518 g_return_if_fail (object != NULL);
519 #line 147 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
520 _tmp0_ = object;
521 #line 147 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
522 _tmp1_ = tracker_config_get_verbosity (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TRACKER_TYPE_CONFIG, TrackerConfig));
523 #line 147 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
524 _tmp2_ = _tmp1_;
525 #line 147 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
526 verbosity = _tmp2_;
527 #line 151 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
528 _tmp4_ = verbosity;
529 #line 151 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
530 if (_tmp4_ > 0) {
531 #line 151 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
532 _tmp3_ = "enabling";
533 #line 530 "tracker-main.c"
534 } else {
535 #line 151 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
536 _tmp3_ = "disabling";
537 #line 534 "tracker-main.c"
538 }
539 #line 149 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
540 _tmp5_ = verbosity;
541 #line 149 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
542 _tmp6_ = _tmp3_;
543 #line 149 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
544 g_message ("Log verbosity is set to %d, %s D-Bus client lookup", _tmp5_, _tmp6_);
545 #line 153 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
546 _tmp7_ = verbosity;
547 #line 153 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
548 tracker_dbus_enable_client_lookup (_tmp7_ > 0);
549 #line 546 "tracker-main.c"
550 }
551
552
553 static void _tracker_main_config_verbosity_changed_cb_g_object_notify (GObject* _sender, GParamSpec* pspec, gpointer self) {
554 #line 214 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
555 tracker_main_config_verbosity_changed_cb (_sender, pspec);
556 #line 553 "tracker-main.c"
557 }
558
559
560 static gchar** _tracker_main_get_writeback_predicates_tracker_writeback_get_predicates_func (int* result_length1) {
561 gchar** result;
562 result = tracker_main_get_writeback_predicates ();
563 #line 295 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
564 return result;
565 #line 562 "tracker-main.c"
566 }
567
568
569 static gboolean _tracker_main_shutdown_timeout_cb_gsource_func (gpointer self) {
570 gboolean result;
571 result = tracker_main_shutdown_timeout_cb ();
572 #line 316 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
573 return result;
574 #line 571 "tracker-main.c"
575 }
576
577
578 static gint tracker_main_main (gchar** args, int args_length1) {
579 gint result = 0;
580 gboolean _tmp6_;
581 TrackerConfig* _tmp7_;
582 TrackerConfig* config;
583 TrackerDBConfig* _tmp8_;
584 TrackerDBConfig* db_config;
585 gint _tmp9_;
586 TrackerConfig* _tmp12_;
587 gint _tmp13_;
588 gint _tmp14_;
589 gchar* _tmp15_ = NULL;
590 const gchar* _tmp16_;
591 TrackerConfig* _tmp18_;
592 gboolean _tmp19_ = FALSE;
593 TrackerConfig* _tmp20_;
594 TrackerConfig* _tmp21_;
595 gulong _tmp22_ = 0UL;
596 gulong config_verbosity_id;
597 TrackerDBManagerFlags flags;
598 gboolean _tmp23_;
599 TrackerStatus* _tmp25_ = NULL;
600 TrackerStatus* notifier;
601 TrackerStatus* _tmp26_;
602 void* _tmp27_ = NULL;
603 GDestroyNotify _tmp28_ = NULL;
604 TrackerBusyCallback _tmp29_ = NULL;
605 TrackerBusyCallback busy_callback;
606 void* busy_callback_target;
607 GDestroyNotify busy_callback_target_destroy_notify;
608 gboolean _tmp30_ = FALSE;
609 gboolean _tmp31_ = FALSE;
610 TrackerDBConfig* _tmp32_;
611 gint _tmp33_;
612 gint _tmp34_;
613 gint chunk_size_mb;
614 gint _tmp35_;
615 gsize chunk_size;
616 TrackerDBConfig* _tmp36_;
617 gchar* _tmp37_;
618 gchar* _tmp38_;
619 gchar* rotate_to;
620 const gchar* _tmp39_;
621 gint _tmp40_;
622 gboolean do_rotating;
623 gboolean _tmp41_;
624 gsize _tmp42_;
625 const gchar* _tmp43_;
626 gint select_cache_size = 0;
627 gint update_cache_size = 0;
628 gchar* cache_size_s = NULL;
629 const gchar* _tmp44_ = NULL;
630 gchar* _tmp45_;
631 gboolean _tmp46_ = FALSE;
632 const gchar* _tmp47_;
633 gboolean _tmp49_;
634 const gchar* _tmp52_ = NULL;
635 gchar* _tmp53_;
636 gboolean _tmp54_ = FALSE;
637 const gchar* _tmp55_;
638 gboolean _tmp57_;
639 gboolean is_first_time_index = FALSE;
640 gboolean _tmp67_;
641 gboolean _tmp68_;
642 TrackerConfig* _tmp71_;
643 gulong _tmp72_;
644 gint _tmp73_;
645 gsize _tmp74_;
646 GError * _inner_error_ = NULL;
647 #line 157 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
648 setlocale (LC_ALL, "");
649 #line 159 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
650 bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
651 #line 160 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
652 bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
653 #line 161 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
654 textdomain (GETTEXT_PACKAGE);
655 #line 164 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
656 tzset ();
657 #line 166 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
658 tracker_main_verbosity = -1;
659 #line 656 "tracker-main.c"
660 {
661 const gchar* _tmp0_ = NULL;
662 GOptionContext* _tmp1_;
663 GOptionContext* context;
664 GOptionContext* _tmp2_;
665 GOptionContext* _tmp3_;
666 #line 172 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
667 _tmp0_ = _ ("- start the tracker daemon");
668 #line 172 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
669 _tmp1_ = g_option_context_new (_tmp0_);
670 #line 172 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
671 context = _tmp1_;
672 #line 173 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
673 _tmp2_ = context;
674 #line 173 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
675 g_option_context_add_main_entries (_tmp2_, TRACKER_MAIN_entries, NULL);
676 #line 174 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
677 _tmp3_ = context;
678 #line 174 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
679 g_option_context_parse (_tmp3_, &args_length1, &args, &_inner_error_);
680 #line 174 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
681 if (_inner_error_ != NULL) {
682 #line 174 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
683 _g_option_context_free0 (context);
684 #line 681 "tracker-main.c"
685 goto __catch6_g_error;
686 }
687 #line 168 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
688 _g_option_context_free0 (context);
689 #line 686 "tracker-main.c"
690 }
691 goto __finally6;
692 __catch6_g_error:
693 {
694 GError* e = NULL;
695 GError* _tmp4_;
696 const gchar* _tmp5_;
697 #line 168 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
698 e = _inner_error_;
699 #line 168 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
700 _inner_error_ = NULL;
701 #line 176 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
702 _tmp4_ = e;
703 #line 176 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
704 _tmp5_ = _tmp4_->message;
705 #line 176 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
706 g_printerr ("Invalid arguments, %s\n", _tmp5_);
707 #line 177 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
708 result = 1;
709 #line 177 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
710 _g_error_free0 (e);
711 #line 177 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
712 return result;
713 #line 710 "tracker-main.c"
714 }
715 __finally6:
716 #line 168 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
717 if (_inner_error_ != NULL) {
718 #line 168 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
719 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);
720 #line 168 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
721 g_clear_error (&_inner_error_);
722 #line 168 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
723 return 0;
724 #line 721 "tracker-main.c"
725 }
726 #line 180 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
727 _tmp6_ = tracker_main_version;
728 #line 180 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
729 if (_tmp6_) {
730 #line 182 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
731 g_print ("%s", "\nTracker " PACKAGE_VERSION "\n\n" TRACKER_MAIN_LICENSE "\n");
732 #line 183 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
733 result = 0;
734 #line 183 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
735 return result;
736 #line 733 "tracker-main.c"
737 }
738 #line 186 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
739 tracker_main_initialize_signal_handler ();
740 #line 189 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
741 tracker_main_initialize_priority ();
742 #line 192 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
743 _tmp7_ = tracker_config_new ();
744 #line 192 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
745 config = _tmp7_;
746 #line 193 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
747 _tmp8_ = tracker_db_config_new ();
748 #line 193 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
749 db_config = _tmp8_;
750 #line 196 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
751 _tmp9_ = tracker_main_verbosity;
752 #line 196 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
753 if (_tmp9_ > (-1)) {
754 #line 751 "tracker-main.c"
755 TrackerConfig* _tmp10_;
756 gint _tmp11_;
757 #line 197 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
758 _tmp10_ = config;
759 #line 197 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
760 _tmp11_ = tracker_main_verbosity;
761 #line 197 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
762 tracker_config_set_verbosity (_tmp10_, _tmp11_);
763 #line 760 "tracker-main.c"
764 }
765 #line 201 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
766 _tmp12_ = config;
767 #line 201 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
768 _tmp13_ = tracker_config_get_verbosity (_tmp12_);
769 #line 201 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
770 _tmp14_ = _tmp13_;
771 #line 201 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
772 tracker_log_init (_tmp14_, &_tmp15_);
773 #line 201 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
774 _g_free0 (tracker_main_log_filename);
775 #line 201 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
776 tracker_main_log_filename = _tmp15_;
777 #line 202 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
778 _tmp16_ = tracker_main_log_filename;
779 #line 202 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
780 if (_tmp16_ != NULL) {
781 #line 778 "tracker-main.c"
782 const gchar* _tmp17_;
783 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
784 _tmp17_ = tracker_main_log_filename;
785 #line 203 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
786 g_message ("Using log file:'%s'", _tmp17_);
787 #line 784 "tracker-main.c"
788 }
789 #line 206 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
790 _tmp18_ = config;
791 #line 206 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
792 tracker_main_sanity_check_option_values (_tmp18_);
793 #line 208 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
794 _tmp19_ = tracker_dbus_init ();
795 #line 208 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
796 if (!_tmp19_) {
797 #line 209 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
798 result = 1;
799 #line 209 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
800 _g_object_unref0 (db_config);
801 #line 209 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
802 _g_object_unref0 (config);
803 #line 209 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
804 return result;
805 #line 802 "tracker-main.c"
806 }
807 #line 213 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
808 _tmp20_ = config;
809 #line 213 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
810 tracker_main_config_verbosity_changed_cb ((GObject*) _tmp20_, NULL);
811 #line 214 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
812 _tmp21_ = config;
813 #line 214 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
814 _tmp22_ = g_signal_connect ((GObject*) _tmp21_, "notify::verbosity", (GCallback) _tracker_main_config_verbosity_changed_cb_g_object_notify, NULL);
815 #line 214 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
816 config_verbosity_id = _tmp22_;
817 #line 216 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
818 flags = TRACKER_DB_MANAGER_REMOVE_CACHE;
819 #line 218 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
820 _tmp23_ = tracker_main_force_reindex;
821 #line 218 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
822 if (_tmp23_) {
823 #line 820 "tracker-main.c"
824 TrackerDBManagerFlags _tmp24_;
825 #line 222 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
826 _tmp24_ = flags;
827 #line 222 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
828 flags = _tmp24_ | TRACKER_DB_MANAGER_FORCE_REINDEX;
829 #line 826 "tracker-main.c"
830 }
831 #line 225 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
832 _tmp25_ = tracker_dbus_register_notifier ();
833 #line 225 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
834 notifier = _tmp25_;
835 #line 226 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
836 _tmp26_ = notifier;
837 #line 226 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
838 _tmp29_ = tracker_status_get_callback (_tmp26_, &_tmp27_, &_tmp28_);
839 #line 226 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
840 busy_callback = _tmp29_;
841 #line 226 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
842 busy_callback_target = _tmp27_;
843 #line 226 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
844 busy_callback_target_destroy_notify = _tmp28_;
845 #line 228 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
846 tracker_store_init ();
847 #line 231 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
848 _tmp30_ = tracker_dbus_register_objects ();
849 #line 231 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
850 if (!_tmp30_) {
851 #line 232 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
852 result = 1;
853 #line 232 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
854 (busy_callback_target_destroy_notify == NULL) ? NULL : (busy_callback_target_destroy_notify (busy_callback_target), NULL);
855 #line 232 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
856 busy_callback = NULL;
857 #line 232 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
858 busy_callback_target = NULL;
859 #line 232 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
860 busy_callback_target_destroy_notify = NULL;
861 #line 232 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
862 _g_object_unref0 (notifier);
863 #line 232 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
864 _g_object_unref0 (db_config);
865 #line 232 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
866 _g_object_unref0 (config);
867 #line 232 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
868 return result;
869 #line 866 "tracker-main.c"
870 }
871 #line 235 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
872 _tmp31_ = tracker_dbus_register_names ();
873 #line 235 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
874 if (!_tmp31_) {
875 #line 236 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
876 result = 1;
877 #line 236 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
878 (busy_callback_target_destroy_notify == NULL) ? NULL : (busy_callback_target_destroy_notify (busy_callback_target), NULL);
879 #line 236 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
880 busy_callback = NULL;
881 #line 236 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
882 busy_callback_target = NULL;
883 #line 236 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
884 busy_callback_target_destroy_notify = NULL;
885 #line 236 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
886 _g_object_unref0 (notifier);
887 #line 236 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
888 _g_object_unref0 (db_config);
889 #line 236 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
890 _g_object_unref0 (config);
891 #line 236 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
892 return result;
893 #line 890 "tracker-main.c"
894 }
895 #line 239 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
896 _tmp32_ = db_config;
897 #line 239 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
898 _tmp33_ = tracker_db_config_get_journal_chunk_size (_tmp32_);
899 #line 239 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
900 _tmp34_ = _tmp33_;
901 #line 239 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
902 chunk_size_mb = _tmp34_;
903 #line 240 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
904 _tmp35_ = chunk_size_mb;
905 #line 240 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
906 chunk_size = (gsize) ((((gsize) _tmp35_) * ((gsize) 1024)) * ((gsize) 1024));
907 #line 241 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
908 _tmp36_ = db_config;
909 #line 241 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
910 _tmp37_ = tracker_db_config_get_journal_rotate_destination (_tmp36_);
911 #line 241 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
912 _tmp38_ = _tmp37_;
913 #line 241 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
914 rotate_to = _tmp38_;
915 #line 243 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
916 _tmp39_ = rotate_to;
917 #line 243 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
918 if (g_strcmp0 (_tmp39_, "") == 0) {
919 #line 244 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
920 _g_free0 (rotate_to);
921 #line 244 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
922 rotate_to = NULL;
923 #line 920 "tracker-main.c"
924 }
925 #line 247 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
926 _tmp40_ = chunk_size_mb;
927 #line 247 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
928 do_rotating = _tmp40_ != (-1);
929 #line 249 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
930 _tmp41_ = do_rotating;
931 #line 249 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
932 _tmp42_ = chunk_size;
933 #line 249 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
934 _tmp43_ = rotate_to;
935 #line 249 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
936 tracker_db_journal_set_rotating (_tmp41_, _tmp42_, _tmp43_);
937 #line 254 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
938 _tmp44_ = g_getenv ("TRACKER_STORE_SELECT_CACHE_SIZE");
939 #line 254 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
940 _tmp45_ = g_strdup (_tmp44_);
941 #line 254 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
942 _g_free0 (cache_size_s);
943 #line 254 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
944 cache_size_s = _tmp45_;
945 #line 255 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
946 _tmp47_ = cache_size_s;
947 #line 255 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
948 if (_tmp47_ != NULL) {
949 #line 946 "tracker-main.c"
950 const gchar* _tmp48_;
951 #line 255 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
952 _tmp48_ = cache_size_s;
953 #line 255 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
954 _tmp46_ = g_strcmp0 (_tmp48_, "") != 0;
955 #line 952 "tracker-main.c"
956 } else {
957 #line 255 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
958 _tmp46_ = FALSE;
959 #line 956 "tracker-main.c"
960 }
961 #line 255 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
962 _tmp49_ = _tmp46_;
963 #line 255 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
964 if (_tmp49_) {
965 #line 962 "tracker-main.c"
966 const gchar* _tmp50_;
967 gint _tmp51_ = 0;
968 #line 256 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
969 _tmp50_ = cache_size_s;
970 #line 256 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
971 _tmp51_ = atoi (_tmp50_);
972 #line 256 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
973 select_cache_size = _tmp51_;
974 #line 971 "tracker-main.c"
975 } else {
976 #line 258 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
977 select_cache_size = TRACKER_MAIN_SELECT_CACHE_SIZE;
978 #line 975 "tracker-main.c"
979 }
980 #line 261 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
981 _tmp52_ = g_getenv ("TRACKER_STORE_UPDATE_CACHE_SIZE");
982 #line 261 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
983 _tmp53_ = g_strdup (_tmp52_);
984 #line 261 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
985 _g_free0 (cache_size_s);
986 #line 261 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
987 cache_size_s = _tmp53_;
988 #line 262 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
989 _tmp55_ = cache_size_s;
990 #line 262 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
991 if (_tmp55_ != NULL) {
992 #line 989 "tracker-main.c"
993 const gchar* _tmp56_;
994 #line 262 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
995 _tmp56_ = cache_size_s;
996 #line 262 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
997 _tmp54_ = g_strcmp0 (_tmp56_, "") != 0;
998 #line 995 "tracker-main.c"
999 } else {
1000 #line 262 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1001 _tmp54_ = FALSE;
1002 #line 999 "tracker-main.c"
1003 }
1004 #line 262 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1005 _tmp57_ = _tmp54_;
1006 #line 262 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1007 if (_tmp57_) {
1008 #line 1005 "tracker-main.c"
1009 const gchar* _tmp58_;
1010 gint _tmp59_ = 0;
1011 #line 263 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1012 _tmp58_ = cache_size_s;
1013 #line 263 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1014 _tmp59_ = atoi (_tmp58_);
1015 #line 263 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1016 update_cache_size = _tmp59_;
1017 #line 1014 "tracker-main.c"
1018 } else {
1019 #line 265 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1020 update_cache_size = TRACKER_MAIN_UPDATE_CACHE_SIZE;
1021 #line 1018 "tracker-main.c"
1022 }
1023 {
1024 TrackerDBManagerFlags _tmp60_;
1025 gint _tmp61_;
1026 gint _tmp62_;
1027 TrackerBusyCallback _tmp63_;
1028 void* _tmp63__target;
1029 gboolean _tmp64_ = FALSE;
1030 #line 271 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1031 _tmp60_ = flags;
1032 #line 271 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1033 _tmp61_ = select_cache_size;
1034 #line 271 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1035 _tmp62_ = update_cache_size;
1036 #line 271 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1037 _tmp63_ = busy_callback;
1038 #line 271 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1039 _tmp63__target = busy_callback_target;
1040 #line 271 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1041 tracker_data_manager_init (_tmp60_, NULL, &_tmp64_, TRUE, FALSE, (guint) _tmp61_, (guint) _tmp62_, _tmp63_, _tmp63__target, "Initializing", &_inner_error_);
1042 #line 271 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1043 is_first_time_index = _tmp64_;
1044 #line 271 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1045 if (_inner_error_ != NULL) {
1046 #line 1043 "tracker-main.c"
1047 goto __catch7_g_error;
1048 }
1049 }
1050 goto __finally7;
1051 __catch7_g_error:
1052 {
1053 GError* e = NULL;
1054 GError* _tmp65_;
1055 const gchar* _tmp66_;
1056 #line 270 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1057 e = _inner_error_;
1058 #line 270 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1059 _inner_error_ = NULL;
1060 #line 281 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1061 _tmp65_ = e;
1062 #line 281 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1063 _tmp66_ = _tmp65_->message;
1064 #line 281 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1065 g_critical ("Cannot initialize database: %s", _tmp66_);
1066 #line 282 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1067 result = 1;
1068 #line 282 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1069 _g_error_free0 (e);
1070 #line 282 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1071 _g_free0 (cache_size_s);
1072 #line 282 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1073 _g_free0 (rotate_to);
1074 #line 282 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1075 (busy_callback_target_destroy_notify == NULL) ? NULL : (busy_callback_target_destroy_notify (busy_callback_target), NULL);
1076 #line 282 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1077 busy_callback = NULL;
1078 #line 282 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1079 busy_callback_target = NULL;
1080 #line 282 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1081 busy_callback_target_destroy_notify = NULL;
1082 #line 282 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1083 _g_object_unref0 (notifier);
1084 #line 282 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1085 _g_object_unref0 (db_config);
1086 #line 282 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1087 _g_object_unref0 (config);
1088 #line 282 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1089 return result;
1090 #line 1087 "tracker-main.c"
1091 }
1092 __finally7:
1093 #line 270 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1094 if (_inner_error_ != NULL) {
1095 #line 270 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1096 _g_free0 (cache_size_s);
1097 #line 270 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1098 _g_free0 (rotate_to);
1099 #line 270 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1100 (busy_callback_target_destroy_notify == NULL) ? NULL : (busy_callback_target_destroy_notify (busy_callback_target), NULL);
1101 #line 270 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1102 busy_callback = NULL;
1103 #line 270 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1104 busy_callback_target = NULL;
1105 #line 270 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1106 busy_callback_target_destroy_notify = NULL;
1107 #line 270 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1108 _g_object_unref0 (notifier);
1109 #line 270 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1110 _g_object_unref0 (db_config);
1111 #line 270 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1112 _g_object_unref0 (config);
1113 #line 270 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1114 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);
1115 #line 270 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1116 g_clear_error (&_inner_error_);
1117 #line 270 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1118 return 0;
1119 #line 1116 "tracker-main.c"
1120 }
1121 #line 285 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1122 _g_object_unref0 (db_config);
1123 #line 285 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1124 db_config = NULL;
1125 #line 286 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1126 _g_object_unref0 (notifier);
1127 #line 286 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1128 notifier = NULL;
1129 #line 288 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1130 _tmp67_ = tracker_main_shutdown;
1131 #line 288 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1132 if (!_tmp67_) {
1133 #line 290 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1134 tracker_locale_change_initialize_subscription ();
1135 #line 292 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1136 tracker_dbus_register_prepare_class_signal ();
1137 #line 294 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1138 tracker_events_init ();
1139 #line 295 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1140 tracker_writeback_init (_tracker_main_get_writeback_predicates_tracker_writeback_get_predicates_func);
1141 #line 296 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1142 tracker_store_resume ();
1143 #line 298 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1144 g_message ("Waiting for D-Bus requests...");
1145 #line 1142 "tracker-main.c"
1146 }
1147 #line 304 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1148 _tmp68_ = tracker_main_shutdown;
1149 #line 304 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1150 if (!_tmp68_) {
1151 #line 1148 "tracker-main.c"
1152 GMainLoop* _tmp69_;
1153 GMainLoop* _tmp70_;
1154 #line 305 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1155 _tmp69_ = g_main_loop_new (NULL, FALSE);
1156 #line 305 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1157 _g_main_loop_unref0 (tracker_main_main_loop);
1158 #line 305 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1159 tracker_main_main_loop = _tmp69_;
1160 #line 306 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1161 _tmp70_ = tracker_main_main_loop;
1162 #line 306 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1163 g_main_loop_run (_tmp70_);
1164 #line 1161 "tracker-main.c"
1165 }
1166 #line 312 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1167 g_message ("Shutdown started");
1168 #line 314 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1169 tracker_store_shutdown ();
1170 #line 316 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1171 g_timeout_add_full (G_PRIORITY_LOW, (guint) 5000, _tracker_main_shutdown_timeout_cb_gsource_func, NULL, NULL);
1172 #line 318 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1173 g_message ("Cleaning up");
1174 #line 321 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1175 tracker_writeback_shutdown ();
1176 #line 322 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1177 tracker_events_shutdown ();
1178 #line 324 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1179 tracker_locale_change_shutdown_subscription ();
1180 #line 326 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1181 tracker_dbus_shutdown ();
1182 #line 327 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1183 tracker_data_manager_shutdown ();
1184 #line 328 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1185 tracker_log_shutdown ();
1186 #line 330 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1187 _tmp71_ = config;
1188 #line 330 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1189 _tmp72_ = config_verbosity_id;
1190 #line 330 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1191 g_signal_handler_disconnect ((GObject*) _tmp71_, _tmp72_);
1192 #line 331 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1193 _g_object_unref0 (config);
1194 #line 331 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1195 config = NULL;
1196 #line 334 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1197 _tmp73_ = chunk_size_mb;
1198 #line 334 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1199 _tmp74_ = chunk_size;
1200 #line 334 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1201 tracker_db_journal_set_rotating (_tmp73_ != (-1), _tmp74_, NULL);
1202 #line 336 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1203 g_print ("\nOK\n\n");
1204 #line 338 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1205 _g_free0 (tracker_main_log_filename);
1206 #line 338 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1207 tracker_main_log_filename = NULL;
1208 #line 340 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1209 _g_main_loop_unref0 (tracker_main_main_loop);
1210 #line 340 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1211 tracker_main_main_loop = NULL;
1212 #line 342 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1213 result = 0;
1214 #line 342 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1215 _g_free0 (cache_size_s);
1216 #line 342 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1217 _g_free0 (rotate_to);
1218 #line 342 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1219 (busy_callback_target_destroy_notify == NULL) ? NULL : (busy_callback_target_destroy_notify (busy_callback_target), NULL);
1220 #line 342 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1221 busy_callback = NULL;
1222 #line 342 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1223 busy_callback_target = NULL;
1224 #line 342 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1225 busy_callback_target_destroy_notify = NULL;
1226 #line 342 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1227 _g_object_unref0 (notifier);
1228 #line 342 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1229 _g_object_unref0 (db_config);
1230 #line 342 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1231 _g_object_unref0 (config);
1232 #line 342 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1233 return result;
1234 #line 1231 "tracker-main.c"
1235 }
1236
1237
1238 int main (int argc, char ** argv) {
1239 #line 156 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1240 g_type_init ();
1241 #line 156 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1242 return tracker_main_main (argv, argc);
1243 #line 1240 "tracker-main.c"
1244 }
1245
1246
1247 TrackerMain* tracker_main_construct (GType object_type) {
1248 TrackerMain* self = NULL;
1249 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1250 self = (TrackerMain*) g_type_create_instance (object_type);
1251 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1252 return self;
1253 #line 1250 "tracker-main.c"
1254 }
1255
1256
1257 TrackerMain* tracker_main_new (void) {
1258 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1259 return tracker_main_construct (TRACKER_TYPE_MAIN);
1260 #line 1257 "tracker-main.c"
1261 }
1262
1263
1264 static void tracker_value_main_init (GValue* value) {
1265 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1266 value->data[0].v_pointer = NULL;
1267 #line 1264 "tracker-main.c"
1268 }
1269
1270
1271 static void tracker_value_main_free_value (GValue* value) {
1272 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1273 if (value->data[0].v_pointer) {
1274 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1275 tracker_main_unref (value->data[0].v_pointer);
1276 #line 1273 "tracker-main.c"
1277 }
1278 }
1279
1280
1281 static void tracker_value_main_copy_value (const GValue* src_value, GValue* dest_value) {
1282 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1283 if (src_value->data[0].v_pointer) {
1284 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1285 dest_value->data[0].v_pointer = tracker_main_ref (src_value->data[0].v_pointer);
1286 #line 1283 "tracker-main.c"
1287 } else {
1288 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1289 dest_value->data[0].v_pointer = NULL;
1290 #line 1287 "tracker-main.c"
1291 }
1292 }
1293
1294
1295 static gpointer tracker_value_main_peek_pointer (const GValue* value) {
1296 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1297 return value->data[0].v_pointer;
1298 #line 1295 "tracker-main.c"
1299 }
1300
1301
1302 static gchar* tracker_value_main_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
1303 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1304 if (collect_values[0].v_pointer) {
1305 #line 1302 "tracker-main.c"
1306 TrackerMain* object;
1307 object = collect_values[0].v_pointer;
1308 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1309 if (object->parent_instance.g_class == NULL) {
1310 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1311 return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
1312 #line 1309 "tracker-main.c"
1313 } else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
1314 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1315 return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
1316 #line 1313 "tracker-main.c"
1317 }
1318 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1319 value->data[0].v_pointer = tracker_main_ref (object);
1320 #line 1317 "tracker-main.c"
1321 } else {
1322 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1323 value->data[0].v_pointer = NULL;
1324 #line 1321 "tracker-main.c"
1325 }
1326 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1327 return NULL;
1328 #line 1325 "tracker-main.c"
1329 }
1330
1331
1332 static gchar* tracker_value_main_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
1333 TrackerMain** object_p;
1334 object_p = collect_values[0].v_pointer;
1335 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1336 if (!object_p) {
1337 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1338 return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
1339 #line 1336 "tracker-main.c"
1340 }
1341 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1342 if (!value->data[0].v_pointer) {
1343 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1344 *object_p = NULL;
1345 #line 1342 "tracker-main.c"
1346 } else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
1347 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1348 *object_p = value->data[0].v_pointer;
1349 #line 1346 "tracker-main.c"
1350 } else {
1351 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1352 *object_p = tracker_main_ref (value->data[0].v_pointer);
1353 #line 1350 "tracker-main.c"
1354 }
1355 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1356 return NULL;
1357 #line 1354 "tracker-main.c"
1358 }
1359
1360
1361 GParamSpec* tracker_param_spec_main (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
1362 TrackerParamSpecMain* spec;
1363 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1364 g_return_val_if_fail (g_type_is_a (object_type, TRACKER_TYPE_MAIN), NULL);
1365 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1366 spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
1367 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1368 G_PARAM_SPEC (spec)->value_type = object_type;
1369 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1370 return G_PARAM_SPEC (spec);
1371 #line 1368 "tracker-main.c"
1372 }
1373
1374
1375 gpointer tracker_value_get_main (const GValue* value) {
1376 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1377 g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_TYPE_MAIN), NULL);
1378 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1379 return value->data[0].v_pointer;
1380 #line 1377 "tracker-main.c"
1381 }
1382
1383
1384 void tracker_value_set_main (GValue* value, gpointer v_object) {
1385 TrackerMain* old;
1386 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1387 g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_TYPE_MAIN));
1388 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1389 old = value->data[0].v_pointer;
1390 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1391 if (v_object) {
1392 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1393 g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TRACKER_TYPE_MAIN));
1394 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1395 g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
1396 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1397 value->data[0].v_pointer = v_object;
1398 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1399 tracker_main_ref (value->data[0].v_pointer);
1400 #line 1397 "tracker-main.c"
1401 } else {
1402 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1403 value->data[0].v_pointer = NULL;
1404 #line 1401 "tracker-main.c"
1405 }
1406 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1407 if (old) {
1408 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1409 tracker_main_unref (old);
1410 #line 1407 "tracker-main.c"
1411 }
1412 }
1413
1414
1415 void tracker_value_take_main (GValue* value, gpointer v_object) {
1416 TrackerMain* old;
1417 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1418 g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TRACKER_TYPE_MAIN));
1419 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1420 old = value->data[0].v_pointer;
1421 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1422 if (v_object) {
1423 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1424 g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TRACKER_TYPE_MAIN));
1425 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1426 g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
1427 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1428 value->data[0].v_pointer = v_object;
1429 #line 1426 "tracker-main.c"
1430 } else {
1431 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1432 value->data[0].v_pointer = NULL;
1433 #line 1430 "tracker-main.c"
1434 }
1435 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1436 if (old) {
1437 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1438 tracker_main_unref (old);
1439 #line 1436 "tracker-main.c"
1440 }
1441 }
1442
1443
1444 static void tracker_main_class_init (TrackerMainClass * klass) {
1445 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1446 tracker_main_parent_class = g_type_class_peek_parent (klass);
1447 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1448 TRACKER_MAIN_CLASS (klass)->finalize = tracker_main_finalize;
1449 #line 1446 "tracker-main.c"
1450 }
1451
1452
1453 static void tracker_main_instance_init (TrackerMain * self) {
1454 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1455 self->ref_count = 1;
1456 #line 1453 "tracker-main.c"
1457 }
variable 'self' set but not used
(emitted by gcc)
1458
1459
1460 static void tracker_main_finalize (TrackerMain* obj) {
1461 TrackerMain * self;
1462 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1463 self = G_TYPE_CHECK_INSTANCE_CAST (obj, TRACKER_TYPE_MAIN, TrackerMain);
1464 #line 1461 "tracker-main.c"
1465 }
1466
1467
1468 GType tracker_main_get_type (void) {
1469 static volatile gsize tracker_main_type_id__volatile = 0;
1470 if (g_once_init_enter (&tracker_main_type_id__volatile)) {
1471 static const GTypeValueTable g_define_type_value_table = { tracker_value_main_init, tracker_value_main_free_value, tracker_value_main_copy_value, tracker_value_main_peek_pointer, "p", tracker_value_main_collect_value, "p", tracker_value_main_lcopy_value };
1472 static const GTypeInfo g_define_type_info = { sizeof (TrackerMainClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) tracker_main_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TrackerMain), 0, (GInstanceInitFunc) tracker_main_instance_init, &g_define_type_value_table };
1473 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) };
1474 GType tracker_main_type_id;
1475 tracker_main_type_id = g_type_register_fundamental (g_type_fundamental_next (), "TrackerMain", &g_define_type_info, &g_define_type_fundamental_info, 0);
1476 g_once_init_leave (&tracker_main_type_id__volatile, tracker_main_type_id);
1477 }
1478 return tracker_main_type_id__volatile;
1479 }
1480
1481
1482 gpointer tracker_main_ref (gpointer instance) {
1483 TrackerMain* self;
1484 self = instance;
1485 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1486 g_atomic_int_inc (&self->ref_count);
1487 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1488 return instance;
1489 #line 1486 "tracker-main.c"
1490 }
1491
1492
1493 void tracker_main_unref (gpointer instance) {
1494 TrackerMain* self;
1495 self = instance;
1496 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1497 if (g_atomic_int_dec_and_test (&self->ref_count)) {
1498 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1499 TRACKER_MAIN_GET_CLASS (self)->finalize (self);
1500 #line 21 "/home/martyn/Source/tracker/src/tracker-store/tracker-main.vala"
1501 g_type_free_instance ((GTypeInstance *) self);
1502 #line 1499 "tracker-main.c"
1503 }
1504 }
1505
1506
1507 static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
1508 if ((array != NULL) && (destroy_func != NULL)) {
1509 int i;
1510 for (i = 0; i < array_length; i = i + 1) {
1511 if (((gpointer*) array)[i] != NULL) {
1512 destroy_func (((gpointer*) array)[i]);
1513 }
1514 }
1515 }
1516 }
1517
1518
1519 static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
1520 _vala_array_destroy (array, array_length, destroy_func);
1521 g_free (array);
1522 }