37 #ifndef AMQP_FRAMING_H
38 #define AMQP_FRAMING_H
44 #define AMQP_PROTOCOL_VERSION_MAJOR 0
45 #define AMQP_PROTOCOL_VERSION_MINOR 9
46 #define AMQP_PROTOCOL_VERSION_REVISION 1
47 #define AMQP_PROTOCOL_PORT 5672
48 #define AMQP_FRAME_METHOD 1
49 #define AMQP_FRAME_HEADER 2
50 #define AMQP_FRAME_BODY 3
51 #define AMQP_FRAME_HEARTBEAT 8
52 #define AMQP_FRAME_MIN_SIZE 4096
53 #define AMQP_FRAME_END 206
54 #define AMQP_REPLY_SUCCESS 200
55 #define AMQP_CONTENT_TOO_LARGE 311
56 #define AMQP_NO_ROUTE 312
57 #define AMQP_NO_CONSUMERS 313
58 #define AMQP_ACCESS_REFUSED 403
59 #define AMQP_NOT_FOUND 404
60 #define AMQP_RESOURCE_LOCKED 405
61 #define AMQP_PRECONDITION_FAILED 406
62 #define AMQP_CONNECTION_FORCED 320
63 #define AMQP_INVALID_PATH 402
64 #define AMQP_FRAME_ERROR 501
65 #define AMQP_SYNTAX_ERROR 502
66 #define AMQP_COMMAND_INVALID 503
67 #define AMQP_CHANNEL_ERROR 504
68 #define AMQP_UNEXPECTED_FRAME 505
69 #define AMQP_RESOURCE_ERROR 506
70 #define AMQP_NOT_ALLOWED 530
71 #define AMQP_NOT_IMPLEMENTED 540
72 #define AMQP_INTERNAL_ERROR 541
78 AMQP_CALL amqp_constant_name(
int constantNumber);
82 AMQP_CALL amqp_constant_is_hard_error(
int constantNumber);
101 AMQP_CALL amqp_decode_properties(uint16_t class_id,
114 AMQP_CALL amqp_encode_properties(uint16_t class_id,
120 #define AMQP_CONNECTION_START_METHOD ((amqp_method_number_t) 0x000A000A)
121 typedef struct amqp_connection_start_t_ {
122 uint8_t version_major;
123 uint8_t version_minor;
129 #define AMQP_CONNECTION_START_OK_METHOD ((amqp_method_number_t) 0x000A000B)
130 typedef struct amqp_connection_start_ok_t_ {
137 #define AMQP_CONNECTION_SECURE_METHOD ((amqp_method_number_t) 0x000A0014)
138 typedef struct amqp_connection_secure_t_ {
142 #define AMQP_CONNECTION_SECURE_OK_METHOD ((amqp_method_number_t) 0x000A0015)
143 typedef struct amqp_connection_secure_ok_t_ {
147 #define AMQP_CONNECTION_TUNE_METHOD ((amqp_method_number_t) 0x000A001E)
148 typedef struct amqp_connection_tune_t_ {
149 uint16_t channel_max;
154 #define AMQP_CONNECTION_TUNE_OK_METHOD ((amqp_method_number_t) 0x000A001F)
155 typedef struct amqp_connection_tune_ok_t_ {
156 uint16_t channel_max;
161 #define AMQP_CONNECTION_OPEN_METHOD ((amqp_method_number_t) 0x000A0028)
162 typedef struct amqp_connection_open_t_ {
168 #define AMQP_CONNECTION_OPEN_OK_METHOD ((amqp_method_number_t) 0x000A0029)
169 typedef struct amqp_connection_open_ok_t_ {
173 #define AMQP_CONNECTION_CLOSE_METHOD ((amqp_method_number_t) 0x000A0032)
174 typedef struct amqp_connection_close_t_ {
181 #define AMQP_CONNECTION_CLOSE_OK_METHOD ((amqp_method_number_t) 0x000A0033)
182 typedef struct amqp_connection_close_ok_t_ {
186 #define AMQP_CONNECTION_BLOCKED_METHOD ((amqp_method_number_t) 0x000A003C)
187 typedef struct amqp_connection_blocked_t_ {
191 #define AMQP_CONNECTION_UNBLOCKED_METHOD ((amqp_method_number_t) 0x000A003D)
192 typedef struct amqp_connection_unblocked_t_ {
196 #define AMQP_CHANNEL_OPEN_METHOD ((amqp_method_number_t) 0x0014000A)
197 typedef struct amqp_channel_open_t_ {
201 #define AMQP_CHANNEL_OPEN_OK_METHOD ((amqp_method_number_t) 0x0014000B)
202 typedef struct amqp_channel_open_ok_t_ {
206 #define AMQP_CHANNEL_FLOW_METHOD ((amqp_method_number_t) 0x00140014)
207 typedef struct amqp_channel_flow_t_ {
211 #define AMQP_CHANNEL_FLOW_OK_METHOD ((amqp_method_number_t) 0x00140015)
212 typedef struct amqp_channel_flow_ok_t_ {
216 #define AMQP_CHANNEL_CLOSE_METHOD ((amqp_method_number_t) 0x00140028)
217 typedef struct amqp_channel_close_t_ {
224 #define AMQP_CHANNEL_CLOSE_OK_METHOD ((amqp_method_number_t) 0x00140029)
225 typedef struct amqp_channel_close_ok_t_ {
229 #define AMQP_ACCESS_REQUEST_METHOD ((amqp_method_number_t) 0x001E000A)
230 typedef struct amqp_access_request_t_ {
239 #define AMQP_ACCESS_REQUEST_OK_METHOD ((amqp_method_number_t) 0x001E000B)
240 typedef struct amqp_access_request_ok_t_ {
244 #define AMQP_EXCHANGE_DECLARE_METHOD ((amqp_method_number_t) 0x0028000A)
245 typedef struct amqp_exchange_declare_t_ {
257 #define AMQP_EXCHANGE_DECLARE_OK_METHOD ((amqp_method_number_t) 0x0028000B)
258 typedef struct amqp_exchange_declare_ok_t_ {
262 #define AMQP_EXCHANGE_DELETE_METHOD ((amqp_method_number_t) 0x00280014)
263 typedef struct amqp_exchange_delete_t_ {
270 #define AMQP_EXCHANGE_DELETE_OK_METHOD ((amqp_method_number_t) 0x00280015)
271 typedef struct amqp_exchange_delete_ok_t_ {
275 #define AMQP_EXCHANGE_BIND_METHOD ((amqp_method_number_t) 0x0028001E)
276 typedef struct amqp_exchange_bind_t_ {
285 #define AMQP_EXCHANGE_BIND_OK_METHOD ((amqp_method_number_t) 0x0028001F)
286 typedef struct amqp_exchange_bind_ok_t_ {
290 #define AMQP_EXCHANGE_UNBIND_METHOD ((amqp_method_number_t) 0x00280028)
291 typedef struct amqp_exchange_unbind_t_ {
300 #define AMQP_EXCHANGE_UNBIND_OK_METHOD ((amqp_method_number_t) 0x00280033)
301 typedef struct amqp_exchange_unbind_ok_t_ {
305 #define AMQP_QUEUE_DECLARE_METHOD ((amqp_method_number_t) 0x0032000A)
306 typedef struct amqp_queue_declare_t_ {
317 #define AMQP_QUEUE_DECLARE_OK_METHOD ((amqp_method_number_t) 0x0032000B)
318 typedef struct amqp_queue_declare_ok_t_ {
320 uint32_t message_count;
321 uint32_t consumer_count;
324 #define AMQP_QUEUE_BIND_METHOD ((amqp_method_number_t) 0x00320014)
325 typedef struct amqp_queue_bind_t_ {
334 #define AMQP_QUEUE_BIND_OK_METHOD ((amqp_method_number_t) 0x00320015)
335 typedef struct amqp_queue_bind_ok_t_ {
339 #define AMQP_QUEUE_PURGE_METHOD ((amqp_method_number_t) 0x0032001E)
340 typedef struct amqp_queue_purge_t_ {
346 #define AMQP_QUEUE_PURGE_OK_METHOD ((amqp_method_number_t) 0x0032001F)
347 typedef struct amqp_queue_purge_ok_t_ {
348 uint32_t message_count;
351 #define AMQP_QUEUE_DELETE_METHOD ((amqp_method_number_t) 0x00320028)
352 typedef struct amqp_queue_delete_t_ {
360 #define AMQP_QUEUE_DELETE_OK_METHOD ((amqp_method_number_t) 0x00320029)
361 typedef struct amqp_queue_delete_ok_t_ {
362 uint32_t message_count;
365 #define AMQP_QUEUE_UNBIND_METHOD ((amqp_method_number_t) 0x00320032)
366 typedef struct amqp_queue_unbind_t_ {
374 #define AMQP_QUEUE_UNBIND_OK_METHOD ((amqp_method_number_t) 0x00320033)
375 typedef struct amqp_queue_unbind_ok_t_ {
379 #define AMQP_BASIC_QOS_METHOD ((amqp_method_number_t) 0x003C000A)
380 typedef struct amqp_basic_qos_t_ {
381 uint32_t prefetch_size;
382 uint16_t prefetch_count;
386 #define AMQP_BASIC_QOS_OK_METHOD ((amqp_method_number_t) 0x003C000B)
387 typedef struct amqp_basic_qos_ok_t_ {
391 #define AMQP_BASIC_CONSUME_METHOD ((amqp_method_number_t) 0x003C0014)
392 typedef struct amqp_basic_consume_t_ {
403 #define AMQP_BASIC_CONSUME_OK_METHOD ((amqp_method_number_t) 0x003C0015)
404 typedef struct amqp_basic_consume_ok_t_ {
408 #define AMQP_BASIC_CANCEL_METHOD ((amqp_method_number_t) 0x003C001E)
409 typedef struct amqp_basic_cancel_t_ {
414 #define AMQP_BASIC_CANCEL_OK_METHOD ((amqp_method_number_t) 0x003C001F)
415 typedef struct amqp_basic_cancel_ok_t_ {
419 #define AMQP_BASIC_PUBLISH_METHOD ((amqp_method_number_t) 0x003C0028)
420 typedef struct amqp_basic_publish_t_ {
428 #define AMQP_BASIC_RETURN_METHOD ((amqp_method_number_t) 0x003C0032)
429 typedef struct amqp_basic_return_t_ {
436 #define AMQP_BASIC_DELIVER_METHOD ((amqp_method_number_t) 0x003C003C)
437 typedef struct amqp_basic_deliver_t_ {
439 uint64_t delivery_tag;
445 #define AMQP_BASIC_GET_METHOD ((amqp_method_number_t) 0x003C0046)
446 typedef struct amqp_basic_get_t_ {
452 #define AMQP_BASIC_GET_OK_METHOD ((amqp_method_number_t) 0x003C0047)
453 typedef struct amqp_basic_get_ok_t_ {
454 uint64_t delivery_tag;
458 uint32_t message_count;
461 #define AMQP_BASIC_GET_EMPTY_METHOD ((amqp_method_number_t) 0x003C0048)
462 typedef struct amqp_basic_get_empty_t_ {
466 #define AMQP_BASIC_ACK_METHOD ((amqp_method_number_t) 0x003C0050)
467 typedef struct amqp_basic_ack_t_ {
468 uint64_t delivery_tag;
472 #define AMQP_BASIC_REJECT_METHOD ((amqp_method_number_t) 0x003C005A)
473 typedef struct amqp_basic_reject_t_ {
474 uint64_t delivery_tag;
478 #define AMQP_BASIC_RECOVER_ASYNC_METHOD ((amqp_method_number_t) 0x003C0064)
479 typedef struct amqp_basic_recover_async_t_ {
483 #define AMQP_BASIC_RECOVER_METHOD ((amqp_method_number_t) 0x003C006E)
484 typedef struct amqp_basic_recover_t_ {
488 #define AMQP_BASIC_RECOVER_OK_METHOD ((amqp_method_number_t) 0x003C006F)
489 typedef struct amqp_basic_recover_ok_t_ {
493 #define AMQP_BASIC_NACK_METHOD ((amqp_method_number_t) 0x003C0078)
494 typedef struct amqp_basic_nack_t_ {
495 uint64_t delivery_tag;
500 #define AMQP_TX_SELECT_METHOD ((amqp_method_number_t) 0x005A000A)
501 typedef struct amqp_tx_select_t_ {
505 #define AMQP_TX_SELECT_OK_METHOD ((amqp_method_number_t) 0x005A000B)
506 typedef struct amqp_tx_select_ok_t_ {
510 #define AMQP_TX_COMMIT_METHOD ((amqp_method_number_t) 0x005A0014)
511 typedef struct amqp_tx_commit_t_ {
515 #define AMQP_TX_COMMIT_OK_METHOD ((amqp_method_number_t) 0x005A0015)
516 typedef struct amqp_tx_commit_ok_t_ {
520 #define AMQP_TX_ROLLBACK_METHOD ((amqp_method_number_t) 0x005A001E)
521 typedef struct amqp_tx_rollback_t_ {
525 #define AMQP_TX_ROLLBACK_OK_METHOD ((amqp_method_number_t) 0x005A001F)
526 typedef struct amqp_tx_rollback_ok_t_ {
530 #define AMQP_CONFIRM_SELECT_METHOD ((amqp_method_number_t) 0x0055000A)
531 typedef struct amqp_confirm_select_t_ {
535 #define AMQP_CONFIRM_SELECT_OK_METHOD ((amqp_method_number_t) 0x0055000B)
536 typedef struct amqp_confirm_select_ok_t_ {
541 #define AMQP_CONNECTION_CLASS (0x000A)
542 typedef struct amqp_connection_properties_t_ {
547 #define AMQP_CHANNEL_CLASS (0x0014)
548 typedef struct amqp_channel_properties_t_ {
553 #define AMQP_ACCESS_CLASS (0x001E)
554 typedef struct amqp_access_properties_t_ {
559 #define AMQP_EXCHANGE_CLASS (0x0028)
560 typedef struct amqp_exchange_properties_t_ {
565 #define AMQP_QUEUE_CLASS (0x0032)
566 typedef struct amqp_queue_properties_t_ {
571 #define AMQP_BASIC_CLASS (0x003C)
572 #define AMQP_BASIC_CONTENT_TYPE_FLAG (1 << 15)
573 #define AMQP_BASIC_CONTENT_ENCODING_FLAG (1 << 14)
574 #define AMQP_BASIC_HEADERS_FLAG (1 << 13)
575 #define AMQP_BASIC_DELIVERY_MODE_FLAG (1 << 12)
576 #define AMQP_BASIC_PRIORITY_FLAG (1 << 11)
577 #define AMQP_BASIC_CORRELATION_ID_FLAG (1 << 10)
578 #define AMQP_BASIC_REPLY_TO_FLAG (1 << 9)
579 #define AMQP_BASIC_EXPIRATION_FLAG (1 << 8)
580 #define AMQP_BASIC_MESSAGE_ID_FLAG (1 << 7)
581 #define AMQP_BASIC_TIMESTAMP_FLAG (1 << 6)
582 #define AMQP_BASIC_TYPE_FLAG (1 << 5)
583 #define AMQP_BASIC_USER_ID_FLAG (1 << 4)
584 #define AMQP_BASIC_APP_ID_FLAG (1 << 3)
585 #define AMQP_BASIC_CLUSTER_ID_FLAG (1 << 2)
586 typedef struct amqp_basic_properties_t_ {
591 uint8_t delivery_mode;
604 #define AMQP_TX_CLASS (0x005A)
605 typedef struct amqp_tx_properties_t_ {
610 #define AMQP_CONFIRM_CLASS (0x0055)
611 typedef struct amqp_confirm_properties_t_ {
uint16_t amqp_channel_t
Channel type.
Definition: amqp.h:370
Definition: amqp_framing.h:409
Definition: amqp_framing.h:325
Definition: amqp_framing.h:566
Definition: amqp_framing.h:467
Definition: amqp_framing.h:479
AMQP field table.
Definition: amqp.h:404
Definition: amqp_framing.h:245
Definition: amqp_framing.h:429
Definition: amqp_framing.h:230
Definition: amqp_framing.h:366
Definition: amqp_framing.h:187
uint32_t amqp_flags_t
Bitmask for flags.
Definition: amqp.h:363
Definition: amqp_framing.h:130
Definition: amqp_framing.h:155
Definition: amqp_framing.h:225
Definition: amqp_framing.h:542
Definition: amqp_framing.h:174
Definition: amqp_framing.h:489
Definition: amqp_framing.h:501
Definition: amqp_framing.h:271
Definition: amqp_framing.h:121
Definition: amqp_framing.h:521
Definition: amqp_framing.h:611
Definition: amqp_framing.h:182
Definition: amqp_framing.h:494
Definition: amqp_framing.h:554
Definition: amqp_framing.h:484
Definition: amqp_framing.h:212
Definition: amqp_framing.h:162
Definition: amqp_framing.h:286
Definition: amqp_framing.h:453
uint32_t amqp_method_number_t
Method number.
Definition: amqp.h:356
Definition: amqp_framing.h:258
Definition: amqp_framing.h:446
Definition: amqp_framing.h:169
Definition: amqp_framing.h:197
int amqp_boolean_t
boolean type 0 = false, true otherwise
Definition: amqp.h:349
Definition: amqp_framing.h:531
Definition: amqp_framing.h:506
Definition: amqp_framing.h:404
Definition: amqp_framing.h:192
Definition: amqp_framing.h:605
Definition: amqp_framing.h:473
Definition: amqp_framing.h:437
Definition: amqp_framing.h:420
Definition: amqp_framing.h:217
Definition: amqp_framing.h:380
Definition: amqp_framing.h:526
Definition: amqp_framing.h:291
Definition: amqp_framing.h:392
Definition: amqp_framing.h:143
Definition: amqp_framing.h:415
Definition: amqp_framing.h:387
Definition: amqp_framing.h:335
Definition: amqp_framing.h:276
Definition: amqp_framing.h:202
Definition: amqp_framing.h:347
Definition: amqp_framing.h:306
Definition: amqp_framing.h:263
Definition: amqp_framing.h:586
Definition: amqp_framing.h:536
Definition: amqp_framing.h:340
Buffer descriptor.
Definition: amqp.h:377
A memory pool.
Definition: amqp.h:540
Definition: amqp_framing.h:352
Definition: amqp_framing.h:548
Definition: amqp_framing.h:301
Definition: amqp_framing.h:375
Definition: amqp_framing.h:148
Definition: amqp_framing.h:516
Definition: amqp_framing.h:361
Definition: amqp_framing.h:462
Definition: amqp_framing.h:240
Definition: amqp_framing.h:560
Definition: amqp_framing.h:511
Definition: amqp_framing.h:318
struct amqp_connection_state_t_ * amqp_connection_state_t
connection state object
Definition: amqp.h:644
Definition: amqp_framing.h:207
Definition: amqp_framing.h:138