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_verify_type" xmlns:
xi=
"http://www.w3.org/2001/XInclude">
8 <title>sd_bus_message_verify_type
</title>
9 <productname>systemd
</productname>
13 <refentrytitle>sd_bus_message_verify_type
</refentrytitle>
14 <manvolnum>3</manvolnum>
18 <refname>sd_bus_message_verify_type
</refname>
20 <refpurpose>Check if the message has specified type at the current location
</refpurpose>
25 <funcsynopsisinfo>#include
<systemd/sd-bus.h
></funcsynopsisinfo>
28 <funcdef>int sd_bus_message_verify_type
</funcdef>
29 <paramdef>sd_bus_message *
<parameter>m
</parameter></paramdef>
30 <paramdef>char
<parameter>type
</parameter></paramdef>
31 <paramdef>const char*
<parameter>contents
</parameter></paramdef>
37 <title>Description
</title>
39 <para><function>sd_bus_message_verify_type()
</function> checks if the complete type at the
40 current location in the message
<parameter>m
</parameter> matches the specified
41 <parameter>type
</parameter> and
<parameter>contents
</parameter>. If non-zero, parameter
42 <parameter>type
</parameter> must be one of the types specified in
43 <citerefentry><refentrytitle>sd_bus_message_append
</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
44 If non-null, parameter
<parameter>contents
</parameter> must be a valid sequence of complete
45 types. If both
<parameter>type
</parameter> and
<parameter>contents
</parameter> are specified
46 <parameter>type
</parameter> must be a container type.
</para>
48 <para>If
<parameter>type
</parameter> is specified, the type in the message must match. If
49 <parameter>contents
</parameter> is specified, the type in the message must be a container type
50 with this signature.
</para>
54 <title>Return Value
</title>
56 <para>On success, this call returns true if the type matches and zero if not (the message
57 <parameter>m
</parameter> contains different data or the end of the message has been reached). On
58 failure, it returns a negative errno-style error code.
</para>
61 <refsect1 id='errors'
>
64 <para>Returned errors may indicate the following problems:
</para>
69 <term><constant>-EINVAL
</constant></term>
71 <listitem><para><parameter>m
</parameter> or both
<parameter>type
</parameter> and
72 <parameter>contents
</parameter> are
<constant>NULL
</constant>.
</para>
74 <para>Arguments do not satisfy other contraints listed above.
</para>
79 <term><constant>-EPERM
</constant></term>
81 <listitem><para>Message
<parameter>m
</parameter> is not sealed.
87 <xi:include href=
"libsystemd-pkgconfig.xml" />
90 <title>See Also
</title>
93 <citerefentry><refentrytitle>systemd
</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
94 <citerefentry><refentrytitle>sd-bus
</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
95 <citerefentry><refentrytitle>sd_bus_message_append
</refentrytitle><manvolnum>3</manvolnum></citerefentry>