summaryrefslogtreecommitdiffstats
path: root/man/sd_bus_add_object.xml
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2020-04-19 17:20:53 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-04-19 19:00:22 +0200
commit3841fa79164559404d4342fe58f626660a49ec32 (patch)
tree525707d6ca298300f62637b1bff691c44e4c9b59 /man/sd_bus_add_object.xml
parentMerge pull request #15463 from keszybz/resolvectl-query-formatting (diff)
downloadsystemd-3841fa79164559404d4342fe58f626660a49ec32.tar.xz
systemd-3841fa79164559404d4342fe58f626660a49ec32.zip
sd-bus: Add sd_bus_add_filter docs
Diffstat (limited to '')
-rw-r--r--man/sd_bus_add_object.xml16
1 files changed, 15 insertions, 1 deletions
diff --git a/man/sd_bus_add_object.xml b/man/sd_bus_add_object.xml
index 2abe2342f0..373609f042 100644
--- a/man/sd_bus_add_object.xml
+++ b/man/sd_bus_add_object.xml
@@ -21,6 +21,7 @@
<refname>sd_bus_add_fallback</refname>
<refname>sd_bus_add_object_vtable</refname>
<refname>sd_bus_add_fallback_vtable</refname>
+ <refname>sd_bus_add_filter</refname>
<refname>SD_BUS_VTABLE_START</refname>
<refname>SD_BUS_VTABLE_END</refname>
<refname>SD_BUS_METHOD_WITH_NAMES_OFFSET</refname>
@@ -117,6 +118,14 @@
<paramdef>void *<parameter>userdata</parameter></paramdef>
</funcprototype>
+ <funcprototype>
+ <funcdef>int <function>sd_bus_add_filter</function></funcdef>
+ <paramdef>sd_bus *<parameter>bus</parameter></paramdef>
+ <paramdef>sd_bus_slot **<parameter>slot</parameter></paramdef>
+ <paramdef>sd_bus_message_handler_t <parameter>callback</parameter></paramdef>
+ <paramdef>void *<parameter>userdata</parameter></paramdef>
+ </funcprototype>
+
<para>
<constant>SD_BUS_VTABLE_START(<replaceable>flags</replaceable>)</constant>
</para>
@@ -246,9 +255,14 @@
<function>sd_bus_add_fallback()</function> is similar to
<function>sd_bus_add_object()</function> but applies to fallback paths instead.</para>
+ <para><function>sd_bus_add_filter()</function> installs a callback that is invoked for each
+ incoming D-Bus message. Filters can be used to handle logic common to all messages received by
+ a service (e.g. authentication or authorization).</para>
+
<para>When a request is received, any associated callbacks are called sequentially until a
callback returns a non-zero integer. Return zero from a callback to give other callbacks the
- chance to process the request. Callbacks are called in the following order: first, callbacks
+ chance to process the request. Callbacks are called in the following order: first, global
+ callbacks installed with <function>sd_bus_add_filter()</function> are called. Second, callbacks
attached directly to the request object path are called, followed by any D-Bus method callbacks
attached to the request object path, interface and member. Finally, the property callbacks
attached to the request object path, interface and member are called. If the final callback