diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2020-03-19 18:52:52 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-03-22 20:21:11 +0100 |
commit | b0f4c02e2df072779a1e3b4030db50692cd94dbd (patch) | |
tree | 3f24ac29c809e89f4b6aed1416a19a0ced3894dd /man | |
parent | sd-bus: Add sd_bus_reply_method_return docs + cleanups (diff) | |
download | systemd-b0f4c02e2df072779a1e3b4030db50692cd94dbd.tar.xz systemd-b0f4c02e2df072779a1e3b4030db50692cd94dbd.zip |
sd-bus: Add sd_bus_send docs + cleanups.
Diffstat (limited to 'man')
-rw-r--r-- | man/rules/meson.build | 1 | ||||
-rw-r--r-- | man/sd-bus.xml | 1 | ||||
-rw-r--r-- | man/sd_bus_call.xml | 6 | ||||
-rw-r--r-- | man/sd_bus_send.xml | 136 | ||||
-rw-r--r-- | man/sd_bus_set_method_call_timeout.xml | 2 |
5 files changed, 142 insertions, 4 deletions
diff --git a/man/rules/meson.build b/man/rules/meson.build index 84a8d6259e..b95ef6964a 100644 --- a/man/rules/meson.build +++ b/man/rules/meson.build @@ -332,6 +332,7 @@ manpages = [ 'sd_bus_release_name_async', 'sd_bus_request_name_async'], ''], + ['sd_bus_send', '3', [], ''], ['sd_bus_set_address', '3', ['sd_bus_get_address'], ''], ['sd_bus_set_close_on_exit', '3', ['sd_bus_get_close_on_exit'], ''], ['sd_bus_set_connected_signal', '3', ['sd_bus_get_connected_signal'], ''], diff --git a/man/sd-bus.xml b/man/sd-bus.xml index 9e13af2cc9..e11e6ec794 100644 --- a/man/sd-bus.xml +++ b/man/sd-bus.xml @@ -89,6 +89,7 @@ <citerefentry><refentrytitle>sd_bus_reply_method_return</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_reply_method_error</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_request_name</refentrytitle><manvolnum>3</manvolnum></citerefentry>, +<citerefentry><refentrytitle>sd_bus_send</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_set_address</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_set_connected_signal</refentrytitle><manvolnum>3</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd_bus_set_description</refentrytitle><manvolnum>3</manvolnum></citerefentry>, diff --git a/man/sd_bus_call.xml b/man/sd_bus_call.xml index 6555563793..f2d725a29f 100644 --- a/man/sd_bus_call.xml +++ b/man/sd_bus_call.xml @@ -128,14 +128,14 @@ <varlistentry> <term><constant>-ENOTCONN</constant></term> - <listitem><para>The bus parameter <parameter>bus</parameter> is <constant>NULL</constant> - or the bus is not connected.</para></listitem> + <listitem><para>The input parameter <parameter>bus</parameter> is + <constant>NULL</constant> or the bus is not connected.</para></listitem> </varlistentry> <varlistentry> <term><constant>-ECONNRESET</constant></term> - <listitem><para>The client was disconnected while waiting for the response. + <listitem><para>The bus connection was closed while waiting for the response. </para></listitem> </varlistentry> diff --git a/man/sd_bus_send.xml b/man/sd_bus_send.xml new file mode 100644 index 0000000000..659fa2a86c --- /dev/null +++ b/man/sd_bus_send.xml @@ -0,0 +1,136 @@ +<?xml version='1.0'?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> +<!-- SPDX-License-Identifier: LGPL-2.1+ --> + +<refentry id="sd_bus_send" + xmlns:xi="http://www.w3.org/2001/XInclude"> + + <refentryinfo> + <title>sd_bus_send</title> + <productname>systemd</productname> + </refentryinfo> + + <refmeta> + <refentrytitle>sd_bus_send</refentrytitle> + <manvolnum>3</manvolnum> + </refmeta> + + <refnamediv> + <refname>sd_bus_send</refname> + + <refpurpose>Queue a D-Bus message for transfer</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <funcsynopsis> + <funcsynopsisinfo>#include <systemd/sd-bus.h></funcsynopsisinfo> + + <funcprototype> + <funcdef>int <function>sd_bus_send</function></funcdef> + <paramdef>sd_bus *<parameter>bus</parameter></paramdef> + <paramdef>sd_bus_message *<parameter>m</parameter></paramdef> + <paramdef>uint64_t *<parameter>cookie</parameter></paramdef> + </funcprototype> + </funcsynopsis> + </refsynopsisdiv> + + <refsect1> + <title>Description</title> + + <para><function>sd_bus_send()</function> queues the bus message object <parameter>m</parameter> + for transfer. If <parameter>bus</parameter> is <constant>NULL</constant>, the bus that + <parameter>m</parameter> is attached to is used. <parameter>bus</parameter> only needs to be set + when the message is sent to a different bus than the one it's attached to, for example when + forwarding messages. If the output parameter <parameter>cookie</parameter> is not + <constant>NULL</constant>, it is set to the message identifier. This value can later be used to + match incoming replies to their corresponding messages. If <parameter>cookie</parameter> is set + to <constant>NULL</constant> and the message is not sealed, <function>sd_bus_send()</function> + assumes the message <parameter>m</parameter> doesn't expect a reply and adds the necessary + headers to indicate this.</para> + + <para>Note that in most scenarios, <function>sd_bus_send()</function> should not be called + directly. Instead, use higher level functions such as + <citerefentry><refentrytitle>sd_bus_call_method</refentrytitle><manvolnum>3</manvolnum></citerefentry> and + <citerefentry><refentrytitle>sd_bus_reply_method_return</refentrytitle><manvolnum>3</manvolnum></citerefentry> + which call <function>sd_bus_send()</function> internally.</para> + </refsect1> + + <refsect1> + <title>Return Value</title> + + <para>On success, this function returns a non-negative integer. On failure, it returns a + negative errno-style error code.</para> + + <refsect2 id='errors'> + <title>Errors</title> + + <para>Returned errors may indicate the following problems:</para> + + <variablelist> + <varlistentry> + <term><constant>-EINVAL</constant></term> + + <listitem><para>The input parameter <parameter>m</parameter> is <constant>NULL</constant>. + </para></listitem> + </varlistentry> + + <varlistentry> + <term><constant>-EOPNOTSUPP</constant></term> + + <listitem><para>The bus connection does not support sending file descriptors. + </para></listitem> + </varlistentry> + + <varlistentry> + <term><constant>-ECHILD</constant></term> + + <listitem><para>The bus connection was allocated in a parent process and is being reused + in a child process after <function>fork()</function>.</para></listitem> + </varlistentry> + + <varlistentry> + <term><constant>-ENOBUFS</constant></term> + + <listitem><para>The bus connection's write queue is full.</para></listitem> + </varlistentry> + + <varlistentry> + <term><constant>-ENOTCONN</constant></term> + + <listitem><para>The input parameter <parameter>bus</parameter> is + <constant>NULL</constant> or the bus is not connected.</para></listitem> + </varlistentry> + + <varlistentry> + <term><constant>-ECONNRESET</constant></term> + + <listitem><para>The bus connection was closed while waiting for the response. + </para></listitem> + </varlistentry> + + <varlistentry> + <term><constant>-ENOMEM</constant></term> + + <listitem><para>Memory allocation failed.</para></listitem> + </varlistentry> + </variablelist> + </refsect2> + </refsect1> + + <xi:include href="libsystemd-pkgconfig.xml" /> + + <refsect1> + <title>See Also</title> + + <para> + <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, + <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>, + <citerefentry><refentrytitle>sd_bus_call_method</refentrytitle><manvolnum>3</manvolnum></citerefentry>, + <citerefentry><refentrytitle>sd_bus_message_set_destination</refentrytitle><manvolnum>3</manvolnum></citerefentry>, + <citerefentry><refentrytitle>sd_bus_reply_method_return</refentrytitle><manvolnum>3</manvolnum></citerefentry>, + <citerefentry><refentrytitle>sd_bus_send_to</refentrytitle><manvolnum>3</manvolnum></citerefentry> + </para> + </refsect1> + +</refentry> diff --git a/man/sd_bus_set_method_call_timeout.xml b/man/sd_bus_set_method_call_timeout.xml index 76c938442d..006020aae7 100644 --- a/man/sd_bus_set_method_call_timeout.xml +++ b/man/sd_bus_set_method_call_timeout.xml @@ -96,7 +96,7 @@ <para> <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>, - <citerefentry><refentrytitle>sd_bus_call</refentrytitle><manvolnum>3</manvolnum></citerefentry>, + <citerefentry><refentrytitle>sd_bus_call</refentrytitle><manvolnum>3</manvolnum></citerefentry> </para> </refsect1> |