Loading...
Searching...
No Matches
session.h
Go to the documentation of this file.
#ifndef PROTON_SESSION_H
#define PROTON_SESSION_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/type_compat.h>
#include <proton/types.h>
#include <proton/object.h>
#include <proton/error.h>
#include <proton/condition.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
PN_EXTERN pn_session_t *pn_session(pn_connection_t *connection);
PN_EXTERN void pn_session_free(pn_session_t *session);
PN_EXTERN void *pn_session_get_context(pn_session_t *session);
PN_EXTERN void pn_session_set_context(pn_session_t *session, void *context);
PN_EXTERN pn_record_t *pn_session_attachments(pn_session_t *session);
PN_EXTERN pn_state_t pn_session_state(pn_session_t *session);
/* PN_DEPRECATED("Use pn_session_condition") */
PN_EXTERN pn_error_t *pn_session_error(pn_session_t *session);
PN_EXTERN pn_condition_t *pn_session_condition(pn_session_t *session);
PN_EXTERN pn_condition_t *pn_session_remote_condition(pn_session_t *session);
PN_EXTERN pn_connection_t *pn_session_connection(pn_session_t *session);
PN_EXTERN void pn_session_open(pn_session_t *session);
PN_EXTERN void pn_session_close(pn_session_t *session);
PN_EXTERN size_t pn_session_get_incoming_capacity(pn_session_t *session);
PN_EXTERN void pn_session_set_incoming_capacity(pn_session_t *session, size_t capacity);
PN_EXTERN size_t pn_session_get_outgoing_window(pn_session_t *session);
PN_EXTERN void pn_session_set_outgoing_window(pn_session_t *session, size_t window);
PN_EXTERN size_t pn_session_outgoing_bytes(pn_session_t *session);
PN_EXTERN size_t pn_session_incoming_bytes(pn_session_t *session);
PN_EXTERN pn_session_t *pn_session_head(pn_connection_t *connection, pn_state_t state);
PN_EXTERN pn_session_t *pn_session_next(pn_session_t *session, pn_state_t state);
#ifdef __cplusplus
}
#endif
#endif /* session.h */
condition.h
An endpoint error state.
error.h
A Proton API error.
pn_condition_t
struct pn_condition_t pn_condition_t
An AMQP Condition object.
Definition condition.h:64
pn_connection_t
struct pn_connection_t pn_connection_t
An AMQP Connection object.
Definition types.h:285
pn_state_t
int pn_state_t
Holds the state flags for an AMQP endpoint.
Definition types.h:271
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_session_remote_condition
pn_condition_t * pn_session_remote_condition(pn_session_t *session)
Get the remote condition associated with the session endpoint.
pn_session_free
void pn_session_free(pn_session_t *session)
Free a session object.
pn_session_close
void pn_session_close(pn_session_t *session)
Close a session.
pn_session_get_incoming_capacity
size_t pn_session_get_incoming_capacity(pn_session_t *session)
Get the incoming capacity of the session measured in bytes.
pn_session_connection
pn_connection_t * pn_session_connection(pn_session_t *session)
Get the parent connection for a session object.
pn_session_head
pn_session_t * pn_session_head(pn_connection_t *connection, pn_state_t state)
Retrieve the first session from a given connection that matches the specified state mask.
pn_session_open
void pn_session_open(pn_session_t *session)
Open a session.
pn_session_attachments
pn_record_t * pn_session_attachments(pn_session_t *session)
Get the attachments that are associated with a session object.
pn_session_set_context
void pn_session_set_context(pn_session_t *session, void *context)
Set a new application context for a session object.
pn_session_t
struct pn_session_t pn_session_t
An AMQP Session object.
Definition types.h:296
pn_session_incoming_bytes
size_t pn_session_incoming_bytes(pn_session_t *session)
Get the number of incoming bytes currently buffered by a session.
pn_session_next
pn_session_t * pn_session_next(pn_session_t *session, pn_state_t state)
Retrieve the next session from a given connection that matches the specified state mask.
pn_session_condition
pn_condition_t * pn_session_condition(pn_session_t *session)
Get the local condition associated with the session endpoint.
pn_session_state
pn_state_t pn_session_state(pn_session_t *session)
Get the endpoint state flags for a session.
pn_session_get_outgoing_window
size_t pn_session_get_outgoing_window(pn_session_t *session)
Get the outgoing window for a session object.
pn_session_get_context
void * pn_session_get_context(pn_session_t *session)
Get the application context that is associated with a session object.
pn_session_outgoing_bytes
size_t pn_session_outgoing_bytes(pn_session_t *session)
Get the number of outgoing bytes currently buffered by a session.
pn_session_set_outgoing_window
void pn_session_set_outgoing_window(pn_session_t *session, size_t window)
Set the outgoing window for a session object.
pn_session_error
pn_error_t * pn_session_error(pn_session_t *session)
Deprecated - Use pn_session_condition().
pn_session_set_incoming_capacity
void pn_session_set_incoming_capacity(pn_session_t *session, size_t capacity)
Set the incoming capacity for a session object.
pn_session
pn_session_t * pn_session(pn_connection_t *connection)
Factory for creating a new session on a given connection object.
types.h
AMQP and API data types.