24 #include "proton/error.hpp"
35 PN_CPP_EXTERN
explicit url_error(
const std::string&);
53 static const std::string
AMQP;
66 PN_CPP_EXTERN
url(
const std::string& url_str,
bool defaults=
true);
75 PN_CPP_EXTERN
url(
const char* url_str,
bool defaults=
true);
78 PN_CPP_EXTERN
url(
const url&);
86 PN_CPP_EXTERN
void parse(
const std::string&);
91 PN_CPP_EXTERN
void parse(
const char*);
94 PN_CPP_EXTERN
bool empty()
const;
97 PN_CPP_EXTERN std::string
str()
const;
103 PN_CPP_EXTERN std::string scheme()
const;
104 PN_CPP_EXTERN
void scheme(
const std::string&);
107 PN_CPP_EXTERN std::string username()
const;
108 PN_CPP_EXTERN
void username(
const std::string&);
111 PN_CPP_EXTERN std::string password()
const;
112 PN_CPP_EXTERN
void password(
const std::string&);
114 PN_CPP_EXTERN std::string host()
const;
115 PN_CPP_EXTERN
void host(
const std::string&);
117 PN_CPP_EXTERN
void port(
const std::string&);
118 PN_CPP_EXTERN std::string
port()
const;
120 PN_CPP_EXTERN uint16_t
port_int()
const;
122 PN_CPP_EXTERN std::string
host_port()
const;
125 PN_CPP_EXTERN std::string
path()
const;
126 PN_CPP_EXTERN
void path(
const std::string&);
133 PN_CPP_EXTERN
void defaults();
141 friend PN_CPP_EXTERN std::ostream& operator<<(std::ostream&,
const url&);
148 friend PN_CPP_EXTERN std::istream& operator>>(std::istream&,
url&);
std::string path() const
path is everything after the final "/".
std::string str() const
str returns the URL as a string
static const std::string AMQP
"amqp" prefix
Definition: url.hpp:53
std::string host_port() const
host_port returns just the host:port part of the URL
url & operator=(const url &)
Copy a URL.
Raised if URL parsing fails.
Definition: url.hpp:33
url()
Create an empty URL.
Defines C++ types representing AMQP types.
void parse(const std::string &)
Parse a string as a URL.
bool empty() const
True if the URL is empty.
A proton URL.
Definition: url.hpp:51
void port(const std::string &)
port can be a number or a symbolic name such as "amqp".
The base proton error.
Definition: error.hpp:37
uint16_t port_int() const
port_int is the numeric value of the port.
static const std::string AMQPS
"amqps" prefix
Definition: url.hpp:54