diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2021-01-23 15:16:57 +0000 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-01-25 12:31:17 +0900 |
commit | eb83eb63b8074e352935b61867702e6a01270005 (patch) | |
tree | 858cf5f6fbaa280d73f17c7db8c3b91c9a5976be /man/sd_bus_reply_method_return.xml | |
parent | 237ecfee15988e0f059cd064dde32b00111c6388 (diff) | |
download | systemd-eb83eb63b8074e352935b61867702e6a01270005.tar.gz |
sd-bus: Add sd_bus_reply()
While sd-bus already provides sd_bus_call() for calling a method
from a complete bus message object, We don't have an equivalent
function for replying from a method with a complete bus message
object.
Currently, we use sd_bus_send(call->bus, m, NULL) instead. Let's
add a shorthand for this pattern and name it sd_bus_reply().
Diffstat (limited to 'man/sd_bus_reply_method_return.xml')
-rw-r--r-- | man/sd_bus_reply_method_return.xml | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/man/sd_bus_reply_method_return.xml b/man/sd_bus_reply_method_return.xml index 76e4adecd5..ffeef3d2b8 100644 --- a/man/sd_bus_reply_method_return.xml +++ b/man/sd_bus_reply_method_return.xml @@ -19,6 +19,7 @@ <refnamediv> <refname>sd_bus_reply_method_return</refname> <refname>sd_bus_reply_method_returnv</refname> + <refname>sd_bus_reply</refname> <refpurpose>Reply to a D-Bus method call</refpurpose> </refnamediv> @@ -40,6 +41,12 @@ <paramdef>const char *<parameter>types</parameter></paramdef> <paramdef>va_list <parameter>ap</parameter></paramdef> </funcprototype> + + <funcprototype> + <funcdef>int sd_bus_reply</funcdef> + <paramdef>const sd_bus_message *<parameter>call</parameter></paramdef> + <paramdef>sd_bus_message *<parameter>m</parameter></paramdef> + </funcprototype> </funcsynopsis> </refsynopsisdiv> @@ -52,6 +59,11 @@ <citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>. If no reply is expected to <parameter>call</parameter>, this function succeeds without sending a reply.</para> + + <para><function>sd_bus_reply()</function> takes a complete bus message object created with either + <citerefentry><refentrytitle>sd_bus_new_method_return</refentrytitle><manvolnum>3</manvolnum></citerefentry> or + <citerefentry><refentrytitle>sd_bus_new_method_error</refentrytitle><manvolnum>3</manvolnum></citerefentry> + and sends it as a reply to the <parameter>call</parameter> message.</para> </refsect1> <refsect1> @@ -76,6 +88,8 @@ </para> <para>Message <parameter>call</parameter> is not attached to a bus.</para> + + <para>Message <parameter>m</parameter> is not a method reply message.</para> </listitem> </varlistentry> |