Botan 3.6.1
Crypto and TLS for C&
Botan::URI Struct Reference

#include <uri.h>

Public Types

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

Public Member Functions

bool operator== (const URI &a) const
 
std::string to_string () const
 
 URI ()=default
 
 URI (Type xtype, std::string_view xhost, unsigned short xport)
 

Static Public Member Functions

static URI fromAny (std::string_view uri)
 
static URI fromDomain (std::string_view uri)
 
static URI fromIPv4 (std::string_view uri)
 
static URI fromIPv6 (std::string_view uri)
 

Public Attributes

const std::string host {}
 
const uint16_t port {}
 
const Type type {Type::NotSet}
 

Detailed Description

Definition at line 17 of file uri.h.

Member Enumeration Documentation

◆ Type

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

Definition at line 18 of file uri.h.

Constructor & Destructor Documentation

◆ URI() [1/2]

Botan::URI::URI ( )
default

◆ URI() [2/2]

Botan::URI::URI ( Type xtype,
std::string_view xhost,
unsigned short xport )
inline

Definition at line 30 of file uri.h.

30: type{xtype}, host{xhost}, port{xport} {}
const Type type
Definition uri.h:36
const uint16_t port
Definition uri.h:38
const std::string host
Definition uri.h:37

Member Function Documentation

◆ fromAny()

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

Definition at line 183 of file uri.cpp.

183 {
184 throw Not_Implemented("No socket support enabled in build");
185}

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

◆ fromDomain()

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

Definition at line 171 of file uri.cpp.

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

◆ fromIPv4()

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

Definition at line 175 of file uri.cpp.

175 {
176 throw Not_Implemented("No socket support enabled in build");
177}

◆ fromIPv6()

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

Definition at line 179 of file uri.cpp.

179 {
180 throw Not_Implemented("No socket support enabled in build");
181}

◆ operator==()

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

Definition at line 32 of file uri.h.

32{ return type == a.type && host == a.host && port == a.port; }

References host, port, and type.

◆ to_string()

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

Member Data Documentation

◆ host

const std::string Botan::URI::host {}

Definition at line 37 of file uri.h.

37{};

Referenced by operator==().

◆ port

const uint16_t Botan::URI::port {}

Definition at line 38 of file uri.h.

38{};

Referenced by operator==().

◆ type

const Type Botan::URI::type {Type::NotSet}

Definition at line 36 of file uri.h.

Referenced by operator==().


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