]>
Commit | Line | Data |
---|---|---|
60ef0942 DDM |
1 | <?xml version='1.0'?> |
2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" | |
eea10b26 | 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"> |
db9ecf05 | 4 | <!-- SPDX-License-Identifier: LGPL-2.1-or-later --> |
60ef0942 DDM |
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 <systemd/sd-bus.h></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> | |
eb83eb63 DDM |
79 | |
80 | <para>Message <parameter>m</parameter> is not a method reply message.</para> | |
ec07c3c8 AK |
81 | |
82 | <xi:include href="version-info.xml" xpointer="v246"/> | |
60ef0942 DDM |
83 | </listitem> |
84 | </varlistentry> | |
85 | ||
86 | <varlistentry> | |
87 | <term><constant>-EPERM</constant></term> | |
88 | ||
89 | <listitem><para>Message <parameter>call</parameter> has been sealed. | |
ec07c3c8 AK |
90 | </para> |
91 | ||
92 | <xi:include href="version-info.xml" xpointer="v246"/></listitem> | |
60ef0942 DDM |
93 | </varlistentry> |
94 | ||
95 | <varlistentry> | |
96 | <term><constant>-ENOTCONN</constant></term> | |
97 | ||
98 | <listitem><para>The bus to which message <parameter>call</parameter> is attached is not | |
ec07c3c8 AK |
99 | connected.</para> |
100 | ||
101 | <xi:include href="version-info.xml" xpointer="v246"/></listitem> | |
60ef0942 DDM |
102 | </varlistentry> |
103 | ||
104 | <varlistentry> | |
105 | <term><constant>-ENOMEM</constant></term> | |
106 | ||
ec07c3c8 AK |
107 | <listitem><para>Memory allocation failed.</para> |
108 | ||
109 | <xi:include href="version-info.xml" xpointer="v246"/></listitem> | |
60ef0942 DDM |
110 | </varlistentry> |
111 | </variablelist> | |
112 | ||
113 | <para>In addition, any error returned by | |
114 | <citerefentry><refentrytitle>sd_bus_send</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
115 | may be returned.</para> | |
116 | </refsect2> | |
117 | </refsect1> | |
118 | ||
119 | <xi:include href="libsystemd-pkgconfig.xml" /> | |
120 | ||
121 | <refsect1> | |
122 | <title>See Also</title> | |
123 | ||
13a69c12 DT |
124 | <para><simplelist type="inline"> |
125 | <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> | |
126 | <member><citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry></member> | |
127 | <member><citerefentry><refentrytitle>sd_bus_message_new_method_return</refentrytitle><manvolnum>3</manvolnum></citerefentry></member> | |
128 | </simplelist></para> | |
60ef0942 DDM |
129 | </refsect1> |
130 | ||
131 | </refentry> |