Botan  2.15.0
Crypto and TLS for C++11
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  Type : uint8_t { Type::NotSet, Type::IPv4, Type::IPv6, Type::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 Botan::URI::Type : uint8_t
strong
Enumerator
NotSet 
IPv4 
IPv6 
Domain 

Definition at line 19 of file uri.h.

19  : uint8_t
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 std::string host
Definition: uri.h:43
const uint16_t port
Definition: uri.h:44
const Type type
Definition: uri.h:42

Member Function Documentation

◆ fromAny()

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

Definition at line 184 of file uri.cpp.

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

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

◆ 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.

References host, port, type, and type.

37  {
38  return type == a.type && host == a.host && port == a.port;
39  }
const std::string host
Definition: uri.h:43
const uint16_t port
Definition: uri.h:44
const Type type
Definition: uri.h:42

◆ 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: