1#ifndef PROTON_CONNECTION_H
2#define PROTON_CONNECTION_H 1
25#include <proton/import_export.h>
29#include <proton/type_compat.h>
50#define PN_LOCAL_UNINIT (1)
55#define PN_LOCAL_ACTIVE (2)
60#define PN_LOCAL_CLOSED (4)
65#define PN_REMOTE_UNINIT (8)
70#define PN_REMOTE_ACTIVE (16)
75#define PN_REMOTE_CLOSED (32)
81#define PN_LOCAL_MASK (PN_LOCAL_UNINIT | PN_LOCAL_ACTIVE | PN_LOCAL_CLOSED)
87#define PN_REMOTE_MASK (PN_REMOTE_UNINIT | PN_REMOTE_ACTIVE | PN_REMOTE_CLOSED)
AMQP data encoding and decoding.
struct pn_condition_t pn_condition_t
An AMQP Condition object.
Definition: condition.h:64
void pn_connection_free(pn_connection_t *connection)
Free a connection object.
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 con...
pn_data_t * pn_connection_desired_capabilities(pn_connection_t *connection)
Access/modify the AMQP desired capabilities data for a connection object.
const char * pn_connection_remote_hostname(pn_connection_t *connection)
Get the AMQP Hostname set by the remote connection endpoint.
pn_state_t pn_connection_state(pn_connection_t *connection)
Get the endpoint state flags for a connection.
const char * pn_connection_get_authorization(pn_connection_t *connection)
Get the authorization id for a client connection.
void pn_connection_collect(pn_connection_t *connection, pn_collector_t *collector)
Associate a connection object with an event collector.
pn_data_t * pn_connection_properties(pn_connection_t *connection)
Access/modify the AMQP properties data for a connection object.
pn_data_t * pn_connection_remote_properties(pn_connection_t *connection)
Access the AMQP connection properties supplied by the remote connection endpoint.
void pn_connection_reset(pn_connection_t *connection)
Reset a connection object back to the uninitialized state.
pn_transport_t * pn_connection_transport(pn_connection_t *connection)
Get the transport bound to a connection object.
void pn_connection_open(pn_connection_t *connection)
Open a connection.
pn_data_t * pn_connection_offered_capabilities(pn_connection_t *connection)
Access/modify the AMQP offered capabilities data for a connection object.
void pn_connection_release(pn_connection_t *connection)
Release a connection object.
pn_collector_t * pn_connection_collector(pn_connection_t *connection)
Get the collector set with pn_connection_collect()
const char * pn_connection_remote_container(pn_connection_t *connection)
Get the AMQP Container name advertised by the remote connection endpoint.
struct pn_connection_t pn_connection_t
An AMQP Connection object.
Definition: types.h:285
void pn_connection_set_password(pn_connection_t *connection, const char *password)
Set the authentication password for a client connection.
pn_data_t * pn_connection_remote_offered_capabilities(pn_connection_t *connection)
Access the AMQP offered capabilities supplied by the remote connection endpoint.
pn_error_t * pn_connection_error(pn_connection_t *connection)
Deprecated - Use pn_connection_condition().
void pn_connection_set_authorization(pn_connection_t *connection, const char *authzid)
Set the authorization id for a client connection.
pn_condition_t * pn_connection_condition(pn_connection_t *connection)
Get the local condition associated with the connection endpoint.
int pn_state_t
Holds the state flags for an AMQP endpoint.
Definition: types.h:271
pn_connection_t * pn_connection(void)
Factory to construct a new Connection.
const char * pn_connection_get_container(pn_connection_t *connection)
Get the AMQP Container name advertised by a connection object.
pn_record_t * pn_connection_attachments(pn_connection_t *connection)
Get the attachments that are associated with a connection object.
void pn_connection_close(pn_connection_t *connection)
Close a connection.
pn_data_t * pn_connection_remote_desired_capabilities(pn_connection_t *connection)
Access the AMQP desired capabilities supplied by the remote connection endpoint.
void pn_connection_set_container(pn_connection_t *connection, const char *container)
Set the AMQP Container name advertised by a connection object.
pn_condition_t * pn_connection_remote_condition(pn_connection_t *connection)
Get the remote condition associated with the connection endpoint.
void * pn_connection_get_context(pn_connection_t *connection)
Get the application context that is associated with a connection object.
void pn_connection_set_context(pn_connection_t *connection, void *context)
Set a new application context for a connection object.
const char * pn_connection_get_hostname(pn_connection_t *connection)
Get the value of the AMQP Hostname used by a connection object.
const char * pn_connection_get_user(pn_connection_t *connection)
Get the authentication username for a client connection.
void pn_connection_set_user(pn_connection_t *connection, const char *user)
Set the authentication username for a client connection.
struct pn_data_t pn_data_t
An AMQP Data object.
Definition: codec.h:374
struct pn_error_t pn_error_t
An int error code and some string text to describe the error.
Definition: error.h:44
struct pn_collector_t pn_collector_t
An event collector.
Definition: types.h:417
struct pn_transport_t pn_transport_t
A network channel supporting an AMQP connection.
Definition: types.h:435
struct pn_record_t pn_record_t
A type representing attached context information.
Definition: types.h:477