summaryrefslogtreecommitdiff
path: root/src/core/ContainerSourceCollection.c
blob: f9f30cb0e221b287e323d6498f9f0675bf28e190 (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
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
/* ContainerSourceCollection.c generated by valac 0.40.4, the Vala compiler
 * generated from ContainerSourceCollection.vala, do not modify */

/* Copyright 2016 Software Freedom Conservancy Inc.
 *
 * This software is licensed under the GNU Lesser General Public License
 * (version 2.1 or later).  See the COPYING file in this distribution.
 */
/* A ContainerSourceCollection is for DataSources which maintain links to one or more other*/
/* DataSources, assumed to be of a different type.  ContainerSourceCollection automates the task*/
/* of handling unlinking and relinking and maintaining backlinks.  Unlinked DataSources are*/
/* held in a holding tank, until they are either relinked or destroyed.*/
/**/
/* If the ContainerSourceCollection's DataSources are types that "evaporate" (i.e. they disappear*/
/* when they hold no items), they should use the evaporate() method, which will either destroy*/
/* the DataSource or hold it in the tank (if backlinks are outstanding).*/


#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>


#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;
typedef struct _DataCollectionPrivate DataCollectionPrivate;

#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_ALTERATION (alteration_get_type ())
#define ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALTERATION, Alteration))
#define ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALTERATION, AlterationClass))
#define IS_ALTERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALTERATION))
#define IS_ALTERATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALTERATION))
#define ALTERATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALTERATION, AlterationClass))

typedef struct _Alteration Alteration;
typedef struct _AlterationClass AlterationClass;

#define TYPE_MARKER (marker_get_type ())
#define MARKER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MARKER, Marker))
#define IS_MARKER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MARKER))
#define MARKER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MARKER, MarkerIface))

typedef struct _Marker Marker;
typedef struct _MarkerIface MarkerIface;

#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;
typedef struct _SourceCollectionPrivate SourceCollectionPrivate;

#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_SOURCE_BACKLINK (source_backlink_get_type ())
#define SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_BACKLINK, SourceBacklink))
#define SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_BACKLINK, SourceBacklinkClass))
#define IS_SOURCE_BACKLINK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_BACKLINK))
#define IS_SOURCE_BACKLINK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_BACKLINK))
#define SOURCE_BACKLINK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_BACKLINK, SourceBacklinkClass))

typedef struct _SourceBacklink SourceBacklink;
typedef struct _SourceBacklinkClass SourceBacklinkClass;

#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;
typedef struct _DatabaseSourceCollectionPrivate DatabaseSourceCollectionPrivate;

#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;
typedef struct _ContainerSourceCollectionPrivate ContainerSourceCollectionPrivate;

#define TYPE_CONTAINER_SOURCE (container_source_get_type ())
#define CONTAINER_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_CONTAINER_SOURCE, ContainerSource))
#define IS_CONTAINER_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_CONTAINER_SOURCE))
#define CONTAINER_SOURCE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_CONTAINER_SOURCE, ContainerSourceIface))

typedef struct _ContainerSource ContainerSource;
typedef struct _ContainerSourceIface ContainerSourceIface;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL)))
#define _source_backlink_unref0(var) ((var == NULL) ? NULL : (var = (source_backlink_unref (var), NULL)))

#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_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;
enum  {
	CONTAINER_SOURCE_COLLECTION_CONTAINER_CONTENTS_ADDED_SIGNAL,
	CONTAINER_SOURCE_COLLECTION_CONTAINER_CONTENTS_REMOVED_SIGNAL,
	CONTAINER_SOURCE_COLLECTION_CONTAINER_CONTENTS_ALTERED_SIGNAL,
	CONTAINER_SOURCE_COLLECTION_BACKLINK_TO_CONTAINER_REMOVED_SIGNAL,
	CONTAINER_SOURCE_COLLECTION_NUM_SIGNALS
};
static guint container_source_collection_signals[CONTAINER_SOURCE_COLLECTION_NUM_SIGNALS] = {0};
#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);

typedef gint64 (*Comparator) (void* a, void* b, void* user_data);
typedef gboolean (*ComparatorPredicate) (DataObject* object, Alteration* alteration, void* user_data);
typedef gboolean (*ProgressMonitor) (guint64 current, guint64 total, gboolean do_event_loop, void* user_data);
struct _MarkerIface {
	GTypeInterface parent_iface;
	void (*mark) (Marker* self, DataObject* object);
	void (*unmark) (Marker* self, DataObject* object);
	gboolean (*toggle) (Marker* self, DataObject* object);
	void (*mark_many) (Marker* self, GeeCollection* list);
	void (*unmark_many) (Marker* self, GeeCollection* list);
	void (*mark_all) (Marker* self);
	gint (*get_count) (Marker* self);
	GeeCollection* (*get_all) (Marker* self);
};

struct _DataCollection {
	GTypeInstance parent_instance;
	volatile int ref_count;
	DataCollectionPrivate * priv;
};

struct _DataCollectionClass {
	GTypeClass parent_class;
	void (*finalize) (DataCollection *self);
	gchar* (*to_string) (DataCollection* self);
	void (*notify_items_added) (DataCollection* self, GeeIterable* added);
	void (*notify_items_removed) (DataCollection* self, GeeIterable* removed);
	void (*notify_contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed);
	void (*notify_items_altered) (DataCollection* self, GeeMap* items);
	void (*notify_ordering_changed) (DataCollection* self);
	void (*notify_property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val);
	void (*notify_property_cleared) (DataCollection* self, const gchar* name);
	gboolean (*valid_type) (DataCollection* self, DataObject* object);
	void (*set_comparator) (DataCollection* self, Comparator comparator, void* comparator_target, ComparatorPredicate predicate, void* predicate_target);
	void (*reset_comparator) (DataCollection* self);
	GeeCollection* (*get_all) (DataCollection* self);
	gint (*get_count) (DataCollection* self);
	DataObject* (*get_at) (DataCollection* self, gint index);
	gint (*index_of) (DataCollection* self, DataObject* object);
	gboolean (*contains) (DataCollection* self, DataObject* object);
	gboolean (*add) (DataCollection* self, DataObject* object);
	GeeCollection* (*add_many) (DataCollection* self, GeeCollection* objects, ProgressMonitor monitor, void* monitor_target);
	void (*remove_marked) (DataCollection* self, Marker* m);
	void (*clear) (DataCollection* self);
	void (*close) (DataCollection* self);
	void (*notify_frozen) (DataCollection* self);
	void (*notify_thawed) (DataCollection* self);
	void (*items_added) (DataCollection* self, GeeIterable* added);
	void (*items_removed) (DataCollection* self, GeeIterable* removed);
	void (*contents_altered) (DataCollection* self, GeeIterable* added, GeeIterable* removed);
	void (*items_altered) (DataCollection* self, GeeMap* items);
	void (*ordering_changed) (DataCollection* self);
	void (*property_set) (DataCollection* self, const gchar* name, GValue* old, GValue* val);
	void (*property_cleared) (DataCollection* self, const gchar* name);
	void (*frozen) (DataCollection* self);
	void (*thawed) (DataCollection* self);
};

struct _SourceCollection {
	DataCollection parent_instance;
	SourceCollectionPrivate * priv;
};

struct _SourceCollectionClass {
	DataCollectionClass parent_class;
	gboolean (*holds_type_of_source) (SourceCollection* self, DataSource* source);
	void (*notify_items_unlinking) (SourceCollection* self, GeeCollection* unlinking);
	void (*notify_items_relinked) (SourceCollection* self, GeeCollection* relinked);
	void (*notify_item_destroyed) (SourceCollection* self, DataSource* source);
	void (*notify_items_destroyed) (SourceCollection* self, GeeCollection* destroyed);
	void (*notify_unlinked_destroyed) (SourceCollection* self, DataSource* unlinked);
	void (*notify_backlink_removed) (SourceCollection* self, SourceBacklink* backlink, GeeCollection* sources);
	gboolean (*has_backlink) (SourceCollection* self, SourceBacklink* backlink);
	void (*remove_backlink) (SourceCollection* self, SourceBacklink* backlink);
	void (*items_unlinking) (SourceCollection* self, GeeCollection* unlinking);
	void (*items_relinked) (SourceCollection* self, GeeCollection* relinked);
	void (*item_destroyed) (SourceCollection* self, DataSource* source);
	void (*items_destroyed) (SourceCollection* self, GeeCollection* destroyed);
	void (*unlinked_destroyed) (SourceCollection* self, DataSource* source);
	void (*backlink_removed) (SourceCollection* self, SourceBacklink* backlink, GeeCollection* sources);
};

struct _DatabaseSourceCollection {
	SourceCollection parent_instance;
	DatabaseSourceCollectionPrivate * priv;
};

struct _DatabaseSourceCollectionClass {
	SourceCollectionClass parent_class;
};

struct _ContainerSourceIface {
	GTypeInterface parent_iface;
	gboolean (*has_links) (ContainerSource* self);
	SourceBacklink* (*get_backlink) (ContainerSource* self);
	void (*break_link) (ContainerSource* self, DataSource* source);
	void (*break_link_many) (ContainerSource* self, GeeCollection* sources);
	void (*establish_link) (ContainerSource* self, DataSource* source);
	void (*establish_link_many) (ContainerSource* self, GeeCollection* sources);
};

struct _ContainerSourceCollection {
	DatabaseSourceCollection parent_instance;
	ContainerSourceCollectionPrivate * priv;
};

struct _ContainerSourceCollectionClass {
	DatabaseSourceCollectionClass parent_class;
	void (*notify_container_contents_added) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* added, gboolean relinked);
	void (*notify_container_contents_removed) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* removed, gboolean unlinked);
	void (*notify_container_contents_altered) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* added, gboolean relinked, GeeCollection* removed, gboolean unlinked);
	void (*notify_backlink_to_container_removed) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* sources);
	GeeCollection* (*get_containers_holding_source) (ContainerSourceCollection* self, DataSource* source);
	ContainerSource* (*convert_backlink_to_container) (ContainerSourceCollection* self, SourceBacklink* backlink);
	void (*container_contents_added) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* added, gboolean relinked);
	void (*container_contents_removed) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* removed, gboolean unlinked);
	void (*container_contents_altered) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* added, gboolean relinked, GeeCollection* removed, gboolean unlinked);
	void (*backlink_to_container_removed) (ContainerSourceCollection* self, ContainerSource* container, GeeCollection* sources);
};

struct _ContainerSourceCollectionPrivate {
	GeeHashSet* attached_collections;
	gchar* backlink_name;
	GeeHashSet* holding_tank;
};

typedef gint64 (*GetSourceDatabaseKey) (DataSource* source, void* user_data);

static gpointer container_source_collection_parent_class = NULL;

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 data_object_get_type (void) G_GNUC_CONST;
gpointer alteration_ref (gpointer instance);
void alteration_unref (gpointer instance);
GParamSpec* param_spec_alteration (const gchar* name,
                                   const gchar* nick,
                                   const gchar* blurb,
                                   GType object_type,
                                   GParamFlags flags);
void value_set_alteration (GValue* value,
                           gpointer v_object);
void value_take_alteration (GValue* value,
                            gpointer v_object);
gpointer value_get_alteration (const GValue* value);
GType alteration_get_type (void) G_GNUC_CONST;
GType marker_get_type (void) G_GNUC_CONST;
GType source_collection_get_type (void) G_GNUC_CONST;
GType data_source_get_type (void) G_GNUC_CONST;
gpointer source_backlink_ref (gpointer instance);
void source_backlink_unref (gpointer instance);
GParamSpec* param_spec_source_backlink (const gchar* name,
                                        const gchar* nick,
                                        const gchar* blurb,
                                        GType object_type,
                                        GParamFlags flags);
void value_set_source_backlink (GValue* value,
                                gpointer v_object);
void value_take_source_backlink (GValue* value,
                                 gpointer v_object);
gpointer value_get_source_backlink (const GValue* value);
GType source_backlink_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 container_source_get_type (void) G_GNUC_CONST;
#define CONTAINER_SOURCE_COLLECTION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollectionPrivate))
void container_source_collection_detach_all_collections (ContainerSourceCollection* self);
ContainerSourceCollection* container_source_collection_construct (GType object_type,
                                                                  const gchar* backlink_name,
                                                                  const gchar* name,
                                                                  GetSourceDatabaseKey source_key_func,
                                                                  void* source_key_func_target);
DatabaseSourceCollection* database_source_collection_construct (GType object_type,
                                                                const gchar* name,
                                                                GetSourceDatabaseKey source_key_func,
                                                                void* source_key_func_target);
static void container_source_collection_real_notify_backlink_removed (SourceCollection* base,
                                                               SourceBacklink* backlink,
                                                               GeeCollection* sources);
void source_collection_notify_backlink_removed (SourceCollection* self,
                                                SourceBacklink* backlink,
                                                GeeCollection* sources);
ContainerSource* container_source_collection_convert_backlink_to_container (ContainerSourceCollection* self,
                                                                            SourceBacklink* backlink);
void container_source_collection_notify_backlink_to_container_removed (ContainerSourceCollection* self,
                                                                       ContainerSource* container,
                                                                       GeeCollection* sources);
void container_source_collection_notify_container_contents_added (ContainerSourceCollection* self,
                                                                  ContainerSource* container,
                                                                  GeeCollection* added,
                                                                  gboolean relinked);
static void container_source_collection_real_notify_container_contents_added (ContainerSourceCollection* self,
                                                                       ContainerSource* container,
                                                                       GeeCollection* added,
                                                                       gboolean relinked);
void source_collection_relink (SourceCollection* self,
                               DataSource* source);
void container_source_collection_notify_container_contents_removed (ContainerSourceCollection* self,
                                                                    ContainerSource* container,
                                                                    GeeCollection* removed,
                                                                    gboolean unlinked);
static void container_source_collection_real_notify_container_contents_removed (ContainerSourceCollection* self,
                                                                         ContainerSource* container,
                                                                         GeeCollection* removed,
                                                                         gboolean unlinked);
void container_source_collection_notify_container_contents_altered (ContainerSourceCollection* self,
                                                                    ContainerSource* container,
                                                                    GeeCollection* added,
                                                                    gboolean relinked,
                                                                    GeeCollection* removed,
                                                                    gboolean unlinked);
static void container_source_collection_real_notify_container_contents_altered (ContainerSourceCollection* self,
                                                                         ContainerSource* container,
                                                                         GeeCollection* added,
                                                                         gboolean relinked,
                                                                         GeeCollection* removed,
                                                                         gboolean unlinked);
static void container_source_collection_real_notify_backlink_to_container_removed (ContainerSourceCollection* self,
                                                                            ContainerSource* container,
                                                                            GeeCollection* sources);
GeeCollection* container_source_collection_get_containers_holding_source (ContainerSourceCollection* self,
                                                                          DataSource* source);
static GeeCollection* container_source_collection_real_get_containers_holding_source (ContainerSourceCollection* self,
                                                                               DataSource* source);
static ContainerSource* container_source_collection_real_convert_backlink_to_container (ContainerSourceCollection* self,
                                                                                 SourceBacklink* backlink);
void container_source_collection_freeze_attached_notifications (ContainerSourceCollection* self);
void data_collection_freeze_notifications (DataCollection* self);
void container_source_collection_thaw_attached_notifications (ContainerSourceCollection* self);
void data_collection_thaw_notifications (DataCollection* self);
GeeCollection* container_source_collection_get_holding_tank (ContainerSourceCollection* self);
void container_source_collection_init_add_unlinked (ContainerSourceCollection* self,
                                                    ContainerSource* unlinked);
void container_source_collection_init_add_many_unlinked (ContainerSourceCollection* self,
                                                         GeeCollection* unlinked);
gboolean container_source_collection_relink_from_holding_tank (ContainerSourceCollection* self,
                                                               ContainerSource* source);
static void container_source_collection_on_contained_sources_unlinking (ContainerSourceCollection* self,
                                                                 GeeCollection* unlinking);
void data_source_set_backlink (DataSource* self,
                               SourceBacklink* backlink);
SourceBacklink* container_source_get_backlink (ContainerSource* self);
void container_source_break_link_many (ContainerSource* self,
                                       GeeCollection* sources);
static void container_source_collection_on_contained_sources_relinked (ContainerSourceCollection* self,
                                                                GeeCollection* relinked);
GeeList* data_source_get_backlinks (DataSource* self,
                                    const gchar* name);
gchar* data_object_to_string (DataObject* self);
gchar* source_backlink_to_string (SourceBacklink* self);
void container_source_establish_link_many (ContainerSource* self,
                                           GeeCollection* sources);
static void container_source_collection_on_contained_source_destroyed (ContainerSourceCollection* self,
                                                                DataSource* source);
gboolean container_source_has_links (ContainerSource* self);
GType tag_get_type (void) G_GNUC_CONST;
gboolean data_source_destroy_orphan (DataSource* self,
                                     gboolean delete_backing);
static void container_source_collection_real_notify_item_destroyed (SourceCollection* base,
                                                             DataSource* source);
void source_collection_remove_backlink (SourceCollection* self,
                                        SourceBacklink* backlink);
void source_collection_notify_item_destroyed (SourceCollection* self,
                                              DataSource* source);
void container_source_collection_evaporate (ContainerSourceCollection* self,
                                            ContainerSource* container);
gboolean source_collection_has_backlink (SourceCollection* self,
                                         SourceBacklink* backlink);
GeeCollection* source_collection_unlink_marked (SourceCollection* self,
                                                Marker* marker,
                                                ProgressMonitor monitor,
                                                void* monitor_target);
Marker* data_collection_mark (DataCollection* self,
                              DataObject* object);
GType thumbnail_source_get_type (void) G_GNUC_CONST;
GType media_source_get_type (void) G_GNUC_CONST;
gint source_collection_destroy_marked (SourceCollection* self,
                                       Marker* marker,
                                       gboolean delete_backing,
                                       ProgressMonitor monitor,
                                       void* monitor_target,
                                       GeeList* not_removed);
void container_source_collection_attach_collection (ContainerSourceCollection* self,
                                                    SourceCollection* collection);
gchar* data_collection_to_string (DataCollection* self);
static void _container_source_collection_on_contained_sources_unlinking_source_collection_items_unlinking (SourceCollection* _sender,
                                                                                                    GeeCollection* unlinking,
                                                                                                    gpointer self);
static void _container_source_collection_on_contained_sources_relinked_source_collection_items_relinked (SourceCollection* _sender,
                                                                                                  GeeCollection* relinked,
                                                                                                  gpointer self);
static void _container_source_collection_on_contained_source_destroyed_source_collection_item_destroyed (SourceCollection* _sender,
                                                                                                  DataSource* source,
                                                                                                  gpointer self);
static void _container_source_collection_on_contained_source_destroyed_source_collection_unlinked_destroyed (SourceCollection* _sender,
                                                                                                      DataSource* source,
                                                                                                      gpointer self);
static void container_source_collection_real_container_contents_added (ContainerSourceCollection* self,
                                                                ContainerSource* container,
                                                                GeeCollection* added,
                                                                gboolean relinked);
static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT_BOOLEAN (GClosure * closure,
                                                          GValue * return_value,
                                                          guint n_param_values,
                                                          const GValue * param_values,
                                                          gpointer invocation_hint,
                                                          gpointer marshal_data);
static void container_source_collection_real_container_contents_removed (ContainerSourceCollection* self,
                                                                  ContainerSource* container,
                                                                  GeeCollection* removed,
                                                                  gboolean unlinked);
static void container_source_collection_real_container_contents_altered (ContainerSourceCollection* self,
                                                                  ContainerSource* container,
                                                                  GeeCollection* added,
                                                                  gboolean relinked,
                                                                  GeeCollection* removed,
                                                                  gboolean unlinked);
static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT_BOOLEAN_OBJECT_BOOLEAN (GClosure * closure,
                                                                         GValue * return_value,
                                                                         guint n_param_values,
                                                                         const GValue * param_values,
                                                                         gpointer invocation_hint,
                                                                         gpointer marshal_data);
static void container_source_collection_real_backlink_to_container_removed (ContainerSourceCollection* self,
                                                                     ContainerSource* container,
                                                                     GeeCollection* sources);
static void g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure,
                                                  GValue * return_value,
                                                  guint n_param_values,
                                                  const GValue * param_values,
                                                  gpointer invocation_hint,
                                                  gpointer marshal_data);
static void container_source_collection_finalize (DataCollection * obj);


ContainerSourceCollection*
container_source_collection_construct (GType object_type,
                                       const gchar* backlink_name,
                                       const gchar* name,
                                       GetSourceDatabaseKey source_key_func,
                                       void* source_key_func_target)
{
	ContainerSourceCollection* self = NULL;
	gchar* _tmp0_;
#line 38 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_val_if_fail (backlink_name != NULL, NULL);
#line 38 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 40 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	self = (ContainerSourceCollection*) database_source_collection_construct (object_type, name, source_key_func, source_key_func_target);
#line 42 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_tmp0_ = g_strdup (backlink_name);
#line 42 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_g_free0 (self->priv->backlink_name);
#line 42 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	self->priv->backlink_name = _tmp0_;
#line 38 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	return self;
#line 542 "ContainerSourceCollection.c"
}


static void
container_source_collection_real_notify_backlink_removed (SourceCollection* base,
                                                          SourceBacklink* backlink,
                                                          GeeCollection* sources)
{
	ContainerSourceCollection * self;
	ContainerSource* container = NULL;
	ContainerSource* _tmp0_;
	ContainerSource* _tmp1_;
#line 49 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection);
#line 49 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_SOURCE_BACKLINK (backlink));
#line 49 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (GEE_IS_COLLECTION (sources));
#line 51 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	SOURCE_COLLECTION_CLASS (container_source_collection_parent_class)->notify_backlink_removed (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection), TYPE_SOURCE_COLLECTION, SourceCollection), backlink, sources);
#line 53 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_tmp0_ = container_source_collection_convert_backlink_to_container (self, backlink);
#line 53 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	container = _tmp0_;
#line 54 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_tmp1_ = container;
#line 54 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	if (_tmp1_ != NULL) {
#line 571 "ContainerSourceCollection.c"
		ContainerSource* _tmp2_;
#line 55 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp2_ = container;
#line 55 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		container_source_collection_notify_backlink_to_container_removed (self, _tmp2_, sources);
#line 577 "ContainerSourceCollection.c"
	}
#line 49 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_g_object_unref0 (container);
#line 581 "ContainerSourceCollection.c"
}


static void
container_source_collection_real_notify_container_contents_added (ContainerSourceCollection* self,
                                                                  ContainerSource* container,
                                                                  GeeCollection* added,
                                                                  gboolean relinked)
{
	GeeHashSet* _tmp0_;
#line 58 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE (container));
#line 58 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (GEE_IS_COLLECTION (added));
#line 61 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_tmp0_ = self->priv->holding_tank;
#line 61 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	if (gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), container)) {
#line 600 "ContainerSourceCollection.c"
		gboolean removed = FALSE;
		GeeHashSet* _tmp1_;
		gboolean _tmp2_;
#line 62 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp1_ = self->priv->holding_tank;
#line 62 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		removed = gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), container);
#line 63 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp2_ = removed;
#line 63 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_vala_assert (_tmp2_, "removed");
#line 65 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		source_collection_relink (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SOURCE_COLLECTION, SourceCollection), G_TYPE_CHECK_INSTANCE_CAST (container, TYPE_DATA_SOURCE, DataSource));
#line 614 "ContainerSourceCollection.c"
	}
#line 68 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_signal_emit (self, container_source_collection_signals[CONTAINER_SOURCE_COLLECTION_CONTAINER_CONTENTS_ADDED_SIGNAL], 0, container, added, relinked);
#line 618 "ContainerSourceCollection.c"
}


void
container_source_collection_notify_container_contents_added (ContainerSourceCollection* self,
                                                             ContainerSource* container,
                                                             GeeCollection* added,
                                                             gboolean relinked)
{
#line 58 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self));
#line 58 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	CONTAINER_SOURCE_COLLECTION_GET_CLASS (self)->notify_container_contents_added (self, container, added, relinked);
#line 632 "ContainerSourceCollection.c"
}


static void
container_source_collection_real_notify_container_contents_removed (ContainerSourceCollection* self,
                                                                    ContainerSource* container,
                                                                    GeeCollection* removed,
                                                                    gboolean unlinked)
{
#line 71 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE (container));
#line 71 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (GEE_IS_COLLECTION (removed));
#line 73 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_signal_emit (self, container_source_collection_signals[CONTAINER_SOURCE_COLLECTION_CONTAINER_CONTENTS_REMOVED_SIGNAL], 0, container, removed, unlinked);
#line 648 "ContainerSourceCollection.c"
}


void
container_source_collection_notify_container_contents_removed (ContainerSourceCollection* self,
                                                               ContainerSource* container,
                                                               GeeCollection* removed,
                                                               gboolean unlinked)
{
#line 71 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self));
#line 71 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	CONTAINER_SOURCE_COLLECTION_GET_CLASS (self)->notify_container_contents_removed (self, container, removed, unlinked);
#line 662 "ContainerSourceCollection.c"
}


static void
container_source_collection_real_notify_container_contents_altered (ContainerSourceCollection* self,
                                                                    ContainerSource* container,
                                                                    GeeCollection* added,
                                                                    gboolean relinked,
                                                                    GeeCollection* removed,
                                                                    gboolean unlinked)
{
#line 76 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE (container));
#line 76 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail ((added == NULL) || GEE_IS_COLLECTION (added));
#line 76 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail ((removed == NULL) || GEE_IS_COLLECTION (removed));
#line 79 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_signal_emit (self, container_source_collection_signals[CONTAINER_SOURCE_COLLECTION_CONTAINER_CONTENTS_ALTERED_SIGNAL], 0, container, added, relinked, removed, unlinked);
#line 682 "ContainerSourceCollection.c"
}


void
container_source_collection_notify_container_contents_altered (ContainerSourceCollection* self,
                                                               ContainerSource* container,
                                                               GeeCollection* added,
                                                               gboolean relinked,
                                                               GeeCollection* removed,
                                                               gboolean unlinked)
{
#line 76 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self));
#line 76 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	CONTAINER_SOURCE_COLLECTION_GET_CLASS (self)->notify_container_contents_altered (self, container, added, relinked, removed, unlinked);
#line 698 "ContainerSourceCollection.c"
}


static void
container_source_collection_real_notify_backlink_to_container_removed (ContainerSourceCollection* self,
                                                                       ContainerSource* container,
                                                                       GeeCollection* sources)
{
#line 82 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE (container));
#line 82 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (GEE_IS_COLLECTION (sources));
#line 84 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_signal_emit (self, container_source_collection_signals[CONTAINER_SOURCE_COLLECTION_BACKLINK_TO_CONTAINER_REMOVED_SIGNAL], 0, container, sources);
#line 713 "ContainerSourceCollection.c"
}


void
container_source_collection_notify_backlink_to_container_removed (ContainerSourceCollection* self,
                                                                  ContainerSource* container,
                                                                  GeeCollection* sources)
{
#line 82 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self));
#line 82 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	CONTAINER_SOURCE_COLLECTION_GET_CLASS (self)->notify_backlink_to_container_removed (self, container, sources);
#line 726 "ContainerSourceCollection.c"
}


static GeeCollection*
container_source_collection_real_get_containers_holding_source (ContainerSourceCollection* self,
                                                                DataSource* source)
{
#line 87 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_critical ("Type `%s' does not implement abstract method `container_source_collection_get_containers_holding_source'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 87 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	return NULL;
#line 738 "ContainerSourceCollection.c"
}


GeeCollection*
container_source_collection_get_containers_holding_source (ContainerSourceCollection* self,
                                                           DataSource* source)
{
#line 87 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_val_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self), NULL);
#line 87 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	return CONTAINER_SOURCE_COLLECTION_GET_CLASS (self)->get_containers_holding_source (self, source);
#line 750 "ContainerSourceCollection.c"
}


static ContainerSource*
container_source_collection_real_convert_backlink_to_container (ContainerSourceCollection* self,
                                                                SourceBacklink* backlink)
{
#line 90 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_critical ("Type `%s' does not implement abstract method `container_source_collection_convert_backlink_to_container'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 90 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	return NULL;
#line 762 "ContainerSourceCollection.c"
}


ContainerSource*
container_source_collection_convert_backlink_to_container (ContainerSourceCollection* self,
                                                           SourceBacklink* backlink)
{
#line 90 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_val_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self), NULL);
#line 90 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	return CONTAINER_SOURCE_COLLECTION_GET_CLASS (self)->convert_backlink_to_container (self, backlink);
#line 774 "ContainerSourceCollection.c"
}


void
container_source_collection_freeze_attached_notifications (ContainerSourceCollection* self)
{
#line 92 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self));
#line 783 "ContainerSourceCollection.c"
	{
		GeeIterator* _collection_it = NULL;
		GeeHashSet* _tmp0_;
		GeeIterator* _tmp1_;
#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp0_ = self->priv->attached_collections;
#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp1_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_collection_it = _tmp1_;
#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		while (TRUE) {
#line 796 "ContainerSourceCollection.c"
			GeeIterator* _tmp2_;
			SourceCollection* collection = NULL;
			GeeIterator* _tmp3_;
			gpointer _tmp4_;
			SourceCollection* _tmp5_;
#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp2_ = _collection_it;
#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			if (!gee_iterator_next (_tmp2_)) {
#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				break;
#line 808 "ContainerSourceCollection.c"
			}
#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp3_ = _collection_it;
#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp4_ = gee_iterator_get (_tmp3_);
#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			collection = (SourceCollection*) _tmp4_;
#line 94 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp5_ = collection;
#line 94 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			data_collection_freeze_notifications (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_COLLECTION, DataCollection));
#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_data_collection_unref0 (collection);
#line 822 "ContainerSourceCollection.c"
		}
#line 93 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_g_object_unref0 (_collection_it);
#line 826 "ContainerSourceCollection.c"
	}
}


void
container_source_collection_thaw_attached_notifications (ContainerSourceCollection* self)
{
#line 97 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self));
#line 836 "ContainerSourceCollection.c"
	{
		GeeIterator* _collection_it = NULL;
		GeeHashSet* _tmp0_;
		GeeIterator* _tmp1_;
#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp0_ = self->priv->attached_collections;
#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp1_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_collection_it = _tmp1_;
#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		while (TRUE) {
#line 849 "ContainerSourceCollection.c"
			GeeIterator* _tmp2_;
			SourceCollection* collection = NULL;
			GeeIterator* _tmp3_;
			gpointer _tmp4_;
			SourceCollection* _tmp5_;
#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp2_ = _collection_it;
#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			if (!gee_iterator_next (_tmp2_)) {
#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				break;
#line 861 "ContainerSourceCollection.c"
			}
#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp3_ = _collection_it;
#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp4_ = gee_iterator_get (_tmp3_);
#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			collection = (SourceCollection*) _tmp4_;
#line 99 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp5_ = collection;
#line 99 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			data_collection_thaw_notifications (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_DATA_COLLECTION, DataCollection));
#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_data_collection_unref0 (collection);
#line 875 "ContainerSourceCollection.c"
		}
#line 98 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_g_object_unref0 (_collection_it);
#line 879 "ContainerSourceCollection.c"
	}
}


GeeCollection*
container_source_collection_get_holding_tank (ContainerSourceCollection* self)
{
	GeeCollection* result = NULL;
	GeeHashSet* _tmp0_;
	GeeSet* _tmp1_;
	GeeSet* _tmp2_;
#line 102 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_val_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self), NULL);
#line 103 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_tmp0_ = self->priv->holding_tank;
#line 103 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_tmp1_ = gee_abstract_set_get_read_only_view (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_SET, GeeAbstractSet));
#line 103 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_tmp2_ = _tmp1_;
#line 103 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection);
#line 103 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	return result;
#line 903 "ContainerSourceCollection.c"
}


void
container_source_collection_init_add_unlinked (ContainerSourceCollection* self,
                                               ContainerSource* unlinked)
{
	GeeHashSet* _tmp0_;
#line 106 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self));
#line 106 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE (unlinked));
#line 107 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_tmp0_ = self->priv->holding_tank;
#line 107 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), unlinked);
#line 920 "ContainerSourceCollection.c"
}


void
container_source_collection_init_add_many_unlinked (ContainerSourceCollection* self,
                                                    GeeCollection* unlinked)
{
	GeeHashSet* _tmp0_;
#line 110 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self));
#line 110 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (GEE_IS_COLLECTION (unlinked));
#line 111 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_tmp0_ = self->priv->holding_tank;
#line 111 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	gee_collection_add_all (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection), unlinked);
#line 937 "ContainerSourceCollection.c"
}


gboolean
container_source_collection_relink_from_holding_tank (ContainerSourceCollection* self,
                                                      ContainerSource* source)
{
	gboolean result = FALSE;
	GeeHashSet* _tmp0_;
#line 114 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_val_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self), FALSE);
#line 114 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_val_if_fail (IS_CONTAINER_SOURCE (source), FALSE);
#line 115 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_tmp0_ = self->priv->holding_tank;
#line 115 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	if (!gee_abstract_collection_remove (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), source)) {
#line 116 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		result = FALSE;
#line 116 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		return result;
#line 959 "ContainerSourceCollection.c"
	}
#line 118 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	source_collection_relink (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SOURCE_COLLECTION, SourceCollection), G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_DATA_SOURCE, DataSource));
#line 120 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	result = TRUE;
#line 120 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	return result;
#line 967 "ContainerSourceCollection.c"
}


static void
container_source_collection_on_contained_sources_unlinking (ContainerSourceCollection* self,
                                                            GeeCollection* unlinking)
{
	GeeHashMultiMap* map = NULL;
	GeeHashMultiMap* _tmp0_;
#line 123 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self));
#line 123 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (GEE_IS_COLLECTION (unlinking));
#line 124 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	container_source_collection_freeze_attached_notifications (self);
#line 126 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_tmp0_ = gee_hash_multi_map_new (TYPE_CONTAINER_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 126 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	map = _tmp0_;
#line 987 "ContainerSourceCollection.c"
	{
		GeeIterator* _source_it = NULL;
		GeeIterator* _tmp1_;
#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (unlinking, GEE_TYPE_ITERABLE, GeeIterable));
#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_source_it = _tmp1_;
#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		while (TRUE) {
#line 997 "ContainerSourceCollection.c"
			GeeIterator* _tmp2_;
			DataSource* source = NULL;
			GeeIterator* _tmp3_;
			gpointer _tmp4_;
			GeeCollection* containers = NULL;
			DataSource* _tmp5_;
			GeeCollection* _tmp6_;
			gboolean _tmp7_ = FALSE;
			GeeCollection* _tmp8_;
#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp2_ = _source_it;
#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			if (!gee_iterator_next (_tmp2_)) {
#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				break;
#line 1013 "ContainerSourceCollection.c"
			}
#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp3_ = _source_it;
#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp4_ = gee_iterator_get (_tmp3_);
#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			source = (DataSource*) _tmp4_;
#line 130 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp5_ = source;
#line 130 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp6_ = container_source_collection_get_containers_holding_source (self, _tmp5_);
#line 130 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			containers = _tmp6_;
#line 131 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp8_ = containers;
#line 131 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			if (_tmp8_ == NULL) {
#line 131 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp7_ = TRUE;
#line 1033 "ContainerSourceCollection.c"
			} else {
				GeeCollection* _tmp9_;
				gint _tmp10_;
				gint _tmp11_;
#line 131 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp9_ = containers;
#line 131 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp10_ = gee_collection_get_size (_tmp9_);
#line 131 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp11_ = _tmp10_;
#line 131 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp7_ = _tmp11_ == 0;
#line 1046 "ContainerSourceCollection.c"
			}
#line 131 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			if (_tmp7_) {
#line 132 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_g_object_unref0 (containers);
#line 132 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_g_object_unref0 (source);
#line 132 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				continue;
#line 1056 "ContainerSourceCollection.c"
			}
			{
				GeeIterator* _container_it = NULL;
				GeeCollection* _tmp12_;
				GeeIterator* _tmp13_;
#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp12_ = containers;
#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp13_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_ITERABLE, GeeIterable));
#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_container_it = _tmp13_;
#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				while (TRUE) {
#line 1070 "ContainerSourceCollection.c"
					GeeIterator* _tmp14_;
					ContainerSource* container = NULL;
					GeeIterator* _tmp15_;
					gpointer _tmp16_;
					GeeHashMultiMap* _tmp17_;
					ContainerSource* _tmp18_;
					DataSource* _tmp19_;
					DataSource* _tmp20_;
					ContainerSource* _tmp21_;
					SourceBacklink* _tmp22_;
					SourceBacklink* _tmp23_;
#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_tmp14_ = _container_it;
#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					if (!gee_iterator_next (_tmp14_)) {
#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
						break;
#line 1088 "ContainerSourceCollection.c"
					}
#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_tmp15_ = _container_it;
#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_tmp16_ = gee_iterator_get (_tmp15_);
#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					container = (ContainerSource*) _tmp16_;
#line 135 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_tmp17_ = map;
#line 135 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_tmp18_ = container;
#line 135 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_tmp19_ = source;
#line 135 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					gee_multi_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp17_, GEE_TYPE_MULTI_MAP, GeeMultiMap), _tmp18_, _tmp19_);
#line 136 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_tmp20_ = source;
#line 136 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_tmp21_ = container;
#line 136 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_tmp22_ = container_source_get_backlink (_tmp21_);
#line 136 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_tmp23_ = _tmp22_;
#line 136 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					data_source_set_backlink (_tmp20_, _tmp23_);
#line 136 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_source_backlink_unref0 (_tmp23_);
#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_g_object_unref0 (container);
#line 1118 "ContainerSourceCollection.c"
				}
#line 134 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_g_object_unref0 (_container_it);
#line 1122 "ContainerSourceCollection.c"
			}
#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_g_object_unref0 (containers);
#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_g_object_unref0 (source);
#line 1128 "ContainerSourceCollection.c"
		}
#line 129 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_g_object_unref0 (_source_it);
#line 1132 "ContainerSourceCollection.c"
	}
	{
		GeeIterator* _container_it = NULL;
		GeeHashMultiMap* _tmp24_;
		GeeSet* _tmp25_;
		GeeSet* _tmp26_;
		GeeIterator* _tmp27_;
		GeeIterator* _tmp28_;
#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp24_ = map;
#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp25_ = gee_multi_map_get_keys (G_TYPE_CHECK_INSTANCE_CAST (_tmp24_, GEE_TYPE_MULTI_MAP, GeeMultiMap));
#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp26_ = _tmp25_;
#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp27_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GEE_TYPE_ITERABLE, GeeIterable));
#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp28_ = _tmp27_;
#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_g_object_unref0 (_tmp26_);
#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_container_it = _tmp28_;
#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		while (TRUE) {
#line 1157 "ContainerSourceCollection.c"
			GeeIterator* _tmp29_;
			ContainerSource* container = NULL;
			GeeIterator* _tmp30_;
			gpointer _tmp31_;
			ContainerSource* _tmp32_;
			GeeHashMultiMap* _tmp33_;
			ContainerSource* _tmp34_;
			GeeCollection* _tmp35_;
			GeeCollection* _tmp36_;
#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp29_ = _container_it;
#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			if (!gee_iterator_next (_tmp29_)) {
#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				break;
#line 1173 "ContainerSourceCollection.c"
			}
#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp30_ = _container_it;
#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp31_ = gee_iterator_get (_tmp30_);
#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			container = (ContainerSource*) _tmp31_;
#line 141 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp32_ = container;
#line 141 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp33_ = map;
#line 141 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp34_ = container;
#line 141 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp35_ = gee_multi_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp33_, GEE_TYPE_MULTI_MAP, GeeMultiMap), _tmp34_);
#line 141 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp36_ = _tmp35_;
#line 141 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			container_source_break_link_many (_tmp32_, _tmp36_);
#line 141 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_g_object_unref0 (_tmp36_);
#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_g_object_unref0 (container);
#line 1197 "ContainerSourceCollection.c"
		}
#line 140 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_g_object_unref0 (_container_it);
#line 1201 "ContainerSourceCollection.c"
	}
#line 143 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	container_source_collection_thaw_attached_notifications (self);
#line 123 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_g_object_unref0 (map);
#line 1207 "ContainerSourceCollection.c"
}


static gpointer
_g_object_ref0 (gpointer self)
{
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	return self ? g_object_ref (self) : NULL;
#line 1216 "ContainerSourceCollection.c"
}


static void
container_source_collection_on_contained_sources_relinked (ContainerSourceCollection* self,
                                                           GeeCollection* relinked)
{
	GeeHashMultiMap* map = NULL;
	GeeHashMultiMap* _tmp0_;
#line 146 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self));
#line 146 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (GEE_IS_COLLECTION (relinked));
#line 147 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	container_source_collection_freeze_attached_notifications (self);
#line 149 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_tmp0_ = gee_hash_multi_map_new (TYPE_CONTAINER_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, TYPE_DATA_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 149 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	map = _tmp0_;
#line 1236 "ContainerSourceCollection.c"
	{
		GeeIterator* _source_it = NULL;
		GeeIterator* _tmp1_;
#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (relinked, GEE_TYPE_ITERABLE, GeeIterable));
#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_source_it = _tmp1_;
#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		while (TRUE) {
#line 1246 "ContainerSourceCollection.c"
			GeeIterator* _tmp2_;
			DataSource* source = NULL;
			GeeIterator* _tmp3_;
			gpointer _tmp4_;
			GeeList* backlinks = NULL;
			DataSource* _tmp5_;
			const gchar* _tmp6_;
			GeeList* _tmp7_;
			gboolean _tmp8_ = FALSE;
			GeeList* _tmp9_;
#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp2_ = _source_it;
#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			if (!gee_iterator_next (_tmp2_)) {
#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				break;
#line 1263 "ContainerSourceCollection.c"
			}
#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp3_ = _source_it;
#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp4_ = gee_iterator_get (_tmp3_);
#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			source = (DataSource*) _tmp4_;
#line 153 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp5_ = source;
#line 153 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp6_ = self->priv->backlink_name;
#line 153 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp7_ = data_source_get_backlinks (_tmp5_, _tmp6_);
#line 153 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			backlinks = _tmp7_;
#line 154 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp9_ = backlinks;
#line 154 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			if (_tmp9_ == NULL) {
#line 154 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp8_ = TRUE;
#line 1285 "ContainerSourceCollection.c"
			} else {
				GeeList* _tmp10_;
				gint _tmp11_;
				gint _tmp12_;
#line 154 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp10_ = backlinks;
#line 154 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp11_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_COLLECTION, GeeCollection));
#line 154 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp12_ = _tmp11_;
#line 154 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp8_ = _tmp12_ == 0;
#line 1298 "ContainerSourceCollection.c"
			}
#line 154 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			if (_tmp8_) {
#line 155 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_g_object_unref0 (backlinks);
#line 155 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_g_object_unref0 (source);
#line 155 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				continue;
#line 1308 "ContainerSourceCollection.c"
			}
			{
				GeeList* _backlink_list = NULL;
				GeeList* _tmp13_;
				GeeList* _tmp14_;
				gint _backlink_size = 0;
				GeeList* _tmp15_;
				gint _tmp16_;
				gint _tmp17_;
				gint _backlink_index = 0;
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp13_ = backlinks;
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp14_ = _g_object_ref0 (_tmp13_);
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_backlink_list = _tmp14_;
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp15_ = _backlink_list;
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp16_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp15_, GEE_TYPE_COLLECTION, GeeCollection));
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp17_ = _tmp16_;
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_backlink_size = _tmp17_;
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_backlink_index = -1;
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				while (TRUE) {
#line 1337 "ContainerSourceCollection.c"
					gint _tmp18_;
					gint _tmp19_;
					gint _tmp20_;
					SourceBacklink* backlink = NULL;
					GeeList* _tmp21_;
					gint _tmp22_;
					gpointer _tmp23_;
					ContainerSource* container = NULL;
					SourceBacklink* _tmp24_;
					ContainerSource* _tmp25_;
					ContainerSource* _tmp26_;
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_tmp18_ = _backlink_index;
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_backlink_index = _tmp18_ + 1;
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_tmp19_ = _backlink_index;
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_tmp20_ = _backlink_size;
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					if (!(_tmp19_ < _tmp20_)) {
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
						break;
#line 1361 "ContainerSourceCollection.c"
					}
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_tmp21_ = _backlink_list;
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_tmp22_ = _backlink_index;
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_tmp23_ = gee_list_get (_tmp21_, _tmp22_);
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					backlink = (SourceBacklink*) _tmp23_;
#line 158 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_tmp24_ = backlink;
#line 158 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_tmp25_ = container_source_collection_convert_backlink_to_container (self, _tmp24_);
#line 158 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					container = _tmp25_;
#line 159 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_tmp26_ = container;
#line 159 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					if (_tmp26_ != NULL) {
#line 1381 "ContainerSourceCollection.c"
						GeeHashMultiMap* _tmp27_;
						ContainerSource* _tmp28_;
						DataSource* _tmp29_;
#line 160 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
						_tmp27_ = map;
#line 160 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
						_tmp28_ = container;
#line 160 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
						_tmp29_ = source;
#line 160 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
						gee_multi_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GEE_TYPE_MULTI_MAP, GeeMultiMap), _tmp28_, _tmp29_);
#line 1393 "ContainerSourceCollection.c"
					} else {
						DataSource* _tmp30_;
						gchar* _tmp31_;
						gchar* _tmp32_;
						SourceBacklink* _tmp33_;
						gchar* _tmp34_;
						gchar* _tmp35_;
#line 162 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
						_tmp30_ = source;
#line 162 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
						_tmp31_ = data_object_to_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp30_, TYPE_DATA_OBJECT, DataObject));
#line 162 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
						_tmp32_ = _tmp31_;
#line 162 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
						_tmp33_ = backlink;
#line 162 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
						_tmp34_ = source_backlink_to_string (_tmp33_);
#line 162 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
						_tmp35_ = _tmp34_;
#line 162 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
						g_warning ("ContainerSourceCollection.vala:162: Unable to relink %s to container b" \
"acklink %s", _tmp32_, _tmp35_);
#line 162 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
						_g_free0 (_tmp35_);
#line 162 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
						_g_free0 (_tmp32_);
#line 1419 "ContainerSourceCollection.c"
					}
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_g_object_unref0 (container);
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
					_source_backlink_unref0 (backlink);
#line 1425 "ContainerSourceCollection.c"
				}
#line 157 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_g_object_unref0 (_backlink_list);
#line 1429 "ContainerSourceCollection.c"
			}
#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_g_object_unref0 (backlinks);
#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_g_object_unref0 (source);
#line 1435 "ContainerSourceCollection.c"
		}
#line 152 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_g_object_unref0 (_source_it);
#line 1439 "ContainerSourceCollection.c"
	}
	{
		GeeIterator* _container_it = NULL;
		GeeHashMultiMap* _tmp36_;
		GeeSet* _tmp37_;
		GeeSet* _tmp38_;
		GeeIterator* _tmp39_;
		GeeIterator* _tmp40_;
#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp36_ = map;
#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp37_ = gee_multi_map_get_keys (G_TYPE_CHECK_INSTANCE_CAST (_tmp36_, GEE_TYPE_MULTI_MAP, GeeMultiMap));
#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp38_ = _tmp37_;
#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp39_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp38_, GEE_TYPE_ITERABLE, GeeIterable));
#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp40_ = _tmp39_;
#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_g_object_unref0 (_tmp38_);
#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_container_it = _tmp40_;
#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		while (TRUE) {
#line 1464 "ContainerSourceCollection.c"
			GeeIterator* _tmp41_;
			ContainerSource* container = NULL;
			GeeIterator* _tmp42_;
			gpointer _tmp43_;
			ContainerSource* _tmp44_;
			GeeHashMultiMap* _tmp45_;
			ContainerSource* _tmp46_;
			GeeCollection* _tmp47_;
			GeeCollection* _tmp48_;
#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp41_ = _container_it;
#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			if (!gee_iterator_next (_tmp41_)) {
#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				break;
#line 1480 "ContainerSourceCollection.c"
			}
#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp42_ = _container_it;
#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp43_ = gee_iterator_get (_tmp42_);
#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			container = (ContainerSource*) _tmp43_;
#line 169 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp44_ = container;
#line 169 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp45_ = map;
#line 169 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp46_ = container;
#line 169 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp47_ = gee_multi_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp45_, GEE_TYPE_MULTI_MAP, GeeMultiMap), _tmp46_);
#line 169 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp48_ = _tmp47_;
#line 169 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			container_source_establish_link_many (_tmp44_, _tmp48_);
#line 169 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_g_object_unref0 (_tmp48_);
#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_g_object_unref0 (container);
#line 1504 "ContainerSourceCollection.c"
		}
#line 168 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_g_object_unref0 (_container_it);
#line 1508 "ContainerSourceCollection.c"
	}
#line 171 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	container_source_collection_thaw_attached_notifications (self);
#line 146 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_g_object_unref0 (map);
#line 1514 "ContainerSourceCollection.c"
}


static void
container_source_collection_on_contained_source_destroyed (ContainerSourceCollection* self,
                                                           DataSource* source)
{
	GeeIterator* iter = NULL;
	GeeHashSet* _tmp0_;
	GeeIterator* _tmp1_;
#line 174 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self));
#line 174 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 175 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_tmp0_ = self->priv->holding_tank;
#line 175 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_tmp1_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 175 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	iter = _tmp1_;
#line 176 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	while (TRUE) {
#line 1537 "ContainerSourceCollection.c"
		GeeIterator* _tmp2_;
		ContainerSource* container = NULL;
		GeeIterator* _tmp3_;
		gpointer _tmp4_;
		gboolean _tmp5_ = FALSE;
		ContainerSource* _tmp6_;
#line 176 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp2_ = iter;
#line 176 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		if (!gee_iterator_next (_tmp2_)) {
#line 176 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			break;
#line 1550 "ContainerSourceCollection.c"
		}
#line 177 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp3_ = iter;
#line 177 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp4_ = gee_iterator_get (_tmp3_);
#line 177 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		container = (ContainerSource*) _tmp4_;
#line 181 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp6_ = container;
#line 181 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		if (!container_source_has_links (_tmp6_)) {
#line 1562 "ContainerSourceCollection.c"
			ContainerSource* _tmp7_;
#line 181 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp7_ = container;
#line 181 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp5_ = !G_TYPE_CHECK_INSTANCE_TYPE (_tmp7_, TYPE_TAG);
#line 1568 "ContainerSourceCollection.c"
		} else {
#line 181 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp5_ = FALSE;
#line 1572 "ContainerSourceCollection.c"
		}
#line 181 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		if (_tmp5_) {
#line 1576 "ContainerSourceCollection.c"
			GeeIterator* _tmp8_;
			ContainerSource* _tmp9_;
#line 182 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp8_ = iter;
#line 182 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			gee_iterator_remove (_tmp8_);
#line 183 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp9_ = container;
#line 183 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			data_source_destroy_orphan (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, TYPE_DATA_SOURCE, DataSource), TRUE);
#line 1587 "ContainerSourceCollection.c"
		}
#line 176 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_g_object_unref0 (container);
#line 1591 "ContainerSourceCollection.c"
	}
#line 174 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_g_object_unref0 (iter);
#line 1595 "ContainerSourceCollection.c"
}


static void
container_source_collection_real_notify_item_destroyed (SourceCollection* base,
                                                        DataSource* source)
{
	ContainerSourceCollection * self;
#line 188 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (base, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection);
#line 188 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_DATA_SOURCE (source));
#line 1608 "ContainerSourceCollection.c"
	{
		GeeIterator* _collection_it = NULL;
		GeeHashSet* _tmp0_;
		GeeIterator* _tmp1_;
#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp0_ = self->priv->attached_collections;
#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp1_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_collection_it = _tmp1_;
#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		while (TRUE) {
#line 1621 "ContainerSourceCollection.c"
			GeeIterator* _tmp2_;
			SourceCollection* collection = NULL;
			GeeIterator* _tmp3_;
			gpointer _tmp4_;
			SourceCollection* _tmp5_;
			SourceBacklink* _tmp6_;
			SourceBacklink* _tmp7_;
#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp2_ = _collection_it;
#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			if (!gee_iterator_next (_tmp2_)) {
#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				break;
#line 1635 "ContainerSourceCollection.c"
			}
#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp3_ = _collection_it;
#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp4_ = gee_iterator_get (_tmp3_);
#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			collection = (SourceCollection*) _tmp4_;
#line 190 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp5_ = collection;
#line 190 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp6_ = container_source_get_backlink (G_TYPE_CHECK_INSTANCE_CAST (source, TYPE_CONTAINER_SOURCE, ContainerSource));
#line 190 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp7_ = _tmp6_;
#line 190 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			source_collection_remove_backlink (_tmp5_, _tmp7_);
#line 190 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_source_backlink_unref0 (_tmp7_);
#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_data_collection_unref0 (collection);
#line 1655 "ContainerSourceCollection.c"
		}
#line 189 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_g_object_unref0 (_collection_it);
#line 1659 "ContainerSourceCollection.c"
	}
#line 193 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	SOURCE_COLLECTION_CLASS (container_source_collection_parent_class)->notify_item_destroyed (G_TYPE_CHECK_INSTANCE_CAST (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection), TYPE_SOURCE_COLLECTION, SourceCollection), source);
#line 1663 "ContainerSourceCollection.c"
}


void
container_source_collection_evaporate (ContainerSourceCollection* self,
                                       ContainerSource* container)
{
	Marker* _tmp15_;
	Marker* _tmp16_;
#line 200 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self));
#line 200 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE (container));
#line 1677 "ContainerSourceCollection.c"
	{
		GeeIterator* _collection_it = NULL;
		GeeHashSet* _tmp0_;
		GeeIterator* _tmp1_;
#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp0_ = self->priv->attached_collections;
#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp1_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_collection_it = _tmp1_;
#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		while (TRUE) {
#line 1690 "ContainerSourceCollection.c"
			GeeIterator* _tmp2_;
			SourceCollection* collection = NULL;
			GeeIterator* _tmp3_;
			gpointer _tmp4_;
			SourceCollection* _tmp5_;
			SourceBacklink* _tmp6_;
			SourceBacklink* _tmp7_;
			gboolean _tmp8_;
#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp2_ = _collection_it;
#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			if (!gee_iterator_next (_tmp2_)) {
#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				break;
#line 1705 "ContainerSourceCollection.c"
			}
#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp3_ = _collection_it;
#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp4_ = gee_iterator_get (_tmp3_);
#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			collection = (SourceCollection*) _tmp4_;
#line 202 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp5_ = collection;
#line 202 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp6_ = container_source_get_backlink (container);
#line 202 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp7_ = _tmp6_;
#line 202 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp8_ = source_collection_has_backlink (_tmp5_, _tmp7_);
#line 202 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_source_backlink_unref0 (_tmp7_);
#line 202 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			if (_tmp8_) {
#line 1725 "ContainerSourceCollection.c"
				Marker* _tmp9_;
				Marker* _tmp10_;
				GeeCollection* _tmp11_;
				GeeCollection* _tmp12_;
				gboolean added = FALSE;
				GeeHashSet* _tmp13_;
				gboolean _tmp14_;
#line 203 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp9_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (container, TYPE_DATA_OBJECT, DataObject));
#line 203 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp10_ = _tmp9_;
#line 203 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp11_ = source_collection_unlink_marked (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp10_, NULL, NULL);
#line 203 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp12_ = _tmp11_;
#line 203 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_g_object_unref0 (_tmp12_);
#line 203 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_g_object_unref0 (_tmp10_);
#line 204 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp13_ = self->priv->holding_tank;
#line 204 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				added = gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), container);
#line 205 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_tmp14_ = added;
#line 205 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_vala_assert (_tmp14_, "added");
#line 206 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_data_collection_unref0 (collection);
#line 206 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				_g_object_unref0 (_collection_it);
#line 206 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				return;
#line 1759 "ContainerSourceCollection.c"
			}
#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_data_collection_unref0 (collection);
#line 1763 "ContainerSourceCollection.c"
		}
#line 201 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_g_object_unref0 (_collection_it);
#line 1767 "ContainerSourceCollection.c"
	}
#line 210 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_tmp15_ = data_collection_mark (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection), G_TYPE_CHECK_INSTANCE_CAST (container, TYPE_DATA_OBJECT, DataObject));
#line 210 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_tmp16_ = _tmp15_;
#line 210 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	source_collection_destroy_marked (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_SOURCE_COLLECTION, SourceCollection), _tmp16_, TRUE, NULL, NULL, NULL);
#line 210 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_g_object_unref0 (_tmp16_);
#line 1777 "ContainerSourceCollection.c"
}


static void
_container_source_collection_on_contained_sources_unlinking_source_collection_items_unlinking (SourceCollection* _sender,
                                                                                               GeeCollection* unlinking,
                                                                                               gpointer self)
{
#line 221 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	container_source_collection_on_contained_sources_unlinking ((ContainerSourceCollection*) self, unlinking);
#line 1788 "ContainerSourceCollection.c"
}


static void
_container_source_collection_on_contained_sources_relinked_source_collection_items_relinked (SourceCollection* _sender,
                                                                                             GeeCollection* relinked,
                                                                                             gpointer self)
{
#line 222 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	container_source_collection_on_contained_sources_relinked ((ContainerSourceCollection*) self, relinked);
#line 1799 "ContainerSourceCollection.c"
}


static void
_container_source_collection_on_contained_source_destroyed_source_collection_item_destroyed (SourceCollection* _sender,
                                                                                             DataSource* source,
                                                                                             gpointer self)
{
#line 223 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	container_source_collection_on_contained_source_destroyed ((ContainerSourceCollection*) self, source);
#line 1810 "ContainerSourceCollection.c"
}


static void
_container_source_collection_on_contained_source_destroyed_source_collection_unlinked_destroyed (SourceCollection* _sender,
                                                                                                 DataSource* source,
                                                                                                 gpointer self)
{
#line 224 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	container_source_collection_on_contained_source_destroyed ((ContainerSourceCollection*) self, source);
#line 1821 "ContainerSourceCollection.c"
}


void
container_source_collection_attach_collection (ContainerSourceCollection* self,
                                               SourceCollection* collection)
{
	GeeHashSet* _tmp0_;
	GeeHashSet* _tmp5_;
#line 213 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self));
#line 213 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_SOURCE_COLLECTION (collection));
#line 214 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_tmp0_ = self->priv->attached_collections;
#line 214 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	if (gee_abstract_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), collection)) {
#line 1839 "ContainerSourceCollection.c"
		gchar* _tmp1_;
		gchar* _tmp2_;
		gchar* _tmp3_;
		gchar* _tmp4_;
#line 215 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp1_ = data_collection_to_string (G_TYPE_CHECK_INSTANCE_CAST (collection, TYPE_DATA_COLLECTION, DataCollection));
#line 215 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp2_ = _tmp1_;
#line 215 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp3_ = data_collection_to_string (G_TYPE_CHECK_INSTANCE_CAST (self, TYPE_DATA_COLLECTION, DataCollection));
#line 215 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp4_ = _tmp3_;
#line 215 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		g_warning ("ContainerSourceCollection.vala:215: attempted to multiple-attach '%s' " \
"to '%s'", _tmp2_, _tmp4_);
#line 215 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_g_free0 (_tmp4_);
#line 215 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_g_free0 (_tmp2_);
#line 216 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		return;
#line 1860 "ContainerSourceCollection.c"
	}
#line 219 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_tmp5_ = self->priv->attached_collections;
#line 219 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), collection);
#line 221 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_signal_connect (collection, "items-unlinking", (GCallback) _container_source_collection_on_contained_sources_unlinking_source_collection_items_unlinking, self);
#line 222 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_signal_connect (collection, "items-relinked", (GCallback) _container_source_collection_on_contained_sources_relinked_source_collection_items_relinked, self);
#line 223 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_signal_connect (collection, "item-destroyed", (GCallback) _container_source_collection_on_contained_source_destroyed_source_collection_item_destroyed, self);
#line 224 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_signal_connect (collection, "unlinked-destroyed", (GCallback) _container_source_collection_on_contained_source_destroyed_source_collection_unlinked_destroyed, self);
#line 1874 "ContainerSourceCollection.c"
}


void
container_source_collection_detach_all_collections (ContainerSourceCollection* self)
{
	GeeHashSet* _tmp13_;
#line 227 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE_COLLECTION (self));
#line 1884 "ContainerSourceCollection.c"
	{
		GeeIterator* _collection_it = NULL;
		GeeHashSet* _tmp0_;
		GeeIterator* _tmp1_;
#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp0_ = self->priv->attached_collections;
#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_tmp1_ = gee_abstract_collection_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_collection_it = _tmp1_;
#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		while (TRUE) {
#line 1897 "ContainerSourceCollection.c"
			GeeIterator* _tmp2_;
			SourceCollection* collection = NULL;
			GeeIterator* _tmp3_;
			gpointer _tmp4_;
			SourceCollection* _tmp5_;
			guint _tmp6_;
			SourceCollection* _tmp7_;
			guint _tmp8_;
			SourceCollection* _tmp9_;
			guint _tmp10_;
			SourceCollection* _tmp11_;
			guint _tmp12_;
#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp2_ = _collection_it;
#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			if (!gee_iterator_next (_tmp2_)) {
#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
				break;
#line 1916 "ContainerSourceCollection.c"
			}
#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp3_ = _collection_it;
#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp4_ = gee_iterator_get (_tmp3_);
#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			collection = (SourceCollection*) _tmp4_;
#line 229 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp5_ = collection;
#line 229 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			g_signal_parse_name ("items-unlinking", TYPE_SOURCE_COLLECTION, &_tmp6_, NULL, FALSE);
#line 229 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			g_signal_handlers_disconnect_matched (_tmp5_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp6_, 0, NULL, (GCallback) _container_source_collection_on_contained_sources_unlinking_source_collection_items_unlinking, self);
#line 230 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp7_ = collection;
#line 230 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			g_signal_parse_name ("items-relinked", TYPE_SOURCE_COLLECTION, &_tmp8_, NULL, FALSE);
#line 230 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			g_signal_handlers_disconnect_matched (_tmp7_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp8_, 0, NULL, (GCallback) _container_source_collection_on_contained_sources_relinked_source_collection_items_relinked, self);
#line 231 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp9_ = collection;
#line 231 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp10_, NULL, FALSE);
#line 231 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			g_signal_handlers_disconnect_matched (_tmp9_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp10_, 0, NULL, (GCallback) _container_source_collection_on_contained_source_destroyed_source_collection_item_destroyed, self);
#line 232 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_tmp11_ = collection;
#line 232 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			g_signal_parse_name ("unlinked-destroyed", TYPE_SOURCE_COLLECTION, &_tmp12_, NULL, FALSE);
#line 232 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			g_signal_handlers_disconnect_matched (_tmp11_, G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp12_, 0, NULL, (GCallback) _container_source_collection_on_contained_source_destroyed_source_collection_unlinked_destroyed, self);
#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
			_data_collection_unref0 (collection);
#line 1950 "ContainerSourceCollection.c"
		}
#line 228 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		_g_object_unref0 (_collection_it);
#line 1954 "ContainerSourceCollection.c"
	}
#line 235 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_tmp13_ = self->priv->attached_collections;
#line 235 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	gee_abstract_collection_clear (G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection));
#line 1960 "ContainerSourceCollection.c"
}


static void
container_source_collection_real_container_contents_added (ContainerSourceCollection* self,
                                                           ContainerSource* container,
                                                           GeeCollection* added,
                                                           gboolean relinked)
{
#line 20 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE (container));
#line 20 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (GEE_IS_COLLECTION (added));
#line 1974 "ContainerSourceCollection.c"
}


static void
g_cclosure_user_marshal_VOID__OBJECT_OBJECT_BOOLEAN (GClosure * closure,
                                                     GValue * return_value,
                                                     guint n_param_values,
                                                     const GValue * param_values,
                                                     gpointer invocation_hint,
                                                     gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT_BOOLEAN) (gpointer data1, gpointer arg_1, gpointer arg_2, gboolean arg_3, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_OBJECT_BOOLEAN callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (n_param_values == 4);
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		data1 = closure->data;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		data2 = param_values->data[0].v_pointer;
#line 2000 "ContainerSourceCollection.c"
	} else {
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		data1 = param_values->data[0].v_pointer;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		data2 = closure->data;
#line 2006 "ContainerSourceCollection.c"
	}
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	callback = (GMarshalFunc_VOID__OBJECT_OBJECT_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), g_value_get_boolean (param_values + 3), data2);
#line 2012 "ContainerSourceCollection.c"
}


static void
container_source_collection_real_container_contents_removed (ContainerSourceCollection* self,
                                                             ContainerSource* container,
                                                             GeeCollection* removed,
                                                             gboolean unlinked)
{
#line 24 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE (container));
#line 24 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (GEE_IS_COLLECTION (removed));
#line 2026 "ContainerSourceCollection.c"
}


static void
container_source_collection_real_container_contents_altered (ContainerSourceCollection* self,
                                                             ContainerSource* container,
                                                             GeeCollection* added,
                                                             gboolean relinked,
                                                             GeeCollection* removed,
                                                             gboolean unlinked)
{
#line 28 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE (container));
#line 28 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail ((added == NULL) || GEE_IS_COLLECTION (added));
#line 28 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail ((removed == NULL) || GEE_IS_COLLECTION (removed));
#line 2044 "ContainerSourceCollection.c"
}


static void
g_cclosure_user_marshal_VOID__OBJECT_OBJECT_BOOLEAN_OBJECT_BOOLEAN (GClosure * closure,
                                                                    GValue * return_value,
                                                                    guint n_param_values,
                                                                    const GValue * param_values,
                                                                    gpointer invocation_hint,
                                                                    gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT_BOOLEAN_OBJECT_BOOLEAN) (gpointer data1, gpointer arg_1, gpointer arg_2, gboolean arg_3, gpointer arg_4, gboolean arg_5, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_OBJECT_BOOLEAN_OBJECT_BOOLEAN callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (n_param_values == 6);
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		data1 = closure->data;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		data2 = param_values->data[0].v_pointer;
#line 2070 "ContainerSourceCollection.c"
	} else {
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		data1 = param_values->data[0].v_pointer;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		data2 = closure->data;
#line 2076 "ContainerSourceCollection.c"
	}
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	callback = (GMarshalFunc_VOID__OBJECT_OBJECT_BOOLEAN_OBJECT_BOOLEAN) (marshal_data ? marshal_data : cc->callback);
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), g_value_get_boolean (param_values + 3), g_value_get_object (param_values + 4), g_value_get_boolean (param_values + 5), data2);
#line 2082 "ContainerSourceCollection.c"
}


static void
container_source_collection_real_backlink_to_container_removed (ContainerSourceCollection* self,
                                                                ContainerSource* container,
                                                                GeeCollection* sources)
{
#line 34 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (IS_CONTAINER_SOURCE (container));
#line 34 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (GEE_IS_COLLECTION (sources));
#line 2095 "ContainerSourceCollection.c"
}


static void
g_cclosure_user_marshal_VOID__OBJECT_OBJECT (GClosure * closure,
                                             GValue * return_value,
                                             guint n_param_values,
                                             const GValue * param_values,
                                             gpointer invocation_hint,
                                             gpointer marshal_data)
{
	typedef void (*GMarshalFunc_VOID__OBJECT_OBJECT) (gpointer data1, gpointer arg_1, gpointer arg_2, gpointer data2);
	register GMarshalFunc_VOID__OBJECT_OBJECT callback;
	register GCClosure * cc;
	register gpointer data1;
	register gpointer data2;
	cc = (GCClosure *) closure;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_return_if_fail (n_param_values == 3);
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	if (G_CCLOSURE_SWAP_DATA (closure)) {
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		data1 = closure->data;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		data2 = param_values->data[0].v_pointer;
#line 2121 "ContainerSourceCollection.c"
	} else {
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		data1 = param_values->data[0].v_pointer;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
		data2 = closure->data;
#line 2127 "ContainerSourceCollection.c"
	}
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	callback = (GMarshalFunc_VOID__OBJECT_OBJECT) (marshal_data ? marshal_data : cc->callback);
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	callback (data1, g_value_get_object (param_values + 1), g_value_get_object (param_values + 2), data2);
#line 2133 "ContainerSourceCollection.c"
}


static void
container_source_collection_class_init (ContainerSourceCollectionClass * klass)
{
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	container_source_collection_parent_class = g_type_class_peek_parent (klass);
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	((DataCollectionClass *) klass)->finalize = container_source_collection_finalize;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	g_type_class_add_private (klass, sizeof (ContainerSourceCollectionPrivate));
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	((SourceCollectionClass *) klass)->notify_backlink_removed = (void (*) (SourceCollection *, SourceBacklink*, GeeCollection*)) container_source_collection_real_notify_backlink_removed;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	((ContainerSourceCollectionClass *) klass)->notify_container_contents_added = (void (*) (ContainerSourceCollection *, ContainerSource*, GeeCollection*, gboolean)) container_source_collection_real_notify_container_contents_added;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	((ContainerSourceCollectionClass *) klass)->notify_container_contents_removed = (void (*) (ContainerSourceCollection *, ContainerSource*, GeeCollection*, gboolean)) container_source_collection_real_notify_container_contents_removed;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	((ContainerSourceCollectionClass *) klass)->notify_container_contents_altered = (void (*) (ContainerSourceCollection *, ContainerSource*, GeeCollection*, gboolean, GeeCollection*, gboolean)) container_source_collection_real_notify_container_contents_altered;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	((ContainerSourceCollectionClass *) klass)->notify_backlink_to_container_removed = (void (*) (ContainerSourceCollection *, ContainerSource*, GeeCollection*)) container_source_collection_real_notify_backlink_to_container_removed;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	((ContainerSourceCollectionClass *) klass)->get_containers_holding_source = (GeeCollection* (*) (ContainerSourceCollection *, DataSource*)) container_source_collection_real_get_containers_holding_source;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	((ContainerSourceCollectionClass *) klass)->convert_backlink_to_container = (ContainerSource* (*) (ContainerSourceCollection *, SourceBacklink*)) container_source_collection_real_convert_backlink_to_container;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	((SourceCollectionClass *) klass)->notify_item_destroyed = (void (*) (SourceCollection *, DataSource*)) container_source_collection_real_notify_item_destroyed;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	((ContainerSourceCollectionClass *) klass)->container_contents_added = container_source_collection_real_container_contents_added;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	((ContainerSourceCollectionClass *) klass)->container_contents_removed = container_source_collection_real_container_contents_removed;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	((ContainerSourceCollectionClass *) klass)->container_contents_altered = container_source_collection_real_container_contents_altered;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	((ContainerSourceCollectionClass *) klass)->backlink_to_container_removed = container_source_collection_real_backlink_to_container_removed;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	container_source_collection_signals[CONTAINER_SOURCE_COLLECTION_CONTAINER_CONTENTS_ADDED_SIGNAL] = g_signal_new ("container-contents-added", TYPE_CONTAINER_SOURCE_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ContainerSourceCollectionClass, container_contents_added), NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT_BOOLEAN, G_TYPE_NONE, 3, TYPE_CONTAINER_SOURCE, GEE_TYPE_COLLECTION, G_TYPE_BOOLEAN);
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	container_source_collection_signals[CONTAINER_SOURCE_COLLECTION_CONTAINER_CONTENTS_REMOVED_SIGNAL] = g_signal_new ("container-contents-removed", TYPE_CONTAINER_SOURCE_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ContainerSourceCollectionClass, container_contents_removed), NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT_BOOLEAN, G_TYPE_NONE, 3, TYPE_CONTAINER_SOURCE, GEE_TYPE_COLLECTION, G_TYPE_BOOLEAN);
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	container_source_collection_signals[CONTAINER_SOURCE_COLLECTION_CONTAINER_CONTENTS_ALTERED_SIGNAL] = g_signal_new ("container-contents-altered", TYPE_CONTAINER_SOURCE_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ContainerSourceCollectionClass, container_contents_altered), NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT_BOOLEAN_OBJECT_BOOLEAN, G_TYPE_NONE, 5, TYPE_CONTAINER_SOURCE, GEE_TYPE_COLLECTION, G_TYPE_BOOLEAN, GEE_TYPE_COLLECTION, G_TYPE_BOOLEAN);
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	container_source_collection_signals[CONTAINER_SOURCE_COLLECTION_BACKLINK_TO_CONTAINER_REMOVED_SIGNAL] = g_signal_new ("backlink-to-container-removed", TYPE_CONTAINER_SOURCE_COLLECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ContainerSourceCollectionClass, backlink_to_container_removed), NULL, NULL, g_cclosure_user_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, TYPE_CONTAINER_SOURCE, GEE_TYPE_COLLECTION);
#line 2178 "ContainerSourceCollection.c"
}


static void
container_source_collection_instance_init (ContainerSourceCollection * self)
{
	GeeHashSet* _tmp0_;
	GeeHashSet* _tmp1_;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	self->priv = CONTAINER_SOURCE_COLLECTION_GET_PRIVATE (self);
#line 16 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_tmp0_ = gee_hash_set_new (TYPE_SOURCE_COLLECTION, (GBoxedCopyFunc) data_collection_ref, (GDestroyNotify) data_collection_unref, NULL, NULL, NULL, NULL, NULL, NULL);
#line 16 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	self->priv->attached_collections = _tmp0_;
#line 18 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_tmp1_ = gee_hash_set_new (TYPE_CONTAINER_SOURCE, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL);
#line 18 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	self->priv->holding_tank = _tmp1_;
#line 2197 "ContainerSourceCollection.c"
}


static void
container_source_collection_finalize (DataCollection * obj)
{
	ContainerSourceCollection * self;
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_CONTAINER_SOURCE_COLLECTION, ContainerSourceCollection);
#line 46 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	container_source_collection_detach_all_collections (self);
#line 16 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_g_object_unref0 (self->priv->attached_collections);
#line 17 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_g_free0 (self->priv->backlink_name);
#line 18 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	_g_object_unref0 (self->priv->holding_tank);
#line 15 "/home/jens/Source/shotwell/src/core/ContainerSourceCollection.vala"
	DATA_COLLECTION_CLASS (container_source_collection_parent_class)->finalize (obj);
#line 2217 "ContainerSourceCollection.c"
}


GType
container_source_collection_get_type (void)
{
	static volatile gsize container_source_collection_type_id__volatile = 0;
	if (g_once_init_enter (&container_source_collection_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (ContainerSourceCollectionClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) container_source_collection_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (ContainerSourceCollection), 0, (GInstanceInitFunc) container_source_collection_instance_init, NULL };
		GType container_source_collection_type_id;
		container_source_collection_type_id = g_type_register_static (TYPE_DATABASE_SOURCE_COLLECTION, "ContainerSourceCollection", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&container_source_collection_type_id__volatile, container_source_collection_type_id);
	}
	return container_source_collection_type_id__volatile;
}