summaryrefslogtreecommitdiff
path: root/src/libtracker-sparql/tracker-notifier.c
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2020-06-21 20:04:30 +0200
committerCarlos Garnacho <carlosg@gnome.org>2020-06-21 22:58:02 +0200
commite5e942112caa5c4eed3c3527f2020a637d50afc2 (patch)
treef0d649c1dd61f00f76667fae0456117f8c89d3e0 /src/libtracker-sparql/tracker-notifier.c
parent9d46bf7aae2c51463cf9e67751029ffed7fa0b53 (diff)
downloadtracker-e5e942112caa5c4eed3c3527f2020a637d50afc2.tar.gz
libtracker-sparql: Add API docs for notifier DBus subscription calls
Diffstat (limited to 'src/libtracker-sparql/tracker-notifier.c')
-rw-r--r--src/libtracker-sparql/tracker-notifier.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/libtracker-sparql/tracker-notifier.c b/src/libtracker-sparql/tracker-notifier.c
index 1f529f584..25dff678a 100644
--- a/src/libtracker-sparql/tracker-notifier.c
+++ b/src/libtracker-sparql/tracker-notifier.c
@@ -658,6 +658,26 @@ tracker_notifier_init (TrackerNotifier *notifier)
priv->cancellable = g_cancellable_new ();
}
+/**
+ * tracker_notifier_signal_subscribe:
+ * @notifier: a #TrackerNotifier
+ * @connection: a #GDBusConnection
+ * @service: DBus service name to subscribe to events for
+ * @object_path: DBus object path to subscribe to events for, or %NULL
+ * @graph: graph to listen events for, or %NULL
+ *
+ * Listens to notification events from a remote SPARQL endpoint as a DBus
+ * service (see #TrackerEndpointDBus). If the @object_path argument is
+ * %NULL, the default "/org/freedesktop/Tracker3/Endpoint" path will be
+ * used. If @graph is %NULL, all graphs will be listened for.
+ *
+ * The signal subscription can be removed with
+ * tracker_notifier_signal_unsubscribe().
+ *
+ * Returns: An ID for this subscription
+ *
+ * Since: 3.0
+ **/
guint
tracker_notifier_signal_subscribe (TrackerNotifier *notifier,
GDBusConnection *connection,
@@ -697,6 +717,16 @@ tracker_notifier_signal_subscribe (TrackerNotifier *notifier,
return subscription->handler_id;
}
+/**
+ * tracker_notifier_signal_unsubscribe:
+ * @notifier: a #TrackerNotifier
+ * @handler_id: a handler ID obtained with tracker_notifier_signal_subscribe()
+ *
+ * Undoes a DBus signal subscription, the @handler_id argument was previously
+ * obtained with a tracker_notifier_signal_subscribe() call.
+ *
+ * Since: 3.0
+ **/
void
tracker_notifier_signal_unsubscribe (TrackerNotifier *notifier,
guint handler_id)