Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Audio file or device URI. More...
#include <io_uri.h>
Public Member Functions | |
IoUri (core::IArena &) | |
Initialize empty URI. More... | |
bool | is_valid () const |
Returns true if the URI has all required fields (scheme and path). More... | |
bool | is_file () const |
Returns true if the scheme is "file". More... | |
bool | is_special_file () const |
Returns true if the scheme is "file" and the path is "-". More... | |
void | clear () |
Clear all fields. More... | |
const char * | scheme () const |
URI scheme. May be "file" or device type, e.g. "alsa". More... | |
ROC_ATTR_NODISCARD bool | set_scheme (const char *str, size_t str_len) |
Set URI scheme. String should not be zero-terminated. More... | |
const char * | path () const |
URI path. May be device name or file path depending on scheme. More... | |
ROC_ATTR_NODISCARD bool | set_encoded_path (const char *str, size_t str_len) |
Set URI path. String should be percent-encoded. String should not be zero-terminated. More... | |
ROC_ATTR_NODISCARD bool | format_encoded_path (core::StringBuilder &dst) const |
Get URI path. String will be percent-encoded. More... | |
|
explicit |
Initialize empty URI.
void roc::address::IoUri::clear | ( | ) |
Clear all fields.
ROC_ATTR_NODISCARD bool roc::address::IoUri::format_encoded_path | ( | core::StringBuilder & | dst | ) | const |
Get URI path. String will be percent-encoded.
bool roc::address::IoUri::is_file | ( | ) | const |
Returns true if the scheme is "file".
bool roc::address::IoUri::is_special_file | ( | ) | const |
Returns true if the scheme is "file" and the path is "-".
bool roc::address::IoUri::is_valid | ( | ) | const |
Returns true if the URI has all required fields (scheme and path).
const char* roc::address::IoUri::path | ( | ) | const |
URI path. May be device name or file path depending on scheme.
const char* roc::address::IoUri::scheme | ( | ) | const |
URI scheme. May be "file" or device type, e.g. "alsa".
ROC_ATTR_NODISCARD bool roc::address::IoUri::set_encoded_path | ( | const char * | str, |
size_t | str_len | ||
) |
Set URI path. String should be percent-encoded. String should not be zero-terminated.
ROC_ATTR_NODISCARD bool roc::address::IoUri::set_scheme | ( | const char * | str, |
size_t | str_len | ||
) |
Set URI scheme. String should not be zero-terminated.