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
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
|
/* MediaMonitor.c generated by valac 0.32.1, the Vala compiler
* generated from MediaMonitor.vala, do not modify */
/* Copyright 2016 Software Freedom Conservancy Inc.
*
* This software is licensed under the GNU Lesser General Public License
* (version 2.1 or later). See the COPYING file in this distribution.
*/
#include <glib.h>
#include <glib-object.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <glib/gi18n-lib.h>
#include <float.h>
#include <math.h>
#include <gobject/gvaluecollector.h>
#define TYPE_MONITORABLE_UPDATES (monitorable_updates_get_type ())
#define MONITORABLE_UPDATES(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MONITORABLE_UPDATES, MonitorableUpdates))
#define MONITORABLE_UPDATES_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MONITORABLE_UPDATES, MonitorableUpdatesClass))
#define IS_MONITORABLE_UPDATES(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MONITORABLE_UPDATES))
#define IS_MONITORABLE_UPDATES_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MONITORABLE_UPDATES))
#define MONITORABLE_UPDATES_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MONITORABLE_UPDATES, MonitorableUpdatesClass))
typedef struct _MonitorableUpdates MonitorableUpdates;
typedef struct _MonitorableUpdatesClass MonitorableUpdatesClass;
typedef struct _MonitorableUpdatesPrivate MonitorableUpdatesPrivate;
#define TYPE_DATA_OBJECT (data_object_get_type ())
#define DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_OBJECT, DataObject))
#define DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_OBJECT, DataObjectClass))
#define IS_DATA_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_OBJECT))
#define IS_DATA_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_OBJECT))
#define DATA_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_OBJECT, DataObjectClass))
typedef struct _DataObject DataObject;
typedef struct _DataObjectClass DataObjectClass;
#define TYPE_DATA_SOURCE (data_source_get_type ())
#define DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_SOURCE, DataSource))
#define DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_SOURCE, DataSourceClass))
#define IS_DATA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_SOURCE))
#define IS_DATA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_SOURCE))
#define DATA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_SOURCE, DataSourceClass))
typedef struct _DataSource DataSource;
typedef struct _DataSourceClass DataSourceClass;
#define TYPE_THUMBNAIL_SOURCE (thumbnail_source_get_type ())
#define THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSource))
#define THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass))
#define IS_THUMBNAIL_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_THUMBNAIL_SOURCE))
#define IS_THUMBNAIL_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_THUMBNAIL_SOURCE))
#define THUMBNAIL_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_THUMBNAIL_SOURCE, ThumbnailSourceClass))
typedef struct _ThumbnailSource ThumbnailSource;
typedef struct _ThumbnailSourceClass ThumbnailSourceClass;
#define TYPE_MEDIA_SOURCE (media_source_get_type ())
#define MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE, MediaSource))
#define MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE, MediaSourceClass))
#define IS_MEDIA_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE))
#define IS_MEDIA_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE))
#define MEDIA_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE, MediaSourceClass))
typedef struct _MediaSource MediaSource;
typedef struct _MediaSourceClass MediaSourceClass;
#define TYPE_MONITORABLE (monitorable_get_type ())
#define MONITORABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MONITORABLE, Monitorable))
#define IS_MONITORABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MONITORABLE))
#define MONITORABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_MONITORABLE, MonitorableIface))
typedef struct _Monitorable Monitorable;
typedef struct _MonitorableIface MonitorableIface;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _ParamSpecMonitorableUpdates ParamSpecMonitorableUpdates;
#define TYPE_MEDIA_MONITOR (media_monitor_get_type ())
#define MEDIA_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_MONITOR, MediaMonitor))
#define MEDIA_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_MONITOR, MediaMonitorClass))
#define IS_MEDIA_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_MONITOR))
#define IS_MEDIA_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_MONITOR))
#define MEDIA_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_MONITOR, MediaMonitorClass))
typedef struct _MediaMonitor MediaMonitor;
typedef struct _MediaMonitorClass MediaMonitorClass;
typedef struct _MediaMonitorPrivate MediaMonitorPrivate;
#define TYPE_DATA_COLLECTION (data_collection_get_type ())
#define DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATA_COLLECTION, DataCollection))
#define DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATA_COLLECTION, DataCollectionClass))
#define IS_DATA_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATA_COLLECTION))
#define IS_DATA_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATA_COLLECTION))
#define DATA_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATA_COLLECTION, DataCollectionClass))
typedef struct _DataCollection DataCollection;
typedef struct _DataCollectionClass DataCollectionClass;
#define TYPE_SOURCE_COLLECTION (source_collection_get_type ())
#define SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_SOURCE_COLLECTION, SourceCollection))
#define SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_SOURCE_COLLECTION, SourceCollectionClass))
#define IS_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_SOURCE_COLLECTION))
#define IS_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_SOURCE_COLLECTION))
#define SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_SOURCE_COLLECTION, SourceCollectionClass))
typedef struct _SourceCollection SourceCollection;
typedef struct _SourceCollectionClass SourceCollectionClass;
#define TYPE_DATABASE_SOURCE_COLLECTION (database_source_collection_get_type ())
#define DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollection))
#define DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass))
#define IS_DATABASE_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATABASE_SOURCE_COLLECTION))
#define IS_DATABASE_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_DATABASE_SOURCE_COLLECTION))
#define DATABASE_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_DATABASE_SOURCE_COLLECTION, DatabaseSourceCollectionClass))
typedef struct _DatabaseSourceCollection DatabaseSourceCollection;
typedef struct _DatabaseSourceCollectionClass DatabaseSourceCollectionClass;
#define TYPE_MEDIA_SOURCE_COLLECTION (media_source_collection_get_type ())
#define MEDIA_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollection))
#define MEDIA_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollectionClass))
#define IS_MEDIA_SOURCE_COLLECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_MEDIA_SOURCE_COLLECTION))
#define IS_MEDIA_SOURCE_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_MEDIA_SOURCE_COLLECTION))
#define MEDIA_SOURCE_COLLECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_MEDIA_SOURCE_COLLECTION, MediaSourceCollectionClass))
typedef struct _MediaSourceCollection MediaSourceCollection;
typedef struct _MediaSourceCollectionClass MediaSourceCollectionClass;
#define MEDIA_MONITOR_TYPE_DISCOVERED_FILE (media_monitor_discovered_file_get_type ())
#define TYPE_TRANSACTION_CONTROLLER (transaction_controller_get_type ())
#define TRANSACTION_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_TRANSACTION_CONTROLLER, TransactionController))
#define TRANSACTION_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_TRANSACTION_CONTROLLER, TransactionControllerClass))
#define IS_TRANSACTION_CONTROLLER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_TRANSACTION_CONTROLLER))
#define IS_TRANSACTION_CONTROLLER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_TRANSACTION_CONTROLLER))
#define TRANSACTION_CONTROLLER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_TRANSACTION_CONTROLLER, TransactionControllerClass))
typedef struct _TransactionController TransactionController;
typedef struct _TransactionControllerClass TransactionControllerClass;
#define _data_collection_unref0(var) ((var == NULL) ? NULL : (var = (data_collection_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _monitorable_updates_unref0(var) ((var == NULL) ? NULL : (var = (monitorable_updates_unref (var), NULL)))
#define TYPE_PHOTO_SOURCE (photo_source_get_type ())
#define PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO_SOURCE, PhotoSource))
#define PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO_SOURCE, PhotoSourceClass))
#define IS_PHOTO_SOURCE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO_SOURCE))
#define IS_PHOTO_SOURCE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO_SOURCE))
#define PHOTO_SOURCE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO_SOURCE, PhotoSourceClass))
typedef struct _PhotoSource PhotoSource;
typedef struct _PhotoSourceClass PhotoSourceClass;
#define TYPE_PHOTO (photo_get_type ())
#define PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PHOTO, Photo))
#define PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PHOTO, PhotoClass))
#define IS_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PHOTO))
#define IS_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_PHOTO))
#define PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_PHOTO, PhotoClass))
typedef struct _Photo Photo;
typedef struct _PhotoClass PhotoClass;
#define TYPE_LIBRARY_PHOTO (library_photo_get_type ())
#define LIBRARY_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LIBRARY_PHOTO, LibraryPhoto))
#define LIBRARY_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LIBRARY_PHOTO, LibraryPhotoClass))
#define IS_LIBRARY_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LIBRARY_PHOTO))
#define IS_LIBRARY_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LIBRARY_PHOTO))
#define LIBRARY_PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LIBRARY_PHOTO, LibraryPhotoClass))
typedef struct _LibraryPhoto LibraryPhoto;
typedef struct _LibraryPhotoClass LibraryPhotoClass;
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
#define _transaction_controller_unref0(var) ((var == NULL) ? NULL : (var = (transaction_controller_unref (var), NULL)))
#define _g_timer_destroy0(var) ((var == NULL) ? NULL : (var = (g_timer_destroy (var), NULL)))
struct _MonitorableIface {
GTypeInterface parent_iface;
gboolean (*is_offline) (Monitorable* self);
void (*mark_online) (Monitorable* self);
void (*mark_offline) (Monitorable* self);
void (*set_master_file) (Monitorable* self, GFile* file);
void (*set_master_timestamp) (Monitorable* self, GFileInfo* info);
};
struct _MonitorableUpdates {
GTypeInstance parent_instance;
volatile int ref_count;
MonitorableUpdatesPrivate * priv;
Monitorable* monitorable;
};
struct _MonitorableUpdatesClass {
GTypeClass parent_class;
void (*finalize) (MonitorableUpdates *self);
gboolean (*is_in_alteration) (MonitorableUpdates* self);
void (*set_master_file) (MonitorableUpdates* self, GFile* file);
void (*set_master_file_info_altered) (MonitorableUpdates* self, gboolean altered);
void (*set_master_file_info) (MonitorableUpdates* self, GFileInfo* info);
void (*set_master_in_alteration) (MonitorableUpdates* self, gboolean in_alteration);
void (*set_master_alterations_complete) (MonitorableUpdates* self, GFileInfo* info);
void (*mark_offline) (MonitorableUpdates* self);
void (*mark_online) (MonitorableUpdates* self);
void (*reset_online_offline) (MonitorableUpdates* self);
gboolean (*is_all_updated) (MonitorableUpdates* self);
};
struct _MonitorableUpdatesPrivate {
GFile* master_file;
gboolean master_file_info_altered;
GFileInfo* master_file_info;
gboolean master_in_alteration;
gboolean online;
gboolean offline;
};
struct _ParamSpecMonitorableUpdates {
GParamSpec parent_instance;
};
typedef enum {
MEDIA_MONITOR_DISCOVERED_FILE_REPRESENTED,
MEDIA_MONITOR_DISCOVERED_FILE_IGNORE,
MEDIA_MONITOR_DISCOVERED_FILE_UNKNOWN
} MediaMonitorDiscoveredFile;
struct _MediaMonitor {
GObject parent_instance;
MediaMonitorPrivate * priv;
};
struct _MediaMonitorClass {
GObjectClass parent_class;
MediaSourceCollection* (*get_media_source_collection) (MediaMonitor* self);
void (*close) (MediaMonitor* self);
gchar* (*to_string) (MediaMonitor* self);
MonitorableUpdates* (*create_updates) (MediaMonitor* self, Monitorable* monitorable);
void (*on_media_source_destroyed) (MediaMonitor* self, DataSource* source);
void (*notify_discovery_started) (MediaMonitor* self);
MediaMonitorDiscoveredFile (*notify_file_discovered) (MediaMonitor* self, GFile* file, GFileInfo* info, Monitorable** monitorable);
GeeCollection* (*candidates_for_unknown_file) (MediaMonitor* self, GFile* file, GFileInfo* info, MediaMonitorDiscoveredFile* _result_);
GFile** (*get_auxilliary_backing_files) (MediaMonitor* self, Monitorable* monitorable, int* result_length1);
void (*update_backing_file_info) (MediaMonitor* self, Monitorable* monitorable, GFile* file, GFileInfo* info);
void (*notify_discovery_completing) (MediaMonitor* self);
gboolean (*is_file_represented) (MediaMonitor* self, GFile* file);
gboolean (*notify_file_created) (MediaMonitor* self, GFile* file, GFileInfo* info);
gboolean (*notify_file_moved) (MediaMonitor* self, GFile* old_file, GFile* new_file, GFileInfo* new_file_info);
gboolean (*notify_file_altered) (MediaMonitor* self, GFile* file);
gboolean (*notify_file_attributes_altered) (MediaMonitor* self, GFile* file);
gboolean (*notify_file_alteration_completed) (MediaMonitor* self, GFile* file, GFileInfo* info);
gboolean (*notify_file_deleted) (MediaMonitor* self, GFile* file);
void (*process_updates) (MediaMonitor* self, GeeCollection* all_updates, TransactionController* controller, gint* op_count, GError** error);
};
struct _MediaMonitorPrivate {
MediaSourceCollection* sources;
GCancellable* cancellable;
GeeHashMap* pending_updates;
guint pending_updates_timer_id;
};
typedef enum {
DATABASE_ERROR_ERROR,
DATABASE_ERROR_BACKING,
DATABASE_ERROR_MEMORY,
DATABASE_ERROR_ABORT,
DATABASE_ERROR_LIMITS,
DATABASE_ERROR_TYPESPEC
} DatabaseError;
#define DATABASE_ERROR database_error_quark ()
static gpointer monitorable_updates_parent_class = NULL;
static gpointer media_monitor_parent_class = NULL;
gpointer monitorable_updates_ref (gpointer instance);
void monitorable_updates_unref (gpointer instance);
GParamSpec* param_spec_monitorable_updates (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_monitorable_updates (GValue* value, gpointer v_object);
void value_take_monitorable_updates (GValue* value, gpointer v_object);
gpointer value_get_monitorable_updates (const GValue* value);
GType monitorable_updates_get_type (void) G_GNUC_CONST;
GType data_object_get_type (void) G_GNUC_CONST;
GType data_source_get_type (void) G_GNUC_CONST;
GType thumbnail_source_get_type (void) G_GNUC_CONST;
GType media_source_get_type (void) G_GNUC_CONST;
GType monitorable_get_type (void) G_GNUC_CONST;
#define MONITORABLE_UPDATES_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_MONITORABLE_UPDATES, MonitorableUpdatesPrivate))
enum {
MONITORABLE_UPDATES_DUMMY_PROPERTY
};
MonitorableUpdates* monitorable_updates_new (Monitorable* monitorable);
MonitorableUpdates* monitorable_updates_construct (GType object_type, Monitorable* monitorable);
GFile* monitorable_updates_get_master_file (MonitorableUpdates* self);
GFileInfo* monitorable_updates_get_master_file_info (MonitorableUpdates* self);
gboolean monitorable_updates_is_in_alteration (MonitorableUpdates* self);
static gboolean monitorable_updates_real_is_in_alteration (MonitorableUpdates* self);
gboolean monitorable_updates_is_set_offline (MonitorableUpdates* self);
gboolean monitorable_updates_is_set_online (MonitorableUpdates* self);
void monitorable_updates_set_master_file (MonitorableUpdates* self, GFile* file);
static void monitorable_updates_real_set_master_file (MonitorableUpdates* self, GFile* file);
void monitorable_updates_mark_online (MonitorableUpdates* self);
void monitorable_updates_set_master_file_info_altered (MonitorableUpdates* self, gboolean altered);
static void monitorable_updates_real_set_master_file_info_altered (MonitorableUpdates* self, gboolean altered);
void monitorable_updates_set_master_file_info (MonitorableUpdates* self, GFileInfo* info);
static void monitorable_updates_real_set_master_file_info (MonitorableUpdates* self, GFileInfo* info);
void monitorable_updates_set_master_in_alteration (MonitorableUpdates* self, gboolean in_alteration);
static void monitorable_updates_real_set_master_in_alteration (MonitorableUpdates* self, gboolean in_alteration);
void monitorable_updates_set_master_alterations_complete (MonitorableUpdates* self, GFileInfo* info);
static void monitorable_updates_real_set_master_alterations_complete (MonitorableUpdates* self, GFileInfo* info);
void monitorable_updates_mark_offline (MonitorableUpdates* self);
static void monitorable_updates_real_mark_offline (MonitorableUpdates* self);
static void monitorable_updates_real_mark_online (MonitorableUpdates* self);
void monitorable_updates_reset_online_offline (MonitorableUpdates* self);
static void monitorable_updates_real_reset_online_offline (MonitorableUpdates* self);
gboolean monitorable_updates_is_all_updated (MonitorableUpdates* self);
static gboolean monitorable_updates_real_is_all_updated (MonitorableUpdates* self);
static void monitorable_updates_finalize (MonitorableUpdates* obj);
GType media_monitor_get_type (void) G_GNUC_CONST;
gpointer data_collection_ref (gpointer instance);
void data_collection_unref (gpointer instance);
GParamSpec* param_spec_data_collection (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_data_collection (GValue* value, gpointer v_object);
void value_take_data_collection (GValue* value, gpointer v_object);
gpointer value_get_data_collection (const GValue* value);
GType data_collection_get_type (void) G_GNUC_CONST;
GType source_collection_get_type (void) G_GNUC_CONST;
GType database_source_collection_get_type (void) G_GNUC_CONST;
GType media_source_collection_get_type (void) G_GNUC_CONST;
GType media_monitor_discovered_file_get_type (void) G_GNUC_CONST;
gpointer transaction_controller_ref (gpointer instance);
void transaction_controller_unref (gpointer instance);
GParamSpec* param_spec_transaction_controller (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_transaction_controller (GValue* value, gpointer v_object);
void value_take_transaction_controller (GValue* value, gpointer v_object);
gpointer value_get_transaction_controller (const GValue* value);
GType transaction_controller_get_type (void) G_GNUC_CONST;
#define MEDIA_MONITOR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_MEDIA_MONITOR, MediaMonitorPrivate))
enum {
MEDIA_MONITOR_DUMMY_PROPERTY
};
void media_monitor_on_media_source_destroyed (MediaMonitor* self, DataSource* source);
static void _media_monitor_on_media_source_destroyed_source_collection_item_destroyed (SourceCollection* _sender, DataSource* source, gpointer self);
static void _media_monitor_on_media_source_destroyed_source_collection_unlinked_destroyed (SourceCollection* _sender, DataSource* source, gpointer self);
#define MEDIA_MONITOR_MAX_OPERATIONS_PER_CYCLE 100
#define MEDIA_MONITOR_FLUSH_PENDING_UPDATES_MSEC 500
MediaMonitor* media_monitor_construct (GType object_type, MediaSourceCollection* sources, GCancellable* cancellable);
static gboolean media_monitor_on_flush_pending_updates (MediaMonitor* self);
static gboolean _media_monitor_on_flush_pending_updates_gsource_func (gpointer self);
MediaSourceCollection* media_monitor_get_media_source_collection (MediaMonitor* self);
static MediaSourceCollection* media_monitor_real_get_media_source_collection (MediaMonitor* self);
void media_monitor_close (MediaMonitor* self);
static void media_monitor_real_close (MediaMonitor* self);
gchar* media_monitor_to_string (MediaMonitor* self);
static gchar* media_monitor_real_to_string (MediaMonitor* self);
gchar* data_collection_to_string (DataCollection* self);
MonitorableUpdates* media_monitor_create_updates (MediaMonitor* self, Monitorable* monitorable);
static MonitorableUpdates* media_monitor_real_create_updates (MediaMonitor* self, Monitorable* monitorable);
static void media_monitor_real_on_media_source_destroyed (MediaMonitor* self, DataSource* source);
void media_monitor_remove_updates (MediaMonitor* self, Monitorable* monitorable);
void media_monitor_notify_discovery_started (MediaMonitor* self);
static void media_monitor_real_notify_discovery_started (MediaMonitor* self);
MediaMonitorDiscoveredFile media_monitor_notify_file_discovered (MediaMonitor* self, GFile* file, GFileInfo* info, Monitorable** monitorable);
static MediaMonitorDiscoveredFile media_monitor_real_notify_file_discovered (MediaMonitor* self, GFile* file, GFileInfo* info, Monitorable** monitorable);
GeeCollection* media_monitor_candidates_for_unknown_file (MediaMonitor* self, GFile* file, GFileInfo* info, MediaMonitorDiscoveredFile* _result_);
static GeeCollection* media_monitor_real_candidates_for_unknown_file (MediaMonitor* self, GFile* file, GFileInfo* info, MediaMonitorDiscoveredFile* _result_);
GFile** media_monitor_get_auxilliary_backing_files (MediaMonitor* self, Monitorable* monitorable, int* result_length1);
static GFile** media_monitor_real_get_auxilliary_backing_files (MediaMonitor* self, Monitorable* monitorable, int* result_length1);
void media_monitor_update_backing_file_info (MediaMonitor* self, Monitorable* monitorable, GFile* file, GFileInfo* info);
static void media_monitor_real_update_backing_file_info (MediaMonitor* self, Monitorable* monitorable, GFile* file, GFileInfo* info);
void media_monitor_notify_discovery_completing (MediaMonitor* self);
static void media_monitor_real_notify_discovery_completing (MediaMonitor* self);
gboolean media_monitor_is_file_represented (MediaMonitor* self, GFile* file);
static gboolean media_monitor_real_is_file_represented (MediaMonitor* self, GFile* file);
gboolean media_monitor_notify_file_created (MediaMonitor* self, GFile* file, GFileInfo* info);
static gboolean media_monitor_real_notify_file_created (MediaMonitor* self, GFile* file, GFileInfo* info);
gboolean media_monitor_notify_file_moved (MediaMonitor* self, GFile* old_file, GFile* new_file, GFileInfo* new_file_info);
static gboolean media_monitor_real_notify_file_moved (MediaMonitor* self, GFile* old_file, GFile* new_file, GFileInfo* new_file_info);
gboolean media_monitor_notify_file_altered (MediaMonitor* self, GFile* file);
static gboolean media_monitor_real_notify_file_altered (MediaMonitor* self, GFile* file);
gboolean media_monitor_notify_file_attributes_altered (MediaMonitor* self, GFile* file);
static gboolean media_monitor_real_notify_file_attributes_altered (MediaMonitor* self, GFile* file);
gboolean media_monitor_notify_file_alteration_completed (MediaMonitor* self, GFile* file, GFileInfo* info);
static gboolean media_monitor_real_notify_file_alteration_completed (MediaMonitor* self, GFile* file, GFileInfo* info);
gboolean media_monitor_notify_file_deleted (MediaMonitor* self, GFile* file);
static gboolean media_monitor_real_notify_file_deleted (MediaMonitor* self, GFile* file);
void media_monitor_mdbg (const gchar* msg);
gboolean media_monitor_has_pending_updates (MediaMonitor* self);
GeeCollection* media_monitor_get_monitorables (MediaMonitor* self);
MonitorableUpdates* media_monitor_fetch_updates (MediaMonitor* self, Monitorable* monitorable);
MonitorableUpdates* media_monitor_get_existing_updates (MediaMonitor* self, Monitorable* monitorable);
gboolean media_monitor_is_online (MediaMonitor* self, Monitorable* monitorable);
gboolean monitorable_is_offline (Monitorable* self);
gboolean media_monitor_is_offline (MediaMonitor* self, Monitorable* monitorable);
GFile* media_monitor_get_master_file (MediaMonitor* self, Monitorable* monitorable);
GFile* media_source_get_master_file (MediaSource* self);
void media_monitor_update_master_file (MediaMonitor* self, Monitorable* monitorable, GFile* file);
void media_monitor_update_master_file_info_altered (MediaMonitor* self, Monitorable* monitorable);
void media_monitor_update_master_file_in_alteration (MediaMonitor* self, Monitorable* monitorable, gboolean in_alteration);
void media_monitor_update_master_file_alterations_completed (MediaMonitor* self, Monitorable* monitorable, GFileInfo* info);
void media_monitor_update_online (MediaMonitor* self, Monitorable* monitorable);
void media_monitor_update_offline (MediaMonitor* self, Monitorable* monitorable);
void media_monitor_process_updates (MediaMonitor* self, GeeCollection* all_updates, TransactionController* controller, gint* op_count, GError** error);
static void media_monitor_real_process_updates (MediaMonitor* self, GeeCollection* all_updates, TransactionController* controller, gint* op_count, GError** error);
GType photo_source_get_type (void) G_GNUC_CONST;
GType photo_get_type (void) G_GNUC_CONST;
GType library_photo_get_type (void) G_GNUC_CONST;
void monitorable_set_many_master_file (GeeMap* map, TransactionController* controller, GError** error);
void monitorable_set_many_master_timestamp (GeeMap* map, TransactionController* controller, GError** error);
void monitorable_mark_many_online_offline (GeeCollection* online, GeeCollection* offline, TransactionController* controller, GError** error);
TransactionController* media_source_collection_get_transaction_controller (MediaSourceCollection* self);
void transaction_controller_begin (TransactionController* self);
void transaction_controller_commit (TransactionController* self);
GQuark database_error_quark (void);
void app_window_database_error (GError* err);
void app_window_panic (const gchar* msg);
static void media_monitor_finalize (GObject* obj);
static gpointer _g_object_ref0 (gpointer self) {
#line 18 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return self ? g_object_ref (self) : NULL;
#line 428 "MediaMonitor.c"
}
MonitorableUpdates* monitorable_updates_construct (GType object_type, Monitorable* monitorable) {
MonitorableUpdates* self = NULL;
Monitorable* _tmp0_ = NULL;
Monitorable* _tmp1_ = NULL;
#line 17 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MONITORABLE (monitorable), NULL);
#line 17 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self = (MonitorableUpdates*) g_type_create_instance (object_type);
#line 18 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = monitorable;
#line 18 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = _g_object_ref0 (_tmp0_);
#line 18 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (self->monitorable);
#line 18 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->monitorable = _tmp1_;
#line 17 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return self;
#line 450 "MediaMonitor.c"
}
MonitorableUpdates* monitorable_updates_new (Monitorable* monitorable) {
#line 17 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return monitorable_updates_construct (TYPE_MONITORABLE_UPDATES, monitorable);
#line 457 "MediaMonitor.c"
}
GFile* monitorable_updates_get_master_file (MonitorableUpdates* self) {
GFile* result = NULL;
GFile* _tmp0_ = NULL;
GFile* _tmp1_ = NULL;
#line 21 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MONITORABLE_UPDATES (self), NULL);
#line 22 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = self->priv->master_file;
#line 22 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = _g_object_ref0 (_tmp0_);
#line 22 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
result = _tmp1_;
#line 22 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return result;
#line 475 "MediaMonitor.c"
}
GFileInfo* monitorable_updates_get_master_file_info (MonitorableUpdates* self) {
GFileInfo* result = NULL;
GFileInfo* _tmp0_ = NULL;
GFileInfo* _tmp1_ = NULL;
#line 25 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MONITORABLE_UPDATES (self), NULL);
#line 26 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = self->priv->master_file_info;
#line 26 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = _g_object_ref0 (_tmp0_);
#line 26 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
result = _tmp1_;
#line 26 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return result;
#line 493 "MediaMonitor.c"
}
static gboolean monitorable_updates_real_is_in_alteration (MonitorableUpdates* self) {
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
#line 30 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = self->priv->master_in_alteration;
#line 30 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
result = _tmp0_;
#line 30 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return result;
#line 506 "MediaMonitor.c"
}
gboolean monitorable_updates_is_in_alteration (MonitorableUpdates* self) {
#line 29 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MONITORABLE_UPDATES (self), FALSE);
#line 29 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return MONITORABLE_UPDATES_GET_CLASS (self)->is_in_alteration (self);
#line 515 "MediaMonitor.c"
}
gboolean monitorable_updates_is_set_offline (MonitorableUpdates* self) {
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
#line 33 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MONITORABLE_UPDATES (self), FALSE);
#line 34 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = self->priv->offline;
#line 34 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
result = _tmp0_;
#line 34 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return result;
#line 530 "MediaMonitor.c"
}
gboolean monitorable_updates_is_set_online (MonitorableUpdates* self) {
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
#line 37 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MONITORABLE_UPDATES (self), FALSE);
#line 38 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = self->priv->online;
#line 38 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
result = _tmp0_;
#line 38 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return result;
#line 545 "MediaMonitor.c"
}
static void monitorable_updates_real_set_master_file (MonitorableUpdates* self, GFile* file) {
GFile* _tmp0_ = NULL;
GFile* _tmp1_ = NULL;
GFile* _tmp2_ = NULL;
#line 41 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail ((file == NULL) || G_IS_FILE (file));
#line 42 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = file;
#line 42 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = _g_object_ref0 (_tmp0_);
#line 42 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (self->priv->master_file);
#line 42 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->master_file = _tmp1_;
#line 44 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = file;
#line 44 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp2_ != NULL) {
#line 45 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_updates_mark_online (self);
#line 569 "MediaMonitor.c"
}
}
void monitorable_updates_set_master_file (MonitorableUpdates* self, GFile* file) {
#line 41 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MONITORABLE_UPDATES (self));
#line 41 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
MONITORABLE_UPDATES_GET_CLASS (self)->set_master_file (self, file);
#line 579 "MediaMonitor.c"
}
static void monitorable_updates_real_set_master_file_info_altered (MonitorableUpdates* self, gboolean altered) {
gboolean _tmp0_ = FALSE;
gboolean _tmp1_ = FALSE;
#line 49 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = altered;
#line 49 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->master_file_info_altered = _tmp0_;
#line 51 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = altered;
#line 51 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp1_) {
#line 52 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_updates_mark_online (self);
#line 596 "MediaMonitor.c"
}
}
void monitorable_updates_set_master_file_info_altered (MonitorableUpdates* self, gboolean altered) {
#line 48 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MONITORABLE_UPDATES (self));
#line 48 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
MONITORABLE_UPDATES_GET_CLASS (self)->set_master_file_info_altered (self, altered);
#line 606 "MediaMonitor.c"
}
static void monitorable_updates_real_set_master_file_info (MonitorableUpdates* self, GFileInfo* info) {
GFileInfo* _tmp0_ = NULL;
GFileInfo* _tmp1_ = NULL;
GFileInfo* _tmp2_ = NULL;
#line 55 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail ((info == NULL) || G_IS_FILE_INFO (info));
#line 56 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = info;
#line 56 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = _g_object_ref0 (_tmp0_);
#line 56 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (self->priv->master_file_info);
#line 56 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->master_file_info = _tmp1_;
#line 58 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = self->priv->master_file_info;
#line 58 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp2_ == NULL) {
#line 59 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_updates_set_master_file_info_altered (self, FALSE);
#line 630 "MediaMonitor.c"
}
}
void monitorable_updates_set_master_file_info (MonitorableUpdates* self, GFileInfo* info) {
#line 55 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MONITORABLE_UPDATES (self));
#line 55 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
MONITORABLE_UPDATES_GET_CLASS (self)->set_master_file_info (self, info);
#line 640 "MediaMonitor.c"
}
static void monitorable_updates_real_set_master_in_alteration (MonitorableUpdates* self, gboolean in_alteration) {
gboolean _tmp0_ = FALSE;
#line 63 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = in_alteration;
#line 63 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->master_in_alteration = _tmp0_;
#line 650 "MediaMonitor.c"
}
void monitorable_updates_set_master_in_alteration (MonitorableUpdates* self, gboolean in_alteration) {
#line 62 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MONITORABLE_UPDATES (self));
#line 62 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
MONITORABLE_UPDATES_GET_CLASS (self)->set_master_in_alteration (self, in_alteration);
#line 659 "MediaMonitor.c"
}
static void monitorable_updates_real_set_master_alterations_complete (MonitorableUpdates* self, GFileInfo* info) {
GFileInfo* _tmp0_ = NULL;
#line 66 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (G_IS_FILE_INFO (info));
#line 67 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_updates_set_master_in_alteration (self, FALSE);
#line 68 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = info;
#line 68 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_updates_set_master_file_info (self, _tmp0_);
#line 69 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_updates_mark_online (self);
#line 675 "MediaMonitor.c"
}
void monitorable_updates_set_master_alterations_complete (MonitorableUpdates* self, GFileInfo* info) {
#line 66 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MONITORABLE_UPDATES (self));
#line 66 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
MONITORABLE_UPDATES_GET_CLASS (self)->set_master_alterations_complete (self, info);
#line 684 "MediaMonitor.c"
}
static void monitorable_updates_real_mark_offline (MonitorableUpdates* self) {
#line 73 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->online = FALSE;
#line 74 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->offline = TRUE;
#line 76 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->master_file_info_altered = FALSE;
#line 77 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (self->priv->master_file_info);
#line 77 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->master_file_info = NULL;
#line 78 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->master_in_alteration = FALSE;
#line 701 "MediaMonitor.c"
}
void monitorable_updates_mark_offline (MonitorableUpdates* self) {
#line 72 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MONITORABLE_UPDATES (self));
#line 72 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
MONITORABLE_UPDATES_GET_CLASS (self)->mark_offline (self);
#line 710 "MediaMonitor.c"
}
static void monitorable_updates_real_mark_online (MonitorableUpdates* self) {
#line 82 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->online = TRUE;
#line 83 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->offline = FALSE;
#line 719 "MediaMonitor.c"
}
void monitorable_updates_mark_online (MonitorableUpdates* self) {
#line 81 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MONITORABLE_UPDATES (self));
#line 81 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
MONITORABLE_UPDATES_GET_CLASS (self)->mark_online (self);
#line 728 "MediaMonitor.c"
}
static void monitorable_updates_real_reset_online_offline (MonitorableUpdates* self) {
#line 87 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->online = FALSE;
#line 88 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->offline = FALSE;
#line 737 "MediaMonitor.c"
}
void monitorable_updates_reset_online_offline (MonitorableUpdates* self) {
#line 86 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MONITORABLE_UPDATES (self));
#line 86 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
MONITORABLE_UPDATES_GET_CLASS (self)->reset_online_offline (self);
#line 746 "MediaMonitor.c"
}
static gboolean monitorable_updates_real_is_all_updated (MonitorableUpdates* self) {
gboolean result = FALSE;
gboolean _tmp0_ = FALSE;
gboolean _tmp1_ = FALSE;
gboolean _tmp2_ = FALSE;
gboolean _tmp3_ = FALSE;
gboolean _tmp4_ = FALSE;
GFile* _tmp5_ = NULL;
#line 92 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp5_ = self->priv->master_file;
#line 92 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp5_ == NULL) {
#line 762 "MediaMonitor.c"
gboolean _tmp6_ = FALSE;
#line 93 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp6_ = self->priv->master_file_info_altered;
#line 93 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp4_ = _tmp6_ == FALSE;
#line 768 "MediaMonitor.c"
} else {
#line 92 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp4_ = FALSE;
#line 772 "MediaMonitor.c"
}
#line 92 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp4_) {
#line 776 "MediaMonitor.c"
GFileInfo* _tmp7_ = NULL;
#line 94 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp7_ = self->priv->master_file_info;
#line 94 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp3_ = _tmp7_ == NULL;
#line 782 "MediaMonitor.c"
} else {
#line 92 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp3_ = FALSE;
#line 786 "MediaMonitor.c"
}
#line 92 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp3_) {
#line 790 "MediaMonitor.c"
gboolean _tmp8_ = FALSE;
#line 95 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp8_ = self->priv->master_in_alteration;
#line 95 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = _tmp8_ == FALSE;
#line 796 "MediaMonitor.c"
} else {
#line 92 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = FALSE;
#line 800 "MediaMonitor.c"
}
#line 92 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp2_) {
#line 804 "MediaMonitor.c"
gboolean _tmp9_ = FALSE;
#line 96 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp9_ = self->priv->online;
#line 96 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = _tmp9_ == FALSE;
#line 810 "MediaMonitor.c"
} else {
#line 92 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = FALSE;
#line 814 "MediaMonitor.c"
}
#line 92 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp1_) {
#line 818 "MediaMonitor.c"
gboolean _tmp10_ = FALSE;
#line 97 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp10_ = self->priv->offline;
#line 97 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = _tmp10_ == FALSE;
#line 824 "MediaMonitor.c"
} else {
#line 92 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = FALSE;
#line 828 "MediaMonitor.c"
}
#line 92 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
result = _tmp0_;
#line 92 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return result;
#line 834 "MediaMonitor.c"
}
gboolean monitorable_updates_is_all_updated (MonitorableUpdates* self) {
#line 91 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MONITORABLE_UPDATES (self), FALSE);
#line 91 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return MONITORABLE_UPDATES_GET_CLASS (self)->is_all_updated (self);
#line 843 "MediaMonitor.c"
}
static void value_monitorable_updates_init (GValue* value) {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
value->data[0].v_pointer = NULL;
#line 850 "MediaMonitor.c"
}
static void value_monitorable_updates_free_value (GValue* value) {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (value->data[0].v_pointer) {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_updates_unref (value->data[0].v_pointer);
#line 859 "MediaMonitor.c"
}
}
static void value_monitorable_updates_copy_value (const GValue* src_value, GValue* dest_value) {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (src_value->data[0].v_pointer) {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
dest_value->data[0].v_pointer = monitorable_updates_ref (src_value->data[0].v_pointer);
#line 869 "MediaMonitor.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
dest_value->data[0].v_pointer = NULL;
#line 873 "MediaMonitor.c"
}
}
static gpointer value_monitorable_updates_peek_pointer (const GValue* value) {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return value->data[0].v_pointer;
#line 881 "MediaMonitor.c"
}
static gchar* value_monitorable_updates_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (collect_values[0].v_pointer) {
#line 888 "MediaMonitor.c"
MonitorableUpdates* object;
object = collect_values[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (object->parent_instance.g_class == NULL) {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 895 "MediaMonitor.c"
} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return g_strconcat ("invalid object type `", g_type_name (G_TYPE_FROM_INSTANCE (object)), "' for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 899 "MediaMonitor.c"
}
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
value->data[0].v_pointer = monitorable_updates_ref (object);
#line 903 "MediaMonitor.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
value->data[0].v_pointer = NULL;
#line 907 "MediaMonitor.c"
}
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return NULL;
#line 911 "MediaMonitor.c"
}
static gchar* value_monitorable_updates_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
MonitorableUpdates** object_p;
object_p = collect_values[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (!object_p) {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 922 "MediaMonitor.c"
}
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (!value->data[0].v_pointer) {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
*object_p = NULL;
#line 928 "MediaMonitor.c"
} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
*object_p = value->data[0].v_pointer;
#line 932 "MediaMonitor.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
*object_p = monitorable_updates_ref (value->data[0].v_pointer);
#line 936 "MediaMonitor.c"
}
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return NULL;
#line 940 "MediaMonitor.c"
}
GParamSpec* param_spec_monitorable_updates (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
ParamSpecMonitorableUpdates* spec;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (g_type_is_a (object_type, TYPE_MONITORABLE_UPDATES), NULL);
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
G_PARAM_SPEC (spec)->value_type = object_type;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return G_PARAM_SPEC (spec);
#line 954 "MediaMonitor.c"
}
gpointer value_get_monitorable_updates (const GValue* value) {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_MONITORABLE_UPDATES), NULL);
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return value->data[0].v_pointer;
#line 963 "MediaMonitor.c"
}
void value_set_monitorable_updates (GValue* value, gpointer v_object) {
MonitorableUpdates* old;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_MONITORABLE_UPDATES));
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
old = value->data[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (v_object) {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_MONITORABLE_UPDATES));
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
value->data[0].v_pointer = v_object;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_updates_ref (value->data[0].v_pointer);
#line 983 "MediaMonitor.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
value->data[0].v_pointer = NULL;
#line 987 "MediaMonitor.c"
}
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (old) {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_updates_unref (old);
#line 993 "MediaMonitor.c"
}
}
void value_take_monitorable_updates (GValue* value, gpointer v_object) {
MonitorableUpdates* old;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_MONITORABLE_UPDATES));
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
old = value->data[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (v_object) {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_MONITORABLE_UPDATES));
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
value->data[0].v_pointer = v_object;
#line 1012 "MediaMonitor.c"
} else {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
value->data[0].v_pointer = NULL;
#line 1016 "MediaMonitor.c"
}
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (old) {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_updates_unref (old);
#line 1022 "MediaMonitor.c"
}
}
static void monitorable_updates_class_init (MonitorableUpdatesClass * klass) {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_updates_parent_class = g_type_class_peek_parent (klass);
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MonitorableUpdatesClass *) klass)->finalize = monitorable_updates_finalize;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_type_class_add_private (klass, sizeof (MonitorableUpdatesPrivate));
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MonitorableUpdatesClass *) klass)->is_in_alteration = monitorable_updates_real_is_in_alteration;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MonitorableUpdatesClass *) klass)->set_master_file = monitorable_updates_real_set_master_file;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MonitorableUpdatesClass *) klass)->set_master_file_info_altered = monitorable_updates_real_set_master_file_info_altered;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MonitorableUpdatesClass *) klass)->set_master_file_info = monitorable_updates_real_set_master_file_info;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MonitorableUpdatesClass *) klass)->set_master_in_alteration = monitorable_updates_real_set_master_in_alteration;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MonitorableUpdatesClass *) klass)->set_master_alterations_complete = monitorable_updates_real_set_master_alterations_complete;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MonitorableUpdatesClass *) klass)->mark_offline = monitorable_updates_real_mark_offline;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MonitorableUpdatesClass *) klass)->mark_online = monitorable_updates_real_mark_online;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MonitorableUpdatesClass *) klass)->reset_online_offline = monitorable_updates_real_reset_online_offline;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MonitorableUpdatesClass *) klass)->is_all_updated = monitorable_updates_real_is_all_updated;
#line 1054 "MediaMonitor.c"
}
static void monitorable_updates_instance_init (MonitorableUpdates * self) {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv = MONITORABLE_UPDATES_GET_PRIVATE (self);
#line 10 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->master_file = NULL;
#line 11 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->master_file_info_altered = FALSE;
#line 12 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->master_file_info = NULL;
#line 13 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->master_in_alteration = FALSE;
#line 14 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->online = FALSE;
#line 15 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->offline = FALSE;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->ref_count = 1;
#line 1075 "MediaMonitor.c"
}
static void monitorable_updates_finalize (MonitorableUpdates* obj) {
MonitorableUpdates * self;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MONITORABLE_UPDATES, MonitorableUpdates);
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_signal_handlers_destroy (self);
#line 8 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (self->monitorable);
#line 10 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (self->priv->master_file);
#line 12 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (self->priv->master_file_info);
#line 1091 "MediaMonitor.c"
}
GType monitorable_updates_get_type (void) {
static volatile gsize monitorable_updates_type_id__volatile = 0;
if (g_once_init_enter (&monitorable_updates_type_id__volatile)) {
static const GTypeValueTable g_define_type_value_table = { value_monitorable_updates_init, value_monitorable_updates_free_value, value_monitorable_updates_copy_value, value_monitorable_updates_peek_pointer, "p", value_monitorable_updates_collect_value, "p", value_monitorable_updates_lcopy_value };
static const GTypeInfo g_define_type_info = { sizeof (MonitorableUpdatesClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) monitorable_updates_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MonitorableUpdates), 0, (GInstanceInitFunc) monitorable_updates_instance_init, &g_define_type_value_table };
static const GTypeFundamentalInfo g_define_type_fundamental_info = { (G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_INSTANTIATABLE | G_TYPE_FLAG_DERIVABLE | G_TYPE_FLAG_DEEP_DERIVABLE) };
GType monitorable_updates_type_id;
monitorable_updates_type_id = g_type_register_fundamental (g_type_fundamental_next (), "MonitorableUpdates", &g_define_type_info, &g_define_type_fundamental_info, 0);
g_once_init_leave (&monitorable_updates_type_id__volatile, monitorable_updates_type_id);
}
return monitorable_updates_type_id__volatile;
}
gpointer monitorable_updates_ref (gpointer instance) {
MonitorableUpdates* self;
self = instance;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_atomic_int_inc (&self->ref_count);
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return instance;
#line 1116 "MediaMonitor.c"
}
void monitorable_updates_unref (gpointer instance) {
MonitorableUpdates* self;
self = instance;
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
MONITORABLE_UPDATES_GET_CLASS (self)->finalize (self);
#line 7 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_type_free_instance ((GTypeInstance *) self);
#line 1129 "MediaMonitor.c"
}
}
static void _media_monitor_on_media_source_destroyed_source_collection_item_destroyed (SourceCollection* _sender, DataSource* source, gpointer self) {
#line 130 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
media_monitor_on_media_source_destroyed ((MediaMonitor*) self, source);
#line 1137 "MediaMonitor.c"
}
static void _media_monitor_on_media_source_destroyed_source_collection_unlinked_destroyed (SourceCollection* _sender, DataSource* source, gpointer self) {
#line 131 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
media_monitor_on_media_source_destroyed ((MediaMonitor*) self, source);
#line 1144 "MediaMonitor.c"
}
GType media_monitor_discovered_file_get_type (void) {
static volatile gsize media_monitor_discovered_file_type_id__volatile = 0;
if (g_once_init_enter (&media_monitor_discovered_file_type_id__volatile)) {
static const GEnumValue values[] = {{MEDIA_MONITOR_DISCOVERED_FILE_REPRESENTED, "MEDIA_MONITOR_DISCOVERED_FILE_REPRESENTED", "represented"}, {MEDIA_MONITOR_DISCOVERED_FILE_IGNORE, "MEDIA_MONITOR_DISCOVERED_FILE_IGNORE", "ignore"}, {MEDIA_MONITOR_DISCOVERED_FILE_UNKNOWN, "MEDIA_MONITOR_DISCOVERED_FILE_UNKNOWN", "unknown"}, {0, NULL, NULL}};
GType media_monitor_discovered_file_type_id;
media_monitor_discovered_file_type_id = g_enum_register_static ("MediaMonitorDiscoveredFile", values);
g_once_init_leave (&media_monitor_discovered_file_type_id__volatile, media_monitor_discovered_file_type_id);
}
return media_monitor_discovered_file_type_id__volatile;
}
static gpointer _data_collection_ref0 (gpointer self) {
#line 119 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return self ? data_collection_ref (self) : NULL;
#line 1163 "MediaMonitor.c"
}
static gboolean _media_monitor_on_flush_pending_updates_gsource_func (gpointer self) {
gboolean result;
result = media_monitor_on_flush_pending_updates ((MediaMonitor*) self);
#line 125 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return result;
#line 1172 "MediaMonitor.c"
}
MediaMonitor* media_monitor_construct (GType object_type, MediaSourceCollection* sources, GCancellable* cancellable) {
MediaMonitor * self = NULL;
MediaSourceCollection* _tmp0_ = NULL;
MediaSourceCollection* _tmp1_ = NULL;
GCancellable* _tmp2_ = NULL;
GCancellable* _tmp3_ = NULL;
MediaSourceCollection* _tmp4_ = NULL;
MediaSourceCollection* _tmp5_ = NULL;
guint _tmp6_ = 0U;
#line 118 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MEDIA_SOURCE_COLLECTION (sources), NULL);
#line 118 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (G_IS_CANCELLABLE (cancellable), NULL);
#line 118 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self = (MediaMonitor*) g_object_new (object_type, NULL);
#line 119 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = sources;
#line 119 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = _data_collection_ref0 (_tmp0_);
#line 119 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_data_collection_unref0 (self->priv->sources);
#line 119 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->sources = _tmp1_;
#line 120 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = cancellable;
#line 120 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp3_ = _g_object_ref0 (_tmp2_);
#line 120 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (self->priv->cancellable);
#line 120 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->cancellable = _tmp3_;
#line 122 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp4_ = sources;
#line 122 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, TYPE_SOURCE_COLLECTION, SourceCollection), "item-destroyed", (GCallback) _media_monitor_on_media_source_destroyed_source_collection_item_destroyed, self, 0);
#line 123 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp5_ = sources;
#line 123 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_signal_connect_object (G_TYPE_CHECK_INSTANCE_CAST (_tmp5_, TYPE_SOURCE_COLLECTION, SourceCollection), "unlinked-destroyed", (GCallback) _media_monitor_on_media_source_destroyed_source_collection_unlinked_destroyed, self, 0);
#line 125 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp6_ = g_timeout_add_full (G_PRIORITY_LOW, (guint) MEDIA_MONITOR_FLUSH_PENDING_UPDATES_MSEC, _media_monitor_on_flush_pending_updates_gsource_func, g_object_ref (self), g_object_unref);
#line 125 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->pending_updates_timer_id = _tmp6_;
#line 118 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return self;
#line 1221 "MediaMonitor.c"
}
static MediaSourceCollection* media_monitor_real_get_media_source_collection (MediaMonitor* self) {
#line 134 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_critical ("Type `%s' does not implement abstract method `media_monitor_get_media_source_collection'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 134 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return NULL;
#line 1230 "MediaMonitor.c"
}
MediaSourceCollection* media_monitor_get_media_source_collection (MediaMonitor* self) {
#line 134 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MEDIA_MONITOR (self), NULL);
#line 134 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return MEDIA_MONITOR_GET_CLASS (self)->get_media_source_collection (self);
#line 1239 "MediaMonitor.c"
}
static void media_monitor_real_close (MediaMonitor* self) {
}
void media_monitor_close (MediaMonitor* self) {
#line 136 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MEDIA_MONITOR (self));
#line 136 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
MEDIA_MONITOR_GET_CLASS (self)->close (self);
#line 1252 "MediaMonitor.c"
}
static gchar* media_monitor_real_to_string (MediaMonitor* self) {
gchar* result = NULL;
MediaSourceCollection* _tmp0_ = NULL;
MediaSourceCollection* _tmp1_ = NULL;
gchar* _tmp2_ = NULL;
gchar* _tmp3_ = NULL;
gchar* _tmp4_ = NULL;
gchar* _tmp5_ = NULL;
#line 140 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = media_monitor_get_media_source_collection (self);
#line 140 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = _tmp0_;
#line 140 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = data_collection_to_string (G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, TYPE_DATA_COLLECTION, DataCollection));
#line 140 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp3_ = _tmp2_;
#line 140 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp4_ = g_strdup_printf ("MediaMonitor for %s", _tmp3_);
#line 140 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp5_ = _tmp4_;
#line 140 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_free0 (_tmp3_);
#line 140 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_data_collection_unref0 (_tmp1_);
#line 140 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
result = _tmp5_;
#line 140 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return result;
#line 1284 "MediaMonitor.c"
}
gchar* media_monitor_to_string (MediaMonitor* self) {
#line 139 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MEDIA_MONITOR (self), NULL);
#line 139 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return MEDIA_MONITOR_GET_CLASS (self)->to_string (self);
#line 1293 "MediaMonitor.c"
}
static MonitorableUpdates* media_monitor_real_create_updates (MediaMonitor* self, Monitorable* monitorable) {
MonitorableUpdates* result = NULL;
Monitorable* _tmp0_ = NULL;
MonitorableUpdates* _tmp1_ = NULL;
#line 143 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MONITORABLE (monitorable), NULL);
#line 144 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = monitorable;
#line 144 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = monitorable_updates_new (_tmp0_);
#line 144 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
result = _tmp1_;
#line 144 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return result;
#line 1311 "MediaMonitor.c"
}
MonitorableUpdates* media_monitor_create_updates (MediaMonitor* self, Monitorable* monitorable) {
#line 143 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MEDIA_MONITOR (self), NULL);
#line 143 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return MEDIA_MONITOR_GET_CLASS (self)->create_updates (self, monitorable);
#line 1320 "MediaMonitor.c"
}
static void media_monitor_real_on_media_source_destroyed (MediaMonitor* self, DataSource* source) {
DataSource* _tmp0_ = NULL;
#line 147 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_DATA_SOURCE (source));
#line 148 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = source;
#line 148 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
media_monitor_remove_updates (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_MONITORABLE, Monitorable));
#line 1332 "MediaMonitor.c"
}
void media_monitor_on_media_source_destroyed (MediaMonitor* self, DataSource* source) {
#line 147 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MEDIA_MONITOR (self));
#line 147 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
MEDIA_MONITOR_GET_CLASS (self)->on_media_source_destroyed (self, source);
#line 1341 "MediaMonitor.c"
}
static void media_monitor_real_notify_discovery_started (MediaMonitor* self) {
}
void media_monitor_notify_discovery_started (MediaMonitor* self) {
#line 155 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MEDIA_MONITOR (self));
#line 155 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
MEDIA_MONITOR_GET_CLASS (self)->notify_discovery_started (self);
#line 1354 "MediaMonitor.c"
}
static MediaMonitorDiscoveredFile media_monitor_real_notify_file_discovered (MediaMonitor* self, GFile* file, GFileInfo* info, Monitorable** monitorable) {
#line 160 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_critical ("Type `%s' does not implement abstract method `media_monitor_notify_file_discovered'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 160 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return 0;
#line 1363 "MediaMonitor.c"
}
MediaMonitorDiscoveredFile media_monitor_notify_file_discovered (MediaMonitor* self, GFile* file, GFileInfo* info, Monitorable** monitorable) {
#line 160 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MEDIA_MONITOR (self), 0);
#line 160 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return MEDIA_MONITOR_GET_CLASS (self)->notify_file_discovered (self, file, info, monitorable);
#line 1372 "MediaMonitor.c"
}
static GeeCollection* media_monitor_real_candidates_for_unknown_file (MediaMonitor* self, GFile* file, GFileInfo* info, MediaMonitorDiscoveredFile* _result_) {
#line 169 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_critical ("Type `%s' does not implement abstract method `media_monitor_candidates_for_unknown_file'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 169 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return NULL;
#line 1381 "MediaMonitor.c"
}
GeeCollection* media_monitor_candidates_for_unknown_file (MediaMonitor* self, GFile* file, GFileInfo* info, MediaMonitorDiscoveredFile* _result_) {
#line 169 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MEDIA_MONITOR (self), NULL);
#line 169 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return MEDIA_MONITOR_GET_CLASS (self)->candidates_for_unknown_file (self, file, info, _result_);
#line 1390 "MediaMonitor.c"
}
static GFile** media_monitor_real_get_auxilliary_backing_files (MediaMonitor* self, Monitorable* monitorable, int* result_length1) {
GFile** result = NULL;
GFile** _tmp0_ = NULL;
gint _tmp0__length1 = 0;
#line 172 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MONITORABLE (monitorable), NULL);
#line 173 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = NULL;
#line 173 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0__length1 = 0;
#line 173 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (result_length1) {
#line 173 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
*result_length1 = _tmp0__length1;
#line 1408 "MediaMonitor.c"
}
#line 173 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
result = _tmp0_;
#line 173 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return result;
#line 1414 "MediaMonitor.c"
}
GFile** media_monitor_get_auxilliary_backing_files (MediaMonitor* self, Monitorable* monitorable, int* result_length1) {
#line 172 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MEDIA_MONITOR (self), NULL);
#line 172 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return MEDIA_MONITOR_GET_CLASS (self)->get_auxilliary_backing_files (self, monitorable, result_length1);
#line 1423 "MediaMonitor.c"
}
static void media_monitor_real_update_backing_file_info (MediaMonitor* self, Monitorable* monitorable, GFile* file, GFileInfo* info) {
#line 178 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MONITORABLE (monitorable));
#line 178 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (G_IS_FILE (file));
#line 178 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail ((info == NULL) || G_IS_FILE_INFO (info));
#line 1434 "MediaMonitor.c"
}
void media_monitor_update_backing_file_info (MediaMonitor* self, Monitorable* monitorable, GFile* file, GFileInfo* info) {
#line 178 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MEDIA_MONITOR (self));
#line 178 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
MEDIA_MONITOR_GET_CLASS (self)->update_backing_file_info (self, monitorable, file, info);
#line 1443 "MediaMonitor.c"
}
static void media_monitor_real_notify_discovery_completing (MediaMonitor* self) {
}
void media_monitor_notify_discovery_completing (MediaMonitor* self) {
#line 182 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MEDIA_MONITOR (self));
#line 182 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
MEDIA_MONITOR_GET_CLASS (self)->notify_discovery_completing (self);
#line 1456 "MediaMonitor.c"
}
static gboolean media_monitor_real_is_file_represented (MediaMonitor* self, GFile* file) {
#line 189 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_critical ("Type `%s' does not implement abstract method `media_monitor_is_file_represented'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 189 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return FALSE;
#line 1465 "MediaMonitor.c"
}
gboolean media_monitor_is_file_represented (MediaMonitor* self, GFile* file) {
#line 189 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MEDIA_MONITOR (self), FALSE);
#line 189 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return MEDIA_MONITOR_GET_CLASS (self)->is_file_represented (self, file);
#line 1474 "MediaMonitor.c"
}
static gboolean media_monitor_real_notify_file_created (MediaMonitor* self, GFile* file, GFileInfo* info) {
#line 191 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_critical ("Type `%s' does not implement abstract method `media_monitor_notify_file_created'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 191 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return FALSE;
#line 1483 "MediaMonitor.c"
}
gboolean media_monitor_notify_file_created (MediaMonitor* self, GFile* file, GFileInfo* info) {
#line 191 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MEDIA_MONITOR (self), FALSE);
#line 191 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return MEDIA_MONITOR_GET_CLASS (self)->notify_file_created (self, file, info);
#line 1492 "MediaMonitor.c"
}
static gboolean media_monitor_real_notify_file_moved (MediaMonitor* self, GFile* old_file, GFile* new_file, GFileInfo* new_file_info) {
#line 193 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_critical ("Type `%s' does not implement abstract method `media_monitor_notify_file_moved'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 193 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return FALSE;
#line 1501 "MediaMonitor.c"
}
gboolean media_monitor_notify_file_moved (MediaMonitor* self, GFile* old_file, GFile* new_file, GFileInfo* new_file_info) {
#line 193 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MEDIA_MONITOR (self), FALSE);
#line 193 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return MEDIA_MONITOR_GET_CLASS (self)->notify_file_moved (self, old_file, new_file, new_file_info);
#line 1510 "MediaMonitor.c"
}
static gboolean media_monitor_real_notify_file_altered (MediaMonitor* self, GFile* file) {
#line 195 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_critical ("Type `%s' does not implement abstract method `media_monitor_notify_file_altered'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 195 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return FALSE;
#line 1519 "MediaMonitor.c"
}
gboolean media_monitor_notify_file_altered (MediaMonitor* self, GFile* file) {
#line 195 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MEDIA_MONITOR (self), FALSE);
#line 195 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return MEDIA_MONITOR_GET_CLASS (self)->notify_file_altered (self, file);
#line 1528 "MediaMonitor.c"
}
static gboolean media_monitor_real_notify_file_attributes_altered (MediaMonitor* self, GFile* file) {
#line 197 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_critical ("Type `%s' does not implement abstract method `media_monitor_notify_file_attributes_altered'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 197 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return FALSE;
#line 1537 "MediaMonitor.c"
}
gboolean media_monitor_notify_file_attributes_altered (MediaMonitor* self, GFile* file) {
#line 197 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MEDIA_MONITOR (self), FALSE);
#line 197 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return MEDIA_MONITOR_GET_CLASS (self)->notify_file_attributes_altered (self, file);
#line 1546 "MediaMonitor.c"
}
static gboolean media_monitor_real_notify_file_alteration_completed (MediaMonitor* self, GFile* file, GFileInfo* info) {
#line 199 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_critical ("Type `%s' does not implement abstract method `media_monitor_notify_file_alteration_completed'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 199 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return FALSE;
#line 1555 "MediaMonitor.c"
}
gboolean media_monitor_notify_file_alteration_completed (MediaMonitor* self, GFile* file, GFileInfo* info) {
#line 199 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MEDIA_MONITOR (self), FALSE);
#line 199 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return MEDIA_MONITOR_GET_CLASS (self)->notify_file_alteration_completed (self, file, info);
#line 1564 "MediaMonitor.c"
}
static gboolean media_monitor_real_notify_file_deleted (MediaMonitor* self, GFile* file) {
#line 201 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_critical ("Type `%s' does not implement abstract method `media_monitor_notify_file_deleted'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 201 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return FALSE;
#line 1573 "MediaMonitor.c"
}
gboolean media_monitor_notify_file_deleted (MediaMonitor* self, GFile* file) {
#line 201 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MEDIA_MONITOR (self), FALSE);
#line 201 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return MEDIA_MONITOR_GET_CLASS (self)->notify_file_deleted (self, file);
#line 1582 "MediaMonitor.c"
}
void media_monitor_mdbg (const gchar* msg) {
#line 203 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (msg != NULL);
#line 1589 "MediaMonitor.c"
}
gboolean media_monitor_has_pending_updates (MediaMonitor* self) {
gboolean result = FALSE;
GeeHashMap* _tmp0_ = NULL;
gint _tmp1_ = 0;
gint _tmp2_ = 0;
#line 209 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MEDIA_MONITOR (self), FALSE);
#line 210 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = self->priv->pending_updates;
#line 210 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = gee_abstract_map_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_MAP, GeeMap));
#line 210 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = _tmp1_;
#line 210 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
result = _tmp2_ > 0;
#line 210 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return result;
#line 1610 "MediaMonitor.c"
}
GeeCollection* media_monitor_get_monitorables (MediaMonitor* self) {
GeeCollection* result = NULL;
GeeHashMap* _tmp0_ = NULL;
GeeSet* _tmp1_ = NULL;
GeeSet* _tmp2_ = NULL;
#line 213 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MEDIA_MONITOR (self), NULL);
#line 214 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = self->priv->pending_updates;
#line 214 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = gee_abstract_map_get_keys (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_MAP, GeeMap));
#line 214 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = _tmp1_;
#line 214 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection);
#line 214 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return result;
#line 1631 "MediaMonitor.c"
}
MonitorableUpdates* media_monitor_fetch_updates (MediaMonitor* self, Monitorable* monitorable) {
MonitorableUpdates* result = NULL;
MonitorableUpdates* updates = NULL;
GeeHashMap* _tmp0_ = NULL;
Monitorable* _tmp1_ = NULL;
gpointer _tmp2_ = NULL;
MonitorableUpdates* _tmp3_ = NULL;
Monitorable* _tmp4_ = NULL;
MonitorableUpdates* _tmp5_ = NULL;
GeeHashMap* _tmp6_ = NULL;
Monitorable* _tmp7_ = NULL;
MonitorableUpdates* _tmp8_ = NULL;
#line 219 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MEDIA_MONITOR (self), NULL);
#line 219 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MONITORABLE (monitorable), NULL);
#line 220 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = self->priv->pending_updates;
#line 220 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = monitorable;
#line 220 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 220 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
updates = (MonitorableUpdates*) _tmp2_;
#line 221 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp3_ = updates;
#line 221 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp3_ != NULL) {
#line 222 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
result = updates;
#line 222 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return result;
#line 1667 "MediaMonitor.c"
}
#line 224 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp4_ = monitorable;
#line 224 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp5_ = media_monitor_create_updates (self, _tmp4_);
#line 224 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_monitorable_updates_unref0 (updates);
#line 224 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
updates = _tmp5_;
#line 225 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp6_ = self->priv->pending_updates;
#line 225 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp7_ = monitorable;
#line 225 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp8_ = updates;
#line 225 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
gee_abstract_map_set (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp7_, _tmp8_);
#line 227 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
result = updates;
#line 227 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return result;
#line 1689 "MediaMonitor.c"
}
MonitorableUpdates* media_monitor_get_existing_updates (MediaMonitor* self, Monitorable* monitorable) {
MonitorableUpdates* result = NULL;
GeeHashMap* _tmp0_ = NULL;
Monitorable* _tmp1_ = NULL;
gpointer _tmp2_ = NULL;
#line 230 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MEDIA_MONITOR (self), NULL);
#line 230 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MONITORABLE (monitorable), NULL);
#line 231 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = self->priv->pending_updates;
#line 231 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = monitorable;
#line 231 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = gee_abstract_map_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_);
#line 231 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
result = (MonitorableUpdates*) _tmp2_;
#line 231 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return result;
#line 1712 "MediaMonitor.c"
}
void media_monitor_remove_updates (MediaMonitor* self, Monitorable* monitorable) {
GeeHashMap* _tmp0_ = NULL;
Monitorable* _tmp1_ = NULL;
#line 234 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MEDIA_MONITOR (self));
#line 234 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MONITORABLE (monitorable));
#line 235 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = self->priv->pending_updates;
#line 235 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = monitorable;
#line 235 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
gee_abstract_map_unset (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ABSTRACT_MAP, GeeAbstractMap), _tmp1_, NULL);
#line 1729 "MediaMonitor.c"
}
gboolean media_monitor_is_online (MediaMonitor* self, Monitorable* monitorable) {
gboolean result = FALSE;
MonitorableUpdates* updates = NULL;
Monitorable* _tmp0_ = NULL;
MonitorableUpdates* _tmp1_ = NULL;
gboolean _tmp2_ = FALSE;
MonitorableUpdates* _tmp3_ = NULL;
#line 238 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MEDIA_MONITOR (self), FALSE);
#line 238 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MONITORABLE (monitorable), FALSE);
#line 239 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = monitorable;
#line 239 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = media_monitor_get_existing_updates (self, _tmp0_);
#line 239 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
updates = _tmp1_;
#line 241 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp3_ = updates;
#line 241 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp3_ != NULL) {
#line 1754 "MediaMonitor.c"
MonitorableUpdates* _tmp4_ = NULL;
gboolean _tmp5_ = FALSE;
#line 241 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp4_ = updates;
#line 241 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp5_ = monitorable_updates_is_set_online (_tmp4_);
#line 241 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = _tmp5_;
#line 1763 "MediaMonitor.c"
} else {
Monitorable* _tmp6_ = NULL;
gboolean _tmp7_ = FALSE;
#line 241 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp6_ = monitorable;
#line 241 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp7_ = monitorable_is_offline (_tmp6_);
#line 241 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = !_tmp7_;
#line 1773 "MediaMonitor.c"
}
#line 241 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
result = _tmp2_;
#line 241 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_monitorable_updates_unref0 (updates);
#line 241 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return result;
#line 1781 "MediaMonitor.c"
}
gboolean media_monitor_is_offline (MediaMonitor* self, Monitorable* monitorable) {
gboolean result = FALSE;
MonitorableUpdates* updates = NULL;
Monitorable* _tmp0_ = NULL;
MonitorableUpdates* _tmp1_ = NULL;
gboolean _tmp2_ = FALSE;
MonitorableUpdates* _tmp3_ = NULL;
#line 244 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MEDIA_MONITOR (self), FALSE);
#line 244 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MONITORABLE (monitorable), FALSE);
#line 245 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = monitorable;
#line 245 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = media_monitor_get_existing_updates (self, _tmp0_);
#line 245 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
updates = _tmp1_;
#line 247 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp3_ = updates;
#line 247 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp3_ != NULL) {
#line 1806 "MediaMonitor.c"
MonitorableUpdates* _tmp4_ = NULL;
gboolean _tmp5_ = FALSE;
#line 247 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp4_ = updates;
#line 247 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp5_ = monitorable_updates_is_set_offline (_tmp4_);
#line 247 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = _tmp5_;
#line 1815 "MediaMonitor.c"
} else {
Monitorable* _tmp6_ = NULL;
gboolean _tmp7_ = FALSE;
#line 247 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp6_ = monitorable;
#line 247 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp7_ = monitorable_is_offline (_tmp6_);
#line 247 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = _tmp7_;
#line 1825 "MediaMonitor.c"
}
#line 247 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
result = _tmp2_;
#line 247 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_monitorable_updates_unref0 (updates);
#line 247 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return result;
#line 1833 "MediaMonitor.c"
}
GFile* media_monitor_get_master_file (MediaMonitor* self, Monitorable* monitorable) {
GFile* result = NULL;
MonitorableUpdates* updates = NULL;
Monitorable* _tmp0_ = NULL;
MonitorableUpdates* _tmp1_ = NULL;
GFile* _tmp2_ = NULL;
gboolean _tmp3_ = FALSE;
MonitorableUpdates* _tmp4_ = NULL;
#line 250 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MEDIA_MONITOR (self), NULL);
#line 250 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MONITORABLE (monitorable), NULL);
#line 251 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = monitorable;
#line 251 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = media_monitor_get_existing_updates (self, _tmp0_);
#line 251 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
updates = _tmp1_;
#line 253 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp4_ = updates;
#line 253 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp4_ != NULL) {
#line 1859 "MediaMonitor.c"
MonitorableUpdates* _tmp5_ = NULL;
GFile* _tmp6_ = NULL;
GFile* _tmp7_ = NULL;
#line 253 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp5_ = updates;
#line 253 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp6_ = monitorable_updates_get_master_file (_tmp5_);
#line 253 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp7_ = _tmp6_;
#line 253 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp3_ = _tmp7_ != NULL;
#line 253 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (_tmp7_);
#line 1873 "MediaMonitor.c"
} else {
#line 253 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp3_ = FALSE;
#line 1877 "MediaMonitor.c"
}
#line 253 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp3_) {
#line 1881 "MediaMonitor.c"
MonitorableUpdates* _tmp8_ = NULL;
GFile* _tmp9_ = NULL;
#line 253 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp8_ = updates;
#line 253 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp9_ = monitorable_updates_get_master_file (_tmp8_);
#line 253 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (_tmp2_);
#line 253 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = _tmp9_;
#line 1892 "MediaMonitor.c"
} else {
Monitorable* _tmp10_ = NULL;
GFile* _tmp11_ = NULL;
#line 254 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp10_ = monitorable;
#line 254 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp11_ = media_source_get_master_file (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, TYPE_MEDIA_SOURCE, MediaSource));
#line 254 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (_tmp2_);
#line 254 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = _tmp11_;
#line 1904 "MediaMonitor.c"
}
#line 253 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
result = _tmp2_;
#line 253 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_monitorable_updates_unref0 (updates);
#line 253 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return result;
#line 1912 "MediaMonitor.c"
}
void media_monitor_update_master_file (MediaMonitor* self, Monitorable* monitorable, GFile* file) {
Monitorable* _tmp0_ = NULL;
MonitorableUpdates* _tmp1_ = NULL;
MonitorableUpdates* _tmp2_ = NULL;
GFile* _tmp3_ = NULL;
#line 257 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MEDIA_MONITOR (self));
#line 257 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MONITORABLE (monitorable));
#line 257 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (G_IS_FILE (file));
#line 258 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = monitorable;
#line 258 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = media_monitor_fetch_updates (self, _tmp0_);
#line 258 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = _tmp1_;
#line 258 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp3_ = file;
#line 258 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_updates_set_master_file (_tmp2_, _tmp3_);
#line 258 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_monitorable_updates_unref0 (_tmp2_);
#line 1939 "MediaMonitor.c"
}
void media_monitor_update_master_file_info_altered (MediaMonitor* self, Monitorable* monitorable) {
Monitorable* _tmp0_ = NULL;
MonitorableUpdates* _tmp1_ = NULL;
MonitorableUpdates* _tmp2_ = NULL;
#line 261 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MEDIA_MONITOR (self));
#line 261 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MONITORABLE (monitorable));
#line 262 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = monitorable;
#line 262 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = media_monitor_fetch_updates (self, _tmp0_);
#line 262 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = _tmp1_;
#line 262 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_updates_set_master_file_info_altered (_tmp2_, TRUE);
#line 262 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_monitorable_updates_unref0 (_tmp2_);
#line 1961 "MediaMonitor.c"
}
void media_monitor_update_master_file_in_alteration (MediaMonitor* self, Monitorable* monitorable, gboolean in_alteration) {
Monitorable* _tmp0_ = NULL;
MonitorableUpdates* _tmp1_ = NULL;
MonitorableUpdates* _tmp2_ = NULL;
gboolean _tmp3_ = FALSE;
#line 265 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MEDIA_MONITOR (self));
#line 265 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MONITORABLE (monitorable));
#line 266 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = monitorable;
#line 266 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = media_monitor_fetch_updates (self, _tmp0_);
#line 266 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = _tmp1_;
#line 266 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp3_ = in_alteration;
#line 266 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_updates_set_master_in_alteration (_tmp2_, _tmp3_);
#line 266 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_monitorable_updates_unref0 (_tmp2_);
#line 1986 "MediaMonitor.c"
}
void media_monitor_update_master_file_alterations_completed (MediaMonitor* self, Monitorable* monitorable, GFileInfo* info) {
Monitorable* _tmp0_ = NULL;
MonitorableUpdates* _tmp1_ = NULL;
MonitorableUpdates* _tmp2_ = NULL;
GFileInfo* _tmp3_ = NULL;
#line 269 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MEDIA_MONITOR (self));
#line 269 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MONITORABLE (monitorable));
#line 269 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (G_IS_FILE_INFO (info));
#line 270 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = monitorable;
#line 270 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = media_monitor_fetch_updates (self, _tmp0_);
#line 270 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = _tmp1_;
#line 270 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp3_ = info;
#line 270 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_updates_set_master_alterations_complete (_tmp2_, _tmp3_);
#line 270 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_monitorable_updates_unref0 (_tmp2_);
#line 2013 "MediaMonitor.c"
}
void media_monitor_update_online (MediaMonitor* self, Monitorable* monitorable) {
Monitorable* _tmp0_ = NULL;
MonitorableUpdates* _tmp1_ = NULL;
MonitorableUpdates* _tmp2_ = NULL;
#line 273 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MEDIA_MONITOR (self));
#line 273 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MONITORABLE (monitorable));
#line 274 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = monitorable;
#line 274 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = media_monitor_fetch_updates (self, _tmp0_);
#line 274 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = _tmp1_;
#line 274 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_updates_mark_online (_tmp2_);
#line 274 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_monitorable_updates_unref0 (_tmp2_);
#line 2035 "MediaMonitor.c"
}
void media_monitor_update_offline (MediaMonitor* self, Monitorable* monitorable) {
Monitorable* _tmp0_ = NULL;
MonitorableUpdates* _tmp1_ = NULL;
MonitorableUpdates* _tmp2_ = NULL;
#line 277 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MEDIA_MONITOR (self));
#line 277 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MONITORABLE (monitorable));
#line 278 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = monitorable;
#line 278 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = media_monitor_fetch_updates (self, _tmp0_);
#line 278 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = _tmp1_;
#line 278 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_updates_mark_offline (_tmp2_);
#line 278 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_monitorable_updates_unref0 (_tmp2_);
#line 2057 "MediaMonitor.c"
}
static void media_monitor_real_process_updates (MediaMonitor* self, GeeCollection* all_updates, TransactionController* controller, gint* op_count, GError** error) {
GeeMap* set_master_file = NULL;
GeeMap* set_master_file_info = NULL;
GeeArrayList* to_offline = NULL;
GeeArrayList* to_online = NULL;
GeeMap* _tmp53_ = NULL;
GeeMap* _tmp63_ = NULL;
gboolean _tmp73_ = FALSE;
GeeArrayList* _tmp74_ = NULL;
GError * _inner_error_ = NULL;
#line 285 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (GEE_IS_COLLECTION (all_updates));
#line 285 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_TRANSACTION_CONTROLLER (controller));
#line 287 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
set_master_file = NULL;
#line 288 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
set_master_file_info = NULL;
#line 289 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
to_offline = NULL;
#line 290 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
to_online = NULL;
#line 2083 "MediaMonitor.c"
{
GeeIterator* _updates_it = NULL;
GeeCollection* _tmp0_ = NULL;
GeeIterator* _tmp1_ = NULL;
#line 292 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = all_updates;
#line 292 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_ITERABLE, GeeIterable));
#line 292 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_updates_it = _tmp1_;
#line 292 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
while (TRUE) {
#line 2096 "MediaMonitor.c"
GeeIterator* _tmp2_ = NULL;
gboolean _tmp3_ = FALSE;
MonitorableUpdates* updates = NULL;
GeeIterator* _tmp4_ = NULL;
gpointer _tmp5_ = NULL;
gint _tmp6_ = 0;
MonitorableUpdates* _tmp7_ = NULL;
GFile* _tmp8_ = NULL;
GFile* _tmp9_ = NULL;
gboolean _tmp10_ = FALSE;
MonitorableUpdates* _tmp21_ = NULL;
GFileInfo* _tmp22_ = NULL;
GFileInfo* _tmp23_ = NULL;
gboolean _tmp24_ = FALSE;
MonitorableUpdates* _tmp35_ = NULL;
gboolean _tmp36_ = FALSE;
MonitorableUpdates* _tmp44_ = NULL;
gboolean _tmp45_ = FALSE;
#line 292 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = _updates_it;
#line 292 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp3_ = gee_iterator_next (_tmp2_);
#line 292 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (!_tmp3_) {
#line 292 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
break;
#line 2123 "MediaMonitor.c"
}
#line 292 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp4_ = _updates_it;
#line 292 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp5_ = gee_iterator_get (_tmp4_);
#line 292 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
updates = (MonitorableUpdates*) _tmp5_;
#line 293 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp6_ = *op_count;
#line 293 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp6_ >= MEDIA_MONITOR_MAX_OPERATIONS_PER_CYCLE) {
#line 294 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_monitorable_updates_unref0 (updates);
#line 294 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
break;
#line 2139 "MediaMonitor.c"
}
#line 296 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp7_ = updates;
#line 296 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp8_ = monitorable_updates_get_master_file (_tmp7_);
#line 296 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp9_ = _tmp8_;
#line 296 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp10_ = _tmp9_ != NULL;
#line 296 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (_tmp9_);
#line 296 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp10_) {
#line 2153 "MediaMonitor.c"
GeeMap* _tmp11_ = NULL;
GeeMap* _tmp13_ = NULL;
MonitorableUpdates* _tmp14_ = NULL;
Monitorable* _tmp15_ = NULL;
MonitorableUpdates* _tmp16_ = NULL;
GFile* _tmp17_ = NULL;
GFile* _tmp18_ = NULL;
MonitorableUpdates* _tmp19_ = NULL;
gint _tmp20_ = 0;
#line 297 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp11_ = set_master_file;
#line 297 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp11_ == NULL) {
#line 2167 "MediaMonitor.c"
GeeHashMap* _tmp12_ = NULL;
#line 298 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp12_ = gee_hash_map_new (TYPE_MONITORABLE, (GBoxedCopyFunc) g_object_ref, g_object_unref, G_TYPE_FILE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 298 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (set_master_file);
#line 298 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
set_master_file = G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_MAP, GeeMap);
#line 2175 "MediaMonitor.c"
}
#line 300 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp13_ = set_master_file;
#line 300 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp14_ = updates;
#line 300 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp15_ = _tmp14_->monitorable;
#line 300 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp16_ = updates;
#line 300 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp17_ = monitorable_updates_get_master_file (_tmp16_);
#line 300 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp18_ = _tmp17_;
#line 300 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
gee_map_set (_tmp13_, _tmp15_, _tmp18_);
#line 300 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (_tmp18_);
#line 301 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp19_ = updates;
#line 301 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_updates_set_master_file (_tmp19_, NULL);
#line 302 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp20_ = *op_count;
#line 302 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
*op_count = _tmp20_ + 1;
#line 2201 "MediaMonitor.c"
}
#line 305 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp21_ = updates;
#line 305 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp22_ = monitorable_updates_get_master_file_info (_tmp21_);
#line 305 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp23_ = _tmp22_;
#line 305 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp24_ = _tmp23_ != NULL;
#line 305 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (_tmp23_);
#line 305 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp24_) {
#line 2215 "MediaMonitor.c"
GeeMap* _tmp25_ = NULL;
GeeMap* _tmp27_ = NULL;
MonitorableUpdates* _tmp28_ = NULL;
Monitorable* _tmp29_ = NULL;
MonitorableUpdates* _tmp30_ = NULL;
GFileInfo* _tmp31_ = NULL;
GFileInfo* _tmp32_ = NULL;
MonitorableUpdates* _tmp33_ = NULL;
gint _tmp34_ = 0;
#line 306 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp25_ = set_master_file_info;
#line 306 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp25_ == NULL) {
#line 2229 "MediaMonitor.c"
GeeHashMap* _tmp26_ = NULL;
#line 307 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp26_ = gee_hash_map_new (TYPE_MONITORABLE, (GBoxedCopyFunc) g_object_ref, g_object_unref, g_file_info_get_type (), (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 307 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (set_master_file_info);
#line 307 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
set_master_file_info = G_TYPE_CHECK_INSTANCE_CAST (_tmp26_, GEE_TYPE_MAP, GeeMap);
#line 2237 "MediaMonitor.c"
}
#line 309 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp27_ = set_master_file_info;
#line 309 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp28_ = updates;
#line 309 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp29_ = _tmp28_->monitorable;
#line 309 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp30_ = updates;
#line 309 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp31_ = monitorable_updates_get_master_file_info (_tmp30_);
#line 309 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp32_ = _tmp31_;
#line 309 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
gee_map_set (_tmp27_, _tmp29_, _tmp32_);
#line 309 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (_tmp32_);
#line 310 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp33_ = updates;
#line 310 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_updates_set_master_file_info (_tmp33_, NULL);
#line 311 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp34_ = *op_count;
#line 311 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
*op_count = _tmp34_ + 1;
#line 2263 "MediaMonitor.c"
}
#line 314 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp35_ = updates;
#line 314 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp36_ = monitorable_updates_is_set_offline (_tmp35_);
#line 314 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp36_) {
#line 2271 "MediaMonitor.c"
GeeArrayList* _tmp37_ = NULL;
GeeArrayList* _tmp39_ = NULL;
MonitorableUpdates* _tmp40_ = NULL;
Monitorable* _tmp41_ = NULL;
MonitorableUpdates* _tmp42_ = NULL;
gint _tmp43_ = 0;
#line 315 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp37_ = to_offline;
#line 315 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp37_ == NULL) {
#line 2282 "MediaMonitor.c"
GeeArrayList* _tmp38_ = NULL;
#line 316 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp38_ = gee_array_list_new (TYPE_LIBRARY_PHOTO, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
#line 316 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (to_offline);
#line 316 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
to_offline = _tmp38_;
#line 2290 "MediaMonitor.c"
}
#line 318 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp39_ = to_offline;
#line 318 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp40_ = updates;
#line 318 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp41_ = _tmp40_->monitorable;
#line 318 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp39_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp41_, TYPE_MEDIA_SOURCE, MediaSource));
#line 319 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp42_ = updates;
#line 319 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_updates_reset_online_offline (_tmp42_);
#line 320 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp43_ = *op_count;
#line 320 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
*op_count = _tmp43_ + 1;
#line 2308 "MediaMonitor.c"
}
#line 323 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp44_ = updates;
#line 323 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp45_ = monitorable_updates_is_set_online (_tmp44_);
#line 323 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp45_) {
#line 2316 "MediaMonitor.c"
GeeArrayList* _tmp46_ = NULL;
GeeArrayList* _tmp48_ = NULL;
MonitorableUpdates* _tmp49_ = NULL;
Monitorable* _tmp50_ = NULL;
MonitorableUpdates* _tmp51_ = NULL;
gint _tmp52_ = 0;
#line 324 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp46_ = to_online;
#line 324 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp46_ == NULL) {
#line 2327 "MediaMonitor.c"
GeeArrayList* _tmp47_ = NULL;
#line 325 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp47_ = gee_array_list_new (TYPE_LIBRARY_PHOTO, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
#line 325 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (to_online);
#line 325 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
to_online = _tmp47_;
#line 2335 "MediaMonitor.c"
}
#line 327 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp48_ = to_online;
#line 327 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp49_ = updates;
#line 327 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp50_ = _tmp49_->monitorable;
#line 327 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp48_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp50_, TYPE_MEDIA_SOURCE, MediaSource));
#line 328 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp51_ = updates;
#line 328 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_updates_reset_online_offline (_tmp51_);
#line 329 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp52_ = *op_count;
#line 329 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
*op_count = _tmp52_ + 1;
#line 2353 "MediaMonitor.c"
}
#line 292 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_monitorable_updates_unref0 (updates);
#line 2357 "MediaMonitor.c"
}
#line 292 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (_updates_it);
#line 2361 "MediaMonitor.c"
}
#line 333 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp53_ = set_master_file;
#line 333 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp53_ != NULL) {
#line 2367 "MediaMonitor.c"
GeeMap* _tmp54_ = NULL;
gint _tmp55_ = 0;
gint _tmp56_ = 0;
gchar* _tmp57_ = NULL;
gchar* _tmp58_ = NULL;
gchar* _tmp59_ = NULL;
gchar* _tmp60_ = NULL;
GeeMap* _tmp61_ = NULL;
TransactionController* _tmp62_ = NULL;
#line 334 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp54_ = set_master_file;
#line 334 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp55_ = gee_map_get_size (_tmp54_);
#line 334 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp56_ = _tmp55_;
#line 334 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp57_ = media_monitor_to_string (self);
#line 334 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp58_ = _tmp57_;
#line 334 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp59_ = g_strdup_printf ("Changing master file of %d objects in %s", _tmp56_, _tmp58_);
#line 334 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp60_ = _tmp59_;
#line 334 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
media_monitor_mdbg (_tmp60_);
#line 334 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_free0 (_tmp60_);
#line 334 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_free0 (_tmp58_);
#line 336 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp61_ = set_master_file;
#line 336 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp62_ = controller;
#line 336 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_set_many_master_file (_tmp61_, _tmp62_, &_inner_error_);
#line 336 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 336 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_propagate_error (error, _inner_error_);
#line 336 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (to_online);
#line 336 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (to_offline);
#line 336 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (set_master_file_info);
#line 336 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (set_master_file);
#line 336 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return;
#line 2417 "MediaMonitor.c"
}
}
#line 339 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp63_ = set_master_file_info;
#line 339 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp63_ != NULL) {
#line 2424 "MediaMonitor.c"
GeeMap* _tmp64_ = NULL;
gint _tmp65_ = 0;
gint _tmp66_ = 0;
gchar* _tmp67_ = NULL;
gchar* _tmp68_ = NULL;
gchar* _tmp69_ = NULL;
gchar* _tmp70_ = NULL;
GeeMap* _tmp71_ = NULL;
TransactionController* _tmp72_ = NULL;
#line 340 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp64_ = set_master_file_info;
#line 340 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp65_ = gee_map_get_size (_tmp64_);
#line 340 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp66_ = _tmp65_;
#line 340 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp67_ = media_monitor_to_string (self);
#line 340 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp68_ = _tmp67_;
#line 340 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp69_ = g_strdup_printf ("Updating %d master files timestamps in %s", _tmp66_, _tmp68_);
#line 340 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp70_ = _tmp69_;
#line 340 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
media_monitor_mdbg (_tmp70_);
#line 340 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_free0 (_tmp70_);
#line 340 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_free0 (_tmp68_);
#line 343 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp71_ = set_master_file_info;
#line 343 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp72_ = controller;
#line 343 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_set_many_master_timestamp (_tmp71_, _tmp72_, &_inner_error_);
#line 343 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 343 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_propagate_error (error, _inner_error_);
#line 343 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (to_online);
#line 343 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (to_offline);
#line 343 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (set_master_file_info);
#line 343 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (set_master_file);
#line 343 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return;
#line 2474 "MediaMonitor.c"
}
}
#line 346 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp74_ = to_offline;
#line 346 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp74_ != NULL) {
#line 346 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp73_ = TRUE;
#line 2483 "MediaMonitor.c"
} else {
GeeArrayList* _tmp75_ = NULL;
#line 346 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp75_ = to_online;
#line 346 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp73_ = _tmp75_ != NULL;
#line 2490 "MediaMonitor.c"
}
#line 346 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp73_) {
#line 2494 "MediaMonitor.c"
gint _tmp76_ = 0;
GeeArrayList* _tmp77_ = NULL;
gint _tmp81_ = 0;
GeeArrayList* _tmp82_ = NULL;
gchar* _tmp86_ = NULL;
gchar* _tmp87_ = NULL;
gchar* _tmp88_ = NULL;
gchar* _tmp89_ = NULL;
GeeArrayList* _tmp90_ = NULL;
GeeArrayList* _tmp91_ = NULL;
TransactionController* _tmp92_ = NULL;
#line 348 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp77_ = to_online;
#line 348 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp77_ != NULL) {
#line 2510 "MediaMonitor.c"
GeeArrayList* _tmp78_ = NULL;
gint _tmp79_ = 0;
gint _tmp80_ = 0;
#line 348 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp78_ = to_online;
#line 348 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp79_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp78_, GEE_TYPE_COLLECTION, GeeCollection));
#line 348 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp80_ = _tmp79_;
#line 348 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp76_ = _tmp80_;
#line 2522 "MediaMonitor.c"
} else {
#line 348 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp76_ = 0;
#line 2526 "MediaMonitor.c"
}
#line 349 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp82_ = to_offline;
#line 349 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp82_ != NULL) {
#line 2532 "MediaMonitor.c"
GeeArrayList* _tmp83_ = NULL;
gint _tmp84_ = 0;
gint _tmp85_ = 0;
#line 349 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp83_ = to_offline;
#line 349 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp84_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp83_, GEE_TYPE_COLLECTION, GeeCollection));
#line 349 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp85_ = _tmp84_;
#line 349 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp81_ = _tmp85_;
#line 2544 "MediaMonitor.c"
} else {
#line 349 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp81_ = 0;
#line 2548 "MediaMonitor.c"
}
#line 347 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp86_ = media_monitor_to_string (self);
#line 347 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp87_ = _tmp86_;
#line 347 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp88_ = g_strdup_printf ("Marking %d online, %d offline in %s", _tmp76_, _tmp81_, _tmp87_);
#line 347 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp89_ = _tmp88_;
#line 347 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
media_monitor_mdbg (_tmp89_);
#line 347 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_free0 (_tmp89_);
#line 347 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_free0 (_tmp87_);
#line 352 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp90_ = to_online;
#line 352 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp91_ = to_offline;
#line 352 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp92_ = controller;
#line 352 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable_mark_many_online_offline (G_TYPE_CHECK_INSTANCE_CAST (_tmp90_, GEE_TYPE_COLLECTION, GeeCollection), G_TYPE_CHECK_INSTANCE_CAST (_tmp91_, GEE_TYPE_COLLECTION, GeeCollection), _tmp92_, &_inner_error_);
#line 352 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 352 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_propagate_error (error, _inner_error_);
#line 352 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (to_online);
#line 352 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (to_offline);
#line 352 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (set_master_file_info);
#line 352 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (set_master_file);
#line 352 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return;
#line 2586 "MediaMonitor.c"
}
}
#line 285 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (to_online);
#line 285 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (to_offline);
#line 285 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (set_master_file_info);
#line 285 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (set_master_file);
#line 2597 "MediaMonitor.c"
}
void media_monitor_process_updates (MediaMonitor* self, GeeCollection* all_updates, TransactionController* controller, gint* op_count, GError** error) {
#line 285 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_if_fail (IS_MEDIA_MONITOR (self));
#line 285 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
MEDIA_MONITOR_GET_CLASS (self)->process_updates (self, all_updates, controller, op_count, error);
#line 2606 "MediaMonitor.c"
}
static gpointer _transaction_controller_ref0 (gpointer self) {
#line 390 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return self ? transaction_controller_ref (self) : NULL;
#line 2613 "MediaMonitor.c"
}
static gboolean media_monitor_on_flush_pending_updates (MediaMonitor* self) {
gboolean result = FALSE;
GCancellable* _tmp0_ = NULL;
gboolean _tmp1_ = FALSE;
GeeHashMap* _tmp2_ = NULL;
gint _tmp3_ = 0;
gint _tmp4_ = 0;
GTimer* timer = NULL;
GTimer* _tmp5_ = NULL;
GeeArrayList* to_process = NULL;
GeeArrayList* to_remove = NULL;
gint op_count = 0;
GeeArrayList* _tmp29_ = NULL;
GeeArrayList* _tmp47_ = NULL;
gdouble elapsed = 0.0;
GTimer* _tmp60_ = NULL;
gdouble _tmp61_ = 0.0;
gboolean _tmp62_ = FALSE;
gdouble _tmp63_ = 0.0;
GError * _inner_error_ = NULL;
#line 356 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_return_val_if_fail (IS_MEDIA_MONITOR (self), FALSE);
#line 357 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = self->priv->cancellable;
#line 357 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp1_ = g_cancellable_is_cancelled (_tmp0_);
#line 357 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp1_) {
#line 358 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
result = FALSE;
#line 358 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return result;
#line 2649 "MediaMonitor.c"
}
#line 360 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = self->priv->pending_updates;
#line 360 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp3_ = gee_abstract_map_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_MAP, GeeMap));
#line 360 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp4_ = _tmp3_;
#line 360 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp4_ == 0) {
#line 361 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
result = TRUE;
#line 361 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return result;
#line 2663 "MediaMonitor.c"
}
#line 363 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp5_ = g_timer_new ();
#line 363 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
timer = _tmp5_;
#line 368 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
to_process = NULL;
#line 369 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
to_remove = NULL;
#line 2673 "MediaMonitor.c"
{
GeeIterator* _updates_it = NULL;
GeeHashMap* _tmp6_ = NULL;
GeeCollection* _tmp7_ = NULL;
GeeCollection* _tmp8_ = NULL;
GeeCollection* _tmp9_ = NULL;
GeeIterator* _tmp10_ = NULL;
GeeIterator* _tmp11_ = NULL;
#line 370 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp6_ = self->priv->pending_updates;
#line 370 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp7_ = gee_abstract_map_get_values (G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_MAP, GeeMap));
#line 370 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp8_ = _tmp7_;
#line 370 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp9_ = _tmp8_;
#line 370 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp10_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp9_, GEE_TYPE_ITERABLE, GeeIterable));
#line 370 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp11_ = _tmp10_;
#line 370 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (_tmp9_);
#line 370 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_updates_it = _tmp11_;
#line 370 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
while (TRUE) {
#line 2700 "MediaMonitor.c"
GeeIterator* _tmp12_ = NULL;
gboolean _tmp13_ = FALSE;
MonitorableUpdates* updates = NULL;
GeeIterator* _tmp14_ = NULL;
gpointer _tmp15_ = NULL;
MonitorableUpdates* _tmp16_ = NULL;
gboolean _tmp17_ = FALSE;
MonitorableUpdates* _tmp18_ = NULL;
gboolean _tmp19_ = FALSE;
GeeArrayList* _tmp25_ = NULL;
GeeArrayList* _tmp27_ = NULL;
MonitorableUpdates* _tmp28_ = NULL;
#line 370 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp12_ = _updates_it;
#line 370 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp13_ = gee_iterator_next (_tmp12_);
#line 370 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (!_tmp13_) {
#line 370 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
break;
#line 2721 "MediaMonitor.c"
}
#line 370 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp14_ = _updates_it;
#line 370 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp15_ = gee_iterator_get (_tmp14_);
#line 370 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
updates = (MonitorableUpdates*) _tmp15_;
#line 371 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp16_ = updates;
#line 371 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp17_ = monitorable_updates_is_in_alteration (_tmp16_);
#line 371 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp17_) {
#line 372 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_monitorable_updates_unref0 (updates);
#line 372 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
continue;
#line 2739 "MediaMonitor.c"
}
#line 374 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp18_ = updates;
#line 374 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp19_ = monitorable_updates_is_all_updated (_tmp18_);
#line 374 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp19_) {
#line 2747 "MediaMonitor.c"
GeeArrayList* _tmp20_ = NULL;
GeeArrayList* _tmp22_ = NULL;
MonitorableUpdates* _tmp23_ = NULL;
Monitorable* _tmp24_ = NULL;
#line 375 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp20_ = to_remove;
#line 375 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp20_ == NULL) {
#line 2756 "MediaMonitor.c"
GeeArrayList* _tmp21_ = NULL;
#line 376 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp21_ = gee_array_list_new (TYPE_MONITORABLE, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL);
#line 376 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (to_remove);
#line 376 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
to_remove = _tmp21_;
#line 2764 "MediaMonitor.c"
}
#line 378 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp22_ = to_remove;
#line 378 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp23_ = updates;
#line 378 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp24_ = _tmp23_->monitorable;
#line 378 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp22_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp24_);
#line 379 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_monitorable_updates_unref0 (updates);
#line 379 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
continue;
#line 2778 "MediaMonitor.c"
}
#line 382 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp25_ = to_process;
#line 382 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp25_ == NULL) {
#line 2784 "MediaMonitor.c"
GeeArrayList* _tmp26_ = NULL;
#line 383 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp26_ = gee_array_list_new (TYPE_MONITORABLE_UPDATES, (GBoxedCopyFunc) monitorable_updates_ref, monitorable_updates_unref, NULL, NULL, NULL);
#line 383 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (to_process);
#line 383 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
to_process = _tmp26_;
#line 2792 "MediaMonitor.c"
}
#line 385 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp27_ = to_process;
#line 385 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp28_ = updates;
#line 385 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
gee_abstract_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp27_, GEE_TYPE_ABSTRACT_COLLECTION, GeeAbstractCollection), _tmp28_);
#line 370 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_monitorable_updates_unref0 (updates);
#line 2802 "MediaMonitor.c"
}
#line 370 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (_updates_it);
#line 2806 "MediaMonitor.c"
}
#line 388 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
op_count = 0;
#line 389 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp29_ = to_process;
#line 389 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp29_ != NULL) {
#line 2814 "MediaMonitor.c"
TransactionController* controller = NULL;
MediaSourceCollection* _tmp30_ = NULL;
MediaSourceCollection* _tmp31_ = NULL;
TransactionController* _tmp32_ = NULL;
TransactionController* _tmp33_ = NULL;
TransactionController* _tmp34_ = NULL;
TransactionController* _tmp35_ = NULL;
#line 390 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp30_ = media_monitor_get_media_source_collection (self);
#line 390 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp31_ = _tmp30_;
#line 390 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp32_ = media_source_collection_get_transaction_controller (_tmp31_);
#line 390 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp33_ = _tmp32_;
#line 390 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp34_ = _transaction_controller_ref0 (_tmp33_);
#line 390 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp35_ = _tmp34_;
#line 390 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_data_collection_unref0 (_tmp31_);
#line 390 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
controller = _tmp35_;
#line 2838 "MediaMonitor.c"
{
TransactionController* _tmp36_ = NULL;
GeeArrayList* _tmp37_ = NULL;
TransactionController* _tmp38_ = NULL;
TransactionController* _tmp39_ = NULL;
#line 393 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp36_ = controller;
#line 393 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
transaction_controller_begin (_tmp36_);
#line 394 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp37_ = to_process;
#line 394 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp38_ = controller;
#line 394 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
media_monitor_process_updates (self, G_TYPE_CHECK_INSTANCE_CAST (_tmp37_, GEE_TYPE_COLLECTION, GeeCollection), _tmp38_, &op_count, &_inner_error_);
#line 394 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 2856 "MediaMonitor.c"
goto __catch571_g_error;
}
#line 395 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp39_ = controller;
#line 395 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
transaction_controller_commit (_tmp39_);
#line 2863 "MediaMonitor.c"
}
goto __finally571;
__catch571_g_error:
{
GError* err = NULL;
GError* _tmp40_ = NULL;
#line 392 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
err = _inner_error_;
#line 392 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_inner_error_ = NULL;
#line 397 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp40_ = err;
#line 397 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp40_->domain == DATABASE_ERROR) {
#line 2878 "MediaMonitor.c"
GError* _tmp41_ = NULL;
#line 398 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp41_ = err;
#line 398 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
app_window_database_error ((GError*) _tmp41_);
#line 2884 "MediaMonitor.c"
} else {
const gchar* _tmp42_ = NULL;
GError* _tmp43_ = NULL;
const gchar* _tmp44_ = NULL;
gchar* _tmp45_ = NULL;
gchar* _tmp46_ = NULL;
#line 400 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp42_ = _ ("Unable to process monitoring updates: %s");
#line 400 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp43_ = err;
#line 400 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp44_ = _tmp43_->message;
#line 400 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp45_ = g_strdup_printf (_tmp42_, _tmp44_);
#line 400 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp46_ = _tmp45_;
#line 400 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
app_window_panic (_tmp46_);
#line 400 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_free0 (_tmp46_);
#line 2905 "MediaMonitor.c"
}
#line 392 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_error_free0 (err);
#line 2909 "MediaMonitor.c"
}
__finally571:
#line 392 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 392 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_transaction_controller_unref0 (controller);
#line 392 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (to_remove);
#line 392 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (to_process);
#line 392 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_timer_destroy0 (timer);
#line 392 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 392 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_clear_error (&_inner_error_);
#line 392 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return FALSE;
#line 2928 "MediaMonitor.c"
}
#line 389 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_transaction_controller_unref0 (controller);
#line 2932 "MediaMonitor.c"
}
#line 404 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp47_ = to_remove;
#line 404 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp47_ != NULL) {
#line 2938 "MediaMonitor.c"
{
GeeArrayList* _monitorable_list = NULL;
GeeArrayList* _tmp48_ = NULL;
GeeArrayList* _tmp49_ = NULL;
gint _monitorable_size = 0;
GeeArrayList* _tmp50_ = NULL;
gint _tmp51_ = 0;
gint _tmp52_ = 0;
gint _monitorable_index = 0;
#line 405 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp48_ = to_remove;
#line 405 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp49_ = _g_object_ref0 (_tmp48_);
#line 405 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_monitorable_list = _tmp49_;
#line 405 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp50_ = _monitorable_list;
#line 405 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp51_ = gee_abstract_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp50_, GEE_TYPE_COLLECTION, GeeCollection));
#line 405 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp52_ = _tmp51_;
#line 405 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_monitorable_size = _tmp52_;
#line 405 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_monitorable_index = -1;
#line 405 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
while (TRUE) {
#line 2966 "MediaMonitor.c"
gint _tmp53_ = 0;
gint _tmp54_ = 0;
gint _tmp55_ = 0;
Monitorable* monitorable = NULL;
GeeArrayList* _tmp56_ = NULL;
gint _tmp57_ = 0;
gpointer _tmp58_ = NULL;
Monitorable* _tmp59_ = NULL;
#line 405 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp53_ = _monitorable_index;
#line 405 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_monitorable_index = _tmp53_ + 1;
#line 405 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp54_ = _monitorable_index;
#line 405 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp55_ = _monitorable_size;
#line 405 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (!(_tmp54_ < _tmp55_)) {
#line 405 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
break;
#line 2987 "MediaMonitor.c"
}
#line 405 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp56_ = _monitorable_list;
#line 405 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp57_ = _monitorable_index;
#line 405 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp58_ = gee_abstract_list_get (G_TYPE_CHECK_INSTANCE_CAST (_tmp56_, GEE_TYPE_ABSTRACT_LIST, GeeAbstractList), _tmp57_);
#line 405 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
monitorable = (Monitorable*) _tmp58_;
#line 406 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp59_ = monitorable;
#line 406 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
media_monitor_remove_updates (self, _tmp59_);
#line 405 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (monitorable);
#line 3003 "MediaMonitor.c"
}
#line 405 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (_monitorable_list);
#line 3007 "MediaMonitor.c"
}
}
#line 409 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp60_ = timer;
#line 409 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp61_ = g_timer_elapsed (_tmp60_, NULL);
#line 409 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
elapsed = _tmp61_;
#line 410 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp63_ = elapsed;
#line 410 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp63_ > 0.01) {
#line 410 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp62_ = TRUE;
#line 3022 "MediaMonitor.c"
} else {
gint _tmp64_ = 0;
#line 410 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp64_ = op_count;
#line 410 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp62_ = _tmp64_ > 0;
#line 3029 "MediaMonitor.c"
}
#line 410 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
if (_tmp62_) {
#line 3033 "MediaMonitor.c"
gchar* _tmp65_ = NULL;
gchar* _tmp66_ = NULL;
gdouble _tmp67_ = 0.0;
gint _tmp68_ = 0;
gchar* _tmp69_ = NULL;
gchar* _tmp70_ = NULL;
#line 411 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp65_ = media_monitor_to_string (self);
#line 411 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp66_ = _tmp65_;
#line 411 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp67_ = elapsed;
#line 411 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp68_ = op_count;
#line 411 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp69_ = g_strdup_printf ("Total pending queue time for %s: %lf (%d ops)", _tmp66_, _tmp67_, _tmp68_);
#line 411 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp70_ = _tmp69_;
#line 411 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
media_monitor_mdbg (_tmp70_);
#line 411 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_free0 (_tmp70_);
#line 411 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_free0 (_tmp66_);
#line 3058 "MediaMonitor.c"
}
#line 415 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
result = TRUE;
#line 415 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (to_remove);
#line 415 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (to_process);
#line 415 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_timer_destroy0 (timer);
#line 415 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
return result;
#line 3070 "MediaMonitor.c"
}
static void media_monitor_class_init (MediaMonitorClass * klass) {
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
media_monitor_parent_class = g_type_class_peek_parent (klass);
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_type_class_add_private (klass, sizeof (MediaMonitorPrivate));
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MediaMonitorClass *) klass)->get_media_source_collection = media_monitor_real_get_media_source_collection;
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MediaMonitorClass *) klass)->close = media_monitor_real_close;
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MediaMonitorClass *) klass)->to_string = media_monitor_real_to_string;
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MediaMonitorClass *) klass)->create_updates = media_monitor_real_create_updates;
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MediaMonitorClass *) klass)->on_media_source_destroyed = media_monitor_real_on_media_source_destroyed;
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MediaMonitorClass *) klass)->notify_discovery_started = media_monitor_real_notify_discovery_started;
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MediaMonitorClass *) klass)->notify_file_discovered = media_monitor_real_notify_file_discovered;
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MediaMonitorClass *) klass)->candidates_for_unknown_file = media_monitor_real_candidates_for_unknown_file;
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MediaMonitorClass *) klass)->get_auxilliary_backing_files = media_monitor_real_get_auxilliary_backing_files;
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MediaMonitorClass *) klass)->update_backing_file_info = media_monitor_real_update_backing_file_info;
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MediaMonitorClass *) klass)->notify_discovery_completing = media_monitor_real_notify_discovery_completing;
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MediaMonitorClass *) klass)->is_file_represented = media_monitor_real_is_file_represented;
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MediaMonitorClass *) klass)->notify_file_created = media_monitor_real_notify_file_created;
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MediaMonitorClass *) klass)->notify_file_moved = media_monitor_real_notify_file_moved;
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MediaMonitorClass *) klass)->notify_file_altered = media_monitor_real_notify_file_altered;
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MediaMonitorClass *) klass)->notify_file_attributes_altered = media_monitor_real_notify_file_attributes_altered;
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MediaMonitorClass *) klass)->notify_file_alteration_completed = media_monitor_real_notify_file_alteration_completed;
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MediaMonitorClass *) klass)->notify_file_deleted = media_monitor_real_notify_file_deleted;
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
((MediaMonitorClass *) klass)->process_updates = media_monitor_real_process_updates;
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
G_OBJECT_CLASS (klass)->finalize = media_monitor_finalize;
#line 3119 "MediaMonitor.c"
}
static void media_monitor_instance_init (MediaMonitor * self) {
GeeHashMap* _tmp0_ = NULL;
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv = MEDIA_MONITOR_GET_PRIVATE (self);
#line 114 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = gee_hash_map_new (TYPE_MONITORABLE, (GBoxedCopyFunc) g_object_ref, g_object_unref, TYPE_MONITORABLE_UPDATES, (GBoxedCopyFunc) monitorable_updates_ref, monitorable_updates_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 114 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->pending_updates = _tmp0_;
#line 116 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self->priv->pending_updates_timer_id = (guint) 0;
#line 3133 "MediaMonitor.c"
}
static void media_monitor_finalize (GObject* obj) {
MediaMonitor * self;
MediaSourceCollection* _tmp0_ = NULL;
guint _tmp1_ = 0U;
MediaSourceCollection* _tmp2_ = NULL;
guint _tmp3_ = 0U;
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MEDIA_MONITOR, MediaMonitor);
#line 130 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp0_ = self->priv->sources;
#line 130 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_signal_parse_name ("item-destroyed", TYPE_SOURCE_COLLECTION, &_tmp1_, NULL, FALSE);
#line 130 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, TYPE_SOURCE_COLLECTION, SourceCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp1_, 0, NULL, (GCallback) _media_monitor_on_media_source_destroyed_source_collection_item_destroyed, self);
#line 131 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_tmp2_ = self->priv->sources;
#line 131 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_signal_parse_name ("unlinked-destroyed", TYPE_SOURCE_COLLECTION, &_tmp3_, NULL, FALSE);
#line 131 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
g_signal_handlers_disconnect_matched (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, TYPE_SOURCE_COLLECTION, SourceCollection), G_SIGNAL_MATCH_ID | G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, _tmp3_, 0, NULL, (GCallback) _media_monitor_on_media_source_destroyed_source_collection_unlinked_destroyed, self);
#line 112 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_data_collection_unref0 (self->priv->sources);
#line 113 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (self->priv->cancellable);
#line 114 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
_g_object_unref0 (self->priv->pending_updates);
#line 101 "/home/jens/Source/shotwell/src/MediaMonitor.vala"
G_OBJECT_CLASS (media_monitor_parent_class)->finalize (obj);
#line 3165 "MediaMonitor.c"
}
GType media_monitor_get_type (void) {
static volatile gsize media_monitor_type_id__volatile = 0;
if (g_once_init_enter (&media_monitor_type_id__volatile)) {
static const GTypeInfo g_define_type_info = { sizeof (MediaMonitorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) media_monitor_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MediaMonitor), 0, (GInstanceInitFunc) media_monitor_instance_init, NULL };
GType media_monitor_type_id;
media_monitor_type_id = g_type_register_static (G_TYPE_OBJECT, "MediaMonitor", &g_define_type_info, G_TYPE_FLAG_ABSTRACT);
g_once_init_leave (&media_monitor_type_id__volatile, media_monitor_type_id);
}
return media_monitor_type_id__volatile;
}
|