[tracker/wip/miner-fs-refactor: 25/31] tracker-miner-fs: Make TrackerMinerApplications use TrackerIndexingTree



commit 20b6e13ea326e984343864d98d080d554229dc9e
Author: Carlos Garnacho <carlos lanedo com>
Date:   Thu Sep 8 16:41:52 2011 +0200

    tracker-miner-fs: Make TrackerMinerApplications use TrackerIndexingTree

 src/miners/fs/tracker-miner-applications.c |   24 +++++++++++++++++++++---
 1 files changed, 21 insertions(+), 3 deletions(-)
---
diff --git a/src/miners/fs/tracker-miner-applications.c b/src/miners/fs/tracker-miner-applications.c
index b20d6a6..7a8870d 100644
--- a/src/miners/fs/tracker-miner-applications.c
+++ b/src/miners/fs/tracker-miner-applications.c
@@ -110,14 +110,22 @@ static void
 miner_applications_basedir_add (TrackerMinerFS *fs,
                                 const gchar    *basedir)
 {
+	TrackerIndexingTree *indexing_tree;
 	GFile *file;
 	gchar *path;
 
+	indexing_tree = tracker_miner_fs_get_indexing_tree (fs);
+
 	/* Add $dir/applications */
 	path = g_build_filename (basedir, "applications", NULL);
 	file = g_file_new_for_path (path);
 	g_message ("  Adding:'%s'", path);
-	tracker_miner_fs_directory_add (fs, file, TRUE);
+
+	tracker_indexing_tree_add (indexing_tree, file,
+				   TRACKER_DIRECTORY_FLAG_RECURSE |
+				   TRACKER_DIRECTORY_FLAG_MONITOR |
+				   TRACKER_DIRECTORY_FLAG_CHECK_MTIME);
+	//tracker_miner_fs_directory_add (fs, file, TRUE);
 	g_object_unref (file);
 	g_free (path);
 
@@ -125,7 +133,11 @@ miner_applications_basedir_add (TrackerMinerFS *fs,
 	path = g_build_filename (basedir, "desktop-directories", NULL);
 	file = g_file_new_for_path (path);
 	g_message ("  Adding:'%s'", path);
-	tracker_miner_fs_directory_add (fs, file, TRUE);
+	tracker_indexing_tree_add (indexing_tree, file,
+				   TRACKER_DIRECTORY_FLAG_RECURSE |
+				   TRACKER_DIRECTORY_FLAG_MONITOR |
+				   TRACKER_DIRECTORY_FLAG_CHECK_MTIME);
+	//tracker_miner_fs_directory_add (fs, file, TRUE);
 	g_object_unref (file);
 	g_free (path);
 }
@@ -134,6 +146,7 @@ static void
 miner_applications_add_directories (TrackerMinerFS *fs)
 {
 #ifdef HAVE_MEEGOTOUCH
+	TrackerIndexingTree *indexing_tree;
 	GFile *file;
 	const gchar *path;
 #endif /* HAVE_MEEGOTOUCH */
@@ -162,12 +175,17 @@ miner_applications_add_directories (TrackerMinerFS *fs)
 	 * this location because it is unique to MeeGoTouch.
 	 */
 	path = "/usr/lib/duicontrolpanel/";
+	indexing_tree = tracker_miner_fs_get_indexing_tree (fs);
 
 	g_message ("Setting up applications to iterate from MeegoTouch directories");
 	g_message ("  Adding:'%s'", path);
 
 	file = g_file_new_for_path (path);
-	tracker_miner_fs_directory_add (fs, file, TRUE);
+	tracker_indexing_tree_add (indexing_tree, file,
+				   TRACKER_DIRECTORY_FLAG_RECURSE |
+				   TRACKER_DIRECTORY_FLAG_MONITOR |
+				   TRACKER_DIRECTORY_FLAG_CHECK_MTIME);
+	//tracker_miner_fs_directory_add (fs, file, TRUE);
 	g_object_unref (file);
 #endif /* HAVE_MEEGOTOUCH */
 }



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