7#include "Ice/EndpointTypes.h"
8#include "Ice/Version.h"
14# pragma clang diagnostic push
15# pragma clang diagnostic ignored "-Wshadow-field-in-constructor"
16#elif defined(__GNUC__)
17# pragma GCC diagnostic push
18# pragma GCC diagnostic ignored "-Wshadow"
49 [[nodiscard]]
virtual std::string
toString() const noexcept = 0;
58 class ICE_API EndpointInfo
61 virtual ~EndpointInfo();
62 EndpointInfo(
const EndpointInfo&) =
delete;
63 EndpointInfo& operator=(
const EndpointInfo&) =
delete;
67 [[nodiscard]]
virtual std::int16_t
type() const noexcept;
71 [[nodiscard]] virtual
bool datagram() const noexcept;
75 [[nodiscard]] virtual
bool secure() const noexcept;
92 explicit EndpointInfo(
bool compress) : compress(compress) {}
98 class ICE_API IPEndpointInfo :
public EndpointInfo
101 IPEndpointInfo(
const IPEndpointInfo&) =
delete;
102 IPEndpointInfo& operator=(
const IPEndpointInfo&) =
delete;
104 ~IPEndpointInfo()
override;
129 class ICE_API TCPEndpointInfo final :
public IPEndpointInfo
132 ~TCPEndpointInfo()
final;
133 TCPEndpointInfo(
const TCPEndpointInfo&) =
delete;
134 TCPEndpointInfo& operator=(
const TCPEndpointInfo&) =
delete;
136 [[nodiscard]] std::int16_t
type() const noexcept final {
return _type; }
137 [[nodiscard]]
bool secure() const noexcept final {
return _secure; }
144 std::string sourceAddress,
147 :
IPEndpointInfo{compress, std::move(host), port, std::move(sourceAddress)},
154 const std::int16_t _type;
161 class ICE_API UDPEndpointInfo final :
public IPEndpointInfo
164 ~UDPEndpointInfo()
final;
165 UDPEndpointInfo(
const UDPEndpointInfo&) =
delete;
166 UDPEndpointInfo& operator=(
const UDPEndpointInfo&) =
delete;
175 [[nodiscard]]
bool datagram() const noexcept final {
return true; }
182 std::string sourceAddress,
183 std::string mcastInterface,
185 :
IPEndpointInfo{compress, std::move(host), port, std::move(sourceAddress)},
186 mcastInterface{std::move(mcastInterface)},
194 class ICE_API WSEndpointInfo final :
public EndpointInfo
197 ~WSEndpointInfo()
final;
198 WSEndpointInfo(
const WSEndpointInfo&) =
delete;
199 WSEndpointInfo& operator=(
const WSEndpointInfo&) =
delete;
214 class IAPEndpointInfo final :
public EndpointInfo
217 ~IAPEndpointInfo()
final;
218 IAPEndpointInfo(
const IAPEndpointInfo&) =
delete;
219 IAPEndpointInfo& operator=(
const IAPEndpointInfo&) =
delete;
221 [[nodiscard]] std::int16_t
type() const noexcept final {
return _type; }
222 [[nodiscard]]
bool secure() const noexcept final {
return _secure; }
256 const std::int16_t _type;
263 class ICE_API OpaqueEndpointInfo final :
public EndpointInfo
266 ~OpaqueEndpointInfo()
final;
267 OpaqueEndpointInfo(
const OpaqueEndpointInfo&) =
delete;
268 OpaqueEndpointInfo& operator=(
const OpaqueEndpointInfo&) =
delete;
270 [[nodiscard]] std::int16_t
type() const noexcept final {
return _type; }
280 : EndpointInfo{false},
292#if defined(__clang__)
293# pragma clang diagnostic pop
294#elif defined(__GNUC__)
295# pragma GCC diagnostic pop
virtual bool secure() const noexcept
Returns true if this endpoint's transport uses SSL, false otherwise.
virtual std::int16_t type() const noexcept
Returns the type of the endpoint.
const EndpointInfoPtr underlying
The information of the underlying endpoint or nullptr if there's no underlying endpoint.
const bool compress
Specifies whether or not compression should be used if available when using this endpoint.
virtual bool datagram() const noexcept
Returns true if this endpoint's transport is a datagram transport (namely, UDP), false otherwise.
Base class for the endpoint info classes.
virtual bool operator==(const Endpoint &rhs) const =0
Operator equal to.
virtual std::string toString() const noexcept=0
Returns a string representation of this endpoint.
virtual EndpointInfoPtr getInfo() const noexcept=0
Returns the endpoint information.
Endpoint()=default
Default constructor.
virtual bool operator<(const Endpoint &rhs) const =0
Operator less than.
const std::string name
The accessory name. Can be empty.
const std::string modelNumber
The accessory model number. Can be empty.
const std::string protocol
The protocol supported by the accessory.
const std::string manufacturer
The accessory manufacturer. Can be empty.
std::int16_t type() const noexcept final
Returns the type of the endpoint.
bool secure() const noexcept final
Returns true if this endpoint's transport uses SSL, false otherwise.
const std::string host
The host or address configured with the endpoint.
const int port
The port number.
const std::string sourceAddress
The source IP address.
Provides access to the address details of an IP endpoint.
const Ice::EncodingVersion rawEncoding
The encoding version of the opaque endpoint (to decode or encode the rawBytes).
const std::vector< std::byte > rawBytes
The raw encoding of the opaque endpoint.
std::int16_t type() const noexcept final
Returns the type of the endpoint.
bool secure() const noexcept final
Returns true if this endpoint's transport uses SSL, false otherwise.
std::int16_t type() const noexcept final
Returns the type of the endpoint.
Provides access to a TCP endpoint information.
const int mcastTtl
The multicast time-to-live (or hops).
bool datagram() const noexcept final
Returns true if this endpoint's transport is a datagram transport (namely, UDP), false otherwise.
std::int16_t type() const noexcept final
Returns the type of the endpoint.
const std::string mcastInterface
The multicast interface.
Provides access to an UDP endpoint information.
const std::string resource
The URI configured with the endpoint.
std::shared_ptr< EndpointInfo > EndpointInfoPtr
A shared pointer to an EndpointInfo.
constexpr std::int16_t UDPEndpointType
Identifies UDP endpoints.
Represents a version of the Slice encoding.