diff options
| author | Alan Conway <aconway@apache.org> | 2010-05-17 15:34:14 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2010-05-17 15:34:14 +0000 |
| commit | 8945f4cbf70146400dbd28a0695a4cd268a80eee (patch) | |
| tree | 9d65d3aecdaec1ed470c99f150f88dc66d326de9 /cpp/include | |
| parent | f9f6f9e1a230643efd6eae08101731ccdbd562e5 (diff) | |
| download | qpid-python-8945f4cbf70146400dbd28a0695a4cd268a80eee.tar.gz | |
Added support for user/pass@ syntax in Url.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@945211 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/include')
| -rw-r--r-- | cpp/include/qpid/Url.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/cpp/include/qpid/Url.h b/cpp/include/qpid/Url.h index 5f6ff990ac..80931618ed 100644 --- a/cpp/include/qpid/Url.h +++ b/cpp/include/qpid/Url.h @@ -56,7 +56,6 @@ struct Url : public std::vector<Address> { /** Parse url, throw Invalid if invalid. */ explicit Url(const char* url) { parse(url); } - Url& operator=(const Url& u) { this->std::vector<Address>::operator=(u); cache=u.cache; return *this; } Url& operator=(const char* s) { parse(s); return *this; } Url& operator=(const std::string& s) { parse(s); return *this; } @@ -77,9 +76,17 @@ struct Url : public std::vector<Address> { */ QPID_COMMON_EXTERN static void addProtocol(const std::string& tag); + QPID_COMMON_EXTERN void setUser(const std::string&); + QPID_COMMON_EXTERN void setPass(const std::string&); + QPID_COMMON_EXTERN std::string getUser() const; + QPID_COMMON_EXTERN std::string getPass() const; + private: - mutable std::string cache; // cache string form for efficiency. static std::vector<std::string> protocols; + + mutable std::string cache; // cache string form for efficiency. + std::string user, pass; + friend class UrlParser; }; |
