]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/sd_bus_message_set_expect_reply.xml
travis: add more ASan options
[thirdparty/systemd.git] / man / sd_bus_message_set_expect_reply.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
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_message_set_expect_reply" xmlns:xi="http://www.w3.org/2001/XInclude">
7
8 <refentryinfo>
9 <title>sd_bus_message_set_expect_reply</title>
10 <productname>systemd</productname>
11 </refentryinfo>
12
13 <refmeta>
14 <refentrytitle>sd_bus_message_set_expect_reply</refentrytitle>
15 <manvolnum>3</manvolnum>
16 </refmeta>
17
18 <refnamediv>
19 <refname>sd_bus_message_set_expect_reply</refname>
20 <refname>sd_bus_message_get_expect_reply</refname>
21 <refname>sd_bus_message_set_auto_start</refname>
22 <refname>sd_bus_message_get_auto_start</refname>
23
24 <refpurpose>Set and query bus message metadata</refpurpose>
25 </refnamediv>
26
27 <refsynopsisdiv>
28 <funcsynopsis>
29 <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
30
31 <funcprototype>
32 <funcdef>int <function>sd_bus_message_set_expect_reply</function></funcdef>
33 <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
34 <paramdef>int <parameter>b</parameter></paramdef>
35 </funcprototype>
36
37 <funcprototype>
38 <funcdef>int <function>sd_bus_message_get_expect_reply</function></funcdef>
39 <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
40 </funcprototype>
41
42 <funcprototype>
43 <funcdef>int <function>sd_bus_message_set_auto_start</function></funcdef>
44 <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
45 <paramdef>int <parameter>b</parameter></paramdef>
46 </funcprototype>
47
48 <funcprototype>
49 <funcdef>int <function>sd_bus_message_get_auto_start</function></funcdef>
50 <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
51 </funcprototype>
52 </funcsynopsis>
53
54 </refsynopsisdiv>
55
56 <refsect1>
57 <title>Description</title>
58
59 <para><function>sd_bus_message_set_expect_reply()</function> sets or clears the
60 <constant>NO_REPLY_EXPECTED</constant> flag on the message <parameter>m</parameter>. This flag
61 matters only for method call messages and is used to specify that no method return or error
62 reply is expected. It is ignored for other types. Thus, for a method call message, calling
63 <programlisting>sd_bus_message_set_expect_reply(…, 0)</programlisting> sets the flag and
64 suppresses the reply.</para>
65
66 <para><function>sd_bus_message_get_expect_reply()</function> checks if the
67 <constant>NO_REPLY_EXPECTED</constant> flag is set on the message <parameter>m</parameter>. It
68 will return positive if it is not set, and zero if it is.</para>
69
70 <para><function>sd_bus_message_set_auto_start()</function> sets or clears the
71 <constant>NO_AUTO_START</constant> flag on the message <parameter>m</parameter>. When the flag
72 is set the bus must not launch an owner for the destination name in response to this message.
73 Calling
74 <programlisting>sd_bus_message_set_auto_start(…, 0)</programlisting> sets the flag.
75 </para>
76
77 <para><function>sd_bus_message_get_auto_start()</function> checks if the
78 <constant>NO_AUTO_START</constant> flag is set on the message <parameter>m</parameter>. It
79 will return positive if it is not set, and zero if it is.</para>
80 </refsect1>
81
82 <refsect1>
83 <title>Return Value</title>
84
85 <para>On success, these functions return 0 or a positive integer. On failure, they return a
86 negative errno-style error code.</para>
87
88 <refsect2>
89 <title>Errors</title>
90
91 <para>Returned errors may indicate the following problems:</para>
92
93 <variablelist>
94 <varlistentry>
95 <term><constant>-EINVAL</constant></term>
96
97 <listitem><para>The <parameter>message</parameter> parameter is
98 <constant>NULL</constant>.</para></listitem>
99 </varlistentry>
100
101 <varlistentry>
102 <term><constant>-EPERM</constant></term>
103
104 <listitem><para>The message <parameter>message</parameter> is sealed
105 when trying to set a flag.</para>
106
107 <para>The message <parameter>message</parameter> has wrong
108 type.</para>
109 </listitem>
110 </varlistentry>
111 </variablelist>
112 </refsect2>
113 </refsect1>
114
115 <xi:include href="libsystemd-pkgconfig.xml" />
116
117 <refsect1>
118 <title>See Also</title>
119
120 <para>
121 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
122 <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
123 <citerefentry><refentrytitle>sd_bus_set_description</refentrytitle><manvolnum>3</manvolnum></citerefentry>
124 </para>
125 </refsect1>
126
127 </refentry>