summaryrefslogtreecommitdiff
path: root/plugins/shotwell-data-imports/FSpotDatabase.c
blob: 617edb9d01cb016e0045b2f3359b50755f1d20df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
/* FSpotDatabase.c generated by valac 0.36.6, the Vala compiler
 * generated from FSpotDatabase.vala, do not modify */

/* Copyright 2016 Software Freedom Conservancy Inc.
 *
 * This software is licensed under the GNU Lesser General Public License
 * (version 2.1 or later).  See the COPYING file in this distribution.
 */

#include <glib.h>
#include <glib-object.h>
#include <sqlite3.h>
#include <gio/gio.h>
#include <shotwell-plugin-dev-1.0.h>
#include <stdlib.h>
#include <string.h>


#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE (data_imports_fspot_db_fspot_database_get_type ())
#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE, DataImportsFSpotDbFSpotDatabase))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE, DataImportsFSpotDbFSpotDatabaseClass))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE, DataImportsFSpotDbFSpotDatabaseClass))

typedef struct _DataImportsFSpotDbFSpotDatabase DataImportsFSpotDbFSpotDatabase;
typedef struct _DataImportsFSpotDbFSpotDatabaseClass DataImportsFSpotDbFSpotDatabaseClass;
typedef struct _DataImportsFSpotDbFSpotDatabasePrivate DataImportsFSpotDbFSpotDatabasePrivate;

#define TYPE_IMPORTABLE_DATABASE_TABLE (importable_database_table_get_type ())
#define IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTable))
#define IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass))
#define IS_IMPORTABLE_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_IMPORTABLE_DATABASE_TABLE))
#define IS_IMPORTABLE_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_IMPORTABLE_DATABASE_TABLE))
#define IMPORTABLE_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_IMPORTABLE_DATABASE_TABLE, ImportableDatabaseTableClass))

typedef struct _ImportableDatabaseTable ImportableDatabaseTable;
typedef struct _ImportableDatabaseTableClass ImportableDatabaseTableClass;

#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE (data_imports_fspot_db_fspot_database_table_get_type ())
#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTable))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTableClass))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_TABLE, DataImportsFSpotDbFSpotDatabaseTableClass))

typedef struct _DataImportsFSpotDbFSpotDatabaseTable DataImportsFSpotDbFSpotDatabaseTable;
typedef struct _DataImportsFSpotDbFSpotDatabaseTableClass DataImportsFSpotDbFSpotDatabaseTableClass;

#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE (data_imports_fspot_db_fspot_photos_table_get_type ())
#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE, DataImportsFSpotDbFSpotPhotosTable))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE, DataImportsFSpotDbFSpotPhotosTableClass))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTOS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTOS_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTOS_TABLE, DataImportsFSpotDbFSpotPhotosTableClass))

typedef struct _DataImportsFSpotDbFSpotPhotosTable DataImportsFSpotDbFSpotPhotosTable;
typedef struct _DataImportsFSpotDbFSpotPhotosTableClass DataImportsFSpotDbFSpotPhotosTableClass;

#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE (data_imports_fspot_db_fspot_photo_versions_table_get_type ())
#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE, DataImportsFSpotDbFSpotPhotoVersionsTable))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE, DataImportsFSpotDbFSpotPhotoVersionsTableClass))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_PHOTO_VERSIONS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_PHOTO_VERSIONS_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_PHOTO_VERSIONS_TABLE, DataImportsFSpotDbFSpotPhotoVersionsTableClass))

typedef struct _DataImportsFSpotDbFSpotPhotoVersionsTable DataImportsFSpotDbFSpotPhotoVersionsTable;
typedef struct _DataImportsFSpotDbFSpotPhotoVersionsTableClass DataImportsFSpotDbFSpotPhotoVersionsTableClass;

#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE (data_imports_fspot_db_fspot_tags_table_get_type ())
#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE, DataImportsFSpotDbFSpotTagsTable))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE, DataImportsFSpotDbFSpotTagsTableClass))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAGS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_TAGS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_TAGS_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_TAGS_TABLE, DataImportsFSpotDbFSpotTagsTableClass))

typedef struct _DataImportsFSpotDbFSpotTagsTable DataImportsFSpotDbFSpotTagsTable;
typedef struct _DataImportsFSpotDbFSpotTagsTableClass DataImportsFSpotDbFSpotTagsTableClass;

#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE (data_imports_fspot_db_fspot_rolls_table_get_type ())
#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE, DataImportsFSpotDbFSpotRollsTable))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE, DataImportsFSpotDbFSpotRollsTableClass))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLLS_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_ROLLS_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_ROLLS_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_ROLLS_TABLE, DataImportsFSpotDbFSpotRollsTableClass))

typedef struct _DataImportsFSpotDbFSpotRollsTable DataImportsFSpotDbFSpotRollsTable;
typedef struct _DataImportsFSpotDbFSpotRollsTableClass DataImportsFSpotDbFSpotRollsTableClass;

#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_TABLE (data_imports_fspot_db_fspot_meta_table_get_type ())
#define DATA_IMPORTS_FSPOT_DB_FSPOT_META_TABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_TABLE, DataImportsFSpotDbFSpotMetaTable))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_META_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_TABLE, DataImportsFSpotDbFSpotMetaTableClass))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_META_TABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_TABLE))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_META_TABLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_TABLE))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_META_TABLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_META_TABLE, DataImportsFSpotDbFSpotMetaTableClass))

typedef struct _DataImportsFSpotDbFSpotMetaTable DataImportsFSpotDbFSpotMetaTable;
typedef struct _DataImportsFSpotDbFSpotMetaTableClass DataImportsFSpotDbFSpotMetaTableClass;
#define _sqlite3_close0(var) ((var == NULL) ? NULL : (var = (sqlite3_close (var), NULL)))
#define _importable_database_table_unref0(var) ((var == NULL) ? NULL : (var = (importable_database_table_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define UTILS_TYPE_VERSION_NUMBER (utils_version_number_get_type ())
#define UTILS_VERSION_NUMBER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UTILS_TYPE_VERSION_NUMBER, UtilsVersionNumber))
#define UTILS_VERSION_NUMBER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UTILS_TYPE_VERSION_NUMBER, UtilsVersionNumberClass))
#define UTILS_IS_VERSION_NUMBER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UTILS_TYPE_VERSION_NUMBER))
#define UTILS_IS_VERSION_NUMBER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UTILS_TYPE_VERSION_NUMBER))
#define UTILS_VERSION_NUMBER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UTILS_TYPE_VERSION_NUMBER, UtilsVersionNumberClass))

typedef struct _UtilsVersionNumber UtilsVersionNumber;
typedef struct _UtilsVersionNumberClass UtilsVersionNumberClass;

#define DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR (data_imports_fspot_db_fspot_database_behavior_get_type ())
#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehavior))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehaviorClass))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR))
#define DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE_BEHAVIOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR))
#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_BEHAVIOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE_BEHAVIOR, DataImportsFSpotDbFSpotDatabaseBehaviorClass))

typedef struct _DataImportsFSpotDbFSpotDatabaseBehavior DataImportsFSpotDbFSpotDatabaseBehavior;
typedef struct _DataImportsFSpotDbFSpotDatabaseBehaviorClass DataImportsFSpotDbFSpotDatabaseBehaviorClass;

struct _DataImportsFSpotDbFSpotDatabase {
	GObject parent_instance;
	DataImportsFSpotDbFSpotDatabasePrivate * priv;
	DataImportsFSpotDbFSpotPhotosTable* photos_table;
	DataImportsFSpotDbFSpotPhotoVersionsTable* photo_versions_table;
	DataImportsFSpotDbFSpotTagsTable* tags_table;
	DataImportsFSpotDbFSpotRollsTable* rolls_table;
	gint64 hidden_tag_id;
};

struct _DataImportsFSpotDbFSpotDatabaseClass {
	GObjectClass parent_class;
};

struct _DataImportsFSpotDbFSpotDatabasePrivate {
	sqlite3* fspot_db;
	DataImportsFSpotDbFSpotMetaTable* meta_table;
};

typedef enum  {
	DATABASE_ERROR_ERROR,
	DATABASE_ERROR_BACKING,
	DATABASE_ERROR_MEMORY,
	DATABASE_ERROR_ABORT,
	DATABASE_ERROR_LIMITS,
	DATABASE_ERROR_TYPESPEC
} DatabaseError;
#define DATABASE_ERROR database_error_quark ()

static gpointer data_imports_fspot_db_fspot_database_parent_class = NULL;

#define DATA_IMPORTS_FSPOT_DB_NULL_ID ((gint64) 0)
#define DATA_IMPORTS_FSPOT_DB_INVALID_ID ((gint64) -1)
void data_imports_fspot_db_init (void);
void data_imports_fspot_db_fspot_database_behavior_create_behavior_map (void);
GType data_imports_fspot_db_fspot_database_get_type (void) G_GNUC_CONST;
gpointer importable_database_table_ref (gpointer instance);
void importable_database_table_unref (gpointer instance);
GParamSpec* param_spec_importable_database_table (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_importable_database_table (GValue* value, gpointer v_object);
void value_take_importable_database_table (GValue* value, gpointer v_object);
gpointer value_get_importable_database_table (const GValue* value);
GType importable_database_table_get_type (void) G_GNUC_CONST;
GType data_imports_fspot_db_fspot_database_table_get_type (void) G_GNUC_CONST;
GType data_imports_fspot_db_fspot_photos_table_get_type (void) G_GNUC_CONST;
GType data_imports_fspot_db_fspot_photo_versions_table_get_type (void) G_GNUC_CONST;
GType data_imports_fspot_db_fspot_tags_table_get_type (void) G_GNUC_CONST;
GType data_imports_fspot_db_fspot_rolls_table_get_type (void) G_GNUC_CONST;
GType data_imports_fspot_db_fspot_meta_table_get_type (void) G_GNUC_CONST;
#define DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE, DataImportsFSpotDbFSpotDatabasePrivate))
enum  {
	DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_DUMMY_PROPERTY
};
GQuark database_error_quark (void);
DataImportsFSpotDbFSpotDatabase* data_imports_fspot_db_fspot_database_new (GFile* db_file, GError** error);
DataImportsFSpotDbFSpotDatabase* data_imports_fspot_db_fspot_database_construct (GType object_type, GFile* db_file, GError** error);
DataImportsFSpotDbFSpotMetaTable* data_imports_fspot_db_fspot_meta_table_new (sqlite3* db);
DataImportsFSpotDbFSpotMetaTable* data_imports_fspot_db_fspot_meta_table_construct (GType object_type, sqlite3* db);
gint64 data_imports_fspot_db_fspot_meta_table_get_hidden_tag_id (DataImportsFSpotDbFSpotMetaTable* self, GError** error);
GType utils_version_number_get_type (void) G_GNUC_CONST;
static UtilsVersionNumber* data_imports_fspot_db_fspot_database_get_version (DataImportsFSpotDbFSpotDatabase* self, GError** error);
GType data_imports_fspot_db_fspot_database_behavior_get_type (void) G_GNUC_CONST;
DataImportsFSpotDbFSpotDatabaseBehavior* data_imports_fspot_db_fspot_database_behavior_new (UtilsVersionNumber* version, GError** error);
DataImportsFSpotDbFSpotDatabaseBehavior* data_imports_fspot_db_fspot_database_behavior_construct (GType object_type, UtilsVersionNumber* version, GError** error);
DataImportsFSpotDbFSpotPhotosTable* data_imports_fspot_db_fspot_photos_table_new (sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior);
DataImportsFSpotDbFSpotPhotosTable* data_imports_fspot_db_fspot_photos_table_construct (GType object_type, sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior);
DataImportsFSpotDbFSpotPhotoVersionsTable* data_imports_fspot_db_fspot_photo_versions_table_new (sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior);
DataImportsFSpotDbFSpotPhotoVersionsTable* data_imports_fspot_db_fspot_photo_versions_table_construct (GType object_type, sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior);
DataImportsFSpotDbFSpotTagsTable* data_imports_fspot_db_fspot_tags_table_new (sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior);
DataImportsFSpotDbFSpotTagsTable* data_imports_fspot_db_fspot_tags_table_construct (GType object_type, sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior);
DataImportsFSpotDbFSpotRollsTable* data_imports_fspot_db_fspot_rolls_table_new (sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior);
DataImportsFSpotDbFSpotRollsTable* data_imports_fspot_db_fspot_rolls_table_construct (GType object_type, sqlite3* db, DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior);
gchar* data_imports_fspot_db_fspot_meta_table_get_db_version (DataImportsFSpotDbFSpotMetaTable* self, GError** error);
UtilsVersionNumber* utils_version_number_new_from_string (const gchar* str_version, const gchar* separator);
UtilsVersionNumber* utils_version_number_construct_from_string (GType object_type, const gchar* str_version, const gchar* separator);
static void data_imports_fspot_db_fspot_database_finalize (GObject * obj);


/**
 * Initialization method for the whole module.
 */
void data_imports_fspot_db_init (void) {
#line 16 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	data_imports_fspot_db_fspot_database_behavior_create_behavior_map ();
#line 209 "FSpotDatabase.c"
}


DataImportsFSpotDbFSpotDatabase* data_imports_fspot_db_fspot_database_construct (GType object_type, GFile* db_file, GError** error) {
	DataImportsFSpotDbFSpotDatabase * self = NULL;
	gchar* filename = NULL;
	GFile* _tmp0_;
	gchar* _tmp1_;
	gint res = 0;
	sqlite3* _tmp2_ = NULL;
	gint _tmp3_;
	sqlite3* _tmp5_;
	DataImportsFSpotDbFSpotMetaTable* _tmp6_;
	gint64 _tmp7_ = 0LL;
	DataImportsFSpotDbFSpotMetaTable* _tmp8_;
	gint64 _tmp9_;
	UtilsVersionNumber* _tmp10_ = NULL;
	UtilsVersionNumber* _tmp11_;
	DataImportsFSpotDbFSpotDatabaseBehavior* db_behavior = NULL;
	DataImportsFSpotDbFSpotDatabaseBehavior* _tmp12_;
	sqlite3* _tmp13_;
	DataImportsFSpotDbFSpotDatabaseBehavior* _tmp14_;
	DataImportsFSpotDbFSpotPhotosTable* _tmp15_;
	sqlite3* _tmp16_;
	DataImportsFSpotDbFSpotDatabaseBehavior* _tmp17_;
	DataImportsFSpotDbFSpotPhotoVersionsTable* _tmp18_;
	sqlite3* _tmp19_;
	DataImportsFSpotDbFSpotDatabaseBehavior* _tmp20_;
	DataImportsFSpotDbFSpotTagsTable* _tmp21_;
	sqlite3* _tmp22_;
	DataImportsFSpotDbFSpotDatabaseBehavior* _tmp23_;
	DataImportsFSpotDbFSpotRollsTable* _tmp24_;
	GError * _inner_error_ = NULL;
#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	g_return_val_if_fail (G_IS_FILE (db_file), NULL);
#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	self = (DataImportsFSpotDbFSpotDatabase*) g_object_new (object_type, NULL);
#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp0_ = db_file;
#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp1_ = g_file_get_path (_tmp0_);
#line 33 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	filename = _tmp1_;
#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp3_ = sqlite3_open_v2 (filename, &_tmp2_, SQLITE_OPEN_READONLY, NULL);
#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_sqlite3_close0 (self->priv->fspot_db);
#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	self->priv->fspot_db = _tmp2_;
#line 34 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	res = _tmp3_;
#line 36 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	if (res != SQLITE_OK) {
#line 263 "FSpotDatabase.c"
		GError* _tmp4_;
#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
		_tmp4_ = g_error_new (DATABASE_ERROR, DATABASE_ERROR_ERROR, "Unable to open F-Spot database %s: %d", filename, res);
#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
		_inner_error_ = _tmp4_;
#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
		if ((_inner_error_->domain == DATABASE_ERROR) || (_inner_error_->domain == SPIT_DATA_IMPORTS_DATA_IMPORT_ERROR)) {
#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			g_propagate_error (error, _inner_error_);
#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			_g_free0 (filename);
#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			_g_object_unref0 (self);
#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			return NULL;
#line 279 "FSpotDatabase.c"
		} else {
#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			_g_free0 (filename);
#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			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);
#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			g_clear_error (&_inner_error_);
#line 37 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			return NULL;
#line 289 "FSpotDatabase.c"
		}
	}
#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp5_ = self->priv->fspot_db;
#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp6_ = data_imports_fspot_db_fspot_meta_table_new (_tmp5_);
#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_importable_database_table_unref0 (self->priv->meta_table);
#line 38 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	self->priv->meta_table = _tmp6_;
#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp8_ = self->priv->meta_table;
#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp9_ = data_imports_fspot_db_fspot_meta_table_get_hidden_tag_id (_tmp8_, &_inner_error_);
#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp7_ = _tmp9_;
#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
		if ((_inner_error_->domain == DATABASE_ERROR) || (_inner_error_->domain == SPIT_DATA_IMPORTS_DATA_IMPORT_ERROR)) {
#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			g_propagate_error (error, _inner_error_);
#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			_g_free0 (filename);
#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			_g_object_unref0 (self);
#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			return NULL;
#line 318 "FSpotDatabase.c"
		} else {
#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			_g_free0 (filename);
#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			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);
#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			g_clear_error (&_inner_error_);
#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			return NULL;
#line 328 "FSpotDatabase.c"
		}
	}
#line 39 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	self->hidden_tag_id = _tmp7_;
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp11_ = data_imports_fspot_db_fspot_database_get_version (self, &_inner_error_);
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp10_ = _tmp11_;
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
		if ((_inner_error_->domain == DATABASE_ERROR) || (_inner_error_->domain == SPIT_DATA_IMPORTS_DATA_IMPORT_ERROR)) {
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			g_propagate_error (error, _inner_error_);
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			_g_free0 (filename);
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			_g_object_unref0 (self);
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			return NULL;
#line 349 "FSpotDatabase.c"
		} else {
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			_g_free0 (filename);
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			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);
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			g_clear_error (&_inner_error_);
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			return NULL;
#line 359 "FSpotDatabase.c"
		}
	}
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp12_ = data_imports_fspot_db_fspot_database_behavior_new (_tmp10_, &_inner_error_);
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	db_behavior = _tmp12_;
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
		if ((_inner_error_->domain == DATABASE_ERROR) || (_inner_error_->domain == SPIT_DATA_IMPORTS_DATA_IMPORT_ERROR)) {
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			g_propagate_error (error, _inner_error_);
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			_g_object_unref0 (_tmp10_);
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			_g_free0 (filename);
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			_g_object_unref0 (self);
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			return NULL;
#line 380 "FSpotDatabase.c"
		} else {
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			_g_object_unref0 (_tmp10_);
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			_g_free0 (filename);
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			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);
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			g_clear_error (&_inner_error_);
#line 41 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			return NULL;
#line 392 "FSpotDatabase.c"
		}
	}
#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp13_ = self->priv->fspot_db;
#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp14_ = db_behavior;
#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp15_ = data_imports_fspot_db_fspot_photos_table_new (_tmp13_, _tmp14_);
#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_importable_database_table_unref0 (self->photos_table);
#line 43 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	self->photos_table = _tmp15_;
#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp16_ = self->priv->fspot_db;
#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp17_ = db_behavior;
#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp18_ = data_imports_fspot_db_fspot_photo_versions_table_new (_tmp16_, _tmp17_);
#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_importable_database_table_unref0 (self->photo_versions_table);
#line 44 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	self->photo_versions_table = _tmp18_;
#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp19_ = self->priv->fspot_db;
#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp20_ = db_behavior;
#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp21_ = data_imports_fspot_db_fspot_tags_table_new (_tmp19_, _tmp20_);
#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_importable_database_table_unref0 (self->tags_table);
#line 45 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	self->tags_table = _tmp21_;
#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp22_ = self->priv->fspot_db;
#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp23_ = db_behavior;
#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp24_ = data_imports_fspot_db_fspot_rolls_table_new (_tmp22_, _tmp23_);
#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_importable_database_table_unref0 (self->rolls_table);
#line 46 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	self->rolls_table = _tmp24_;
#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_g_object_unref0 (db_behavior);
#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_g_object_unref0 (_tmp10_);
#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_g_free0 (filename);
#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	return self;
#line 443 "FSpotDatabase.c"
}


DataImportsFSpotDbFSpotDatabase* data_imports_fspot_db_fspot_database_new (GFile* db_file, GError** error) {
#line 32 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	return data_imports_fspot_db_fspot_database_construct (DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE, db_file, error);
#line 450 "FSpotDatabase.c"
}


static UtilsVersionNumber* data_imports_fspot_db_fspot_database_get_version (DataImportsFSpotDbFSpotDatabase* self, GError** error) {
	UtilsVersionNumber* result = NULL;
	gchar* _tmp0_ = NULL;
	DataImportsFSpotDbFSpotMetaTable* _tmp1_;
	gchar* _tmp2_;
	UtilsVersionNumber* _tmp3_;
	GError * _inner_error_ = NULL;
#line 52 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	g_return_val_if_fail (DATA_IMPORTS_FSPOT_DB_IS_FSPOT_DATABASE (self), NULL);
#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp1_ = self->priv->meta_table;
#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp2_ = data_imports_fspot_db_fspot_meta_table_get_db_version (_tmp1_, &_inner_error_);
#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp0_ = _tmp2_;
#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
		if (_inner_error_->domain == DATABASE_ERROR) {
#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			g_propagate_error (error, _inner_error_);
#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			return NULL;
#line 477 "FSpotDatabase.c"
		} else {
#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			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);
#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			g_clear_error (&_inner_error_);
#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
			return NULL;
#line 485 "FSpotDatabase.c"
		}
	}
#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_tmp3_ = utils_version_number_new_from_string (_tmp0_, ".");
#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	result = _tmp3_;
#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_g_free0 (_tmp0_);
#line 53 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	return result;
#line 496 "FSpotDatabase.c"
}


static void data_imports_fspot_db_fspot_database_class_init (DataImportsFSpotDbFSpotDatabaseClass * klass) {
#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	data_imports_fspot_db_fspot_database_parent_class = g_type_class_peek_parent (klass);
#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	g_type_class_add_private (klass, sizeof (DataImportsFSpotDbFSpotDatabasePrivate));
#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	G_OBJECT_CLASS (klass)->finalize = data_imports_fspot_db_fspot_database_finalize;
#line 507 "FSpotDatabase.c"
}


static void data_imports_fspot_db_fspot_database_instance_init (DataImportsFSpotDbFSpotDatabase * self) {
#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	self->priv = DATA_IMPORTS_FSPOT_DB_FSPOT_DATABASE_GET_PRIVATE (self);
#line 514 "FSpotDatabase.c"
}


static void data_imports_fspot_db_fspot_database_finalize (GObject * obj) {
	DataImportsFSpotDbFSpotDatabase * self;
#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, DATA_IMPORTS_FSPOT_DB_TYPE_FSPOT_DATABASE, DataImportsFSpotDbFSpotDatabase);
#line 24 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_sqlite3_close0 (self->priv->fspot_db);
#line 25 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_importable_database_table_unref0 (self->priv->meta_table);
#line 26 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_importable_database_table_unref0 (self->photos_table);
#line 27 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_importable_database_table_unref0 (self->photo_versions_table);
#line 28 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_importable_database_table_unref0 (self->tags_table);
#line 29 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	_importable_database_table_unref0 (self->rolls_table);
#line 23 "/home/jens/Source/shotwell/plugins/shotwell-data-imports/FSpotDatabase.vala"
	G_OBJECT_CLASS (data_imports_fspot_db_fspot_database_parent_class)->finalize (obj);
#line 536 "FSpotDatabase.c"
}


/**
 * An object that is able to read from the F-Spot
 * database and extract the relevant objects.
 */
GType data_imports_fspot_db_fspot_database_get_type (void) {
	static volatile gsize data_imports_fspot_db_fspot_database_type_id__volatile = 0;
	if (g_once_init_enter (&data_imports_fspot_db_fspot_database_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DataImportsFSpotDbFSpotDatabaseClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) data_imports_fspot_db_fspot_database_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (DataImportsFSpotDbFSpotDatabase), 0, (GInstanceInitFunc) data_imports_fspot_db_fspot_database_instance_init, NULL };
		GType data_imports_fspot_db_fspot_database_type_id;
		data_imports_fspot_db_fspot_database_type_id = g_type_register_static (G_TYPE_OBJECT, "DataImportsFSpotDbFSpotDatabase", &g_define_type_info, 0);
		g_once_init_leave (&data_imports_fspot_db_fspot_database_type_id__volatile, data_imports_fspot_db_fspot_database_type_id);
	}
	return data_imports_fspot_db_fspot_database_type_id__volatile;
}