[tracker/wip/carlosg/tracker-3.0-api-breaks: 22/79] libtracker-bus: Implement TrackerSparqlConnection::create_notifier



commit 2fb9089a298ab9ef8ee99ccffa3ec09244c4f35d
Author: Carlos Garnacho <carlosg gnome org>
Date:   Fri Dec 20 18:30:14 2019 +0100

    libtracker-bus: Implement TrackerSparqlConnection::create_notifier
    
    The notifiers created through it subscribe by default to events from
    the same service.

 src/libtracker-bus/tracker-bus.vala | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/src/libtracker-bus/tracker-bus.vala b/src/libtracker-bus/tracker-bus.vala
index e02eef7d7..185368abf 100644
--- a/src/libtracker-bus/tracker-bus.vala
+++ b/src/libtracker-bus/tracker-bus.vala
@@ -288,4 +288,12 @@ public class Tracker.Bus.Connection : Tracker.Sparql.Connection {
                handle_error_reply (reply);
                return reply.get_body ().get_child_value (0);
        }
+
+       public override Tracker.Notifier? create_notifier (Tracker.NotifierFlags flags) {
+               var notifier = (Tracker.Notifier) Object.new (typeof (Tracker.Notifier));
+
+               notifier.signal_subscribe (this.bus, this.dbus_name, null);
+
+               return notifier;
+       }
 }


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