summaryrefslogtreecommitdiff
path: root/src/tags/HierarchicalTagIndex.c
blob: 44d6fae0a798e2a079402f7e700a359afe379ee1 (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
/* HierarchicalTagIndex.c generated by valac 0.40.4, 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))
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_add68 (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_;
	GeeTreeSet* _tmp1_;
#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, (GDestroyNotify) g_free, GEE_TYPE_ARRAY_LIST, (GBoxedCopyFunc) g_object_ref, (GDestroyNotify) 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, (GDestroyNotify) 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 197 "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 206 "HierarchicalTagIndex.c"
}


HierarchicalTagIndex*
hierarchical_tag_index_from_paths (GeeCollection* client_paths)
{
	HierarchicalTagIndex* result = NULL;
	GeeCollection* paths = NULL;
	GeeCollection* _tmp0_;
	GeeCollection* _tmp1_;
	HierarchicalTagIndex* _result_ = NULL;
	HierarchicalTagIndex* _tmp2_;
#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_ = gee_collection_get_read_only_view (client_paths);
#line 17 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp1_ = _tmp0_;
#line 17 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	paths = _tmp1_;
#line 19 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp2_ = hierarchical_tag_index_new ();
#line 19 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_result_ = _tmp2_;
#line 231 "HierarchicalTagIndex.c"
	{
		GeeIterator* _path_it = NULL;
		GeeCollection* _tmp3_;
		GeeIterator* _tmp4_;
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_tmp3_ = paths;
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable));
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_path_it = _tmp4_;
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		while (TRUE) {
#line 244 "HierarchicalTagIndex.c"
			GeeIterator* _tmp5_;
			gchar* path = NULL;
			GeeIterator* _tmp6_;
			gpointer _tmp7_;
			const gchar* _tmp8_;
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp5_ = _path_it;
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			if (!gee_iterator_next (_tmp5_)) {
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				break;
#line 256 "HierarchicalTagIndex.c"
			}
#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_get (_tmp6_);
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			path = (gchar*) _tmp7_;
#line 22 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp8_ = path;
#line 22 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			if (g_str_has_prefix (_tmp8_, TAG_PATH_SEPARATOR_STRING)) {
#line 268 "HierarchicalTagIndex.c"
				GeeCollection* components = NULL;
				const gchar* _tmp9_;
				GeeList* _tmp10_;
#line 23 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_tmp9_ = path;
#line 23 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_tmp10_ = hierarchical_tag_utilities_enumerate_path_components (_tmp9_);
#line 23 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				components = G_TYPE_CHECK_INSTANCE_CAST (_tmp10_, GEE_TYPE_COLLECTION, GeeCollection);
#line 278 "HierarchicalTagIndex.c"
				{
					GeeIterator* _component_it = NULL;
					GeeCollection* _tmp11_;
					GeeIterator* _tmp12_;
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
					_tmp11_ = components;
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
					_tmp12_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_ITERABLE, GeeIterable));
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
					_component_it = _tmp12_;
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
					while (TRUE) {
#line 291 "HierarchicalTagIndex.c"
						GeeIterator* _tmp13_;
						gchar* component = NULL;
						GeeIterator* _tmp14_;
						gpointer _tmp15_;
						HierarchicalTagIndex* _tmp16_;
						const gchar* _tmp17_;
						const gchar* _tmp18_;
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
						_tmp13_ = _component_it;
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
						if (!gee_iterator_next (_tmp13_)) {
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
							break;
#line 305 "HierarchicalTagIndex.c"
						}
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
						_tmp14_ = _component_it;
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
						_tmp15_ = gee_iterator_get (_tmp14_);
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
						component = (gchar*) _tmp15_;
#line 27 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
						_tmp16_ = _result_;
#line 27 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
						_tmp17_ = component;
#line 27 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
						_tmp18_ = path;
#line 27 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
						hierarchical_tag_index_add_path (_tmp16_, _tmp17_, _tmp18_);
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
						_g_free0 (component);
#line 323 "HierarchicalTagIndex.c"
					}
#line 26 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
					_g_object_unref0 (_component_it);
#line 327 "HierarchicalTagIndex.c"
				}
#line 22 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_g_object_unref0 (components);
#line 331 "HierarchicalTagIndex.c"
			} else {
				HierarchicalTagIndex* _tmp19_;
				const gchar* _tmp20_;
				const gchar* _tmp21_;
#line 29 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_tmp19_ = _result_;
#line 29 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_tmp20_ = path;
#line 29 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_tmp21_ = path;
#line 29 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				hierarchical_tag_index_add_path (_tmp19_, _tmp20_, _tmp21_);
#line 344 "HierarchicalTagIndex.c"
			}
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_g_free0 (path);
#line 348 "HierarchicalTagIndex.c"
		}
#line 21 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_g_object_unref0 (_path_it);
#line 352 "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 360 "HierarchicalTagIndex.c"
}


HierarchicalTagIndex*
hierarchical_tag_index_get_global_index (void)
{
	HierarchicalTagIndex* result = NULL;
	TagSourceCollection* _tmp0_;
	GeeCollection* _tmp1_;
	GeeCollection* _tmp2_;
	HierarchicalTagIndex* _tmp3_;
	HierarchicalTagIndex* _tmp4_;
#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 389 "HierarchicalTagIndex.c"
}


void
hierarchical_tag_index_add_path (HierarchicalTagIndex* self,
                                 const gchar* tag,
                                 const gchar* path)
{
	GeeMap* _tmp0_;
	GeeMap* _tmp4_;
	gpointer _tmp5_;
	GeeCollection* _tmp6_;
	GeeSortedSet* _tmp7_;
#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"
	if (!gee_map_has_key (_tmp0_, tag)) {
#line 413 "HierarchicalTagIndex.c"
		GeeMap* _tmp1_;
		GeeArrayList* _tmp2_;
		GeeArrayList* _tmp3_;
#line 42 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_tmp1_ = self->priv->tag_table;
#line 42 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_tmp2_ = gee_array_list_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup, (GDestroyNotify) g_free, NULL, NULL, NULL);
#line 42 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_tmp3_ = _tmp2_;
#line 42 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		gee_map_set (_tmp1_, tag, G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_COLLECTION, GeeCollection));
#line 42 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_g_object_unref0 (_tmp3_);
#line 427 "HierarchicalTagIndex.c"
	}
#line 45 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp4_ = self->priv->tag_table;
#line 45 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp5_ = gee_map_get (_tmp4_, tag);
#line 45 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp6_ = (GeeCollection*) _tmp5_;
#line 45 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	gee_collection_add (_tmp6_, path);
#line 45 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_g_object_unref0 (_tmp6_);
#line 46 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp7_ = self->priv->known_paths;
#line 46 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	gee_collection_add (G_TYPE_CHECK_INSTANCE_CAST (_tmp7_, GEE_TYPE_COLLECTION, GeeCollection), path);
#line 443 "HierarchicalTagIndex.c"
}


GeeCollection*
hierarchical_tag_index_get_all_paths (HierarchicalTagIndex* self)
{
	GeeCollection* result = NULL;
	GeeSortedSet* _tmp0_;
	GeeSortedSet* _tmp1_;
	GeeSortedSet* _tmp2_;
#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 466 "HierarchicalTagIndex.c"
}


gboolean
hierarchical_tag_index_is_tag_in_index (HierarchicalTagIndex* self,
                                        const gchar* tag)
{
	gboolean result = FALSE;
	GeeMap* _tmp0_;
#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"
	result = gee_map_has_key (_tmp0_, tag);
#line 54 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	return result;
#line 486 "HierarchicalTagIndex.c"
}


GeeCollection*
hierarchical_tag_index_get_all_tags (HierarchicalTagIndex* self)
{
	GeeCollection* result = NULL;
	GeeMap* _tmp0_;
	GeeSet* _tmp1_;
	GeeSet* _tmp2_;
#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 509 "HierarchicalTagIndex.c"
}


gboolean
hierarchical_tag_index_is_path_known (HierarchicalTagIndex* self,
                                      const gchar* path)
{
	gboolean result = FALSE;
	GeeSortedSet* _tmp0_;
#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"
	result = gee_collection_contains (G_TYPE_CHECK_INSTANCE_CAST (_tmp0_, GEE_TYPE_COLLECTION, GeeCollection), path);
#line 62 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	return result;
#line 529 "HierarchicalTagIndex.c"
}


gchar*
hierarchical_tag_index_get_path_for_name (HierarchicalTagIndex* self,
                                          const gchar* name)
{
	gchar* result = NULL;
	GeeCollection* paths = NULL;
	GeeMap* _tmp1_;
	gpointer _tmp2_;
#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"
	if (!hierarchical_tag_index_is_tag_in_index (self, name)) {
#line 547 "HierarchicalTagIndex.c"
		gchar* _tmp0_;
#line 67 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_tmp0_ = g_strdup (name);
#line 67 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		result = _tmp0_;
#line 67 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		return result;
#line 555 "HierarchicalTagIndex.c"
	}
#line 69 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp1_ = self->priv->tag_table;
#line 69 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp2_ = gee_map_get (_tmp1_, name);
#line 69 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	paths = (GeeCollection*) _tmp2_;
#line 563 "HierarchicalTagIndex.c"
	{
		GeeIterator* _path_it = NULL;
		GeeCollection* _tmp3_;
		GeeIterator* _tmp4_;
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_tmp3_ = paths;
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_tmp4_ = gee_iterable_iterator (G_TYPE_CHECK_INSTANCE_CAST (_tmp3_, GEE_TYPE_ITERABLE, GeeIterable));
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_path_it = _tmp4_;
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		while (TRUE) {
#line 576 "HierarchicalTagIndex.c"
			GeeIterator* _tmp5_;
			gchar* path = NULL;
			GeeIterator* _tmp6_;
			gpointer _tmp7_;
			GeeList* components = NULL;
			const gchar* _tmp8_;
			GeeList* _tmp9_;
			GeeList* _tmp10_;
			GeeList* _tmp11_;
			gint _tmp12_;
			gint _tmp13_;
			gpointer _tmp14_;
			gchar* _tmp15_;
			gboolean _tmp16_;
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp5_ = _path_it;
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			if (!gee_iterator_next (_tmp5_)) {
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				break;
#line 597 "HierarchicalTagIndex.c"
			}
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp6_ = _path_it;
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp7_ = gee_iterator_get (_tmp6_);
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			path = (gchar*) _tmp7_;
#line 71 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp8_ = path;
#line 71 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp9_ = hierarchical_tag_utilities_enumerate_path_components (_tmp8_);
#line 71 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			components = _tmp9_;
#line 72 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp10_ = components;
#line 72 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp11_ = components;
#line 72 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp12_ = gee_collection_get_size (G_TYPE_CHECK_INSTANCE_CAST (_tmp11_, GEE_TYPE_COLLECTION, GeeCollection));
#line 72 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp13_ = _tmp12_;
#line 72 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp14_ = gee_list_get (_tmp10_, _tmp13_ - 1);
#line 72 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp15_ = (gchar*) _tmp14_;
#line 72 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp16_ = g_strcmp0 (_tmp15_, name) == 0;
#line 72 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_g_free0 (_tmp15_);
#line 72 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			if (_tmp16_) {
#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 639 "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 645 "HierarchicalTagIndex.c"
		}
#line 70 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		_g_object_unref0 (_path_it);
#line 649 "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 655 "HierarchicalTagIndex.c"
}


static void
_vala_array_add68 (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 671 "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 677 "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_;
	gint _result__length1;
	gint __result__size_;
	gchar** _tmp5_;
	gint _tmp5__length1;
#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 704 "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 = names;
#line 83 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		name_collection_length1 = names_length1;
#line 83 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		for (name_it = 0; name_it < names_length1; name_it = name_it + 1) {
#line 716 "HierarchicalTagIndex.c"
			gchar* _tmp1_;
			gchar* name = NULL;
#line 83 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			_tmp1_ = g_strdup (name_collection[name_it]);
#line 83 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
			name = _tmp1_;
#line 723 "HierarchicalTagIndex.c"
			{
				gchar** _tmp2_;
				gint _tmp2__length1;
				const gchar* _tmp3_;
				gchar* _tmp4_;
#line 84 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_tmp2_ = _result_;
#line 84 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_tmp2__length1 = _result__length1;
#line 84 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_tmp3_ = name;
#line 84 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_tmp4_ = hierarchical_tag_index_get_path_for_name (self, _tmp3_);
#line 84 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_vala_array_add68 (&_result_, &_result__length1, &__result__size_, _tmp4_);
#line 83 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
				_g_free0 (name);
#line 741 "HierarchicalTagIndex.c"
			}
		}
	}
#line 86 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp5_ = _result_;
#line 86 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	_tmp5__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 = _tmp5__length1;
#line 753 "HierarchicalTagIndex.c"
	}
#line 86 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	result = _tmp5_;
#line 86 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	return result;
#line 759 "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 768 "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 779 "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 792 "HierarchicalTagIndex.c"
	} else {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		dest_value->data[0].v_pointer = NULL;
#line 796 "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 806 "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 818 "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 825 "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 829 "HierarchicalTagIndex.c"
		}
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		value->data[0].v_pointer = hierarchical_tag_index_ref (object);
#line 833 "HierarchicalTagIndex.c"
	} else {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		value->data[0].v_pointer = NULL;
#line 837 "HierarchicalTagIndex.c"
	}
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	return NULL;
#line 841 "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 857 "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 863 "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 867 "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 871 "HierarchicalTagIndex.c"
	}
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
	return NULL;
#line 875 "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 895 "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 906 "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 929 "HierarchicalTagIndex.c"
	} else {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		value->data[0].v_pointer = NULL;
#line 933 "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 939 "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 961 "HierarchicalTagIndex.c"
	} else {
#line 7 "/home/jens/Source/shotwell/src/tags/HierarchicalTagIndex.vala"
		value->data[0].v_pointer = NULL;
#line 965 "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 971 "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 985 "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 996 "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 1012 "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 1041 "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 1056 "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);
}