6#include "azure/core/amqp/models/amqp_value.hpp"
7#include "common/async_operation_queue.hpp"
8#include "connection_string_credential.hpp"
17 struct ENDPOINT_INSTANCE_TAG;
18 struct LINK_ENDPOINT_INSTANCE_TAG;
20namespace Azure {
namespace Core {
namespace Amqp {
namespace _detail {
21 class EndpointFactory;
22 class LinkEndpointFactory;
24namespace Azure {
namespace Core {
namespace Amqp {
namespace _internal {
25 class ConnectionEvents;
28 class Endpoint final {
31 Endpoint(Endpoint&& that) noexcept : m_endpoint{that.m_endpoint} { that.m_endpoint =
nullptr; }
34 ENDPOINT_INSTANCE_TAG* m_endpoint;
35 Endpoint(ENDPOINT_INSTANCE_TAG* endpoint) : m_endpoint{endpoint} {};
37 Endpoint(Endpoint
const&) =
delete;
38 Endpoint& operator=(Endpoint
const&) =
delete;
39 Endpoint& operator=(Endpoint&& other)
noexcept;
40 ENDPOINT_INSTANCE_TAG* Release()
42 ENDPOINT_INSTANCE_TAG* rv = m_endpoint;
46 friend class _detail::EndpointFactory;
47 friend class _internal::ConnectionEvents;
55 class LinkEndpoint final {
57 LinkEndpoint(LinkEndpoint&& that) noexcept : m_endpoint{that.m_endpoint}
59 that.m_endpoint =
nullptr;
63 LINK_ENDPOINT_INSTANCE_TAG* Get()
const {
return m_endpoint; }
64 std::uint32_t GetHandle()
const;
67 LINK_ENDPOINT_INSTANCE_TAG* m_endpoint;
69 LinkEndpoint(LINK_ENDPOINT_INSTANCE_TAG* endpoint) : m_endpoint{endpoint} {};
70 LINK_ENDPOINT_INSTANCE_TAG* Release()
72 LINK_ENDPOINT_INSTANCE_TAG* rv = m_endpoint;
79 LinkEndpoint(Endpoint
const&) =
delete;
80 LinkEndpoint& operator=(LinkEndpoint
const&) =
delete;
82 LinkEndpoint& operator=(Endpoint&& other);
83 friend class _detail::LinkEndpointFactory;
87namespace Azure {
namespace Core {
namespace Amqp {
namespace _detail {
88 class EndpointFactory final {
90 static _internal::Endpoint CreateEndpoint(ENDPOINT_INSTANCE_TAG* endpoint);
91 static ENDPOINT_INSTANCE_TAG* Release(_internal::Endpoint& endpoint)
93 return endpoint.Release();
96 class LinkEndpointFactory final {
98 static _internal::LinkEndpoint CreateLinkEndpoint(LINK_ENDPOINT_INSTANCE_TAG* endpoint);
99 static LINK_ENDPOINT_INSTANCE_TAG* Release(_internal::LinkEndpoint& linkEndpoint)
101 return linkEndpoint.Release();