Botan 2.13.0 Crypto and TLS for C++11

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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 type, const std::string &host, unsigned short port)

## 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

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

Botan::URI::URI | ( |  | ) |
| default

Botan::URI::URI | ( | Type | type,
|  | const std::string & | host,
|  | unsigned short | port
| ) |  |
| inline

Definition at line 31 of file uri.h.

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

## Member Function Documentation

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");}

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");}

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");}

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");}

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

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

## Member Data Documentation

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

Definition at line 43 of file uri.h.

Referenced by operator==().

const uint16_t Botan::URI::port {}

Definition at line 44 of file uri.h.

Referenced by operator==().

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:

- src/lib/utils/socket/uri.h
- src/lib/utils/socket/uri.cpp