1SD_BUS_MESSAGE_READ_BASIC(3)sd_bus_message_read_basiScD_BUS_MESSAGE_READ_BASIC(3)
2
3
4

NAME

6       sd_bus_message_read_basic - Read a basic type from a message
7

SYNOPSIS

9       #include <systemd/sd-bus.h>
10
11       int sd_bus_message_read_basic(sd_bus_message *m, char type, void *p);
12

DESCRIPTION

14       sd_bus_message_read_basic() reads a basic type from a message and
15       advances the read position in the message. The set of basic types and
16       their ascii codes passed in type are described in the D-Bus
17       Specification[1].
18
19       If p is not NULL, it should contain a pointer to an appropriate object.
20       For example, if type is 'y', the object passed in p should have type
21       uint8_t *. If type is 's', the object passed in p should have type
22       const char **. Note that, if the basic type is a pointer (e.g., const
23       char * in the case of a string), the pointer is only borrowed and the
24       contents must be copied if they are to be used after the end of the
25       messages lifetime. Similarly, during the lifetime of such a pointer,
26       the message must not be modified.
27
28       If there is no object of the specified type at the current position in
29       the message, an error is returned.
30

RETURN VALUE

32       On success, sd_bus_message_read_basic() returns 0 or a positive
33       integer. On failure, it returns a negative errno-style error code.
34

SEE ALSO

36       systemd(1), sd-bus(3),
37

NOTES

39        1. D-Bus Specification
40           https://dbus.freedesktop.org/doc/dbus-specification.html
41
42
43
44systemd 239                                       SD_BUS_MESSAGE_READ_BASIC(3)
Impressum