summaryrefslogtreecommitdiff
path: root/src/tags/HierarchicalTagIndex.c
blob: dc5e970286bd6a96f2f467534e2e25d3072cc8ba (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
/* HierarchicalTagIndex.c generated by valac 0.32.1, the Vala compiler
 * generated from HierarchicalTagIndex.vala, do not modify */

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

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


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

typedef struct _HierarchicalTagIndex HierarchicalTagIndex;
typedef struct _HierarchicalTagIndexClass HierarchicalTagIndexClass;
typedef struct _HierarchicalTagIndexPrivate HierarchicalTagIndexPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_free0(var) (var = (g_free (var), NULL))
#define _hierarchical_tag_index_unref0(var) ((var == NULL) ? NULL : (var = (hierarchical_tag_index_unref (var), NULL)))

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

typedef struct _DataCollection DataCollection;
typedef struct _DataCollectionClass DataCollectionClass;

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

typedef struct _SourceCollection SourceCollection;
typedef struct _SourceCollectionClass SourceCollectionClass;

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

typedef struct _DatabaseSourceCollection DatabaseSourceCollection;
typedef struct _DatabaseSourceCollectionClass DatabaseSourceCollectionClass;

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

typedef struct _ContainerSourceCollection ContainerSourceCollection;
typedef struct _ContainerSourceCollectionClass ContainerSourceCollectionClass;

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

typedef struct _TagSourceCollection TagSourceCollection;
typedef struct _TagSourceCollectionClass TagSourceCollectionClass;
typedef struct _ParamSpecHierarchicalTagIndex ParamSpecHierarchicalTagIndex;

struct _HierarchicalTagIndex {
	GTypeInstance parent_instance;
	volatile int ref_count;
	HierarchicalTagIndexPrivate * priv;
};

struct _HierarchicalTagIndexClass {
	GTypeClass parent_class;
	void (*finalize) (HierarchicalTagIndex *self);
};

struct _HierarchicalTagIndexPrivate {
	GeeMap* tag_table;
	GeeSortedSet* known_paths;
};

struct _ParamSpecHierarchicalTagIndex {
	GParamSpec parent_instance;
};


static gpointer hierarchical_tag_index_parent_class = NULL;
extern TagSourceCollection* tag_global;

gpointer hierarchical_tag_index_ref (gpointer instance);
void hierarchical_tag_index_unref (gpointer instance);
GParamSpec* param_spec_hierarchical_tag_index (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_hierarchical_tag_index (GValue* value, gpointer v_object);
void value_take_hierarchical_tag_index (GValue* value, gpointer v_object);
gpointer value_get_hierarchical_tag_index (const GValue* value);
GType hierarchical_tag_index_get_type (void) G_GNUC_CONST;
#define HIERARCHICAL_TAG_INDEX_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), TYPE_HIERARCHICAL_TAG_INDEX, HierarchicalTagIndexPrivate))
enum  {
	HIERARCHICAL_TAG_INDEX_DUMMY_PROPERTY
};
HierarchicalTagIndex* hierarchical_tag_index_new (void);
HierarchicalTagIndex* hierarchical_tag_index_construct (GType object_type);
HierarchicalTagIndex* hierarchical_tag_index_from_paths (GeeCollection* client_paths);
#define TAG_PATH_SEPARATOR_STRING "/"
GeeList* hierarchical_tag_utilities_enumerate_path_components (const gchar* in_path);
void hierarchical_tag_index_add_path (HierarchicalTagIndex* self, const gchar* tag, const gchar* path);
HierarchicalTagIndex* hierarchical_tag_index_get_global_index (void);
gpointer data_collection_ref (gpointer instance);
void data_collection_unref (gpointer instance);
GParamSpec* param_spec_data_collection (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags);
void value_set_data_collection (GValue* value, gpointer v_object);
void value_take_data_collection (GValue* value, gpointer v_object);
gpointer value_get_data_collection (const GValue* value);
GType data_collection_get_type (void) G_GNUC_CONST;
GType source_collection_get_type (void) G_GNUC_CONST;
GType database_source_collection_get_type (void) G_GNUC_CONST;
GType container_source_collection_get_type (void) G_GNUC_CONST;
GType tag_source_collection_get_type (void) G_GNUC_CONST;
GeeCollection* tag_source_collection_get_all_names (TagSourceCollection* self);
GeeCollection* hierarchical_tag_index_get_all_paths (HierarchicalTagIndex* self);
gboolean hierarchical_tag_index_is_tag_in_index (HierarchicalTagIndex* self, const gchar* tag);
GeeCollection* hierarchical_tag_index_get_all_tags (HierarchicalTagIndex* self);
gboolean hierarchical_tag_index_is_path_known (HierarchicalTagIndex* self, const gchar* path);
gchar* hierarchical_tag_index_get_path_for_name (HierarchicalTagIndex* self, const gchar* name);
gchar** hierarchical_tag_index_get_paths_for_names_array (HierarchicalTagIndex* self, gchar** names, int names_length1, int* result_length1);
static void _vala_array_add65 (gchar*** array, int* length, int* size, gchar* value);
static void hierarchical_tag_index_finalize (HierarchicalTagIndex* obj);
static void _vala_array_destroy (gpointer array, gint array_length, GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array, gint array_length, GDestroyNotify destroy_func);


HierarchicalTagIndex* hierarchical_tag_index_construct (GType object_type) {
	HierarchicalTagIndex* self = NULL;
	GeeHashMap* _tmp0_ = NULL;
	GeeTreeSet* _tmp1_ = NULL;
#line 11 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	self = (HierarchicalTagIndex*) g_type_create_instance (object_type);
#line 12 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp0_ = gee_hash_map_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, GEE_TYPE_ARRAY_LIST, (GBoxedCopyFunc) g_object_ref, g_object_unref, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
#line 12 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_g_object_unref0 (self->priv->tag_table);
#line 12 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	self->priv->tag_table = G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_MAP, GeeMap);
#line 13 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp1_ = gee_tree_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
#line 13 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_g_object_unref0 (self->priv->known_paths);
#line 13 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	self->priv->known_paths = G_TYPE_CHECK_INSTANCE_CAST (_tmp1_, GEE_TYPE_SORTED_SET, GeeSortedSet);
#line 11 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	return self;
#line 170 "HierarchicalTagIndex.c"
}


HierarchicalTagIndex* hierarchical_tag_index_new (void) {
#line 11 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	return hierarchical_tag_index_construct (TYPE_HIERARCHICAL_TAG_INDEX);
#line 177 "HierarchicalTagIndex.c"
}


HierarchicalTagIndex* hierarchical_tag_index_from_paths (GeeCollection* client_paths) {
	HierarchicalTagIndex* result = NULL;
	GeeCollection* paths = NULL;
	GeeCollection* _tmp0_ = NULL;
	GeeCollection* _tmp1_ = NULL;
	GeeCollection* _tmp2_ = NULL;
	HierarchicalTagIndex* _result_ = NULL;
	HierarchicalTagIndex* _tmp3_ = NULL;
#line 16 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	g_return_val_if_fail (GEE_IS_COLLECTION (client_paths), NULL);
#line 17 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp0_ = client_paths;
#line 17 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp1_ = gee_collection_get_read_only_view (_tmp0_);
#line 17 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp2_ = _tmp1_;
#line 17 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	paths = _tmp2_;
#line 19 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp3_ = hierarchical_tag_index_new ();
#line 19 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_result_ = _tmp3_;
#line 203 "HierarchicalTagIndex.c"
	{
		GeeIterator* _path_it = NULL;
		GeeCollection* _tmp4_ = NULL;
		GeeIterator* _tmp5_ = NULL;
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_tmp4_ = paths;
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_tmp5_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp4_, GEE_TYPE_ITERABLE, GeeIterable));
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_path_it = _tmp5_;
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		while (TRUE) {
#line 216 "HierarchicalTagIndex.c"
			GeeIterator* _tmp6_ = NULL;
			gboolean _tmp7_ = FALSE;
			gchar* path = NULL;
			GeeIterator* _tmp8_ = NULL;
			gpointer _tmp9_ = NULL;
			const gchar* _tmp10_ = NULL;
			gboolean _tmp11_ = FALSE;
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp6_ = _path_it;
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp7_ = gee_iterator_next (_tmp6_);
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			if (!_tmp7_) {
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				break;
#line 232 "HierarchicalTagIndex.c"
			}
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp8_ = _path_it;
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp9_ = gee_iterator_get (_tmp8_);
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			path = (gchar*) _tmp9_;
#line 22 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp10_ = path;
#line 22 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp11_ = g_str_has_prefix (_tmp10_, TAG_PATH_SEPARATOR_STRING);
#line 22 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			if (_tmp11_) {
#line 246 "HierarchicalTagIndex.c"
				GeeCollection* components = NULL;
				const gchar* _tmp12_ = NULL;
				GeeList* _tmp13_ = NULL;
#line 23 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_tmp12_ = path;
#line 23 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_tmp13_ = hierarchical_tag_utilities_enumerate_path_components (_tmp12_);
#line 23 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				components = G_TYPE_CHECK_INSTANCE_CAST (_tmp13_, GEE_TYPE_COLLECTION, GeeCollection);
#line 256 "HierarchicalTagIndex.c"
				{
					GeeIterator* _component_it = NULL;
					GeeCollection* _tmp14_ = NULL;
					GeeIterator* _tmp15_ = NULL;
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
					_tmp14_ = components;
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
					_tmp15_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp14_, GEE_TYPE_ITERABLE, GeeIterable));
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
					_component_it = _tmp15_;
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
					while (TRUE) {
#line 269 "HierarchicalTagIndex.c"
						GeeIterator* _tmp16_ = NULL;
						gboolean _tmp17_ = FALSE;
						gchar* component = NULL;
						GeeIterator* _tmp18_ = NULL;
						gpointer _tmp19_ = NULL;
						HierarchicalTagIndex* _tmp20_ = NULL;
						const gchar* _tmp21_ = NULL;
						const gchar* _tmp22_ = NULL;
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
						_tmp16_ = _component_it;
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
						_tmp17_ = gee_iterator_next (_tmp16_);
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
						if (!_tmp17_) {
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
							break;
#line 286 "HierarchicalTagIndex.c"
						}
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
						_tmp18_ = _component_it;
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
						_tmp19_ = gee_iterator_get (_tmp18_);
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
						component = (gchar*) _tmp19_;
#line 27 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
						_tmp20_ = _result_;
#line 27 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
						_tmp21_ = component;
#line 27 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
						_tmp22_ = path;
#line 27 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
						hierarchical_tag_index_add_path (_tmp20_, _tmp21_, _tmp22_);
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
						_g_free0 (component);
#line 304 "HierarchicalTagIndex.c"
					}
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
					_g_object_unref0 (_component_it);
#line 308 "HierarchicalTagIndex.c"
				}
#line 22 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_g_object_unref0 (components);
#line 312 "HierarchicalTagIndex.c"
			} else {
				HierarchicalTagIndex* _tmp23_ = NULL;
				const gchar* _tmp24_ = NULL;
				const gchar* _tmp25_ = NULL;
#line 29 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_tmp23_ = _result_;
#line 29 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_tmp24_ = path;
#line 29 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_tmp25_ = path;
#line 29 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				hierarchical_tag_index_add_path (_tmp23_, _tmp24_, _tmp25_);
#line 325 "HierarchicalTagIndex.c"
			}
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_g_free0 (path);
#line 329 "HierarchicalTagIndex.c"
		}
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_g_object_unref0 (_path_it);
#line 333 "HierarchicalTagIndex.c"
	}
#line 33 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	result = _result_;
#line 33 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_g_object_unref0 (paths);
#line 33 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	return result;
#line 341 "HierarchicalTagIndex.c"
}


HierarchicalTagIndex* hierarchical_tag_index_get_global_index (void) {
	HierarchicalTagIndex* result = NULL;
	TagSourceCollection* _tmp0_ = NULL;
	GeeCollection* _tmp1_ = NULL;
	GeeCollection* _tmp2_ = NULL;
	HierarchicalTagIndex* _tmp3_ = NULL;
	HierarchicalTagIndex* _tmp4_ = NULL;
#line 37 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp0_ = tag_global;
#line 37 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp1_ = tag_source_collection_get_all_names (_tmp0_);
#line 37 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp2_ = _tmp1_;
#line 37 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp3_ = hierarchical_tag_index_from_paths (_tmp2_);
#line 37 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp4_ = _tmp3_;
#line 37 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_g_object_unref0 (_tmp2_);
#line 37 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	result = _tmp4_;
#line 37 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	return result;
#line 368 "HierarchicalTagIndex.c"
}


void hierarchical_tag_index_add_path (HierarchicalTagIndex* self, const gchar* tag, const gchar* path) {
	GeeMap* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
	GeeMap* _tmp7_ = NULL;
	const gchar* _tmp8_ = NULL;
	gpointer _tmp9_ = NULL;
	GeeCollection* _tmp10_ = NULL;
	const gchar* _tmp11_ = NULL;
	GeeSortedSet* _tmp12_ = NULL;
	const gchar* _tmp13_ = NULL;
#line 40 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	g_return_if_fail (IS_HIERARCHICAL_TAG_INDEX (self));
#line 40 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	g_return_if_fail (tag != NULL);
#line 40 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	g_return_if_fail (path != NULL);
#line 41 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp0_ = self->priv->tag_table;
#line 41 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp1_ = tag;
#line 41 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp2_ = gee_map_has_key (_tmp0_, _tmp1_);
#line 41 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	if (!_tmp2_) {
#line 397 "HierarchicalTagIndex.c"
		GeeMap* _tmp3_ = NULL;
		const gchar* _tmp4_ = NULL;
		GeeArrayList* _tmp5_ = NULL;
		GeeArrayList* _tmp6_ = NULL;
#line 42 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_tmp3_ = self->priv->tag_table;
#line 42 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_tmp4_ = tag;
#line 42 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_tmp5_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, g_free, NULL, NULL, NULL);
#line 42 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_tmp6_ = _tmp5_;
#line 42 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		gee_map_set (_tmp3_, _tmp4_, G_TYPE_CHECK_INSTANCE_CAST (_tmp6_, GEE_TYPE_COLLECTION, GeeCollection));
#line 42 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_g_object_unref0 (_tmp6_);
#line 414 "HierarchicalTagIndex.c"
	}
#line 45 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp7_ = self->priv->tag_table;
#line 45 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp8_ = tag;
#line 45 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp9_ = gee_map_get (_tmp7_, _tmp8_);
#line 45 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp10_ = (GeeCollection*) _tmp9_;
#line 45 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp11_ = path;
#line 45 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	gee_collection_add (_tmp10_, _tmp11_);
#line 45 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_g_object_unref0 (_tmp10_);
#line 46 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp12_ = self->priv->known_paths;
#line 46 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp13_ = path;
#line 46 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp12_, GEE_TYPE_COLLECTION, GeeCollection), _tmp13_);
#line 436 "HierarchicalTagIndex.c"
}


GeeCollection* hierarchical_tag_index_get_all_paths (HierarchicalTagIndex* self) {
	GeeCollection* result = NULL;
	GeeSortedSet* _tmp0_ = NULL;
	GeeSortedSet* _tmp1_ = NULL;
	GeeSortedSet* _tmp2_ = NULL;
#line 49 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	g_return_val_if_fail (IS_HIERARCHICAL_TAG_INDEX (self), NULL);
#line 50 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp0_ = self->priv->known_paths;
#line 50 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp1_ = gee_sorted_set_get_read_only_view (_tmp0_);
#line 50 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp2_ = _tmp1_;
#line 50 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection);
#line 50 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	return result;
#line 457 "HierarchicalTagIndex.c"
}


gboolean hierarchical_tag_index_is_tag_in_index (HierarchicalTagIndex* self, const gchar* tag) {
	gboolean result = FALSE;
	GeeMap* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
#line 53 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	g_return_val_if_fail (IS_HIERARCHICAL_TAG_INDEX (self), FALSE);
#line 53 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	g_return_val_if_fail (tag != NULL, FALSE);
#line 54 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp0_ = self->priv->tag_table;
#line 54 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp1_ = tag;
#line 54 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp2_ = gee_map_has_key (_tmp0_, _tmp1_);
#line 54 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	result = _tmp2_;
#line 54 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	return result;
#line 480 "HierarchicalTagIndex.c"
}


GeeCollection* hierarchical_tag_index_get_all_tags (HierarchicalTagIndex* self) {
	GeeCollection* result = NULL;
	GeeMap* _tmp0_ = NULL;
	GeeSet* _tmp1_ = NULL;
	GeeSet* _tmp2_ = NULL;
#line 57 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	g_return_val_if_fail (IS_HIERARCHICAL_TAG_INDEX (self), NULL);
#line 58 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp0_ = self->priv->tag_table;
#line 58 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp1_ = gee_map_get_keys (_tmp0_);
#line 58 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp2_ = _tmp1_;
#line 58 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	result = G_TYPE_CHECK_INSTANCE_CAST (_tmp2_, GEE_TYPE_COLLECTION, GeeCollection);
#line 58 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	return result;
#line 501 "HierarchicalTagIndex.c"
}


gboolean hierarchical_tag_index_is_path_known (HierarchicalTagIndex* self, const gchar* path) {
	gboolean result = FALSE;
	GeeSortedSet* _tmp0_ = NULL;
	const gchar* _tmp1_ = NULL;
	gboolean _tmp2_ = FALSE;
#line 61 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	g_return_val_if_fail (IS_HIERARCHICAL_TAG_INDEX (self), FALSE);
#line 61 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	g_return_val_if_fail (path != NULL, FALSE);
#line 62 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp0_ = self->priv->known_paths;
#line 62 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp1_ = path;
#line 62 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp2_ = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection), _tmp1_);
#line 62 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	result = _tmp2_;
#line 62 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	return result;
#line 524 "HierarchicalTagIndex.c"
}


gchar* hierarchical_tag_index_get_path_for_name (HierarchicalTagIndex* self, const gchar* name) {
	gchar* result = NULL;
	const gchar* _tmp0_ = NULL;
	gboolean _tmp1_ = FALSE;
	GeeCollection* paths = NULL;
	GeeMap* _tmp4_ = NULL;
	const gchar* _tmp5_ = NULL;
	gpointer _tmp6_ = NULL;
#line 65 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	g_return_val_if_fail (IS_HIERARCHICAL_TAG_INDEX (self), NULL);
#line 65 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	g_return_val_if_fail (name != NULL, NULL);
#line 66 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp0_ = name;
#line 66 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp1_ = hierarchical_tag_index_is_tag_in_index (self, _tmp0_);
#line 66 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	if (!_tmp1_) {
#line 546 "HierarchicalTagIndex.c"
		const gchar* _tmp2_ = NULL;
		gchar* _tmp3_ = NULL;
#line 67 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_tmp2_ = name;
#line 67 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_tmp3_ = g_strdup (_tmp2_);
#line 67 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		result = _tmp3_;
#line 67 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		return result;
#line 557 "HierarchicalTagIndex.c"
	}
#line 69 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp4_ = self->priv->tag_table;
#line 69 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp5_ = name;
#line 69 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp6_ = gee_map_get (_tmp4_, _tmp5_);
#line 69 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	paths = (GeeCollection*) _tmp6_;
#line 567 "HierarchicalTagIndex.c"
	{
		GeeIterator* _path_it = NULL;
		GeeCollection* _tmp7_ = NULL;
		GeeIterator* _tmp8_ = NULL;
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_tmp7_ = paths;
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_tmp8_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_ITERABLE, GeeIterable));
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_path_it = _tmp8_;
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		while (TRUE) {
#line 580 "HierarchicalTagIndex.c"
			GeeIterator* _tmp9_ = NULL;
			gboolean _tmp10_ = FALSE;
			gchar* path = NULL;
			GeeIterator* _tmp11_ = NULL;
			gpointer _tmp12_ = NULL;
			GeeList* components = NULL;
			const gchar* _tmp13_ = NULL;
			GeeList* _tmp14_ = NULL;
			GeeList* _tmp15_ = NULL;
			GeeList* _tmp16_ = NULL;
			gint _tmp17_ = 0;
			gint _tmp18_ = 0;
			gpointer _tmp19_ = NULL;
			gchar* _tmp20_ = NULL;
			const gchar* _tmp21_ = NULL;
			gboolean _tmp22_ = FALSE;
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp9_ = _path_it;
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp10_ = gee_iterator_next (_tmp9_);
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			if (!_tmp10_) {
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				break;
#line 605 "HierarchicalTagIndex.c"
			}
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp11_ = _path_it;
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp12_ = gee_iterator_get (_tmp11_);
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			path = (gchar*) _tmp12_;
#line 71 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp13_ = path;
#line 71 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp14_ = hierarchical_tag_utilities_enumerate_path_components (_tmp13_);
#line 71 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			components = _tmp14_;
#line 72 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp15_ = components;
#line 72 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp16_ = components;
#line 72 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp17_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp16_, GEE_TYPE_COLLECTION, GeeCollection));
#line 72 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp18_ = _tmp17_;
#line 72 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp19_ = gee_list_get (_tmp15_, _tmp18_ - 1);
#line 72 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp20_ = (gchar*) _tmp19_;
#line 72 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp21_ = name;
#line 72 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp22_ = g_strcmp0 (_tmp20_, _tmp21_) == 0;
#line 72 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_g_free0 (_tmp20_);
#line 72 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			if (_tmp22_) {
#line 73 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				result = path;
#line 73 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_g_object_unref0 (components);
#line 73 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_g_object_unref0 (_path_it);
#line 73 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_g_object_unref0 (paths);
#line 73 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				return result;
#line 649 "HierarchicalTagIndex.c"
			}
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_g_object_unref0 (components);
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_g_free0 (path);
#line 655 "HierarchicalTagIndex.c"
		}
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_g_object_unref0 (_path_it);
#line 659 "HierarchicalTagIndex.c"
	}
#line 77 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	g_assert_not_reached ();
#line 65 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_g_object_unref0 (paths);
#line 665 "HierarchicalTagIndex.c"
}


static void _vala_array_add65 (gchar*** array, int* length, int* size, gchar* value) {
#line 84 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	if ((*length) == (*size)) {
#line 84 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		*size = (*size) ? (2 * (*size)) : 4;
#line 84 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		*array = g_renew (gchar*, *array, (*size) + 1);
#line 676 "HierarchicalTagIndex.c"
	}
#line 84 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	(*array)[(*length)++] = value;
#line 84 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	(*array)[*length] = NULL;
#line 682 "HierarchicalTagIndex.c"
}


gchar** hierarchical_tag_index_get_paths_for_names_array (HierarchicalTagIndex* self, gchar** names, int names_length1, int* result_length1) {
	gchar** result = NULL;
	gchar** _result_ = NULL;
	gchar** _tmp0_ = NULL;
	gint _result__length1 = 0;
	gint __result__size_ = 0;
	gchar** _tmp1_ = NULL;
	gint _tmp1__length1 = 0;
	gchar** _tmp6_ = NULL;
	gint _tmp6__length1 = 0;
#line 80 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	g_return_val_if_fail (IS_HIERARCHICAL_TAG_INDEX (self), NULL);
#line 81 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp0_ = g_new0 (gchar*, 0 + 1);
#line 81 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_result_ = _tmp0_;
#line 81 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_result__length1 = 0;
#line 81 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	__result__size_ = _result__length1;
#line 83 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp1_ = names;
#line 83 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp1__length1 = names_length1;
#line 710 "HierarchicalTagIndex.c"
	{
		gchar** name_collection = NULL;
		gint name_collection_length1 = 0;
		gint _name_collection_size_ = 0;
		gint name_it = 0;
#line 83 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		name_collection = _tmp1_;
#line 83 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		name_collection_length1 = _tmp1__length1;
#line 83 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		for (name_it = 0; name_it < _tmp1__length1; name_it = name_it + 1) {
#line 722 "HierarchicalTagIndex.c"
			gchar* _tmp2_ = NULL;
			gchar* name = NULL;
#line 83 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp2_ = g_strdup (name_collection[name_it]);
#line 83 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			name = _tmp2_;
#line 729 "HierarchicalTagIndex.c"
			{
				gchar** _tmp3_ = NULL;
				gint _tmp3__length1 = 0;
				const gchar* _tmp4_ = NULL;
				gchar* _tmp5_ = NULL;
#line 84 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_tmp3_ = _result_;
#line 84 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_tmp3__length1 = _result__length1;
#line 84 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_tmp4_ = name;
#line 84 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_tmp5_ = hierarchical_tag_index_get_path_for_name (self, _tmp4_);
#line 84 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_vala_array_add65 (&_result_, &_result__length1, &__result__size_, _tmp5_);
#line 83 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_g_free0 (name);
#line 747 "HierarchicalTagIndex.c"
			}
		}
	}
#line 86 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp6_ = _result_;
#line 86 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp6__length1 = _result__length1;
#line 86 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	if (result_length1) {
#line 86 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		*result_length1 = _tmp6__length1;
#line 759 "HierarchicalTagIndex.c"
	}
#line 86 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	result = _tmp6_;
#line 86 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	return result;
#line 765 "HierarchicalTagIndex.c"
}


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


static void value_hierarchical_tag_index_free_value (GValue* value) {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	if (value->data[0].v_pointer) {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		hierarchical_tag_index_unref (value->data[0].v_pointer);
#line 781 "HierarchicalTagIndex.c"
	}
}


static void value_hierarchical_tag_index_copy_value (const GValue* src_value, GValue* dest_value) {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	if (src_value->data[0].v_pointer) {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		dest_value->data[0].v_pointer = hierarchical_tag_index_ref (src_value->data[0].v_pointer);
#line 791 "HierarchicalTagIndex.c"
	} else {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		dest_value->data[0].v_pointer = NULL;
#line 795 "HierarchicalTagIndex.c"
	}
}


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


static gchar* value_hierarchical_tag_index_collect_value (GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	if (collect_values[0].v_pointer) {
#line 810 "HierarchicalTagIndex.c"
		HierarchicalTagIndex* object;
		object = collect_values[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		if (object->parent_instance.g_class == NULL) {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			return g_strconcat ("invalid unclassed object pointer for value type `", G_VALUE_TYPE_NAME (value), "'", NULL);
#line 817 "HierarchicalTagIndex.c"
		} else if (!g_value_type_compatible (G_TYPE_FROM_INSTANCE (object), G_VALUE_TYPE (value))) {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.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 821 "HierarchicalTagIndex.c"
		}
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		value->data[0].v_pointer = hierarchical_tag_index_ref (object);
#line 825 "HierarchicalTagIndex.c"
	} else {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		value->data[0].v_pointer = NULL;
#line 829 "HierarchicalTagIndex.c"
	}
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	return NULL;
#line 833 "HierarchicalTagIndex.c"
}


static gchar* value_hierarchical_tag_index_lcopy_value (const GValue* value, guint n_collect_values, GTypeCValue* collect_values, guint collect_flags) {
	HierarchicalTagIndex** object_p;
	object_p = collect_values[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	if (!object_p) {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		return g_strdup_printf ("value location for `%s' passed as NULL", G_VALUE_TYPE_NAME (value));
#line 844 "HierarchicalTagIndex.c"
	}
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	if (!value->data[0].v_pointer) {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		*object_p = NULL;
#line 850 "HierarchicalTagIndex.c"
	} else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		*object_p = value->data[0].v_pointer;
#line 854 "HierarchicalTagIndex.c"
	} else {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		*object_p = hierarchical_tag_index_ref (value->data[0].v_pointer);
#line 858 "HierarchicalTagIndex.c"
	}
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	return NULL;
#line 862 "HierarchicalTagIndex.c"
}


GParamSpec* param_spec_hierarchical_tag_index (const gchar* name, const gchar* nick, const gchar* blurb, GType object_type, GParamFlags flags) {
	ParamSpecHierarchicalTagIndex* spec;
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	g_return_val_if_fail (g_type_is_a (object_type, TYPE_HIERARCHICAL_TAG_INDEX), NULL);
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	spec = g_param_spec_internal (G_TYPE_PARAM_OBJECT, name, nick, blurb, flags);
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	G_PARAM_SPEC (spec)->value_type = object_type;
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	return G_PARAM_SPEC (spec);
#line 876 "HierarchicalTagIndex.c"
}


gpointer value_get_hierarchical_tag_index (const GValue* value) {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	g_return_val_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_HIERARCHICAL_TAG_INDEX), NULL);
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	return value->data[0].v_pointer;
#line 885 "HierarchicalTagIndex.c"
}


void value_set_hierarchical_tag_index (GValue* value, gpointer v_object) {
	HierarchicalTagIndex* old;
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_HIERARCHICAL_TAG_INDEX));
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	old = value->data[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	if (v_object) {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_HIERARCHICAL_TAG_INDEX));
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.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/tags/HierarchicalTagIndex.vala"
		value->data[0].v_pointer = v_object;
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		hierarchical_tag_index_ref (value->data[0].v_pointer);
#line 905 "HierarchicalTagIndex.c"
	} else {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		value->data[0].v_pointer = NULL;
#line 909 "HierarchicalTagIndex.c"
	}
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	if (old) {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		hierarchical_tag_index_unref (old);
#line 915 "HierarchicalTagIndex.c"
	}
}


void value_take_hierarchical_tag_index (GValue* value, gpointer v_object) {
	HierarchicalTagIndex* old;
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	g_return_if_fail (G_TYPE_CHECK_VALUE_TYPE (value, TYPE_HIERARCHICAL_TAG_INDEX));
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	old = value->data[0].v_pointer;
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	if (v_object) {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		g_return_if_fail (G_TYPE_CHECK_INSTANCE_TYPE (v_object, TYPE_HIERARCHICAL_TAG_INDEX));
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.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/tags/HierarchicalTagIndex.vala"
		value->data[0].v_pointer = v_object;
#line 934 "HierarchicalTagIndex.c"
	} else {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		value->data[0].v_pointer = NULL;
#line 938 "HierarchicalTagIndex.c"
	}
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	if (old) {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		hierarchical_tag_index_unref (old);
#line 944 "HierarchicalTagIndex.c"
	}
}


static void hierarchical_tag_index_class_init (HierarchicalTagIndexClass * klass) {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	hierarchical_tag_index_parent_class = g_type_class_peek_parent (klass);
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	((HierarchicalTagIndexClass *) klass)->finalize = hierarchical_tag_index_finalize;
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	g_type_class_add_private (klass, sizeof (HierarchicalTagIndexPrivate));
#line 956 "HierarchicalTagIndex.c"
}


static void hierarchical_tag_index_instance_init (HierarchicalTagIndex * self) {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	self->priv = HIERARCHICAL_TAG_INDEX_GET_PRIVATE (self);
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	self->ref_count = 1;
#line 965 "HierarchicalTagIndex.c"
}


static void hierarchical_tag_index_finalize (HierarchicalTagIndex* obj) {
	HierarchicalTagIndex * self;
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, TYPE_HIERARCHICAL_TAG_INDEX, HierarchicalTagIndex);
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	g_signal_handlers_destroy (self);
#line 8 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_g_object_unref0 (self->priv->tag_table);
#line 9 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_g_object_unref0 (self->priv->known_paths);
#line 979 "HierarchicalTagIndex.c"
}


GType hierarchical_tag_index_get_type (void) {
	static volatile gsize hierarchical_tag_index_type_id__volatile = 0;
	if (g_once_init_enter (&hierarchical_tag_index_type_id__volatile)) {
		static const GTypeValueTable g_define_type_value_table = { value_hierarchical_tag_index_init, value_hierarchical_tag_index_free_value, value_hierarchical_tag_index_copy_value, value_hierarchical_tag_index_peek_pointer, "p", value_hierarchical_tag_index_collect_value, "p", value_hierarchical_tag_index_lcopy_value };
		static const GTypeInfo g_define_type_info = { sizeof (HierarchicalTagIndexClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) hierarchical_tag_index_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (HierarchicalTagIndex), 0, (GInstanceInitFunc) hierarchical_tag_index_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 hierarchical_tag_index_type_id;
		hierarchical_tag_index_type_id = g_type_register_fundamental (g_type_fundamental_next (), "HierarchicalTagIndex", &g_define_type_info, &g_define_type_fundamental_info, 0);
		g_once_init_leave (&hierarchical_tag_index_type_id__volatile, hierarchical_tag_index_type_id);
	}
	return hierarchical_tag_index_type_id__volatile;
}


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


void hierarchical_tag_index_unref (gpointer instance) {
	HierarchicalTagIndex* self;
	self = instance;
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	if (g_atomic_int_dec_and_test (&self->ref_count)) {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		HIERARCHICAL_TAG_INDEX_GET_CLASS (self)->finalize (self);
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		g_type_free_instance ((GTypeInstance *) self);
#line 1017 "HierarchicalTagIndex.c"
	}
}


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


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