Botan 3.7.1
Crypto and TLS for C&
Botan::URI Class Reference

#include <uri.h>

Public Types

enum class  Type : uint8_t { IPv4 , IPv6 , Domain }
 

Public Member Functions

const std::string & host () const
 
bool operator== (const URI &a) const
 
uint16_t port () const
 
std::string to_string () const
 
Type type () const
 
 URI (Type type, std::string_view host, uint16_t port)
 

Static Public Member Functions

static URI from_any (std::string_view uri)
 
static URI from_domain (std::string_view uri)
 
static URI from_ipv4 (std::string_view uri)
 
static URI from_ipv6 (std::string_view uri)
 

Detailed Description

Definition at line 18 of file uri.h.

Member Enumeration Documentation

◆ Type

enum class Botan::URI::Type : uint8_t
strong
Enumerator
IPv4 
IPv6 
Domain 

Definition at line 20 of file uri.h.

20 : uint8_t {
21 IPv4,
22 IPv6,
23 Domain,
24 };

Constructor & Destructor Documentation

◆ URI()

Botan::URI::URI ( Type type,
std::string_view host,
uint16_t port )
inline

Definition at line 31 of file uri.h.

31: m_type(type), m_host(host), m_port(port) {}
uint16_t port() const
Definition uri.h:39
Type type() const
Definition uri.h:41
const std::string & host() const
Definition uri.h:37

Member Function Documentation

◆ from_any()

URI Botan::URI::from_any ( std::string_view uri)
static

Definition at line 172 of file uri.cpp.

172 {
173 throw Not_Implemented("No socket support enabled in build");
174}

Referenced by Botan::OS::open_socket_udp().

◆ from_domain()

URI Botan::URI::from_domain ( std::string_view uri)
static

Definition at line 160 of file uri.cpp.

160 {
161 throw Not_Implemented("No socket support enabled in build");
162}

◆ from_ipv4()

URI Botan::URI::from_ipv4 ( std::string_view uri)
static

Definition at line 164 of file uri.cpp.

164 {
165 throw Not_Implemented("No socket support enabled in build");
166}

◆ from_ipv6()

URI Botan::URI::from_ipv6 ( std::string_view uri)
static

Definition at line 168 of file uri.cpp.

168 {
169 throw Not_Implemented("No socket support enabled in build");
170}

◆ host()

const std::string & Botan::URI::host ( ) const
inline

Definition at line 37 of file uri.h.

37{ return m_host; }

◆ operator==()

bool Botan::URI::operator== ( const URI & a) const
inline

Definition at line 33 of file uri.h.

33{ return m_type == a.m_type && m_host == a.m_host && m_port == a.m_port; }

◆ port()

uint16_t Botan::URI::port ( ) const
inline

Definition at line 39 of file uri.h.

39{ return m_port; }

◆ to_string()

std::string Botan::URI::to_string ( ) const

◆ type()

Type Botan::URI::type ( ) const
inline

Definition at line 41 of file uri.h.

41{ return m_type; }

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