[tracker/miner-fs-refactor: 2/120] libtracker-miner: Add tracker_miner_fs_get_indexing_tree()
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/miner-fs-refactor: 2/120] libtracker-miner: Add tracker_miner_fs_get_indexing_tree()
- Date: Mon, 28 Nov 2011 13:28:27 +0000 (UTC)
commit 033d1217278e14af40901eb262eb0f38eea6fbd7
Author: Carlos Garnacho <carlos lanedo com>
Date: Fri Jul 29 15:43:54 2011 +0200
libtracker-miner: Add tracker_miner_fs_get_indexing_tree()
The returned object is owned by the miner, and will be internally
used to find out whether files should be processed.
src/libtracker-miner/tracker-miner-fs.c | 26 ++++++++++++++++++++++++++
src/libtracker-miner/tracker-miner-fs.h | 3 +++
2 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index c696ed9..9ec3af8 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -235,6 +235,8 @@ struct _TrackerMinerFSPrivate {
/* Files to check if no longer exist */
GHashTable *check_removed;
+ TrackerIndexingTree *indexing_tree;
+
/* Config directories where we should force mtime checking, regardless of
* the global mtime check configuration. */
GList *forced_mtime_check_directories;
@@ -760,6 +762,9 @@ tracker_miner_fs_init (TrackerMinerFS *object)
g_signal_connect (priv->writeback_pool, "notify::limit-reached",
G_CALLBACK (task_pool_limit_reached_notify_cb), object);
+ /* Create the indexing tree */
+ priv->indexing_tree = tracker_indexing_tree_new ();
+
/* Set up the crawlers now we have config and hal */
priv->crawler = tracker_crawler_new ();
@@ -779,6 +784,7 @@ tracker_miner_fs_init (TrackerMinerFS *object)
G_CALLBACK (crawler_finished_cb),
object);
+
/* Set up the monitor */
priv->monitor = tracker_monitor_new ();
@@ -949,6 +955,8 @@ fs_finalize (GObject *object)
g_hash_table_unref (priv->check_removed);
}
+ g_object_unref (priv->indexing_tree);
+
#ifdef EVENT_QUEUE_ENABLE_TRACE
if (priv->queue_status_timeout_id)
g_source_remove (priv->queue_status_timeout_id);
@@ -5566,6 +5574,24 @@ tracker_miner_fs_add_directory_without_parent (TrackerMinerFS *fs,
parent);
}
+/**
+ * tracker_miner_fs_get_indexing_tree:
+ * @fs: a #TrackerMinerFS
+ *
+ * Returns the #TrackerIndexingTree which determines
+ * what files/directories are indexed by @fs
+ *
+ * Returns: (transfer none): The #TrackerIndexingTree
+ * holding the indexing configuration
+ **/
+TrackerIndexingTree *
+tracker_miner_fs_get_indexing_tree (TrackerMinerFS *fs)
+{
+ g_return_val_if_fail (TRACKER_IS_MINER_FS (fs), NULL);
+
+ return fs->priv->indexing_tree;
+}
+
/* Returns TRUE if the given GFile is actually the REAL parent
* of a GFile without parent notified before */
static gboolean
diff --git a/src/libtracker-miner/tracker-miner-fs.h b/src/libtracker-miner/tracker-miner-fs.h
index f5f3b6b..700c6d3 100644
--- a/src/libtracker-miner/tracker-miner-fs.h
+++ b/src/libtracker-miner/tracker-miner-fs.h
@@ -30,6 +30,7 @@
#include <libtracker-sparql/tracker-sparql.h>
#include "tracker-miner-object.h"
+#include "tracker-indexing-tree.h"
#include "tracker-miner-common.h"
@@ -168,6 +169,8 @@ void tracker_miner_fs_add_directory_without_parent (TrackerMine
void tracker_miner_fs_force_mtime_checking (TrackerMinerFS *fs,
GFile *directory);
+TrackerIndexingTree * tracker_miner_fs_get_indexing_tree (TrackerMinerFS *fs);
+
G_END_DECLS
#endif /* __LIBTRACKER_MINER_MINER_FS_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]