[tracker/ontology-cache: 3/5] libtracker-data: Write ontologies to gvdb file after ontology changes
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/ontology-cache: 3/5] libtracker-data: Write ontologies to gvdb file after ontology changes
- Date: Wed, 1 Dec 2010 15:55:42 +0000 (UTC)
commit 5c33cb202cb782f6226d0d2b5bff350a36f6c444
Author: Jürg Billeter <j bitron ch>
Date: Wed Dec 1 15:09:30 2010 +0100
libtracker-data: Write ontologies to gvdb file after ontology changes
src/libtracker-data/tracker-data-manager.c | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index ecc9776..5cadf41 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -3234,6 +3234,21 @@ tracker_data_manager_reload (TrackerBusyCallback busy_callback,
return status;
}
+static void
+write_ontologies_gvdb (GError **error)
+{
+ gchar *filename;
+
+ filename = g_build_filename (g_get_user_cache_dir (),
+ "tracker",
+ "ontologies.gvdb",
+ NULL);
+
+ tracker_ontologies_write_gvdb (filename, error);
+
+ g_free (filename);
+}
+
gboolean
tracker_data_manager_init (TrackerDBManagerFlags flags,
const gchar **test_schemas,
@@ -3434,6 +3449,8 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
tracker_data_commit_transaction (NULL);
+ write_ontologies_gvdb (NULL);
+
g_list_foreach (sorted, (GFunc) g_free, NULL);
g_list_free (sorted);
sorted = NULL;
@@ -3767,6 +3784,8 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
g_list_free (to_reload);
tracker_data_ontology_process_changes_post_import (seen_classes, seen_properties);
+
+ write_ontologies_gvdb (NULL);
}
tracker_data_ontology_free_seen (seen_classes);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]