[tracker/direct-for-master] libtracker-data: Remove the unused contents.db



commit 4b847d9edbe456df6dbb0207f629b2a7183119c8
Author: Philip Van Hoof <philip codeminded be>
Date:   Thu Jul 8 14:36:34 2010 +0200

    libtracker-data: Remove the unused contents.db

 data/db/Makefile.am                      |    1 -
 data/db/sqlite-contents.sql              |    8 ----
 src/libtracker-data/tracker-db-manager.c |   54 ++++--------------------------
 src/libtracker-data/tracker-db-manager.h |    1 -
 4 files changed, 7 insertions(+), 57 deletions(-)
---
diff --git a/data/db/Makefile.am b/data/db/Makefile.am
index 9a192cd..cd219af 100644
--- a/data/db/Makefile.am
+++ b/data/db/Makefile.am
@@ -3,7 +3,6 @@ include $(top_srcdir)/Makefile.decl
 configdir = $(datadir)/tracker
 
 config_DATA =				\
-	sqlite-contents.sql		\
 	sqlite-tracker.sql
 
 EXTRA_DIST = $(config_DATA)
diff --git a/src/libtracker-data/tracker-db-manager.c b/src/libtracker-data/tracker-db-manager.c
index 6fe8cad..756e496 100644
--- a/src/libtracker-data/tracker-db-manager.c
+++ b/src/libtracker-data/tracker-db-manager.c
@@ -128,17 +128,6 @@ static TrackerDBDefinition dbs[] = {
 	  FALSE,
 	  FALSE,
 	  0 },
-	{ TRACKER_DB_CONTENTS,
-	  TRACKER_DB_LOCATION_DATA_DIR,
-	  NULL,
-	  "contents.db",
-	  "contents",
-	  NULL,
-	  1024,
-	  TRACKER_DB_PAGE_SIZE_DONT_SET,
-	  FALSE,
-	  FALSE,
-	  0 },
 	{ TRACKER_DB_FULLTEXT,
 	  TRACKER_DB_LOCATION_DATA_DIR,
 	  NULL,
@@ -352,25 +341,6 @@ db_interface_get_fulltext (void)
 }
 
 static TrackerDBInterface *
-db_interface_get_contents (void)
-{
-	TrackerDBInterface *iface;
-	gboolean            create;
-
-	iface = db_interface_get (TRACKER_DB_CONTENTS, &create);
-
-	if (create) {
-		tracker_db_interface_start_transaction (iface);
-		load_sql_file (iface, "sqlite-contents.sql", NULL);
-		tracker_db_interface_end_db_transaction (iface);
-	}
-
-	return iface;
-}
-
-
-
-static TrackerDBInterface *
 db_interface_get_metadata (void)
 {
 	TrackerDBInterface *iface;
@@ -403,9 +373,6 @@ db_interface_create (TrackerDB db)
 	case TRACKER_DB_FULLTEXT:
 		return db_interface_get_fulltext ();
 
-	case TRACKER_DB_CONTENTS:
-		return db_interface_get_contents ();
-
 	default:
 		g_critical ("This TrackerDB type:%d->'%s' has no interface set up yet!!",
 		            db,
@@ -593,10 +560,6 @@ tracker_db_get_type (void)
 			{ TRACKER_DB_METADATA,
 			  "TRACKER_DB_METADATA",
 			  "metadata" },
-			{ TRACKER_DB_CONTENTS,
-			  "TRACKER_DB_CONTENTS",
-			  "contents" },
-			{ 0, NULL, NULL }
 		};
 
 		etype = g_enum_register_static ("TrackerDB", values);
@@ -973,15 +936,13 @@ tracker_db_manager_init (TrackerDBManagerFlags  flags,
 	thread_ifaces = g_hash_table_new (NULL, NULL);
 
 	if (flags & TRACKER_DB_MANAGER_READONLY) {
-		resources_iface = tracker_db_manager_get_db_interfaces_ro (3,
+		resources_iface = tracker_db_manager_get_db_interfaces_ro (2,
 		                                                           TRACKER_DB_METADATA,
-		                                                           TRACKER_DB_FULLTEXT,
-		                                                           TRACKER_DB_CONTENTS);
+		                                                           TRACKER_DB_FULLTEXT);
 	} else {
-		resources_iface = tracker_db_manager_get_db_interfaces (3,
+		resources_iface = tracker_db_manager_get_db_interfaces (2,
 		                                                        TRACKER_DB_METADATA,
-		                                                        TRACKER_DB_FULLTEXT,
-		                                                        TRACKER_DB_CONTENTS);
+		                                                        TRACKER_DB_FULLTEXT);
 	}
 
 	g_static_private_set (&interface_data_key, resources_iface, free_thread_interface);
@@ -1423,10 +1384,9 @@ tracker_db_manager_get_db_interface (void)
 
 	/* Ensure the interface is there */
 	if (!interface) {
-		interface = tracker_db_manager_get_db_interfaces (3,
-			                                          TRACKER_DB_METADATA,
-			                                          TRACKER_DB_FULLTEXT,
-			                                          TRACKER_DB_CONTENTS);
+		interface = tracker_db_manager_get_db_interfaces (2,
+		                                                  TRACKER_DB_METADATA,
+		                                                  TRACKER_DB_FULLTEXT);
 
 		tracker_db_interface_sqlite_fts_init (interface, FALSE);
 
diff --git a/src/libtracker-data/tracker-db-manager.h b/src/libtracker-data/tracker-db-manager.h
index 99da6c0..635f4f5 100644
--- a/src/libtracker-data/tracker-db-manager.h
+++ b/src/libtracker-data/tracker-db-manager.h
@@ -35,7 +35,6 @@ G_BEGIN_DECLS
 typedef enum {
 	TRACKER_DB_UNKNOWN,
 	TRACKER_DB_METADATA,
-	TRACKER_DB_CONTENTS,
 	TRACKER_DB_FULLTEXT,
 } TrackerDB;
 



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