diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2020-03-30 21:11:42 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2020-03-31 20:38:54 +0200 |
commit | 9b62e232ea9c5f6d70df38bc0ccac4f7eec15e06 (patch) | |
tree | 0e3b73a80f39540449bedd1fbab50e8badc4655b /man/sd_bus_add_object.xml | |
parent | sd-bus: Add sd_bus_add_object and callback docs (diff) | |
download | systemd-9b62e232ea9c5f6d70df38bc0ccac4f7eec15e06.tar.xz systemd-9b62e232ea9c5f6d70df38bc0ccac4f7eec15e06.zip |
sd-bus: Add note about sd_bus_reply_method_return to SD_BUS_METHOD docs
Diffstat (limited to '')
-rw-r--r-- | man/sd_bus_add_object.xml (renamed from man/sd_bus_add_object_vtable.xml) | 51 |
1 files changed, 27 insertions, 24 deletions
diff --git a/man/sd_bus_add_object_vtable.xml b/man/sd_bus_add_object.xml index 218a54647b..2abe2342f0 100644 --- a/man/sd_bus_add_object_vtable.xml +++ b/man/sd_bus_add_object.xml @@ -3,24 +3,24 @@ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> <!-- SPDX-License-Identifier: LGPL-2.1+ --> -<refentry id="sd_bus_add_object_vtable" +<refentry id="sd_bus_add_object" xmlns:xi="http://www.w3.org/2001/XInclude"> <refentryinfo> - <title>sd_bus_add_object_vtable</title> + <title>sd_bus_add_object</title> <productname>systemd</productname> </refentryinfo> <refmeta> - <refentrytitle>sd_bus_add_object_vtable</refentrytitle> + <refentrytitle>sd_bus_add_object</refentrytitle> <manvolnum>3</manvolnum> </refmeta> <refnamediv> - <refname>sd_bus_add_object_vtable</refname> - <refname>sd_bus_add_fallback_vtable</refname> <refname>sd_bus_add_object</refname> <refname>sd_bus_add_fallback</refname> + <refname>sd_bus_add_object_vtable</refname> + <refname>sd_bus_add_fallback_vtable</refname> <refname>SD_BUS_VTABLE_START</refname> <refname>SD_BUS_VTABLE_END</refname> <refname>SD_BUS_METHOD_WITH_NAMES_OFFSET</refname> @@ -79,41 +79,41 @@ </funcprototype> <funcprototype> - <funcdef>int <function>sd_bus_add_object_vtable</function></funcdef> + <funcdef>int <function>sd_bus_add_object</function></funcdef> <paramdef>sd_bus *<parameter>bus</parameter></paramdef> <paramdef>sd_bus_slot **<parameter>slot</parameter></paramdef> <paramdef>const char *<parameter>path</parameter></paramdef> - <paramdef>const char *<parameter>interface</parameter></paramdef> - <paramdef>const sd_bus_vtable *<parameter>vtable</parameter></paramdef> + <paramdef>sd_bus_message_handler_t <parameter>callback</parameter></paramdef> <paramdef>void *<parameter>userdata</parameter></paramdef> </funcprototype> <funcprototype> - <funcdef>int <function>sd_bus_add_fallback_vtable</function></funcdef> + <funcdef>int <function>sd_bus_add_fallback</function></funcdef> <paramdef>sd_bus *<parameter>bus</parameter></paramdef> <paramdef>sd_bus_slot **<parameter>slot</parameter></paramdef> - <paramdef>const char *<parameter>prefix</parameter></paramdef> - <paramdef>const char *<parameter>interface</parameter></paramdef> - <paramdef>const sd_bus_vtable *<parameter>vtable</parameter></paramdef> - <paramdef>sd_bus_object_find_t <parameter>find</parameter></paramdef> + <paramdef>const char *<parameter>path</parameter></paramdef> + <paramdef>sd_bus_message_handler_t <parameter>callback</parameter></paramdef> <paramdef>void *<parameter>userdata</parameter></paramdef> </funcprototype> <funcprototype> - <funcdef>int <function>sd_bus_add_object</function></funcdef> + <funcdef>int <function>sd_bus_add_object_vtable</function></funcdef> <paramdef>sd_bus *<parameter>bus</parameter></paramdef> <paramdef>sd_bus_slot **<parameter>slot</parameter></paramdef> <paramdef>const char *<parameter>path</parameter></paramdef> - <paramdef>sd_bus_message_handler_t <parameter>callback</parameter></paramdef> + <paramdef>const char *<parameter>interface</parameter></paramdef> + <paramdef>const sd_bus_vtable *<parameter>vtable</parameter></paramdef> <paramdef>void *<parameter>userdata</parameter></paramdef> </funcprototype> <funcprototype> - <funcdef>int <function>sd_bus_add_fallback</function></funcdef> + <funcdef>int <function>sd_bus_add_fallback_vtable</function></funcdef> <paramdef>sd_bus *<parameter>bus</parameter></paramdef> <paramdef>sd_bus_slot **<parameter>slot</parameter></paramdef> - <paramdef>const char *<parameter>path</parameter></paramdef> - <paramdef>sd_bus_message_handler_t <parameter>callback</parameter></paramdef> + <paramdef>const char *<parameter>prefix</parameter></paramdef> + <paramdef>const char *<parameter>interface</parameter></paramdef> + <paramdef>const sd_bus_vtable *<parameter>vtable</parameter></paramdef> + <paramdef>sd_bus_object_find_t <parameter>find</parameter></paramdef> <paramdef>void *<parameter>userdata</parameter></paramdef> </funcprototype> @@ -247,8 +247,8 @@ <function>sd_bus_add_object()</function> but applies to fallback paths instead.</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 defer handling of the - request to the next callback. Callbacks are called in the following order: first, callbacks + 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 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 @@ -257,7 +257,7 @@ immediately sending a reply. This informs sd-bus this callback will take responsibility for replying to the request without forcing the callback to produce a reply immediately. This allows a callback to perform any number of asynchronous operations required to construct a reply. Note - that if producing a reply takes too long, the method call will timeout at the caller.</para> + that if producing a reply takes too long, the method call will time out at the caller.</para> <para>If a callback was invoked to handle a request that expects a reply and the callback returns a negative value, the value is interpreted as a negative errno-style error code and sent @@ -317,9 +317,12 @@ messages that call this method. It receives a pointer that is the <replaceable>userdata</replaceable> parameter passed to the registration function offset by <replaceable>offset</replaceable> bytes. This may be used to pass pointers to different - fields in the same data structure to different methods in the same vtable. - <replaceable>in_names</replaceable> and <replaceable>out_names</replaceable> should be - created using the <constant>SD_BUS_PARAM()</constant> macro, see below. Parameter + fields in the same data structure to different methods in the same vtable. To send a reply + from <parameter>handler</parameter>, call + <citerefentry><refentrytitle>sd_bus_reply_method_return</refentrytitle><manvolnum>3</manvolnum></citerefentry> + with the message the callback was invoked with. <replaceable>in_names</replaceable> and + <replaceable>out_names</replaceable> should be created using the + <constant>SD_BUS_PARAM()</constant> macro, see below. Parameter <replaceable>flags</replaceable> is a combination of flags, see below.</para> <para><constant>SD_BUS_METHOD_WITH_NAMES()</constant>, |