Qpid Proton C API 0.41.1
Loading...
Searching...
No Matches
disposition.h
Go to the documentation of this file.
1#ifndef PROTON_DISPOSITION_H
2#define PROTON_DISPOSITION_H 1
3
4/*
5 *
6 * Licensed to the Apache Software Foundation (ASF) under one
7 * or more contributor license agreements. See the NOTICE file
8 * distributed with this work for additional information
9 * regarding copyright ownership. The ASF licenses this file
10 * to you under the Apache License, Version 2.0 (the
11 * "License"); you may not use this file except in compliance
12 * with the License. You may obtain a copy of the License at
13 *
14 * http://www.apache.org/licenses/LICENSE-2.0
15 *
16 * Unless required by applicable law or agreed to in writing,
17 * software distributed under the License is distributed on an
18 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19 * KIND, either express or implied. See the License for the
20 * specific language governing permissions and limitations
21 * under the License.
22 *
23 */
24
25#include <proton/import_export.h>
26#include <proton/type_compat.h>
27#include <proton/condition.h>
28#include <stddef.h>
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
42
53
58#define PN_RECEIVED (0x0000000000000023)
59
66#define PN_ACCEPTED (0x0000000000000024)
67
74#define PN_REJECTED (0x0000000000000025)
75
82#define PN_RELEASED (0x0000000000000026)
83
91#define PN_MODIFIED (0x0000000000000027)
92
98#define PN_DECLARED (0x0000000000000033)
99
104#define PN_TRANSACTIONAL_STATE (0x0000000000000034)
105
120PN_EXTERN uint64_t pn_disposition_type(pn_disposition_t *disposition);
121
125PN_EXTERN const char *pn_disposition_type_name(uint64_t disposition_type);
126
132PN_EXTERN void pn_disposition_clear(pn_disposition_t *disposition);
133
150
166PN_EXTERN pn_data_t *pn_disposition_data(pn_disposition_t *disposition);
167
175
182PN_EXTERN void pn_disposition_set_section_number(pn_disposition_t *disposition, uint32_t section_number);
183
191
198PN_EXTERN void pn_disposition_set_section_offset(pn_disposition_t *disposition, uint64_t section_offset);
199
206PN_EXTERN bool pn_disposition_is_failed(pn_disposition_t *disposition);
207
214PN_EXTERN void pn_disposition_set_failed(pn_disposition_t *disposition, bool failed);
215
223
230PN_EXTERN void pn_disposition_set_undeliverable(pn_disposition_t *disposition, bool undeliverable);
231
248PN_EXTERN pn_data_t *pn_disposition_annotations(pn_disposition_t *disposition);
249
256
263
270
277
284
292
300
309
318
327
336
345
361PN_EXTERN pn_data_t *pn_custom_disposition_data(pn_custom_disposition_t *disposition);
362
370
377PN_EXTERN void pn_custom_disposition_set_type(pn_custom_disposition_t *disposition, uint64_t type);
378
393
401
408PN_EXTERN void pn_received_disposition_set_section_number(pn_received_disposition_t *disposition, uint32_t section_number);
409
417
424PN_EXTERN void pn_received_disposition_set_section_offset(pn_received_disposition_t *disposition, uint64_t section_offset);
425
433
440PN_EXTERN void pn_modified_disposition_set_failed(pn_modified_disposition_t *disposition, bool failed);
441
449
456PN_EXTERN void pn_modified_disposition_set_undeliverable(pn_modified_disposition_t *disposition, bool undeliverable);
457
473
481
489
497
505
513
523
527
528#ifdef __cplusplus
529}
530#endif
531
532#endif /* disposition.h */
An endpoint error state.
A const byte buffer.
Definition types.h:223
struct pn_condition_t pn_condition_t
An AMQP Condition object.
Definition condition.h:65
uint32_t pn_received_disposition_get_section_number(pn_received_disposition_t *disposition)
Get the section number associated with a received disposition.
void pn_declared_disposition_set_id(pn_declared_disposition_t *disposition, pn_bytes_t id)
Set the transaction id for a transaction declared disposition.
void pn_disposition_set_section_number(pn_disposition_t *disposition, uint32_t section_number)
Set the section number associated with a disposition.
uint64_t pn_transactional_disposition_get_outcome_type(pn_transactional_disposition_t *disposition)
Get the provisional outcome of the delivery if the transaction is committed successfully.
pn_data_t * pn_modified_disposition_annotations(pn_modified_disposition_t *disposition)
Access the annotations associated with a modified disposition.
bool pn_modified_disposition_is_undeliverable(pn_modified_disposition_t *disposition)
Check if a modified disposition has the undeliverable flag set.
pn_bytes_t pn_transactional_disposition_get_id(pn_transactional_disposition_t *disposition)
Get the transaction id for a transaction declared disposition.
pn_modified_disposition_t * pn_modified_disposition(pn_disposition_t *disposition)
Convert a delivery disposition to a modified disposition.
pn_rejected_disposition_t * pn_rejected_disposition(pn_disposition_t *disposition)
Convert a delivery disposition to a rejected disposition.
void pn_received_disposition_set_section_number(pn_received_disposition_t *disposition, uint32_t section_number)
Set the section number associated with a received disposition.
uint64_t pn_disposition_type(pn_disposition_t *disposition)
Get the type of a disposition.
pn_condition_t * pn_rejected_disposition_condition(pn_rejected_disposition_t *disposition)
Access the condition object associated with a rejected disposition.
struct pn_transactional_disposition_t pn_transactional_disposition_t
A transactional delivery disposition.
Definition disposition.h:283
struct pn_disposition_t pn_disposition_t
A delivery state.
Definition disposition.h:52
pn_transactional_disposition_t * pn_transactional_disposition(pn_disposition_t *disposition)
Convert a delivery disposition to a transactional disposition.
const char * pn_disposition_type_name(uint64_t disposition_type)
Name of a disposition type for logging and debugging: "received", "accepted" etc.
void pn_disposition_set_section_offset(pn_disposition_t *disposition, uint64_t section_offset)
Set the section offset associated with a disposition.
uint32_t pn_disposition_get_section_number(pn_disposition_t *disposition)
Get the section number associated with a disposition.
void pn_transactional_disposition_set_outcome_type(pn_transactional_disposition_t *disposition, uint64_t outcome)
Set the provisional outcome of the del;ivery if the transaction is committed successfully.
bool pn_disposition_is_failed(pn_disposition_t *disposition)
Check if a disposition has the failed flag set.
struct pn_custom_disposition_t pn_custom_disposition_t
A custom delivery disposition.
Definition disposition.h:291
struct pn_modified_disposition_t pn_modified_disposition_t
A modified delivery disposition.
Definition disposition.h:269
void pn_transactional_disposition_set_id(pn_transactional_disposition_t *disposition, pn_bytes_t id)
Set the transaction id for a transactional disposition.
uint64_t pn_disposition_get_section_offset(pn_disposition_t *disposition)
Get the section offset associated with a disposition.
void pn_received_disposition_set_section_offset(pn_received_disposition_t *disposition, uint64_t section_offset)
Set the section offset associated with a received disposition.
void pn_disposition_set_failed(pn_disposition_t *disposition, bool failed)
Set the failed flag on a disposition.
void pn_disposition_set_undeliverable(pn_disposition_t *disposition, bool undeliverable)
Set the undeliverable flag on a disposition.
pn_data_t * pn_custom_disposition_data(pn_custom_disposition_t *disposition)
Access the disposition as a raw pn_data_t.
void pn_custom_disposition_set_type(pn_custom_disposition_t *disposition, uint64_t type)
Set the type of a custom disposition.
void pn_modified_disposition_set_undeliverable(pn_modified_disposition_t *disposition, bool undeliverable)
Set the undeliverable flag on a modified disposition.
pn_condition_t * pn_disposition_condition(pn_disposition_t *disposition)
Access the condition object associated with a disposition.
pn_received_disposition_t * pn_received_disposition(pn_disposition_t *disposition)
Convert a delivery disposition to a received disposition.
pn_data_t * pn_disposition_annotations(pn_disposition_t *disposition)
Access the annotations associated with a disposition.
bool pn_modified_disposition_is_failed(pn_modified_disposition_t *disposition)
Check if a modified disposition has the failed flag set.
void pn_disposition_clear(pn_disposition_t *disposition)
Clear a disposition.
pn_bytes_t pn_declared_disposition_get_id(pn_declared_disposition_t *disposition)
Get the transaction id for a transaction declared disposition.
void pn_modified_disposition_set_failed(pn_modified_disposition_t *disposition, bool failed)
Set the failed flag on a modified disposition.
uint64_t pn_received_disposition_get_section_offset(pn_received_disposition_t *disposition)
Get the section offset associated with a received disposition.
pn_declared_disposition_t * pn_declared_disposition(pn_disposition_t *disposition)
Convert a delivery disposition to a transaction declared disposition.
struct pn_rejected_disposition_t pn_rejected_disposition_t
A rejected delivery disposition.
Definition disposition.h:262
pn_data_t * pn_disposition_data(pn_disposition_t *disposition)
Access the disposition as a raw pn_data_t.
struct pn_declared_disposition_t pn_declared_disposition_t
A transaction declared delivery disposition.
Definition disposition.h:276
pn_custom_disposition_t * pn_custom_disposition(pn_disposition_t *disposition)
Convert a delivery disposition to a custom disposition.
bool pn_disposition_is_undeliverable(pn_disposition_t *disposition)
Check if a disposition has the undeliverable flag set.
uint64_t pn_custom_disposition_get_type(pn_custom_disposition_t *disposition)
Get the type of a custom disposition.
struct pn_received_disposition_t pn_received_disposition_t
A received delivery disposition.
Definition disposition.h:255