[tracker/wip/carlosg/notifier-service-queries: 11/12] libtracker-sparql: Add API docs for notifier DBus subscription calls
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/notifier-service-queries: 11/12] libtracker-sparql: Add API docs for notifier DBus subscription calls
- Date: Sun, 21 Jun 2020 21:31:49 +0000 (UTC)
commit e5e942112caa5c4eed3c3527f2020a637d50afc2
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Jun 21 20:04:30 2020 +0200
libtracker-sparql: Add API docs for notifier DBus subscription calls
src/libtracker-sparql/tracker-notifier.c | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
---
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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]