connection.h
Go to the documentation of this file.
#ifndef PROTON_CONNECTION_H
#define PROTON_CONNECTION_H 1
/*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
#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>
#ifdef __cplusplus
extern "C" {
#endif
#define PN_LOCAL_UNINIT (1)
#define PN_LOCAL_ACTIVE (2)
#define PN_LOCAL_CLOSED (4)
#define PN_REMOTE_UNINIT (8)
#define PN_REMOTE_ACTIVE (16)
#define PN_REMOTE_CLOSED (32)
#define PN_LOCAL_MASK (PN_LOCAL_UNINIT | PN_LOCAL_ACTIVE | PN_LOCAL_CLOSED)
#define PN_REMOTE_MASK (PN_REMOTE_UNINIT | PN_REMOTE_ACTIVE | PN_REMOTE_CLOSED)
PN_EXTERN pn_connection_t *pn_connection(void);
PN_EXTERN pn_connection_t *pn_connection(void);
PN_EXTERN void pn_connection_free(pn_connection_t *connection);
PN_EXTERN void pn_connection_release(pn_connection_t *connection);
PN_EXTERN pn_error_t *pn_connection_error(pn_connection_t *connection);
PN_EXTERN void pn_connection_collect(pn_connection_t *connection, pn_collector_t *collector);
PN_EXTERN pn_collector_t* pn_connection_collector(pn_connection_t *connection);
PN_EXTERN void *pn_connection_get_context(pn_connection_t *connection);
PN_EXTERN void pn_connection_set_context(pn_connection_t *connection, void *context);
PN_EXTERN pn_record_t *pn_connection_attachments(pn_connection_t *connection);
PN_EXTERN pn_state_t pn_connection_state(pn_connection_t *connection);
PN_EXTERN void pn_connection_open(pn_connection_t *connection);
PN_EXTERN void pn_connection_close(pn_connection_t *connection);
PN_EXTERN void pn_connection_reset(pn_connection_t *connection);
PN_EXTERN pn_condition_t *pn_connection_condition(pn_connection_t *connection);
PN_EXTERN pn_condition_t *pn_connection_remote_condition(pn_connection_t *connection);
PN_EXTERN const char *pn_connection_get_container(pn_connection_t *connection);
PN_EXTERN void pn_connection_set_container(pn_connection_t *connection, const char *container);
PN_EXTERN void pn_connection_set_user(pn_connection_t *connection, const char *user);
PN_EXTERN void pn_connection_set_password(pn_connection_t *connection, const char *password);
PN_EXTERN const char *pn_connection_get_user(pn_connection_t *connection);
PN_EXTERN const char *pn_connection_get_hostname(pn_connection_t *connection);
PN_EXTERN void pn_connection_set_hostname(pn_connection_t *connection, const char *hostname);
PN_EXTERN const char *pn_connection_remote_container(pn_connection_t *connection);
PN_EXTERN const char *pn_connection_remote_hostname(pn_connection_t *connection);
PN_EXTERN pn_data_t *pn_connection_offered_capabilities(pn_connection_t *connection);
PN_EXTERN pn_data_t *pn_connection_desired_capabilities(pn_connection_t *connection);
PN_EXTERN pn_data_t *pn_connection_properties(pn_connection_t *connection);
PN_EXTERN pn_data_t *pn_connection_remote_offered_capabilities(pn_connection_t *connection);
PN_EXTERN pn_data_t *pn_connection_remote_desired_capabilities(pn_connection_t *connection);
PN_EXTERN pn_data_t *pn_connection_remote_properties(pn_connection_t *connection);
PN_EXTERN pn_transport_t *pn_connection_transport(pn_connection_t *connection);
#ifdef __cplusplus
}
#endif
#endif /* connection.h */
pn_connection_remote_condition
pn_condition_t * pn_connection_remote_condition(pn_connection_t *connection)
Get the remote condition associated with the connection endpoint.
pn_connection_set_hostname
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_connection_remote_properties
pn_data_t * pn_connection_remote_properties(pn_connection_t *connection)
Access the AMQP connection properties supplied by the remote connection endpoint.
pn_connection_transport
pn_transport_t * pn_connection_transport(pn_connection_t *connection)
Get the transport bound to a connection object.
types.h
pn_collector_t
struct pn_collector_t pn_collector_t
An event collector.
Definition: types.h:413
pn_error_t
struct pn_error_t pn_error_t
An int error code and some string text to describe the error.
Definition: error.h:44
pn_connection_remote_desired_capabilities
pn_data_t * pn_connection_remote_desired_capabilities(pn_connection_t *connection)
Access the AMQP desired capabilities supplied by the remote connection endpoint.
pn_state_t
int pn_state_t
Holds the state flags for an AMQP endpoint.
Definition: types.h:267
pn_connection_get_container
const char * pn_connection_get_container(pn_connection_t *connection)
Get the AMQP Container name advertised by a connection object.
pn_connection_collector
pn_collector_t * pn_connection_collector(pn_connection_t *connection)
Get the collector set with pn_connection_collect()
pn_connection_set_context
void pn_connection_set_context(pn_connection_t *connection, void *context)
Deprecated - Use pn_connection_attachments().
pn_connection_remote_container
const char * pn_connection_remote_container(pn_connection_t *connection)
Get the AMQP Container name advertised by the remote connection endpoint.
codec.h
pn_connection_desired_capabilities
pn_data_t * pn_connection_desired_capabilities(pn_connection_t *connection)
Access/modify the AMQP desired capabilities data for a connection object.
pn_transport_t
struct pn_transport_t pn_transport_t
A network channel supporting an AMQP connection.
Definition: types.h:431
pn_connection_state
pn_state_t pn_connection_state(pn_connection_t *connection)
Get the endpoint state flags for a connection.
condition.h
pn_connection_reset
void pn_connection_reset(pn_connection_t *connection)
Reset a connection object back to the uninitialized state.
pn_connection_free
void pn_connection_free(pn_connection_t *connection)
Free a connection object.
pn_data_t
struct pn_data_t pn_data_t
An AMQP Data object.
Definition: codec.h:364
pn_condition_t
struct pn_condition_t pn_condition_t
An AMQP Condition object.
Definition: condition.h:64
pn_connection_properties
pn_data_t * pn_connection_properties(pn_connection_t *connection)
Access/modify the AMQP properties data for a connection object.
error.h
pn_connection_get_context
void * pn_connection_get_context(pn_connection_t *connection)
Deprecated - Use pn_connection_attachments().
pn_connection_get_hostname
const char * pn_connection_get_hostname(pn_connection_t *connection)
Get the value of the AMQP Hostname used by a connection object.
pn_connection_set_user
void pn_connection_set_user(pn_connection_t *connection, const char *user)
Set the authentication username for a client connection.
pn_connection_collect
void pn_connection_collect(pn_connection_t *connection, pn_collector_t *collector)
Associate a connection object with an event collector.
pn_connection_condition
pn_condition_t * pn_connection_condition(pn_connection_t *connection)
Get the local condition associated with the connection endpoint.
pn_connection_t
struct pn_connection_t pn_connection_t
An AMQP Connection object.
Definition: types.h:281
pn_connection_close
void pn_connection_close(pn_connection_t *connection)
Close a connection.
pn_connection_open
void pn_connection_open(pn_connection_t *connection)
Open a connection.
pn_connection_error
pn_error_t * pn_connection_error(pn_connection_t *connection)
Deprecated
pn_connection_set_password
void pn_connection_set_password(pn_connection_t *connection, const char *password)
Set the authentication password for a client connection.
pn_connection_set_container
void pn_connection_set_container(pn_connection_t *connection, const char *container)
Set the AMQP Container name advertised by a connection object.
pn_connection_remote_offered_capabilities
pn_data_t * pn_connection_remote_offered_capabilities(pn_connection_t *connection)
Access the AMQP offered capabilities supplied by the remote connection endpoint.
pn_connection_attachments
pn_record_t * pn_connection_attachments(pn_connection_t *connection)
Get the attachments that are associated with a connection object.
pn_connection
pn_connection_t * pn_connection(void)
Factory to construct a new Connection.
pn_connection_get_user
const char * pn_connection_get_user(pn_connection_t *connection)
Get the authentication username for a client connection.
pn_connection_offered_capabilities
pn_data_t * pn_connection_offered_capabilities(pn_connection_t *connection)
Access/modify the AMQP offered capabilities data for a connection object.
pn_connection_remote_hostname
const char * pn_connection_remote_hostname(pn_connection_t *connection)
Get the AMQP Hostname set by the remote connection endpoint.
pn_connection_release
void pn_connection_release(pn_connection_t *connection)
Release a connection object.