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


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

typedef struct _MediaMetadata MediaMetadata;
typedef struct _MediaMetadataClass MediaMetadataClass;
typedef struct _MediaMetadataPrivate MediaMetadataPrivate;

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

typedef struct _MetadataDateTime MetadataDateTime;
typedef struct _MetadataDateTimeClass MetadataDateTimeClass;
typedef struct _ParamSpecMediaMetadata ParamSpecMediaMetadata;

#define TYPE_METADATA_RATIONAL (metadata_rational_get_type ())
typedef struct _MetadataRational MetadataRational;
#define _g_free0(var) (var = (g_free (var), NULL))
typedef struct _MetadataDateTimePrivate MetadataDateTimePrivate;
#define _metadata_date_time_unref0(var) ((var == NULL) ? NULL : (var = (metadata_date_time_unref (var), NULL)))
typedef struct _ParamSpecMetadataDateTime ParamSpecMetadataDateTime;

struct _MediaMetadata {
	GTypeInstance parent_instance;
	volatile int ref_count;
	MediaMetadataPrivate * priv;
};

struct _MediaMetadataClass {
	GTypeClass parent_class;
	void (*finalize) (MediaMetadata *self);
	void (*read_from_file) (MediaMetadata* self, GFile* file, GError** error);
	MetadataDateTime* (*get_creation_date_time) (MediaMetadata* self);
	gchar* (*get_title) (MediaMetadata* self);
	gchar* (*get_comment) (MediaMetadata* self);
};

struct _ParamSpecMediaMetadata {
	GParamSpec parent_instance;
};

struct _MetadataRational {
	gint numerator;
	gint denominator;
};

typedef enum  {
	METADATA_DATE_TIME_ERROR_INVALID_FORMAT,
	METADATA_DATE_TIME_ERROR_UNSUPPORTED_FORMAT
} MetadataDateTimeError;
#define METADATA_DATE_TIME_ERROR metadata_date_time_error_quark ()
struct _MetadataDateTime {
	GTypeInstance parent_instance;
	volatile int ref_count;
	MetadataDateTimePrivate * priv;
};

struct _MetadataDateTimeClass {
	GTypeClass parent_class;
	void (*finalize) (MetadataDateTime *self);
};

struct _MetadataDateTimePrivate {
	time_t timestamp;
};

struct _ParamSpecMetadataDateTime {
	GParamSpec parent_instance;
};


static gpointer media_metadata_parent_class = NULL;
static gpointer metadata_date_time_parent_class = NULL;

gpointer media_metadata_ref (gpointer instance);
void media_metadata_unref (gpointer instance);
GParamSpec* param_spec_media_metadata (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_media_metadata (GValue* value, gpointer v_object);
void value_take_media_metadata (GValue* value, gpointer v_object);
gpointer value_get_media_metadata (const GValue* value);
GType media_metadata_get_type (void) G_GNUC_CONST;
gpointer metadata_date_time_ref (gpointer instance);
void metadata_date_time_unref (gpointer instance);
GParamSpec* param_spec_metadata_date_time (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_metadata_date_time (GValue* value, gpointer v_object);
void value_take_metadata_date_time (GValue* value, gpointer v_object);
gpointer value_get_metadata_date_time (const GValue* value);
GType metadata_date_time_get_type (void) G_GNUC_CONST;
enum  {
	MEDIA_METADATA_DUMMY_PROPERTY
};
MediaMetadata* media_metadata_construct (GType object_type);
void media_metadata_read_from_file (MediaMetadata* self, GFile* file, GError** error);
static void media_metadata_real_read_from_file (MediaMetadata* self, GFile* file, GError** error);
MetadataDateTime* media_metadata_get_creation_date_time (MediaMetadata* self);
static MetadataDateTime* media_metadata_real_get_creation_date_time (MediaMetadata* self);
gchar* media_metadata_get_title (MediaMetadata* self);
static gchar* media_metadata_real_get_title (MediaMetadata* self);
gchar* media_metadata_get_comment (MediaMetadata* self);
static gchar* media_metadata_real_get_comment (MediaMetadata* self);
static void media_metadata_finalize (MediaMetadata* obj);
GType metadata_rational_get_type (void) G_GNUC_CONST;
MetadataRational* metadata_rational_dup (const MetadataRational* self);
void metadata_rational_free (MetadataRational* self);
void metadata_rational_init (MetadataRational *self, gint numerator, gint denominator);
static gboolean metadata_rational_is_component_valid (MetadataRational *self, gint component);
gboolean metadata_rational_is_valid (MetadataRational *self);
gchar* metadata_rational_to_string (MetadataRational *self);
GQuark metadata_date_time_error_quark (void);
#define METADATA_DATE_TIME_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_METADATA_DATE_TIME, MetadataDateTimePrivate))
enum  {
	METADATA_DATE_TIME_DUMMY_PROPERTY
};
MetadataDateTime* metadata_date_time_new (time_t timestamp);
MetadataDateTime* metadata_date_time_construct (GType object_type, time_t timestamp);
MetadataDateTime* metadata_date_time_new_from_exif (const gchar* label, GError** error);
MetadataDateTime* metadata_date_time_construct_from_exif (GType object_type, const gchar* label, GError** error);
gboolean metadata_date_time_from_exif_date_time (const gchar* date_time, time_t* timestamp);
MetadataDateTime* metadata_date_time_new_from_iptc (const gchar* date, const gchar* time, GError** error);
MetadataDateTime* metadata_date_time_construct_from_iptc (GType object_type, const gchar* date, const gchar* time, GError** error);
MetadataDateTime* metadata_date_time_new_from_xmp (const gchar* label, GError** error);
MetadataDateTime* metadata_date_time_construct_from_xmp (GType object_type, const gchar* label, GError** error);
time_t metadata_date_time_get_timestamp (MetadataDateTime* self);
gchar* metadata_date_time_get_exif_label (MetadataDateTime* self);
gchar* metadata_date_time_to_exif_date_time (time_t timestamp);
gchar* metadata_date_time_get_xmp_label (MetadataDateTime* self);
gchar* metadata_date_time_to_string (MetadataDateTime* self);
static void metadata_date_time_finalize (MetadataDateTime* obj);


MediaMetadata* media_metadata_construct (GType object_type) {
	MediaMetadata* self = NULL;
#line 8 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	self = (MediaMetadata*) g_type_create_instance (object_type);
#line 8 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return self;
#line 164 "MediaMetadata.c"
}


static void media_metadata_real_read_from_file (MediaMetadata* self, GFile* file, GError** error) {
#line 11 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_critical ("Type `%s' does not implement abstract method `media_metadata_read_from_file'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 11 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return;
#line 173 "MediaMetadata.c"
}


void media_metadata_read_from_file (MediaMetadata* self, GFile* file, GError** error) {
#line 11 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_return_if_fail (IS_MEDIA_METADATA (self));
#line 11 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	MEDIA_METADATA_GET_CLASS (self)->read_from_file (self, file, error);
#line 182 "MediaMetadata.c"
}


static MetadataDateTime* media_metadata_real_get_creation_date_time (MediaMetadata* self) {
#line 13 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_critical ("Type `%s' does not implement abstract method `media_metadata_get_creation_date_time'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 13 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return NULL;
#line 191 "MediaMetadata.c"
}


MetadataDateTime* media_metadata_get_creation_date_time (MediaMetadata* self) {
#line 13 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_return_val_if_fail (IS_MEDIA_METADATA (self), NULL);
#line 13 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return MEDIA_METADATA_GET_CLASS (self)->get_creation_date_time (self);
#line 200 "MediaMetadata.c"
}


static gchar* media_metadata_real_get_title (MediaMetadata* self) {
#line 15 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_critical ("Type `%s' does not implement abstract method `media_metadata_get_title'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 15 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return NULL;
#line 209 "MediaMetadata.c"
}


gchar* media_metadata_get_title (MediaMetadata* self) {
#line 15 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_return_val_if_fail (IS_MEDIA_METADATA (self), NULL);
#line 15 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return MEDIA_METADATA_GET_CLASS (self)->get_title (self);
#line 218 "MediaMetadata.c"
}


static gchar* media_metadata_real_get_comment (MediaMetadata* self) {
#line 17 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_critical ("Type `%s' does not implement abstract method `media_metadata_get_comment'", g_type_name (G_TYPE_FROM_INSTANCE (self)));
#line 17 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return NULL;
#line 227 "MediaMetadata.c"
}


gchar* media_metadata_get_comment (MediaMetadata* self) {
#line 17 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_return_val_if_fail (IS_MEDIA_METADATA (self), NULL);
#line 17 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return MEDIA_METADATA_GET_CLASS (self)->get_comment (self);
#line 236 "MediaMetadata.c"
}


static void value_media_metadata_init (GValue* value) {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	value->data[0].v_pointer = NULL;
#line 243 "MediaMetadata.c"
}


static void value_media_metadata_free_value (GValue* value) {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (value->data[0].v_pointer) {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		media_metadata_unref (value->data[0].v_pointer);
#line 252 "MediaMetadata.c"
	}
}


static void value_media_metadata_copy_value (const GValue* src_value, GValue* dest_value) {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (src_value->data[0].v_pointer) {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		dest_value->data[0].v_pointer = media_metadata_ref (src_value->data[0].v_pointer);
#line 262 "MediaMetadata.c"
	} else {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		dest_value->data[0].v_pointer = NULL;
#line 266 "MediaMetadata.c"
	}
}


static gpointer value_media_metadata_peek_pointer (const GValue* value) {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return value->data[0].v_pointer;
#line 274 "MediaMetadata.c"
}


static gchar* value_media_metadata_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (collect_values[0].v_pointer) {
#line 281 "MediaMetadata.c"
		MediaMetadata* object;
		object = collect_values[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		if (object->parent_instance.g_class == NULL) {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 288 "MediaMetadata.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.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 292 "MediaMetadata.c"
		}
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		value->data[0].v_pointer = media_metadata_ref (object);
#line 296 "MediaMetadata.c"
	} else {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		value->data[0].v_pointer = NULL;
#line 300 "MediaMetadata.c"
	}
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return NULL;
#line 304 "MediaMetadata.c"
}


static gchar* value_media_metadata_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	MediaMetadata** object_p;
	object_p = collect_values[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (!object_p) {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 315 "MediaMetadata.c"
	}
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (!value->data[0].v_pointer) {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		*object_p = NULL;
#line 321 "MediaMetadata.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		*object_p = value->data[0].v_pointer;
#line 325 "MediaMetadata.c"
	} else {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		*object_p = media_metadata_ref (value->data[0].v_pointer);
#line 329 "MediaMetadata.c"
	}
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return NULL;
#line 333 "MediaMetadata.c"
}


GParamSpec* param_spec_media_metadata (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ParamSpecMediaMetadata* spec;
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_return_val_if_fail (g_type_is_a (object_type, TYPE_MEDIA_METADATA), NULL);
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return G_PARAM_SPEC (spec);
#line 347 "MediaMetadata.c"
}


gpointer value_get_media_metadata (const GValue* value) {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_MEDIA_METADATA), NULL);
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return value->data[0].v_pointer;
#line 356 "MediaMetadata.c"
}


void value_set_media_metadata (GValue* value, gpointer v_object) {
	MediaMetadata* old;
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_MEDIA_METADATA));
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	old = value->data[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (v_object) {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_MEDIA_METADATA));
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.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/MediaMetadata.vala"
		value->data[0].v_pointer = v_object;
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		media_metadata_ref (value->data[0].v_pointer);
#line 376 "MediaMetadata.c"
	} else {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		value->data[0].v_pointer = NULL;
#line 380 "MediaMetadata.c"
	}
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (old) {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		media_metadata_unref (old);
#line 386 "MediaMetadata.c"
	}
}


void value_take_media_metadata (GValue* value, gpointer v_object) {
	MediaMetadata* old;
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_MEDIA_METADATA));
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	old = value->data[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (v_object) {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_MEDIA_METADATA));
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.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/MediaMetadata.vala"
		value->data[0].v_pointer = v_object;
#line 405 "MediaMetadata.c"
	} else {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		value->data[0].v_pointer = NULL;
#line 409 "MediaMetadata.c"
	}
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (old) {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		media_metadata_unref (old);
#line 415 "MediaMetadata.c"
	}
}


static void media_metadata_class_init (MediaMetadataClass * klass) {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	media_metadata_parent_class = g_type_class_peek_parent (klass);
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	((MediaMetadataClass *) klass)->finalize = media_metadata_finalize;
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	((MediaMetadataClass *) klass)->read_from_file = media_metadata_real_read_from_file;
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	((MediaMetadataClass *) klass)->get_creation_date_time = media_metadata_real_get_creation_date_time;
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	((MediaMetadataClass *) klass)->get_title = media_metadata_real_get_title;
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	((MediaMetadataClass *) klass)->get_comment = media_metadata_real_get_comment;
#line 433 "MediaMetadata.c"
}


static void media_metadata_instance_init (MediaMetadata * self) {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	self->ref_count = 1;
#line 440 "MediaMetadata.c"
}


static void media_metadata_finalize (MediaMetadata* obj) {
	MediaMetadata * self;
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_MEDIA_METADATA, MediaMetadata);
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_signal_handlers_destroy (self);
#line 450 "MediaMetadata.c"
}


GType media_metadata_get_type (void) {
	static volatile gsize media_metadata_type_id__volatile = 0;
	if (g_once_init_enter (&media_metadata_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { value_media_metadata_init, value_media_metadata_free_value, value_media_metadata_copy_value, value_media_metadata_peek_pointer, "p", value_media_metadata_collect_value, "p", value_media_metadata_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (MediaMetadataClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) media_metadata_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MediaMetadata), 0, (GInstanceInitFunc) media_metadata_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 media_metadata_type_id;
		media_metadata_type_id = g_type_register_fundamental (g_type_fundamental_next (), "MediaMetadata", &g_define_type_info, &g_define_type_fundamental_info, G_TYPE_FLAG_ABSTRACT);
		g_once_init_leave (&media_metadata_type_id__volatile, media_metadata_type_id);
	}
	return media_metadata_type_id__volatile;
}


gpointer media_metadata_ref (gpointer instance) {
	MediaMetadata* self;
	self = instance;
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_atomic_int_inc (&self->ref_count);
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return instance;
#line 475 "MediaMetadata.c"
}


void media_metadata_unref (gpointer instance) {
	MediaMetadata* self;
	self = instance;
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		MEDIA_METADATA_GET_CLASS (self)->finalize (self);
#line 7 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 488 "MediaMetadata.c"
	}
}


void metadata_rational_init (MetadataRational *self, gint numerator, gint denominator) {
	gint _tmp0_ = 0;
	gint _tmp1_ = 0;
#line 24 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	memset (self, 0, sizeof (MetadataRational));
#line 25 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp0_ = numerator;
#line 25 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	(*self).numerator = _tmp0_;
#line 26 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp1_ = denominator;
#line 26 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	(*self).denominator = _tmp1_;
#line 506 "MediaMetadata.c"
}


static gboolean metadata_rational_is_component_valid (MetadataRational *self, gint component) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gint _tmp1_ = 0;
#line 30 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp1_ = component;
#line 30 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (_tmp1_ >= 0) {
#line 518 "MediaMetadata.c"
		gint _tmp2_ = 0;
#line 30 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp2_ = component;
#line 30 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp0_ = _tmp2_ <= 1000000;
#line 524 "MediaMetadata.c"
	} else {
#line 30 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp0_ = FALSE;
#line 528 "MediaMetadata.c"
	}
#line 30 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	result = _tmp0_;
#line 30 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return result;
#line 534 "MediaMetadata.c"
}


gboolean metadata_rational_is_valid (MetadataRational *self) {
	gboolean result = FALSE;
	gboolean _tmp0_ = FALSE;
	gint _tmp1_ = 0;
	gboolean _tmp2_ = FALSE;
#line 34 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp1_ = (*self).numerator;
#line 34 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp2_ = metadata_rational_is_component_valid (&(*self), _tmp1_);
#line 34 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (_tmp2_) {
#line 549 "MediaMetadata.c"
		gint _tmp3_ = 0;
		gboolean _tmp4_ = FALSE;
#line 34 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp3_ = (*self).denominator;
#line 34 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp4_ = metadata_rational_is_component_valid (&(*self), _tmp3_);
#line 34 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp0_ = _tmp4_;
#line 558 "MediaMetadata.c"
	} else {
#line 34 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp0_ = FALSE;
#line 562 "MediaMetadata.c"
	}
#line 34 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	result = _tmp0_;
#line 34 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return result;
#line 568 "MediaMetadata.c"
}


gchar* metadata_rational_to_string (MetadataRational *self) {
	gchar* result = NULL;
	gchar* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
#line 38 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp1_ = metadata_rational_is_valid (&(*self));
#line 38 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (_tmp1_) {
#line 580 "MediaMetadata.c"
		gint _tmp2_ = 0;
		gint _tmp3_ = 0;
		gchar* _tmp4_ = NULL;
#line 38 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp2_ = (*self).numerator;
#line 38 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp3_ = (*self).denominator;
#line 38 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp4_ = g_strdup_printf ("%d/%d", _tmp2_, _tmp3_);
#line 38 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_g_free0 (_tmp0_);
#line 38 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp0_ = _tmp4_;
#line 594 "MediaMetadata.c"
	} else {
		gchar* _tmp5_ = NULL;
#line 38 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp5_ = g_strdup ("");
#line 38 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_g_free0 (_tmp0_);
#line 38 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp0_ = _tmp5_;
#line 603 "MediaMetadata.c"
	}
#line 38 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	result = _tmp0_;
#line 38 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return result;
#line 609 "MediaMetadata.c"
}


MetadataRational* metadata_rational_dup (const MetadataRational* self) {
	MetadataRational* dup;
#line 20 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	dup = g_new0 (MetadataRational, 1);
#line 20 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	memcpy (dup, self, sizeof (MetadataRational));
#line 20 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return dup;
#line 621 "MediaMetadata.c"
}


void metadata_rational_free (MetadataRational* self) {
#line 20 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_free (self);
#line 628 "MediaMetadata.c"
}


GType metadata_rational_get_type (void) {
	static volatile gsize metadata_rational_type_id__volatile = 0;
	if (g_once_init_enter (&metadata_rational_type_id__volatile)) {
		GType metadata_rational_type_id;
		metadata_rational_type_id = g_boxed_type_register_static ("MetadataRational", (GBoxedCopyFunc) metadata_rational_dup, (GBoxedFreeFunc) metadata_rational_free);
		g_once_init_leave (&metadata_rational_type_id__volatile, metadata_rational_type_id);
	}
	return metadata_rational_type_id__volatile;
}


GQuark metadata_date_time_error_quark (void) {
	return g_quark_from_static_string ("metadata_date_time_error-quark");
}


MetadataDateTime* metadata_date_time_construct (GType object_type, time_t timestamp) {
	MetadataDateTime* self = NULL;
	time_t _tmp0_ = 0;
#line 51 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	self = (MetadataDateTime*) g_type_create_instance (object_type);
#line 52 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp0_ = timestamp;
#line 52 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	self->priv->timestamp = _tmp0_;
#line 51 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return self;
#line 659 "MediaMetadata.c"
}


MetadataDateTime* metadata_date_time_new (time_t timestamp) {
#line 51 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return metadata_date_time_construct (TYPE_METADATA_DATE_TIME, timestamp);
#line 666 "MediaMetadata.c"
}


MetadataDateTime* metadata_date_time_construct_from_exif (GType object_type, const gchar* label, GError** error) {
	MetadataDateTime* self = NULL;
	const gchar* _tmp0_ = NULL;
	time_t _tmp1_ = 0;
	gboolean _tmp2_ = FALSE;
	GError * _inner_error_ = NULL;
#line 55 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_return_val_if_fail (label != NULL, NULL);
#line 55 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	self = (MetadataDateTime*) g_type_create_instance (object_type);
#line 56 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp0_ = label;
#line 56 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp2_ = metadata_date_time_from_exif_date_time (_tmp0_, &_tmp1_);
#line 56 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	self->priv->timestamp = _tmp1_;
#line 56 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (!_tmp2_) {
#line 688 "MediaMetadata.c"
		const gchar* _tmp3_ = NULL;
		GError* _tmp4_ = NULL;
#line 57 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp3_ = label;
#line 57 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp4_ = g_error_new (METADATA_DATE_TIME_ERROR, METADATA_DATE_TIME_ERROR_INVALID_FORMAT, "%s is not EXIF format date/time", _tmp3_);
#line 57 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_inner_error_ = _tmp4_;
#line 57 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		if (_inner_error_->domain == METADATA_DATE_TIME_ERROR) {
#line 57 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
			g_propagate_error (error, _inner_error_);
#line 57 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
			_metadata_date_time_unref0 (self);
#line 57 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
			return NULL;
#line 705 "MediaMetadata.c"
		} else {
#line 57 "/home/jens/Source/shotwell/src/MediaMetadata.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 57 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
			g_clear_error (&_inner_error_);
#line 57 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
			return NULL;
#line 713 "MediaMetadata.c"
		}
	}
#line 55 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return self;
#line 718 "MediaMetadata.c"
}


MetadataDateTime* metadata_date_time_new_from_exif (const gchar* label, GError** error) {
#line 55 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return metadata_date_time_construct_from_exif (TYPE_METADATA_DATE_TIME, label, error);
#line 725 "MediaMetadata.c"
}


MetadataDateTime* metadata_date_time_construct_from_iptc (GType object_type, const gchar* date, const gchar* time, GError** error) {
	MetadataDateTime* self = NULL;
	GError* _tmp0_ = NULL;
	GError * _inner_error_ = NULL;
#line 60 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_return_val_if_fail (date != NULL, NULL);
#line 60 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_return_val_if_fail (time != NULL, NULL);
#line 60 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	self = (MetadataDateTime*) g_type_create_instance (object_type);
#line 62 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp0_ = g_error_new_literal (METADATA_DATE_TIME_ERROR, METADATA_DATE_TIME_ERROR_UNSUPPORTED_FORMAT, "IPTC date/time format not currently supported");
#line 62 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_inner_error_ = _tmp0_;
#line 62 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (_inner_error_->domain == METADATA_DATE_TIME_ERROR) {
#line 62 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		g_propagate_error (error, _inner_error_);
#line 62 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_metadata_date_time_unref0 (self);
#line 62 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		return NULL;
#line 751 "MediaMetadata.c"
	} else {
#line 62 "/home/jens/Source/shotwell/src/MediaMetadata.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 62 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		g_clear_error (&_inner_error_);
#line 62 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		return NULL;
#line 759 "MediaMetadata.c"
	}
#line 60 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return self;
#line 763 "MediaMetadata.c"
}


MetadataDateTime* metadata_date_time_new_from_iptc (const gchar* date, const gchar* time, GError** error) {
#line 60 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return metadata_date_time_construct_from_iptc (TYPE_METADATA_DATE_TIME, date, time, error);
#line 770 "MediaMetadata.c"
}


MetadataDateTime* metadata_date_time_construct_from_xmp (GType object_type, const gchar* label, GError** error) {
	MetadataDateTime* self = NULL;
	GTimeVal time_val = {0};
	const gchar* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	GTimeVal _tmp4_ = {0};
	glong _tmp5_ = 0L;
	GError * _inner_error_ = NULL;
#line 65 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_return_val_if_fail (label != NULL, NULL);
#line 65 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	self = (MetadataDateTime*) g_type_create_instance (object_type);
#line 66 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_get_current_time (&time_val);
#line 67 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp0_ = label;
#line 67 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp1_ = g_time_val_from_iso8601 (_tmp0_, &time_val);
#line 67 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (!_tmp1_) {
#line 794 "MediaMetadata.c"
		const gchar* _tmp2_ = NULL;
		GError* _tmp3_ = NULL;
#line 68 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp2_ = label;
#line 68 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp3_ = g_error_new (METADATA_DATE_TIME_ERROR, METADATA_DATE_TIME_ERROR_INVALID_FORMAT, "%s is not XMP format date/time", _tmp2_);
#line 68 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_inner_error_ = _tmp3_;
#line 68 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		if (_inner_error_->domain == METADATA_DATE_TIME_ERROR) {
#line 68 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
			g_propagate_error (error, _inner_error_);
#line 68 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
			_metadata_date_time_unref0 (self);
#line 68 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
			return NULL;
#line 811 "MediaMetadata.c"
		} else {
#line 68 "/home/jens/Source/shotwell/src/MediaMetadata.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 68 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
			g_clear_error (&_inner_error_);
#line 68 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
			return NULL;
#line 819 "MediaMetadata.c"
		}
	}
#line 70 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp4_ = time_val;
#line 70 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp5_ = _tmp4_.tv_sec;
#line 70 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	self->priv->timestamp = (time_t) _tmp5_;
#line 65 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return self;
#line 830 "MediaMetadata.c"
}


MetadataDateTime* metadata_date_time_new_from_xmp (const gchar* label, GError** error) {
#line 65 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return metadata_date_time_construct_from_xmp (TYPE_METADATA_DATE_TIME, label, error);
#line 837 "MediaMetadata.c"
}


time_t metadata_date_time_get_timestamp (MetadataDateTime* self) {
	time_t result = 0;
	time_t _tmp0_ = 0;
#line 73 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_return_val_if_fail (IS_METADATA_DATE_TIME (self), 0);
#line 74 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp0_ = self->priv->timestamp;
#line 74 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	result = _tmp0_;
#line 74 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return result;
#line 852 "MediaMetadata.c"
}


gchar* metadata_date_time_get_exif_label (MetadataDateTime* self) {
	gchar* result = NULL;
	time_t _tmp0_ = 0;
	gchar* _tmp1_ = NULL;
#line 77 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_return_val_if_fail (IS_METADATA_DATE_TIME (self), NULL);
#line 78 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp0_ = self->priv->timestamp;
#line 78 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp1_ = metadata_date_time_to_exif_date_time (_tmp0_);
#line 78 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	result = _tmp1_;
#line 78 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return result;
#line 870 "MediaMetadata.c"
}


gchar* metadata_date_time_get_xmp_label (MetadataDateTime* self) {
	gchar* result = NULL;
	GTimeVal time_val = {0};
	time_t _tmp0_ = 0;
	gchar* _tmp1_ = NULL;
#line 83 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_return_val_if_fail (IS_METADATA_DATE_TIME (self), NULL);
#line 84 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_get_current_time (&time_val);
#line 85 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp0_ = self->priv->timestamp;
#line 85 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	time_val.tv_sec = (glong) _tmp0_;
#line 86 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	time_val.tv_usec = (glong) 0;
#line 88 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp1_ = g_time_val_to_iso8601 (&time_val);
#line 88 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	result = _tmp1_;
#line 88 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return result;
#line 895 "MediaMetadata.c"
}


gboolean metadata_date_time_from_exif_date_time (const gchar* date_time, time_t* timestamp) {
	time_t _vala_timestamp = 0;
	gboolean result = FALSE;
	struct tm tm = {0};
	const gchar* _tmp0_ = NULL;
	gint _tmp1_ = 0;
	gboolean _tmp7_ = FALSE;
	gboolean _tmp8_ = FALSE;
	gboolean _tmp9_ = FALSE;
	gboolean _tmp10_ = FALSE;
	gboolean _tmp11_ = FALSE;
	struct tm _tmp12_ = {0};
	gint _tmp13_ = 0;
	gint _tmp24_ = 0;
	gint _tmp25_ = 0;
	time_t _tmp26_ = 0;
#line 91 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_return_val_if_fail (date_time != NULL, FALSE);
#line 92 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_vala_timestamp = (time_t) 0;
#line 94 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	memset (&tm, 0, sizeof (struct tm));
#line 97 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp0_ = date_time;
#line 97 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp1_ = sscanf (_tmp0_, "%d:%d:%d %d:%d:%d", &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec);
#line 97 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (_tmp1_ != 6) {
#line 927 "MediaMetadata.c"
		gchar* tmp = NULL;
		const gchar* _tmp2_ = NULL;
		gchar* _tmp3_ = NULL;
		const gchar* _tmp4_ = NULL;
		const gchar* _tmp5_ = NULL;
		gint _tmp6_ = 0;
#line 100 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp2_ = date_time;
#line 100 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp3_ = g_strdup (_tmp2_);
#line 100 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		tmp = _tmp3_;
#line 101 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp4_ = tmp;
#line 101 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		g_strcanon (_tmp4_, "0123456789", ' ');
#line 102 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp5_ = tmp;
#line 102 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp6_ = sscanf (_tmp5_, "%4d%2d%2d%2d%2d%2d", &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &tm.tm_hour, &tm.tm_min, &tm.tm_sec);
#line 102 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		if (_tmp6_ != 6) {
#line 104 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
			result = FALSE;
#line 104 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
			_g_free0 (tmp);
#line 104 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
			if (timestamp) {
#line 104 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
				*timestamp = _vala_timestamp;
#line 958 "MediaMetadata.c"
			}
#line 104 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
			return result;
#line 962 "MediaMetadata.c"
		}
#line 97 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_g_free0 (tmp);
#line 966 "MediaMetadata.c"
	}
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp12_ = tm;
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp13_ = _tmp12_.tm_year;
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (_tmp13_ <= 1900) {
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp11_ = TRUE;
#line 976 "MediaMetadata.c"
	} else {
		struct tm _tmp14_ = {0};
		gint _tmp15_ = 0;
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp14_ = tm;
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp15_ = _tmp14_.tm_mon;
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp11_ = _tmp15_ <= 0;
#line 986 "MediaMetadata.c"
	}
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (_tmp11_) {
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp10_ = TRUE;
#line 992 "MediaMetadata.c"
	} else {
		struct tm _tmp16_ = {0};
		gint _tmp17_ = 0;
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp16_ = tm;
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp17_ = _tmp16_.tm_mday;
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp10_ = _tmp17_ < 0;
#line 1002 "MediaMetadata.c"
	}
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (_tmp10_) {
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp9_ = TRUE;
#line 1008 "MediaMetadata.c"
	} else {
		struct tm _tmp18_ = {0};
		gint _tmp19_ = 0;
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp18_ = tm;
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp19_ = _tmp18_.tm_hour;
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp9_ = _tmp19_ < 0;
#line 1018 "MediaMetadata.c"
	}
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (_tmp9_) {
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp8_ = TRUE;
#line 1024 "MediaMetadata.c"
	} else {
		struct tm _tmp20_ = {0};
		gint _tmp21_ = 0;
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp20_ = tm;
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp21_ = _tmp20_.tm_min;
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp8_ = _tmp21_ < 0;
#line 1034 "MediaMetadata.c"
	}
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (_tmp8_) {
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp7_ = TRUE;
#line 1040 "MediaMetadata.c"
	} else {
		struct tm _tmp22_ = {0};
		gint _tmp23_ = 0;
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp22_ = tm;
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp23_ = _tmp22_.tm_sec;
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		_tmp7_ = _tmp23_ < 0;
#line 1050 "MediaMetadata.c"
	}
#line 108 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (_tmp7_) {
#line 109 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		result = FALSE;
#line 109 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		if (timestamp) {
#line 109 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
			*timestamp = _vala_timestamp;
#line 1060 "MediaMetadata.c"
		}
#line 109 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		return result;
#line 1064 "MediaMetadata.c"
	}
#line 111 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp24_ = tm.tm_year;
#line 111 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	tm.tm_year = _tmp24_ - 1900;
#line 112 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp25_ = tm.tm_mon;
#line 112 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	tm.tm_mon = _tmp25_ - 1;
#line 113 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	tm.tm_isdst = -1;
#line 115 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp26_ = mktime (&tm);
#line 115 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_vala_timestamp = _tmp26_;
#line 117 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	result = TRUE;
#line 117 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (timestamp) {
#line 117 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		*timestamp = _vala_timestamp;
#line 1086 "MediaMetadata.c"
	}
#line 117 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return result;
#line 1090 "MediaMetadata.c"
}


static void g_time_local (time_t time, struct tm* result) {
	struct tm _result_ = {0};
	struct tm _tmp0_ = {0};
#line 2750 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	localtime_r (&time, &_tmp0_);
#line 2750 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_result_ = _tmp0_;
#line 2751 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	*result = _result_;
#line 2751 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	return;
#line 1105 "MediaMetadata.c"
}


static gchar* g_time_format (struct tm *self, const gchar* format) {
	gchar* result = NULL;
	gchar* buffer = NULL;
	gchar* _tmp0_ = NULL;
	gint buffer_length1 = 0;
	gint _buffer_size_ = 0;
	gchar* _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	const gchar* _tmp2_ = NULL;
	gchar* _tmp3_ = NULL;
	gint _tmp3__length1 = 0;
	gchar* _tmp4_ = NULL;
#line 2758 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	g_return_val_if_fail (format != NULL, NULL);
#line 2759 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp0_ = g_new0 (gchar, 64);
#line 2759 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	buffer = _tmp0_;
#line 2759 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	buffer_length1 = 64;
#line 2759 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_buffer_size_ = buffer_length1;
#line 2760 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp1_ = buffer;
#line 2760 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp1__length1 = buffer_length1;
#line 2760 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp2_ = format;
#line 2760 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	strftime (_tmp1_, _tmp1__length1, _tmp2_, &(*self));
#line 2761 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp3_ = buffer;
#line 2761 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp3__length1 = buffer_length1;
#line 2761 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	_tmp4_ = g_strdup ((const gchar*) _tmp3_);
#line 2761 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	result = _tmp4_;
#line 2761 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	buffer = (g_free (buffer), NULL);
#line 2761 "/usr/share/vala-0.34/vapi/glib-2.0.vapi"
	return result;
#line 1151 "MediaMetadata.c"
}


gchar* metadata_date_time_to_exif_date_time (time_t timestamp) {
	gchar* result = NULL;
	time_t _tmp0_ = 0;
	struct tm _tmp1_ = {0};
	gchar* _tmp2_ = NULL;
#line 121 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp0_ = timestamp;
#line 121 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_time_local (_tmp0_, &_tmp1_);
#line 121 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp2_ = g_time_format (&_tmp1_, "%Y:%m:%d %H:%M:%S");
#line 121 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	result = _tmp2_;
#line 121 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return result;
#line 1170 "MediaMetadata.c"
}


gchar* metadata_date_time_to_string (MetadataDateTime* self) {
	gchar* result = NULL;
	time_t _tmp0_ = 0;
	gchar* _tmp1_ = NULL;
#line 124 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_return_val_if_fail (IS_METADATA_DATE_TIME (self), NULL);
#line 125 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp0_ = self->priv->timestamp;
#line 125 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	_tmp1_ = metadata_date_time_to_exif_date_time (_tmp0_);
#line 125 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	result = _tmp1_;
#line 125 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return result;
#line 1188 "MediaMetadata.c"
}


static void value_metadata_date_time_init (GValue* value) {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	value->data[0].v_pointer = NULL;
#line 1195 "MediaMetadata.c"
}


static void value_metadata_date_time_free_value (GValue* value) {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (value->data[0].v_pointer) {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		metadata_date_time_unref (value->data[0].v_pointer);
#line 1204 "MediaMetadata.c"
	}
}


static void value_metadata_date_time_copy_value (const GValue* src_value, GValue* dest_value) {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (src_value->data[0].v_pointer) {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		dest_value->data[0].v_pointer = metadata_date_time_ref (src_value->data[0].v_pointer);
#line 1214 "MediaMetadata.c"
	} else {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		dest_value->data[0].v_pointer = NULL;
#line 1218 "MediaMetadata.c"
	}
}


static gpointer value_metadata_date_time_peek_pointer (const GValue* value) {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return value->data[0].v_pointer;
#line 1226 "MediaMetadata.c"
}


static gchar* value_metadata_date_time_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (collect_values[0].v_pointer) {
#line 1233 "MediaMetadata.c"
		MetadataDateTime* object;
		object = collect_values[0].v_pointer;
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		if (object->parent_instance.g_class == NULL) {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 1240 "MediaMetadata.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.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 1244 "MediaMetadata.c"
		}
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		value->data[0].v_pointer = metadata_date_time_ref (object);
#line 1248 "MediaMetadata.c"
	} else {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		value->data[0].v_pointer = NULL;
#line 1252 "MediaMetadata.c"
	}
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return NULL;
#line 1256 "MediaMetadata.c"
}


static gchar* value_metadata_date_time_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	MetadataDateTime** object_p;
	object_p = collect_values[0].v_pointer;
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (!object_p) {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 1267 "MediaMetadata.c"
	}
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (!value->data[0].v_pointer) {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		*object_p = NULL;
#line 1273 "MediaMetadata.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		*object_p = value->data[0].v_pointer;
#line 1277 "MediaMetadata.c"
	} else {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		*object_p = metadata_date_time_ref (value->data[0].v_pointer);
#line 1281 "MediaMetadata.c"
	}
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return NULL;
#line 1285 "MediaMetadata.c"
}


GParamSpec* param_spec_metadata_date_time (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ParamSpecMetadataDateTime* spec;
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_return_val_if_fail (g_type_is_a (object_type, TYPE_METADATA_DATE_TIME), NULL);
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return G_PARAM_SPEC (spec);
#line 1299 "MediaMetadata.c"
}


gpointer value_get_metadata_date_time (const GValue* value) {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_METADATA_DATE_TIME), NULL);
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return value->data[0].v_pointer;
#line 1308 "MediaMetadata.c"
}


void value_set_metadata_date_time (GValue* value, gpointer v_object) {
	MetadataDateTime* old;
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_METADATA_DATE_TIME));
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	old = value->data[0].v_pointer;
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (v_object) {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_METADATA_DATE_TIME));
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		value->data[0].v_pointer = v_object;
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		metadata_date_time_ref (value->data[0].v_pointer);
#line 1328 "MediaMetadata.c"
	} else {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		value->data[0].v_pointer = NULL;
#line 1332 "MediaMetadata.c"
	}
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (old) {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		metadata_date_time_unref (old);
#line 1338 "MediaMetadata.c"
	}
}


void value_take_metadata_date_time (GValue* value, gpointer v_object) {
	MetadataDateTime* old;
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_METADATA_DATE_TIME));
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	old = value->data[0].v_pointer;
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (v_object) {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_METADATA_DATE_TIME));
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		g_return_if_fail (g_value_type_compatible (G_TYPE_FROM_INSTANCE (v_object), G_VALUE_TYPE (value)));
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		value->data[0].v_pointer = v_object;
#line 1357 "MediaMetadata.c"
	} else {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		value->data[0].v_pointer = NULL;
#line 1361 "MediaMetadata.c"
	}
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (old) {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		metadata_date_time_unref (old);
#line 1367 "MediaMetadata.c"
	}
}


static void metadata_date_time_class_init (MetadataDateTimeClass * klass) {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	metadata_date_time_parent_class = g_type_class_peek_parent (klass);
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	((MetadataDateTimeClass *) klass)->finalize = metadata_date_time_finalize;
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_type_class_add_private (klass, sizeof (MetadataDateTimePrivate));
#line 1379 "MediaMetadata.c"
}


static void metadata_date_time_instance_init (MetadataDateTime * self) {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	self->priv = METADATA_DATE_TIME_GET_PRIVATE (self);
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	self->ref_count = 1;
#line 1388 "MediaMetadata.c"
}


static void metadata_date_time_finalize (MetadataDateTime* obj) {
	MetadataDateTime * self;
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_METADATA_DATE_TIME, MetadataDateTime);
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_signal_handlers_destroy (self);
#line 1398 "MediaMetadata.c"
}


GType metadata_date_time_get_type (void) {
	static volatile gsize metadata_date_time_type_id__volatile = 0;
	if (g_once_init_enter (&metadata_date_time_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { value_metadata_date_time_init, value_metadata_date_time_free_value, value_metadata_date_time_copy_value, value_metadata_date_time_peek_pointer, "p", value_metadata_date_time_collect_value, "p", value_metadata_date_time_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (MetadataDateTimeClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) metadata_date_time_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (MetadataDateTime), 0, (GInstanceInitFunc) metadata_date_time_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 metadata_date_time_type_id;
		metadata_date_time_type_id = g_type_register_fundamental (g_type_fundamental_next (), "MetadataDateTime", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&metadata_date_time_type_id__volatile, metadata_date_time_type_id);
	}
	return metadata_date_time_type_id__volatile;
}


gpointer metadata_date_time_ref (gpointer instance) {
	MetadataDateTime* self;
	self = instance;
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	g_atomic_int_inc (&self->ref_count);
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	return instance;
#line 1423 "MediaMetadata.c"
}


void metadata_date_time_unref (gpointer instance) {
	MetadataDateTime* self;
	self = instance;
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		METADATA_DATE_TIME_GET_CLASS (self)->finalize (self);
#line 47 "/home/jens/Source/shotwell/src/MediaMetadata.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 1436 "MediaMetadata.c"
	}
}