rabbitmq-c  0.2
C AMQP Client library for RabbitMQ
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
amqp_framing.h
Go to the documentation of this file.
1 /* Autogenerated code. Do not edit. */
3 #ifndef AMQP_FRAMING_H
4 #define AMQP_FRAMING_H
5 
6 #include <amqp.h>
7 
8 AMQP_BEGIN_DECLS
9 
10 #define AMQP_PROTOCOL_VERSION_MAJOR 0
11 #define AMQP_PROTOCOL_VERSION_MINOR 9
12 #define AMQP_PROTOCOL_VERSION_REVISION 1
13 #define AMQP_PROTOCOL_PORT 5672
14 #define AMQP_FRAME_METHOD 1
15 #define AMQP_FRAME_HEADER 2
16 #define AMQP_FRAME_BODY 3
17 #define AMQP_FRAME_HEARTBEAT 8
18 #define AMQP_FRAME_MIN_SIZE 4096
19 #define AMQP_FRAME_END 206
20 #define AMQP_REPLY_SUCCESS 200
21 #define AMQP_CONTENT_TOO_LARGE 311
22 #define AMQP_NO_ROUTE 312
23 #define AMQP_NO_CONSUMERS 313
24 #define AMQP_ACCESS_REFUSED 403
25 #define AMQP_NOT_FOUND 404
26 #define AMQP_RESOURCE_LOCKED 405
27 #define AMQP_PRECONDITION_FAILED 406
28 #define AMQP_CONNECTION_FORCED 320
29 #define AMQP_INVALID_PATH 402
30 #define AMQP_FRAME_ERROR 501
31 #define AMQP_SYNTAX_ERROR 502
32 #define AMQP_COMMAND_INVALID 503
33 #define AMQP_CHANNEL_ERROR 504
34 #define AMQP_UNEXPECTED_FRAME 505
35 #define AMQP_RESOURCE_ERROR 506
36 #define AMQP_NOT_ALLOWED 530
37 #define AMQP_NOT_IMPLEMENTED 540
38 #define AMQP_INTERNAL_ERROR 541
40 /* Function prototypes. */
41 
49 AMQP_PUBLIC_FUNCTION
50 char const *
51 AMQP_CALL amqp_constant_name(int constantNumber);
52 
62 AMQP_PUBLIC_FUNCTION
64 AMQP_CALL amqp_constant_is_hard_error(int constantNumber);
65 
73 AMQP_PUBLIC_FUNCTION
74 char const *
75 AMQP_CALL amqp_method_name(amqp_method_number_t methodNumber);
76 
86 AMQP_PUBLIC_FUNCTION
88 AMQP_CALL amqp_method_has_content(amqp_method_number_t methodNumber);
89 
99 AMQP_PUBLIC_FUNCTION
100 int
101 AMQP_CALL amqp_decode_method(amqp_method_number_t methodNumber,
102  amqp_pool_t *pool,
103  amqp_bytes_t encoded,
104  void **decoded);
105 
115 AMQP_PUBLIC_FUNCTION
116 int
117 AMQP_CALL amqp_decode_properties(uint16_t class_id,
118  amqp_pool_t *pool,
119  amqp_bytes_t encoded,
120  void **decoded);
121 
132 AMQP_PUBLIC_FUNCTION
133 int
134 AMQP_CALL amqp_encode_method(amqp_method_number_t methodNumber,
135  void *decoded,
136  amqp_bytes_t encoded);
137 
148 AMQP_PUBLIC_FUNCTION
149 int
150 AMQP_CALL amqp_encode_properties(uint16_t class_id,
151  void *decoded,
152  amqp_bytes_t encoded);
153 
154 /* Method field records. */
155 
156 #define AMQP_CONNECTION_START_METHOD ((amqp_method_number_t) 0x000A000A)
158 typedef struct amqp_connection_start_t_ {
159  uint8_t version_major;
160  uint8_t version_minor;
165 
166 #define AMQP_CONNECTION_START_OK_METHOD ((amqp_method_number_t) 0x000A000B)
168 typedef struct amqp_connection_start_ok_t_ {
174 
175 #define AMQP_CONNECTION_SECURE_METHOD ((amqp_method_number_t) 0x000A0014)
177 typedef struct amqp_connection_secure_t_ {
180 
181 #define AMQP_CONNECTION_SECURE_OK_METHOD ((amqp_method_number_t) 0x000A0015)
183 typedef struct amqp_connection_secure_ok_t_ {
186 
187 #define AMQP_CONNECTION_TUNE_METHOD ((amqp_method_number_t) 0x000A001E)
189 typedef struct amqp_connection_tune_t_ {
190  uint16_t channel_max;
191  uint32_t frame_max;
192  uint16_t heartbeat;
194 
195 #define AMQP_CONNECTION_TUNE_OK_METHOD ((amqp_method_number_t) 0x000A001F)
197 typedef struct amqp_connection_tune_ok_t_ {
198  uint16_t channel_max;
199  uint32_t frame_max;
200  uint16_t heartbeat;
202 
203 #define AMQP_CONNECTION_OPEN_METHOD ((amqp_method_number_t) 0x000A0028)
205 typedef struct amqp_connection_open_t_ {
210 
211 #define AMQP_CONNECTION_OPEN_OK_METHOD ((amqp_method_number_t) 0x000A0029)
213 typedef struct amqp_connection_open_ok_t_ {
216 
217 #define AMQP_CONNECTION_CLOSE_METHOD ((amqp_method_number_t) 0x000A0032)
219 typedef struct amqp_connection_close_t_ {
220  uint16_t reply_code;
222  uint16_t class_id;
223  uint16_t method_id;
225 
226 #define AMQP_CONNECTION_CLOSE_OK_METHOD ((amqp_method_number_t) 0x000A0033)
228 typedef struct amqp_connection_close_ok_t_ {
229  char dummy;
231 
232 #define AMQP_CHANNEL_OPEN_METHOD ((amqp_method_number_t) 0x0014000A)
234 typedef struct amqp_channel_open_t_ {
237 
238 #define AMQP_CHANNEL_OPEN_OK_METHOD ((amqp_method_number_t) 0x0014000B)
240 typedef struct amqp_channel_open_ok_t_ {
243 
244 #define AMQP_CHANNEL_FLOW_METHOD ((amqp_method_number_t) 0x00140014)
246 typedef struct amqp_channel_flow_t_ {
249 
250 #define AMQP_CHANNEL_FLOW_OK_METHOD ((amqp_method_number_t) 0x00140015)
252 typedef struct amqp_channel_flow_ok_t_ {
255 
256 #define AMQP_CHANNEL_CLOSE_METHOD ((amqp_method_number_t) 0x00140028)
258 typedef struct amqp_channel_close_t_ {
259  uint16_t reply_code;
261  uint16_t class_id;
262  uint16_t method_id;
264 
265 #define AMQP_CHANNEL_CLOSE_OK_METHOD ((amqp_method_number_t) 0x00140029)
267 typedef struct amqp_channel_close_ok_t_ {
268  char dummy;
270 
271 #define AMQP_ACCESS_REQUEST_METHOD ((amqp_method_number_t) 0x001E000A)
273 typedef struct amqp_access_request_t_ {
281 
282 #define AMQP_ACCESS_REQUEST_OK_METHOD ((amqp_method_number_t) 0x001E000B)
284 typedef struct amqp_access_request_ok_t_ {
285  uint16_t ticket;
287 
288 #define AMQP_EXCHANGE_DECLARE_METHOD ((amqp_method_number_t) 0x0028000A)
290 typedef struct amqp_exchange_declare_t_ {
291  uint16_t ticket;
297  amqp_boolean_t internal;
301 
302 #define AMQP_EXCHANGE_DECLARE_OK_METHOD ((amqp_method_number_t) 0x0028000B)
304 typedef struct amqp_exchange_declare_ok_t_ {
305  char dummy;
307 
308 #define AMQP_EXCHANGE_DELETE_METHOD ((amqp_method_number_t) 0x00280014)
310 typedef struct amqp_exchange_delete_t_ {
311  uint16_t ticket;
316 
317 #define AMQP_EXCHANGE_DELETE_OK_METHOD ((amqp_method_number_t) 0x00280015)
319 typedef struct amqp_exchange_delete_ok_t_ {
320  char dummy;
322 
323 #define AMQP_EXCHANGE_BIND_METHOD ((amqp_method_number_t) 0x0028001E)
325 typedef struct amqp_exchange_bind_t_ {
326  uint16_t ticket;
333 
334 #define AMQP_EXCHANGE_BIND_OK_METHOD ((amqp_method_number_t) 0x0028001F)
336 typedef struct amqp_exchange_bind_ok_t_ {
337  char dummy;
339 
340 #define AMQP_EXCHANGE_UNBIND_METHOD ((amqp_method_number_t) 0x00280028)
342 typedef struct amqp_exchange_unbind_t_ {
343  uint16_t ticket;
350 
351 #define AMQP_EXCHANGE_UNBIND_OK_METHOD ((amqp_method_number_t) 0x00280033)
353 typedef struct amqp_exchange_unbind_ok_t_ {
354  char dummy;
356 
357 #define AMQP_QUEUE_DECLARE_METHOD ((amqp_method_number_t) 0x0032000A)
359 typedef struct amqp_queue_declare_t_ {
360  uint16_t ticket;
369 
370 #define AMQP_QUEUE_DECLARE_OK_METHOD ((amqp_method_number_t) 0x0032000B)
372 typedef struct amqp_queue_declare_ok_t_ {
374  uint32_t message_count;
375  uint32_t consumer_count;
377 
378 #define AMQP_QUEUE_BIND_METHOD ((amqp_method_number_t) 0x00320014)
380 typedef struct amqp_queue_bind_t_ {
381  uint16_t ticket;
388 
389 #define AMQP_QUEUE_BIND_OK_METHOD ((amqp_method_number_t) 0x00320015)
391 typedef struct amqp_queue_bind_ok_t_ {
392  char dummy;
394 
395 #define AMQP_QUEUE_PURGE_METHOD ((amqp_method_number_t) 0x0032001E)
397 typedef struct amqp_queue_purge_t_ {
398  uint16_t ticket;
402 
403 #define AMQP_QUEUE_PURGE_OK_METHOD ((amqp_method_number_t) 0x0032001F)
405 typedef struct amqp_queue_purge_ok_t_ {
406  uint32_t message_count;
408 
409 #define AMQP_QUEUE_DELETE_METHOD ((amqp_method_number_t) 0x00320028)
411 typedef struct amqp_queue_delete_t_ {
412  uint16_t ticket;
418 
419 #define AMQP_QUEUE_DELETE_OK_METHOD ((amqp_method_number_t) 0x00320029)
421 typedef struct amqp_queue_delete_ok_t_ {
422  uint32_t message_count;
424 
425 #define AMQP_QUEUE_UNBIND_METHOD ((amqp_method_number_t) 0x00320032)
427 typedef struct amqp_queue_unbind_t_ {
428  uint16_t ticket;
434 
435 #define AMQP_QUEUE_UNBIND_OK_METHOD ((amqp_method_number_t) 0x00320033)
437 typedef struct amqp_queue_unbind_ok_t_ {
438  char dummy;
440 
441 #define AMQP_BASIC_QOS_METHOD ((amqp_method_number_t) 0x003C000A)
443 typedef struct amqp_basic_qos_t_ {
444  uint32_t prefetch_size;
445  uint16_t prefetch_count;
448 
449 #define AMQP_BASIC_QOS_OK_METHOD ((amqp_method_number_t) 0x003C000B)
451 typedef struct amqp_basic_qos_ok_t_ {
452  char dummy;
454 
455 #define AMQP_BASIC_CONSUME_METHOD ((amqp_method_number_t) 0x003C0014)
457 typedef struct amqp_basic_consume_t_ {
458  uint16_t ticket;
467 
468 #define AMQP_BASIC_CONSUME_OK_METHOD ((amqp_method_number_t) 0x003C0015)
470 typedef struct amqp_basic_consume_ok_t_ {
473 
474 #define AMQP_BASIC_CANCEL_METHOD ((amqp_method_number_t) 0x003C001E)
476 typedef struct amqp_basic_cancel_t_ {
480 
481 #define AMQP_BASIC_CANCEL_OK_METHOD ((amqp_method_number_t) 0x003C001F)
483 typedef struct amqp_basic_cancel_ok_t_ {
486 
487 #define AMQP_BASIC_PUBLISH_METHOD ((amqp_method_number_t) 0x003C0028)
489 typedef struct amqp_basic_publish_t_ {
490  uint16_t ticket;
496 
497 #define AMQP_BASIC_RETURN_METHOD ((amqp_method_number_t) 0x003C0032)
499 typedef struct amqp_basic_return_t_ {
500  uint16_t reply_code;
505 
506 #define AMQP_BASIC_DELIVER_METHOD ((amqp_method_number_t) 0x003C003C)
508 typedef struct amqp_basic_deliver_t_ {
510  uint64_t delivery_tag;
515 
516 #define AMQP_BASIC_GET_METHOD ((amqp_method_number_t) 0x003C0046)
518 typedef struct amqp_basic_get_t_ {
519  uint16_t ticket;
523 
524 #define AMQP_BASIC_GET_OK_METHOD ((amqp_method_number_t) 0x003C0047)
526 typedef struct amqp_basic_get_ok_t_ {
527  uint64_t delivery_tag;
531  uint32_t message_count;
533 
534 #define AMQP_BASIC_GET_EMPTY_METHOD ((amqp_method_number_t) 0x003C0048)
536 typedef struct amqp_basic_get_empty_t_ {
539 
540 #define AMQP_BASIC_ACK_METHOD ((amqp_method_number_t) 0x003C0050)
542 typedef struct amqp_basic_ack_t_ {
543  uint64_t delivery_tag;
546 
547 #define AMQP_BASIC_REJECT_METHOD ((amqp_method_number_t) 0x003C005A)
549 typedef struct amqp_basic_reject_t_ {
550  uint64_t delivery_tag;
553 
554 #define AMQP_BASIC_RECOVER_ASYNC_METHOD ((amqp_method_number_t) 0x003C0064)
556 typedef struct amqp_basic_recover_async_t_ {
559 
560 #define AMQP_BASIC_RECOVER_METHOD ((amqp_method_number_t) 0x003C006E)
562 typedef struct amqp_basic_recover_t_ {
565 
566 #define AMQP_BASIC_RECOVER_OK_METHOD ((amqp_method_number_t) 0x003C006F)
568 typedef struct amqp_basic_recover_ok_t_ {
569  char dummy;
571 
572 #define AMQP_BASIC_NACK_METHOD ((amqp_method_number_t) 0x003C0078)
574 typedef struct amqp_basic_nack_t_ {
575  uint64_t delivery_tag;
579 
580 #define AMQP_TX_SELECT_METHOD ((amqp_method_number_t) 0x005A000A)
582 typedef struct amqp_tx_select_t_ {
583  char dummy;
585 
586 #define AMQP_TX_SELECT_OK_METHOD ((amqp_method_number_t) 0x005A000B)
588 typedef struct amqp_tx_select_ok_t_ {
589  char dummy;
591 
592 #define AMQP_TX_COMMIT_METHOD ((amqp_method_number_t) 0x005A0014)
594 typedef struct amqp_tx_commit_t_ {
595  char dummy;
597 
598 #define AMQP_TX_COMMIT_OK_METHOD ((amqp_method_number_t) 0x005A0015)
600 typedef struct amqp_tx_commit_ok_t_ {
601  char dummy;
603 
604 #define AMQP_TX_ROLLBACK_METHOD ((amqp_method_number_t) 0x005A001E)
606 typedef struct amqp_tx_rollback_t_ {
607  char dummy;
609 
610 #define AMQP_TX_ROLLBACK_OK_METHOD ((amqp_method_number_t) 0x005A001F)
612 typedef struct amqp_tx_rollback_ok_t_ {
613  char dummy;
615 
616 #define AMQP_CONFIRM_SELECT_METHOD ((amqp_method_number_t) 0x0055000A)
618 typedef struct amqp_confirm_select_t_ {
621 
622 #define AMQP_CONFIRM_SELECT_OK_METHOD ((amqp_method_number_t) 0x0055000B)
624 typedef struct amqp_confirm_select_ok_t_ {
625  char dummy;
627 
628 /* Class property records. */
629 #define AMQP_CONNECTION_CLASS (0x000A)
631 typedef struct amqp_connection_properties_t_ {
633  char dummy;
635 
636 #define AMQP_CHANNEL_CLASS (0x0014)
638 typedef struct amqp_channel_properties_t_ {
640  char dummy;
642 
643 #define AMQP_ACCESS_CLASS (0x001E)
645 typedef struct amqp_access_properties_t_ {
647  char dummy;
649 
650 #define AMQP_EXCHANGE_CLASS (0x0028)
652 typedef struct amqp_exchange_properties_t_ {
654  char dummy;
656 
657 #define AMQP_QUEUE_CLASS (0x0032)
659 typedef struct amqp_queue_properties_t_ {
661  char dummy;
663 
664 #define AMQP_BASIC_CLASS (0x003C)
665 #define AMQP_BASIC_CONTENT_TYPE_FLAG (1 << 15)
666 #define AMQP_BASIC_CONTENT_ENCODING_FLAG (1 << 14)
667 #define AMQP_BASIC_HEADERS_FLAG (1 << 13)
668 #define AMQP_BASIC_DELIVERY_MODE_FLAG (1 << 12)
669 #define AMQP_BASIC_PRIORITY_FLAG (1 << 11)
670 #define AMQP_BASIC_CORRELATION_ID_FLAG (1 << 10)
671 #define AMQP_BASIC_REPLY_TO_FLAG (1 << 9)
672 #define AMQP_BASIC_EXPIRATION_FLAG (1 << 8)
673 #define AMQP_BASIC_MESSAGE_ID_FLAG (1 << 7)
674 #define AMQP_BASIC_TIMESTAMP_FLAG (1 << 6)
675 #define AMQP_BASIC_TYPE_FLAG (1 << 5)
676 #define AMQP_BASIC_USER_ID_FLAG (1 << 4)
677 #define AMQP_BASIC_APP_ID_FLAG (1 << 3)
678 #define AMQP_BASIC_CLUSTER_ID_FLAG (1 << 2)
680 typedef struct amqp_basic_properties_t_ {
685  uint8_t delivery_mode;
686  uint8_t priority;
691  uint64_t timestamp;
697 
698 #define AMQP_TX_CLASS (0x005A)
700 typedef struct amqp_tx_properties_t_ {
702  char dummy;
704 
705 #define AMQP_CONFIRM_CLASS (0x0055)
707 typedef struct amqp_confirm_properties_t_ {
709  char dummy;
711 
712 /* API functions for methods */
713 
721 AMQP_PUBLIC_FUNCTION
732 AMQP_PUBLIC_FUNCTION
747 AMQP_PUBLIC_FUNCTION
749 AMQP_CALL amqp_exchange_declare(amqp_connection_state_t state, amqp_channel_t channel, amqp_bytes_t exchange, amqp_bytes_t type, amqp_boolean_t passive, amqp_boolean_t durable, amqp_table_t arguments);
759 AMQP_PUBLIC_FUNCTION
761 AMQP_CALL amqp_exchange_delete(amqp_connection_state_t state, amqp_channel_t channel, amqp_bytes_t exchange, amqp_boolean_t if_unused);
773 AMQP_PUBLIC_FUNCTION
775 AMQP_CALL amqp_exchange_bind(amqp_connection_state_t state, amqp_channel_t channel, amqp_bytes_t destination, amqp_bytes_t source, amqp_bytes_t routing_key, amqp_table_t arguments);
787 AMQP_PUBLIC_FUNCTION
789 AMQP_CALL amqp_exchange_unbind(amqp_connection_state_t state, amqp_channel_t channel, amqp_bytes_t destination, amqp_bytes_t source, amqp_bytes_t routing_key, amqp_table_t arguments);
803 AMQP_PUBLIC_FUNCTION
805 AMQP_CALL amqp_queue_declare(amqp_connection_state_t state, amqp_channel_t channel, amqp_bytes_t queue, amqp_boolean_t passive, amqp_boolean_t durable, amqp_boolean_t exclusive, amqp_boolean_t auto_delete, amqp_table_t arguments);
817 AMQP_PUBLIC_FUNCTION
819 AMQP_CALL amqp_queue_bind(amqp_connection_state_t state, amqp_channel_t channel, amqp_bytes_t queue, amqp_bytes_t exchange, amqp_bytes_t routing_key, amqp_table_t arguments);
828 AMQP_PUBLIC_FUNCTION
841 AMQP_PUBLIC_FUNCTION
843 AMQP_CALL amqp_queue_delete(amqp_connection_state_t state, amqp_channel_t channel, amqp_bytes_t queue, amqp_boolean_t if_unused, amqp_boolean_t if_empty);
855 AMQP_PUBLIC_FUNCTION
857 AMQP_CALL amqp_queue_unbind(amqp_connection_state_t state, amqp_channel_t channel, amqp_bytes_t queue, amqp_bytes_t exchange, amqp_bytes_t routing_key, amqp_table_t arguments);
868 AMQP_PUBLIC_FUNCTION
870 AMQP_CALL amqp_basic_qos(amqp_connection_state_t state, amqp_channel_t channel, uint32_t prefetch_size, uint16_t prefetch_count, amqp_boolean_t global);
884 AMQP_PUBLIC_FUNCTION
886 AMQP_CALL amqp_basic_consume(amqp_connection_state_t state, amqp_channel_t channel, amqp_bytes_t queue, amqp_bytes_t consumer_tag, amqp_boolean_t no_local, amqp_boolean_t no_ack, amqp_boolean_t exclusive, amqp_table_t arguments);
895 AMQP_PUBLIC_FUNCTION
897 AMQP_CALL amqp_basic_cancel(amqp_connection_state_t state, amqp_channel_t channel, amqp_bytes_t consumer_tag);
906 AMQP_PUBLIC_FUNCTION
916 AMQP_PUBLIC_FUNCTION
918 AMQP_CALL amqp_tx_select(amqp_connection_state_t state, amqp_channel_t channel);
926 AMQP_PUBLIC_FUNCTION
928 AMQP_CALL amqp_tx_commit(amqp_connection_state_t state, amqp_channel_t channel);
936 AMQP_PUBLIC_FUNCTION
946 AMQP_PUBLIC_FUNCTION
949 
950 AMQP_END_DECLS
951 
952 #endif /* AMQP_FRAMING_H */