'\" t .TH "SD_BUS_MESSAGE_READ_BASIC" "3" "" "systemd 232" "sd_bus_message_read_basic" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" sd_bus_message_read_basic \- Read a basic type from a message .SH "SYNOPSIS" .sp .ft B .nf #include .fi .ft .HP \w'int\ sd_bus_message_read_basic('u .BI "int sd_bus_message_read_basic(sd_bus_message\ *" "m" ", char\ " "type" ", void\ *" "p" ");" .SH "DESCRIPTION" .PP \fBsd_bus_message_read_basic()\fR 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 \fItype\fR are described in the \m[blue]\fBD\-Bus Specification\fR\m[]\&\s-2\u[1]\d\s+2\&. .PP If \fIp\fR is not NULL, it should contain a pointer to an appropriate object\&. For example, if \fItype\fR is \fB\*(Aqy\*(Aq\fR, the object passed in \fIp\fR should have type uint8_t *\&. If \fItype\fR is \fB\*(Aqs\*(Aq\fR, the object passed in \fIp\fR 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\&. .PP If there is no object of the specified type at the current position in the message, an error is returned\&. .SH "RETURN VALUE" .PP On success, \fBsd_bus_message_read_basic()\fR returns 0 or a positive integer\&. On failure, it returns a negative errno\-style error code\&. .SH "SEE ALSO" .PP \fBsystemd\fR(1), \fBsd-bus\fR(3), .SH "NOTES" .IP " 1." 4 D-Bus Specification .RS 4 \%https://dbus.freedesktop.org/doc/dbus-specification.html .RE