1<?xml version='1.0'?> 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 --> 5 6<refentry id="sd_bus_message_at_end" xmlns:xi="http://www.w3.org/2001/XInclude"> 7 <refentryinfo> 8 <title>sd_bus_message_at_end</title> 9 <productname>systemd</productname> 10 </refentryinfo> 11 12 <refmeta> 13 <refentrytitle>sd_bus_message_at_end</refentrytitle> 14 <manvolnum>3</manvolnum> 15 </refmeta> 16 17 <refnamediv> 18 <refname>sd_bus_message_at_end</refname> 19 20 <refpurpose>Check if a message has been fully read</refpurpose> 21 </refnamediv> 22 23 <refsynopsisdiv> 24 <funcsynopsis> 25 <funcsynopsisinfo>#include <systemd/sd-bus.h></funcsynopsisinfo> 26 27 <funcprototype> 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> 31 </funcprototype> 32 </funcsynopsis> 33 </refsynopsisdiv> 34 35 <refsect1> 36 <title>Description</title> 37 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> 43 </refsect1> 44 45 <refsect1> 46 <title>Return Value</title> 47 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> 52 53 <refsect2> 54 <title>Errors</title> 55 56 <para>Returned errors may indicate the following problems:</para> 57 58 <variablelist> 59 <varlistentry> 60 <term><constant>-EINVAL</constant></term> 61 62 <listitem><para>The <parameter>m</parameter> parameter is <constant>NULL</constant>. 63 </para></listitem> 64 </varlistentry> 65 66 <varlistentry> 67 <term><constant>-EPERM</constant></term> 68 69 <listitem><para>The message is not sealed.</para></listitem> 70 </varlistentry> 71 </variablelist> 72 </refsect2> 73 </refsect1> 74 75 <xi:include href="libsystemd-pkgconfig.xml" /> 76 77 <refsect1> 78 <title>See Also</title> 79 80 <para> 81 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, 82 <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>, 83 <citerefentry><refentrytitle>sd_bus_message_read</refentrytitle><manvolnum>3</manvolnum></citerefentry> 84 </para> 85 </refsect1> 86</refentry> 87