2 #define PROTON_LINK_H 1
PN_EXTERN pn_delivery_t * pn_link_current(pn_link_t *link)
Get the current delivery for a link.
PN_EXTERN bool pn_link_advance(pn_link_t *link)
Advance the current delivery of a link to the next delivery on the link.
PN_EXTERN bool pn_link_draining(pn_link_t *receiver)
Check if a link is currently draining.
PN_EXTERN int pn_link_unsettled(pn_link_t *link)
Get the number of unsettled deliveries for a link.
PN_EXTERN pn_terminus_t * pn_link_remote_target(pn_link_t *link)
Access the remotely defined target definition for a link.
PN_EXTERN pn_snd_settle_mode_t pn_link_snd_settle_mode(pn_link_t *link)
Get the local sender settle mode for a link.
PN_EXTERN void pn_link_set_rcv_settle_mode(pn_link_t *link, pn_rcv_settle_mode_t mode)
Set the local receiver settle mode for a link.
PN_EXTERN void pn_link_set_context(pn_link_t *link, void *context)
PN_EXTERN pn_error_t * pn_link_error(pn_link_t *link)
Get additional error information associated with the link.
PN_EXTERN pn_terminus_t * pn_link_remote_source(pn_link_t *link)
Access the remotely defined source definition for a link.
struct pn_record_t pn_record_t
Definition: object.h:46
PN_EXTERN bool pn_link_is_sender(pn_link_t *link)
Test if a link is a sender.
PN_EXTERN int pn_link_remote_credit(pn_link_t *link)
Get the remote view of the credit for a link.
PN_EXTERN bool pn_link_is_receiver(pn_link_t *link)
Test if a link is a receiver.
PN_EXTERN void pn_link_open(pn_link_t *link)
Open a link.
struct pn_link_t pn_link_t
An AMQP Link object.
Definition: types.h:148
PN_EXTERN int pn_link_available(pn_link_t *link)
Get the available deliveries hint for a link.
PN_EXTERN pn_delivery_t * pn_unsettled_next(pn_delivery_t *delivery)
Get the next unsettled delivery on a link.
The sender will send all deliveries initially unsettled.
Definition: link.h:472
PN_EXTERN pn_link_t * pn_link_head(pn_connection_t *connection, pn_state_t state)
Retrieve the first link that matches the given state mask.
PN_EXTERN pn_condition_t * pn_link_remote_condition(pn_link_t *link)
Get the remote condition associated with a link endpoint.
PN_EXTERN pn_link_t * pn_receiver(pn_session_t *session, const char *name)
Construct a new receiver on a session.
PN_EXTERN pn_record_t * pn_link_attachments(pn_link_t *link)
Get the attachments that are associated with a link object.
struct pn_terminus_t pn_terminus_t
Encapsulates the endpoint state associated with an AMQP Terminus.
Definition: terminus.h:53
PN_EXTERN pn_delivery_t * pn_unsettled_head(pn_link_t *link)
Get the first unsettled delivery for a link.
#define PN_EXTERN
Definition: import_export.h:53
struct pn_session_t pn_session_t
An AMQP Session object.
Definition: types.h:129
PN_EXTERN pn_rcv_settle_mode_t pn_link_rcv_settle_mode(pn_link_t *link)
Get the local receiver settle mode for a link.
PN_EXTERN bool pn_link_get_drain(pn_link_t *link)
Get the drain flag for a link.
PN_EXTERN ssize_t pn_link_send(pn_link_t *sender, const char *bytes, size_t n)
Send message data for the current delivery on a link.
PN_EXTERN pn_rcv_settle_mode_t pn_link_remote_rcv_settle_mode(pn_link_t *link)
Get the remote receiver settle mode for a link.
Terminus API for the proton Engine.
PN_EXTERN pn_state_t pn_link_state(pn_link_t *link)
Get the endpoint state flags for a link.
pn_snd_settle_mode_t
Describes the permitted/expected settlement behaviours of a sending link.
Definition: link.h:471
PN_EXTERN void * pn_link_get_context(pn_link_t *link)
The Condition API for the proton Engine.
struct pn_delivery_t pn_delivery_t
An AMQP Delivery object.
Definition: types.h:238
The sender will send all deliveries settled to the receiver.
Definition: link.h:474
PN_EXTERN ssize_t pn_link_recv(pn_link_t *receiver, char *bytes, size_t n)
Receive message data for the current delivery on a link.
PN_EXTERN pn_link_t * pn_sender(pn_session_t *session, const char *name)
Construct a new sender on a session.
PN_EXTERN void pn_link_set_drain(pn_link_t *receiver, bool drain)
Set the drain mode on a link.
PN_EXTERN const char * pn_link_name(pn_link_t *link)
Get the name of a link.
PN_EXTERN void pn_link_set_snd_settle_mode(pn_link_t *link, pn_snd_settle_mode_t mode)
Set the local sender settle mode for a link.
PN_EXTERN void pn_link_free(pn_link_t *link)
Free a link object.
PN_EXTERN void pn_link_close(pn_link_t *link)
Close a link.
PN_EXTERN void pn_link_detach(pn_link_t *link)
Detach a link.
PN_EXTERN pn_session_t * pn_link_session(pn_link_t *link)
Get the parent session for a link object.
pn_rcv_settle_mode_t
Describes the permitted/expected settlement behaviours of a receiving link.
Definition: link.h:488
struct pn_error_t pn_error_t
A pn_error_t has an int error code and some string text to describe the error.
Definition: error.h:33
struct pn_connection_t pn_connection_t
An AMQP Connection object.
Definition: types.h:118
PN_EXTERN void pn_link_offered(pn_link_t *sender, int credit)
Signal the availability of deliveries for a link.
struct pn_condition_t pn_condition_t
An AMQP Condition object.
Definition: condition.h:64
PN_EXTERN void pn_link_drain(pn_link_t *receiver, int credit)
Grant credit for incoming deliveries on a receiver, and set drain mode to true.
PN_EXTERN int pn_link_credit(pn_link_t *link)
Get the credit balance for a link.
The sender may send a mixure of settled and unsettled deliveries.
Definition: link.h:476
PN_EXTERN int pn_link_drained(pn_link_t *link)
Drain excess credit for a link.
int pn_state_t
Holds the state flags for an AMQP endpoint.
Definition: types.h:103
PN_EXTERN void pn_link_flow(pn_link_t *receiver, int credit)
Grant credit for incoming deliveries on a receiver.
The receiver will settle deliveries regardless of what the sender does.
Definition: link.h:489
PN_EXTERN pn_snd_settle_mode_t pn_link_remote_snd_settle_mode(pn_link_t *link)
Get the remote sender settle mode for a link.
The receiver will only settle deliveries after the sender settles.
Definition: link.h:491
PN_EXTERN pn_link_t * pn_link_next(pn_link_t *link, pn_state_t state)
Retrieve the next link that matches the given state mask.
PN_EXTERN pn_terminus_t * pn_link_source(pn_link_t *link)
Access the locally defined source definition for a link.
PN_EXTERN int pn_link_queued(pn_link_t *link)
Get the number of queued deliveries for a link.
PN_EXTERN pn_condition_t * pn_link_condition(pn_link_t *link)
Get the local condition associated with a link endpoint.
PN_EXTERN pn_terminus_t * pn_link_target(pn_link_t *link)
Access the locally defined target definition for a link.