summaryrefslogtreecommitdiff
path: root/src/data_imports/DataImportSource.c
blob: 97e9bbd6c07e1db98fa8bcaed7c8122ebbb31765 (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
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
/* DataImportSource.c generated by valac 0.34.7, the Vala compiler
 * generated from DataImportSource.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 "shotwell-plugin-dev-1.0.h"
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <gio/gio.h>
#include <gobject/gvaluecollector.h>


#define SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_SOURCE (spit_data_imports_data_import_source_get_type ())
#define SPIT_DATA_IMPORTS_DATA_IMPORT_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_SOURCE, SpitDataImportsDataImportSource))
#define SPIT_DATA_IMPORTS_DATA_IMPORT_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_SOURCE, SpitDataImportsDataImportSourceClass))
#define SPIT_DATA_IMPORTS_IS_DATA_IMPORT_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_SOURCE))
#define SPIT_DATA_IMPORTS_IS_DATA_IMPORT_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_SOURCE))
#define SPIT_DATA_IMPORTS_DATA_IMPORT_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_SOURCE, SpitDataImportsDataImportSourceClass))

typedef struct _SpitDataImportsDataImportSource SpitDataImportsDataImportSource;
typedef struct _SpitDataImportsDataImportSourceClass SpitDataImportsDataImportSourceClass;
typedef struct _SpitDataImportsDataImportSourcePrivate SpitDataImportsDataImportSourcePrivate;

#define TYPE_METADATA_DATE_TIME (metadata_date_time_get_type ())
#define METADATA_DATE_TIME(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_METADATA_DATE_TIME, MetadataDateTime))
#define METADATA_DATE_TIME_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_METADATA_DATE_TIME, MetadataDateTimeClass))
#define IS_METADATA_DATE_TIME(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_METADATA_DATE_TIME))
#define IS_METADATA_DATE_TIME_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_METADATA_DATE_TIME))
#define METADATA_DATE_TIME_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_METADATA_DATE_TIME, MetadataDateTimeClass))

typedef struct _MetadataDateTime MetadataDateTime;
typedef struct _MetadataDateTimeClass MetadataDateTimeClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _metadata_date_time_unref0(var) ((var == NULL) ? NULL : (var = (metadata_date_time_unref (var), NULL)))

#define TYPE_MEDIA_METADATA (media_metadata_get_type ())
#define MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_METADATA, MediaMetadata))
#define MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_METADATA, MediaMetadataClass))
#define IS_MEDIA_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_METADATA))
#define IS_MEDIA_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_METADATA))
#define MEDIA_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_METADATA, MediaMetadataClass))

typedef struct _MediaMetadata MediaMetadata;
typedef struct _MediaMetadataClass MediaMetadataClass;

#define TYPE_PHOTO_METADATA (photo_metadata_get_type ())
#define PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_METADATA, PhotoMetadata))
#define PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_METADATA, PhotoMetadataClass))
#define IS_PHOTO_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_METADATA))
#define IS_PHOTO_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_METADATA))
#define PHOTO_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_METADATA, PhotoMetadataClass))

typedef struct _PhotoMetadata PhotoMetadata;
typedef struct _PhotoMetadataClass PhotoMetadataClass;
#define _media_metadata_unref0(var) ((var == NULL) ? NULL : (var = (media_metadata_unref (var), NULL)))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))

#define TYPE_PHOTO_PREVIEW (photo_preview_get_type ())
#define PHOTO_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_PREVIEW, PhotoPreview))
#define PHOTO_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_PREVIEW, PhotoPreviewClass))
#define IS_PHOTO_PREVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_PREVIEW))
#define IS_PHOTO_PREVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_PREVIEW))
#define PHOTO_PREVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_PREVIEW, PhotoPreviewClass))

typedef struct _PhotoPreview PhotoPreview;
typedef struct _PhotoPreviewClass PhotoPreviewClass;
#define _photo_preview_unref0(var) ((var == NULL) ? NULL : (var = (photo_preview_unref (var), NULL)))

#define TYPE_PHOTO_FILE_FORMAT (photo_file_format_get_type ())
typedef struct _SpitDataImportsParamSpecDataImportSource SpitDataImportsParamSpecDataImportSource;

struct _SpitDataImportsDataImportSource {
	GTypeInstance parent_instance;
	volatile int ref_count;
	SpitDataImportsDataImportSourcePrivate * priv;
};

struct _SpitDataImportsDataImportSourceClass {
	GTypeClass parent_class;
	void (*finalize) (SpitDataImportsDataImportSource *self);
};

struct _SpitDataImportsDataImportSourcePrivate {
	gboolean backing_file_found;
	SpitDataImportsImportableMediaItem* db_photo;
	gchar* title;
	gchar* preview_md5;
	guint64 file_size;
	time_t modification_time;
	MetadataDateTime* exposure_time;
};

typedef enum  {
	PHOTO_FILE_FORMAT_JFIF,
	PHOTO_FILE_FORMAT_RAW,
	PHOTO_FILE_FORMAT_PNG,
	PHOTO_FILE_FORMAT_TIFF,
	PHOTO_FILE_FORMAT_BMP,
	PHOTO_FILE_FORMAT_UNKNOWN
} PhotoFileFormat;

struct _SpitDataImportsParamSpecDataImportSource {
	GParamSpec parent_instance;
};


static gpointer spit_data_imports_data_import_source_parent_class = NULL;

gpointer spit_data_imports_data_import_source_ref (gpointer instance);
void spit_data_imports_data_import_source_unref (gpointer instance);
GParamSpec* spit_data_imports_param_spec_data_import_source (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void spit_data_imports_value_set_data_import_source (GValue* value, gpointer v_object);
void spit_data_imports_value_take_data_import_source (GValue* value, gpointer v_object);
gpointer spit_data_imports_value_get_data_import_source (const GValue* value);
GType spit_data_imports_data_import_source_get_type (void) G_GNUC_CONST;
gpointer metadata_date_time_ref (gpointer instance);
void metadata_date_time_unref (gpointer instance);
GParamSpec* param_spec_metadata_date_time (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_metadata_date_time (GValue* value, gpointer v_object);
void value_take_metadata_date_time (GValue* value, gpointer v_object);
gpointer value_get_metadata_date_time (const GValue* value);
GType metadata_date_time_get_type (void) G_GNUC_CONST;
#define SPIT_DATA_IMPORTS_DATA_IMPORT_SOURCE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_SOURCE, SpitDataImportsDataImportSourcePrivate))
enum  {
	SPIT_DATA_IMPORTS_DATA_IMPORT_SOURCE_DUMMY_PROPERTY
};
SpitDataImportsDataImportSource* spit_data_imports_data_import_source_new (SpitDataImportsImportableMediaItem* db_photo);
SpitDataImportsDataImportSource* spit_data_imports_data_import_source_construct (GType object_type, SpitDataImportsImportableMediaItem* db_photo);
gpointer media_metadata_ref (gpointer instance);
void media_metadata_unref (gpointer instance);
GParamSpec* param_spec_media_metadata (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_media_metadata (GValue* value, gpointer v_object);
void value_take_media_metadata (GValue* value, gpointer v_object);
gpointer value_get_media_metadata (const GValue* value);
GType media_metadata_get_type (void) G_GNUC_CONST;
GType photo_metadata_get_type (void) G_GNUC_CONST;
PhotoMetadata* photo_metadata_new (void);
PhotoMetadata* photo_metadata_construct (GType object_type);
void media_metadata_read_from_file (MediaMetadata* self, GFile* file, GError** error);
gchar* spit_data_imports_data_import_source_get_filename (SpitDataImportsDataImportSource* self);
gchar* media_metadata_get_title (MediaMetadata* self);
MetadataDateTime* metadata_date_time_new (time_t timestamp);
MetadataDateTime* metadata_date_time_construct (GType object_type, time_t timestamp);
MetadataDateTime* photo_metadata_get_exposure_date_time (PhotoMetadata* self);
gpointer photo_preview_ref (gpointer instance);
void photo_preview_unref (gpointer instance);
GParamSpec* param_spec_photo_preview (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_photo_preview (GValue* value, gpointer v_object);
void value_take_photo_preview (GValue* value, gpointer v_object);
gpointer value_get_photo_preview (const GValue* value);
GType photo_preview_get_type (void) G_GNUC_CONST;
PhotoPreview* photo_metadata_get_preview (PhotoMetadata* self, guint number);
guint8* photo_preview_flatten (PhotoPreview* self, int* result_length1, GError** error);
gchar* md5_binary (guint8* buffer, gsize length);
guint64 query_total_file_size (GFile* file_or_dir, GCancellable* cancellable, GError** error);
time_t query_file_modified (GFile* file, GError** error);
gchar* spit_data_imports_data_import_source_get_fulldir (SpitDataImportsDataImportSource* self);
GFile* spit_data_imports_data_import_source_get_file (SpitDataImportsDataImportSource* self);
gchar* spit_data_imports_data_import_source_get_name (SpitDataImportsDataImportSource* self);
gboolean is_string_empty (const gchar* s);
gchar* spit_data_imports_data_import_source_get_title (SpitDataImportsDataImportSource* self);
GType photo_file_format_get_type (void) G_GNUC_CONST;
PhotoFileFormat spit_data_imports_data_import_source_get_file_format (SpitDataImportsDataImportSource* self);
PhotoFileFormat photo_file_format_get_by_basename_extension (const gchar* basename);
gchar* spit_data_imports_data_import_source_to_string (SpitDataImportsDataImportSource* self);
time_t spit_data_imports_data_import_source_get_exposure_time (SpitDataImportsDataImportSource* self);
time_t metadata_date_time_get_timestamp (MetadataDateTime* self);
guint64 spit_data_imports_data_import_source_get_filesize (SpitDataImportsDataImportSource* self);
SpitDataImportsImportableMediaItem* spit_data_imports_data_import_source_get_photo (SpitDataImportsDataImportSource* self);
gboolean spit_data_imports_data_import_source_is_already_imported (SpitDataImportsDataImportSource* self);
gboolean library_photo_has_nontrash_duplicate (GFile* file, const gchar* thumbnail_md5, const gchar* full_md5, PhotoFileFormat file_format);
gboolean spit_data_imports_data_import_source_was_backing_file_found (SpitDataImportsDataImportSource* self);
static void spit_data_imports_data_import_source_finalize (SpitDataImportsDataImportSource* obj);


static gpointer _g_object_ref0 (gpointer self) {
#line 27 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return self ? g_object_ref (self) : NULL;
#line 188 "DataImportSource.c"
}


static gpointer _metadata_date_time_ref0 (gpointer self) {
#line 59 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return self ? metadata_date_time_ref (self) : NULL;
#line 195 "DataImportSource.c"
}


static gpointer _photo_preview_ref0 (gpointer self) {
#line 61 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return self ? photo_preview_ref (self) : NULL;
#line 202 "DataImportSource.c"
}


SpitDataImportsDataImportSource* spit_data_imports_data_import_source_construct (GType object_type, SpitDataImportsImportableMediaItem* db_photo) {
	SpitDataImportsDataImportSource* self = NULL;
	SpitDataImportsImportableMediaItem* _tmp0_ = NULL;
	SpitDataImportsImportableMediaItem* _tmp1_ = NULL;
	gchar* folder_path = NULL;
	SpitDataImportsImportableMediaItem* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gchar* filename = NULL;
	SpitDataImportsImportableMediaItem* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	GFile* photo = NULL;
	gboolean _tmp6_ = FALSE;
	const gchar* _tmp7_ = NULL;
	gboolean _tmp20_ = FALSE;
	GFile* _tmp21_ = NULL;
	GError * _inner_error_ = NULL;
#line 26 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	g_return_val_if_fail (SPIT_DATA_IMPORTS_IS_IMPORTABLE_MEDIA_ITEM (db_photo), NULL);
#line 26 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	self = (SpitDataImportsDataImportSource*) g_type_create_instance (object_type);
#line 27 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp0_ = db_photo;
#line 27 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 27 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_g_object_unref0 (self->priv->db_photo);
#line 27 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	self->priv->db_photo = _tmp1_;
#line 31 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp2_ = db_photo;
#line 31 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp3_ = spit_data_imports_importable_media_item_get_folder_path (_tmp2_);
#line 31 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	folder_path = _tmp3_;
#line 32 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp4_ = db_photo;
#line 32 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp5_ = spit_data_imports_importable_media_item_get_filename (_tmp4_);
#line 32 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	filename = _tmp5_;
#line 33 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	photo = NULL;
#line 34 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp7_ = folder_path;
#line 34 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	if (_tmp7_ != NULL) {
#line 252 "DataImportSource.c"
		const gchar* _tmp8_ = NULL;
#line 34 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp8_ = filename;
#line 34 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp6_ = _tmp8_ != NULL;
#line 258 "DataImportSource.c"
	} else {
#line 34 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp6_ = FALSE;
#line 262 "DataImportSource.c"
	}
#line 34 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	if (_tmp6_) {
#line 266 "DataImportSource.c"
		SpitDataImportsImportableMediaItem* _tmp9_ = NULL;
		gchar* _tmp10_ = NULL;
		gchar* _tmp11_ = NULL;
		GFile* _tmp12_ = NULL;
		GFile* _tmp13_ = NULL;
		SpitDataImportsImportableMediaItem* _tmp14_ = NULL;
		gchar* _tmp15_ = NULL;
		gchar* _tmp16_ = NULL;
		GFile* _tmp17_ = NULL;
		GFile* _tmp18_ = NULL;
		gboolean _tmp19_ = FALSE;
#line 35 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp9_ = db_photo;
#line 35 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp10_ = spit_data_imports_importable_media_item_get_folder_path (_tmp9_);
#line 35 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp11_ = _tmp10_;
#line 35 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp12_ = g_file_new_for_path (_tmp11_);
#line 35 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp13_ = _tmp12_;
#line 35 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp14_ = db_photo;
#line 35 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp15_ = spit_data_imports_importable_media_item_get_filename (_tmp14_);
#line 35 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp16_ = _tmp15_;
#line 35 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp17_ = g_file_get_child (_tmp13_, _tmp16_);
#line 35 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_g_object_unref0 (photo);
#line 35 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		photo = _tmp17_;
#line 35 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_g_free0 (_tmp16_);
#line 35 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_g_object_unref0 (_tmp13_);
#line 35 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_g_free0 (_tmp11_);
#line 38 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp18_ = photo;
#line 38 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp19_ = g_file_query_exists (_tmp18_, NULL);
#line 38 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		self->priv->backing_file_found = _tmp19_;
#line 312 "DataImportSource.c"
	} else {
#line 40 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		self->priv->backing_file_found = FALSE;
#line 316 "DataImportSource.c"
	}
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp21_ = photo;
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	if (_tmp21_ != NULL) {
#line 322 "DataImportSource.c"
		gboolean _tmp22_ = FALSE;
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp22_ = self->priv->backing_file_found;
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp20_ = _tmp22_;
#line 328 "DataImportSource.c"
	} else {
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp20_ = FALSE;
#line 332 "DataImportSource.c"
	}
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	if (_tmp20_) {
#line 336 "DataImportSource.c"
		PhotoMetadata* metadata = NULL;
		PhotoMetadata* _tmp23_ = NULL;
		SpitDataImportsImportableMediaItem* _tmp30_ = NULL;
		gchar* _tmp31_ = NULL;
		const gchar* _tmp32_ = NULL;
		time_t* date_time = NULL;
		SpitDataImportsImportableMediaItem* _tmp38_ = NULL;
		time_t* _tmp39_ = NULL;
		time_t* _tmp40_ = NULL;
		PhotoPreview* _tmp48_ = NULL;
		PhotoMetadata* _tmp49_ = NULL;
		PhotoPreview* preview = NULL;
		PhotoPreview* _tmp52_ = NULL;
		PhotoPreview* _tmp53_ = NULL;
#line 44 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp23_ = photo_metadata_new ();
#line 44 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		metadata = _tmp23_;
#line 355 "DataImportSource.c"
		{
			PhotoMetadata* _tmp24_ = NULL;
			GFile* _tmp25_ = NULL;
#line 46 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp24_ = metadata;
#line 46 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp25_ = photo;
#line 46 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			media_metadata_read_from_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, TYPE_MEDIA_METADATA, MediaMetadata), _tmp25_, &_inner_error_);
#line 46 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 367 "DataImportSource.c"
				goto __catch217_g_error;
			}
		}
		goto __finally217;
		__catch217_g_error:
		{
			GError* e = NULL;
			gchar* _tmp26_ = NULL;
			gchar* _tmp27_ = NULL;
			GError* _tmp28_ = NULL;
			const gchar* _tmp29_ = NULL;
#line 45 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			e = _inner_error_;
#line 45 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_inner_error_ = NULL;
#line 48 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp26_ = spit_data_imports_data_import_source_get_filename (self);
#line 48 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp27_ = _tmp26_;
#line 48 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp28_ = e;
#line 48 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp29_ = _tmp28_->message;
#line 48 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			g_warning ("DataImportSource.vala:48: Could not get file metadata for %s: %s", _tmp27_, _tmp29_);
#line 48 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_g_free0 (_tmp27_);
#line 49 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_media_metadata_unref0 (metadata);
#line 49 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			metadata = NULL;
#line 45 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_g_error_free0 (e);
#line 401 "DataImportSource.c"
		}
		__finally217:
#line 45 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 45 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_media_metadata_unref0 (metadata);
#line 45 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_g_object_unref0 (photo);
#line 45 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_g_free0 (filename);
#line 45 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_g_free0 (folder_path);
#line 45 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.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 45 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			g_clear_error (&_inner_error_);
#line 45 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			return NULL;
#line 420 "DataImportSource.c"
		}
#line 51 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp30_ = db_photo;
#line 51 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp31_ = spit_data_imports_importable_media_item_get_title (_tmp30_);
#line 51 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_g_free0 (self->priv->title);
#line 51 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		self->priv->title = _tmp31_;
#line 52 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp32_ = self->priv->title;
#line 52 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		if (_tmp32_ == NULL) {
#line 434 "DataImportSource.c"
			gchar* _tmp33_ = NULL;
			PhotoMetadata* _tmp34_ = NULL;
			gchar* _tmp37_ = NULL;
#line 53 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp34_ = metadata;
#line 53 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			if (_tmp34_ != NULL) {
#line 442 "DataImportSource.c"
				PhotoMetadata* _tmp35_ = NULL;
				gchar* _tmp36_ = NULL;
#line 53 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_tmp35_ = metadata;
#line 53 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_tmp36_ = media_metadata_get_title (G_TYPE_CHECK_INSTANCE_CAST (_tmp35_, TYPE_MEDIA_METADATA, MediaMetadata));
#line 53 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_g_free0 (_tmp33_);
#line 53 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_tmp33_ = _tmp36_;
#line 453 "DataImportSource.c"
			} else {
#line 53 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_g_free0 (_tmp33_);
#line 53 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_tmp33_ = NULL;
#line 459 "DataImportSource.c"
			}
#line 53 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp37_ = g_strdup (_tmp33_);
#line 53 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_g_free0 (self->priv->title);
#line 53 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			self->priv->title = _tmp37_;
#line 52 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_g_free0 (_tmp33_);
#line 469 "DataImportSource.c"
		}
#line 55 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp38_ = db_photo;
#line 55 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp39_ = spit_data_imports_importable_media_item_get_exposure_time (_tmp38_);
#line 55 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		date_time = _tmp39_;
#line 56 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp40_ = date_time;
#line 56 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		if (_tmp40_ != NULL) {
#line 481 "DataImportSource.c"
			time_t* _tmp41_ = NULL;
			MetadataDateTime* _tmp42_ = NULL;
#line 57 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp41_ = date_time;
#line 57 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp42_ = metadata_date_time_new (*_tmp41_);
#line 57 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_metadata_date_time_unref0 (self->priv->exposure_time);
#line 57 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			self->priv->exposure_time = _tmp42_;
#line 492 "DataImportSource.c"
		} else {
			MetadataDateTime* _tmp43_ = NULL;
			PhotoMetadata* _tmp44_ = NULL;
			MetadataDateTime* _tmp47_ = NULL;
#line 59 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp44_ = metadata;
#line 59 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			if (_tmp44_ != NULL) {
#line 501 "DataImportSource.c"
				PhotoMetadata* _tmp45_ = NULL;
				MetadataDateTime* _tmp46_ = NULL;
#line 59 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_tmp45_ = metadata;
#line 59 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_tmp46_ = photo_metadata_get_exposure_date_time (_tmp45_);
#line 59 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_metadata_date_time_unref0 (_tmp43_);
#line 59 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_tmp43_ = _tmp46_;
#line 512 "DataImportSource.c"
			} else {
#line 59 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_metadata_date_time_unref0 (_tmp43_);
#line 59 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_tmp43_ = NULL;
#line 518 "DataImportSource.c"
			}
#line 59 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp47_ = _metadata_date_time_ref0 (_tmp43_);
#line 59 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_metadata_date_time_unref0 (self->priv->exposure_time);
#line 59 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			self->priv->exposure_time = _tmp47_;
#line 56 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_metadata_date_time_unref0 (_tmp43_);
#line 528 "DataImportSource.c"
		}
#line 61 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp49_ = metadata;
#line 61 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		if (_tmp49_ != NULL) {
#line 534 "DataImportSource.c"
			PhotoMetadata* _tmp50_ = NULL;
			PhotoPreview* _tmp51_ = NULL;
#line 61 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp50_ = metadata;
#line 61 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp51_ = photo_metadata_get_preview (_tmp50_, (guint) 0);
#line 61 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_photo_preview_unref0 (_tmp48_);
#line 61 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp48_ = _tmp51_;
#line 545 "DataImportSource.c"
		} else {
#line 61 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_photo_preview_unref0 (_tmp48_);
#line 61 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp48_ = NULL;
#line 551 "DataImportSource.c"
		}
#line 61 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp52_ = _photo_preview_ref0 (_tmp48_);
#line 61 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		preview = _tmp52_;
#line 62 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp53_ = preview;
#line 62 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		if (_tmp53_ != NULL) {
#line 561 "DataImportSource.c"
			{
				guint8* preview_raw = NULL;
				PhotoPreview* _tmp54_ = NULL;
				gint _tmp55_ = 0;
				guint8* _tmp56_ = NULL;
				gint preview_raw_length1 = 0;
				gint _preview_raw_size_ = 0;
				guint8* _tmp57_ = NULL;
				gint _tmp57__length1 = 0;
				guint8* _tmp58_ = NULL;
				gint _tmp58__length1 = 0;
				gchar* _tmp59_ = NULL;
#line 64 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_tmp54_ = preview;
#line 64 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_tmp56_ = photo_preview_flatten (_tmp54_, &_tmp55_, &_inner_error_);
#line 64 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				preview_raw = _tmp56_;
#line 64 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				preview_raw_length1 = _tmp55_;
#line 64 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_preview_raw_size_ = preview_raw_length1;
#line 64 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 586 "DataImportSource.c"
					goto __catch218_g_error;
				}
#line 65 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_tmp57_ = preview_raw;
#line 65 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_tmp57__length1 = preview_raw_length1;
#line 65 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_tmp58_ = preview_raw;
#line 65 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_tmp58__length1 = preview_raw_length1;
#line 65 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_tmp59_ = md5_binary (_tmp57_, (gsize) _tmp58__length1);
#line 65 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_g_free0 (self->priv->preview_md5);
#line 65 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				self->priv->preview_md5 = _tmp59_;
#line 63 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				preview_raw = (g_free (preview_raw), NULL);
#line 605 "DataImportSource.c"
			}
			goto __finally218;
			__catch218_g_error:
			{
				GError* e = NULL;
				gchar* _tmp60_ = NULL;
				gchar* _tmp61_ = NULL;
				GError* _tmp62_ = NULL;
				const gchar* _tmp63_ = NULL;
#line 63 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				e = _inner_error_;
#line 63 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_inner_error_ = NULL;
#line 67 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_tmp60_ = spit_data_imports_data_import_source_get_filename (self);
#line 67 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_tmp61_ = _tmp60_;
#line 67 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_tmp62_ = e;
#line 67 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_tmp63_ = _tmp62_->message;
#line 67 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				g_warning ("DataImportSource.vala:67: Could not get raw preview for %s: %s", _tmp61_, _tmp63_);
#line 67 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_g_free0 (_tmp61_);
#line 63 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_g_error_free0 (e);
#line 633 "DataImportSource.c"
			}
			__finally218:
#line 63 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 63 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_photo_preview_unref0 (preview);
#line 63 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_photo_preview_unref0 (_tmp48_);
#line 63 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_g_free0 (date_time);
#line 63 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_media_metadata_unref0 (metadata);
#line 63 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_g_object_unref0 (photo);
#line 63 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_g_free0 (filename);
#line 63 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				_g_free0 (folder_path);
#line 63 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.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 63 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				g_clear_error (&_inner_error_);
#line 63 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
				return NULL;
#line 658 "DataImportSource.c"
			}
		}
		{
			guint64 _tmp64_ = 0ULL;
			GFile* _tmp65_ = NULL;
			guint64 _tmp66_ = 0ULL;
#line 75 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp65_ = photo;
#line 75 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp66_ = query_total_file_size (_tmp65_, NULL, &_inner_error_);
#line 75 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp64_ = _tmp66_;
#line 75 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 673 "DataImportSource.c"
				goto __catch219_g_error;
			}
#line 75 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			self->priv->file_size = _tmp64_;
#line 678 "DataImportSource.c"
		}
		goto __finally219;
		__catch219_g_error:
		{
			GError* e = NULL;
			gchar* _tmp67_ = NULL;
			gchar* _tmp68_ = NULL;
			GError* _tmp69_ = NULL;
			const gchar* _tmp70_ = NULL;
#line 74 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			e = _inner_error_;
#line 74 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_inner_error_ = NULL;
#line 77 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp67_ = spit_data_imports_data_import_source_get_filename (self);
#line 77 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp68_ = _tmp67_;
#line 77 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp69_ = e;
#line 77 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp70_ = _tmp69_->message;
#line 77 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			g_warning ("DataImportSource.vala:77: Could not get file size for %s: %s", _tmp68_, _tmp70_);
#line 77 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_g_free0 (_tmp68_);
#line 74 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_g_error_free0 (e);
#line 706 "DataImportSource.c"
		}
		__finally219:
#line 74 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 74 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_photo_preview_unref0 (preview);
#line 74 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_photo_preview_unref0 (_tmp48_);
#line 74 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_g_free0 (date_time);
#line 74 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_media_metadata_unref0 (metadata);
#line 74 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_g_object_unref0 (photo);
#line 74 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_g_free0 (filename);
#line 74 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_g_free0 (folder_path);
#line 74 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.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 74 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			g_clear_error (&_inner_error_);
#line 74 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			return NULL;
#line 731 "DataImportSource.c"
		}
		{
			time_t _tmp71_ = 0;
			GFile* _tmp72_ = NULL;
			time_t _tmp73_ = 0;
#line 80 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp72_ = photo;
#line 80 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp73_ = query_file_modified (_tmp72_, &_inner_error_);
#line 80 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp71_ = _tmp73_;
#line 80 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 745 "DataImportSource.c"
				goto __catch220_g_error;
			}
#line 80 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			self->priv->modification_time = _tmp71_;
#line 750 "DataImportSource.c"
		}
		goto __finally220;
		__catch220_g_error:
		{
			GError* e = NULL;
			gchar* _tmp74_ = NULL;
			gchar* _tmp75_ = NULL;
			GError* _tmp76_ = NULL;
			const gchar* _tmp77_ = NULL;
#line 79 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			e = _inner_error_;
#line 79 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_inner_error_ = NULL;
#line 82 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp74_ = spit_data_imports_data_import_source_get_filename (self);
#line 82 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp75_ = _tmp74_;
#line 82 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp76_ = e;
#line 82 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_tmp77_ = _tmp76_->message;
#line 82 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			g_warning ("DataImportSource.vala:82: Could not get modification time for %s: %s", _tmp75_, _tmp77_);
#line 82 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_g_free0 (_tmp75_);
#line 79 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_g_error_free0 (e);
#line 778 "DataImportSource.c"
		}
		__finally220:
#line 79 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 79 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_photo_preview_unref0 (preview);
#line 79 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_photo_preview_unref0 (_tmp48_);
#line 79 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_g_free0 (date_time);
#line 79 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_media_metadata_unref0 (metadata);
#line 79 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_g_object_unref0 (photo);
#line 79 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_g_free0 (filename);
#line 79 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			_g_free0 (folder_path);
#line 79 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.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 79 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			g_clear_error (&_inner_error_);
#line 79 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			return NULL;
#line 803 "DataImportSource.c"
		}
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_photo_preview_unref0 (preview);
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_photo_preview_unref0 (_tmp48_);
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_g_free0 (date_time);
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_media_metadata_unref0 (metadata);
#line 813 "DataImportSource.c"
	} else {
		GFile* _tmp78_ = NULL;
		gchar* _tmp79_ = NULL;
		gchar* _tmp80_ = NULL;
		gchar* _tmp81_ = NULL;
		gchar* _tmp82_ = NULL;
#line 85 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp78_ = photo;
#line 85 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp79_ = g_file_get_path (_tmp78_);
#line 85 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp80_ = _tmp79_;
#line 85 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp81_ = g_strdup_printf ("Photo file %s not found", _tmp80_);
#line 85 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp82_ = _tmp81_;
#line 85 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		g_debug ("DataImportSource.vala:85: %s", _tmp82_);
#line 85 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_g_free0 (_tmp82_);
#line 85 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_g_free0 (_tmp80_);
#line 836 "DataImportSource.c"
	}
#line 26 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_g_object_unref0 (photo);
#line 26 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_g_free0 (filename);
#line 26 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_g_free0 (folder_path);
#line 26 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return self;
#line 846 "DataImportSource.c"
}


SpitDataImportsDataImportSource* spit_data_imports_data_import_source_new (SpitDataImportsImportableMediaItem* db_photo) {
#line 26 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return spit_data_imports_data_import_source_construct (SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_SOURCE, db_photo);
#line 853 "DataImportSource.c"
}


gchar* spit_data_imports_data_import_source_get_filename (SpitDataImportsDataImportSource* self) {
	gchar* result = NULL;
	SpitDataImportsImportableMediaItem* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 89 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	g_return_val_if_fail (SPIT_DATA_IMPORTS_IS_DATA_IMPORT_SOURCE (self), NULL);
#line 90 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp0_ = self->priv->db_photo;
#line 90 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp1_ = spit_data_imports_importable_media_item_get_filename (_tmp0_);
#line 90 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	result = _tmp1_;
#line 90 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return result;
#line 871 "DataImportSource.c"
}


gchar* spit_data_imports_data_import_source_get_fulldir (SpitDataImportsDataImportSource* self) {
	gchar* result = NULL;
	SpitDataImportsImportableMediaItem* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 93 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	g_return_val_if_fail (SPIT_DATA_IMPORTS_IS_DATA_IMPORT_SOURCE (self), NULL);
#line 94 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp0_ = self->priv->db_photo;
#line 94 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp1_ = spit_data_imports_importable_media_item_get_folder_path (_tmp0_);
#line 94 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	result = _tmp1_;
#line 94 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return result;
#line 889 "DataImportSource.c"
}


GFile* spit_data_imports_data_import_source_get_file (SpitDataImportsDataImportSource* self) {
	GFile* result = NULL;
	gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	GFile* _tmp2_ = NULL;
	GFile* _tmp3_ = NULL;
	gchar* _tmp4_ = NULL;
	gchar* _tmp5_ = NULL;
	GFile* _tmp6_ = NULL;
	GFile* _tmp7_ = NULL;
#line 97 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	g_return_val_if_fail (SPIT_DATA_IMPORTS_IS_DATA_IMPORT_SOURCE (self), NULL);
#line 98 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp0_ = spit_data_imports_data_import_source_get_fulldir (self);
#line 98 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp1_ = _tmp0_;
#line 98 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp2_ = g_file_new_for_path (_tmp1_);
#line 98 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp3_ = _tmp2_;
#line 98 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp4_ = spit_data_imports_data_import_source_get_filename (self);
#line 98 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp5_ = _tmp4_;
#line 98 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp6_ = g_file_get_child (_tmp3_, _tmp5_);
#line 98 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp7_ = _tmp6_;
#line 98 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_g_free0 (_tmp5_);
#line 98 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_g_object_unref0 (_tmp3_);
#line 98 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_g_free0 (_tmp1_);
#line 98 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	result = _tmp7_;
#line 98 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return result;
#line 931 "DataImportSource.c"
}


gchar* spit_data_imports_data_import_source_get_name (SpitDataImportsDataImportSource* self) {
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
#line 101 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	g_return_val_if_fail (SPIT_DATA_IMPORTS_IS_DATA_IMPORT_SOURCE (self), NULL);
#line 102 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp1_ = self->priv->title;
#line 102 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp2_ = is_string_empty (_tmp1_);
#line 102 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	if (!_tmp2_) {
#line 948 "DataImportSource.c"
		const gchar* _tmp3_ = NULL;
		gchar* _tmp4_ = NULL;
#line 102 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp3_ = self->priv->title;
#line 102 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp4_ = g_strdup (_tmp3_);
#line 102 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_g_free0 (_tmp0_);
#line 102 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp0_ = _tmp4_;
#line 959 "DataImportSource.c"
	} else {
		gchar* _tmp5_ = NULL;
#line 102 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp5_ = spit_data_imports_data_import_source_get_filename (self);
#line 102 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_g_free0 (_tmp0_);
#line 102 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp0_ = _tmp5_;
#line 968 "DataImportSource.c"
	}
#line 102 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	result = _tmp0_;
#line 102 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return result;
#line 974 "DataImportSource.c"
}


gchar* spit_data_imports_data_import_source_get_title (SpitDataImportsDataImportSource* self) {
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
#line 105 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	g_return_val_if_fail (SPIT_DATA_IMPORTS_IS_DATA_IMPORT_SOURCE (self), NULL);
#line 106 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp0_ = self->priv->title;
#line 106 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp1_ = g_strdup (_tmp0_);
#line 106 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	result = _tmp1_;
#line 106 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return result;
#line 992 "DataImportSource.c"
}


PhotoFileFormat spit_data_imports_data_import_source_get_file_format (SpitDataImportsDataImportSource* self) {
	PhotoFileFormat result = 0;
	gchar* _tmp0_ = NULL;
	gchar* _tmp1_ = NULL;
	PhotoFileFormat _tmp2_ = 0;
	PhotoFileFormat _tmp3_ = 0;
#line 109 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	g_return_val_if_fail (SPIT_DATA_IMPORTS_IS_DATA_IMPORT_SOURCE (self), 0);
#line 110 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp0_ = spit_data_imports_data_import_source_get_filename (self);
#line 110 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp1_ = _tmp0_;
#line 110 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp2_ = photo_file_format_get_by_basename_extension (_tmp1_);
#line 110 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp3_ = _tmp2_;
#line 110 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_g_free0 (_tmp1_);
#line 110 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	result = _tmp3_;
#line 110 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return result;
#line 1018 "DataImportSource.c"
}


gchar* spit_data_imports_data_import_source_to_string (SpitDataImportsDataImportSource* self) {
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
#line 113 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	g_return_val_if_fail (SPIT_DATA_IMPORTS_IS_DATA_IMPORT_SOURCE (self), NULL);
#line 114 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp0_ = spit_data_imports_data_import_source_get_name (self);
#line 114 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	result = _tmp0_;
#line 114 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return result;
#line 1033 "DataImportSource.c"
}


time_t spit_data_imports_data_import_source_get_exposure_time (SpitDataImportsDataImportSource* self) {
	time_t result = 0;
	time_t _tmp0_ = 0;
	MetadataDateTime* _tmp1_ = NULL;
#line 117 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	g_return_val_if_fail (SPIT_DATA_IMPORTS_IS_DATA_IMPORT_SOURCE (self), 0);
#line 118 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp1_ = self->priv->exposure_time;
#line 118 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	if (_tmp1_ != NULL) {
#line 1047 "DataImportSource.c"
		MetadataDateTime* _tmp2_ = NULL;
		time_t _tmp3_ = 0;
#line 118 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp2_ = self->priv->exposure_time;
#line 118 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp3_ = metadata_date_time_get_timestamp (_tmp2_);
#line 118 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp0_ = _tmp3_;
#line 1056 "DataImportSource.c"
	} else {
		time_t _tmp4_ = 0;
#line 118 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp4_ = self->priv->modification_time;
#line 118 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp0_ = _tmp4_;
#line 1063 "DataImportSource.c"
	}
#line 118 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	result = _tmp0_;
#line 118 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return result;
#line 1069 "DataImportSource.c"
}


guint64 spit_data_imports_data_import_source_get_filesize (SpitDataImportsDataImportSource* self) {
	guint64 result = 0ULL;
	guint64 _tmp0_ = 0ULL;
#line 121 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	g_return_val_if_fail (SPIT_DATA_IMPORTS_IS_DATA_IMPORT_SOURCE (self), 0ULL);
#line 122 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp0_ = self->priv->file_size;
#line 122 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	result = _tmp0_;
#line 122 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return result;
#line 1084 "DataImportSource.c"
}


SpitDataImportsImportableMediaItem* spit_data_imports_data_import_source_get_photo (SpitDataImportsDataImportSource* self) {
	SpitDataImportsImportableMediaItem* result = NULL;
	SpitDataImportsImportableMediaItem* _tmp0_ = NULL;
	SpitDataImportsImportableMediaItem* _tmp1_ = NULL;
#line 125 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	g_return_val_if_fail (SPIT_DATA_IMPORTS_IS_DATA_IMPORT_SOURCE (self), NULL);
#line 126 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp0_ = self->priv->db_photo;
#line 126 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 126 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	result = _tmp1_;
#line 126 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return result;
#line 1102 "DataImportSource.c"
}


gboolean spit_data_imports_data_import_source_is_already_imported (SpitDataImportsDataImportSource* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	const gchar* _tmp1_ = NULL;
#line 129 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	g_return_val_if_fail (SPIT_DATA_IMPORTS_IS_DATA_IMPORT_SOURCE (self), FALSE);
#line 131 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp1_ = self->priv->preview_md5;
#line 131 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	if (_tmp1_ != NULL) {
#line 1116 "DataImportSource.c"
		const gchar* _tmp2_ = NULL;
		PhotoFileFormat _tmp3_ = 0;
		gboolean _tmp4_ = FALSE;
#line 132 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp2_ = self->priv->preview_md5;
#line 132 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp3_ = spit_data_imports_data_import_source_get_file_format (self);
#line 132 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp4_ = library_photo_has_nontrash_duplicate (NULL, _tmp2_, NULL, _tmp3_);
#line 132 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp0_ = _tmp4_;
#line 1128 "DataImportSource.c"
	} else {
#line 133 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		_tmp0_ = FALSE;
#line 1132 "DataImportSource.c"
	}
#line 131 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	result = _tmp0_;
#line 131 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return result;
#line 1138 "DataImportSource.c"
}


gboolean spit_data_imports_data_import_source_was_backing_file_found (SpitDataImportsDataImportSource* self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
#line 136 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	g_return_val_if_fail (SPIT_DATA_IMPORTS_IS_DATA_IMPORT_SOURCE (self), FALSE);
#line 137 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_tmp0_ = self->priv->backing_file_found;
#line 137 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	result = _tmp0_;
#line 137 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return result;
#line 1153 "DataImportSource.c"
}


static void spit_data_imports_value_data_import_source_init (GValue* value) {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	value->data[0].v_pointer = NULL;
#line 1160 "DataImportSource.c"
}


static void spit_data_imports_value_data_import_source_free_value (GValue* value) {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	if (value->data[0].v_pointer) {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		spit_data_imports_data_import_source_unref (value->data[0].v_pointer);
#line 1169 "DataImportSource.c"
	}
}


static void spit_data_imports_value_data_import_source_copy_value (const GValue* src_value, GValue* dest_value) {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	if (src_value->data[0].v_pointer) {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		dest_value->data[0].v_pointer = spit_data_imports_data_import_source_ref (src_value->data[0].v_pointer);
#line 1179 "DataImportSource.c"
	} else {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		dest_value->data[0].v_pointer = NULL;
#line 1183 "DataImportSource.c"
	}
}


static gpointer spit_data_imports_value_data_import_source_peek_pointer (const GValue* value) {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return value->data[0].v_pointer;
#line 1191 "DataImportSource.c"
}


static gchar* spit_data_imports_value_data_import_source_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	if (collect_values[0].v_pointer) {
#line 1198 "DataImportSource.c"
		SpitDataImportsDataImportSource* object;
		object = collect_values[0].v_pointer;
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		if (object->parent_instance.g_class == NULL) {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 1205 "DataImportSource.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
			return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 1209 "DataImportSource.c"
		}
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		value->data[0].v_pointer = spit_data_imports_data_import_source_ref (object);
#line 1213 "DataImportSource.c"
	} else {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		value->data[0].v_pointer = NULL;
#line 1217 "DataImportSource.c"
	}
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return NULL;
#line 1221 "DataImportSource.c"
}


static gchar* spit_data_imports_value_data_import_source_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	SpitDataImportsDataImportSource** object_p;
	object_p = collect_values[0].v_pointer;
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	if (!object_p) {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 1232 "DataImportSource.c"
	}
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	if (!value->data[0].v_pointer) {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		*object_p = NULL;
#line 1238 "DataImportSource.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		*object_p = value->data[0].v_pointer;
#line 1242 "DataImportSource.c"
	} else {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		*object_p = spit_data_imports_data_import_source_ref (value->data[0].v_pointer);
#line 1246 "DataImportSource.c"
	}
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return NULL;
#line 1250 "DataImportSource.c"
}


GParamSpec* spit_data_imports_param_spec_data_import_source (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	SpitDataImportsParamSpecDataImportSource* spec;
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	g_return_val_if_fail (g_type_is_a (object_type, SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_SOURCE), NULL);
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return G_PARAM_SPEC (spec);
#line 1264 "DataImportSource.c"
}


gpointer spit_data_imports_value_get_data_import_source (const GValue* value) {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_SOURCE), NULL);
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return value->data[0].v_pointer;
#line 1273 "DataImportSource.c"
}


void spit_data_imports_value_set_data_import_source (GValue* value, gpointer v_object) {
	SpitDataImportsDataImportSource* old;
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_SOURCE));
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	old = value->data[0].v_pointer;
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	if (v_object) {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_SOURCE));
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		value->data[0].v_pointer = v_object;
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		spit_data_imports_data_import_source_ref (value->data[0].v_pointer);
#line 1293 "DataImportSource.c"
	} else {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		value->data[0].v_pointer = NULL;
#line 1297 "DataImportSource.c"
	}
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	if (old) {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		spit_data_imports_data_import_source_unref (old);
#line 1303 "DataImportSource.c"
	}
}


void spit_data_imports_value_take_data_import_source (GValue* value, gpointer v_object) {
	SpitDataImportsDataImportSource* old;
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_SOURCE));
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	old = value->data[0].v_pointer;
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	if (v_object) {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_SOURCE));
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		value->data[0].v_pointer = v_object;
#line 1322 "DataImportSource.c"
	} else {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		value->data[0].v_pointer = NULL;
#line 1326 "DataImportSource.c"
	}
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	if (old) {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		spit_data_imports_data_import_source_unref (old);
#line 1332 "DataImportSource.c"
	}
}


static void spit_data_imports_data_import_source_class_init (SpitDataImportsDataImportSourceClass * klass) {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	spit_data_imports_data_import_source_parent_class = g_type_class_peek_parent (klass);
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	((SpitDataImportsDataImportSourceClass *) klass)->finalize = spit_data_imports_data_import_source_finalize;
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	g_type_class_add_private (klass, sizeof (SpitDataImportsDataImportSourcePrivate));
#line 1344 "DataImportSource.c"
}


static void spit_data_imports_data_import_source_instance_init (SpitDataImportsDataImportSource * self) {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	self->priv = SPIT_DATA_IMPORTS_DATA_IMPORT_SOURCE_GET_PRIVATE (self);
#line 20 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	self->priv->title = NULL;
#line 21 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	self->priv->preview_md5 = NULL;
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	self->ref_count = 1;
#line 1357 "DataImportSource.c"
}


static void spit_data_imports_data_import_source_finalize (SpitDataImportsDataImportSource* obj) {
	SpitDataImportsDataImportSource * self;
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_SOURCE, SpitDataImportsDataImportSource);
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	g_signal_handlers_destroy (self);
#line 19 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_g_object_unref0 (self->priv->db_photo);
#line 20 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_g_free0 (self->priv->title);
#line 21 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_g_free0 (self->priv->preview_md5);
#line 24 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	_metadata_date_time_unref0 (self->priv->exposure_time);
#line 1375 "DataImportSource.c"
}


/**
 * Photo source implementation for alien databases. This class is responsible
 * for extracting meta-data out of a source photo to support the import
 * process.
 *
 * This class does not extend PhotoSource in order to minimise the API to the
 * absolute minimum required to run the import job.
 */
GType spit_data_imports_data_import_source_get_type (void) {
	static volatile gsize spit_data_imports_data_import_source_type_id__volatile = 0;
	if (g_once_init_enter (&spit_data_imports_data_import_source_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { spit_data_imports_value_data_import_source_init, spit_data_imports_value_data_import_source_free_value, spit_data_imports_value_data_import_source_copy_value, spit_data_imports_value_data_import_source_peek_pointer, "p", spit_data_imports_value_data_import_source_collect_value, "p", spit_data_imports_value_data_import_source_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (SpitDataImportsDataImportSourceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) spit_data_imports_data_import_source_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SpitDataImportsDataImportSource), 0, (GInstanceInitFunc) spit_data_imports_data_import_source_instance_init, &g_define_type_value_table };
		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) };
		GType spit_data_imports_data_import_source_type_id;
		spit_data_imports_data_import_source_type_id = g_type_register_fundamental (g_type_fundamental_next (), "SpitDataImportsDataImportSource", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&spit_data_imports_data_import_source_type_id__volatile, spit_data_imports_data_import_source_type_id);
	}
	return spit_data_imports_data_import_source_type_id__volatile;
}


gpointer spit_data_imports_data_import_source_ref (gpointer instance) {
	SpitDataImportsDataImportSource* self;
	self = instance;
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	g_atomic_int_inc (&self->ref_count);
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	return instance;
#line 1408 "DataImportSource.c"
}


void spit_data_imports_data_import_source_unref (gpointer instance) {
	SpitDataImportsDataImportSource* self;
	self = instance;
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		SPIT_DATA_IMPORTS_DATA_IMPORT_SOURCE_GET_CLASS (self)->finalize (self);
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportSource.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 1421 "DataImportSource.c"
	}
}