[tracker/ontologies: 1/2] Do not initialize ontologies module in libtracker-db
- From: Jürg Billeter <juergbi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/ontologies: 1/2] Do not initialize ontologies module in libtracker-db
- Date: Fri, 12 Mar 2010 13:51:10 +0000 (UTC)
commit ee50ff65c886cd5ec23ad96807fd630e41bb7472
Author: Jürg Billeter <j bitron ch>
Date: Fri Mar 12 13:30:21 2010 +0100
Do not initialize ontologies module in libtracker-db
It is only used in libtracker-data. This commit moves initialization
from libtracker-db to libtracker-data.
src/libtracker-data/tracker-data-manager.c | 5 +++++
src/libtracker-db/tracker-db-manager.c | 20 --------------------
2 files changed, 5 insertions(+), 20 deletions(-)
---
diff --git a/src/libtracker-data/tracker-data-manager.c b/src/libtracker-data/tracker-data-manager.c
index ddd554e..13e75c8 100644
--- a/src/libtracker-data/tracker-data-manager.c
+++ b/src/libtracker-data/tracker-data-manager.c
@@ -1572,6 +1572,9 @@ tracker_data_manager_init (TrackerDBManagerFlags flags,
return TRUE;
}
+ /* Make sure we initialize all other modules we depend on */
+ tracker_ontologies_init ();
+
read_journal = FALSE;
if (!tracker_db_manager_init (flags, &is_first_time_index, FALSE)) {
@@ -1803,8 +1806,10 @@ tracker_data_manager_shutdown (void)
{
g_return_if_fail (initialized == TRUE);
+ /* Make sure we shutdown all other modules we depend on */
tracker_db_journal_shutdown ();
tracker_db_manager_shutdown ();
+ tracker_ontologies_shutdown ();
initialized = FALSE;
}
diff --git a/src/libtracker-db/tracker-db-manager.c b/src/libtracker-db/tracker-db-manager.c
index 3a1fc24..be58a50 100644
--- a/src/libtracker-db/tracker-db-manager.c
+++ b/src/libtracker-db/tracker-db-manager.c
@@ -35,8 +35,6 @@
#include <libtracker-common/tracker-date-time.h>
#include <libtracker-common/tracker-file-utils.h>
-#include <libtracker-common/tracker-ontologies.h>
-#include <libtracker-common/tracker-property.h>
#include <libtracker-common/tracker-utils.h>
#include "tracker-db-journal.h"
@@ -1219,15 +1217,6 @@ db_recreate_all (void)
db_manager_remove_all (FALSE);
- /* In cases where we re-init this module, make sure
- * we have cleaned up the ontology before we load all
- * new databases.
- */
- tracker_ontologies_shutdown ();
-
- /* Make sure we initialize all other modules we depend on */
- tracker_ontologies_init ();
-
/* Now create the databases and close them */
g_message ("Creating database files, this may take a few moments...");
@@ -1440,18 +1429,12 @@ tracker_db_manager_init (TrackerDBManagerFlags flags,
db_recreate_all ();
- /* Make sure we initialize all other modules we depend on */
- tracker_ontologies_init ();
-
/* Load databases */
g_message ("Loading databases files...");
} else {
gboolean must_recreate;
- /* Make sure we initialize all other modules we depend on */
- tracker_ontologies_init ();
-
/* Load databases */
g_message ("Loading databases files...");
@@ -1605,9 +1588,6 @@ tracker_db_manager_shutdown (void)
g_type_class_unref (db_type_enum_class_pointer);
db_type_enum_class_pointer = NULL;
- /* Make sure we shutdown all other modules we depend on */
- tracker_ontologies_shutdown ();
-
initialized = FALSE;
locations_initialized = FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]