man-pages/man3/sd_bus_message_copy.3.html
2021-03-31 01:06:50 +01:00

158 lines
2.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of SD_BUS_MESSAGE_COPY</TITLE>
</HEAD><BODY>
<H1>SD_BUS_MESSAGE_COPY</H1>
Section: sd_bus_message_copy (3)<BR>Updated: <BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
sd_bus_message_copy - Copy the contents of one message to another
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<P>
<B>
</B><PRE>
#include &lt;<A HREF="file:///usr/include/systemd/sd-bus.h">systemd/sd-bus.h</A>&gt;
</PRE>
<DL COMPACT>
<DT id="1">
<B>int sd_bus_message_copy(sd_bus_message&nbsp;*</B><I>m</I><B>, sd_bus_message&nbsp;*</B><I>source</I><B>, int&nbsp;</B><I>all</I><B>);</B>
</DL>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
<B>sd_bus_message_copy()</B>
<DD>copies the contents from message
<I>source</I>
to
<I>m</I>. If
<I>all</I>
is false, a single complete type is copied (basic or container). If
<I>all</I>
is true, the contents are copied until the end of the currently open container or the end of
<I>source</I>.
<A NAME="lbAE">&nbsp;</A>
<H2>RETURN VALUE</H2>
<P>
On success, this call returns true if anything was copied, and false if there was nothing to copy. On failure, it returns a negative errno-style error code.
<A NAME="lbAF">&nbsp;</A>
<H3>Errors</H3>
<P>
Returned errors may indicate the following problems:
<P>
<B>-EINVAL</B>
<DL COMPACT><DT id="2"><DD>
<I>source</I>
or
<I>m</I>
are
<B>NULL</B>.
</DL>
<P>
<B>-EPERM</B>
<DL COMPACT><DT id="3"><DD>
Message
<I>m</I>
has been sealed or
<I>source</I>
has
<I>not</I>
been sealed.
</DL>
<P>
<B>-ESTALE</B>
<DL COMPACT><DT id="4"><DD>
Destination message is in invalid state.
</DL>
<P>
<B>-ENXIO</B>
<DL COMPACT><DT id="5"><DD>
Destination message cannot be appended to.
</DL>
<P>
<B>-ENOMEM</B>
<DL COMPACT><DT id="6"><DD>
Memory allocation failed.
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>NOTES</H2>
<P>
These APIs are implemented as a shared library, which can be compiled and linked to with the
<B>libsystemd</B>&nbsp;<B><A HREF="/cgi-bin/man/man2html?1+pkg-config">pkg-config</A></B>(1)
file.
<A NAME="lbAH">&nbsp;</A>
<H2>SEE ALSO</H2>
<P>
<B><A HREF="/cgi-bin/man/man2html?1+systemd">systemd</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?3+sd-bus">sd-bus</A></B>(3),
<B><A HREF="/cgi-bin/man/man2html?3+sd_bus_message_append">sd_bus_message_append</A></B>(3)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="7"><A HREF="#lbAB">NAME</A><DD>
<DT id="8"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="9"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="10"><A HREF="#lbAE">RETURN VALUE</A><DD>
<DL>
<DT id="11"><A HREF="#lbAF">Errors</A><DD>
</DL>
<DT id="12"><A HREF="#lbAG">NOTES</A><DD>
<DT id="13"><A HREF="#lbAH">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:54 GMT, March 31, 2021
</BODY>
</HTML>