1 #ifndef PROTON_LINK_HPP
2 #define PROTON_LINK_HPP
25 #include "./endpoint.hpp"
26 #include "./internal/export.hpp"
27 #include "./message.hpp"
28 #include "./source.hpp"
29 #include "./target.hpp"
30 #include "./internal/object.hpp"
31 #include "./sender_options.hpp"
32 #include "./receiver_options.hpp"
34 #include <proton/types.h>
42 class error_condition;
45 class messaging_adapter;
51 class sender_iterator;
52 class receiver_iterator;
57 PN_CPP_CLASS_EXTERN
link :
public internal::object<pn_link_t> ,
public endpoint {
59 link(pn_link_t* l) : internal::object<pn_link_t>(l) {}
64 link() : internal::object<pn_link_t>(0) {}
66 PN_CPP_EXTERN
bool uninitialized()
const;
67 PN_CPP_EXTERN
bool active()
const;
68 PN_CPP_EXTERN
bool closed()
const;
72 PN_CPP_EXTERN
void close();
80 PN_CPP_EXTERN
void detach();
83 PN_CPP_EXTERN
int credit()
const;
91 PN_CPP_EXTERN
bool draining();
94 PN_CPP_EXTERN std::string name()
const;
111 friend class internal::factory<
link>;
118 #endif // PROTON_LINK_HPP
A top-level container of connections, sessions, senders, and receivers.
Definition: container.hpp:59
A named channel for sending or receiving messages.
Definition: link.hpp:56
A connection to a remote AMQP peer.
Definition: connection.hpp:48
The base class for session, connection, and link.
Definition: endpoint.hpp:33
A container of senders and receivers.
Definition: session.hpp:46
link()
Create an empty link.
Definition: link.hpp:64
The base Proton error.
Definition: error.hpp:37
Describes an endpoint error state.
Definition: error_condition.hpp:37