1SD_BUS_INTERFACE_NAME_IS_sVdA_LbIuDs(_3i)nterface_name_SiDs__BvUaSl_iIdNTERFACE_NAME_IS_VALID(3)
2
3
4
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
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
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
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
43 These APIs are implemented as a shared library, which can be compiled
44 and linked to with the libsystemd pkg-config(1) file.
45
47 systemd(1), sd-bus(3), sd_bus_call_method(3)
48
49
50
51systemd 251 SD_BUS_INTERFACE_NAME_IS_VALID(3)