1SD_BUS_INTERFACE_NAME_IS_sVdA_LbIuDs(_3i)nterface_name_SiDs__BvUaSl_iIdNTERFACE_NAME_IS_VALID(3)
2
3
4

NAME

6       sd_bus_interface_name_is_valid, sd_bus_service_name_is_valid,
7       sd_bus_member_name_is_valid, sd_bus_object_path_is_valid - Check if a
8       string is a valid bus name or object path
9

SYNOPSIS

11       #include <systemd/sd-bus.h>
12
13       int sd_bus_interface_name_is_valid(const char* p);
14
15       int sd_bus_service_name_is_valid(const char* p);
16
17       int sd_bus_member_name_is_valid(const char* p);
18
19       int sd_bus_object_path_is_valid(const char* p);
20

DESCRIPTION

22       sd_bus_interface_name_is_valid() checks if a given string p is a
23       syntactically valid bus interface name. Similarly,
24       sd_bus_service_name_is_valid() checks if the argument is a valid bus
25       service name, sd_bus_member_name_is_valid() checks if the argument is a
26       valid bus interface member name, and sd_bus_object_path_is_valid()
27       checks if the argument is a valid bus object path. Those functions
28       generally check that only allowed characters are used and that the
29       length of the string is within limits.
30

RETURN VALUE

32       Those functions return 1 if the argument is a valid interface / service
33       / member name or object path, and 0 if it is not. If the argument is
34       NULL, an error is returned.
35
36   Errors
37       Returned errors may indicate the following problems:
38
39       -EINVAL
40           The p parameter is NULL.
41

NOTES

43       Functions described here are available as a shared library, which can
44       be compiled against and linked to with the libsystemd pkg-config(1)
45       file.
46
47       The code described here uses getenv(3), which is declared to be not
48       multi-thread-safe. This means that the code calling the functions
49       described here must not call setenv(3) from a parallel thread. It is
50       recommended to only do calls to setenv() from an early phase of the
51       program when no other threads have been started.
52

SEE ALSO

54       systemd(1), sd-bus(3), sd_bus_call_method(3)
55
56
57
58systemd 254                                  SD_BUS_INTERFACE_NAME_IS_VALID(3)
Impressum