[tracker/wip/carlosg/domain-ontologies: 104/116] libtracker-miner: Make TrackerMinerProxy look for the right tracker-store
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/domain-ontologies: 104/116] libtracker-miner: Make TrackerMinerProxy look for the right tracker-store
- Date: Sun, 25 Jun 2017 13:13:53 +0000 (UTC)
commit 808be4f933436a3c777cf962d38a9c1c1bdd7919
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Jun 21 21:01:51 2017 +0200
libtracker-miner: Make TrackerMinerProxy look for the right tracker-store
Use the domain name to find out the right tracker-store DBus name.
src/libtracker-miner/tracker-miner-proxy.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-proxy.c b/src/libtracker-miner/tracker-miner-proxy.c
index b543d84..39f29e4 100644
--- a/src/libtracker-miner/tracker-miner-proxy.c
+++ b/src/libtracker-miner/tracker-miner-proxy.c
@@ -24,6 +24,7 @@
#include <glib/gi18n.h>
#include <libtracker-common/tracker-dbus.h>
#include <libtracker-common/tracker-type-utils.h>
+#include <libtracker-common/tracker-domain-ontology.h>
#include "tracker-miner-proxy.h"
@@ -772,6 +773,8 @@ tracker_miner_proxy_initable_init (GInitable *initable,
TrackerMinerProxy *proxy = TRACKER_MINER_PROXY (initable);
TrackerMinerProxyPrivate *priv = tracker_miner_proxy_get_instance_private (proxy);
GError *inner_error = NULL;
+ TrackerDomainOntology *domain_ontology;
+ gchar *store_name;
GDBusInterfaceVTable interface_vtable = {
handle_method_call,
handle_get_property,
@@ -798,14 +801,24 @@ tracker_miner_proxy_initable_init (GInitable *initable,
return FALSE;
}
+ domain_ontology = tracker_domain_ontology_new (tracker_sparql_connection_get_domain (),
+ cancellable, &inner_error);
+ if (inner_error) {
+ g_propagate_error (error, inner_error);
+ return FALSE;
+ }
+
+ store_name = tracker_domain_ontology_get_domain (domain_ontology, NULL);
+
priv->watch_name_id =
g_bus_watch_name_on_connection (priv->d_connection,
- TRACKER_SERVICE,
+ store_name,
G_BUS_NAME_WATCHER_FLAGS_NONE,
on_tracker_store_appeared,
on_tracker_store_disappeared,
proxy,
NULL);
+ g_free (store_name);
g_signal_connect (priv->miner, "started",
G_CALLBACK (miner_started_cb), proxy);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]