'\" t .TH "SD_BUS_MESSAGE_READ_STRV" "3" "" "systemd 256.8" "sd_bus_message_read_strv" .\" ----------------------------------------------------------------- .\" * 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_strv, sd_bus_message_read_strv_extend \- Access an array of strings in a message .SH "SYNOPSIS" .sp .ft B .nf #include .fi .ft .HP \w'int\ sd_bus_message_read_strv('u .BI "int sd_bus_message_read_strv(sd_bus_message\ *" "m" ", char\ ***" "l" ");" .HP \w'int\ sd_bus_message_read_strv_extend('u .BI "int sd_bus_message_read_strv_extend(sd_bus_message\ *" "m" ", char\ ***" "l" ");" .SH "DESCRIPTION" .PP \fBsd_bus_message_read_strv()\fR reads an array of string\-like items from the message \fIm\fR\&. The "read pointer" in the message must be right before an array of strings (D\-Bus type "as"), object paths (D\-Bus type "ao"), or signatures (D\-Bus type "ag")\&. On success, a pointer to a \fBNULL\fR\-terminated array of strings (strv) is returned in the output parameter \fIl\fR\&. Note that ownership of this array is transferred to the caller\&. Hence, the caller is responsible for freeing this array and its contents\&. .PP \fBsd_bus_message_read_strv_extend()\fR is similar, but the second parameter is an input\-output parameter\&. If \fI*l\fR is \fBNULL\fR, if behaves identically to \fBsd_bus_message_read_strv()\fR\&. Otherwise, \fI*l\fR must point to a strv, which will be reallocated and extended with additional strings\&. This function is particularly useful when combining multiple lists of strings in a message or messages into a single array of strings\&. .SH "RETURN VALUE" .PP On success, these functions return a non\-negative integer\&. On failure, they return a negative errno\-style error code\&. .SS "Errors" .PP Returned errors may indicate the following problems: .PP \fB\-EINVAL\fR .RS 4 \fIm\fR or \fIl\fR are \fBNULL\fR\&. .sp Added in version 246\&. .RE .PP \fB\-EPERM\fR .RS 4 The message is not sealed\&. .sp Added in version 246\&. .RE .PP \fB\-EBADMSG\fR .RS 4 The message cannot be parsed\&. .sp Added in version 246\&. .RE .PP \fB\-ENXIO\fR .RS 4 The message "read pointer" is not right before an array of the appropriate type\&. .sp Added in version 248\&. .RE .SH "HISTORY" .PP \fBsd_bus_message_read_strv()\fR was added in version 246\&. .PP \fBsd_bus_message_read_strv_extend()\fR was added in version 252\&. .SH "SEE ALSO" .PP \fBsystemd\fR(1), \fBsd-bus\fR(3), \fBsd_bus_message_read\fR(3)