summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/Url.h
diff options
context:
space:
mode:
authorStephen D. Huston <shuston@apache.org>2008-10-09 15:20:49 +0000
committerStephen D. Huston <shuston@apache.org>2008-10-09 15:20:49 +0000
commit0b195851725cd2b0982d26a108e7239eca6b2052 (patch)
tree0eeaa66dc3daa0147c92995cda6b0f014ac8c512 /cpp/src/qpid/Url.h
parentbfa255f4fd7a67f1433b424913515633d7e58c2f (diff)
downloadqpid-python-0b195851725cd2b0982d26a108e7239eca6b2052.tar.gz
Make Address/TcpAddress manipulation portable; extend SystemInfo functions to Windows; resolves QPID-1325
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@703179 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/Url.h')
-rw-r--r--cpp/src/qpid/Url.h23
1 files changed, 1 insertions, 22 deletions
diff --git a/cpp/src/qpid/Url.h b/cpp/src/qpid/Url.h
index 67c8a861aa..0946b97490 100644
--- a/cpp/src/qpid/Url.h
+++ b/cpp/src/qpid/Url.h
@@ -19,8 +19,8 @@
*
*/
+#include "qpid/Address.h"
#include "qpid/Exception.h"
-#include <boost/variant.hpp>
#include <string>
#include <vector>
#include <new>
@@ -28,29 +28,8 @@
namespace qpid {
-/** TCP address of a broker - host:port */
-struct TcpAddress {
- static const uint16_t DEFAULT_PORT=5672;
- explicit TcpAddress(const std::string& host_=std::string(),
- uint16_t port_=DEFAULT_PORT)
- : host(host_), port(port_) {}
- std::string host;
- uint16_t port;
-};
-
-inline bool operator==(const TcpAddress& x, const TcpAddress& y) {
- return y.host==x.host && y.port == x.port;
-}
-
std::ostream& operator<<(std::ostream& os, const TcpAddress& a);
-/** Address is a variant of all address types, more coming in future. */
-struct Address : public boost::variant<TcpAddress> {
- template <class T> Address(const T& t) : boost::variant<TcpAddress>(t) {}
- template <class T> T* get() { return boost::get<T>(this); }
- template <class T> const T* get() const { return boost::get<T>(this); }
-};
-
/** An AMQP URL contains a list of addresses */
struct Url : public std::vector<Address> {