25 #include "./internal/pn_unique_ptr.hpp" 26 #include "./error.hpp" 28 #include <proton/type_compat.h> 40 PN_CPP_EXTERN
explicit url_error(
const std::string&);
58 static const std::string
AMQP;
68 PN_CPP_EXTERN
url(
const std::string& url_str);
79 PN_CPP_EXTERN
url(
const std::string& url_str,
bool defaults);
83 PN_CPP_EXTERN
url(
const url&);
91 PN_CPP_EXTERN
bool empty()
const;
94 PN_CPP_EXTERN
operator std::string()
const;
101 PN_CPP_EXTERN std::string
scheme()
const;
103 PN_CPP_EXTERN std::string
user()
const;
106 PN_CPP_EXTERN std::string
password()
const;
108 PN_CPP_EXTERN std::string
host()
const;
110 PN_CPP_EXTERN std::string
port()
const;
112 PN_CPP_EXTERN uint16_t
port_int()
const;
114 PN_CPP_EXTERN std::string
host_port()
const;
119 PN_CPP_EXTERN std::string
path()
const;
128 internal::pn_unique_ptr<impl> impl_;
132 friend PN_CPP_EXTERN std::ostream&
operator<<(std::ostream&,
const url&);
140 friend PN_CPP_EXTERN std::istream& operator>>(std::istream&,
url&);
147 #endif // PROTON_URL_HPP std::string path() const
path is everything after the final "/".
std::ostream & operator<<(std::ostream &, const binary &)
Print a binary value.
static const std::string AMQP
"amqp" prefix
Definition: url.hpp:58
std::string host_port() const
host_port returns just the host:port part of the URL
std::string port() const
port can be a number or a symbolic name such as "amqp".
url & operator=(const url &)
Copy a URL.
An error encountered during URL parsing.
Definition: url.hpp:36
std::string scheme() const
amqp or amqps.
url(const std::string &url_str)
Parse url_str as an AMQP URL.
bool empty() const
True if the URL is empty.
std::string password() const
The password.
A URL parser.
Definition: url.hpp:56
std::string user() const
The user name for authentication.
friend std::string to_string(const url &)
Return URL as a string.
std::string host() const
The host name or IP address.
The base Proton error.
Definition: error.hpp:37
uint16_t port_int() const
port_int is the numeric value of the port.
The main Proton namespace.
Definition: annotation_key.hpp:30
static const std::string AMQPS
"amqps" prefix
Definition: url.hpp:59