From 5e9f4eea451a77ba3b93db3747841ed2bd969e9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 30 Sep 2018 14:09:20 +0200 Subject: New upstream version 0.30.1 --- src/tags/HierarchicalTagIndex.c | 1086 --------------------------------------- 1 file changed, 1086 deletions(-) delete mode 100644 src/tags/HierarchicalTagIndex.c (limited to 'src/tags/HierarchicalTagIndex.c') diff --git a/src/tags/HierarchicalTagIndex.c b/src/tags/HierarchicalTagIndex.c deleted file mode 100644 index 44d6fae..0000000 --- a/src/tags/HierarchicalTagIndex.c +++ /dev/null @@ -1,1086 +0,0 @@ -/* 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 -#include -#include -#include -#include -#include - - -#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); -} - - - -- cgit v1.2.3