tracker r1360 - in branches/indexer-split: . src/trackerd



Author: ifrade
Date: Tue May  6 17:30:48 2008
New Revision: 1360
URL: http://svn.gnome.org/viewvc/tracker?rev=1360&view=rev

Log:
Removed DBConnection->index

Modified:
   branches/indexer-split/ChangeLog
   branches/indexer-split/src/trackerd/tracker-db-email.c
   branches/indexer-split/src/trackerd/tracker-db-sqlite.c
   branches/indexer-split/src/trackerd/tracker-db-sqlite.h
   branches/indexer-split/src/trackerd/tracker-db.c
   branches/indexer-split/src/trackerd/trackerd.c

Modified: branches/indexer-split/src/trackerd/tracker-db-email.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-db-email.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-db-email.c	Tue May  6 17:30:48 2008
@@ -449,7 +449,7 @@
 
 	if (mm->deleted || mm->junk) {
 		if (mm->parent_mail_file) {
-			tracker_db_email_insert_junk (db_con->index, mm->parent_mail_file->path, mm->id);
+			tracker_db_email_insert_junk (db_con, mm->parent_mail_file->path, mm->id);
 		}
 
 		if (mm->store) {
@@ -469,7 +469,7 @@
 
 	if (mm->parent_mail_file) {
 		if (mm->is_mbox) {
-			mbox_id = tracker_db_email_get_mbox_id (db_con->index, mm->parent_mail_file->path);
+			mbox_id = tracker_db_email_get_mbox_id (db_con, mm->parent_mail_file->path);
 			if (mbox_id == -1) {
 				tracker_error ("ERROR: no mbox is registered for email %s", mm->uri);
 				return TRUE;
@@ -503,7 +503,7 @@
 	info->aux_id = mbox_id;
         info->mtime = mm->mtime;
 
-	id = tracker_db_create_service (db_con->index, service, info);
+	id = tracker_db_create_service (db_con, service, info);
 
 	tracker_db_file_info_free (info);
 
@@ -523,20 +523,20 @@
 			gchar *value = get_utf8 (mm->body);
 
 			if (value) {
-				tracker_db_insert_single_embedded_metadata (db_con->index, service, str_id, "Email:Body", value, index_table);
+				tracker_db_insert_single_embedded_metadata (db_con, service, str_id, "Email:Body", value, index_table);
 				g_free (value);
 			}			
 		}
 
 		if (str_date) {
-			tracker_db_insert_single_embedded_metadata (db_con->index, service, str_id, "Email:Date", str_date, index_table);
+			tracker_db_insert_single_embedded_metadata (db_con, service, str_id, "Email:Date", str_date, index_table);
 		}
 
 		if (mm->from) {
 			gchar *value = get_utf8 (mm->from);
 			
 			if (value) {
-				tracker_db_insert_single_embedded_metadata (db_con->index, service, str_id, "Email:Sender", value, index_table);
+				tracker_db_insert_single_embedded_metadata (db_con, service, str_id, "Email:Sender", value, index_table);
 				g_free (value);
 			}
 		}
@@ -545,7 +545,7 @@
 			gchar *value = get_utf8 (mm->subject);
 
 			if (value) {
-				tracker_db_insert_single_embedded_metadata (db_con->index, service, str_id, "Email:Subject", value, index_table);
+				tracker_db_insert_single_embedded_metadata (db_con, service, str_id, "Email:Subject", value, index_table);
 				g_free (value);
 			}
 		}
@@ -586,7 +586,7 @@
 			}
 
 			if (i > 0) {
-				tracker_db_insert_embedded_metadata (db_con->index, service, str_id, "Email:SentTo", array, i, index_table);
+				tracker_db_insert_embedded_metadata (db_con, service, str_id, "Email:SentTo", array, i, index_table);
 			}
 
 			for (i--; i>-1; i--) {
@@ -626,7 +626,7 @@
 			}
 
 			if (i > 0) {
-				tracker_db_insert_embedded_metadata (db_con->index, service, str_id, "Email:CC", array, i, index_table);
+				tracker_db_insert_embedded_metadata (db_con, service, str_id, "Email:CC", array, i, index_table);
 			}
 
 			for (i--; i > -1; i--) {
@@ -656,7 +656,7 @@
 			}
 
 			if (i > 0) {
-				tracker_db_insert_embedded_metadata (db_con->index, service, str_id, "Email:Attachments", array, i, index_table);
+				tracker_db_insert_embedded_metadata (db_con, service, str_id, "Email:Attachments", array, i, index_table);
 			}
 
 			for (i--; i > -1; i--) {

Modified: branches/indexer-split/src/trackerd/tracker-db-sqlite.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-db-sqlite.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-db-sqlite.c	Tue May  6 17:30:48 2008
@@ -593,13 +593,11 @@
 	db_con->emails = emails_db_con;
 	db_con->common = common_db_con;
 	db_con->word_index = word_index_db_con;
-	db_con->index = db_con;
 
 	emails_db_con->common = common_db_con;
 	emails_db_con->blob = emails_blob_db_con;
 	emails_db_con->data = db_con;
 	emails_db_con->word_index = email_word_index_db_con;
-	emails_db_con->index = emails_db_con;
 	emails_db_con->cache = db_con->cache;
 	
 	return db_con;
@@ -821,8 +819,6 @@
 
 	db_con = g_new0 (DBConnection, 1);
 
-	db_con->index = db_con;
-
 	open_file_db (db_con);
 
 	return db_con;
@@ -846,7 +842,6 @@
 
 	db_con = g_new0 (DBConnection, 1);
 
-	db_con->index = db_con;
 	db_con->emails = db_con;
 
 	open_email_db (db_con);
@@ -3522,7 +3517,7 @@
 	name = g_path_get_basename (info->uri);
 	path = g_path_get_dirname (info->uri);
 
-	tracker_exec_proc (db_con->index, "UpdateFile", str_service_type_id, path, name, info->mime, str_size, str_mtime, str_offset, str_file_id, NULL);
+	tracker_exec_proc (db_con, "UpdateFile", str_service_type_id, path, name, info->mime, str_size, str_mtime, str_offset, str_file_id, NULL);
 
 	tracker_db_create_event (db_con, str_file_id, "Update");
 

Modified: branches/indexer-split/src/trackerd/tracker-db-sqlite.h
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-db-sqlite.h	(original)
+++ branches/indexer-split/src/trackerd/tracker-db-sqlite.h	Tue May  6 17:30:48 2008
@@ -37,7 +37,6 @@
 	/* pointers to other database connection objects */
 	DBConnection	*data;
 	DBConnection	*common;
-	DBConnection	*index;
 	DBConnection	*emails;
 	DBConnection	*blob;
 	DBConnection	*cache;

Modified: branches/indexer-split/src/trackerd/tracker-db.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-db.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-db.c	Tue May  6 17:30:48 2008
@@ -124,7 +124,7 @@
 		path = tracker_file_get_vfs_path (uri);
 	}
 
-	result_set = tracker_exec_proc (db_con->index, "GetServiceID", path, name, NULL);
+	result_set = tracker_exec_proc (db_con, "GetServiceID", path, name, NULL);
 
 	g_free (path);
 	g_free (name);
@@ -159,7 +159,7 @@
 	//apath = tracker_escape_string (path);
 	//aname = tracker_escape_string (name);
 
-	result_set = tracker_exec_proc (db_con->index, "GetServiceID", path, name, NULL);
+	result_set = tracker_exec_proc (db_con, "GetServiceID", path, name, NULL);
 
 //	g_free (aname);
 //	g_free (apath);
@@ -312,11 +312,10 @@
 	GPtrArray *array;
 
 	g_return_val_if_fail (db_con, NULL);
-	g_return_val_if_fail (db_con->index, NULL);
 	g_return_val_if_fail (folder_uri, NULL);
 	g_return_val_if_fail (folder_uri[0] != '\0', NULL);
 
-	result_set = tracker_exec_proc (db_con->index, "SelectFileChild", folder_uri, NULL);
+	result_set = tracker_exec_proc (db_con, "SelectFileChild", folder_uri, NULL);
 	array = g_ptr_array_new ();
 
 	if (result_set) {
@@ -780,7 +779,7 @@
         string_list = tracker_gslist_to_string_list (value);
 	tracker_log ("restoring keyword list with %d items", g_slist_length (value));
 
-	tracker_db_set_metadata (db_action->db_con->index, db_action->service, db_action->file_id, mtype, string_list, g_slist_length (value), FALSE);
+	tracker_db_set_metadata (db_action->db_con, db_action->service, db_action->file_id, mtype, string_list, g_slist_length (value), FALSE);
 
 	g_strfreev (string_list);
 }
@@ -854,9 +853,9 @@
 		info->uri = (char *) uri;
 
 		if (attachment_service) {
-			info->file_id = tracker_db_create_service (db_con->index, attachment_service, info);
+			info->file_id = tracker_db_create_service (db_con, attachment_service, info);
 		} else {
-			info->file_id = tracker_db_create_service (db_con->index, service, info);
+			info->file_id = tracker_db_create_service (db_con, service, info);
 		}
 
 		info->uri = old_uri;
@@ -935,7 +934,7 @@
 	}
 
 	if (meta_table && (g_hash_table_size (meta_table) > 0)) {
-		tracker_db_save_metadata (db_con->index, meta_table, index_table, service, info->file_id, info->is_new);
+		tracker_db_save_metadata (db_con, meta_table, index_table, service, info->file_id, info->is_new);
 	}
 
 	

Modified: branches/indexer-split/src/trackerd/trackerd.c
==============================================================================
--- branches/indexer-split/src/trackerd/trackerd.c	(original)
+++ branches/indexer-split/src/trackerd/trackerd.c	Tue May  6 17:30:48 2008
@@ -897,7 +897,6 @@
 
 	db_con->cache = tracker_db_connect_cache ();
 	db_con->common = tracker_db_connect_common ();
-	db_con->index = db_con;
 
 	main_thread_db_con = db_con;
 	



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