Botan 2.19.1
Crypto and TLS for C&
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
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, const std::string &xhost, unsigned short xport)
 

Static Public Member Functions

static URI fromAny (const std::string &uri)
 
static URI fromDomain (const std::string &uri)
 
static URI fromIPv4 (const std::string &uri)
 
static URI fromIPv6 (const std::string &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 19 of file uri.h.

20 {
21 NotSet,
22 IPv4,
23 IPv6,
24 Domain,
25 };

Constructor & Destructor Documentation

◆ URI() [1/2]

Botan::URI::URI ( )
default

◆ URI() [2/2]

Botan::URI::URI ( Type  xtype,
const std::string &  xhost,
unsigned short  xport 
)
inline

Definition at line 31 of file uri.h.

32 : type { xtype }
33 , host { xhost }
34 , port { xport }
35 {}
const Type type
Definition: uri.h:42
const uint16_t port
Definition: uri.h:44
const std::string host
Definition: uri.h:43

Member Function Documentation

◆ fromAny()

URI Botan::URI::fromAny ( const std::string &  uri)
static

Definition at line 184 of file uri.cpp.

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

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

◆ fromDomain()

URI Botan::URI::fromDomain ( const std::string &  uri)
static

Definition at line 181 of file uri.cpp.

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

◆ fromIPv4()

URI Botan::URI::fromIPv4 ( const std::string &  uri)
static

Definition at line 182 of file uri.cpp.

182{throw Not_Implemented("No socket support enabled in build");}

◆ fromIPv6()

URI Botan::URI::fromIPv6 ( const std::string &  uri)
static

Definition at line 183 of file uri.cpp.

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

◆ operator==()

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

Definition at line 36 of file uri.h.

37 {
38 return type == a.type && host == a.host && port == a.port;
39 }

References host, port, type, and type.

◆ to_string()

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

Member Data Documentation

◆ host

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

Definition at line 43 of file uri.h.

Referenced by operator==().

◆ port

const uint16_t Botan::URI::port {}

Definition at line 44 of file uri.h.

Referenced by operator==().

◆ type

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

Definition at line 42 of file uri.h.

Referenced by operator==().


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