1:255.13-alt1
[systemd_ALT.git] / man / sd_bus_interface_name_is_valid.xml
blobbd526a1b225c4df6faaa1943b7de0bc371b782fa
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 -->
6 <refentry id="sd_bus_interface_name_is_valid" xmlns:xi="http://www.w3.org/2001/XInclude">
7   <refentryinfo>
8     <title>sd_bus_interface_name_is_valid</title>
9     <productname>systemd</productname>
10   </refentryinfo>
12   <refmeta>
13     <refentrytitle>sd_bus_interface_name_is_valid</refentrytitle>
14     <manvolnum>3</manvolnum>
15   </refmeta>
17   <refnamediv>
18     <refname>sd_bus_interface_name_is_valid</refname>
19     <refname>sd_bus_service_name_is_valid</refname>
20     <refname>sd_bus_member_name_is_valid</refname>
21     <refname>sd_bus_object_path_is_valid</refname>
23     <refpurpose>Check if a string is a valid bus name or object path</refpurpose>
24   </refnamediv>
26   <refsynopsisdiv>
27     <funcsynopsis>
28       <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
30       <funcprototype>
31         <funcdef>int <function>sd_bus_interface_name_is_valid</function></funcdef>
32         <paramdef>const char* <parameter>p</parameter></paramdef>
33       </funcprototype>
35       <funcprototype>
36         <funcdef>int <function>sd_bus_service_name_is_valid</function></funcdef>
37         <paramdef>const char* <parameter>p</parameter></paramdef>
38       </funcprototype>
40       <funcprototype>
41         <funcdef>int <function>sd_bus_member_name_is_valid</function></funcdef>
42         <paramdef>const char* <parameter>p</parameter></paramdef>
43       </funcprototype>
45       <funcprototype>
46         <funcdef>int <function>sd_bus_object_path_is_valid</function></funcdef>
47         <paramdef>const char* <parameter>p</parameter></paramdef>
48       </funcprototype>
49     </funcsynopsis>
50   </refsynopsisdiv>
52   <refsect1>
53     <title>Description</title>
55     <para><function>sd_bus_interface_name_is_valid()</function> checks if a given string
56     <parameter>p</parameter> is a syntactically valid bus interface name. Similarly,
57     <function>sd_bus_service_name_is_valid()</function> checks if the argument is a valid bus service name,
58     <function>sd_bus_member_name_is_valid()</function> checks if the argument is a valid bus interface member
59     name, and <function>sd_bus_object_path_is_valid()</function> checks if the argument is a valid bus object
60     path. Those functions generally check that only allowed characters are used and that the length of the
61     string is within limits.</para>
62   </refsect1>
64   <refsect1>
65     <title>Return Value</title>
67     <para>Those functions return 1 if the argument is a valid interface / service / member name or object
68     path, and 0 if it is not. If the argument is <constant>NULL</constant>, an error is returned.</para>
70     <refsect2>
71       <title>Errors</title>
73       <para>Returned errors may indicate the following problems:</para>
75       <variablelist>
76         <varlistentry>
77           <term><constant>-EINVAL</constant></term>
79           <listitem><para>The <parameter>p</parameter> parameter is
80           <constant>NULL</constant>.</para>
82           <xi:include href="version-info.xml" xpointer="v246"/></listitem>
83         </varlistentry>
84       </variablelist>
85     </refsect2>
86   </refsect1>
88   <xi:include href="libsystemd-pkgconfig.xml" />
90   <refsect1>
91     <title>History</title>
92     <para><function>sd_bus_interface_name_is_valid()</function>,
93     <function>sd_bus_service_name_is_valid()</function>,
94     <function>sd_bus_member_name_is_valid()</function>, and
95     <function>sd_bus_object_path_is_valid()</function> were added in version 246.</para>
96   </refsect1>
98   <refsect1>
99     <title>See Also</title>
101     <para>
102       <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
103       <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
104       <citerefentry><refentrytitle>sd_bus_call_method</refentrytitle><manvolnum>3</manvolnum></citerefentry>
105     </para>
106   </refsect1>
108 </refentry>