Contains various static routines for validating and/or sanitizing data. More...
#include <validator.h>
Static Public Member Functions | |
static bool | validate_bus_name (std::string name) |
Validate a bus name. More... | |
static bool | validate_interface_name (std::string name) |
Validate an interface name. More... | |
static bool | validate_member_name (std::string name) |
Validate a member name. More... | |
static bool | validate_error_name (std::string name) |
Validate an error name. More... | |
static bool | message_is_small_enough (const std::vector< uint8_t > *data) |
Checks to make sure that the size of the message(after serialization) is lower than 2^27. More... | |
static constexpr uint32_t | maximum_array_size () |
Return the maximum array size. More... | |
static constexpr uint32_t | maximum_message_size () |
static constexpr uint32_t | maximum_message_depth () |
Private Member Functions | |
Validator () | |
Contains various static routines for validating and/or sanitizing data.
|
private |
|
inlinestaticconstexpr |
Return the maximum array size.
Referenced by DBus::MessageAppendIterator::close_container(), and DBus::priv::VariantAppendIterator::close_container().
|
inlinestaticconstexpr |
|
inlinestaticconstexpr |
|
static |
Checks to make sure that the size of the message(after serialization) is lower than 2^27.
data |
References maximum_message_size().
Referenced by DBus::Message::serialize_to_vector().
|
static |
Validate a bus name.
According to the DBus specification:
Bus names that start with a colon (':') character are unique connection names. Other bus names are called well-known bus names.
-Bus names are composed of 1 or more elements separated by a period ('.') character. All elements must contain at least one character.
Note that this method will reject technically-correct interface names that have '-' in them, as this is discouraged.
name | The name to validate |
References is_allowable_character().
Referenced by DBus::Message::set_destination().
|
static |
Validate an error name.
See validate_interface_name for specifications.
name |
References validate_interface_name().
|
static |
Validate an interface name.
According to the DBus specification:
Interface names are composed of 2 or more elements separated by a period ('.') character. All elements must contain at least one character.
name | The name to validate |
References is_allowable_character().
Referenced by DBus::SignalMessage::set_interface(), and validate_error_name().
|
static |
Validate a member name.
According to the DBus specification:
name |
References is_allowable_character().