diff options
| author | Gordon Sim <gsim@apache.org> | 2012-02-29 16:10:06 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2012-02-29 16:10:06 +0000 |
| commit | 5f585a7a4685612017195b510f9e22b4b16136da (patch) | |
| tree | e71c17d39b69c1492e551f5602baaf587ccad733 /cpp/include | |
| parent | d962e373fd0b7884e9e2b22aa340f779a0583b74 (diff) | |
| download | qpid-python-5f585a7a4685612017195b510f9e22b4b16136da.tar.gz | |
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
Diffstat (limited to 'cpp/include')
| -rw-r--r-- | cpp/include/qpid/Url.h | 4 |
1 files changed, 4 insertions, 0 deletions
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<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. |
