2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
6 <refentry id="sd_bus_message_at_end" xmlns:xi="http://www.w3.org/2001/XInclude">
8 <title>sd_bus_message_at_end</title>
9 <productname>systemd</productname>
13 <refentrytitle>sd_bus_message_at_end</refentrytitle>
14 <manvolnum>3</manvolnum>
18 <refname>sd_bus_message_at_end</refname>
20 <refpurpose>Check if a message has been fully read</refpurpose>
25 <funcsynopsisinfo>#include <systemd/sd-bus.h></funcsynopsisinfo>
28 <funcdef>int <function>sd_bus_message_at_end</function></funcdef>
29 <paramdef>sd_bus_message *<parameter>m</parameter></paramdef>
30 <paramdef>int <parameter>complete</parameter></paramdef>
36 <title>Description</title>
38 <para><function>sd_bus_message_at_end()</function> returns whether all data from the currently opened
39 container in <parameter>m</parameter> or all data from all containers in <parameter>m</parameter> has
40 been read. If <parameter>complete</parameter> is zero, this function returns whether all data from the
41 currently opened container has been read. If <parameter>complete</parameter> is non-zero, this function
42 returns whether all data from all containers in <parameter>m</parameter> has been read.</para>
46 <title>Return Value</title>
48 <para>If all data from all containers or the current container (depending on the value of
49 <parameter>complete</parameter>) has been read, <function>sd_bus_message_at_end()</function> returns a
50 positive integer. If there is still data left to be read, it returns zero. On failure, it returns a
51 negative errno-style error code.</para>
56 <para>Returned errors may indicate the following problems:</para>
60 <term><constant>-EINVAL</constant></term>
62 <listitem><para>The <parameter>m</parameter> parameter is <constant>NULL</constant>.
65 <xi:include href="version-info.xml" xpointer="v246"/></listitem>
69 <term><constant>-EPERM</constant></term>
71 <listitem><para>The message is not sealed.</para>
73 <xi:include href="version-info.xml" xpointer="v246"/></listitem>
79 <xi:include href="libsystemd-pkgconfig.xml" />
82 <title>History</title>
83 <para><function>sd_bus_message_at_end()</function> was added in version 246.</para>
87 <title>See Also</title>
90 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
91 <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
92 <citerefentry><refentrytitle>sd_bus_message_read</refentrytitle><manvolnum>3</manvolnum></citerefentry>