1SD_BUS_MESSAGE_SET_EXPECTs_dR_EbPuLsY_(m3e)ssage_set_exSpDe_cBtU_Sr_eMpElSySAGE_SET_EXPECT_REPLY(3)
2
3
4

NAME

6       sd_bus_message_set_expect_reply, sd_bus_message_get_expect_reply,
7       sd_bus_message_set_auto_start, sd_bus_message_get_auto_start,
8       sd_bus_message_set_allow_interactive_authorization,
9       sd_bus_message_get_allow_interactive_authorization - Set and query bus
10       message metadata
11

SYNOPSIS

13       #include <systemd/sd-bus.h>
14
15       int sd_bus_message_set_expect_reply(sd_bus_message *message, int b);
16
17       int sd_bus_message_get_expect_reply(sd_bus_message *message);
18
19       int sd_bus_message_set_auto_start(sd_bus_message *message, int b);
20
21       int sd_bus_message_get_auto_start(sd_bus_message *message);
22
23       int
24                                                              sd_bus_message_set_allow_interactive_authorization(sd_bus_message *message,
25                                                              int b);
26
27       int
28                                                              sd_bus_message_get_allow_interactive_authorization(sd_bus_message *message);
29

DESCRIPTION

31       sd_bus_message_set_expect_reply() sets or clears the NO_REPLY_EXPECTED
32       flag on the message m. This flag matters only for method call messages
33       and is used to specify that no method return or error reply is
34       expected. It is ignored for other types. Thus, for a method call
35       message, calling
36
37           sd_bus_message_set_expect_reply(..., 0)
38
39       sets the flag and suppresses the reply.
40
41       sd_bus_message_get_expect_reply() checks if the NO_REPLY_EXPECTED flag
42       is set on the message m. It will return positive if it is not set, and
43       zero if it is.
44
45       sd_bus_message_set_auto_start() sets or clears the NO_AUTO_START flag
46       on the message m. When the flag is set, the bus must not launch an
47       owner for the destination name in response to this message. Calling
48
49           sd_bus_message_set_auto_start(..., 0)
50
51       sets the flag.
52
53       sd_bus_message_get_auto_start() checks if the NO_AUTO_START flag is set
54       on the message m. It will return positive if it is not set, and zero if
55       it is.
56
57       sd_bus_message_set_allow_interactive_authorization() sets or clears the
58       ALLOW_INTERACTIVE_AUTHORIZATION flag on the message m. Setting this
59       flag informs the receiver that the caller is prepared to wait for
60       interactive authorization via polkit or a similar framework. Note that
61       setting this flag does not guarantee that the receiver will actually
62       perform interactive authorization. Also, make sure to set a suitable
63       message timeout when using this flag since interactive authorization
64       could potentially take a long time as it depends on user input. If b is
65       non-zero, the flag is set.
66
67       sd_bus_message_get_allow_interactive_authorization() checks if the
68       ALLOW_INTERACTIVE_AUTHORIZATION flag is set on the message m. It will
69       return a positive integer if the flag is set. Otherwise, it returns
70       zero.
71

RETURN VALUE

73       On success, these functions return a non-negative integer. On failure,
74       they return a negative errno-style error code.
75
76   Errors
77       Returned errors may indicate the following problems:
78
79       -EINVAL
80           The message parameter is NULL.
81
82       -EPERM
83           The message message is sealed when trying to set a flag.
84
85           The message message has wrong type.
86

NOTES

88       These APIs are implemented as a shared library, which can be compiled
89       and linked to with the libsystemd pkg-config(1) file.
90

SEE ALSO

92       systemd(1), sd-bus(3), sd_bus_set_description(3)
93
94
95
96systemd 253                                 SD_BUS_MESSAGE_SET_EXPECT_REPLY(3)
Impressum