[tepl] Rename class TeplMetadataStore to TeplMetadataManager



commit af6e18fb9af9e497ea29b90c1cb24755dc87f5e8
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sat Apr 18 03:07:14 2020 +0200

    Rename class TeplMetadataStore to TeplMetadataManager

 docs/reference/tepl-docs.xml                       |   2 +-
 docs/reference/tepl-sections.txt                   |  25 +--
 po/POTFILES.in                                     |   2 +-
 tepl/meson.build                                   |   4 +-
 tepl/tepl-init.c                                   |   4 +-
 ...pl-metadata-store.c => tepl-metadata-manager.c} | 189 ++++++++++-----------
 tepl/tepl-metadata-manager.h                       |  86 ++++++++++
 tepl/tepl-metadata-store.h                         |  86 ----------
 tepl/tepl.h                                        |   2 +-
 9 files changed, 195 insertions(+), 205 deletions(-)
---
diff --git a/docs/reference/tepl-docs.xml b/docs/reference/tepl-docs.xml
index 53181ca..119e186 100644
--- a/docs/reference/tepl-docs.xml
+++ b/docs/reference/tepl-docs.xml
@@ -52,7 +52,7 @@
     <chapter id="file-metadata">
       <title>File Metadata</title>
       <xi:include href="xml/metadata.xml"/>
-      <xi:include href="xml/metadata-store.xml"/>
+      <xi:include href="xml/metadata-manager.xml"/>
     </chapter>
 
     <chapter id="code-folding">
diff --git a/docs/reference/tepl-sections.txt b/docs/reference/tepl-sections.txt
index 6f20bda..bc951a0 100644
--- a/docs/reference/tepl-sections.txt
+++ b/docs/reference/tepl-sections.txt
@@ -300,24 +300,15 @@ tepl_metadata_set
 </SECTION>
 
 <SECTION>
-<FILE>metadata-store</FILE>
-TeplMetadataStore
-tepl_metadata_store_get_singleton
-tepl_metadata_store_trim
-tepl_metadata_store_load
-tepl_metadata_store_save
-tepl_metadata_store_load_file_metadata
-tepl_metadata_store_save_file_metadata
+<FILE>metadata-manager</FILE>
+TeplMetadataManager
+tepl_metadata_manager_get_singleton
+tepl_metadata_manager_trim
+tepl_metadata_manager_load
+tepl_metadata_manager_save
+tepl_metadata_manager_load_file_metadata
+tepl_metadata_manager_save_file_metadata
 <SUBSECTION Standard>
-TEPL_IS_METADATA_STORE
-TEPL_IS_METADATA_STORE_CLASS
-TEPL_METADATA_STORE
-TEPL_METADATA_STORE_CLASS
-TEPL_METADATA_STORE_GET_CLASS
-TEPL_TYPE_METADATA_STORE
-TeplMetadataStoreClass
-TeplMetadataStorePrivate
-tepl_metadata_store_get_type
 </SECTION>
 
 <SECTION>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 0accf5b..9725d2a 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -21,7 +21,7 @@ tepl/tepl-iter.c
 tepl/tepl-menu-shell.c
 tepl/tepl-metadata.c
 tepl/tepl-metadata-parser.c
-tepl/tepl-metadata-store.c
+tepl/tepl-metadata-manager.c
 tepl/tepl-notebook.c
 tepl/tepl-signal-group.c
 tepl/tepl-tab.c
diff --git a/tepl/meson.build b/tepl/meson.build
index ae71131..344696f 100644
--- a/tepl/meson.build
+++ b/tepl/meson.build
@@ -18,7 +18,7 @@ tepl_public_headers = [
   'tepl-iter.h',
   'tepl-menu-shell.h',
   'tepl-metadata.h',
-  'tepl-metadata-store.h',
+  'tepl-metadata-manager.h',
   'tepl-notebook.h',
   'tepl-tab.h',
   'tepl-tab-group.h',
@@ -46,7 +46,7 @@ tepl_public_c_files = [
   'tepl-iter.c',
   'tepl-menu-shell.c',
   'tepl-metadata.c',
-  'tepl-metadata-store.c',
+  'tepl-metadata-manager.c',
   'tepl-notebook.c',
   'tepl-tab.c',
   'tepl-tab-group.c',
diff --git a/tepl/tepl-init.c b/tepl/tepl-init.c
index 64d41da..ab6d736 100644
--- a/tepl/tepl-init.c
+++ b/tepl/tepl-init.c
@@ -21,7 +21,7 @@
 #include <amtk/amtk.h>
 #include <gtksourceview/gtksource.h>
 #include "tepl-abstract-factory.h"
-#include "tepl-metadata-store.h"
+#include "tepl-metadata-manager.h"
 
 /**
  * tepl_init:
@@ -75,7 +75,7 @@ tepl_finalize (void)
 
        if (!done)
        {
-               _tepl_metadata_store_unref_singleton ();
+               _tepl_metadata_manager_unref_singleton ();
                _tepl_abstract_factory_unref_singleton ();
 
                /* Since Tepl depends on Amtk and GtkSourceView, it's better to
diff --git a/tepl/tepl-metadata-store.c b/tepl/tepl-metadata-manager.c
similarity index 51%
rename from tepl/tepl-metadata-store.c
rename to tepl/tepl-metadata-manager.c
index 63abd04..5fd4dc5 100644
--- a/tepl/tepl-metadata-store.c
+++ b/tepl/tepl-metadata-manager.c
@@ -17,35 +17,34 @@
  * along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "tepl-metadata-store.h"
+#include "tepl-metadata-manager.h"
 #include "tepl-metadata-parser.h"
 #include "tepl-utils.h"
 
 /**
- * SECTION:metadata-store
- * @Title: TeplMetadataStore
+ * SECTION:metadata-manager
+ * @Title: TeplMetadataManager
  * @Short_description: To store file metadata on disk
  *
- * #TeplMetadataStore permits to store file metadata on disk. It serves both as
- * an easier replacement for GVfs metadata, and to have metadata support on
+ * #TeplMetadataManager permits to store file metadata on disk. It serves both
+ * as an easier replacement for GVfs metadata, and to have metadata support on
  * platforms that don't support GVfs metadata.
  */
 
-/* This code is inspired by TeplMetadataManager, which was itself a modified
- * version of GeditMetadataManager, coming from gedit:
+/* This code is a modified version of GeditMetadataManager, coming from gedit:
  *
  * Copyright 2003-2007 - Paolo Maggi
  *
- * The XML format is the same. TeplMetadataStore can read a file generated by
- * TeplMetadataManager; but the reverse is maybe not true, it hasn't been
- * tested. Not tested either with the older GeditMetadataManager.
+ * The XML format is the same. TeplMetadataManager can read a file generated by
+ * GeditMetadataManager; but the reverse is maybe not true, it hasn't been
+ * tested.
  *
  * A better implementation would be to use a database, so that several processes
  * can read and write to it at the same time, to be able to share metadata
  * between apps.
  */
 
-struct _TeplMetadataStorePrivate
+struct _TeplMetadataManagerPrivate
 {
        /* Keys: GFile *
         * Values: TeplFileMetadata *
@@ -56,66 +55,66 @@ struct _TeplMetadataStorePrivate
        guint modified : 1;
 };
 
-/* TeplMetadataStore is a singleton. */
-static TeplMetadataStore *singleton = NULL;
+/* TeplMetadataManager is a singleton. */
+static TeplMetadataManager *singleton = NULL;
 
 #define DEFAULT_MAX_NUMBER_OF_LOCATIONS (1000)
 
-G_DEFINE_TYPE_WITH_PRIVATE (TeplMetadataStore, tepl_metadata_store, G_TYPE_OBJECT)
+G_DEFINE_TYPE_WITH_PRIVATE (TeplMetadataManager, tepl_metadata_manager, G_TYPE_OBJECT)
 
 static void
-tepl_metadata_store_finalize (GObject *object)
+tepl_metadata_manager_finalize (GObject *object)
 {
-       TeplMetadataStore *store = TEPL_METADATA_STORE (object);
+       TeplMetadataManager *manager = TEPL_METADATA_MANAGER (object);
 
-       if (singleton == store)
+       if (singleton == manager)
        {
                singleton = NULL;
        }
 
-       g_hash_table_unref (store->priv->hash_table);
+       g_hash_table_unref (manager->priv->hash_table);
 
-       G_OBJECT_CLASS (tepl_metadata_store_parent_class)->finalize (object);
+       G_OBJECT_CLASS (tepl_metadata_manager_parent_class)->finalize (object);
 }
 
 static void
-tepl_metadata_store_class_init (TeplMetadataStoreClass *klass)
+tepl_metadata_manager_class_init (TeplMetadataManagerClass *klass)
 {
        GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
-       object_class->finalize = tepl_metadata_store_finalize;
+       object_class->finalize = tepl_metadata_manager_finalize;
 }
 
 static void
-tepl_metadata_store_init (TeplMetadataStore *store)
+tepl_metadata_manager_init (TeplMetadataManager *manager)
 {
-       store->priv = tepl_metadata_store_get_instance_private (store);
+       manager->priv = tepl_metadata_manager_get_instance_private (manager);
 
-       store->priv->hash_table = g_hash_table_new_full (g_file_hash,
-                                                        (GEqualFunc) g_file_equal,
-                                                        g_object_unref,
-                                                        g_object_unref);
+       manager->priv->hash_table = g_hash_table_new_full (g_file_hash,
+                                                          (GEqualFunc) g_file_equal,
+                                                          g_object_unref,
+                                                          g_object_unref);
 }
 
 /**
- * tepl_metadata_store_get_singleton:
+ * tepl_metadata_manager_get_singleton:
  *
- * Returns: (transfer none): the #TeplMetadataStore singleton instance.
+ * Returns: (transfer none): the #TeplMetadataManager singleton instance.
  * Since: 5.0
  */
-TeplMetadataStore *
-tepl_metadata_store_get_singleton (void)
+TeplMetadataManager *
+tepl_metadata_manager_get_singleton (void)
 {
        if (singleton == NULL)
        {
-               singleton = g_object_new (TEPL_TYPE_METADATA_STORE, NULL);
+               singleton = g_object_new (TEPL_TYPE_METADATA_MANAGER, NULL);
        }
 
        return singleton;
 }
 
 void
-_tepl_metadata_store_unref_singleton (void)
+_tepl_metadata_manager_unref_singleton (void)
 {
        if (singleton != NULL)
        {
@@ -123,17 +122,17 @@ _tepl_metadata_store_unref_singleton (void)
        }
 
        /* singleton is not set to NULL here, it is set to NULL in
-        * tepl_metadata_store_finalize() (i.e. when we are sure that the ref
+        * tepl_metadata_manager_finalize() (i.e. when we are sure that the ref
         * count reaches 0).
         */
 }
 
 /**
- * tepl_metadata_store_trim:
- * @store: the #TeplMetadataStore.
+ * tepl_metadata_manager_trim:
+ * @manager: the #TeplMetadataManager.
  * @max_number_of_locations: the maximum size, or -1 for the default value.
  *
- * The purpose of having a maximum size is to avoid that the store file grows
+ * The purpose of having a maximum size is to avoid that the file on disk grows
  * indefinitely.
  *
  * @max_number_of_locations is the maximum number of #GFile locations for which
@@ -146,12 +145,12 @@ _tepl_metadata_store_unref_singleton (void)
  * Since: 5.0
  */
 void
-tepl_metadata_store_trim (TeplMetadataStore *store,
-                         gint               max_number_of_locations)
+tepl_metadata_manager_trim (TeplMetadataManager *manager,
+                           gint                 max_number_of_locations)
 {
        guint my_max_number_of_locations;
 
-       g_return_if_fail (TEPL_IS_METADATA_STORE (store));
+       g_return_if_fail (TEPL_IS_METADATA_MANAGER (manager));
        g_return_if_fail (max_number_of_locations >= -1);
 
        if (max_number_of_locations == -1)
@@ -163,7 +162,7 @@ tepl_metadata_store_trim (TeplMetadataStore *store,
                my_max_number_of_locations = max_number_of_locations;
        }
 
-       while (g_hash_table_size (store->priv->hash_table) > my_max_number_of_locations)
+       while (g_hash_table_size (manager->priv->hash_table) > my_max_number_of_locations)
        {
                GHashTableIter iter;
                gpointer key;
@@ -171,7 +170,7 @@ tepl_metadata_store_trim (TeplMetadataStore *store,
                GFile *oldest_location = NULL;
                TeplFileMetadata *oldest_file_metadata = NULL;
 
-               g_hash_table_iter_init (&iter, store->priv->hash_table);
+               g_hash_table_iter_init (&iter, manager->priv->hash_table);
                while (g_hash_table_iter_next (&iter, &key, &value))
                {
                        GFile *location = key;
@@ -185,18 +184,18 @@ tepl_metadata_store_trim (TeplMetadataStore *store,
                        }
                }
 
-               g_hash_table_remove (store->priv->hash_table, oldest_location);
-               store->priv->modified = TRUE;
+               g_hash_table_remove (manager->priv->hash_table, oldest_location);
+               manager->priv->modified = TRUE;
        }
 }
 
 /**
- * tepl_metadata_store_load:
- * @store: the #TeplMetadataStore.
- * @from_file: the store file.
+ * tepl_metadata_manager_load:
+ * @manager: the #TeplMetadataManager.
+ * @from_file: the #GFile to load metadata from.
  * @error: location to a %NULL #GError, or %NULL.
  *
- * Loads synchronously the metadata from @from_file into @store.
+ * Loads synchronously the metadata from @from_file into @manager.
  *
  * A good moment to call this function is on application startup, see the
  * #GApplication::startup signal.
@@ -205,21 +204,21 @@ tepl_metadata_store_trim (TeplMetadataStore *store,
  * Since: 5.0
  */
 gboolean
-tepl_metadata_store_load (TeplMetadataStore  *store,
-                         GFile              *from_file,
-                         GError            **error)
+tepl_metadata_manager_load (TeplMetadataManager  *manager,
+                           GFile                *from_file,
+                           GError              **error)
 {
-       g_return_val_if_fail (TEPL_IS_METADATA_STORE (store), FALSE);
+       g_return_val_if_fail (TEPL_IS_METADATA_MANAGER (manager), FALSE);
        g_return_val_if_fail (G_IS_FILE (from_file), FALSE);
        g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
 
        return _tepl_metadata_parser_read_file (from_file,
-                                               store->priv->hash_table,
+                                               manager->priv->hash_table,
                                                error);
 }
 
 static GBytes *
-to_string (TeplMetadataStore *store)
+to_string (TeplMetadataManager *manager)
 {
        GString *string;
        GHashTableIter iter;
@@ -229,7 +228,7 @@ to_string (TeplMetadataStore *store)
        string = g_string_new (NULL);
        g_string_append (string, "<metadata>\n");
 
-       g_hash_table_iter_init (&iter, store->priv->hash_table);
+       g_hash_table_iter_init (&iter, manager->priv->hash_table);
        while (g_hash_table_iter_next (&iter, &key, &value))
        {
                GFile *location = key;
@@ -244,13 +243,13 @@ to_string (TeplMetadataStore *store)
 }
 
 /**
- * tepl_metadata_store_save:
- * @store: the #TeplMetadataStore.
- * @to_file: the store file.
- * @trim: if %TRUE, tepl_metadata_store_trim() is called with -1.
+ * tepl_metadata_manager_save:
+ * @manager: the #TeplMetadataManager.
+ * @to_file: the #GFile to save metadata to.
+ * @trim: if %TRUE, tepl_metadata_manager_trim() is called with -1.
  * @error: location to a %NULL #GError, or %NULL.
  *
- * Saves synchronously the metadata from @store to @to_file. The parent
+ * Saves synchronously the metadata from @manager to @to_file. The parent
  * directories of @to_file are created if needed.
  *
  * A good moment to call this function is on application shutdown, see the
@@ -260,24 +259,24 @@ to_string (TeplMetadataStore *store)
  * Since: 5.0
  */
 gboolean
-tepl_metadata_store_save (TeplMetadataStore  *store,
-                         GFile              *to_file,
-                         gboolean            trim,
-                         GError            **error)
+tepl_metadata_manager_save (TeplMetadataManager  *manager,
+                           GFile                *to_file,
+                           gboolean              trim,
+                           GError              **error)
 {
        GBytes *bytes;
        gboolean ok;
 
-       g_return_val_if_fail (TEPL_IS_METADATA_STORE (store), FALSE);
+       g_return_val_if_fail (TEPL_IS_METADATA_MANAGER (manager), FALSE);
        g_return_val_if_fail (G_IS_FILE (to_file), FALSE);
        g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
 
        if (trim)
        {
-               tepl_metadata_store_trim (store, -1);
+               tepl_metadata_manager_trim (manager, -1);
        }
 
-       if (!store->priv->modified)
+       if (!manager->priv->modified)
        {
                return TRUE;
        }
@@ -287,7 +286,7 @@ tepl_metadata_store_save (TeplMetadataStore  *store,
                return FALSE;
        }
 
-       bytes = to_string (store);
+       bytes = to_string (manager);
 
        ok = g_file_replace_contents (to_file,
                                      g_bytes_get_data (bytes, NULL),
@@ -301,7 +300,7 @@ tepl_metadata_store_save (TeplMetadataStore  *store,
 
        if (ok)
        {
-               store->priv->modified = FALSE;
+               manager->priv->modified = FALSE;
        }
 
        g_bytes_unref (bytes);
@@ -309,67 +308,67 @@ tepl_metadata_store_save (TeplMetadataStore  *store,
 }
 
 /**
- * tepl_metadata_store_load_file_metadata:
- * @store: the #TeplMetadataStore.
+ * tepl_metadata_manager_load_file_metadata:
+ * @manager: the #TeplMetadataManager.
  * @location: a #GFile.
  * @file_metadata: a #TeplFileMetadata.
  *
- * Copies the metadata stored in @store for @location into @file_metadata.
+ * Copies the metadata stored in @manager for @location into @file_metadata.
  *
  * Since: 5.0
  */
 void
-tepl_metadata_store_load_file_metadata (TeplMetadataStore *store,
-                                       GFile             *location,
-                                       TeplFileMetadata  *file_metadata)
+tepl_metadata_manager_load_file_metadata (TeplMetadataManager *manager,
+                                         GFile               *location,
+                                         TeplFileMetadata    *file_metadata)
 {
-       TeplFileMetadata *file_metadata_from_store;
+       TeplFileMetadata *file_metadata_from_manager;
 
-       g_return_if_fail (TEPL_IS_METADATA_STORE (store));
+       g_return_if_fail (TEPL_IS_METADATA_MANAGER (manager));
        g_return_if_fail (G_IS_FILE (location));
        g_return_if_fail (TEPL_IS_FILE_METADATA (file_metadata));
 
-       file_metadata_from_store = g_hash_table_lookup (store->priv->hash_table, location);
+       file_metadata_from_manager = g_hash_table_lookup (manager->priv->hash_table, location);
 
-       if (file_metadata_from_store != NULL)
+       if (file_metadata_from_manager != NULL)
        {
-               _tepl_file_metadata_copy_into (file_metadata_from_store, file_metadata);
+               _tepl_file_metadata_copy_into (file_metadata_from_manager, file_metadata);
        }
 }
 
 /**
- * tepl_metadata_store_save_file_metadata:
- * @store: the #TeplMetadataStore.
+ * tepl_metadata_manager_save_file_metadata:
+ * @manager: the #TeplMetadataManager.
  * @location: a #GFile.
  * @file_metadata: a #TeplFileMetadata.
  *
- * Copies the metadata from @file_metadata into @store for @location.
+ * Copies the metadata from @file_metadata into @manager for @location.
  *
  * Since: 5.0
  */
 void
-tepl_metadata_store_save_file_metadata (TeplMetadataStore *store,
-                                       GFile             *location,
-                                       TeplFileMetadata  *file_metadata)
+tepl_metadata_manager_save_file_metadata (TeplMetadataManager *manager,
+                                         GFile               *location,
+                                         TeplFileMetadata    *file_metadata)
 {
-       TeplFileMetadata *file_metadata_from_store;
+       TeplFileMetadata *file_metadata_from_manager;
 
-       g_return_if_fail (TEPL_IS_METADATA_STORE (store));
+       g_return_if_fail (TEPL_IS_METADATA_MANAGER (manager));
        g_return_if_fail (G_IS_FILE (location));
        g_return_if_fail (TEPL_IS_FILE_METADATA (file_metadata));
 
-       file_metadata_from_store = g_hash_table_lookup (store->priv->hash_table, location);
+       file_metadata_from_manager = g_hash_table_lookup (manager->priv->hash_table, location);
 
-       if (file_metadata_from_store == NULL)
+       if (file_metadata_from_manager == NULL)
        {
-               file_metadata_from_store = tepl_file_metadata_new ();
+               file_metadata_from_manager = tepl_file_metadata_new ();
 
-               g_hash_table_replace (store->priv->hash_table,
+               g_hash_table_replace (manager->priv->hash_table,
                                      g_object_ref (location),
-                                     file_metadata_from_store);
+                                     file_metadata_from_manager);
        }
 
-       _tepl_file_metadata_copy_into (file_metadata, file_metadata_from_store);
+       _tepl_file_metadata_copy_into (file_metadata, file_metadata_from_manager);
 
-       store->priv->modified = TRUE;
+       manager->priv->modified = TRUE;
 }
diff --git a/tepl/tepl-metadata-manager.h b/tepl/tepl-metadata-manager.h
new file mode 100644
index 0000000..9754463
--- /dev/null
+++ b/tepl/tepl-metadata-manager.h
@@ -0,0 +1,86 @@
+/*
+ * This file is part of Tepl, a text editor library.
+ *
+ * Copyright 2020 - Sébastien Wilmet <swilmet gnome org>
+ *
+ * Tepl is free software; you can redistribute it and/or modify it under
+ * the terms of the GNU Lesser General Public License as published by the
+ * Free Software Foundation; either version 2.1 of the License, or (at your
+ * option) any later version.
+ *
+ * Tepl is distributed in the hope that it will be useful, but WITHOUT ANY
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef TEPL_METADATA_MANAGER_H
+#define TEPL_METADATA_MANAGER_H
+
+#if !defined (TEPL_H_INSIDE) && !defined (TEPL_COMPILATION)
+#error "Only <tepl/tepl.h> can be included directly."
+#endif
+
+#include <gio/gio.h>
+#include <tepl/tepl-file-metadata.h>
+
+G_BEGIN_DECLS
+
+#define TEPL_TYPE_METADATA_MANAGER             (tepl_metadata_manager_get_type ())
+#define TEPL_METADATA_MANAGER(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
TEPL_TYPE_METADATA_MANAGER, TeplMetadataManager))
+#define TEPL_METADATA_MANAGER_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), 
TEPL_TYPE_METADATA_MANAGER, TeplMetadataManagerClass))
+#define TEPL_IS_METADATA_MANAGER(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
TEPL_TYPE_METADATA_MANAGER))
+#define TEPL_IS_METADATA_MANAGER_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), 
TEPL_TYPE_METADATA_MANAGER))
+#define TEPL_METADATA_MANAGER_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), 
TEPL_TYPE_METADATA_MANAGER, TeplMetadataManagerClass))
+
+typedef struct _TeplMetadataManager         TeplMetadataManager;
+typedef struct _TeplMetadataManagerClass    TeplMetadataManagerClass;
+typedef struct _TeplMetadataManagerPrivate  TeplMetadataManagerPrivate;
+
+struct _TeplMetadataManager
+{
+       GObject parent;
+
+       TeplMetadataManagerPrivate *priv;
+};
+
+struct _TeplMetadataManagerClass
+{
+       GObjectClass parent_class;
+
+       gpointer padding[12];
+};
+
+GType                  tepl_metadata_manager_get_type          (void);
+
+TeplMetadataManager *  tepl_metadata_manager_get_singleton     (void);
+
+G_GNUC_INTERNAL
+void                   _tepl_metadata_manager_unref_singleton  (void);
+
+void                   tepl_metadata_manager_trim              (TeplMetadataManager *manager,
+                                                                gint                 
max_number_of_locations);
+
+gboolean               tepl_metadata_manager_load              (TeplMetadataManager  *manager,
+                                                                GFile                *from_file,
+                                                                GError              **error);
+
+gboolean               tepl_metadata_manager_save              (TeplMetadataManager  *manager,
+                                                                GFile                *to_file,
+                                                                gboolean              trim,
+                                                                GError              **error);
+
+void                   tepl_metadata_manager_load_file_metadata (TeplMetadataManager *manager,
+                                                                 GFile               *location,
+                                                                 TeplFileMetadata    *file_metadata);
+
+void                   tepl_metadata_manager_save_file_metadata (TeplMetadataManager *manager,
+                                                                 GFile               *location,
+                                                                 TeplFileMetadata    *file_metadata);
+
+G_END_DECLS
+
+#endif /* TEPL_METADATA_MANAGER_H */
diff --git a/tepl/tepl.h b/tepl/tepl.h
index 8d98c51..cde0488 100644
--- a/tepl/tepl.h
+++ b/tepl/tepl.h
@@ -44,7 +44,7 @@
 #include <tepl/tepl-iter.h>
 #include <tepl/tepl-menu-shell.h>
 #include <tepl/tepl-metadata.h>
-#include <tepl/tepl-metadata-store.h>
+#include <tepl/tepl-metadata-manager.h>
 #include <tepl/tepl-notebook.h>
 #include <tepl/tepl-tab.h>
 #include <tepl/tepl-tab-group.h>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]