summaryrefslogtreecommitdiff
path: root/src/tags/HierarchicalTagIndex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tags/HierarchicalTagIndex.c')
-rw-r--r--src/tags/HierarchicalTagIndex.c1039
1 files changed, 1039 insertions, 0 deletions
diff --git a/src/tags/HierarchicalTagIndex.c b/src/tags/HierarchicalTagIndex.c
new file mode 100644
index 0000000..d77738d
--- /dev/null
+++ b/src/tags/HierarchicalTagIndex.c
@@ -0,0 +1,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_add140 (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_add140 (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_add140 (&_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);
+}
+
+
+