Use the Tracker3 policy to specify the accessed graph, drop
the builtin tracker copy, and change tracker-miners build parameters
so we can run our own internal copy.
In code, first check whether there is access to the stock miner,
then attempt this internal miner. This is a fallback for systems that
do not have tracker3 installed.
Use new Tracker.SparqlConnection constructors, and rework the queries
so that it:
1) Observes the data layout in use in Tracker Miners 3.x
2) Uses a private database for the data considered writeable:
- collections
- titles
3) Queries g-o-m miners specifically, alongside local data
All queries happen on the local connection, optionally including data
from tracker-miner-fs and g-o-m miners via SERVICE{} clauses, this is
just not the case for collection queries, since collections are stored
in the private documents database.
This relies on libtracker-control, which is no longer a thing. It
might make sense to track indexing state, but that goes together
with requests to index specific locations.
In a sandboxed environment it's no possible (or shouldn't be!) to
inspect tracker settings. This is just used to include results from
custom folders in addition to Documents/Downloads/Desktop folders,
however these are not accessible within the sandbox anymore.
Drop this code, and stick to the given XDG folders, if support for
custom folders is desirable, should go through the
org.freedesktop.Tracker3.Miner.Files.Index interface.