delivery.h
Go to the documentation of this file.
#ifndef PROTON_DELIVERY_H
#define PROTON_DELIVERY_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/disposition.h>
#include <proton/type_compat.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef pn_bytes_t pn_delivery_tag_t;
PN_EXTERN pn_delivery_tag_t pn_dtag(const char *bytes, size_t size);
PN_EXTERN pn_delivery_t *pn_delivery(pn_link_t *link, pn_delivery_tag_t tag);
PN_EXTERN void *pn_delivery_get_context(pn_delivery_t *delivery);
PN_EXTERN void pn_delivery_set_context(pn_delivery_t *delivery, void *context);
PN_EXTERN pn_record_t *pn_delivery_attachments(pn_delivery_t *delivery);
PN_EXTERN pn_delivery_tag_t pn_delivery_tag(pn_delivery_t *delivery);
PN_EXTERN pn_link_t *pn_delivery_link(pn_delivery_t *delivery);
PN_EXTERN pn_disposition_t *pn_delivery_local(pn_delivery_t *delivery);
PN_EXTERN uint64_t pn_delivery_local_state(pn_delivery_t *delivery);
PN_EXTERN pn_disposition_t *pn_delivery_remote(pn_delivery_t *delivery);
PN_EXTERN uint64_t pn_delivery_remote_state(pn_delivery_t *delivery);
PN_EXTERN bool pn_delivery_settled(pn_delivery_t *delivery);
PN_EXTERN size_t pn_delivery_pending(pn_delivery_t *delivery);
PN_EXTERN bool pn_delivery_partial(pn_delivery_t *delivery);
PN_EXTERN bool pn_delivery_aborted(pn_delivery_t *delivery);
PN_EXTERN bool pn_delivery_writable(pn_delivery_t *delivery);
PN_EXTERN bool pn_delivery_readable(pn_delivery_t *delivery);
PN_EXTERN bool pn_delivery_updated(pn_delivery_t *delivery);
PN_EXTERN void pn_delivery_update(pn_delivery_t *delivery, uint64_t state);
PN_EXTERN void pn_delivery_clear(pn_delivery_t *delivery);
PN_EXTERN bool pn_delivery_current(pn_delivery_t *delivery);
PN_EXTERN void pn_delivery_abort(pn_delivery_t *delivery);
PN_EXTERN void pn_delivery_settle(pn_delivery_t *delivery);
PN_EXTERN void pn_delivery_dump(pn_delivery_t *delivery);
PN_EXTERN bool pn_delivery_buffered(pn_delivery_t *delivery);
PN_EXTERN pn_delivery_t *pn_work_head(pn_connection_t *connection);
PN_EXTERN pn_delivery_t *pn_work_next(pn_delivery_t *delivery);
#ifdef __cplusplus
}
#endif
#endif /* delivery.h */
pn_work_head
pn_delivery_t * pn_work_head(pn_connection_t *connection)
Extracts the first delivery on the connection that has pending operations.
pn_delivery_updated
bool pn_delivery_updated(pn_delivery_t *delivery)
Check if a delivery is updated.
pn_delivery_settle
void pn_delivery_settle(pn_delivery_t *delivery)
Settle a delivery.
pn_delivery_writable
bool pn_delivery_writable(pn_delivery_t *delivery)
Check if a delivery is writable.
pn_delivery_local_state
uint64_t pn_delivery_local_state(pn_delivery_t *delivery)
Get the local disposition state for a delivery.
pn_delivery_aborted
bool pn_delivery_aborted(pn_delivery_t *delivery)
Check if a received delivery has been aborted.
pn_delivery_buffered
bool pn_delivery_buffered(pn_delivery_t *delivery)
Check if a delivery is buffered.
pn_delivery_local
pn_disposition_t * pn_delivery_local(pn_delivery_t *delivery)
Get the local disposition for a delivery.
pn_delivery_current
bool pn_delivery_current(pn_delivery_t *delivery)
Return true if delivery is the current delivery for its link.
pn_delivery_tag
pn_delivery_tag_t pn_delivery_tag(pn_delivery_t *delivery)
Get the tag for a delivery object.
pn_delivery_settled
bool pn_delivery_settled(pn_delivery_t *delivery)
Check if a delivery is remotely settled.
pn_delivery_update
void pn_delivery_update(pn_delivery_t *delivery, uint64_t state)
Update the disposition of a delivery.
pn_bytes_t
A const byte buffer.
Definition: types.h:212
pn_delivery_t
struct pn_delivery_t pn_delivery_t
An AMQP Delivery object.
Definition: types.h:401
pn_delivery_remote_state
uint64_t pn_delivery_remote_state(pn_delivery_t *delivery)
Get the remote disposition state for a delivery.
pn_delivery_dump
void pn_delivery_dump(pn_delivery_t *delivery)
Utility function for printing details of a delivery.
pn_delivery_abort
void pn_delivery_abort(pn_delivery_t *delivery)
Abort a delivery being sent.
pn_connection_t
struct pn_connection_t pn_connection_t
An AMQP Connection object.
Definition: types.h:281
pn_disposition_t
struct pn_disposition_t pn_disposition_t
A delivery state.
Definition: disposition.h:52
pn_delivery_clear
void pn_delivery_clear(pn_delivery_t *delivery)
Clear the updated flag for a delivery.
pn_delivery_get_context
void * pn_delivery_get_context(pn_delivery_t *delivery)
Deprecated - Use pn_delivery_attachments().
pn_delivery_partial
bool pn_delivery_partial(pn_delivery_t *delivery)
Check if a delivery only has partial message data.
pn_link_t
struct pn_link_t pn_link_t
An AMQP Link object.
Definition: types.h:311
pn_delivery_remote
pn_disposition_t * pn_delivery_remote(pn_delivery_t *delivery)
Get the remote disposition for a delivery.
pn_delivery
pn_delivery_t * pn_delivery(pn_link_t *link, pn_delivery_tag_t tag)
Create a delivery on a link.
pn_delivery_link
pn_link_t * pn_delivery_link(pn_delivery_t *delivery)
Get the parent link for a delivery object.
pn_delivery_readable
bool pn_delivery_readable(pn_delivery_t *delivery)
Check if a delivery is readable.
pn_work_next
pn_delivery_t * pn_work_next(pn_delivery_t *delivery)
Get the next delivery on the connection that needs has pending operations.
pn_dtag
pn_delivery_tag_t pn_dtag(const char *bytes, size_t size)
Construct a delivery tag.
pn_delivery_pending
size_t pn_delivery_pending(pn_delivery_t *delivery)
Get the amount of pending message data for a delivery.
pn_delivery_tag_t
pn_bytes_t pn_delivery_tag_t
An AMQP delivery tag.
Definition: delivery.h:46
pn_delivery_attachments
pn_record_t * pn_delivery_attachments(pn_delivery_t *delivery)
Get the attachments that are associated with a delivery object.
disposition.h
pn_delivery_set_context
void pn_delivery_set_context(pn_delivery_t *delivery, void *context)
Deprecated - Use pn_delivery_attachments().