26 #include "./error.hpp"
39 PN_CPP_EXTERN
explicit url_error(
const std::string&);
57 static const std::string
AMQP;
67 PN_CPP_EXTERN
url(
const std::string& url_str);
78 PN_CPP_EXTERN
url(
const std::string& url_str,
bool defaults);
82 PN_CPP_EXTERN
url(
const url&);
90 PN_CPP_EXTERN
bool empty()
const;
93 PN_CPP_EXTERN
operator std::string()
const;
100 PN_CPP_EXTERN std::string
scheme()
const;
102 PN_CPP_EXTERN std::string
user()
const;
105 PN_CPP_EXTERN std::string
password()
const;
107 PN_CPP_EXTERN std::string
host()
const;
109 PN_CPP_EXTERN std::string
port()
const;
111 PN_CPP_EXTERN uint16_t
port_int()
const;
113 PN_CPP_EXTERN std::string
host_port()
const;
118 PN_CPP_EXTERN std::string
path()
const;
127 friend PN_CPP_EXTERN std::ostream&
operator<<(std::ostream&,
const url&);
135 friend PN_CPP_EXTERN std::istream& operator>>(std::istream&,
url&);
142 #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:57
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:35
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 Proton URL.
Definition: url.hpp:55
std::string user() const
The user name for authentication.
Forward declarations for all the C++ types used by Proton to represent AMQP types.
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.
static const std::string AMQPS
"amqps" prefix
Definition: url.hpp:58