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