Debian Codegraph @

upstream/debian-unstable/man3/sd_bus_message_set_expect_reply.3

raw
1 '\" t
2 .TH "SD_BUS_MESSAGE_SET_EXPECT_REPLY" "3" "" "systemd 261~rc3" "sd_bus_message_set_expect_reply"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
10 .ie \n(.g .ds Aq \(aq
11 .el .ds Aq '
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
16 .nh
17 .\" disable justification (adjust text to left margin only)
18 .ad l
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
22 .SH "NAME"
23 sd_bus_message_set_expect_reply, sd_bus_message_get_expect_reply, sd_bus_message_set_auto_start, sd_bus_message_get_auto_start, sd_bus_message_set_allow_interactive_authorization, sd_bus_message_get_allow_interactive_authorization \- Set and query bus message metadata
24 .SH "SYNOPSIS"
25 .sp
26 .ft B
27 .nf
28 #include <systemd/sd\-bus\&.h>
29 .fi
30 .ft
31 .HP \w'int\ sd_bus_message_set_expect_reply('u
32 .BI "int sd_bus_message_set_expect_reply(sd_bus_message\ *" "message" ", int\ " "b" ");"
33 .HP \w'int\ sd_bus_message_get_expect_reply('u
34 .BI "int sd_bus_message_get_expect_reply(sd_bus_message\ *" "message" ");"
35 .HP \w'int\ sd_bus_message_set_auto_start('u
36 .BI "int sd_bus_message_set_auto_start(sd_bus_message\ *" "message" ", int\ " "b" ");"
37 .HP \w'int\ sd_bus_message_get_auto_start('u
38 .BI "int sd_bus_message_get_auto_start(sd_bus_message\ *" "message" ");"
39 .HP \w'int\ sd_bus_message_set_allow_interactive_authorization('u
40 .BI "int sd_bus_message_set_allow_interactive_authorization(sd_bus_message\ *" "message" ", int\ " "b" ");"
41 .HP \w'int\ sd_bus_message_get_allow_interactive_authorization('u
42 .BI "int sd_bus_message_get_allow_interactive_authorization(sd_bus_message\ *" "message" ");"
43 .SH "DESCRIPTION"
44 .PP
45 \fBsd_bus_message_set_expect_reply()\fR
46 sets or clears the
47 \fBNO_REPLY_EXPECTED\fR
48 flag on the message
49 \fIm\fR\&. This flag matters only for method call messages and is used to specify that no method return or error reply is expected\&. It is ignored for other types\&. Thus, for a method call message, calling
50 .sp
51 .if n \{\
52 .RS 4
53 .\}
54 .nf
55 sd_bus_message_set_expect_reply(\&..., 0)
56 .fi
57 .if n \{\
58 .RE
59 .\}
60 .sp
61 sets the flag and suppresses the reply\&.
62 .PP
63 \fBsd_bus_message_get_expect_reply()\fR
64 checks if the
65 \fBNO_REPLY_EXPECTED\fR
66 flag is set on the message
67 \fIm\fR\&. It will return positive if it is not set, and zero if it is\&.
68 .PP
69 \fBsd_bus_message_set_auto_start()\fR
70 sets or clears the
71 \fBNO_AUTO_START\fR
72 flag on the message
73 \fIm\fR\&. When the flag is set, the bus must not launch an owner for the destination name in response to this message\&. Calling
74 .sp
75 .if n \{\
76 .RS 4
77 .\}
78 .nf
79 sd_bus_message_set_auto_start(\&..., 0)
80 .fi
81 .if n \{\
82 .RE
83 .\}
84 .sp
85 sets the flag\&.
86 .PP
87 \fBsd_bus_message_get_auto_start()\fR
88 checks if the
89 \fBNO_AUTO_START\fR
90 flag is set on the message
91 \fIm\fR\&. It will return positive if it is not set, and zero if it is\&.
92 .PP
93 \fBsd_bus_message_set_allow_interactive_authorization()\fR
94 sets or clears the
95 \fBALLOW_INTERACTIVE_AUTHORIZATION\fR
96 flag on the message
97 \fIm\fR\&. Setting this flag informs the receiver that the caller is prepared to wait for interactive authorization via polkit or a similar framework\&. Note that setting this flag does not guarantee that the receiver will actually perform interactive authorization\&. Also, make sure to set a suitable message timeout when using this flag since interactive authorization could potentially take a long time as it depends on user input\&. If
98 \fIb\fR
99 is non\-zero, the flag is set\&.
100 .PP
101 \fBsd_bus_message_get_allow_interactive_authorization()\fR
102 checks if the
103 \fBALLOW_INTERACTIVE_AUTHORIZATION\fR
104 flag is set on the message
105 \fIm\fR\&. It will return a positive integer if the flag is set\&. Otherwise, it returns zero\&.
106 .SH "RETURN VALUE"
107 .PP
108 On success, these functions return a non\-negative integer\&. On failure, they return a negative errno\-style error code\&.
109 .SS "Errors"
110 .PP
111 Returned errors may indicate the following problems:
112 .PP
113 \fB\-EINVAL\fR
114 .RS 4
115 The
116 \fImessage\fR
117 parameter is
118 \fBNULL\fR\&.
119 .RE
120 .PP
121 \fB\-EPERM\fR
122 .RS 4
123 The message
124 \fImessage\fR
125 is sealed when trying to set a flag\&.
126 .sp
127 The message
128 \fImessage\fR
129 has wrong type\&.
130 .RE
131 .SH "NOTES"
132 .PP
133 Functions described here are available as a shared library, which can be compiled against and linked to with the
134 \fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
135 file\&.
136 .PP
137 The code described here uses
138 \fBgetenv\fR(3), which is declared to be not multi\-thread\-safe\&. This means that the code calling the functions described here must not call
139 \fBsetenv\fR(3)
140 from a parallel thread\&. It is recommended to only do calls to
141 \fBsetenv()\fR
142 from an early phase of the program when no other threads have been started\&.
143 .SH "HISTORY"
144 .PP
145 \fBsd_bus_message_set_expect_reply()\fR,
146 \fBsd_bus_message_get_expect_reply()\fR,
147 \fBsd_bus_message_set_auto_start()\fR, and
148 \fBsd_bus_message_get_auto_start()\fR
149 were added in version 240\&.
150 .PP
151 \fBsd_bus_message_set_allow_interactive_authorization()\fR
152 and
153 \fBsd_bus_message_get_allow_interactive_authorization()\fR
154 were added in version 246\&.
155 .SH "SEE ALSO"
156 .PP
157 \fBsystemd\fR(1), \fBsd-bus\fR(3), \fBsd_bus_set_description\fR(3)