diff options
author | Sam Thursfield <sam@afuera.me.uk> | 2018-04-20 19:00:31 +0200 |
---|---|---|
committer | Sam Thursfield <sam@afuera.me.uk> | 2018-08-11 20:14:54 +0200 |
commit | eb24ea93bc550934d15223d002b490143e604921 (patch) | |
tree | 2a1c2151161a7178550871b43ebb84647107fcf3 /src/libtracker-sparql/tracker-notifier.c | |
parent | 061667e1eeac036130a944083aca4fcf16004e6a (diff) | |
download | tracker-sam/tracker-sparql-connection-set-dbus-connection.tar.gz |
Add tracker_sparql_connection_get/set_dbus_connection()sam/tracker-sparql-connection-set-dbus-connection
Currently it's only possible to open a TrackerSparqlConnection to
an instance of Tracker that is running on the session-wide message bus.
There are use cases for running the Tracker daemons on a private
session bus though. In fact it's necessary to do this if you want to
set up a custom domain without having to become root and create .service
files in /usr/share/dbus-1/services. It would also be useful for the
functional-tests to be able to use libtracker-sparql instead of having
to talk directly to Tracker's D-Bus API.
Diffstat (limited to 'src/libtracker-sparql/tracker-notifier.c')
-rw-r--r-- | src/libtracker-sparql/tracker-notifier.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libtracker-sparql/tracker-notifier.c b/src/libtracker-sparql/tracker-notifier.c index 72b29da65..7058955c0 100644 --- a/src/libtracker-sparql/tracker-notifier.c +++ b/src/libtracker-sparql/tracker-notifier.c @@ -704,7 +704,9 @@ tracker_notifier_initable_init (GInitable *initable, tracker_notifier_cache_id (notifier, "nie:dataSource"); tracker_notifier_cache_id (notifier, "tracker:extractor-data-source"); - priv->dbus_connection = g_bus_get_sync (G_BUS_TYPE_SESSION, cancellable, error); + priv->dbus_connection = tracker_sparql_connection_get_dbus_connection (); + if (!priv->dbus_connection) + priv->dbus_connection = g_bus_get_sync (G_BUS_TYPE_SESSION, cancellable, error); if (!priv->dbus_connection) return FALSE; |