2 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1+ -->
6 <refentry id=
"sd_bus_message_rewind"
7 xmlns:
xi=
"http://www.w3.org/2001/XInclude">
10 <title>sd_bus_message_rewind
</title>
11 <productname>systemd
</productname>
15 <refentrytitle>sd_bus_message_rewind
</refentrytitle>
16 <manvolnum>3</manvolnum>
20 <refname>sd_bus_message_rewind
</refname>
22 <refpurpose>Return to begining of message or current container
</refpurpose>
27 <funcsynopsisinfo>#include
<systemd/sd-bus.h
></funcsynopsisinfo>
30 <funcdef>int
<function>sd_bus_message_rewind
</function></funcdef>
31 <paramdef>sd_bus_message *
<parameter>m
</parameter></paramdef>
32 <paramdef>int
<parameter>complete
</parameter></paramdef>
38 <title>Description
</title>
40 <para><function>sd_bus_message_rewind()
</function> moves the
"read pointer" in the message
41 <parameter>m
</parameter> to either the begining of the message (if
42 <parameter>complete
</parameter> is true) or to the beginning of the currently open container. If
43 no container is open,
<parameter>complete
</parameter> has no effect.
</para>
47 <title>Return Value
</title>
50 On success, this function returns
0 or a positive integer. The value is zero if the current
51 container or whole message in case no container is open is empty, and positive otherwise. On
52 failure, it returns a negative errno-style error code.
56 <xi:include href=
"libsystemd-pkgconfig.xml" />
61 <para>Returned errors may indicate the following problems:
</para>
65 <term><constant>-EINVAL
</constant></term>
67 <listitem><para>The
<parameter>m
</parameter> parameter is
<constant>NULL
</constant>.
</para></listitem>
71 <term><constant>-EPERM
</constant></term>
73 <listitem><para>The message
<parameter>m
</parameter> has not been sealed.
</para></listitem>
79 <title>See Also
</title>
82 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
83 <citerefentry><refentrytitle>sd-bus
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
84 <citerefentry><refentrytitle>sd_bus_message_read
</refentrytitle><manvolnum>3</manvolnum></citerefentry>