[tracker/miner-fs-refactor: 2/74] 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/74] libtracker-miner: Add tracker_miner_fs_get_indexing_tree()
- Date: Tue, 4 Oct 2011 10:50:37 +0000 (UTC)
commit 4928eb871230dcd0f1be543443de45b5c02fa800
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 0ffcfa9..6520604 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -234,6 +234,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;
@@ -751,6 +753,9 @@ tracker_miner_fs_init (TrackerMinerFS *object)
priv->task_pool = tracker_task_pool_new (DEFAULT_WAIT_POOL_LIMIT);
priv->writeback_pool = tracker_task_pool_new (DEFAULT_WAIT_POOL_LIMIT);
+ /* 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 ();
@@ -770,6 +775,7 @@ tracker_miner_fs_init (TrackerMinerFS *object)
G_CALLBACK (crawler_finished_cb),
object);
+
/* Set up the monitor */
priv->monitor = tracker_monitor_new ();
@@ -936,6 +942,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);
@@ -5536,6 +5544,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]