From 5f585a7a4685612017195b510f9e22b4b16136da Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Wed, 29 Feb 2012 16:10:06 +0000 Subject: QPID-3832: Restore transport option for connection (as default for urls that don't specify one explicitly) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1295172 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/include/qpid/Url.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cpp/include') diff --git a/cpp/include/qpid/Url.h b/cpp/include/qpid/Url.h index 915b08ac5f..6dc7c787ee 100644 --- a/cpp/include/qpid/Url.h +++ b/cpp/include/qpid/Url.h @@ -52,6 +52,8 @@ struct Url : public std::vector
{ /** 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
{ *@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. -- cgit v1.2.1