summaryrefslogtreecommitdiff
path: root/src/MediaInterfaces.c
blob: a755c56f5faba67fc5786522a20a8cc2c8b75319 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
/* MediaInterfaces.c generated by valac 0.34.4, the Vala compiler
 * generated from MediaInterfaces.vala, do not modify */

/* Copyright 2016 Software Freedom Conservancy Inc.
 *
 * This software is licensed under the GNU LGPL (version 2.1 or later).
 * See the COPYING file in this distribution.
 */
/**/
/* Going forward, Shotwell will use MediaInterfaces, which allow for various operations and features*/
/* to be added only to the MediaSources that support them (or make sense for).  For example, adding*/
/* a library-mode photo or video to an Event makes perfect sense, but does not make sense for a*/
/* direct-mode photo.  All three are MediaSources, and to make DirectPhoto descend from another*/
/* base class is only inviting chaos and a tremendous amount of replicated code.*/
/**/
/* A key point to make of all MediaInterfaces is that they require MediaSource as a base class.*/
/* Thus, any code dealing with one of these interfaces knows they are also dealing with a*/
/* MediaSource.*/
/**/
/* TODO: Make Eventable and Taggable interfaces, which are the only types Event and Tag will deal*/
/* with (rather than MediaSources).*/
/**/
/* TODO: Make Trashable interface, which are much like Flaggable.*/
/**/
/* TODO: ContainerSources may also have specific needs in the future; an interface-based system*/
/* may make sense as well when that need arises.*/
/**/
/**/
/* TransactionController*/
/**/
/* Because many operations in Shotwell need to be performed on collections of objects all at once,*/
/* and that most of these objects are backed by a database, the TransactionController object gives */
/* a way to generically group a series of operations on one or more similar objects into a single*/
/* transaction. This class is listed here because it's used by the various media interfaces to offer*/
/* multiple operations.*/
/**/
/* begin() and commit() may be called multiple times in layering fashion.  The implementation*/
/* accounts for this.  If either throws an exception it should be assumed that the object is in*/
/* a "clean" state; that is, if begin() throws an exception, there is no need to call commit(),*/
/* and if commit() throws an exception, it does not need to be called again to revert the object*/
/* state.*/
/**/
/* This means that any user who calls begin() *must* match it with a corresponding commit(), even*/
/* if there is an error during the transaction.  It is up to the user to back out any undesired*/
/* changes.*/
/**/
/* Because of the nature of this object, it's assumed that every object type will share one*/
/* between all callers.*/
/**/
/* The object is thread-safe.  There is no guarantee that the underlying persistent store is,*/
/* however.*/

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <gee.h>
#include <gio/gio.h>
#include <time.h>
#include <gobject/gvaluecollector.h>


#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;
typedef struct _TransactionControllerPrivate TransactionControllerPrivate;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _ParamSpecTransactionController ParamSpecTransactionController;

#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_FLAGGABLE (flaggable_get_type ())
#define FLAGGABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_FLAGGABLE, Flaggable))
#define IS_FLAGGABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_FLAGGABLE))
#define FLAGGABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_FLAGGABLE, FlaggableIface))

typedef struct _Flaggable Flaggable;
typedef struct _FlaggableIface FlaggableIface;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#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 TYPE_DATEABLE (dateable_get_type ())
#define DATEABLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_DATEABLE, Dateable))
#define IS_DATEABLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_DATEABLE))
#define DATEABLE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), TYPE_DATEABLE, DateableIface))

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

struct _TransactionController {
	GTypeInstance parent_instance;
	volatile int ref_count;
	TransactionControllerPrivate * priv;
};

struct _TransactionControllerClass {
	GTypeClass parent_class;
	void (*finalize) (TransactionController *self);
	void (*begin_impl) (TransactionController* self, GError** error);
	void (*commit_impl) (TransactionController* self, GError** error);
};

struct _TransactionControllerPrivate {
	gint count;
	GRecMutex __lock_count;
};

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 ()
struct _ParamSpecTransactionController {
	GParamSpec parent_instance;
};

struct _FlaggableIface {
	GTypeInterface parent_iface;
	gboolean (*is_flagged) (Flaggable* self);
	void (*mark_flagged) (Flaggable* self);
	void (*mark_unflagged) (Flaggable* self);
};

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 _DateableIface {
	GTypeInterface parent_iface;
	void (*set_exposure_time) (Dateable* self, time_t target_time);
	time_t (*get_exposure_time) (Dateable* self);
};


static gpointer transaction_controller_parent_class = NULL;

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 TRANSACTION_CONTROLLER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_TRANSACTION_CONTROLLER, TransactionControllerPrivate))
enum  {
	TRANSACTION_CONTROLLER_DUMMY_PROPERTY
};
TransactionController* transaction_controller_construct (GType object_type);
void transaction_controller_begin (TransactionController* self);
void transaction_controller_begin_impl (TransactionController* self, GError** error);
GQuark database_error_quark (void);
void app_window_database_error (GError* err);
void app_window_panic (const gchar* msg);
static void transaction_controller_real_begin_impl (TransactionController* self, GError** error);
void transaction_controller_commit (TransactionController* self);
void transaction_controller_commit_impl (TransactionController* self, GError** error);
static void transaction_controller_real_commit_impl (TransactionController* self, GError** error);
static void transaction_controller_finalize (TransactionController* obj);
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 flaggable_get_type (void) G_GNUC_CONST;
gboolean flaggable_is_flagged (Flaggable* self);
void flaggable_mark_flagged (Flaggable* self);
void flaggable_mark_unflagged (Flaggable* self);
void flaggable_mark_many_flagged_unflagged (GeeCollection* flag, GeeCollection* unflag, TransactionController* controller, GError** error);
GType monitorable_get_type (void) G_GNUC_CONST;
gboolean monitorable_is_offline (Monitorable* self);
void monitorable_mark_online (Monitorable* self);
void monitorable_mark_offline (Monitorable* self);
void monitorable_mark_many_online_offline (GeeCollection* online, GeeCollection* offline, TransactionController* controller, GError** error);
void monitorable_set_master_file (Monitorable* self, GFile* file);
void monitorable_set_many_master_file (GeeMap* map, TransactionController* controller, GError** error);
void monitorable_set_master_timestamp (Monitorable* self, GFileInfo* info);
void monitorable_set_many_master_timestamp (GeeMap* map, TransactionController* controller, GError** error);
GType dateable_get_type (void) G_GNUC_CONST;
void dateable_set_exposure_time (Dateable* self, time_t target_time);
time_t dateable_get_exposure_time (Dateable* self);


TransactionController* transaction_controller_construct (GType object_type) {
	TransactionController* self = NULL;
#line 54 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	self = (TransactionController*) g_type_create_instance (object_type);
#line 54 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	return self;
#line 254 "MediaInterfaces.c"
}


void transaction_controller_begin (TransactionController* self) {
	GError * _inner_error_ = NULL;
#line 63 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail (IS_TRANSACTION_CONTROLLER (self));
#line 262 "MediaInterfaces.c"
	{
		gint _tmp0_ = 0;
#line 64 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_tmp0_ = self->priv->count;
#line 64 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		g_rec_mutex_lock (&self->priv->__lock_count);
#line 269 "MediaInterfaces.c"
		{
			gint _tmp1_ = 0;
#line 65 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_tmp1_ = self->priv->count;
#line 65 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			self->priv->count = _tmp1_ + 1;
#line 65 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			if (_tmp1_ != 0) {
#line 278 "MediaInterfaces.c"
				{
					gint _tmp2_ = 0;
#line 64 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					_tmp2_ = self->priv->count;
#line 64 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					g_rec_mutex_unlock (&self->priv->__lock_count);
#line 285 "MediaInterfaces.c"
				}
#line 66 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				return;
#line 289 "MediaInterfaces.c"
			}
			{
#line 69 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				transaction_controller_begin_impl (self, &_inner_error_);
#line 69 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 296 "MediaInterfaces.c"
					goto __catch572_g_error;
				}
			}
			goto __finally572;
			__catch572_g_error:
			{
				GError* err = NULL;
				gint _tmp3_ = 0;
				GError* _tmp4_ = NULL;
#line 68 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				err = _inner_error_;
#line 68 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_inner_error_ = NULL;
#line 72 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp3_ = self->priv->count;
#line 72 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				self->priv->count = _tmp3_ - 1;
#line 74 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp4_ = err;
#line 74 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				if (_tmp4_->domain == DATABASE_ERROR) {
#line 318 "MediaInterfaces.c"
					GError* _tmp5_ = NULL;
#line 75 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					_tmp5_ = err;
#line 75 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					app_window_database_error ((GError*) _tmp5_);
#line 324 "MediaInterfaces.c"
				} else {
					GError* _tmp6_ = NULL;
					const gchar* _tmp7_ = NULL;
					gchar* _tmp8_ = NULL;
					gchar* _tmp9_ = NULL;
#line 77 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					_tmp6_ = err;
#line 77 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					_tmp7_ = _tmp6_->message;
#line 77 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					_tmp8_ = g_strdup_printf ("%s", _tmp7_);
#line 77 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					_tmp9_ = _tmp8_;
#line 77 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					app_window_panic (_tmp9_);
#line 77 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					_g_free0 (_tmp9_);
#line 342 "MediaInterfaces.c"
				}
#line 68 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_g_error_free0 (err);
#line 346 "MediaInterfaces.c"
			}
			__finally572:
#line 68 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 351 "MediaInterfaces.c"
				{
					gint _tmp10_ = 0;
#line 64 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					_tmp10_ = self->priv->count;
#line 64 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					g_rec_mutex_unlock (&self->priv->__lock_count);
#line 358 "MediaInterfaces.c"
				}
#line 68 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 68 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				g_clear_error (&_inner_error_);
#line 68 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				return;
#line 366 "MediaInterfaces.c"
			}
		}
		__finally571:
		{
			gint _tmp11_ = 0;
#line 64 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_tmp11_ = self->priv->count;
#line 64 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			g_rec_mutex_unlock (&self->priv->__lock_count);
#line 376 "MediaInterfaces.c"
		}
#line 64 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 64 "/home/jens/Source/shotwell/src/MediaInterfaces.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 64 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			g_clear_error (&_inner_error_);
#line 64 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			return;
#line 386 "MediaInterfaces.c"
		}
	}
}


static void transaction_controller_real_begin_impl (TransactionController* self, GError** error) {
#line 83 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_critical ("Type `%s' does not implement abstract method `transaction_controller_begin_impl'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 83 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	return;
#line 397 "MediaInterfaces.c"
}


void transaction_controller_begin_impl (TransactionController* self, GError** error) {
#line 83 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail (IS_TRANSACTION_CONTROLLER (self));
#line 83 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	TRANSACTION_CONTROLLER_GET_CLASS (self)->begin_impl (self, error);
#line 406 "MediaInterfaces.c"
}


void transaction_controller_commit (TransactionController* self) {
	GError * _inner_error_ = NULL;
#line 85 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail (IS_TRANSACTION_CONTROLLER (self));
#line 414 "MediaInterfaces.c"
	{
		gint _tmp0_ = 0;
#line 86 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_tmp0_ = self->priv->count;
#line 86 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		g_rec_mutex_lock (&self->priv->__lock_count);
#line 421 "MediaInterfaces.c"
		{
			gint _tmp1_ = 0;
			gint _tmp2_ = 0;
			gint _tmp3_ = 0;
#line 87 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_tmp1_ = self->priv->count;
#line 87 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_vala_assert (_tmp1_ > 0, "count > 0");
#line 88 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_tmp2_ = self->priv->count;
#line 88 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			self->priv->count = _tmp2_ - 1;
#line 88 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_tmp3_ = self->priv->count;
#line 88 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			if (_tmp3_ != 0) {
#line 438 "MediaInterfaces.c"
				{
					gint _tmp4_ = 0;
#line 86 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					_tmp4_ = self->priv->count;
#line 86 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					g_rec_mutex_unlock (&self->priv->__lock_count);
#line 445 "MediaInterfaces.c"
				}
#line 89 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				return;
#line 449 "MediaInterfaces.c"
			}
			{
#line 93 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				transaction_controller_commit_impl (self, &_inner_error_);
#line 93 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 456 "MediaInterfaces.c"
					goto __catch574_g_error;
				}
			}
			goto __finally574;
			__catch574_g_error:
			{
				GError* err = NULL;
				GError* _tmp5_ = NULL;
#line 92 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				err = _inner_error_;
#line 92 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_inner_error_ = NULL;
#line 95 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp5_ = err;
#line 95 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				if (_tmp5_->domain == DATABASE_ERROR) {
#line 473 "MediaInterfaces.c"
					GError* _tmp6_ = NULL;
#line 96 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					_tmp6_ = err;
#line 96 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					app_window_database_error ((GError*) _tmp6_);
#line 479 "MediaInterfaces.c"
				} else {
					GError* _tmp7_ = NULL;
					const gchar* _tmp8_ = NULL;
					gchar* _tmp9_ = NULL;
					gchar* _tmp10_ = NULL;
#line 98 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					_tmp7_ = err;
#line 98 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					_tmp8_ = _tmp7_->message;
#line 98 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					_tmp9_ = g_strdup_printf ("%s", _tmp8_);
#line 98 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					_tmp10_ = _tmp9_;
#line 98 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					app_window_panic (_tmp10_);
#line 98 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					_g_free0 (_tmp10_);
#line 497 "MediaInterfaces.c"
				}
#line 92 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_g_error_free0 (err);
#line 501 "MediaInterfaces.c"
			}
			__finally574:
#line 92 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 506 "MediaInterfaces.c"
				{
					gint _tmp11_ = 0;
#line 86 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					_tmp11_ = self->priv->count;
#line 86 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					g_rec_mutex_unlock (&self->priv->__lock_count);
#line 513 "MediaInterfaces.c"
				}
#line 92 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				g_critical ("file %s: line %d: unexpected error: %s (%s, %d)", __FILE__, __LINE__, _inner_error_->message, g_quark_to_string (_inner_error_->domain), _inner_error_->code);
#line 92 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				g_clear_error (&_inner_error_);
#line 92 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				return;
#line 521 "MediaInterfaces.c"
			}
		}
		__finally573:
		{
			gint _tmp12_ = 0;
#line 86 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_tmp12_ = self->priv->count;
#line 86 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			g_rec_mutex_unlock (&self->priv->__lock_count);
#line 531 "MediaInterfaces.c"
		}
#line 86 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 86 "/home/jens/Source/shotwell/src/MediaInterfaces.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 86 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			g_clear_error (&_inner_error_);
#line 86 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			return;
#line 541 "MediaInterfaces.c"
		}
	}
}


static void transaction_controller_real_commit_impl (TransactionController* self, GError** error) {
#line 104 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_critical ("Type `%s' does not implement abstract method `transaction_controller_commit_impl'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 104 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	return;
#line 552 "MediaInterfaces.c"
}


void transaction_controller_commit_impl (TransactionController* self, GError** error) {
#line 104 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail (IS_TRANSACTION_CONTROLLER (self));
#line 104 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	TRANSACTION_CONTROLLER_GET_CLASS (self)->commit_impl (self, error);
#line 561 "MediaInterfaces.c"
}


static void value_transaction_controller_init (GValue* value) {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	value->data[0].v_pointer = NULL;
#line 568 "MediaInterfaces.c"
}


static void value_transaction_controller_free_value (GValue* value) {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	if (value->data[0].v_pointer) {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		transaction_controller_unref (value->data[0].v_pointer);
#line 577 "MediaInterfaces.c"
	}
}


static void value_transaction_controller_copy_value (const GValue* src_value, GValue* dest_value) {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	if (src_value->data[0].v_pointer) {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		dest_value->data[0].v_pointer = transaction_controller_ref (src_value->data[0].v_pointer);
#line 587 "MediaInterfaces.c"
	} else {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		dest_value->data[0].v_pointer = NULL;
#line 591 "MediaInterfaces.c"
	}
}


static gpointer value_transaction_controller_peek_pointer (const GValue* value) {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	return value->data[0].v_pointer;
#line 599 "MediaInterfaces.c"
}


static gchar* value_transaction_controller_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	if (collect_values[0].v_pointer) {
#line 606 "MediaInterfaces.c"
		TransactionController* object;
		object = collect_values[0].v_pointer;
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		if (object->parent_instance.g_class == NULL) {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 613 "MediaInterfaces.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.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 617 "MediaInterfaces.c"
		}
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		value->data[0].v_pointer = transaction_controller_ref (object);
#line 621 "MediaInterfaces.c"
	} else {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		value->data[0].v_pointer = NULL;
#line 625 "MediaInterfaces.c"
	}
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	return NULL;
#line 629 "MediaInterfaces.c"
}


static gchar* value_transaction_controller_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	TransactionController** object_p;
	object_p = collect_values[0].v_pointer;
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	if (!object_p) {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 640 "MediaInterfaces.c"
	}
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	if (!value->data[0].v_pointer) {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		*object_p = NULL;
#line 646 "MediaInterfaces.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		*object_p = value->data[0].v_pointer;
#line 650 "MediaInterfaces.c"
	} else {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		*object_p = transaction_controller_ref (value->data[0].v_pointer);
#line 654 "MediaInterfaces.c"
	}
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	return NULL;
#line 658 "MediaInterfaces.c"
}


GParamSpec* param_spec_transaction_controller (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ParamSpecTransactionController* spec;
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_val_if_fail (g_type_is_a (object_type, TYPE_TRANSACTION_CONTROLLER), NULL);
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	return G_PARAM_SPEC (spec);
#line 672 "MediaInterfaces.c"
}


gpointer value_get_transaction_controller (const GValue* value) {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TRANSACTION_CONTROLLER), NULL);
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	return value->data[0].v_pointer;
#line 681 "MediaInterfaces.c"
}


void value_set_transaction_controller (GValue* value, gpointer v_object) {
	TransactionController* old;
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TRANSACTION_CONTROLLER));
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	old = value->data[0].v_pointer;
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	if (v_object) {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_TRANSACTION_CONTROLLER));
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		value->data[0].v_pointer = v_object;
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		transaction_controller_ref (value->data[0].v_pointer);
#line 701 "MediaInterfaces.c"
	} else {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		value->data[0].v_pointer = NULL;
#line 705 "MediaInterfaces.c"
	}
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	if (old) {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		transaction_controller_unref (old);
#line 711 "MediaInterfaces.c"
	}
}


void value_take_transaction_controller (GValue* value, gpointer v_object) {
	TransactionController* old;
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_TRANSACTION_CONTROLLER));
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	old = value->data[0].v_pointer;
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	if (v_object) {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_TRANSACTION_CONTROLLER));
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		value->data[0].v_pointer = v_object;
#line 730 "MediaInterfaces.c"
	} else {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		value->data[0].v_pointer = NULL;
#line 734 "MediaInterfaces.c"
	}
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	if (old) {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		transaction_controller_unref (old);
#line 740 "MediaInterfaces.c"
	}
}


static void transaction_controller_class_init (TransactionControllerClass * klass) {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	transaction_controller_parent_class = g_type_class_peek_parent (klass);
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	((TransactionControllerClass *) klass)->finalize = transaction_controller_finalize;
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_type_class_add_private (klass, sizeof (TransactionControllerPrivate));
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	((TransactionControllerClass *) klass)->begin_impl = transaction_controller_real_begin_impl;
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	((TransactionControllerClass *) klass)->commit_impl = transaction_controller_real_commit_impl;
#line 756 "MediaInterfaces.c"
}


static void transaction_controller_instance_init (TransactionController * self) {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	self->priv = TRANSACTION_CONTROLLER_GET_PRIVATE (self);
#line 52 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_rec_mutex_init (&self->priv->__lock_count);
#line 52 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	self->priv->count = 0;
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	self->ref_count = 1;
#line 769 "MediaInterfaces.c"
}


static void transaction_controller_finalize (TransactionController* obj) {
	TransactionController * self;
	GError * _inner_error_ = NULL;
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_TRANSACTION_CONTROLLER, TransactionController);
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_signal_handlers_destroy (self);
#line 780 "MediaInterfaces.c"
	{
		gint _tmp0_ = 0;
#line 58 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_tmp0_ = self->priv->count;
#line 58 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		g_rec_mutex_lock (&self->priv->__lock_count);
#line 787 "MediaInterfaces.c"
		{
			gint _tmp1_ = 0;
#line 59 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_tmp1_ = self->priv->count;
#line 59 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_vala_assert (_tmp1_ == 0, "count == 0");
#line 794 "MediaInterfaces.c"
		}
		__finally570:
		{
			gint _tmp2_ = 0;
#line 58 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_tmp2_ = self->priv->count;
#line 58 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			g_rec_mutex_unlock (&self->priv->__lock_count);
#line 803 "MediaInterfaces.c"
		}
#line 58 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		if (G_UNLIKELY (_inner_error_ != NULL)) {
#line 58 "/home/jens/Source/shotwell/src/MediaInterfaces.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 58 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			g_clear_error (&_inner_error_);
#line 811 "MediaInterfaces.c"
		}
	}
#line 52 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_rec_mutex_clear (&self->priv->__lock_count);
#line 816 "MediaInterfaces.c"
}


GType transaction_controller_get_type (void) {
	static volatile gsize transaction_controller_type_id__volatile = 0;
	if (g_once_init_enter (&transaction_controller_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { value_transaction_controller_init, value_transaction_controller_free_value, value_transaction_controller_copy_value, value_transaction_controller_peek_pointer, "p", value_transaction_controller_collect_value, "p", value_transaction_controller_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (TransactionControllerClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) transaction_controller_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (TransactionController), 0, (GInstanceInitFunc) transaction_controller_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 transaction_controller_type_id;
		transaction_controller_type_id = g_type_register_fundamental (g_type_fundamental_next (), "TransactionController", &g_define_type_info, &g_define_type_fundamental_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&transaction_controller_type_id__volatile, transaction_controller_type_id);
	}
	return transaction_controller_type_id__volatile;
}


gpointer transaction_controller_ref (gpointer instance) {
	TransactionController* self;
	self = instance;
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_atomic_int_inc (&self->ref_count);
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	return instance;
#line 841 "MediaInterfaces.c"
}


void transaction_controller_unref (gpointer instance) {
	TransactionController* self;
	self = instance;
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		TRANSACTION_CONTROLLER_GET_CLASS (self)->finalize (self);
#line 51 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 854 "MediaInterfaces.c"
	}
}


gboolean flaggable_is_flagged (Flaggable* self) {
#line 115 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_val_if_fail (IS_FLAGGABLE (self), FALSE);
#line 115 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	return FLAGGABLE_GET_INTERFACE (self)->is_flagged (self);
#line 864 "MediaInterfaces.c"
}


void flaggable_mark_flagged (Flaggable* self) {
#line 117 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail (IS_FLAGGABLE (self));
#line 117 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	FLAGGABLE_GET_INTERFACE (self)->mark_flagged (self);
#line 873 "MediaInterfaces.c"
}


void flaggable_mark_unflagged (Flaggable* self) {
#line 119 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail (IS_FLAGGABLE (self));
#line 119 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	FLAGGABLE_GET_INTERFACE (self)->mark_unflagged (self);
#line 882 "MediaInterfaces.c"
}


void flaggable_mark_many_flagged_unflagged (GeeCollection* flag, GeeCollection* unflag, TransactionController* controller, GError** error) {
	TransactionController* _tmp0_ = NULL;
	GeeCollection* _tmp1_ = NULL;
	GeeCollection* _tmp9_ = NULL;
	TransactionController* _tmp17_ = NULL;
#line 121 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail ((flag == NULL) || GEE_IS_COLLECTION (flag));
#line 121 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail ((unflag == NULL) || GEE_IS_COLLECTION (unflag));
#line 121 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail (IS_TRANSACTION_CONTROLLER (controller));
#line 123 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	_tmp0_ = controller;
#line 123 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	transaction_controller_begin (_tmp0_);
#line 125 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	_tmp1_ = flag;
#line 125 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	if (_tmp1_ != NULL) {
#line 905 "MediaInterfaces.c"
		{
			GeeIterator* _flaggable_it = NULL;
			GeeCollection* _tmp2_ = NULL;
			GeeIterator* _tmp3_ = NULL;
#line 126 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_tmp2_ = flag;
#line 126 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_tmp3_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ITERABLE, GeeIterable));
#line 126 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_flaggable_it = _tmp3_;
#line 126 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			while (TRUE) {
#line 918 "MediaInterfaces.c"
				GeeIterator* _tmp4_ = NULL;
				gboolean _tmp5_ = FALSE;
				Flaggable* flaggable = NULL;
				GeeIterator* _tmp6_ = NULL;
				gpointer _tmp7_ = NULL;
				Flaggable* _tmp8_ = NULL;
#line 126 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp4_ = _flaggable_it;
#line 126 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp5_ = gee_iterator_next (_tmp4_);
#line 126 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				if (!_tmp5_) {
#line 126 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					break;
#line 933 "MediaInterfaces.c"
				}
#line 126 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp6_ = _flaggable_it;
#line 126 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp7_ = gee_iterator_get (_tmp6_);
#line 126 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				flaggable = (Flaggable*) _tmp7_;
#line 127 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp8_ = flaggable;
#line 127 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				flaggable_mark_flagged (_tmp8_);
#line 126 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_g_object_unref0 (flaggable);
#line 947 "MediaInterfaces.c"
			}
#line 126 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_g_object_unref0 (_flaggable_it);
#line 951 "MediaInterfaces.c"
		}
	}
#line 130 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	_tmp9_ = unflag;
#line 130 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	if (_tmp9_ != NULL) {
#line 958 "MediaInterfaces.c"
		{
			GeeIterator* _flaggable_it = NULL;
			GeeCollection* _tmp10_ = NULL;
			GeeIterator* _tmp11_ = NULL;
#line 131 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_tmp10_ = unflag;
#line 131 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_tmp11_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ITERABLE, GeeIterable));
#line 131 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_flaggable_it = _tmp11_;
#line 131 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			while (TRUE) {
#line 971 "MediaInterfaces.c"
				GeeIterator* _tmp12_ = NULL;
				gboolean _tmp13_ = FALSE;
				Flaggable* flaggable = NULL;
				GeeIterator* _tmp14_ = NULL;
				gpointer _tmp15_ = NULL;
				Flaggable* _tmp16_ = NULL;
#line 131 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp12_ = _flaggable_it;
#line 131 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp13_ = gee_iterator_next (_tmp12_);
#line 131 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				if (!_tmp13_) {
#line 131 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					break;
#line 986 "MediaInterfaces.c"
				}
#line 131 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp14_ = _flaggable_it;
#line 131 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp15_ = gee_iterator_get (_tmp14_);
#line 131 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				flaggable = (Flaggable*) _tmp15_;
#line 132 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp16_ = flaggable;
#line 132 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				flaggable_mark_unflagged (_tmp16_);
#line 131 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_g_object_unref0 (flaggable);
#line 1000 "MediaInterfaces.c"
			}
#line 131 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_g_object_unref0 (_flaggable_it);
#line 1004 "MediaInterfaces.c"
		}
	}
#line 135 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	_tmp17_ = controller;
#line 135 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	transaction_controller_commit (_tmp17_);
#line 1011 "MediaInterfaces.c"
}


static void flaggable_base_init (FlaggableIface * iface) {
#line 114 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	static gboolean initialized = FALSE;
#line 114 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	if (!initialized) {
#line 114 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		initialized = TRUE;
#line 1022 "MediaInterfaces.c"
	}
}


GType flaggable_get_type (void) {
	static volatile gsize flaggable_type_id__volatile = 0;
	if (g_once_init_enter (&flaggable_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (FlaggableIface), (GBaseInitFunc) flaggable_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType flaggable_type_id;
		flaggable_type_id = g_type_register_static (G_TYPE_INTERFACE, "Flaggable", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (flaggable_type_id, TYPE_MEDIA_SOURCE);
		g_once_init_leave (&flaggable_type_id__volatile, flaggable_type_id);
	}
	return flaggable_type_id__volatile;
}


gboolean monitorable_is_offline (Monitorable* self) {
#line 153 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_val_if_fail (IS_MONITORABLE (self), FALSE);
#line 153 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	return MONITORABLE_GET_INTERFACE (self)->is_offline (self);
#line 1045 "MediaInterfaces.c"
}


void monitorable_mark_online (Monitorable* self) {
#line 155 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail (IS_MONITORABLE (self));
#line 155 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	MONITORABLE_GET_INTERFACE (self)->mark_online (self);
#line 1054 "MediaInterfaces.c"
}


void monitorable_mark_offline (Monitorable* self) {
#line 157 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail (IS_MONITORABLE (self));
#line 157 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	MONITORABLE_GET_INTERFACE (self)->mark_offline (self);
#line 1063 "MediaInterfaces.c"
}


void monitorable_mark_many_online_offline (GeeCollection* online, GeeCollection* offline, TransactionController* controller, GError** error) {
	TransactionController* _tmp0_ = NULL;
	GeeCollection* _tmp1_ = NULL;
	GeeCollection* _tmp9_ = NULL;
	TransactionController* _tmp17_ = NULL;
#line 159 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail ((online == NULL) || GEE_IS_COLLECTION (online));
#line 159 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail ((offline == NULL) || GEE_IS_COLLECTION (offline));
#line 159 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail (IS_TRANSACTION_CONTROLLER (controller));
#line 161 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	_tmp0_ = controller;
#line 161 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	transaction_controller_begin (_tmp0_);
#line 163 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	_tmp1_ = online;
#line 163 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	if (_tmp1_ != NULL) {
#line 1086 "MediaInterfaces.c"
		{
			GeeIterator* _monitorable_it = NULL;
			GeeCollection* _tmp2_ = NULL;
			GeeIterator* _tmp3_ = NULL;
#line 164 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_tmp2_ = online;
#line 164 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_tmp3_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_ITERABLE, GeeIterable));
#line 164 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_monitorable_it = _tmp3_;
#line 164 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			while (TRUE) {
#line 1099 "MediaInterfaces.c"
				GeeIterator* _tmp4_ = NULL;
				gboolean _tmp5_ = FALSE;
				Monitorable* monitorable = NULL;
				GeeIterator* _tmp6_ = NULL;
				gpointer _tmp7_ = NULL;
				Monitorable* _tmp8_ = NULL;
#line 164 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp4_ = _monitorable_it;
#line 164 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp5_ = gee_iterator_next (_tmp4_);
#line 164 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				if (!_tmp5_) {
#line 164 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					break;
#line 1114 "MediaInterfaces.c"
				}
#line 164 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp6_ = _monitorable_it;
#line 164 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp7_ = gee_iterator_get (_tmp6_);
#line 164 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				monitorable = (Monitorable*) _tmp7_;
#line 165 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp8_ = monitorable;
#line 165 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				monitorable_mark_online (_tmp8_);
#line 164 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_g_object_unref0 (monitorable);
#line 1128 "MediaInterfaces.c"
			}
#line 164 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_g_object_unref0 (_monitorable_it);
#line 1132 "MediaInterfaces.c"
		}
	}
#line 168 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	_tmp9_ = offline;
#line 168 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	if (_tmp9_ != NULL) {
#line 1139 "MediaInterfaces.c"
		{
			GeeIterator* _monitorable_it = NULL;
			GeeCollection* _tmp10_ = NULL;
			GeeIterator* _tmp11_ = NULL;
#line 169 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_tmp10_ = offline;
#line 169 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_tmp11_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_ITERABLE, GeeIterable));
#line 169 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_monitorable_it = _tmp11_;
#line 169 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			while (TRUE) {
#line 1152 "MediaInterfaces.c"
				GeeIterator* _tmp12_ = NULL;
				gboolean _tmp13_ = FALSE;
				Monitorable* monitorable = NULL;
				GeeIterator* _tmp14_ = NULL;
				gpointer _tmp15_ = NULL;
				Monitorable* _tmp16_ = NULL;
#line 169 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp12_ = _monitorable_it;
#line 169 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp13_ = gee_iterator_next (_tmp12_);
#line 169 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				if (!_tmp13_) {
#line 169 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
					break;
#line 1167 "MediaInterfaces.c"
				}
#line 169 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp14_ = _monitorable_it;
#line 169 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp15_ = gee_iterator_get (_tmp14_);
#line 169 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				monitorable = (Monitorable*) _tmp15_;
#line 170 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_tmp16_ = monitorable;
#line 170 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				monitorable_mark_offline (_tmp16_);
#line 169 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
				_g_object_unref0 (monitorable);
#line 1181 "MediaInterfaces.c"
			}
#line 169 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			_g_object_unref0 (_monitorable_it);
#line 1185 "MediaInterfaces.c"
		}
	}
#line 173 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	_tmp17_ = controller;
#line 173 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	transaction_controller_commit (_tmp17_);
#line 1192 "MediaInterfaces.c"
}


void monitorable_set_master_file (Monitorable* self, GFile* file) {
#line 176 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail (IS_MONITORABLE (self));
#line 176 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	MONITORABLE_GET_INTERFACE (self)->set_master_file (self, file);
#line 1201 "MediaInterfaces.c"
}


void monitorable_set_many_master_file (GeeMap* map, TransactionController* controller, GError** error) {
	TransactionController* _tmp0_ = NULL;
	GeeMapIterator* map_iter = NULL;
	GeeMap* _tmp1_ = NULL;
	GeeMapIterator* _tmp2_ = NULL;
	TransactionController* _tmp11_ = NULL;
#line 178 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail (GEE_IS_MAP (map));
#line 178 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail (IS_TRANSACTION_CONTROLLER (controller));
#line 180 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	_tmp0_ = controller;
#line 180 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	transaction_controller_begin (_tmp0_);
#line 182 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	_tmp1_ = map;
#line 182 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	_tmp2_ = gee_map_map_iterator (_tmp1_);
#line 182 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	map_iter = _tmp2_;
#line 183 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	while (TRUE) {
#line 1227 "MediaInterfaces.c"
		GeeMapIterator* _tmp3_ = NULL;
		gboolean _tmp4_ = FALSE;
		GeeMapIterator* _tmp5_ = NULL;
		gpointer _tmp6_ = NULL;
		Monitorable* _tmp7_ = NULL;
		GeeMapIterator* _tmp8_ = NULL;
		gpointer _tmp9_ = NULL;
		GFile* _tmp10_ = NULL;
#line 183 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_tmp3_ = map_iter;
#line 183 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_tmp4_ = gee_map_iterator_next (_tmp3_);
#line 183 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		if (!_tmp4_) {
#line 183 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			break;
#line 1244 "MediaInterfaces.c"
		}
#line 184 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_tmp5_ = map_iter;
#line 184 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_tmp6_ = gee_map_iterator_get_key (_tmp5_);
#line 184 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_tmp7_ = (Monitorable*) _tmp6_;
#line 184 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_tmp8_ = map_iter;
#line 184 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_tmp9_ = gee_map_iterator_get_value (_tmp8_);
#line 184 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_tmp10_ = (GFile*) _tmp9_;
#line 184 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		monitorable_set_master_file (_tmp7_, _tmp10_);
#line 184 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_g_object_unref0 (_tmp10_);
#line 184 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_g_object_unref0 (_tmp7_);
#line 1264 "MediaInterfaces.c"
	}
#line 186 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	_tmp11_ = controller;
#line 186 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	transaction_controller_commit (_tmp11_);
#line 178 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	_g_object_unref0 (map_iter);
#line 1272 "MediaInterfaces.c"
}


void monitorable_set_master_timestamp (Monitorable* self, GFileInfo* info) {
#line 189 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail (IS_MONITORABLE (self));
#line 189 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	MONITORABLE_GET_INTERFACE (self)->set_master_timestamp (self, info);
#line 1281 "MediaInterfaces.c"
}


void monitorable_set_many_master_timestamp (GeeMap* map, TransactionController* controller, GError** error) {
	TransactionController* _tmp0_ = NULL;
	GeeMapIterator* map_iter = NULL;
	GeeMap* _tmp1_ = NULL;
	GeeMapIterator* _tmp2_ = NULL;
	TransactionController* _tmp11_ = NULL;
#line 191 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail (GEE_IS_MAP (map));
#line 191 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail (IS_TRANSACTION_CONTROLLER (controller));
#line 193 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	_tmp0_ = controller;
#line 193 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	transaction_controller_begin (_tmp0_);
#line 195 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	_tmp1_ = map;
#line 195 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	_tmp2_ = gee_map_map_iterator (_tmp1_);
#line 195 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	map_iter = _tmp2_;
#line 196 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	while (TRUE) {
#line 1307 "MediaInterfaces.c"
		GeeMapIterator* _tmp3_ = NULL;
		gboolean _tmp4_ = FALSE;
		GeeMapIterator* _tmp5_ = NULL;
		gpointer _tmp6_ = NULL;
		Monitorable* _tmp7_ = NULL;
		GeeMapIterator* _tmp8_ = NULL;
		gpointer _tmp9_ = NULL;
		GFileInfo* _tmp10_ = NULL;
#line 196 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_tmp3_ = map_iter;
#line 196 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_tmp4_ = gee_map_iterator_next (_tmp3_);
#line 196 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		if (!_tmp4_) {
#line 196 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
			break;
#line 1324 "MediaInterfaces.c"
		}
#line 197 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_tmp5_ = map_iter;
#line 197 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_tmp6_ = gee_map_iterator_get_key (_tmp5_);
#line 197 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_tmp7_ = (Monitorable*) _tmp6_;
#line 197 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_tmp8_ = map_iter;
#line 197 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_tmp9_ = gee_map_iterator_get_value (_tmp8_);
#line 197 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_tmp10_ = (GFileInfo*) _tmp9_;
#line 197 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		monitorable_set_master_timestamp (_tmp7_, _tmp10_);
#line 197 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_g_object_unref0 (_tmp10_);
#line 197 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		_g_object_unref0 (_tmp7_);
#line 1344 "MediaInterfaces.c"
	}
#line 199 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	_tmp11_ = controller;
#line 199 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	transaction_controller_commit (_tmp11_);
#line 191 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	_g_object_unref0 (map_iter);
#line 1352 "MediaInterfaces.c"
}


static void monitorable_base_init (MonitorableIface * iface) {
#line 152 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	static gboolean initialized = FALSE;
#line 152 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	if (!initialized) {
#line 152 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		initialized = TRUE;
#line 1363 "MediaInterfaces.c"
	}
}


GType monitorable_get_type (void) {
	static volatile gsize monitorable_type_id__volatile = 0;
	if (g_once_init_enter (&monitorable_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (MonitorableIface), (GBaseInitFunc) monitorable_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType monitorable_type_id;
		monitorable_type_id = g_type_register_static (G_TYPE_INTERFACE, "Monitorable", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (monitorable_type_id, TYPE_MEDIA_SOURCE);
		g_once_init_leave (&monitorable_type_id__volatile, monitorable_type_id);
	}
	return monitorable_type_id__volatile;
}


void dateable_set_exposure_time (Dateable* self, time_t target_time) {
#line 212 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_if_fail (IS_DATEABLE (self));
#line 212 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	DATEABLE_GET_INTERFACE (self)->set_exposure_time (self, target_time);
#line 1386 "MediaInterfaces.c"
}


time_t dateable_get_exposure_time (Dateable* self) {
#line 214 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	g_return_val_if_fail (IS_DATEABLE (self), 0);
#line 214 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	return DATEABLE_GET_INTERFACE (self)->get_exposure_time (self);
#line 1395 "MediaInterfaces.c"
}


static void dateable_base_init (DateableIface * iface) {
#line 211 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	static gboolean initialized = FALSE;
#line 211 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
	if (!initialized) {
#line 211 "/home/jens/Source/shotwell/src/MediaInterfaces.vala"
		initialized = TRUE;
#line 1406 "MediaInterfaces.c"
	}
}


GType dateable_get_type (void) {
	static volatile gsize dateable_type_id__volatile = 0;
	if (g_once_init_enter (&dateable_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (DateableIface), (GBaseInitFunc) dateable_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) NULL, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
		GType dateable_type_id;
		dateable_type_id = g_type_register_static (G_TYPE_INTERFACE, "Dateable", &g_define_type_info, 0);
		g_type_interface_add_prerequisite (dateable_type_id, TYPE_MEDIA_SOURCE);
		g_once_init_leave (&dateable_type_id__volatile, dateable_type_id);
	}
	return dateable_type_id__volatile;
}