1<?xml version='1.0'?> 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-or-later --> 5 6<refentry id="sd_bus_message_append_strv" 7 xmlns:xi="http://www.w3.org/2001/XInclude"> 8 9 <refentryinfo> 10 <title>sd_bus_message_append_strv</title> 11 <productname>systemd</productname> 12 </refentryinfo> 13 14 <refmeta> 15 <refentrytitle>sd_bus_message_append_strv</refentrytitle> 16 <manvolnum>3</manvolnum> 17 </refmeta> 18 19 <refnamediv> 20 <refname>sd_bus_message_append_strv</refname> 21 22 <refpurpose>Attach an array of strings to a message</refpurpose> 23 </refnamediv> 24 25 <refsynopsisdiv> 26 <funcsynopsis> 27 <funcsynopsisinfo>#include <systemd/sd-bus.h></funcsynopsisinfo> 28 29 <funcprototype> 30 <funcdef>int sd_bus_message_append_strv</funcdef> 31 <paramdef>sd_bus_message *<parameter>m</parameter></paramdef> 32 <paramdef>char **<parameter>l</parameter></paramdef> 33 </funcprototype> 34 </funcsynopsis> 35 </refsynopsisdiv> 36 37 <refsect1> 38 <title>Description</title> 39 40 <para>The <function>sd_bus_message_append()</function> function can be 41 used to append an array of strings to message 42 <parameter>m</parameter>. The parameter <parameter>l</parameter> 43 shall point to a <constant>NULL</constant>-terminated array of pointers 44 to <constant>NUL</constant>-terminated strings. Each string must 45 satisfy the same constraints as described for the 46 <literal>s</literal> type in 47 <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>. 48 </para> 49 50 <para>The memory pointed at by <parameter>p</parameter> and the 51 contents of the strings themselves are copied into the memory area 52 containing the message and may be changed after this call. Note 53 that the signature of <parameter>l</parameter> parameter is to be 54 treated as <type>const char *const *</type>, and the contents 55 will not be modified.</para> 56 </refsect1> 57 58 <refsect1> 59 <title>Return Value</title> 60 61 <para>On success, this call returns 0 or a positive integer. On failure, a negative errno-style error 62 code is returned.</para> 63 64 <xi:include href="sd_bus_message_append_basic.xml" xpointer="errors" /> 65 </refsect1> 66 67 <xi:include href="libsystemd-pkgconfig.xml" /> 68 69 <refsect1> 70 <title>See Also</title> 71 72 <para> 73 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, 74 <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>, 75 <citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>, 76 <citerefentry><refentrytitle>sd_bus_message_append_array</refentrytitle><manvolnum>3</manvolnum></citerefentry>, 77 <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html">The D-Bus specification</ulink> 78 </para> 79 </refsect1> 80 81</refentry> 82