summaryrefslogtreecommitdiff
path: root/src/data_imports/DataImportJob.c
blob: 5b62a911f22be8cbd21a381c423bd439afdddfd7 (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
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
/* DataImportJob.c generated by valac 0.36.6, the Vala compiler
 * generated from DataImportJob.vala, do not modify */

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

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


#define TYPE_BATCH_IMPORT_JOB (batch_import_job_get_type ())
#define BATCH_IMPORT_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BATCH_IMPORT_JOB, BatchImportJob))
#define BATCH_IMPORT_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BATCH_IMPORT_JOB, BatchImportJobClass))
#define IS_BATCH_IMPORT_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BATCH_IMPORT_JOB))
#define IS_BATCH_IMPORT_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BATCH_IMPORT_JOB))
#define BATCH_IMPORT_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BATCH_IMPORT_JOB, BatchImportJobClass))

typedef struct _BatchImportJob BatchImportJob;
typedef struct _BatchImportJobClass BatchImportJobClass;
typedef struct _BatchImportJobPrivate BatchImportJobPrivate;

#define TYPE_DUPLICATED_FILE (duplicated_file_get_type ())
#define DUPLICATED_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DUPLICATED_FILE, DuplicatedFile))
#define DUPLICATED_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DUPLICATED_FILE, DuplicatedFileClass))
#define IS_DUPLICATED_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DUPLICATED_FILE))
#define IS_DUPLICATED_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DUPLICATED_FILE))
#define DUPLICATED_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DUPLICATED_FILE, DuplicatedFileClass))

typedef struct _DuplicatedFile DuplicatedFile;
typedef struct _DuplicatedFileClass DuplicatedFileClass;

#define TYPE_DATA_OBJECT (data_object_get_type ())
#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject))
#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass))
#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT))
#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT))
#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass))

typedef struct _DataObject DataObject;
typedef struct _DataObjectClass DataObjectClass;

#define TYPE_DATA_SOURCE (data_source_get_type ())
#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource))
#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass))
#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE))
#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE))
#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass))

typedef struct _DataSource DataSource;
typedef struct _DataSourceClass DataSourceClass;

#define TYPE_THUMBNAIL_SOURCE (thumbnail_source_get_type ())
#define THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSource))
#define THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass))
#define IS_THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_SOURCE))
#define IS_THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_SOURCE))
#define THUMBNAIL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass))

typedef struct _ThumbnailSource ThumbnailSource;
typedef struct _ThumbnailSourceClass ThumbnailSourceClass;

#define TYPE_MEDIA_SOURCE (media_source_get_type ())
#define MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE, MediaSource))
#define MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE, MediaSourceClass))
#define IS_MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE))
#define IS_MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE))
#define MEDIA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE, MediaSourceClass))

typedef struct _MediaSource MediaSource;
typedef struct _MediaSourceClass MediaSourceClass;

#define TYPE_BATCH_IMPORT_ROLL (batch_import_roll_get_type ())
#define BATCH_IMPORT_ROLL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_BATCH_IMPORT_ROLL, BatchImportRoll))
#define BATCH_IMPORT_ROLL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_BATCH_IMPORT_ROLL, BatchImportRollClass))
#define IS_BATCH_IMPORT_ROLL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_BATCH_IMPORT_ROLL))
#define IS_BATCH_IMPORT_ROLL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_BATCH_IMPORT_ROLL))
#define BATCH_IMPORT_ROLL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_BATCH_IMPORT_ROLL, BatchImportRollClass))

typedef struct _BatchImportRoll BatchImportRoll;
typedef struct _BatchImportRollClass BatchImportRollClass;

#define SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_JOB (spit_data_imports_data_import_job_get_type ())
#define SPIT_DATA_IMPORTS_DATA_IMPORT_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_JOB, SpitDataImportsDataImportJob))
#define SPIT_DATA_IMPORTS_DATA_IMPORT_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_JOB, SpitDataImportsDataImportJobClass))
#define SPIT_DATA_IMPORTS_IS_DATA_IMPORT_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_JOB))
#define SPIT_DATA_IMPORTS_IS_DATA_IMPORT_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_JOB))
#define SPIT_DATA_IMPORTS_DATA_IMPORT_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_JOB, SpitDataImportsDataImportJobClass))

typedef struct _SpitDataImportsDataImportJob SpitDataImportsDataImportJob;
typedef struct _SpitDataImportsDataImportJobClass SpitDataImportsDataImportJobClass;
typedef struct _SpitDataImportsDataImportJobPrivate SpitDataImportsDataImportJobPrivate;

#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;

#define TYPE_HIERARCHICAL_TAG_INDEX (hierarchical_tag_index_get_type ())
#define HIERARCHICAL_TAG_INDEX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_HIERARCHICAL_TAG_INDEX, HierarchicalTagIndex))
#define HIERARCHICAL_TAG_INDEX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_HIERARCHICAL_TAG_INDEX, HierarchicalTagIndexClass))
#define IS_HIERARCHICAL_TAG_INDEX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_HIERARCHICAL_TAG_INDEX))
#define IS_HIERARCHICAL_TAG_INDEX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_HIERARCHICAL_TAG_INDEX))
#define HIERARCHICAL_TAG_INDEX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_HIERARCHICAL_TAG_INDEX, HierarchicalTagIndexClass))

typedef struct _HierarchicalTagIndex HierarchicalTagIndex;
typedef struct _HierarchicalTagIndexClass HierarchicalTagIndexClass;
#define _spit_data_imports_data_import_source_unref0(var) ((var == NULL) ? NULL : (var = (spit_data_imports_data_import_source_unref (var), NULL)))
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _batch_import_job_unref0(var) ((var == NULL) ? NULL : (var = (batch_import_job_unref (var), NULL)))
#define _hierarchical_tag_index_unref0(var) ((var == NULL) ? NULL : (var = (hierarchical_tag_index_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))

#define TYPE_PHOTO_SOURCE (photo_source_get_type ())
#define PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_SOURCE, PhotoSource))
#define PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_SOURCE, PhotoSourceClass))
#define IS_PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_SOURCE))
#define IS_PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_SOURCE))
#define PHOTO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_SOURCE, PhotoSourceClass))

typedef struct _PhotoSource PhotoSource;
typedef struct _PhotoSourceClass PhotoSourceClass;

#define TYPE_PHOTO (photo_get_type ())
#define PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO, Photo))
#define PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO, PhotoClass))
#define IS_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO))
#define IS_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO))
#define PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO, PhotoClass))

typedef struct _Photo Photo;
typedef struct _PhotoClass PhotoClass;

#define TYPE_LIBRARY_PHOTO (library_photo_get_type ())
#define LIBRARY_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIBRARY_PHOTO, LibraryPhoto))
#define LIBRARY_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIBRARY_PHOTO, LibraryPhotoClass))
#define IS_LIBRARY_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIBRARY_PHOTO))
#define IS_LIBRARY_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIBRARY_PHOTO))
#define LIBRARY_PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIBRARY_PHOTO, LibraryPhotoClass))

typedef struct _LibraryPhoto LibraryPhoto;
typedef struct _LibraryPhotoClass LibraryPhotoClass;

#define TYPE_TAG (tag_get_type ())
#define TAG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TAG, Tag))
#define TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TAG, TagClass))
#define IS_TAG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TAG))
#define IS_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TAG))
#define TAG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TAG, TagClass))

typedef struct _Tag Tag;
typedef struct _TagClass TagClass;

#define TYPE_DATA_COLLECTION (data_collection_get_type ())
#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection))
#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass))
#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION))
#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION))
#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass))

typedef struct _DataCollection DataCollection;
typedef struct _DataCollectionClass DataCollectionClass;

#define TYPE_SOURCE_COLLECTION (source_collection_get_type ())
#define SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_COLLECTION, SourceCollection))
#define SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_COLLECTION, SourceCollectionClass))
#define IS_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_COLLECTION))
#define IS_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_COLLECTION))
#define SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_COLLECTION, SourceCollectionClass))

typedef struct _SourceCollection SourceCollection;
typedef struct _SourceCollectionClass SourceCollectionClass;

#define TYPE_DATABASE_SOURCE_COLLECTION (database_source_collection_get_type ())
#define DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection))
#define DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass))
#define IS_DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_SOURCE_COLLECTION))
#define IS_DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_SOURCE_COLLECTION))
#define DATABASE_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass))

typedef struct _DatabaseSourceCollection DatabaseSourceCollection;
typedef struct _DatabaseSourceCollectionClass DatabaseSourceCollectionClass;

#define TYPE_CONTAINER_SOURCE_COLLECTION (container_source_collection_get_type ())
#define CONTAINER_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection))
#define CONTAINER_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollectionClass))
#define IS_CONTAINER_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONTAINER_SOURCE_COLLECTION))
#define IS_CONTAINER_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_CONTAINER_SOURCE_COLLECTION))
#define CONTAINER_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollectionClass))

typedef struct _ContainerSourceCollection ContainerSourceCollection;
typedef struct _ContainerSourceCollectionClass ContainerSourceCollectionClass;

#define TYPE_TAG_SOURCE_COLLECTION (tag_source_collection_get_type ())
#define TAG_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TAG_SOURCE_COLLECTION, TagSourceCollection))
#define TAG_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TAG_SOURCE_COLLECTION, TagSourceCollectionClass))
#define IS_TAG_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TAG_SOURCE_COLLECTION))
#define IS_TAG_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TAG_SOURCE_COLLECTION))
#define TAG_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TAG_SOURCE_COLLECTION, TagSourceCollectionClass))

typedef struct _TagSourceCollection TagSourceCollection;
typedef struct _TagSourceCollectionClass TagSourceCollectionClass;

#define TYPE_PREPARE_INPUT_TEXT_OPTIONS (prepare_input_text_options_get_type ())

#define TYPE_VIEW_COLLECTION (view_collection_get_type ())
#define VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_VIEW_COLLECTION, ViewCollection))
#define VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_VIEW_COLLECTION, ViewCollectionClass))
#define IS_VIEW_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_VIEW_COLLECTION))
#define IS_VIEW_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_VIEW_COLLECTION))
#define VIEW_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_VIEW_COLLECTION, ViewCollectionClass))

typedef struct _ViewCollection ViewCollection;
typedef struct _ViewCollectionClass ViewCollectionClass;
typedef struct _BatchImportRollPrivate BatchImportRollPrivate;

#define TYPE_IMPORT_ID (import_id_get_type ())
typedef struct _ImportID ImportID;

#define TYPE_RATING (rating_get_type ())

#define TYPE_DATEABLE (dateable_get_type ())
#define DATEABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATEABLE, Dateable))
#define IS_DATEABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATEABLE))
#define DATEABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_DATEABLE, DateableIface))

typedef struct _Dateable Dateable;
typedef struct _DateableIface DateableIface;
#define _vala_assert(expr, msg) if G_LIKELY (expr) ; else g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);
#define _vala_return_if_fail(expr, msg) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return; }
#define _vala_return_val_if_fail(expr, msg, val) if G_LIKELY (expr) ; else { g_return_if_fail_warning (G_LOG_DOMAIN, G_STRFUNC, msg); return val; }
#define _vala_warn_if_fail(expr, msg) if G_LIKELY (expr) ; else g_warn_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, msg);

struct _BatchImportJob {
	GTypeInstance parent_instance;
	volatile int ref_count;
	BatchImportJobPrivate * priv;
};

struct _BatchImportJobClass {
	GTypeClass parent_class;
	void (*finalize) (BatchImportJob *self);
	gchar* (*get_dest_identifier) (BatchImportJob* self);
	gchar* (*get_source_identifier) (BatchImportJob* self);
	gboolean (*is_directory) (BatchImportJob* self);
	gchar* (*get_basename) (BatchImportJob* self);
	gchar* (*get_path) (BatchImportJob* self);
	DuplicatedFile* (*get_duplicated_file) (BatchImportJob* self);
	void (*set_associated) (BatchImportJob* self, BatchImportJob* associated);
	gboolean (*determine_file_size) (BatchImportJob* self, guint64* filesize, GFile* * file_or_dir);
	gboolean (*prepare) (BatchImportJob* self, GFile* * file_to_import, gboolean* copy_to_library, GError** error);
	gboolean (*complete) (BatchImportJob* self, MediaSource* source, BatchImportRoll* import_roll, GError** error);
	time_t (*get_exposure_time_override) (BatchImportJob* self);
};

struct _SpitDataImportsDataImportJob {
	BatchImportJob parent_instance;
	SpitDataImportsDataImportJobPrivate * priv;
};

struct _SpitDataImportsDataImportJobClass {
	BatchImportJobClass parent_class;
};

struct _SpitDataImportsDataImportJobPrivate {
	SpitDataImportsDataImportSource* import_source;
	GFile* src_file;
	guint64 filesize;
	time_t exposure_time;
	SpitDataImportsDataImportJob* associated;
	HierarchicalTagIndex* detected_htags;
};

typedef enum  {
	PREPARE_INPUT_TEXT_OPTIONS_EMPTY_IS_NULL = 1 << 0,
	PREPARE_INPUT_TEXT_OPTIONS_VALIDATE = 1 << 1,
	PREPARE_INPUT_TEXT_OPTIONS_INVALID_IS_NULL = 1 << 2,
	PREPARE_INPUT_TEXT_OPTIONS_STRIP = 1 << 3,
	PREPARE_INPUT_TEXT_OPTIONS_STRIP_CRLF = 1 << 4,
	PREPARE_INPUT_TEXT_OPTIONS_NORMALIZE = 1 << 5,
	PREPARE_INPUT_TEXT_OPTIONS_DEFAULT = ((((PREPARE_INPUT_TEXT_OPTIONS_EMPTY_IS_NULL | PREPARE_INPUT_TEXT_OPTIONS_VALIDATE) | PREPARE_INPUT_TEXT_OPTIONS_INVALID_IS_NULL) | PREPARE_INPUT_TEXT_OPTIONS_STRIP_CRLF) | PREPARE_INPUT_TEXT_OPTIONS_STRIP) | PREPARE_INPUT_TEXT_OPTIONS_NORMALIZE
} PrepareInputTextOptions;

struct _ImportID {
	gint64 id;
};

struct _BatchImportRoll {
	GTypeInstance parent_instance;
	volatile int ref_count;
	BatchImportRollPrivate * priv;
	ImportID import_id;
	ViewCollection* generated_events;
};

struct _BatchImportRollClass {
	GTypeClass parent_class;
	void (*finalize) (BatchImportRoll *self);
};

typedef enum  {
	RATING_REJECTED = -1,
	RATING_UNRATED = 0,
	RATING_ONE = 1,
	RATING_TWO = 2,
	RATING_THREE = 3,
	RATING_FOUR = 4,
	RATING_FIVE = 5
} Rating;

struct _DateableIface {
	GTypeInterface parent_iface;
	void (*set_exposure_time) (Dateable* self, time_t target_time);
	time_t (*get_exposure_time) (Dateable* self);
};


static gpointer spit_data_imports_data_import_job_parent_class = NULL;
extern TagSourceCollection* tag_global;

gpointer batch_import_job_ref (gpointer instance);
void batch_import_job_unref (gpointer instance);
GParamSpec* param_spec_batch_import_job (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_batch_import_job (GValue* value, gpointer v_object);
void value_take_batch_import_job (GValue* value, gpointer v_object);
gpointer value_get_batch_import_job (const GValue* value);
GType batch_import_job_get_type (void) G_GNUC_CONST;
GType duplicated_file_get_type (void) G_GNUC_CONST;
GType data_object_get_type (void) G_GNUC_CONST;
GType data_source_get_type (void) G_GNUC_CONST;
GType thumbnail_source_get_type (void) G_GNUC_CONST;
GType media_source_get_type (void) G_GNUC_CONST;
gpointer batch_import_roll_ref (gpointer instance);
void batch_import_roll_unref (gpointer instance);
GParamSpec* param_spec_batch_import_roll (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_batch_import_roll (GValue* value, gpointer v_object);
void value_take_batch_import_roll (GValue* value, gpointer v_object);
gpointer value_get_batch_import_roll (const GValue* value);
GType batch_import_roll_get_type (void) G_GNUC_CONST;
GType spit_data_imports_data_import_job_get_type (void) G_GNUC_CONST;
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 hierarchical_tag_index_ref (gpointer instance);
void hierarchical_tag_index_unref (gpointer instance);
GParamSpec* param_spec_hierarchical_tag_index (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_hierarchical_tag_index (GValue* value, gpointer v_object);
void value_take_hierarchical_tag_index (GValue* value, gpointer v_object);
gpointer value_get_hierarchical_tag_index (const GValue* value);
GType hierarchical_tag_index_get_type (void) G_GNUC_CONST;
#define SPIT_DATA_IMPORTS_DATA_IMPORT_JOB_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_JOB, SpitDataImportsDataImportJobPrivate))
enum  {
	SPIT_DATA_IMPORTS_DATA_IMPORT_JOB_DUMMY_PROPERTY
};
SpitDataImportsDataImportJob* spit_data_imports_data_import_job_new (SpitDataImportsDataImportSource* import_source);
SpitDataImportsDataImportJob* spit_data_imports_data_import_job_construct (GType object_type, SpitDataImportsDataImportSource* import_source);
BatchImportJob* batch_import_job_construct (GType object_type);
GFile* spit_data_imports_data_import_source_get_file (SpitDataImportsDataImportSource* self);
guint64 spit_data_imports_data_import_source_get_filesize (SpitDataImportsDataImportSource* self);
time_t spit_data_imports_data_import_source_get_exposure_time (SpitDataImportsDataImportSource* self);
static HierarchicalTagIndex* spit_data_imports_data_import_job_build_exclusion_index (SpitDataImportsDataImportJob* self, SpitDataImportsImportableTag** src_tags, int src_tags_length1);
gchar* hierarchical_tag_utilities_join_path_components (gchar** path_components, int path_components_length1);
gchar** tag_prep_tag_names (gchar** names, int names_length1, int* result_length1);
static gchar** spit_data_imports_data_import_job_build_path_components (SpitDataImportsDataImportJob* self, SpitDataImportsImportableTag* tag, int* result_length1);
#define TAG_PATH_SEPARATOR_STRING "/"
GeeList* hierarchical_tag_utilities_enumerate_parent_paths (const gchar* in_path);
HierarchicalTagIndex* hierarchical_tag_index_from_paths (GeeCollection* client_paths);
time_t spit_data_imports_data_import_job_get_exposure_time (SpitDataImportsDataImportJob* self);
static gchar* spit_data_imports_data_import_job_real_get_dest_identifier (BatchImportJob* base);
gchar* spit_data_imports_data_import_source_get_filename (SpitDataImportsDataImportSource* self);
static gchar* spit_data_imports_data_import_job_real_get_source_identifier (BatchImportJob* base);
static gboolean spit_data_imports_data_import_job_real_is_directory (BatchImportJob* base);
static gchar* spit_data_imports_data_import_job_real_get_basename (BatchImportJob* base);
static gchar* spit_data_imports_data_import_job_real_get_path (BatchImportJob* base);
static void spit_data_imports_data_import_job_real_set_associated (BatchImportJob* base, BatchImportJob* associated);
static gboolean spit_data_imports_data_import_job_real_determine_file_size (BatchImportJob* base, guint64* filesize, GFile* * file);
static gboolean spit_data_imports_data_import_job_real_prepare (BatchImportJob* base, GFile* * file_to_import, gboolean* copy_to_library, GError** error);
SpitDataImportsImportableMediaItem* spit_data_imports_data_import_source_get_photo (SpitDataImportsDataImportSource* self);
static gboolean spit_data_imports_data_import_job_real_complete (BatchImportJob* base, MediaSource* source, BatchImportRoll* import_roll, GError** error);
GType photo_source_get_type (void) G_GNUC_CONST;
GType photo_get_type (void) G_GNUC_CONST;
GType library_photo_get_type (void) G_GNUC_CONST;
GeeCollection* hierarchical_tag_index_get_all_paths (HierarchicalTagIndex* self);
GType tag_get_type (void) G_GNUC_CONST;
Tag* tag_for_path (const gchar* name);
GeeList* hierarchical_tag_utilities_enumerate_path_components (const gchar* in_path);
gchar* hierarchical_tag_utilities_hierarchical_to_flat (const gchar* path);
gpointer data_collection_ref (gpointer instance);
void data_collection_unref (gpointer instance);
GParamSpec* param_spec_data_collection (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_data_collection (GValue* value, gpointer v_object);
void value_take_data_collection (GValue* value, gpointer v_object);
gpointer value_get_data_collection (const GValue* value);
GType data_collection_get_type (void) G_GNUC_CONST;
GType source_collection_get_type (void) G_GNUC_CONST;
GType database_source_collection_get_type (void) G_GNUC_CONST;
GType container_source_collection_get_type (void) G_GNUC_CONST;
GType tag_source_collection_get_type (void) G_GNUC_CONST;
gboolean tag_source_collection_exists (TagSourceCollection* self, const gchar* name, gboolean treat_htags_as_root);
void tag_promote (Tag* self);
void tag_attach (Tag* self, MediaSource* source);
GType prepare_input_text_options_get_type (void) G_GNUC_CONST;
gchar* prepare_input_text (const gchar* text, PrepareInputTextOptions options, gint dest_length);
GType view_collection_get_type (void) G_GNUC_CONST;
void event_generate_single_event (MediaSource* media, ViewCollection* events_so_far, const gchar* event_name);
GType import_id_get_type (void) G_GNUC_CONST;
ImportID* import_id_dup (const ImportID* self);
void import_id_free (ImportID* self);
GType rating_get_type (void) G_GNUC_CONST;
Rating rating_unserialize (gint value);
void media_source_set_rating (MediaSource* self, Rating rating);
void media_source_set_title (MediaSource* self, const gchar* title);
GType dateable_get_type (void) G_GNUC_CONST;
void dateable_set_exposure_time (Dateable* self, time_t target_time);
void photo_set_import_id (Photo* self, ImportID* import_id);
gchar* hierarchical_tag_utilities_make_flat_tag_safe (const gchar* in_tag);
static void spit_data_imports_data_import_job_finalize (BatchImportJob * obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


static gpointer _spit_data_imports_data_import_source_ref0 (gpointer self) {
#line 21 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	return self ? spit_data_imports_data_import_source_ref (self) : NULL;
#line 443 "DataImportJob.c"
}


SpitDataImportsDataImportJob* spit_data_imports_data_import_job_construct (GType object_type, SpitDataImportsDataImportSource* import_source) {
	SpitDataImportsDataImportJob* self = NULL;
	SpitDataImportsDataImportSource* _tmp0_;
	SpitDataImportsDataImportSource* _tmp1_;
	SpitDataImportsDataImportSource* _tmp2_;
	GFile* _tmp3_;
	SpitDataImportsDataImportSource* _tmp4_;
	guint64 _tmp5_;
	SpitDataImportsDataImportSource* _tmp6_;
	time_t _tmp7_;
#line 20 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	g_return_val_if_fail (SPIT_DATA_IMPORTS_IS_DATA_IMPORT_SOURCE (import_source), NULL);
#line 20 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	self = (SpitDataImportsDataImportJob*) batch_import_job_construct (object_type);
#line 21 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp0_ = import_source;
#line 21 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp1_ = _spit_data_imports_data_import_source_ref0 (_tmp0_);
#line 21 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_spit_data_imports_data_import_source_unref0 (self->priv->import_source);
#line 21 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	self->priv->import_source = _tmp1_;
#line 24 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp2_ = import_source;
#line 24 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp3_ = spit_data_imports_data_import_source_get_file (_tmp2_);
#line 24 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_g_object_unref0 (self->priv->src_file);
#line 24 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	self->priv->src_file = _tmp3_;
#line 25 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp4_ = import_source;
#line 25 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp5_ = spit_data_imports_data_import_source_get_filesize (_tmp4_);
#line 25 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	self->priv->filesize = _tmp5_;
#line 26 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp6_ = import_source;
#line 26 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp7_ = spit_data_imports_data_import_source_get_exposure_time (_tmp6_);
#line 26 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	self->priv->exposure_time = _tmp7_;
#line 20 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	return self;
#line 491 "DataImportJob.c"
}


SpitDataImportsDataImportJob* spit_data_imports_data_import_job_new (SpitDataImportsDataImportSource* import_source) {
#line 20 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	return spit_data_imports_data_import_job_construct (SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_JOB, import_source);
#line 498 "DataImportJob.c"
}


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


static HierarchicalTagIndex* spit_data_imports_data_import_job_build_exclusion_index (SpitDataImportsDataImportJob* self, SpitDataImportsImportableTag** src_tags, int src_tags_length1) {
	HierarchicalTagIndex* result = NULL;
	GeeSet* detected_htags = NULL;
	GeeHashSet* _tmp0_;
	SpitDataImportsImportableTag** _tmp1_;
	gint _tmp1__length1;
	HierarchicalTagIndex* _tmp33_ = NULL;
	GeeSet* _tmp34_;
	gint _tmp35_;
	gint _tmp36_;
#line 29 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	g_return_val_if_fail (SPIT_DATA_IMPORTS_IS_DATA_IMPORT_JOB (self), NULL);
#line 30 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp0_ = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL, NULL, NULL, NULL);
#line 30 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	detected_htags = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_SET, GeeSet);
#line 32 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp1_ = src_tags;
#line 32 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp1__length1 = src_tags_length1;
#line 529 "DataImportJob.c"
	{
		SpitDataImportsImportableTag** src_tag_collection = NULL;
		gint src_tag_collection_length1 = 0;
		gint _src_tag_collection_size_ = 0;
		gint src_tag_it = 0;
#line 32 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		src_tag_collection = _tmp1_;
#line 32 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		src_tag_collection_length1 = _tmp1__length1;
#line 32 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		for (src_tag_it = 0; src_tag_it < _tmp1__length1; src_tag_it = src_tag_it + 1) {
#line 541 "DataImportJob.c"
			SpitDataImportsImportableTag* _tmp2_;
			SpitDataImportsImportableTag* src_tag = NULL;
#line 32 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
			_tmp2_ = _g_object_ref0 (src_tag_collection[src_tag_it]);
#line 32 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
			src_tag = _tmp2_;
#line 548 "DataImportJob.c"
			{
				gchar* prepped = NULL;
				SpitDataImportsImportableTag* _tmp3_;
				gint _tmp4_;
				gchar** _tmp5_;
				gchar** _tmp6_;
				gint _tmp6__length1;
				gint _tmp7_;
				gchar** _tmp8_;
				gchar** _tmp9_;
				gint _tmp9__length1;
				gchar* _tmp10_;
				gchar* _tmp11_;
				gboolean _tmp12_ = FALSE;
				const gchar* _tmp13_;
#line 33 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp3_ = src_tag;
#line 33 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp5_ = spit_data_imports_data_import_job_build_path_components (self, _tmp3_, &_tmp4_);
#line 33 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp6_ = _tmp5_;
#line 33 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp6__length1 = _tmp4_;
#line 33 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp8_ = tag_prep_tag_names (_tmp6_, _tmp4_, &_tmp7_);
#line 33 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp9_ = _tmp8_;
#line 33 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp9__length1 = _tmp7_;
#line 33 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp10_ = hierarchical_tag_utilities_join_path_components (_tmp9_, _tmp7_);
#line 33 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp11_ = _tmp10_;
#line 33 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp9_ = (_vala_array_free (_tmp9_, _tmp9__length1, (GDestroyNotify) g_free), NULL);
#line 33 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp6_ = (_vala_array_free (_tmp6_, _tmp6__length1, (GDestroyNotify) g_free), NULL);
#line 33 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				prepped = _tmp11_;
#line 39 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp13_ = prepped;
#line 39 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				if (_tmp13_ != NULL) {
#line 592 "DataImportJob.c"
					const gchar* _tmp14_;
					gboolean _tmp15_;
#line 39 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_tmp14_ = prepped;
#line 39 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_tmp15_ = g_str_has_prefix (_tmp14_, TAG_PATH_SEPARATOR_STRING);
#line 39 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_tmp12_ = _tmp15_;
#line 601 "DataImportJob.c"
				} else {
#line 39 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_tmp12_ = FALSE;
#line 605 "DataImportJob.c"
				}
#line 39 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				if (_tmp12_) {
#line 609 "DataImportJob.c"
					GeeSet* _tmp16_;
					const gchar* _tmp17_;
					GeeList* parents = NULL;
					const gchar* _tmp18_;
					GeeList* _tmp19_;
#line 40 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_tmp16_ = detected_htags;
#line 40 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_tmp17_ = prepped;
#line 40 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_COLLECTION, GeeCollection), _tmp17_);
#line 42 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_tmp18_ = prepped;
#line 42 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_tmp19_ = hierarchical_tag_utilities_enumerate_parent_paths (_tmp18_);
#line 42 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					parents = _tmp19_;
#line 627 "DataImportJob.c"
					{
						GeeList* _parent_list = NULL;
						GeeList* _tmp20_;
						GeeList* _tmp21_;
						gint _parent_size = 0;
						GeeList* _tmp22_;
						gint _tmp23_;
						gint _tmp24_;
						gint _parent_index = 0;
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_tmp20_ = parents;
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_tmp21_ = _g_object_ref0 (_tmp20_);
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_parent_list = _tmp21_;
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_tmp22_ = _parent_list;
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_tmp23_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, GEE_TYPE_COLLECTION, GeeCollection));
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_tmp24_ = _tmp23_;
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_parent_size = _tmp24_;
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_parent_index = -1;
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						while (TRUE) {
#line 655 "DataImportJob.c"
							gint _tmp25_;
							gint _tmp26_;
							gint _tmp27_;
							gchar* parent = NULL;
							GeeList* _tmp28_;
							gint _tmp29_;
							gpointer _tmp30_;
							GeeSet* _tmp31_;
							const gchar* _tmp32_;
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
							_tmp25_ = _parent_index;
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
							_parent_index = _tmp25_ + 1;
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
							_tmp26_ = _parent_index;
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
							_tmp27_ = _parent_size;
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
							if (!(_tmp26_ < _tmp27_)) {
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
								break;
#line 677 "DataImportJob.c"
							}
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
							_tmp28_ = _parent_list;
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
							_tmp29_ = _parent_index;
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
							_tmp30_ = gee_list_get (_tmp28_, _tmp29_);
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
							parent = (gchar*) _tmp30_;
#line 44 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
							_tmp31_ = detected_htags;
#line 44 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
							_tmp32_ = parent;
#line 44 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
							gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp31_, GEE_TYPE_COLLECTION, GeeCollection), _tmp32_);
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
							_g_free0 (parent);
#line 695 "DataImportJob.c"
						}
#line 43 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_g_object_unref0 (_parent_list);
#line 699 "DataImportJob.c"
					}
#line 39 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_g_object_unref0 (parents);
#line 703 "DataImportJob.c"
				}
#line 32 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_g_free0 (prepped);
#line 32 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_g_object_unref0 (src_tag);
#line 709 "DataImportJob.c"
			}
		}
	}
#line 48 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp34_ = detected_htags;
#line 48 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp35_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, GEE_TYPE_COLLECTION, GeeCollection));
#line 48 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp36_ = _tmp35_;
#line 48 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	if (_tmp36_ > 0) {
#line 721 "DataImportJob.c"
		GeeSet* _tmp37_;
		HierarchicalTagIndex* _tmp38_;
#line 48 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_tmp37_ = detected_htags;
#line 48 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_tmp38_ = hierarchical_tag_index_from_paths (G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, GEE_TYPE_COLLECTION, GeeCollection));
#line 48 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_hierarchical_tag_index_unref0 (_tmp33_);
#line 48 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_tmp33_ = _tmp38_;
#line 732 "DataImportJob.c"
	} else {
#line 48 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_hierarchical_tag_index_unref0 (_tmp33_);
#line 48 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_tmp33_ = NULL;
#line 738 "DataImportJob.c"
	}
#line 48 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	result = _tmp33_;
#line 48 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_g_object_unref0 (detected_htags);
#line 48 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	return result;
#line 746 "DataImportJob.c"
}


time_t spit_data_imports_data_import_job_get_exposure_time (SpitDataImportsDataImportJob* self) {
	time_t result = 0;
	time_t _tmp0_;
#line 51 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	g_return_val_if_fail (SPIT_DATA_IMPORTS_IS_DATA_IMPORT_JOB (self), 0);
#line 52 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp0_ = self->priv->exposure_time;
#line 52 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	result = _tmp0_;
#line 52 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	return result;
#line 761 "DataImportJob.c"
}


static gchar* spit_data_imports_data_import_job_real_get_dest_identifier (BatchImportJob* base) {
	SpitDataImportsDataImportJob * self;
	gchar* result = NULL;
	SpitDataImportsDataImportSource* _tmp0_;
	gchar* _tmp1_;
#line 55 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_JOB, SpitDataImportsDataImportJob);
#line 56 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp0_ = self->priv->import_source;
#line 56 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp1_ = spit_data_imports_data_import_source_get_filename (_tmp0_);
#line 56 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	result = _tmp1_;
#line 56 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	return result;
#line 780 "DataImportJob.c"
}


static gchar* spit_data_imports_data_import_job_real_get_source_identifier (BatchImportJob* base) {
	SpitDataImportsDataImportJob * self;
	gchar* result = NULL;
	SpitDataImportsDataImportSource* _tmp0_;
	gchar* _tmp1_;
#line 59 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_JOB, SpitDataImportsDataImportJob);
#line 60 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp0_ = self->priv->import_source;
#line 60 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp1_ = spit_data_imports_data_import_source_get_filename (_tmp0_);
#line 60 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	result = _tmp1_;
#line 60 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	return result;
#line 799 "DataImportJob.c"
}


static gboolean spit_data_imports_data_import_job_real_is_directory (BatchImportJob* base) {
	SpitDataImportsDataImportJob * self;
	gboolean result = FALSE;
#line 63 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_JOB, SpitDataImportsDataImportJob);
#line 64 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	result = FALSE;
#line 64 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	return result;
#line 812 "DataImportJob.c"
}


static gchar* spit_data_imports_data_import_job_real_get_basename (BatchImportJob* base) {
	SpitDataImportsDataImportJob * self;
	gchar* result = NULL;
	GFile* _tmp0_;
	gchar* _tmp1_;
#line 67 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_JOB, SpitDataImportsDataImportJob);
#line 68 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp0_ = self->priv->src_file;
#line 68 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp1_ = g_file_get_basename (_tmp0_);
#line 68 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	result = _tmp1_;
#line 68 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	return result;
#line 831 "DataImportJob.c"
}


static gchar* spit_data_imports_data_import_job_real_get_path (BatchImportJob* base) {
	SpitDataImportsDataImportJob * self;
	gchar* result = NULL;
	GFile* _tmp0_;
	GFile* _tmp1_;
	GFile* _tmp2_;
	gchar* _tmp3_;
	gchar* _tmp4_;
#line 71 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_JOB, SpitDataImportsDataImportJob);
#line 72 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp0_ = self->priv->src_file;
#line 72 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp1_ = g_file_get_parent (_tmp0_);
#line 72 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp2_ = _tmp1_;
#line 72 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp3_ = g_file_get_path (_tmp2_);
#line 72 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp4_ = _tmp3_;
#line 72 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_g_object_unref0 (_tmp2_);
#line 72 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	result = _tmp4_;
#line 72 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	return result;
#line 861 "DataImportJob.c"
}


static gpointer _batch_import_job_ref0 (gpointer self) {
#line 76 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	return self ? batch_import_job_ref (self) : NULL;
#line 868 "DataImportJob.c"
}


static void spit_data_imports_data_import_job_real_set_associated (BatchImportJob* base, BatchImportJob* associated) {
	SpitDataImportsDataImportJob * self;
	BatchImportJob* _tmp0_;
	SpitDataImportsDataImportJob* _tmp1_;
#line 75 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_JOB, SpitDataImportsDataImportJob);
#line 75 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	g_return_if_fail (IS_BATCH_IMPORT_JOB (associated));
#line 76 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp0_ = associated;
#line 76 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp1_ = _batch_import_job_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_JOB) ? ((SpitDataImportsDataImportJob*) _tmp0_) : NULL);
#line 76 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_batch_import_job_unref0 (self->priv->associated);
#line 76 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	self->priv->associated = _tmp1_;
#line 888 "DataImportJob.c"
}


static gboolean spit_data_imports_data_import_job_real_determine_file_size (BatchImportJob* base, guint64* filesize, GFile* * file) {
	SpitDataImportsDataImportJob * self;
	guint64 _vala_filesize = 0ULL;
	GFile* _vala_file = NULL;
	gboolean result = FALSE;
	guint64 _tmp0_;
#line 79 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_JOB, SpitDataImportsDataImportJob);
#line 80 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_g_object_unref0 (_vala_file);
#line 80 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_vala_file = NULL;
#line 81 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp0_ = self->priv->filesize;
#line 81 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_vala_filesize = _tmp0_;
#line 83 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	result = TRUE;
#line 83 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	if (filesize) {
#line 83 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		*filesize = _vala_filesize;
#line 914 "DataImportJob.c"
	}
#line 83 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	if (file) {
#line 83 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		*file = _vala_file;
#line 920 "DataImportJob.c"
	} else {
#line 83 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_g_object_unref0 (_vala_file);
#line 924 "DataImportJob.c"
	}
#line 83 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	return result;
#line 928 "DataImportJob.c"
}


static gboolean spit_data_imports_data_import_job_real_prepare (BatchImportJob* base, GFile* * file_to_import, gboolean* copy_to_library, GError** error) {
	SpitDataImportsDataImportJob * self;
	GFile* _vala_file_to_import = NULL;
	gboolean _vala_copy_to_library = FALSE;
	gboolean result = FALSE;
	GFile* _tmp0_;
	GFile* _tmp1_;
	SpitDataImportsDataImportSource* _tmp2_;
	SpitDataImportsImportableMediaItem* _tmp3_;
	SpitDataImportsImportableMediaItem* _tmp4_;
	gint _tmp5_;
	SpitDataImportsImportableTag** _tmp6_;
	SpitDataImportsImportableTag** _tmp7_;
	gint _tmp7__length1;
	HierarchicalTagIndex* _tmp8_;
#line 86 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_JOB, SpitDataImportsDataImportJob);
#line 87 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp0_ = self->priv->src_file;
#line 87 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp1_ = _g_object_ref0 (_tmp0_);
#line 87 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_g_object_unref0 (_vala_file_to_import);
#line 87 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_vala_file_to_import = _tmp1_;
#line 88 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_vala_copy_to_library = FALSE;
#line 90 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp2_ = self->priv->import_source;
#line 90 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp3_ = spit_data_imports_data_import_source_get_photo (_tmp2_);
#line 90 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp4_ = _tmp3_;
#line 90 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp6_ = spit_data_imports_importable_media_item_get_tags (_tmp4_, &_tmp5_);
#line 90 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp7_ = _tmp6_;
#line 90 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp7__length1 = _tmp5_;
#line 90 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp8_ = spit_data_imports_data_import_job_build_exclusion_index (self, _tmp7_, _tmp5_);
#line 90 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_hierarchical_tag_index_unref0 (self->priv->detected_htags);
#line 90 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	self->priv->detected_htags = _tmp8_;
#line 90 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp7_ = (_vala_array_free (_tmp7_, _tmp7__length1, (GDestroyNotify) g_object_unref), NULL);
#line 90 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_g_object_unref0 (_tmp4_);
#line 92 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	result = TRUE;
#line 92 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	if (file_to_import) {
#line 92 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		*file_to_import = _vala_file_to_import;
#line 987 "DataImportJob.c"
	} else {
#line 92 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_g_object_unref0 (_vala_file_to_import);
#line 991 "DataImportJob.c"
	}
#line 92 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	if (copy_to_library) {
#line 92 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		*copy_to_library = _vala_copy_to_library;
#line 997 "DataImportJob.c"
	}
#line 92 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	return result;
#line 1001 "DataImportJob.c"
}


static gboolean spit_data_imports_data_import_job_real_complete (BatchImportJob* base, MediaSource* source, BatchImportRoll* import_roll, GError** error) {
	SpitDataImportsDataImportJob * self;
	gboolean result = FALSE;
	LibraryPhoto* photo = NULL;
	MediaSource* _tmp0_;
	LibraryPhoto* _tmp1_;
	LibraryPhoto* _tmp2_;
	SpitDataImportsImportableMediaItem* src_photo = NULL;
	SpitDataImportsDataImportSource* _tmp3_;
	SpitDataImportsImportableMediaItem* _tmp4_;
	HierarchicalTagIndex* _tmp5_;
	SpitDataImportsImportableTag** src_tags = NULL;
	SpitDataImportsImportableMediaItem* _tmp17_;
	gint _tmp18_;
	SpitDataImportsImportableTag** _tmp19_;
	gint src_tags_length1;
	gint _src_tags_size_;
	SpitDataImportsImportableTag** _tmp20_;
	gint _tmp20__length1;
	SpitDataImportsImportableEvent* src_event = NULL;
	SpitDataImportsImportableMediaItem* _tmp61_;
	SpitDataImportsImportableEvent* _tmp62_;
	SpitDataImportsImportableEvent* _tmp63_;
	Rating dst_rating = 0;
	SpitDataImportsImportableRating* src_rating = NULL;
	SpitDataImportsImportableMediaItem* _tmp74_;
	SpitDataImportsImportableRating* _tmp75_;
	SpitDataImportsImportableRating* _tmp76_;
	gboolean _tmp77_;
	LibraryPhoto* _tmp83_;
	Rating _tmp84_;
	gchar* title = NULL;
	SpitDataImportsImportableMediaItem* _tmp85_;
	gchar* _tmp86_;
	const gchar* _tmp87_;
	time_t* date_time = NULL;
	SpitDataImportsImportableMediaItem* _tmp90_;
	time_t* _tmp91_;
	time_t* _tmp92_;
	LibraryPhoto* _tmp95_;
	BatchImportRoll* _tmp96_;
	ImportID _tmp97_;
#line 95 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_JOB, SpitDataImportsDataImportJob);
#line 95 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	g_return_val_if_fail (IS_MEDIA_SOURCE (source), FALSE);
#line 95 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	g_return_val_if_fail (IS_BATCH_IMPORT_ROLL (import_roll), FALSE);
#line 96 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp0_ = source;
#line 96 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp1_ = _g_object_ref0 (G_TYPE_CHECK_INSTANCE_TYPE (_tmp0_, TYPE_LIBRARY_PHOTO) ? ((LibraryPhoto*) _tmp0_) : NULL);
#line 96 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	photo = _tmp1_;
#line 97 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp2_ = photo;
#line 97 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	if (_tmp2_ == NULL) {
#line 98 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		result = FALSE;
#line 98 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_g_object_unref0 (photo);
#line 98 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		return result;
#line 1069 "DataImportJob.c"
	}
#line 100 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp3_ = self->priv->import_source;
#line 100 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp4_ = spit_data_imports_data_import_source_get_photo (_tmp3_);
#line 100 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	src_photo = _tmp4_;
#line 103 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp5_ = self->priv->detected_htags;
#line 103 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	if (_tmp5_ != NULL) {
#line 1081 "DataImportJob.c"
		GeeCollection* paths = NULL;
		HierarchicalTagIndex* _tmp6_;
		GeeCollection* _tmp7_;
#line 104 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_tmp6_ = self->priv->detected_htags;
#line 104 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_tmp7_ = hierarchical_tag_index_get_all_paths (_tmp6_);
#line 104 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		paths = _tmp7_;
#line 1091 "DataImportJob.c"
		{
			GeeIterator* _path_it = NULL;
			GeeCollection* _tmp8_;
			GeeIterator* _tmp9_;
#line 106 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
			_tmp8_ = paths;
#line 106 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
			_tmp9_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp8_, GEE_TYPE_ITERABLE, GeeIterable));
#line 106 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
			_path_it = _tmp9_;
#line 106 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
			while (TRUE) {
#line 1104 "DataImportJob.c"
				GeeIterator* _tmp10_;
				gboolean _tmp11_;
				gchar* path = NULL;
				GeeIterator* _tmp12_;
				gpointer _tmp13_;
				const gchar* _tmp14_;
				Tag* _tmp15_;
				Tag* _tmp16_;
#line 106 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp10_ = _path_it;
#line 106 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp11_ = gee_iterator_next (_tmp10_);
#line 106 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				if (!_tmp11_) {
#line 106 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					break;
#line 1121 "DataImportJob.c"
				}
#line 106 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp12_ = _path_it;
#line 106 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp13_ = gee_iterator_get (_tmp12_);
#line 106 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				path = (gchar*) _tmp13_;
#line 107 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp14_ = path;
#line 107 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp15_ = tag_for_path (_tmp14_);
#line 107 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp16_ = _tmp15_;
#line 107 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_g_object_unref0 (_tmp16_);
#line 106 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_g_free0 (path);
#line 1139 "DataImportJob.c"
			}
#line 106 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
			_g_object_unref0 (_path_it);
#line 1143 "DataImportJob.c"
		}
#line 103 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_g_object_unref0 (paths);
#line 1147 "DataImportJob.c"
	}
#line 110 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp17_ = src_photo;
#line 110 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp19_ = spit_data_imports_importable_media_item_get_tags (_tmp17_, &_tmp18_);
#line 110 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	src_tags = _tmp19_;
#line 110 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	src_tags_length1 = _tmp18_;
#line 110 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_src_tags_size_ = src_tags_length1;
#line 111 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp20_ = src_tags;
#line 111 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp20__length1 = src_tags_length1;
#line 1163 "DataImportJob.c"
	{
		SpitDataImportsImportableTag** src_tag_collection = NULL;
		gint src_tag_collection_length1 = 0;
		gint _src_tag_collection_size_ = 0;
		gint src_tag_it = 0;
#line 111 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		src_tag_collection = _tmp20_;
#line 111 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		src_tag_collection_length1 = _tmp20__length1;
#line 111 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		for (src_tag_it = 0; src_tag_it < _tmp20__length1; src_tag_it = src_tag_it + 1) {
#line 1175 "DataImportJob.c"
			SpitDataImportsImportableTag* _tmp21_;
			SpitDataImportsImportableTag* src_tag = NULL;
#line 111 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
			_tmp21_ = _g_object_ref0 (src_tag_collection[src_tag_it]);
#line 111 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
			src_tag = _tmp21_;
#line 1182 "DataImportJob.c"
			{
				gchar* prepped = NULL;
				SpitDataImportsImportableTag* _tmp22_;
				gint _tmp23_;
				gchar** _tmp24_;
				gchar** _tmp25_;
				gint _tmp25__length1;
				gint _tmp26_;
				gchar** _tmp27_;
				gchar** _tmp28_;
				gint _tmp28__length1;
				gchar* _tmp29_;
				gchar* _tmp30_;
				const gchar* _tmp31_;
#line 112 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp22_ = src_tag;
#line 112 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp24_ = spit_data_imports_data_import_job_build_path_components (self, _tmp22_, &_tmp23_);
#line 112 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp25_ = _tmp24_;
#line 112 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp25__length1 = _tmp23_;
#line 112 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp27_ = tag_prep_tag_names (_tmp25_, _tmp23_, &_tmp26_);
#line 112 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp28_ = _tmp27_;
#line 112 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp28__length1 = _tmp26_;
#line 112 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp29_ = hierarchical_tag_utilities_join_path_components (_tmp28_, _tmp26_);
#line 112 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp30_ = _tmp29_;
#line 112 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp28_ = (_vala_array_free (_tmp28_, _tmp28__length1, (GDestroyNotify) g_free), NULL);
#line 112 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp25_ = (_vala_array_free (_tmp25_, _tmp25__length1, (GDestroyNotify) g_free), NULL);
#line 112 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				prepped = _tmp30_;
#line 117 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp31_ = prepped;
#line 117 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				if (_tmp31_ != NULL) {
#line 1225 "DataImportJob.c"
					const gchar* _tmp32_;
					GeeList* _tmp33_;
					GeeList* _tmp34_;
					gint _tmp35_;
					gint _tmp36_;
					gboolean _tmp37_;
					const gchar* _tmp57_;
					Tag* _tmp58_;
					Tag* _tmp59_;
					LibraryPhoto* _tmp60_;
#line 118 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_tmp32_ = prepped;
#line 118 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_tmp33_ = hierarchical_tag_utilities_enumerate_path_components (_tmp32_);
#line 118 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_tmp34_ = _tmp33_;
#line 118 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_tmp35_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp34_, GEE_TYPE_COLLECTION, GeeCollection));
#line 118 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_tmp36_ = _tmp35_;
#line 118 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_tmp37_ = _tmp36_ == 1;
#line 118 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_g_object_unref0 (_tmp34_);
#line 118 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					if (_tmp37_) {
#line 1252 "DataImportJob.c"
						const gchar* _tmp38_;
						gboolean _tmp39_;
#line 119 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_tmp38_ = prepped;
#line 119 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_tmp39_ = g_str_has_prefix (_tmp38_, TAG_PATH_SEPARATOR_STRING);
#line 119 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						if (_tmp39_) {
#line 1261 "DataImportJob.c"
							const gchar* _tmp40_;
							gchar* _tmp41_;
#line 120 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
							_tmp40_ = prepped;
#line 120 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
							_tmp41_ = hierarchical_tag_utilities_hierarchical_to_flat (_tmp40_);
#line 120 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
							_g_free0 (prepped);
#line 120 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
							prepped = _tmp41_;
#line 1272 "DataImportJob.c"
						}
					} else {
						GeeList* parents = NULL;
						const gchar* _tmp42_;
						GeeList* _tmp43_;
						GeeList* _tmp44_;
						gint _tmp45_;
						gint _tmp46_;
						gchar* top_level_parent = NULL;
						GeeList* _tmp47_;
						gpointer _tmp48_;
						gchar* flat_top_level_parent = NULL;
						const gchar* _tmp49_;
						gchar* _tmp50_;
						TagSourceCollection* _tmp51_;
						const gchar* _tmp52_;
						gboolean _tmp53_;
#line 122 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_tmp42_ = prepped;
#line 122 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_tmp43_ = hierarchical_tag_utilities_enumerate_parent_paths (_tmp42_);
#line 122 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						parents = _tmp43_;
#line 125 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_tmp44_ = parents;
#line 125 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_tmp45_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp44_, GEE_TYPE_COLLECTION, GeeCollection));
#line 125 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_tmp46_ = _tmp45_;
#line 125 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_vala_assert (_tmp46_ > 0, "parents.size > 0");
#line 127 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_tmp47_ = parents;
#line 127 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_tmp48_ = gee_list_get (_tmp47_, 0);
#line 127 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						top_level_parent = (gchar*) _tmp48_;
#line 128 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_tmp49_ = top_level_parent;
#line 128 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_tmp50_ = hierarchical_tag_utilities_hierarchical_to_flat (_tmp49_);
#line 128 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						flat_top_level_parent = _tmp50_;
#line 131 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_tmp51_ = tag_global;
#line 131 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_tmp52_ = flat_top_level_parent;
#line 131 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_tmp53_ = tag_source_collection_exists (_tmp51_, _tmp52_, FALSE);
#line 131 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						if (_tmp53_) {
#line 1324 "DataImportJob.c"
							const gchar* _tmp54_;
							Tag* _tmp55_;
							Tag* _tmp56_;
#line 132 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
							_tmp54_ = flat_top_level_parent;
#line 132 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
							_tmp55_ = tag_for_path (_tmp54_);
#line 132 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
							_tmp56_ = _tmp55_;
#line 132 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
							tag_promote (_tmp56_);
#line 132 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
							_g_object_unref0 (_tmp56_);
#line 1338 "DataImportJob.c"
						}
#line 118 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_g_free0 (flat_top_level_parent);
#line 118 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_g_free0 (top_level_parent);
#line 118 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
						_g_object_unref0 (parents);
#line 1346 "DataImportJob.c"
					}
#line 135 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_tmp57_ = prepped;
#line 135 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_tmp58_ = tag_for_path (_tmp57_);
#line 135 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_tmp59_ = _tmp58_;
#line 135 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_tmp60_ = photo;
#line 135 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					tag_attach (_tmp59_, G_TYPE_CHECK_INSTANCE_CAST (_tmp60_, TYPE_MEDIA_SOURCE, MediaSource));
#line 135 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_g_object_unref0 (_tmp59_);
#line 1360 "DataImportJob.c"
				}
#line 111 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_g_free0 (prepped);
#line 111 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_g_object_unref0 (src_tag);
#line 1366 "DataImportJob.c"
			}
		}
	}
#line 139 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp61_ = src_photo;
#line 139 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp62_ = spit_data_imports_importable_media_item_get_event (_tmp61_);
#line 139 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	src_event = _tmp62_;
#line 140 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp63_ = src_event;
#line 140 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	if (_tmp63_ != NULL) {
#line 1380 "DataImportJob.c"
		gchar* prepped = NULL;
		SpitDataImportsImportableEvent* _tmp64_;
		gchar* _tmp65_;
		gchar* _tmp66_;
		gchar* _tmp67_;
		gchar* _tmp68_;
		const gchar* _tmp69_;
#line 141 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_tmp64_ = src_event;
#line 141 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_tmp65_ = spit_data_imports_importable_event_get_name (_tmp64_);
#line 141 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_tmp66_ = _tmp65_;
#line 141 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_tmp67_ = prepare_input_text (_tmp66_, PREPARE_INPUT_TEXT_OPTIONS_DEFAULT, -1);
#line 141 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_tmp68_ = _tmp67_;
#line 141 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_g_free0 (_tmp66_);
#line 141 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		prepped = _tmp68_;
#line 143 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_tmp69_ = prepped;
#line 143 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		if (_tmp69_ != NULL) {
#line 1406 "DataImportJob.c"
			LibraryPhoto* _tmp70_;
			BatchImportRoll* _tmp71_;
			ViewCollection* _tmp72_;
			const gchar* _tmp73_;
#line 144 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
			_tmp70_ = photo;
#line 144 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
			_tmp71_ = import_roll;
#line 144 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
			_tmp72_ = _tmp71_->generated_events;
#line 144 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
			_tmp73_ = prepped;
#line 144 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
			event_generate_single_event (G_TYPE_CHECK_INSTANCE_CAST (_tmp70_, TYPE_MEDIA_SOURCE, MediaSource), _tmp72_, _tmp73_);
#line 1421 "DataImportJob.c"
		}
#line 140 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_g_free0 (prepped);
#line 1425 "DataImportJob.c"
	}
#line 148 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp74_ = src_photo;
#line 148 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp75_ = spit_data_imports_importable_media_item_get_rating (_tmp74_);
#line 148 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	src_rating = _tmp75_;
#line 149 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp76_ = src_rating;
#line 149 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp77_ = spit_data_imports_importable_rating_is_rejected (_tmp76_);
#line 149 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	if (_tmp77_) {
#line 150 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		dst_rating = RATING_REJECTED;
#line 1441 "DataImportJob.c"
	} else {
		SpitDataImportsImportableRating* _tmp78_;
		gboolean _tmp79_;
#line 151 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_tmp78_ = src_rating;
#line 151 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_tmp79_ = spit_data_imports_importable_rating_is_unrated (_tmp78_);
#line 151 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		if (_tmp79_) {
#line 152 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
			dst_rating = RATING_UNRATED;
#line 1453 "DataImportJob.c"
		} else {
			SpitDataImportsImportableRating* _tmp80_;
			gint _tmp81_;
			Rating _tmp82_;
#line 154 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
			_tmp80_ = src_rating;
#line 154 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
			_tmp81_ = spit_data_imports_importable_rating_get_value (_tmp80_);
#line 154 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
			_tmp82_ = rating_unserialize (_tmp81_);
#line 154 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
			dst_rating = _tmp82_;
#line 1466 "DataImportJob.c"
		}
	}
#line 155 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp83_ = photo;
#line 155 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp84_ = dst_rating;
#line 155 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	media_source_set_rating (G_TYPE_CHECK_INSTANCE_CAST (_tmp83_, TYPE_MEDIA_SOURCE, MediaSource), _tmp84_);
#line 157 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp85_ = src_photo;
#line 157 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp86_ = spit_data_imports_importable_media_item_get_title (_tmp85_);
#line 157 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	title = _tmp86_;
#line 158 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp87_ = title;
#line 158 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	if (_tmp87_ != NULL) {
#line 1485 "DataImportJob.c"
		LibraryPhoto* _tmp88_;
		const gchar* _tmp89_;
#line 159 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_tmp88_ = photo;
#line 159 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_tmp89_ = title;
#line 159 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		media_source_set_title (G_TYPE_CHECK_INSTANCE_CAST (_tmp88_, TYPE_MEDIA_SOURCE, MediaSource), _tmp89_);
#line 1494 "DataImportJob.c"
	}
#line 161 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp90_ = src_photo;
#line 161 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp91_ = spit_data_imports_importable_media_item_get_exposure_time (_tmp90_);
#line 161 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	date_time = _tmp91_;
#line 162 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp92_ = date_time;
#line 162 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	if (_tmp92_ != NULL) {
#line 1506 "DataImportJob.c"
		LibraryPhoto* _tmp93_;
		time_t* _tmp94_;
#line 163 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_tmp93_ = photo;
#line 163 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_tmp94_ = date_time;
#line 163 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		dateable_set_exposure_time (G_TYPE_CHECK_INSTANCE_CAST (_tmp93_, TYPE_DATEABLE, Dateable), *_tmp94_);
#line 1515 "DataImportJob.c"
	}
#line 165 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp95_ = photo;
#line 165 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp96_ = import_roll;
#line 165 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp97_ = _tmp96_->import_id;
#line 165 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	photo_set_import_id (G_TYPE_CHECK_INSTANCE_CAST (_tmp95_, TYPE_PHOTO, Photo), &_tmp97_);
#line 167 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	result = TRUE;
#line 167 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_g_free0 (date_time);
#line 167 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_g_free0 (title);
#line 167 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_g_object_unref0 (src_rating);
#line 167 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_g_object_unref0 (src_event);
#line 167 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	src_tags = (_vala_array_free (src_tags, src_tags_length1, (GDestroyNotify) g_object_unref), NULL);
#line 167 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_g_object_unref0 (src_photo);
#line 167 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_g_object_unref0 (photo);
#line 167 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	return result;
#line 1543 "DataImportJob.c"
}


static gchar** spit_data_imports_data_import_job_build_path_components (SpitDataImportsDataImportJob* self, SpitDataImportsImportableTag* tag, int* result_length1) {
	gchar** result = NULL;
	GeeList* components = NULL;
	GeeLinkedList* _tmp0_;
	GeeList* _tmp13_;
	gint _tmp14_;
	gpointer* _tmp15_;
	gchar** _tmp16_;
	gint _tmp16__length1;
#line 170 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	g_return_val_if_fail (SPIT_DATA_IMPORTS_IS_DATA_IMPORT_JOB (self), NULL);
#line 170 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	g_return_val_if_fail (SPIT_DATA_IMPORTS_IS_IMPORTABLE_TAG (tag), NULL);
#line 172 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp0_ = gee_linked_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
#line 172 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	components = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_LIST, GeeList);
#line 1564 "DataImportJob.c"
	{
		SpitDataImportsImportableTag* current_tag = NULL;
		SpitDataImportsImportableTag* _tmp1_;
		SpitDataImportsImportableTag* _tmp2_;
#line 173 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_tmp1_ = tag;
#line 173 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_tmp2_ = _g_object_ref0 (_tmp1_);
#line 173 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		current_tag = _tmp2_;
#line 1575 "DataImportJob.c"
		{
			gboolean _tmp3_ = FALSE;
#line 173 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
			_tmp3_ = TRUE;
#line 173 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
			while (TRUE) {
#line 1582 "DataImportJob.c"
				SpitDataImportsImportableTag* _tmp6_;
				GeeList* _tmp7_;
				SpitDataImportsImportableTag* _tmp8_;
				gchar* _tmp9_;
				gchar* _tmp10_;
				gchar* _tmp11_;
				gchar* _tmp12_;
#line 173 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				if (!_tmp3_) {
#line 1592 "DataImportJob.c"
					SpitDataImportsImportableTag* _tmp4_;
					SpitDataImportsImportableTag* _tmp5_;
#line 173 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_tmp4_ = current_tag;
#line 173 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_tmp5_ = spit_data_imports_importable_tag_get_parent (_tmp4_);
#line 173 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					_g_object_unref0 (current_tag);
#line 173 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					current_tag = _tmp5_;
#line 1603 "DataImportJob.c"
				}
#line 173 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp3_ = FALSE;
#line 173 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp6_ = current_tag;
#line 173 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				if (!(_tmp6_ != NULL)) {
#line 173 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
					break;
#line 1613 "DataImportJob.c"
				}
#line 174 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp7_ = components;
#line 174 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp8_ = current_tag;
#line 174 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp9_ = spit_data_imports_importable_tag_get_name (_tmp8_);
#line 174 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp10_ = _tmp9_;
#line 174 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp11_ = hierarchical_tag_utilities_make_flat_tag_safe (_tmp10_);
#line 174 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_tmp12_ = _tmp11_;
#line 174 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				gee_list_insert (_tmp7_, 0, _tmp12_);
#line 174 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_g_free0 (_tmp12_);
#line 174 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
				_g_free0 (_tmp10_);
#line 1633 "DataImportJob.c"
			}
		}
#line 173 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		_g_object_unref0 (current_tag);
#line 1638 "DataImportJob.c"
	}
#line 176 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp13_ = components;
#line 176 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp15_ = gee_collection_to_array (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_COLLECTION, GeeCollection), &_tmp14_);
#line 176 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp16_ = _tmp15_;
#line 176 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_tmp16__length1 = _tmp14_;
#line 176 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	if (result_length1) {
#line 176 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
		*result_length1 = _tmp16__length1;
#line 1652 "DataImportJob.c"
	}
#line 176 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	result = _tmp16_;
#line 176 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_g_object_unref0 (components);
#line 176 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	return result;
#line 1660 "DataImportJob.c"
}


static void spit_data_imports_data_import_job_class_init (SpitDataImportsDataImportJobClass * klass) {
#line 12 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	spit_data_imports_data_import_job_parent_class = g_type_class_peek_parent (klass);
#line 12 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	((BatchImportJobClass *) klass)->finalize = spit_data_imports_data_import_job_finalize;
#line 12 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	g_type_class_add_private (klass, sizeof (SpitDataImportsDataImportJobPrivate));
#line 12 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	((BatchImportJobClass *) klass)->get_dest_identifier = (gchar* (*) (BatchImportJob *)) spit_data_imports_data_import_job_real_get_dest_identifier;
#line 12 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	((BatchImportJobClass *) klass)->get_source_identifier = (gchar* (*) (BatchImportJob *)) spit_data_imports_data_import_job_real_get_source_identifier;
#line 12 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	((BatchImportJobClass *) klass)->is_directory = (gboolean (*) (BatchImportJob *)) spit_data_imports_data_import_job_real_is_directory;
#line 12 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	((BatchImportJobClass *) klass)->get_basename = (gchar* (*) (BatchImportJob *)) spit_data_imports_data_import_job_real_get_basename;
#line 12 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	((BatchImportJobClass *) klass)->get_path = (gchar* (*) (BatchImportJob *)) spit_data_imports_data_import_job_real_get_path;
#line 12 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	((BatchImportJobClass *) klass)->set_associated = (void (*) (BatchImportJob *, BatchImportJob*)) spit_data_imports_data_import_job_real_set_associated;
#line 12 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	((BatchImportJobClass *) klass)->determine_file_size = (gboolean (*) (BatchImportJob *, guint64*, GFile* *)) spit_data_imports_data_import_job_real_determine_file_size;
#line 12 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	((BatchImportJobClass *) klass)->prepare = (gboolean (*) (BatchImportJob *, GFile* *, gboolean*, GError**)) spit_data_imports_data_import_job_real_prepare;
#line 12 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	((BatchImportJobClass *) klass)->complete = (gboolean (*) (BatchImportJob *, MediaSource*, BatchImportRoll*, GError**)) spit_data_imports_data_import_job_real_complete;
#line 1689 "DataImportJob.c"
}


static void spit_data_imports_data_import_job_instance_init (SpitDataImportsDataImportJob * self) {
#line 12 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	self->priv = SPIT_DATA_IMPORTS_DATA_IMPORT_JOB_GET_PRIVATE (self);
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	self->priv->associated = NULL;
#line 18 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	self->priv->detected_htags = NULL;
#line 1700 "DataImportJob.c"
}


static void spit_data_imports_data_import_job_finalize (BatchImportJob * obj) {
	SpitDataImportsDataImportJob * self;
#line 12 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, SPIT_DATA_IMPORTS_TYPE_DATA_IMPORT_JOB, SpitDataImportsDataImportJob);
#line 13 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_spit_data_imports_data_import_source_unref0 (self->priv->import_source);
#line 14 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_g_object_unref0 (self->priv->src_file);
#line 17 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_batch_import_job_unref0 (self->priv->associated);
#line 18 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	_hierarchical_tag_index_unref0 (self->priv->detected_htags);
#line 12 "/home/jens/Source/shotwell/src/data_imports/DataImportJob.vala"
	BATCH_IMPORT_JOB_CLASS (spit_data_imports_data_import_job_parent_class)->finalize (obj);
#line 1718 "DataImportJob.c"
}


/**
 * A specialized import job implementation for alien databases.
 */
GType spit_data_imports_data_import_job_get_type (void) {
	static volatile gsize spit_data_imports_data_import_job_type_id__volatile = 0;
	if (g_once_init_enter (&spit_data_imports_data_import_job_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (SpitDataImportsDataImportJobClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) spit_data_imports_data_import_job_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (SpitDataImportsDataImportJob), 0, (GInstanceInitFunc) spit_data_imports_data_import_job_instance_init, NULL };
		GType spit_data_imports_data_import_job_type_id;
		spit_data_imports_data_import_job_type_id = g_type_register_static (TYPE_BATCH_IMPORT_JOB, "SpitDataImportsDataImportJob", &g_define_type_info, 0);
		g_once_init_leave (&spit_data_imports_data_import_job_type_id__volatile, spit_data_imports_data_import_job_type_id);
	}
	return spit_data_imports_data_import_job_type_id__volatile;
}


static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	if ((array != NULL) && (destroy_func != NULL)) {
		int i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}


static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func) {
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}