From 8945f4cbf70146400dbd28a0695a4cd268a80eee Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Mon, 17 May 2010 15:34:14 +0000 Subject: 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 --- cpp/include/qpid/Url.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'cpp/include') 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
{ /** Parse url, throw Invalid if invalid. */ explicit Url(const char* url) { parse(url); } - Url& operator=(const Url& u) { this->std::vector
::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
{ */ 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 protocols; + + mutable std::string cache; // cache string form for efficiency. + std::string user, pass; + friend class UrlParser; }; -- cgit v1.2.1