16#ifndef __Ice_Endpoint_h__
17#define __Ice_Endpoint_h__
34#ifndef ICE_IGNORE_VERSION
35# if ICE_INT_VERSION / 100 != 307
36# error Ice version mismatch!
38# if ICE_INT_VERSION % 100 >= 50
39# error Beta header file detected
41# if ICE_INT_VERSION % 100 < 11
42# error Ice patch level mismatch!
47# if defined(ICE_STATIC_LIBS)
49# elif defined(ICE_API_EXPORTS)
50# define ICE_API ICE_DECLSPEC_EXPORT
52# define ICE_API ICE_DECLSPEC_IMPORT
56#ifdef ICE_CPP11_MAPPING
158 virtual short type() const noexcept = 0;
170 virtual
bool secure() const noexcept = 0;
206 virtual ::std::string
toString() const noexcept = 0;
436using EndpointInfoPtr = ::std::shared_ptr<EndpointInfo>;
438using EndpointPtr = ::std::shared_ptr<Endpoint>;
440using IPEndpointInfoPtr = ::std::shared_ptr<IPEndpointInfo>;
442using TCPEndpointInfoPtr = ::std::shared_ptr<TCPEndpointInfo>;
444using UDPEndpointInfoPtr = ::std::shared_ptr<UDPEndpointInfo>;
446using WSEndpointInfoPtr = ::std::shared_ptr<WSEndpointInfo>;
448using OpaqueEndpointInfoPtr = ::std::shared_ptr<OpaqueEndpointInfo>;
460ICE_API LocalObject* upCast(EndpointInfo*);
462typedef ::IceInternal::Handle< EndpointInfo> EndpointInfoPtr;
466ICE_API LocalObject* upCast(Endpoint*);
468typedef ::IceInternal::Handle< Endpoint> EndpointPtr;
472ICE_API LocalObject* upCast(IPEndpointInfo*);
474typedef ::IceInternal::Handle< IPEndpointInfo> IPEndpointInfoPtr;
476class TCPEndpointInfo;
478ICE_API LocalObject* upCast(TCPEndpointInfo*);
480typedef ::IceInternal::Handle< TCPEndpointInfo> TCPEndpointInfoPtr;
482class UDPEndpointInfo;
484ICE_API LocalObject* upCast(UDPEndpointInfo*);
486typedef ::IceInternal::Handle< UDPEndpointInfo> UDPEndpointInfoPtr;
490ICE_API LocalObject* upCast(WSEndpointInfo*);
492typedef ::IceInternal::Handle< WSEndpointInfo> WSEndpointInfoPtr;
494class OpaqueEndpointInfo;
496ICE_API LocalObject* upCast(OpaqueEndpointInfo*);
498typedef ::IceInternal::Handle< OpaqueEndpointInfo> OpaqueEndpointInfoPtr;
559class ICE_API EndpointInfo :
public virtual LocalObject
563 typedef EndpointInfoPtr PointerType;
565 virtual ~EndpointInfo();
577 EndpointInfo(const ::Ice::EndpointInfoPtr& underlying,
::Ice::Int timeout,
bool compress) :
578 underlying(underlying),
584#ifdef ICE_CPP11_COMPILER
585 EndpointInfo(
const EndpointInfo&) =
default;
586 EndpointInfo& operator=(
const EndpointInfo&) =
default;
611 ::Ice::EndpointInfoPtr underlying;
625inline
bool operator==(const EndpointInfo& lhs, const EndpointInfo& rhs)
627 return static_cast<const LocalObject&
>(lhs) ==
static_cast<const LocalObject&
>(rhs);
630inline bool operator<(
const EndpointInfo& lhs,
const EndpointInfo& rhs)
632 return static_cast<const LocalObject&
>(lhs) <
static_cast<const LocalObject&
>(rhs);
640class ICE_API Endpoint :
public virtual LocalObject
644 typedef EndpointPtr PointerType;
648#ifdef ICE_CPP11_COMPILER
649 Endpoint() =
default;
650 Endpoint(
const Endpoint&) =
default;
651 Endpoint& operator=(
const Endpoint&) =
default;
658 virtual ::std::string toString() const
ICE_NOEXCEPT = 0;
664 virtual EndpointInfoPtr getInfo() const
ICE_NOEXCEPT = 0;
668inline
bool operator==(const Endpoint& lhs, const Endpoint& rhs)
670 return static_cast<const LocalObject&
>(lhs) ==
static_cast<const LocalObject&
>(rhs);
673inline bool operator<(
const Endpoint& lhs,
const Endpoint& rhs)
675 return static_cast<const LocalObject&
>(lhs) <
static_cast<const LocalObject&
>(rhs);
684class ICE_API IPEndpointInfo :
public EndpointInfo
688 typedef IPEndpointInfoPtr PointerType;
690 virtual ~IPEndpointInfo();
705 IPEndpointInfo(const ::Ice::EndpointInfoPtr& underlying,
::Ice::Int timeout,
bool compress, const ::std::string& host,
::Ice::Int port, const ::std::string& sourceAddress) :
706 ::Ice::EndpointInfo(underlying, timeout, compress),
709 sourceAddress(sourceAddress)
713#ifdef ICE_CPP11_COMPILER
714 IPEndpointInfo(
const IPEndpointInfo&) =
default;
715 IPEndpointInfo& operator=(
const IPEndpointInfo&) =
default;
729 ::std::string sourceAddress;
733inline bool operator==(
const IPEndpointInfo& lhs,
const IPEndpointInfo& rhs)
735 return static_cast<const LocalObject&
>(lhs) ==
static_cast<const LocalObject&
>(rhs);
738inline bool operator<(
const IPEndpointInfo& lhs,
const IPEndpointInfo& rhs)
740 return static_cast<const LocalObject&
>(lhs) <
static_cast<const LocalObject&
>(rhs);
749class ICE_API TCPEndpointInfo :
public IPEndpointInfo
753 typedef TCPEndpointInfoPtr PointerType;
755 virtual ~TCPEndpointInfo();
770 TCPEndpointInfo(const ::Ice::EndpointInfoPtr& underlying,
::Ice::Int timeout,
bool compress, const ::std::string& host,
::Ice::Int port, const ::std::string& sourceAddress) :
771 ::Ice::IPEndpointInfo(underlying, timeout, compress, host, port, sourceAddress)
775#ifdef ICE_CPP11_COMPILER
776 TCPEndpointInfo(
const TCPEndpointInfo&) =
default;
777 TCPEndpointInfo& operator=(
const TCPEndpointInfo&) =
default;
782inline bool operator==(
const TCPEndpointInfo& lhs,
const TCPEndpointInfo& rhs)
784 return static_cast<const LocalObject&
>(lhs) ==
static_cast<const LocalObject&
>(rhs);
787inline bool operator<(
const TCPEndpointInfo& lhs,
const TCPEndpointInfo& rhs)
789 return static_cast<const LocalObject&
>(lhs) <
static_cast<const LocalObject&
>(rhs);
798class ICE_API UDPEndpointInfo :
public IPEndpointInfo
802 typedef UDPEndpointInfoPtr PointerType;
804 virtual ~UDPEndpointInfo();
821 UDPEndpointInfo(const ::Ice::EndpointInfoPtr& underlying,
::Ice::Int timeout,
bool compress, const ::std::string& host,
::Ice::Int port, const ::std::string& sourceAddress, const ::std::string& mcastInterface,
::Ice::Int mcastTtl) :
822 ::Ice::IPEndpointInfo(underlying, timeout, compress, host, port, sourceAddress),
823 mcastInterface(mcastInterface),
828#ifdef ICE_CPP11_COMPILER
829 UDPEndpointInfo(
const UDPEndpointInfo&) =
default;
830 UDPEndpointInfo& operator=(
const UDPEndpointInfo&) =
default;
836 ::std::string mcastInterface;
844inline bool operator==(
const UDPEndpointInfo& lhs,
const UDPEndpointInfo& rhs)
846 return static_cast<const LocalObject&
>(lhs) ==
static_cast<const LocalObject&
>(rhs);
849inline bool operator<(
const UDPEndpointInfo& lhs,
const UDPEndpointInfo& rhs)
851 return static_cast<const LocalObject&
>(lhs) <
static_cast<const LocalObject&
>(rhs);
859class ICE_API WSEndpointInfo :
public EndpointInfo
863 typedef WSEndpointInfoPtr PointerType;
865 virtual ~WSEndpointInfo();
878 WSEndpointInfo(const ::Ice::EndpointInfoPtr& underlying,
::Ice::Int timeout,
bool compress, const ::std::string& resource) :
879 ::Ice::EndpointInfo(underlying, timeout, compress),
884#ifdef ICE_CPP11_COMPILER
885 WSEndpointInfo(
const WSEndpointInfo&) =
default;
886 WSEndpointInfo& operator=(
const WSEndpointInfo&) =
default;
892 ::std::string resource;
896inline bool operator==(
const WSEndpointInfo& lhs,
const WSEndpointInfo& rhs)
898 return static_cast<const LocalObject&
>(lhs) ==
static_cast<const LocalObject&
>(rhs);
901inline bool operator<(
const WSEndpointInfo& lhs,
const WSEndpointInfo& rhs)
903 return static_cast<const LocalObject&
>(lhs) <
static_cast<const LocalObject&
>(rhs);
912class ICE_API OpaqueEndpointInfo :
public EndpointInfo
916 typedef OpaqueEndpointInfoPtr PointerType;
918 virtual ~OpaqueEndpointInfo();
932 OpaqueEndpointInfo(const ::Ice::EndpointInfoPtr& underlying,
::Ice::Int timeout,
bool compress, const ::Ice::EncodingVersion& rawEncoding, const ::Ice::ByteSeq& rawBytes) :
933 ::Ice::EndpointInfo(underlying, timeout, compress),
934 rawEncoding(rawEncoding),
939#ifdef ICE_CPP11_COMPILER
940 OpaqueEndpointInfo(
const OpaqueEndpointInfo&) =
default;
941 OpaqueEndpointInfo& operator=(
const OpaqueEndpointInfo&) =
default;
948 ::Ice::EncodingVersion rawEncoding;
956inline bool operator==(
const OpaqueEndpointInfo& lhs,
const OpaqueEndpointInfo& rhs)
958 return static_cast<const LocalObject&
>(lhs) ==
static_cast<const LocalObject&
>(rhs);
961inline bool operator<(
const OpaqueEndpointInfo& lhs,
const OpaqueEndpointInfo& rhs)
963 return static_cast<const LocalObject&
>(lhs) <
static_cast<const LocalObject&
>(rhs);
#define ICE_API
Definition Config.h:197
#define ICE_NOEXCEPT
Definition Config.h:128
#define ICE_MEMBER(API)
Definition Config.h:177
#define ICE_CLASS(API)
Definition Config.h:176
Base class providing access to the endpoint details.
Definition Endpoint.h:129
int timeout
The timeout for the endpoint in milliseconds.
Definition Endpoint.h:181
EndpointInfo(const EndpointInfo &)=default
EndpointInfo & operator=(const EndpointInfo &)=default
virtual bool secure() const noexcept=0
Returns true if this endpoint is a secure endpoint.
virtual bool datagram() const noexcept=0
Returns true if this endpoint is a datagram endpoint.
virtual short type() const noexcept=0
Returns the type of the endpoint.
bool compress
Specifies whether or not compression should be used if available when using this endpoint.
Definition Endpoint.h:186
::std::shared_ptr<::Ice::EndpointInfo > underlying
The information of the underyling endpoint of null if there's no underlying endpoint.
Definition Endpoint.h:176
EndpointInfo(const ::std::shared_ptr<::Ice::EndpointInfo > &underlying, int timeout, bool compress)
One-shot constructor to initialize all data members.
Definition Endpoint.h:147
EndpointInfo & operator=(EndpointInfo &&)=default
EndpointInfo(EndpointInfo &&)=default
The user-level interface to an endpoint.
Definition Endpoint.h:194
virtual bool operator<(const Endpoint &) const =0
virtual bool operator==(const Endpoint &) const =0
virtual ::std::shared_ptr<::Ice::EndpointInfo > getInfo() const noexcept=0
Returns the endpoint information.
virtual::std::string toString() const noexcept=0
Return a string representation of the endpoint.
Provides access to the address details of a IP endpoint.
Definition Endpoint.h:221
int port
The port number.
Definition Endpoint.h:257
IPEndpointInfo(const ::std::shared_ptr<::Ice::EndpointInfo > &underlying, int timeout, bool compress, const ::std::string &host, int port, const ::std::string &sourceAddress)
One-shot constructor to initialize all data members.
Definition Endpoint.h:242
IPEndpointInfo & operator=(IPEndpointInfo &&)=default
IPEndpointInfo(const IPEndpointInfo &)=default
IPEndpointInfo(IPEndpointInfo &&)=default
::std::string sourceAddress
The source IP address.
Definition Endpoint.h:261
::std::string host
The host or address configured with the endpoint.
Definition Endpoint.h:253
virtual ~IPEndpointInfo()
IPEndpointInfo & operator=(const IPEndpointInfo &)=default
Provides access to the details of an opaque endpoint.
Definition Endpoint.h:385
::Ice::ByteSeq rawBytes
The raw encoding of the opaque endpoint.
Definition Endpoint.h:420
::Ice::EncodingVersion rawEncoding
The encoding version of the opaque endpoint (to decode or encode the rawBytes).
Definition Endpoint.h:416
OpaqueEndpointInfo(const OpaqueEndpointInfo &)=default
OpaqueEndpointInfo(const ::std::shared_ptr<::Ice::EndpointInfo > &underlying, int timeout, bool compress, const ::Ice::EncodingVersion &rawEncoding, const ::Ice::ByteSeq &rawBytes)
One-shot constructor to initialize all data members.
Definition Endpoint.h:405
OpaqueEndpointInfo()=default
OpaqueEndpointInfo & operator=(OpaqueEndpointInfo &&)=default
OpaqueEndpointInfo(OpaqueEndpointInfo &&)=default
OpaqueEndpointInfo & operator=(const OpaqueEndpointInfo &)=default
virtual ~OpaqueEndpointInfo()
Provides access to a TCP endpoint information.
Definition Endpoint.h:270
TCPEndpointInfo(const TCPEndpointInfo &)=default
virtual ~TCPEndpointInfo()
TCPEndpointInfo()=default
TCPEndpointInfo & operator=(const TCPEndpointInfo &)=default
TCPEndpointInfo(const ::std::shared_ptr<::Ice::EndpointInfo > &underlying, int timeout, bool compress, const ::std::string &host, int port, const ::std::string &sourceAddress)
One-shot constructor to initialize all data members.
Definition Endpoint.h:291
TCPEndpointInfo & operator=(TCPEndpointInfo &&)=default
TCPEndpointInfo(TCPEndpointInfo &&)=default
Provides access to an UDP endpoint information.
Definition Endpoint.h:303
UDPEndpointInfo(const ::std::shared_ptr<::Ice::EndpointInfo > &underlying, int timeout, bool compress, const ::std::string &host, int port, const ::std::string &sourceAddress, const ::std::string &mcastInterface, int mcastTtl)
One-shot constructor to initialize all data members.
Definition Endpoint.h:326
UDPEndpointInfo & operator=(const UDPEndpointInfo &)=default
int mcastTtl
The multicast time-to-live (or hops).
Definition Endpoint.h:340
UDPEndpointInfo & operator=(UDPEndpointInfo &&)=default
::std::string mcastInterface
The multicast interface.
Definition Endpoint.h:336
UDPEndpointInfo(const UDPEndpointInfo &)=default
UDPEndpointInfo()=default
UDPEndpointInfo(UDPEndpointInfo &&)=default
virtual ~UDPEndpointInfo()
Provides access to a WebSocket endpoint information.
Definition Endpoint.h:348
WSEndpointInfo & operator=(const WSEndpointInfo &)=default
WSEndpointInfo(const ::std::shared_ptr<::Ice::EndpointInfo > &underlying, int timeout, bool compress, const ::std::string &resource)
One-shot constructor to initialize all data members.
Definition Endpoint.h:367
::std::string resource
The URI configured with the endpoint.
Definition Endpoint.h:376
virtual ~WSEndpointInfo()
WSEndpointInfo & operator=(WSEndpointInfo &&)=default
WSEndpointInfo(WSEndpointInfo &&)=default
WSEndpointInfo(const WSEndpointInfo &)=default
Definition BuiltinSequences.h:56
int Int
The mapping for the Slice int type.
Definition Config.h:54
::std::vector< Byte > ByteSeq
A sequence of bytes.
Definition BuiltinSequences.h:66
constexpr short BTEndpointType
Uniquely identifies Bluetooth endpoints.
Definition Endpoint.h:102
constexpr short WSSEndpointType
Uniquely identifies SSL-based WebSocket endpoints.
Definition Endpoint.h:97
constexpr short iAPSEndpointType
Uniquely identifies SSL iAP-based endpoints.
Definition Endpoint.h:117
constexpr short iAPEndpointType
Uniquely identifies iAP-based endpoints.
Definition Endpoint.h:112
bool operator<(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition Comparable.h:136
short Short
The mapping for the Slice short type.
Definition Config.h:52
constexpr short UDPEndpointType
Uniquely identifies UDP endpoints.
Definition Endpoint.h:87
constexpr short WSEndpointType
Uniquely identifies TCP-based WebSocket endpoints.
Definition Endpoint.h:92
constexpr short BTSEndpointType
Uniquely identifies SSL Bluetooth endpoints.
Definition Endpoint.h:107
bool operator==(const C &lhs, const C &rhs)
Relational operator for generated structs and classes.
Definition Comparable.h:184
constexpr short SSLEndpointType
Uniquely identifies SSL endpoints.
Definition Endpoint.h:82
constexpr short TCPEndpointType
Uniquely identifies TCP endpoints.
Definition Endpoint.h:77
A version structure for the encoding version.
Definition Version.h:82