]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/sd_bus_reply_method_return.xml
man: fix link markup
[thirdparty/systemd.git] / man / sd_bus_reply_method_return.xml
CommitLineData
60ef0942
DDM
1<?xml version='1.0'?>
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4<!-- SPDX-License-Identifier: LGPL-2.1+ -->
5
6<refentry id="sd_bus_reply_method_return"
7 xmlns:xi="http://www.w3.org/2001/XInclude">
8
9 <refentryinfo>
10 <title>sd_bus_reply_method_return</title>
11 <productname>systemd</productname>
12 </refentryinfo>
13
14 <refmeta>
15 <refentrytitle>sd_bus_reply_method_return</refentrytitle>
16 <manvolnum>3</manvolnum>
17 </refmeta>
18
19 <refnamediv>
20 <refname>sd_bus_reply_method_return</refname>
935052a8 21 <refname>sd_bus_reply_method_returnv</refname>
60ef0942
DDM
22
23 <refpurpose>Reply to a D-Bus method call</refpurpose>
24 </refnamediv>
25
26 <refsynopsisdiv>
27 <funcsynopsis>
28 <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
29
30 <funcprototype>
31 <funcdef>int sd_bus_reply_method_return</funcdef>
32 <paramdef>sd_bus_message *<parameter>call</parameter></paramdef>
33 <paramdef>const char *<parameter>types</parameter></paramdef>
34 <paramdef>...</paramdef>
35 </funcprototype>
935052a8
VC
36
37 <funcprototype>
38 <funcdef>int sd_bus_reply_method_returnv</funcdef>
39 <paramdef>sd_bus_message *<parameter>call</parameter></paramdef>
40 <paramdef>const char *<parameter>types</parameter></paramdef>
41 <paramdef>va_list <parameter>ap</parameter></paramdef>
42 </funcprototype>
60ef0942
DDM
43 </funcsynopsis>
44 </refsynopsisdiv>
45
46 <refsect1>
47 <title>Description</title>
48
49 <para><function>sd_bus_reply_method_return()</function> sends a reply to the
50 <parameter>call</parameter> message. The type string <parameter>types</parameter> and the
51 arguments that follow it must adhere to the format described in
52 <citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
53 If no reply is expected to <parameter>call</parameter>, this function succeeds without sending a
54 reply.</para>
55 </refsect1>
56
57 <refsect1>
58 <title>Return Value</title>
59
60 <para>On success, this function returns a non-negative integer. On failure, it returns a
61 negative errno-style error code.</para>
62
63 <refsect2>
64 <title>Errors</title>
65
66 <para>Returned errors may indicate the following problems:</para>
67
68 <variablelist>
69 <varlistentry>
70 <term><constant>-EINVAL</constant></term>
71
72 <listitem><para>The input parameter <parameter>call</parameter> is
73 <constant>NULL</constant>.</para>
74
75 <para>Message <parameter>call</parameter> is not a method call message.
76 </para>
77
78 <para>Message <parameter>call</parameter> is not attached to a bus.</para>
79 </listitem>
80 </varlistentry>
81
82 <varlistentry>
83 <term><constant>-EPERM</constant></term>
84
85 <listitem><para>Message <parameter>call</parameter> has been sealed.
86 </para></listitem>
87 </varlistentry>
88
89 <varlistentry>
90 <term><constant>-ENOTCONN</constant></term>
91
92 <listitem><para>The bus to which message <parameter>call</parameter> is attached is not
93 connected.</para></listitem>
94 </varlistentry>
95
96 <varlistentry>
97 <term><constant>-ENOMEM</constant></term>
98
99 <listitem><para>Memory allocation failed.</para></listitem>
100 </varlistentry>
101 </variablelist>
102
103 <para>In addition, any error returned by
104 <citerefentry><refentrytitle>sd_bus_send</refentrytitle><manvolnum>1</manvolnum></citerefentry>
105 may be returned.</para>
106 </refsect2>
107 </refsect1>
108
109 <xi:include href="libsystemd-pkgconfig.xml" />
110
111 <refsect1>
112 <title>See Also</title>
113
114 <para>
115 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
116 <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
117 <citerefentry><refentrytitle>sd_bus_message_new_method_return</refentrytitle><manvolnum>3</manvolnum></citerefentry>
118 </para>
119 </refsect1>
120
121</refentry>