sd_bus_message_read_basic - Read a basic type from a message
char type, void *p);
reads a basic type from a message and
advances the read position in the message. The set of basic types and their
ascii codes passed in type
are described in the D-Bus
is not NULL, it should contain a pointer to an appropriate object.
For example, if type
, the object passed in p
should have type uint8_t *. If type
, the object passed in
should have type const char **. Note that, if the basic type is a
pointer (e.g., const char * in the case of a string), the pointer is only
borrowed and the contents must be copied if they are to be used after the end
of the messages lifetime. Similarly, during the lifetime of such a pointer,
the message must not be modified.
If there is no object of the specified type at the current position in the
message, an error is returned.
On success, sd_bus_message_read_basic()
returns 0 or a positive integer.
On failure, it returns a negative errno-style error code.
- D-Bus Specification