Validators¶
-
dbus_next.is_bus_name_valid(name: str) → bool¶ Whether this is a valid bus name.
- Parameters
name (str) – The bus name to validate.
- Returns
Whether the name is a valid bus name.
- Return type
bool
-
dbus_next.is_member_name_valid(member: str) → bool¶ Whether this is a valid member name.
- Parameters
member (str) – The member name to validate.
- Returns
Whether the name is a valid member name.
- Return type
bool
-
dbus_next.is_object_path_valid(path: str) → bool¶ Whether this is a valid object path.
See also
https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-marshaling-object-path
- Parameters
path (str) – The object path to validate.
- Returns
Whether the object path is valid.
- Return type
bool
-
dbus_next.is_interface_name_valid(name: str) → bool¶ Whether this is a valid interface name.
- Parameters
name (str) – The interface name to validate.
- Returns
Whether the name is a valid interface name.
- Return type
bool
-
dbus_next.assert_bus_name_valid(name: str)¶ Raise an error if this is not a valid bus name.
- Parameters
name (str) – The bus name to validate.
- Raises
InvalidBusNameError- If this is not a valid bus name.
-
dbus_next.assert_member_name_valid(member)¶ Raise an error if this is not a valid member name.
- Parameters
member (str) – The member name to validate.
- Raises
InvalidMemberNameError- If this is not a valid object path.
-
dbus_next.assert_object_path_valid(path: str)¶ Raise an error if this is not a valid object path.
See also
https://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-marshaling-object-path
- Parameters
path (str) – The object path to validate.
- Raises
InvalidObjectPathError- If this is not a valid object path.
-
dbus_next.assert_interface_name_valid(name: str)¶ Raise an error if this is not a valid interface name.
- Parameters
name (str) – The interface name to validate.
- Raises
InvalidInterfaceNameError- If this is not a valid object path.