[tracker/wip/carlosg/domain-ontologies: 107/124] tracker-miner-rss: Look up the right dbus name for GraphUpdated



commit 4c9dcc8ff75e7c3aeae0b663d3d0c5a5590b58c1
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Jun 21 17:57:34 2017 +0200

    tracker-miner-rss: Look up the right dbus name for GraphUpdated
    
    This should be ported to TrackerNotifier, which already does the right
    thing.

 src/miners/rss/tracker-miner-rss.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/miners/rss/tracker-miner-rss.c b/src/miners/rss/tracker-miner-rss.c
index eda6493..daa09cb 100644
--- a/src/miners/rss/tracker-miner-rss.c
+++ b/src/miners/rss/tracker-miner-rss.c
@@ -248,6 +248,8 @@ tracker_miner_rss_init (TrackerMinerRSS *object)
 {
        GError *error = NULL;
        TrackerMinerRSSPrivate *priv;
+       TrackerDomainOntology *domain_ontology;
+       gchar *dbus_name;
 
        g_message ("Initializing...");
 
@@ -278,9 +280,13 @@ tracker_miner_rss_init (TrackerMinerRSS *object)
        g_message ("Listening for GraphUpdated changes on D-Bus interface...");
        g_message ("  arg0:'%s'", TRACKER_PREFIX_MFO "FeedChannel");
 
+       domain_ontology = tracker_domain_ontology_new (tracker_sparql_connection_get_domain (),
+                                                      NULL, NULL);
+       dbus_name = tracker_domain_ontology_get_domain (domain_ontology, NULL);
+
        priv->graph_updated_id =
                g_dbus_connection_signal_subscribe  (priv->connection,
-                                                    "org.freedesktop.Tracker1",
+                                                    dbus_name,
                                                     "org.freedesktop.Tracker1.Resources",
                                                     "GraphUpdated",
                                                     "/org/freedesktop/Tracker1/Resources",
@@ -289,6 +295,8 @@ tracker_miner_rss_init (TrackerMinerRSS *object)
                                                     graph_updated_cb,
                                                     object,
                                                     NULL);
+       g_free (dbus_name);
+       g_object_unref (domain_ontology);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]