mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
sd-bus: Add note about sd_bus_reply_method_return to SD_BUS_METHOD docs
This commit is contained in:
parent
fc91667d77
commit
9b62e232ea
@ -121,7 +121,7 @@ manpages = [
|
||||
'sd_bus_match_signal',
|
||||
'sd_bus_match_signal_async'],
|
||||
''],
|
||||
['sd_bus_add_object_vtable',
|
||||
['sd_bus_add_object',
|
||||
'3',
|
||||
['SD_BUS_METHOD',
|
||||
'SD_BUS_METHOD_WITH_NAMES',
|
||||
@ -136,7 +136,7 @@ manpages = [
|
||||
'SD_BUS_WRITABLE_PROPERTY',
|
||||
'sd_bus_add_fallback',
|
||||
'sd_bus_add_fallback_vtable',
|
||||
'sd_bus_add_object'],
|
||||
'sd_bus_add_object_vtable'],
|
||||
''],
|
||||
['sd_bus_attach_event', '3', ['sd_bus_detach_event', 'sd_bus_get_event'], ''],
|
||||
['sd_bus_call', '3', ['sd_bus_call_async'], ''],
|
||||
|
@ -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>
|
||||
@ -78,6 +78,24 @@
|
||||
<paramdef>sd_bus_error *<parameter>ret_error</parameter></paramdef>
|
||||
</funcprototype>
|
||||
|
||||
<funcprototype>
|
||||
<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>sd_bus_message_handler_t <parameter>callback</parameter></paramdef>
|
||||
<paramdef>void *<parameter>userdata</parameter></paramdef>
|
||||
</funcprototype>
|
||||
|
||||
<funcprototype>
|
||||
<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>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_vtable</function></funcdef>
|
||||
<paramdef>sd_bus *<parameter>bus</parameter></paramdef>
|
||||
@ -99,24 +117,6 @@
|
||||
<paramdef>void *<parameter>userdata</parameter></paramdef>
|
||||
</funcprototype>
|
||||
|
||||
<funcprototype>
|
||||
<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>sd_bus_message_handler_t <parameter>callback</parameter></paramdef>
|
||||
<paramdef>void *<parameter>userdata</parameter></paramdef>
|
||||
</funcprototype>
|
||||
|
||||
<funcprototype>
|
||||
<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>path</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>
|
||||
@ -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
|
||||
@ -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>,
|
Loading…
Reference in New Issue
Block a user