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



commit a64f370321ea801c2fcc0c73fce33df88ef05ee3
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]