![]() |
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Network endpoint URI. More...
#include <roc_address/endpoint_uri.h>

Public Types | |
| enum | Subset { Subset_Full , Subset_Resource } |
| URI subset. More... | |
Public Member Functions | |
| EndpointUri (core::IArena &) | |
| Initialize empty URI. | |
| bool | is_equal (const EndpointUri &other) const |
| Check if URI is equivalent to another URI. | |
| bool | assign (const EndpointUri &other) |
| Copy data from another URI. | |
| bool | verify (Subset subset) const |
| Check given subset of the URI. | |
| void | clear (Subset subset) |
| Clear given subset of the URI. | |
| void | invalidate (Subset subset) |
| Invalidate given subset of the URI. | |
| bool | set_proto (Protocol) |
| Set protocol ID (URI scheme). | |
| Protocol | proto () const |
| Protocol ID (URI scheme). | |
| bool | get_proto (Protocol &proto) const |
| Get protocol ID (URI scheme). | |
| bool | format_proto (core::StringBuilder &dst) const |
| Get URI proto. | |
| bool | set_host (const char *str) |
| Set URI host. String should be zero-terminated. | |
| bool | set_host (const char *str, size_t str_len) |
| Set URI host. String should not be zero-terminated. | |
| const char * | host () const |
| Hostname or IP address. | |
| bool | format_host (core::StringBuilder &dst) const |
| Get URI host. | |
| bool | set_port (int) |
| Set port. | |
| int | port () const |
| TCP or UDP port. | |
| bool | get_port (int &port) const |
| Get URI port. | |
| const char * | service () const |
| Get string representation of port. If port is not set, default port for the protocol is used. This string is suitable for passing to getaddrinfo(). | |
| bool | set_path (const char *str) |
| Set decoded URI path. | |
| bool | set_path (const char *str, size_t str_len) |
| Set decoded URI path. String should not be zero-terminated. | |
| bool | set_encoded_path (const char *str) |
| Set encoded URI path. String should be percent-encoded. | |
| bool | set_encoded_path (const char *str, size_t str_len) |
| Set encoded URI path. String should be percent-encoded. String should not be zero-terminated. | |
| const char * | path () const |
| Decoded path. | |
| bool | format_encoded_path (core::StringBuilder &dst) const |
| Get URI path. String will be percent-encoded. | |
| bool | set_encoded_query (const char *str) |
| Set query. String should be percent-encoded. | |
| bool | set_encoded_query (const char *str, size_t str_len) |
| Set query. String should be percent-encoded. String should not be zero-terminated. | |
| const char * | encoded_query () const |
| Raw query. | |
| bool | format_encoded_query (core::StringBuilder &dst) const |
| Get URI query. String will be percent-encoded. | |
Network endpoint URI.
Definition at line 27 of file endpoint_uri.h.
URI subset.
| Enumerator | |
|---|---|
| Subset_Full | Entire URI. |
| Subset_Resource | Absolute path and query. |
Definition at line 30 of file endpoint_uri.h.
|
explicit |
Initialize empty URI.
| bool roc::address::EndpointUri::assign | ( | const EndpointUri & | other | ) |
Copy data from another URI.
| void roc::address::EndpointUri::clear | ( | Subset | subset | ) |
Clear given subset of the URI.
| const char * roc::address::EndpointUri::encoded_query | ( | ) | const |
Raw query.
| bool roc::address::EndpointUri::format_encoded_path | ( | core::StringBuilder & | dst | ) | const |
Get URI path. String will be percent-encoded.
| bool roc::address::EndpointUri::format_encoded_query | ( | core::StringBuilder & | dst | ) | const |
Get URI query. String will be percent-encoded.
| bool roc::address::EndpointUri::format_host | ( | core::StringBuilder & | dst | ) | const |
Get URI host.
| bool roc::address::EndpointUri::format_proto | ( | core::StringBuilder & | dst | ) | const |
Get URI proto.
| bool roc::address::EndpointUri::get_port | ( | int & | port | ) | const |
Get URI port.
| bool roc::address::EndpointUri::get_proto | ( | Protocol & | proto | ) | const |
Get protocol ID (URI scheme).
| const char * roc::address::EndpointUri::host | ( | ) | const |
Hostname or IP address.
| void roc::address::EndpointUri::invalidate | ( | Subset | subset | ) |
Invalidate given subset of the URI.
| bool roc::address::EndpointUri::is_equal | ( | const EndpointUri & | other | ) | const |
Check if URI is equivalent to another URI.
| const char * roc::address::EndpointUri::path | ( | ) | const |
Decoded path.
| int roc::address::EndpointUri::port | ( | ) | const |
TCP or UDP port.
| Protocol roc::address::EndpointUri::proto | ( | ) | const |
Protocol ID (URI scheme).
| const char * roc::address::EndpointUri::service | ( | ) | const |
Get string representation of port. If port is not set, default port for the protocol is used. This string is suitable for passing to getaddrinfo().
| bool roc::address::EndpointUri::set_encoded_path | ( | const char * | str | ) |
Set encoded URI path. String should be percent-encoded.
| bool roc::address::EndpointUri::set_encoded_path | ( | const char * | str, |
| size_t | str_len | ||
| ) |
Set encoded URI path. String should be percent-encoded. String should not be zero-terminated.
| bool roc::address::EndpointUri::set_encoded_query | ( | const char * | str | ) |
Set query. String should be percent-encoded.
| bool roc::address::EndpointUri::set_encoded_query | ( | const char * | str, |
| size_t | str_len | ||
| ) |
Set query. String should be percent-encoded. String should not be zero-terminated.
| bool roc::address::EndpointUri::set_host | ( | const char * | str | ) |
Set URI host. String should be zero-terminated.
| bool roc::address::EndpointUri::set_host | ( | const char * | str, |
| size_t | str_len | ||
| ) |
Set URI host. String should not be zero-terminated.
| bool roc::address::EndpointUri::set_path | ( | const char * | str | ) |
Set decoded URI path.
| bool roc::address::EndpointUri::set_path | ( | const char * | str, |
| size_t | str_len | ||
| ) |
Set decoded URI path. String should not be zero-terminated.
| bool roc::address::EndpointUri::set_port | ( | int | ) |
Set port.
| bool roc::address::EndpointUri::set_proto | ( | Protocol | ) |
Set protocol ID (URI scheme).
| bool roc::address::EndpointUri::verify | ( | Subset | subset | ) | const |
Check given subset of the URI.