Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
Loading...
Searching...
No Matches
roc::address::IoUri Class Reference

Audio file or device URI. More...

#include <roc_address/io_uri.h>

Inheritance diagram for roc::address::IoUri:

Public Member Functions

 IoUri (core::IArena &)
 Initialize empty URI.
 
bool is_valid () const
 Returns true if the URI has all required fields (scheme and path).
 
bool is_file () const
 Returns true if the scheme is "file".
 
bool is_special_file () const
 Returns true if the scheme is "file" and the path is "-".
 
void clear ()
 Clear all fields.
 
const char * scheme () const
 URI scheme. May be "file" or device type, e.g. "alsa".
 
bool set_scheme (const char *str, size_t str_len)
 Set URI scheme. String should not be zero-terminated.
 
const char * path () const
 URI path. May be device name or file path depending on scheme.
 
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.
 
bool format_encoded_path (core::StringBuilder &dst) const
 Get URI path. String will be percent-encoded.
 

Detailed Description

Audio file or device URI.

Definition at line 25 of file io_uri.h.

Constructor & Destructor Documentation

◆ IoUri()

roc::address::IoUri::IoUri ( core::IArena )
explicit

Initialize empty URI.

Member Function Documentation

◆ clear()

void roc::address::IoUri::clear ( )

Clear all fields.

◆ format_encoded_path()

bool roc::address::IoUri::format_encoded_path ( core::StringBuilder dst) const

Get URI path. String will be percent-encoded.

◆ is_file()

bool roc::address::IoUri::is_file ( ) const

Returns true if the scheme is "file".

◆ is_special_file()

bool roc::address::IoUri::is_special_file ( ) const

Returns true if the scheme is "file" and the path is "-".

◆ is_valid()

bool roc::address::IoUri::is_valid ( ) const

Returns true if the URI has all required fields (scheme and path).

◆ path()

const char * roc::address::IoUri::path ( ) const

URI path. May be device name or file path depending on scheme.

◆ scheme()

const char * roc::address::IoUri::scheme ( ) const

URI scheme. May be "file" or device type, e.g. "alsa".

◆ set_encoded_path()

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.

◆ set_scheme()

bool roc::address::IoUri::set_scheme ( const char *  str,
size_t  str_len 
)

Set URI scheme. String should not be zero-terminated.


The documentation for this class was generated from the following file: