summaryrefslogtreecommitdiff
path: root/cpp/include/qpid/Url.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/include/qpid/Url.h')
-rw-r--r--cpp/include/qpid/Url.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/include/qpid/Url.h b/cpp/include/qpid/Url.h
index 915b08ac5f..b3ff9576e2 100644
--- a/cpp/include/qpid/Url.h
+++ b/cpp/include/qpid/Url.h
@@ -39,7 +39,7 @@ struct Url : public std::vector<Address> {
* on a multi-homed host. */
QPID_COMMON_EXTERN static Url getIpAddressesUrl(uint16_t port);
- struct Invalid : public Exception { Invalid(const std::string& s); };
+ struct Invalid : public Exception { QPID_COMMON_EXTERN Invalid(const std::string& s); };
/** Convert to string form. */
QPID_COMMON_EXTERN std::string str() const;
@@ -52,6 +52,8 @@ struct Url : public std::vector<Address> {
/** Parse url, throw Invalid if invalid. */
explicit Url(const std::string& url) { parse(url.c_str()); }
+ /** Parse url, throw Invalid if invalid. */
+ explicit Url(const std::string& url, const std::string& defaultProtocol) { parse(url.c_str(), defaultProtocol); }
/** Parse url, throw Invalid if invalid. */
explicit Url(const char* url) { parse(url); }
@@ -66,10 +68,12 @@ struct Url : public std::vector<Address> {
*@exception Invalid if the url is invalid.
*/
QPID_COMMON_EXTERN void parse(const char* url);
+ QPID_COMMON_EXTERN void parse(const char* url, const std::string& defaultProtocol);
QPID_COMMON_INLINE_EXTERN void parse(const std::string& url) { parse(url.c_str()); }
/** Replace contesnts with parsed URL. Replace with empty URL if invalid. */
QPID_COMMON_EXTERN void parseNoThrow(const char* url);
+ QPID_COMMON_EXTERN void parseNoThrow(const char* url, const std::string& defaultProtocol);
/** Add a protocol tag to be recognzed in URLs.
* Only for use by protcol plug-in initializers.