]> git.ipfire.org Git - thirdparty/systemd.git/blame - man/sd_bus_message_copy.xml
man: use same header for all files
[thirdparty/systemd.git] / man / sd_bus_message_copy.xml
CommitLineData
c5fd8c39 1<?xml version='1.0'?>
3a54a157
ZJS
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
0307f791 4<!-- SPDX-License-Identifier: LGPL-2.1+ -->
c5fd8c39
ZJS
5
6<refentry id="sd_bus_message_copy" xmlns:xi="http://www.w3.org/2001/XInclude">
7
8 <refentryinfo>
9 <title>sd_bus_message_copy</title>
10 <productname>systemd</productname>
11 </refentryinfo>
12
13 <refmeta>
14 <refentrytitle>sd_bus_message_copy</refentrytitle>
15 <manvolnum>3</manvolnum>
16 </refmeta>
17
18 <refnamediv>
19 <refname>sd_bus_message_copy</refname>
20
21 <refpurpose>Copy the contents of one message to another</refpurpose>
22 </refnamediv>
23
24 <refsynopsisdiv>
25 <funcsynopsis>
26 <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
27
28 <funcprototype>
29 <funcdef>int sd_bus_message_copy</funcdef>
30 <paramdef>sd_bus_message *<parameter>m</parameter></paramdef>
31 <paramdef>sd_bus_message *<parameter>source</parameter></paramdef>
32 <paramdef>int <parameter>all</parameter></paramdef>
33 </funcprototype>
34 </funcsynopsis>
35 </refsynopsisdiv>
36
37 <refsect1>
38 <title>Description</title>
39
40 <para><function>sd_bus_message_copy()</function> copies the contents from
41 message <parameter>source</parameter> to <parameter>m</parameter>. If
42 <parameter>all</parameter> is false, a single complete type is copied
43 (basic or container). If <parameter>all</parameter> is true, the contents
44 are copied until the end of the currently open container or the end
45 of <parameter>source</parameter>.</para>
46 </refsect1>
47
48 <refsect1>
49 <title>Return Value</title>
50
51 <para>On success, this call returns true if anything was copied, and false if
52 there was nothing to copy. On failure, it returns a negative errno-style error
53 code.</para>
54 </refsect1>
55
56 <refsect1 id='errors'>
57 <title>Errors</title>
58
59 <para>Returned errors may indicate the following problems:</para>
60
61 <variablelist>
62
63 <varlistentry>
64 <term><constant>-EINVAL</constant></term>
65
66 <listitem><para><parameter>source</parameter> or <parameter>m</parameter> are
67 <constant>NULL</constant>.</para></listitem>
68 </varlistentry>
69
70 <varlistentry>
71 <term><constant>-EPERM</constant></term>
72
73 <listitem><para>Message <parameter>m</parameter> has been sealed or
74 <parameter>source</parameter> has <emphasis>not</emphasis> been sealed.
75 </para></listitem>
76 </varlistentry>
77
78 <varlistentry>
79 <term><constant>-ESTALE</constant></term>
80
81 <listitem><para>Destination message is in invalid state.
82 </para></listitem>
83 </varlistentry>
84
85 <varlistentry>
86 <term><constant>-ENXIO</constant></term>
87
88 <listitem><para>Destination message cannot be appended to.
89 </para></listitem>
90 </varlistentry>
91
92 <varlistentry>
93 <term><constant>-ENOMEM</constant></term>
94
95 <listitem><para>Memory allocation failed.</para></listitem>
96 </varlistentry>
97 </variablelist>
98 </refsect1>
99
100 <xi:include href="libsystemd-pkgconfig.xml" />
101
102 <refsect1>
103 <title>See Also</title>
104
105 <para>
106 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
107 <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
108 <citerefentry><refentrytitle>sd_bus_message_append</refentrytitle><manvolnum>3</manvolnum></citerefentry>
109 </para>
110 </refsect1>
111
112</refentry>