]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/sd_bus_message_set_expect_reply.xml
man: fix link markup
[thirdparty/systemd.git] / man / sd_bus_message_set_expect_reply.xml
CommitLineData
d65044e8 1<?xml version='1.0'?> <!--*-nxml-*-->
3a54a157 2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
d65044e8
ZJS
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>
570f92c6
DDM
23 <refname>sd_bus_message_set_allow_interactive_authorization</refname>
24 <refname>sd_bus_message_get_allow_interactive_authorization</refname>
d65044e8
ZJS
25
26 <refpurpose>Set and query bus message metadata</refpurpose>
27 </refnamediv>
28
29 <refsynopsisdiv>
30 <funcsynopsis>
31 <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
32
33 <funcprototype>
34 <funcdef>int <function>sd_bus_message_set_expect_reply</function></funcdef>
35 <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
36 <paramdef>int <parameter>b</parameter></paramdef>
37 </funcprototype>
38
39 <funcprototype>
40 <funcdef>int <function>sd_bus_message_get_expect_reply</function></funcdef>
41 <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
42 </funcprototype>
43
44 <funcprototype>
45 <funcdef>int <function>sd_bus_message_set_auto_start</function></funcdef>
46 <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
47 <paramdef>int <parameter>b</parameter></paramdef>
48 </funcprototype>
49
50 <funcprototype>
51 <funcdef>int <function>sd_bus_message_get_auto_start</function></funcdef>
52 <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
53 </funcprototype>
d65044e8 54
570f92c6
DDM
55 <funcprototype>
56 <funcdef>int <function>sd_bus_message_set_allow_interactive_authorization</function></funcdef>
57 <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
58 <paramdef>int <parameter>b</parameter></paramdef>
59 </funcprototype>
60
61 <funcprototype>
62 <funcdef>int <function>sd_bus_message_get_allow_interactive_authorization</function></funcdef>
63 <paramdef>sd_bus_message *<parameter>message</parameter></paramdef>
64 </funcprototype>
65 </funcsynopsis>
d65044e8
ZJS
66 </refsynopsisdiv>
67
68 <refsect1>
69 <title>Description</title>
70
71 <para><function>sd_bus_message_set_expect_reply()</function> sets or clears the
570f92c6
DDM
72 <constant>NO_REPLY_EXPECTED</constant> flag on the message <parameter>m</parameter>. This flag matters
73 only for method call messages and is used to specify that no method return or error reply is expected.
74 It is ignored for other types. Thus, for a method call message, calling
75 <programlisting>sd_bus_message_set_expect_reply(…, 0)</programlisting> sets the flag and suppresses the
76 reply.</para>
d65044e8
ZJS
77
78 <para><function>sd_bus_message_get_expect_reply()</function> checks if the
570f92c6
DDM
79 <constant>NO_REPLY_EXPECTED</constant> flag is set on the message <parameter>m</parameter>. It will
80 return positive if it is not set, and zero if it is.</para>
d65044e8
ZJS
81
82 <para><function>sd_bus_message_set_auto_start()</function> sets or clears the
570f92c6
DDM
83 <constant>NO_AUTO_START</constant> flag on the message <parameter>m</parameter>. When the flag is set,
84 the bus must not launch an owner for the destination name in response to this message. Calling
85 <programlisting>sd_bus_message_set_auto_start(…, 0)</programlisting> sets the flag.</para>
d65044e8
ZJS
86
87 <para><function>sd_bus_message_get_auto_start()</function> checks if the
570f92c6
DDM
88 <constant>NO_AUTO_START</constant> flag is set on the message <parameter>m</parameter>. It will return
89 positive if it is not set, and zero if it is.</para>
90
91 <para><function>sd_bus_message_set_allow_interactive_authorization()</function> sets or clears the
92 <constant>ALLOW_INTERACTIVE_AUTHORIZATION</constant> flag on the message <parameter>m</parameter>.
93 Setting this flag informs the receiver that the caller is prepared to wait for interactive authorization
94 via polkit or a similar framework. Note that setting this flag does not guarantee that the receiver will
95 actually perform interactive authorization. Also, make sure to set a suitable message timeout when using
96 this flag since interactive authorization could potentially take a long time as it depends on user input.
97 If <parameter>b</parameter> is non-zero, the flag is set.</para>
98
99 <para><function>sd_bus_message_get_allow_interactive_authorization()</function> checks if the
100 <constant>ALLOW_INTERACTIVE_AUTHORIZATION</constant> flag is set on the message <parameter>m</parameter>.
101 It will return a positive integer if the flag is set. Otherwise, it returns zero.</para>
d65044e8
ZJS
102 </refsect1>
103
104 <refsect1>
105 <title>Return Value</title>
106
570f92c6
DDM
107 <para>On success, these functions return a non-negative integer. On failure, they return a negative
108 errno-style error code.</para>
d65044e8 109
b1de39de
ZJS
110 <refsect2>
111 <title>Errors</title>
d65044e8 112
b1de39de 113 <para>Returned errors may indicate the following problems:</para>
d65044e8 114
b1de39de
ZJS
115 <variablelist>
116 <varlistentry>
117 <term><constant>-EINVAL</constant></term>
d65044e8 118
570f92c6
DDM
119 <listitem><para>The <parameter>message</parameter> parameter is <constant>NULL</constant>.
120 </para></listitem>
b1de39de 121 </varlistentry>
d65044e8 122
b1de39de
ZJS
123 <varlistentry>
124 <term><constant>-EPERM</constant></term>
d65044e8 125
570f92c6
DDM
126 <listitem>
127 <para>The message <parameter>message</parameter> is sealed when trying to set a flag.</para>
d65044e8 128
570f92c6 129 <para>The message <parameter>message</parameter> has wrong type.</para>
b1de39de
ZJS
130 </listitem>
131 </varlistentry>
132 </variablelist>
133 </refsect2>
d65044e8
ZJS
134 </refsect1>
135
136 <xi:include href="libsystemd-pkgconfig.xml" />
137
138 <refsect1>
139 <title>See Also</title>
140
141 <para>
142 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
143 <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
144 <citerefentry><refentrytitle>sd_bus_set_description</refentrytitle><manvolnum>3</manvolnum></citerefentry>
145 </para>
146 </refsect1>
d65044e8 147</refentry>