| 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.5/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> |
| 64 |
|
| 65 |
<xi:include href="version-info.xml" xpointer="v246"/></listitem> |
| 66 |
</varlistentry> |
| 67 |
|
| 68 |
<varlistentry> |
| 69 |
<term><constant>-EPERM</constant></term> |
| 70 |
|
| 71 |
<listitem><para>The message is not sealed.</para> |
| 72 |
|
| 73 |
<xi:include href="version-info.xml" xpointer="v246"/></listitem> |
| 74 |
</varlistentry> |
| 75 |
</variablelist> |
| 76 |
</refsect2> |
| 77 |
</refsect1> |
| 78 |
|
| 79 |
<xi:include href="libsystemd-pkgconfig.xml" /> |
| 80 |
|
| 81 |
<refsect1> |
| 82 |
<title>History</title> |
| 83 |
<para><function>sd_bus_message_at_end()</function> was added in version 246.</para> |
| 84 |
</refsect1> |
| 85 |
|
| 86 |
<refsect1> |
| 87 |
<title>See Also</title> |
| 88 |
|
| 89 |
<para><simplelist type="inline"> |
| 90 |
<member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 91 |
<member><citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry></member> |
| 92 |
<member><citerefentry><refentrytitle>sd_bus_message_read</refentrytitle><manvolnum>3</manvolnum></citerefentry></member> |
| 93 |
</simplelist></para> |
| 94 |
</refsect1> |
| 95 |
</refentry> |