]>
Commit | Line | Data |
---|---|---|
3802a3d3 | 1 | <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*--> |
effbc8e4 | 2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" |
12b42c76 | 3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> |
effbc8e4 ZJS |
4 | |
5 | <!-- | |
572eb058 ZJS |
6 | SPDX-License-Identifier: LGPL-2.1+ |
7 | ||
b975b0d5 | 8 | This file is part of systemd. |
effbc8e4 | 9 | |
b975b0d5 | 10 | Copyright 2014 Zbigniew Jędrzejewski-Szmek |
effbc8e4 | 11 | |
b975b0d5 ZJS |
12 | systemd is free software; you can redistribute it and/or modify it |
13 | under the terms of the GNU Lesser General Public License as published by | |
14 | the Free Software Foundation; either version 2.1 of the License, or | |
15 | (at your option) any later version. | |
effbc8e4 | 16 | |
b975b0d5 ZJS |
17 | systemd is distributed in the hope that it will be useful, but |
18 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
20 | Lesser General Public License for more details. | |
effbc8e4 | 21 | |
b975b0d5 ZJS |
22 | You should have received a copy of the GNU Lesser General Public License |
23 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
effbc8e4 ZJS |
24 | --> |
25 | ||
48f69d8f | 26 | <refentry id="sd_bus_message_append_strv" |
effbc8e4 ZJS |
27 | xmlns:xi="http://www.w3.org/2001/XInclude"> |
28 | ||
29 | <refentryinfo> | |
30 | <title>sd_bus_message_append_strv</title> | |
31 | <productname>systemd</productname> | |
32 | ||
33 | <authorgroup> | |
34 | <author> | |
35 | <contrib>A monkey with a typewriter</contrib> | |
36 | <firstname>Zbigniew</firstname> | |
37 | <surname>Jędrzejewski-Szmek</surname> | |
38 | <email>zbyszek@in.waw.pl</email> | |
39 | </author> | |
40 | </authorgroup> | |
41 | </refentryinfo> | |
42 | ||
43 | <refmeta> | |
44 | <refentrytitle>sd_bus_message_append_strv</refentrytitle> | |
45 | <manvolnum>3</manvolnum> | |
46 | </refmeta> | |
47 | ||
48 | <refnamediv> | |
49 | <refname>sd_bus_message_append_strv</refname> | |
50 | ||
51 | <refpurpose>Attach an array of strings to a message</refpurpose> | |
52 | </refnamediv> | |
53 | ||
54 | <refsynopsisdiv> | |
55 | <funcsynopsis> | |
56 | <funcsynopsisinfo>#include <systemd/sd-bus.h></funcsynopsisinfo> | |
57 | ||
58 | <funcprototype> | |
59 | <funcdef>int sd_bus_message_append_strv</funcdef> | |
60 | <paramdef>sd_bus_message *<parameter>m</parameter></paramdef> | |
61 | <paramdef>char **<parameter>l</parameter></paramdef> | |
62 | </funcprototype> | |
63 | </funcsynopsis> | |
64 | </refsynopsisdiv> | |
65 | ||
66 | <refsect1> | |
67 | <title>Description</title> | |
68 | ||
b8bde116 | 69 | <para>The <function>sd_bus_message_append</function> function can be |
effbc8e4 | 70 | used to append an array of strings to message |
b8bde116 JE |
71 | <parameter>m</parameter>. The parameter <parameter>l</parameter> |
72 | shall point to a <constant>NULL</constant>-terminated array of pointers | |
effbc8e4 ZJS |
73 | to <constant>NUL</constant>-terminated strings. Each string must |
74 | satisfy the same constraints as described for the | |
75 | <literal>s</literal> type in | |
76 | <citerefentry><refentrytitle>sd_bus_message_append_basic</refentrytitle><manvolnum>3</manvolnum></citerefentry>. | |
77 | </para> | |
78 | ||
79 | <para>The memory pointed at by <parameter>p</parameter> and the | |
80 | contents of the strings themselves are copied into the memory area | |
81 | containing the message and may be changed after this call. Note | |
dca348bc JE |
82 | that the signature of <parameter>l</parameter> parameter is to be |
83 | treated as <type>const char *const *</type>, and the contents | |
effbc8e4 ZJS |
84 | will not be modified.</para> |
85 | </refsect1> | |
86 | ||
87 | <refsect1> | |
88 | <title>Return Value</title> | |
89 | ||
90 | <para>On success, this call returns 0 or a positive integer. On | |
91 | failure, a negative errno-style error code is returned.</para> | |
92 | </refsect1> | |
93 | ||
94 | <xi:include href="sd_bus_message_append_basic.xml" xpointer="errors" /> | |
95 | ||
96 | <refsect1> | |
97 | <title>Notes</title> | |
98 | ||
b8bde116 | 99 | <para>The <function>sd_bus_append_append_strv()</function> function |
effbc8e4 ZJS |
100 | described here is available as a shared library, which can be |
101 | compiled and linked to with the | |
5aded369 | 102 | <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry> |
effbc8e4 ZJS |
103 | file.</para> |
104 | </refsect1> | |
105 | ||
106 | <refsect1> | |
107 | <title>See Also</title> | |
108 | ||
109 | <para> | |
110 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
111 | <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>, | |
112 | <citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>, | |
113 | <citerefentry><refentrytitle>sd_bus_message_append_array</refentrytitle><manvolnum>3</manvolnum></citerefentry>, | |
114 | <ulink url="http://dbus.freedesktop.org/doc/dbus-specification.html">The D-Bus specification</ulink> | |
115 | </para> | |
116 | </refsect1> | |
117 | ||
118 | </refentry> |