summaryrefslogtreecommitdiff
path: root/src/miners/user-guides/tracker-miner-user-guides.c
diff options
context:
space:
mode:
authorSam Thursfield <sam@afuera.me.uk>2015-08-11 18:19:42 +0200
committerSam Thursfield <sam@afuera.me.uk>2015-08-18 22:31:31 +0100
commit997d6d79253da6455c940eec4e15dde9c87b244f (patch)
tree94cf11d1881a7347980d1a419a31bc3d512fd394 /src/miners/user-guides/tracker-miner-user-guides.c
parent7f6b036c7136366a9533b8482bdedfb8958d83a3 (diff)
downloadtracker-997d6d79253da6455c940eec4e15dde9c87b244f.tar.gz
libtracker-miner: Add ownership tracking to Tracker indexing configsam/index-mount-points-2
The TrackerIndexingTree class keeps track of each directory or file that has been explicitly selected for indexing and monitoring. As a new feature, we want to allow any application to add to the list of directories being indexed and monitored, and to later be able to remove things from the list again. Previously, the tracker-miner-fs process was totally in control of what went in the IndexingTree. In order to ensure that applications can't interfere with the existing configuration, we need to track *who* added something to the indexing tree. This is done with a string identifier. The tracker_miner_fs_directory_add() functions now take an 'owner' parameter so they can keep track of who is interested in each configured indexing root. The tracker_miner_fs_ignore() function lets a given owner that previously expressed interest in an indexing root now say that they are not interested. If that indexing root has no 'owners' left, it is deleted from the TrackerIndexingTree, which cancels any running indexing tasks and removes any monitors. We need to make sure that nobody can claim the internal 'tracker-miner-fs' ID through the external API -- that would make it possible to override the internal configuration.
Diffstat (limited to 'src/miners/user-guides/tracker-miner-user-guides.c')
-rw-r--r--src/miners/user-guides/tracker-miner-user-guides.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/miners/user-guides/tracker-miner-user-guides.c b/src/miners/user-guides/tracker-miner-user-guides.c
index 59dfc4067..2ea489414 100644
--- a/src/miners/user-guides/tracker-miner-user-guides.c
+++ b/src/miners/user-guides/tracker-miner-user-guides.c
@@ -114,7 +114,8 @@ miner_userguides_basedir_add_path (TrackerMinerFS *fs,
tracker_indexing_tree_add (indexing_tree, file,
TRACKER_DIRECTORY_FLAG_RECURSE |
TRACKER_DIRECTORY_FLAG_MONITOR |
- TRACKER_DIRECTORY_FLAG_CHECK_MTIME);
+ TRACKER_DIRECTORY_FLAG_CHECK_MTIME,
+ "tracker-miner-user-guides");
g_object_unref (file);
return TRUE;