12 #ifndef ROC_ADDRESS_IO_URI_H_
13 #define ROC_ADDRESS_IO_URI_H_
#define ROC_ATTR_NODISCARD
Emit warning if function result is not checked.
Audio file or device URI.
ROC_ATTR_NODISCARD bool format_encoded_path(core::StringBuilder &dst) const
Get URI path. String will be percent-encoded.
bool is_special_file() const
Returns true if the scheme is "file" and the path is "-".
bool is_file() const
Returns true if the scheme is "file".
void clear()
Clear all fields.
IoUri(core::IArena &)
Initialize empty URI.
bool is_valid() const
Returns true if the URI has all required fields (scheme and path).
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.
ROC_ATTR_NODISCARD bool set_scheme(const char *str, size_t str_len)
Set URI scheme. String should not be zero-terminated.
const char * scheme() const
URI scheme. May be "file" or device type, e.g. "alsa".
const char * path() const
URI path. May be device name or file path depending on scheme.
Base class for non-copyable objects.
bool parse_io_uri(const char *str, IoUri &result)
Parse IoUri from string.
bool format_io_uri(const IoUri &uri, core::StringBuilder &dst)
Format IoUri to string.
Commonly used types and functions.