Index: source/ariba/communication/EndpointDescriptor.h
===================================================================
--- source/ariba/communication/EndpointDescriptor.h	(revision 4986)
+++ source/ariba/communication/EndpointDescriptor.h	(revision 5284)
@@ -40,14 +40,22 @@
 #define ENDPOINTDESCRIPTOR_H_
 
+// deprecated
+//#include "ariba/communication/modules/network/ip/IPv4Locator.h"
+
+// deprecated
+//using ariba::utility::Locator;
+//using ariba::communication::IPv4Locator;
+
+// typical types
 #include "ariba/utility/types.h"
 #include "ariba/utility/serialization.h"
-#include "ariba/communication/modules/network/ip/IPv4Locator.h"
+
+// new addressing and transport
+#include "ariba/utility/addressing/addressing.hpp"
+#include "ariba/utility/transport/transport.hpp"
+
+// stdlibc++
 #include <string>
 #include <set>
-
-using std::string;
-using std::set;
-using ariba::utility::Locator;
-using ariba::communication::IPv4Locator;
 
 namespace ariba {
@@ -55,58 +63,90 @@
 
 using_serialization;
+using namespace std;
+using namespace ariba::addressing;
 
-class EndpointDescriptor : public VSerializeable {
-	VSERIALIZEABLE;
-
+class EndpointDescriptor: public VSerializeable { VSERIALIZEABLE
 	friend class BaseCommunication;
 
 public:
-	/**
-	 * The default constructor.
-	 */
-	EndpointDescriptor();
+	/// the unspecified endpoint descriptor
+	static const EndpointDescriptor UNSPECIFIED;
 
-	EndpointDescriptor(const EndpointDescriptor& rh);
-	EndpointDescriptor(const Locator* _locator);
-	EndpointDescriptor(const string str);
+	/// creates an empty endpoint descriptor with zero endpoints
+	EndpointDescriptor() : endpoints() {
+	}
 
-	/**
-	 * The destructor.
-	 */
+	/// destructor.
 	virtual ~EndpointDescriptor();
 
-	/**
-	 * An unspecified end-point
-	 */
-	static const EndpointDescriptor UNSPECIFIED;
+	/// copy constructor
+	EndpointDescriptor(const EndpointDescriptor& rh) :
+		endpoints(rh.endpoints) {
+	}
 
-	/**
-	 * Returns true, if the descriptor is unspecified.
-	 *
-	 * @return True, if the descriptor is unspecified.
-	 */
-	bool isUnspecified() const;
+	/// construct end-points from an endpoint set
+	EndpointDescriptor(const endpoint_set& endpoints ) :
+		endpoints(endpoints) {
+	}
 
-	virtual string toString() const;
-	static EndpointDescriptor* fromString( string str );
+	/// construct end-points from a string
+	EndpointDescriptor(const string& str) : endpoints(str) {
+	}
 
-	bool operator==( const EndpointDescriptor& rh ) const;
-	bool operator!=( const EndpointDescriptor& rh ) const;
+	/// convert end-points to string
+	string toString() const {
+		return endpoints.to_string();
+	}
+
+	/// returns true, if this object is the unspecified object
+	bool isUnspecified() const {
+		return this == &UNSPECIFIED;
+	}
+
+	/// create endpoint
+	static EndpointDescriptor* fromString(string str) {
+		return new EndpointDescriptor(str);
+	}
+
+	bool operator==(const EndpointDescriptor& rh) const {
+		if (rh.isUnspecified() && isUnspecified()) return true;
+		return false;
+	}
+
+	bool operator!=(const EndpointDescriptor& rh) const {
+		if (!rh.isUnspecified() && !isUnspecified()) return true;
+		return false;
+	}
+
+	EndpointDescriptor& operator=( const EndpointDescriptor& rhs) {
+		endpoints = rhs.endpoints;
+	}
+
+	/// returns the end-points of this descriptor
+	endpoint_set& getEndpoints() {
+		return endpoints;
+	}
+
+	/// returns the end-points of this descriptor
+	const endpoint_set& getEndpoints() const {
+		return endpoints;
+	}
 
 private:
-	bool isUnspec;
-	IPv4Locator* locator;
+	endpoint_set endpoints;
 };
 
 }} // namespace ariba, communication
 
-sznBeginDefault( ariba::communication::EndpointDescriptor, X ) {
-	uint8_t unspec = isUnspec;
-
-	X && unspec && VO(locator);
-
-	// when deserializing reset unspec flag
-	if (X.isDeserializer()) isUnspec = unspec;
-} sznEnd();
+sznBeginDefault( ariba::communication::EndpointDescriptor, X ){
+	// serialize endpoints
+	uint16_t len = endpoints.to_bytes_size();
+	X && len;
+	uint8_t* buffer = X.bytes( len );
+	if (buffer!=NULL) {
+		if (X.isDeserializer()) endpoints.assign(buffer,len);
+		else endpoints.to_bytes(buffer);
+	}
+}sznEnd();
 
 #endif /*ENDPOINTDESCRIPTOR_H_*/
