1SD_BUS_MESSAGE_READ_ARRAY(3)sd_bus_message_read_arraSyD_BUS_MESSAGE_READ_ARRAY(3)
2
3
4

NAME

6       sd_bus_message_read_array - Access an array of elements in a message
7

SYNOPSIS

9       #include <systemd/sd-bus.h>
10
11       int sd_bus_message_read_array(sd_bus_message *m, char type,
12                                     const void **ptr, size_t *size);
13

DESCRIPTION

15       sd_bus_message_read_array() gives access to an element array in message
16       m. The "read pointer" in the message must be right before an array of
17       type type. As a special case, type may be NUL, in which case any type
18       is acceptable. A pointer to the array data is returned in the parameter
19       ptr and the size of array data (in bytes) is returned in the parameter
20       size. If size is 0, a valid non-null pointer will be returned, but it
21       may not be dereferenced. The data is aligned as appropriate for the
22       data type. The data is part of the message — it may not be modified and
23       is valid only as long as the message is referenced. After this function
24       returns, the "read pointer" points at the next element after the array.
25

RETURN VALUE

27       On success, sd_bus_message_read_array() returns 0 or a positive
28       integer. On failure, it returns a negative errno-style error code.
29
30   Errors
31       Returned errors may indicate the following problems:
32
33       -EINVAL
34           Specified type is invalid or the message parameter or one of the
35           output parameters are NULL.
36
37       -EOPNOTSUPP
38           The byte order in the message is different than native byte order.
39
40       -EPERM
41           The message is not sealed.
42
43       -EBADMSG
44           The message cannot be parsed.
45

SEE ALSO

47       systemd(1), sd-bus(3), sd_bus_message_read(3)
48
49
50
51systemd 243                                       SD_BUS_MESSAGE_READ_ARRAY(3)
Impressum