2 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1+ -->
6 <refentry id=
"sd_bus_message_read_strv">
9 <title>sd_bus_message_read_strv
</title>
10 <productname>systemd
</productname>
14 <refentrytitle>sd_bus_message_read_strv
</refentrytitle>
15 <manvolnum>3</manvolnum>
19 <refname>sd_bus_message_read_strv
</refname>
21 <refpurpose>Access an array of strings in a message
</refpurpose>
26 <funcsynopsisinfo>#include
<systemd/sd-bus.h
></funcsynopsisinfo>
29 <funcdef>int
<function>sd_bus_message_read_strv
</function></funcdef>
30 <paramdef>sd_bus_message *
<parameter>m
</parameter></paramdef>
31 <paramdef>char ***
<parameter>l
</parameter></paramdef>
37 <title>Description
</title>
39 <para><function>sd_bus_message_read_strv()
</function> gives access to an array of strings in message
40 <parameter>m
</parameter>. The
"read pointer" in the message must be right before an array of strings. On
41 success, a pointer to the
<constant>NULL
</constant>-terminated array of strings is returned in the output
42 parameter
<parameter>l
</parameter>. Note that ownership of this array is transferred to the caller.
43 Hence, the caller is responsible for freeing this array and its contents.
</para>
47 <title>Return Value
</title>
49 <para>On success,
<function>sd_bus_message_read_strv()
</function> returns a non-negative integer. On
50 failure, it returns a negative errno-style error code.
</para>
55 <para>Returned errors may indicate the following problems:
</para>
59 <term><constant>-EINVAL
</constant></term>
61 <listitem><para><parameter>m
</parameter> or
<parameter>l
</parameter> are
<constant>NULL
</constant>.
66 <term><constant>-EPERM
</constant></term>
68 <listitem><para>The message is not sealed.
</para></listitem>
72 <term><constant>-EBADMSG
</constant></term>
74 <listitem><para>The message cannot be parsed.
</para></listitem>
81 <title>See Also
</title>
84 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
85 <citerefentry><refentrytitle>sd-bus
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
86 <citerefentry><refentrytitle>sd_bus_message_read
</refentrytitle><manvolnum>3</manvolnum></citerefentry>