Qpid Proton C API  0.18.0
connection.h File Reference

A connection to a remote AMQP peer. More...

#include <proton/import_export.h>
#include <proton/codec.h>
#include <proton/condition.h>
#include <proton/error.h>
#include <proton/type_compat.h>
#include <proton/types.h>
#include <stddef.h>

Go to the source code of this file.

Macros

#define PN_LOCAL_UNINIT
 The local endpoint state is uninitialized.
 
#define PN_LOCAL_ACTIVE
 The local endpoint state is active.
 
#define PN_LOCAL_CLOSED
 The local endpoint state is closed.
 
#define PN_REMOTE_UNINIT
 The remote endpoint state is uninitialized.
 
#define PN_REMOTE_ACTIVE
 The remote endpoint state is active.
 
#define PN_REMOTE_CLOSED
 The remote endpoint state is closed.
 
#define PN_LOCAL_MASK
 A mask for values of pn_state_t that preserves only the local bits of an endpoint's state.
 
#define PN_REMOTE_MASK
 A mask for values of pn_state_t that preserves only the remote bits of an endpoint's state.
 

Functions

pn_connection_tpn_connection (void)
 Factory to construct a new Connection. More...
 
void pn_connection_free (pn_connection_t *connection)
 Free a connection object. More...
 
void pn_connection_release (pn_connection_t *connection)
 Release a connection object. More...
 
pn_error_tpn_connection_error (pn_connection_t *connection)
 Deprecated More...
 
void pn_connection_collect (pn_connection_t *connection, pn_collector_t *collector)
 Associate a connection object with an event collector. More...
 
pn_collector_tpn_connection_collector (pn_connection_t *connection)
 Get the collector set with pn_connection_collect() More...
 
void * pn_connection_get_context (pn_connection_t *connection)
 Deprecated - Use pn_connection_attachments(). More...
 
void pn_connection_set_context (pn_connection_t *connection, void *context)
 Deprecated - Use pn_connection_attachments(). More...
 
pn_record_t * pn_connection_attachments (pn_connection_t *connection)
 Get the attachments that are associated with a connection object. More...
 
pn_state_t pn_connection_state (pn_connection_t *connection)
 Get the endpoint state flags for a connection. More...
 
void pn_connection_open (pn_connection_t *connection)
 Open a connection. More...
 
void pn_connection_close (pn_connection_t *connection)
 Close a connection. More...
 
void pn_connection_reset (pn_connection_t *connection)
 Reset a connection object back to the uninitialized state. More...
 
pn_condition_tpn_connection_condition (pn_connection_t *connection)
 Get the local condition associated with the connection endpoint. More...
 
pn_condition_tpn_connection_remote_condition (pn_connection_t *connection)
 Get the remote condition associated with the connection endpoint. More...
 
const char * pn_connection_get_container (pn_connection_t *connection)
 Get the AMQP Container name advertised by a connection object. More...
 
void pn_connection_set_container (pn_connection_t *connection, const char *container)
 Set the AMQP Container name advertised by a connection object. More...
 
void pn_connection_set_user (pn_connection_t *connection, const char *user)
 Set the authentication username for a client connection. More...
 
void pn_connection_set_password (pn_connection_t *connection, const char *password)
 Set the authentication password for a client connection. More...
 
const char * pn_connection_get_user (pn_connection_t *connection)
 Get the authentication username for a client connection. More...
 
const char * pn_connection_get_hostname (pn_connection_t *connection)
 Get the value of the AMQP Hostname used by a connection object. More...
 
void pn_connection_set_hostname (pn_connection_t *connection, const char *hostname)
 Set the name of the virtual host (either fully qualified or relative) to which this connection is connecting to. More...
 
const char * pn_connection_remote_container (pn_connection_t *connection)
 Get the AMQP Container name advertised by the remote connection endpoint. More...
 
const char * pn_connection_remote_hostname (pn_connection_t *connection)
 Get the AMQP Hostname set by the remote connection endpoint. More...
 
pn_data_tpn_connection_offered_capabilities (pn_connection_t *connection)
 Access/modify the AMQP offered capabilities data for a connection object. More...
 
pn_data_tpn_connection_desired_capabilities (pn_connection_t *connection)
 Access/modify the AMQP desired capabilities data for a connection object. More...
 
pn_data_tpn_connection_properties (pn_connection_t *connection)
 Access/modify the AMQP properties data for a connection object. More...
 
pn_data_tpn_connection_remote_offered_capabilities (pn_connection_t *connection)
 Access the AMQP offered capabilites supplied by the remote connection endpoint. More...
 
pn_data_tpn_connection_remote_desired_capabilities (pn_connection_t *connection)
 Access the AMQP desired capabilites supplied by the remote connection endpoint. More...
 
pn_data_tpn_connection_remote_properties (pn_connection_t *connection)
 Access the AMQP connection properties supplied by the remote connection endpoint. More...
 
pn_transport_tpn_connection_transport (pn_connection_t *connection)
 Get the transport bound to a connection object. More...
 

Detailed Description

A connection to a remote AMQP peer.