rabbitmq-c
0.5.3
C AMQP Client library for RabbitMQ
|
00001 /* Generated code. Do not edit. Edit and re-run codegen.py instead. 00002 * 00003 * ***** BEGIN LICENSE BLOCK ***** 00004 * Version: MIT 00005 * 00006 * Portions created by Alan Antonuk are Copyright (c) 2012-2013 00007 * Alan Antonuk. All Rights Reserved. 00008 * 00009 * Portions created by VMware are Copyright (c) 2007-2012 VMware, Inc. 00010 * All Rights Reserved. 00011 * 00012 * Portions created by Tony Garnock-Jones are Copyright (c) 2009-2010 00013 * VMware, Inc. and Tony Garnock-Jones. All Rights Reserved. 00014 * 00015 * Permission is hereby granted, free of charge, to any person 00016 * obtaining a copy of this software and associated documentation 00017 * files (the "Software"), to deal in the Software without 00018 * restriction, including without limitation the rights to use, copy, 00019 * modify, merge, publish, distribute, sublicense, and/or sell copies 00020 * of the Software, and to permit persons to whom the Software is 00021 * furnished to do so, subject to the following conditions: 00022 * 00023 * The above copyright notice and this permission notice shall be 00024 * included in all copies or substantial portions of the Software. 00025 * 00026 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 00027 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00028 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 00029 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 00030 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 00031 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 00032 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 00033 * SOFTWARE. 00034 * ***** END LICENSE BLOCK ***** 00035 */ 00036 00037 #ifndef AMQP_FRAMING_H 00038 #define AMQP_FRAMING_H 00039 00040 #include <amqp.h> 00041 00042 AMQP_BEGIN_DECLS 00043 00044 #define AMQP_PROTOCOL_VERSION_MAJOR 0 00045 #define AMQP_PROTOCOL_VERSION_MINOR 9 00046 #define AMQP_PROTOCOL_VERSION_REVISION 1 00047 #define AMQP_PROTOCOL_PORT 5672 00048 #define AMQP_FRAME_METHOD 1 00049 #define AMQP_FRAME_HEADER 2 00050 #define AMQP_FRAME_BODY 3 00051 #define AMQP_FRAME_HEARTBEAT 8 00052 #define AMQP_FRAME_MIN_SIZE 4096 00053 #define AMQP_FRAME_END 206 00054 #define AMQP_REPLY_SUCCESS 200 00055 #define AMQP_CONTENT_TOO_LARGE 311 00056 #define AMQP_NO_ROUTE 312 00057 #define AMQP_NO_CONSUMERS 313 00058 #define AMQP_ACCESS_REFUSED 403 00059 #define AMQP_NOT_FOUND 404 00060 #define AMQP_RESOURCE_LOCKED 405 00061 #define AMQP_PRECONDITION_FAILED 406 00062 #define AMQP_CONNECTION_FORCED 320 00063 #define AMQP_INVALID_PATH 402 00064 #define AMQP_FRAME_ERROR 501 00065 #define AMQP_SYNTAX_ERROR 502 00066 #define AMQP_COMMAND_INVALID 503 00067 #define AMQP_CHANNEL_ERROR 504 00068 #define AMQP_UNEXPECTED_FRAME 505 00069 #define AMQP_RESOURCE_ERROR 506 00070 #define AMQP_NOT_ALLOWED 530 00071 #define AMQP_NOT_IMPLEMENTED 540 00072 #define AMQP_INTERNAL_ERROR 541 00073 00074 /* Function prototypes. */ 00075 00076 AMQP_PUBLIC_FUNCTION 00077 char const * 00078 AMQP_CALL amqp_constant_name(int constantNumber); 00079 00080 AMQP_PUBLIC_FUNCTION 00081 amqp_boolean_t 00082 AMQP_CALL amqp_constant_is_hard_error(int constantNumber); 00083 00084 AMQP_PUBLIC_FUNCTION 00085 char const * 00086 AMQP_CALL amqp_method_name(amqp_method_number_t methodNumber); 00087 00088 AMQP_PUBLIC_FUNCTION 00089 amqp_boolean_t 00090 AMQP_CALL amqp_method_has_content(amqp_method_number_t methodNumber); 00091 00092 AMQP_PUBLIC_FUNCTION 00093 int 00094 AMQP_CALL amqp_decode_method(amqp_method_number_t methodNumber, 00095 amqp_pool_t *pool, 00096 amqp_bytes_t encoded, 00097 void **decoded); 00098 00099 AMQP_PUBLIC_FUNCTION 00100 int 00101 AMQP_CALL amqp_decode_properties(uint16_t class_id, 00102 amqp_pool_t *pool, 00103 amqp_bytes_t encoded, 00104 void **decoded); 00105 00106 AMQP_PUBLIC_FUNCTION 00107 int 00108 AMQP_CALL amqp_encode_method(amqp_method_number_t methodNumber, 00109 void *decoded, 00110 amqp_bytes_t encoded); 00111 00112 AMQP_PUBLIC_FUNCTION 00113 int 00114 AMQP_CALL amqp_encode_properties(uint16_t class_id, 00115 void *decoded, 00116 amqp_bytes_t encoded); 00117 00118 /* Method field records. */ 00119 00120 #define AMQP_CONNECTION_START_METHOD ((amqp_method_number_t) 0x000A000A) /* 10, 10; 655370 */ 00121 typedef struct amqp_connection_start_t_ { 00122 uint8_t version_major; 00123 uint8_t version_minor; 00124 amqp_table_t server_properties; 00125 amqp_bytes_t mechanisms; 00126 amqp_bytes_t locales; 00127 } amqp_connection_start_t; 00128 00129 #define AMQP_CONNECTION_START_OK_METHOD ((amqp_method_number_t) 0x000A000B) /* 10, 11; 655371 */ 00130 typedef struct amqp_connection_start_ok_t_ { 00131 amqp_table_t client_properties; 00132 amqp_bytes_t mechanism; 00133 amqp_bytes_t response; 00134 amqp_bytes_t locale; 00135 } amqp_connection_start_ok_t; 00136 00137 #define AMQP_CONNECTION_SECURE_METHOD ((amqp_method_number_t) 0x000A0014) /* 10, 20; 655380 */ 00138 typedef struct amqp_connection_secure_t_ { 00139 amqp_bytes_t challenge; 00140 } amqp_connection_secure_t; 00141 00142 #define AMQP_CONNECTION_SECURE_OK_METHOD ((amqp_method_number_t) 0x000A0015) /* 10, 21; 655381 */ 00143 typedef struct amqp_connection_secure_ok_t_ { 00144 amqp_bytes_t response; 00145 } amqp_connection_secure_ok_t; 00146 00147 #define AMQP_CONNECTION_TUNE_METHOD ((amqp_method_number_t) 0x000A001E) /* 10, 30; 655390 */ 00148 typedef struct amqp_connection_tune_t_ { 00149 uint16_t channel_max; 00150 uint32_t frame_max; 00151 uint16_t heartbeat; 00152 } amqp_connection_tune_t; 00153 00154 #define AMQP_CONNECTION_TUNE_OK_METHOD ((amqp_method_number_t) 0x000A001F) /* 10, 31; 655391 */ 00155 typedef struct amqp_connection_tune_ok_t_ { 00156 uint16_t channel_max; 00157 uint32_t frame_max; 00158 uint16_t heartbeat; 00159 } amqp_connection_tune_ok_t; 00160 00161 #define AMQP_CONNECTION_OPEN_METHOD ((amqp_method_number_t) 0x000A0028) /* 10, 40; 655400 */ 00162 typedef struct amqp_connection_open_t_ { 00163 amqp_bytes_t virtual_host; 00164 amqp_bytes_t capabilities; 00165 amqp_boolean_t insist; 00166 } amqp_connection_open_t; 00167 00168 #define AMQP_CONNECTION_OPEN_OK_METHOD ((amqp_method_number_t) 0x000A0029) /* 10, 41; 655401 */ 00169 typedef struct amqp_connection_open_ok_t_ { 00170 amqp_bytes_t known_hosts; 00171 } amqp_connection_open_ok_t; 00172 00173 #define AMQP_CONNECTION_CLOSE_METHOD ((amqp_method_number_t) 0x000A0032) /* 10, 50; 655410 */ 00174 typedef struct amqp_connection_close_t_ { 00175 uint16_t reply_code; 00176 amqp_bytes_t reply_text; 00177 uint16_t class_id; 00178 uint16_t method_id; 00179 } amqp_connection_close_t; 00180 00181 #define AMQP_CONNECTION_CLOSE_OK_METHOD ((amqp_method_number_t) 0x000A0033) /* 10, 51; 655411 */ 00182 typedef struct amqp_connection_close_ok_t_ { 00183 char dummy; /* Dummy field to avoid empty struct */ 00184 } amqp_connection_close_ok_t; 00185 00186 #define AMQP_CONNECTION_BLOCKED_METHOD ((amqp_method_number_t) 0x000A003C) /* 10, 60; 655420 */ 00187 typedef struct amqp_connection_blocked_t_ { 00188 amqp_bytes_t reason; 00189 } amqp_connection_blocked_t; 00190 00191 #define AMQP_CONNECTION_UNBLOCKED_METHOD ((amqp_method_number_t) 0x000A003D) /* 10, 61; 655421 */ 00192 typedef struct amqp_connection_unblocked_t_ { 00193 char dummy; /* Dummy field to avoid empty struct */ 00194 } amqp_connection_unblocked_t; 00195 00196 #define AMQP_CHANNEL_OPEN_METHOD ((amqp_method_number_t) 0x0014000A) /* 20, 10; 1310730 */ 00197 typedef struct amqp_channel_open_t_ { 00198 amqp_bytes_t out_of_band; 00199 } amqp_channel_open_t; 00200 00201 #define AMQP_CHANNEL_OPEN_OK_METHOD ((amqp_method_number_t) 0x0014000B) /* 20, 11; 1310731 */ 00202 typedef struct amqp_channel_open_ok_t_ { 00203 amqp_bytes_t channel_id; 00204 } amqp_channel_open_ok_t; 00205 00206 #define AMQP_CHANNEL_FLOW_METHOD ((amqp_method_number_t) 0x00140014) /* 20, 20; 1310740 */ 00207 typedef struct amqp_channel_flow_t_ { 00208 amqp_boolean_t active; 00209 } amqp_channel_flow_t; 00210 00211 #define AMQP_CHANNEL_FLOW_OK_METHOD ((amqp_method_number_t) 0x00140015) /* 20, 21; 1310741 */ 00212 typedef struct amqp_channel_flow_ok_t_ { 00213 amqp_boolean_t active; 00214 } amqp_channel_flow_ok_t; 00215 00216 #define AMQP_CHANNEL_CLOSE_METHOD ((amqp_method_number_t) 0x00140028) /* 20, 40; 1310760 */ 00217 typedef struct amqp_channel_close_t_ { 00218 uint16_t reply_code; 00219 amqp_bytes_t reply_text; 00220 uint16_t class_id; 00221 uint16_t method_id; 00222 } amqp_channel_close_t; 00223 00224 #define AMQP_CHANNEL_CLOSE_OK_METHOD ((amqp_method_number_t) 0x00140029) /* 20, 41; 1310761 */ 00225 typedef struct amqp_channel_close_ok_t_ { 00226 char dummy; /* Dummy field to avoid empty struct */ 00227 } amqp_channel_close_ok_t; 00228 00229 #define AMQP_ACCESS_REQUEST_METHOD ((amqp_method_number_t) 0x001E000A) /* 30, 10; 1966090 */ 00230 typedef struct amqp_access_request_t_ { 00231 amqp_bytes_t realm; 00232 amqp_boolean_t exclusive; 00233 amqp_boolean_t passive; 00234 amqp_boolean_t active; 00235 amqp_boolean_t write; 00236 amqp_boolean_t read; 00237 } amqp_access_request_t; 00238 00239 #define AMQP_ACCESS_REQUEST_OK_METHOD ((amqp_method_number_t) 0x001E000B) /* 30, 11; 1966091 */ 00240 typedef struct amqp_access_request_ok_t_ { 00241 uint16_t ticket; 00242 } amqp_access_request_ok_t; 00243 00244 #define AMQP_EXCHANGE_DECLARE_METHOD ((amqp_method_number_t) 0x0028000A) /* 40, 10; 2621450 */ 00245 typedef struct amqp_exchange_declare_t_ { 00246 uint16_t ticket; 00247 amqp_bytes_t exchange; 00248 amqp_bytes_t type; 00249 amqp_boolean_t passive; 00250 amqp_boolean_t durable; 00251 amqp_boolean_t auto_delete; 00252 amqp_boolean_t internal; 00253 amqp_boolean_t nowait; 00254 amqp_table_t arguments; 00255 } amqp_exchange_declare_t; 00256 00257 #define AMQP_EXCHANGE_DECLARE_OK_METHOD ((amqp_method_number_t) 0x0028000B) /* 40, 11; 2621451 */ 00258 typedef struct amqp_exchange_declare_ok_t_ { 00259 char dummy; /* Dummy field to avoid empty struct */ 00260 } amqp_exchange_declare_ok_t; 00261 00262 #define AMQP_EXCHANGE_DELETE_METHOD ((amqp_method_number_t) 0x00280014) /* 40, 20; 2621460 */ 00263 typedef struct amqp_exchange_delete_t_ { 00264 uint16_t ticket; 00265 amqp_bytes_t exchange; 00266 amqp_boolean_t if_unused; 00267 amqp_boolean_t nowait; 00268 } amqp_exchange_delete_t; 00269 00270 #define AMQP_EXCHANGE_DELETE_OK_METHOD ((amqp_method_number_t) 0x00280015) /* 40, 21; 2621461 */ 00271 typedef struct amqp_exchange_delete_ok_t_ { 00272 char dummy; /* Dummy field to avoid empty struct */ 00273 } amqp_exchange_delete_ok_t; 00274 00275 #define AMQP_EXCHANGE_BIND_METHOD ((amqp_method_number_t) 0x0028001E) /* 40, 30; 2621470 */ 00276 typedef struct amqp_exchange_bind_t_ { 00277 uint16_t ticket; 00278 amqp_bytes_t destination; 00279 amqp_bytes_t source; 00280 amqp_bytes_t routing_key; 00281 amqp_boolean_t nowait; 00282 amqp_table_t arguments; 00283 } amqp_exchange_bind_t; 00284 00285 #define AMQP_EXCHANGE_BIND_OK_METHOD ((amqp_method_number_t) 0x0028001F) /* 40, 31; 2621471 */ 00286 typedef struct amqp_exchange_bind_ok_t_ { 00287 char dummy; /* Dummy field to avoid empty struct */ 00288 } amqp_exchange_bind_ok_t; 00289 00290 #define AMQP_EXCHANGE_UNBIND_METHOD ((amqp_method_number_t) 0x00280028) /* 40, 40; 2621480 */ 00291 typedef struct amqp_exchange_unbind_t_ { 00292 uint16_t ticket; 00293 amqp_bytes_t destination; 00294 amqp_bytes_t source; 00295 amqp_bytes_t routing_key; 00296 amqp_boolean_t nowait; 00297 amqp_table_t arguments; 00298 } amqp_exchange_unbind_t; 00299 00300 #define AMQP_EXCHANGE_UNBIND_OK_METHOD ((amqp_method_number_t) 0x00280033) /* 40, 51; 2621491 */ 00301 typedef struct amqp_exchange_unbind_ok_t_ { 00302 char dummy; /* Dummy field to avoid empty struct */ 00303 } amqp_exchange_unbind_ok_t; 00304 00305 #define AMQP_QUEUE_DECLARE_METHOD ((amqp_method_number_t) 0x0032000A) /* 50, 10; 3276810 */ 00306 typedef struct amqp_queue_declare_t_ { 00307 uint16_t ticket; 00308 amqp_bytes_t queue; 00309 amqp_boolean_t passive; 00310 amqp_boolean_t durable; 00311 amqp_boolean_t exclusive; 00312 amqp_boolean_t auto_delete; 00313 amqp_boolean_t nowait; 00314 amqp_table_t arguments; 00315 } amqp_queue_declare_t; 00316 00317 #define AMQP_QUEUE_DECLARE_OK_METHOD ((amqp_method_number_t) 0x0032000B) /* 50, 11; 3276811 */ 00318 typedef struct amqp_queue_declare_ok_t_ { 00319 amqp_bytes_t queue; 00320 uint32_t message_count; 00321 uint32_t consumer_count; 00322 } amqp_queue_declare_ok_t; 00323 00324 #define AMQP_QUEUE_BIND_METHOD ((amqp_method_number_t) 0x00320014) /* 50, 20; 3276820 */ 00325 typedef struct amqp_queue_bind_t_ { 00326 uint16_t ticket; 00327 amqp_bytes_t queue; 00328 amqp_bytes_t exchange; 00329 amqp_bytes_t routing_key; 00330 amqp_boolean_t nowait; 00331 amqp_table_t arguments; 00332 } amqp_queue_bind_t; 00333 00334 #define AMQP_QUEUE_BIND_OK_METHOD ((amqp_method_number_t) 0x00320015) /* 50, 21; 3276821 */ 00335 typedef struct amqp_queue_bind_ok_t_ { 00336 char dummy; /* Dummy field to avoid empty struct */ 00337 } amqp_queue_bind_ok_t; 00338 00339 #define AMQP_QUEUE_PURGE_METHOD ((amqp_method_number_t) 0x0032001E) /* 50, 30; 3276830 */ 00340 typedef struct amqp_queue_purge_t_ { 00341 uint16_t ticket; 00342 amqp_bytes_t queue; 00343 amqp_boolean_t nowait; 00344 } amqp_queue_purge_t; 00345 00346 #define AMQP_QUEUE_PURGE_OK_METHOD ((amqp_method_number_t) 0x0032001F) /* 50, 31; 3276831 */ 00347 typedef struct amqp_queue_purge_ok_t_ { 00348 uint32_t message_count; 00349 } amqp_queue_purge_ok_t; 00350 00351 #define AMQP_QUEUE_DELETE_METHOD ((amqp_method_number_t) 0x00320028) /* 50, 40; 3276840 */ 00352 typedef struct amqp_queue_delete_t_ { 00353 uint16_t ticket; 00354 amqp_bytes_t queue; 00355 amqp_boolean_t if_unused; 00356 amqp_boolean_t if_empty; 00357 amqp_boolean_t nowait; 00358 } amqp_queue_delete_t; 00359 00360 #define AMQP_QUEUE_DELETE_OK_METHOD ((amqp_method_number_t) 0x00320029) /* 50, 41; 3276841 */ 00361 typedef struct amqp_queue_delete_ok_t_ { 00362 uint32_t message_count; 00363 } amqp_queue_delete_ok_t; 00364 00365 #define AMQP_QUEUE_UNBIND_METHOD ((amqp_method_number_t) 0x00320032) /* 50, 50; 3276850 */ 00366 typedef struct amqp_queue_unbind_t_ { 00367 uint16_t ticket; 00368 amqp_bytes_t queue; 00369 amqp_bytes_t exchange; 00370 amqp_bytes_t routing_key; 00371 amqp_table_t arguments; 00372 } amqp_queue_unbind_t; 00373 00374 #define AMQP_QUEUE_UNBIND_OK_METHOD ((amqp_method_number_t) 0x00320033) /* 50, 51; 3276851 */ 00375 typedef struct amqp_queue_unbind_ok_t_ { 00376 char dummy; /* Dummy field to avoid empty struct */ 00377 } amqp_queue_unbind_ok_t; 00378 00379 #define AMQP_BASIC_QOS_METHOD ((amqp_method_number_t) 0x003C000A) /* 60, 10; 3932170 */ 00380 typedef struct amqp_basic_qos_t_ { 00381 uint32_t prefetch_size; 00382 uint16_t prefetch_count; 00383 amqp_boolean_t global; 00384 } amqp_basic_qos_t; 00385 00386 #define AMQP_BASIC_QOS_OK_METHOD ((amqp_method_number_t) 0x003C000B) /* 60, 11; 3932171 */ 00387 typedef struct amqp_basic_qos_ok_t_ { 00388 char dummy; /* Dummy field to avoid empty struct */ 00389 } amqp_basic_qos_ok_t; 00390 00391 #define AMQP_BASIC_CONSUME_METHOD ((amqp_method_number_t) 0x003C0014) /* 60, 20; 3932180 */ 00392 typedef struct amqp_basic_consume_t_ { 00393 uint16_t ticket; 00394 amqp_bytes_t queue; 00395 amqp_bytes_t consumer_tag; 00396 amqp_boolean_t no_local; 00397 amqp_boolean_t no_ack; 00398 amqp_boolean_t exclusive; 00399 amqp_boolean_t nowait; 00400 amqp_table_t arguments; 00401 } amqp_basic_consume_t; 00402 00403 #define AMQP_BASIC_CONSUME_OK_METHOD ((amqp_method_number_t) 0x003C0015) /* 60, 21; 3932181 */ 00404 typedef struct amqp_basic_consume_ok_t_ { 00405 amqp_bytes_t consumer_tag; 00406 } amqp_basic_consume_ok_t; 00407 00408 #define AMQP_BASIC_CANCEL_METHOD ((amqp_method_number_t) 0x003C001E) /* 60, 30; 3932190 */ 00409 typedef struct amqp_basic_cancel_t_ { 00410 amqp_bytes_t consumer_tag; 00411 amqp_boolean_t nowait; 00412 } amqp_basic_cancel_t; 00413 00414 #define AMQP_BASIC_CANCEL_OK_METHOD ((amqp_method_number_t) 0x003C001F) /* 60, 31; 3932191 */ 00415 typedef struct amqp_basic_cancel_ok_t_ { 00416 amqp_bytes_t consumer_tag; 00417 } amqp_basic_cancel_ok_t; 00418 00419 #define AMQP_BASIC_PUBLISH_METHOD ((amqp_method_number_t) 0x003C0028) /* 60, 40; 3932200 */ 00420 typedef struct amqp_basic_publish_t_ { 00421 uint16_t ticket; 00422 amqp_bytes_t exchange; 00423 amqp_bytes_t routing_key; 00424 amqp_boolean_t mandatory; 00425 amqp_boolean_t immediate; 00426 } amqp_basic_publish_t; 00427 00428 #define AMQP_BASIC_RETURN_METHOD ((amqp_method_number_t) 0x003C0032) /* 60, 50; 3932210 */ 00429 typedef struct amqp_basic_return_t_ { 00430 uint16_t reply_code; 00431 amqp_bytes_t reply_text; 00432 amqp_bytes_t exchange; 00433 amqp_bytes_t routing_key; 00434 } amqp_basic_return_t; 00435 00436 #define AMQP_BASIC_DELIVER_METHOD ((amqp_method_number_t) 0x003C003C) /* 60, 60; 3932220 */ 00437 typedef struct amqp_basic_deliver_t_ { 00438 amqp_bytes_t consumer_tag; 00439 uint64_t delivery_tag; 00440 amqp_boolean_t redelivered; 00441 amqp_bytes_t exchange; 00442 amqp_bytes_t routing_key; 00443 } amqp_basic_deliver_t; 00444 00445 #define AMQP_BASIC_GET_METHOD ((amqp_method_number_t) 0x003C0046) /* 60, 70; 3932230 */ 00446 typedef struct amqp_basic_get_t_ { 00447 uint16_t ticket; 00448 amqp_bytes_t queue; 00449 amqp_boolean_t no_ack; 00450 } amqp_basic_get_t; 00451 00452 #define AMQP_BASIC_GET_OK_METHOD ((amqp_method_number_t) 0x003C0047) /* 60, 71; 3932231 */ 00453 typedef struct amqp_basic_get_ok_t_ { 00454 uint64_t delivery_tag; 00455 amqp_boolean_t redelivered; 00456 amqp_bytes_t exchange; 00457 amqp_bytes_t routing_key; 00458 uint32_t message_count; 00459 } amqp_basic_get_ok_t; 00460 00461 #define AMQP_BASIC_GET_EMPTY_METHOD ((amqp_method_number_t) 0x003C0048) /* 60, 72; 3932232 */ 00462 typedef struct amqp_basic_get_empty_t_ { 00463 amqp_bytes_t cluster_id; 00464 } amqp_basic_get_empty_t; 00465 00466 #define AMQP_BASIC_ACK_METHOD ((amqp_method_number_t) 0x003C0050) /* 60, 80; 3932240 */ 00467 typedef struct amqp_basic_ack_t_ { 00468 uint64_t delivery_tag; 00469 amqp_boolean_t multiple; 00470 } amqp_basic_ack_t; 00471 00472 #define AMQP_BASIC_REJECT_METHOD ((amqp_method_number_t) 0x003C005A) /* 60, 90; 3932250 */ 00473 typedef struct amqp_basic_reject_t_ { 00474 uint64_t delivery_tag; 00475 amqp_boolean_t requeue; 00476 } amqp_basic_reject_t; 00477 00478 #define AMQP_BASIC_RECOVER_ASYNC_METHOD ((amqp_method_number_t) 0x003C0064) /* 60, 100; 3932260 */ 00479 typedef struct amqp_basic_recover_async_t_ { 00480 amqp_boolean_t requeue; 00481 } amqp_basic_recover_async_t; 00482 00483 #define AMQP_BASIC_RECOVER_METHOD ((amqp_method_number_t) 0x003C006E) /* 60, 110; 3932270 */ 00484 typedef struct amqp_basic_recover_t_ { 00485 amqp_boolean_t requeue; 00486 } amqp_basic_recover_t; 00487 00488 #define AMQP_BASIC_RECOVER_OK_METHOD ((amqp_method_number_t) 0x003C006F) /* 60, 111; 3932271 */ 00489 typedef struct amqp_basic_recover_ok_t_ { 00490 char dummy; /* Dummy field to avoid empty struct */ 00491 } amqp_basic_recover_ok_t; 00492 00493 #define AMQP_BASIC_NACK_METHOD ((amqp_method_number_t) 0x003C0078) /* 60, 120; 3932280 */ 00494 typedef struct amqp_basic_nack_t_ { 00495 uint64_t delivery_tag; 00496 amqp_boolean_t multiple; 00497 amqp_boolean_t requeue; 00498 } amqp_basic_nack_t; 00499 00500 #define AMQP_TX_SELECT_METHOD ((amqp_method_number_t) 0x005A000A) /* 90, 10; 5898250 */ 00501 typedef struct amqp_tx_select_t_ { 00502 char dummy; /* Dummy field to avoid empty struct */ 00503 } amqp_tx_select_t; 00504 00505 #define AMQP_TX_SELECT_OK_METHOD ((amqp_method_number_t) 0x005A000B) /* 90, 11; 5898251 */ 00506 typedef struct amqp_tx_select_ok_t_ { 00507 char dummy; /* Dummy field to avoid empty struct */ 00508 } amqp_tx_select_ok_t; 00509 00510 #define AMQP_TX_COMMIT_METHOD ((amqp_method_number_t) 0x005A0014) /* 90, 20; 5898260 */ 00511 typedef struct amqp_tx_commit_t_ { 00512 char dummy; /* Dummy field to avoid empty struct */ 00513 } amqp_tx_commit_t; 00514 00515 #define AMQP_TX_COMMIT_OK_METHOD ((amqp_method_number_t) 0x005A0015) /* 90, 21; 5898261 */ 00516 typedef struct amqp_tx_commit_ok_t_ { 00517 char dummy; /* Dummy field to avoid empty struct */ 00518 } amqp_tx_commit_ok_t; 00519 00520 #define AMQP_TX_ROLLBACK_METHOD ((amqp_method_number_t) 0x005A001E) /* 90, 30; 5898270 */ 00521 typedef struct amqp_tx_rollback_t_ { 00522 char dummy; /* Dummy field to avoid empty struct */ 00523 } amqp_tx_rollback_t; 00524 00525 #define AMQP_TX_ROLLBACK_OK_METHOD ((amqp_method_number_t) 0x005A001F) /* 90, 31; 5898271 */ 00526 typedef struct amqp_tx_rollback_ok_t_ { 00527 char dummy; /* Dummy field to avoid empty struct */ 00528 } amqp_tx_rollback_ok_t; 00529 00530 #define AMQP_CONFIRM_SELECT_METHOD ((amqp_method_number_t) 0x0055000A) /* 85, 10; 5570570 */ 00531 typedef struct amqp_confirm_select_t_ { 00532 amqp_boolean_t nowait; 00533 } amqp_confirm_select_t; 00534 00535 #define AMQP_CONFIRM_SELECT_OK_METHOD ((amqp_method_number_t) 0x0055000B) /* 85, 11; 5570571 */ 00536 typedef struct amqp_confirm_select_ok_t_ { 00537 char dummy; /* Dummy field to avoid empty struct */ 00538 } amqp_confirm_select_ok_t; 00539 00540 /* Class property records. */ 00541 #define AMQP_CONNECTION_CLASS (0x000A) /* 10 */ 00542 typedef struct amqp_connection_properties_t_ { 00543 amqp_flags_t _flags; 00544 char dummy; /* Dummy field to avoid empty struct */ 00545 } amqp_connection_properties_t; 00546 00547 #define AMQP_CHANNEL_CLASS (0x0014) /* 20 */ 00548 typedef struct amqp_channel_properties_t_ { 00549 amqp_flags_t _flags; 00550 char dummy; /* Dummy field to avoid empty struct */ 00551 } amqp_channel_properties_t; 00552 00553 #define AMQP_ACCESS_CLASS (0x001E) /* 30 */ 00554 typedef struct amqp_access_properties_t_ { 00555 amqp_flags_t _flags; 00556 char dummy; /* Dummy field to avoid empty struct */ 00557 } amqp_access_properties_t; 00558 00559 #define AMQP_EXCHANGE_CLASS (0x0028) /* 40 */ 00560 typedef struct amqp_exchange_properties_t_ { 00561 amqp_flags_t _flags; 00562 char dummy; /* Dummy field to avoid empty struct */ 00563 } amqp_exchange_properties_t; 00564 00565 #define AMQP_QUEUE_CLASS (0x0032) /* 50 */ 00566 typedef struct amqp_queue_properties_t_ { 00567 amqp_flags_t _flags; 00568 char dummy; /* Dummy field to avoid empty struct */ 00569 } amqp_queue_properties_t; 00570 00571 #define AMQP_BASIC_CLASS (0x003C) /* 60 */ 00572 #define AMQP_BASIC_CONTENT_TYPE_FLAG (1 << 15) 00573 #define AMQP_BASIC_CONTENT_ENCODING_FLAG (1 << 14) 00574 #define AMQP_BASIC_HEADERS_FLAG (1 << 13) 00575 #define AMQP_BASIC_DELIVERY_MODE_FLAG (1 << 12) 00576 #define AMQP_BASIC_PRIORITY_FLAG (1 << 11) 00577 #define AMQP_BASIC_CORRELATION_ID_FLAG (1 << 10) 00578 #define AMQP_BASIC_REPLY_TO_FLAG (1 << 9) 00579 #define AMQP_BASIC_EXPIRATION_FLAG (1 << 8) 00580 #define AMQP_BASIC_MESSAGE_ID_FLAG (1 << 7) 00581 #define AMQP_BASIC_TIMESTAMP_FLAG (1 << 6) 00582 #define AMQP_BASIC_TYPE_FLAG (1 << 5) 00583 #define AMQP_BASIC_USER_ID_FLAG (1 << 4) 00584 #define AMQP_BASIC_APP_ID_FLAG (1 << 3) 00585 #define AMQP_BASIC_CLUSTER_ID_FLAG (1 << 2) 00586 typedef struct amqp_basic_properties_t_ { 00587 amqp_flags_t _flags; 00588 amqp_bytes_t content_type; 00589 amqp_bytes_t content_encoding; 00590 amqp_table_t headers; 00591 uint8_t delivery_mode; 00592 uint8_t priority; 00593 amqp_bytes_t correlation_id; 00594 amqp_bytes_t reply_to; 00595 amqp_bytes_t expiration; 00596 amqp_bytes_t message_id; 00597 uint64_t timestamp; 00598 amqp_bytes_t type; 00599 amqp_bytes_t user_id; 00600 amqp_bytes_t app_id; 00601 amqp_bytes_t cluster_id; 00602 } amqp_basic_properties_t; 00603 00604 #define AMQP_TX_CLASS (0x005A) /* 90 */ 00605 typedef struct amqp_tx_properties_t_ { 00606 amqp_flags_t _flags; 00607 char dummy; /* Dummy field to avoid empty struct */ 00608 } amqp_tx_properties_t; 00609 00610 #define AMQP_CONFIRM_CLASS (0x0055) /* 85 */ 00611 typedef struct amqp_confirm_properties_t_ { 00612 amqp_flags_t _flags; 00613 char dummy; /* Dummy field to avoid empty struct */ 00614 } amqp_confirm_properties_t; 00615 00616 /* API functions for methods */ 00617 00618 AMQP_PUBLIC_FUNCTION amqp_channel_open_ok_t * AMQP_CALL amqp_channel_open(amqp_connection_state_t state, amqp_channel_t channel); 00619 AMQP_PUBLIC_FUNCTION amqp_channel_flow_ok_t * AMQP_CALL amqp_channel_flow(amqp_connection_state_t state, amqp_channel_t channel, amqp_boolean_t active); 00620 AMQP_PUBLIC_FUNCTION amqp_exchange_declare_ok_t * 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); 00621 AMQP_PUBLIC_FUNCTION amqp_exchange_delete_ok_t * AMQP_CALL amqp_exchange_delete(amqp_connection_state_t state, amqp_channel_t channel, amqp_bytes_t exchange, amqp_boolean_t if_unused); 00622 AMQP_PUBLIC_FUNCTION amqp_exchange_bind_ok_t * 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); 00623 AMQP_PUBLIC_FUNCTION amqp_exchange_unbind_ok_t * 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); 00624 AMQP_PUBLIC_FUNCTION amqp_queue_declare_ok_t * 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); 00625 AMQP_PUBLIC_FUNCTION amqp_queue_bind_ok_t * 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); 00626 AMQP_PUBLIC_FUNCTION amqp_queue_purge_ok_t * AMQP_CALL amqp_queue_purge(amqp_connection_state_t state, amqp_channel_t channel, amqp_bytes_t queue); 00627 AMQP_PUBLIC_FUNCTION amqp_queue_delete_ok_t * 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); 00628 AMQP_PUBLIC_FUNCTION amqp_queue_unbind_ok_t * 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); 00629 AMQP_PUBLIC_FUNCTION amqp_basic_qos_ok_t * 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); 00630 AMQP_PUBLIC_FUNCTION amqp_basic_consume_ok_t * 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); 00631 AMQP_PUBLIC_FUNCTION amqp_basic_cancel_ok_t * AMQP_CALL amqp_basic_cancel(amqp_connection_state_t state, amqp_channel_t channel, amqp_bytes_t consumer_tag); 00632 AMQP_PUBLIC_FUNCTION amqp_basic_recover_ok_t * AMQP_CALL amqp_basic_recover(amqp_connection_state_t state, amqp_channel_t channel, amqp_boolean_t requeue); 00633 AMQP_PUBLIC_FUNCTION amqp_tx_select_ok_t * AMQP_CALL amqp_tx_select(amqp_connection_state_t state, amqp_channel_t channel); 00634 AMQP_PUBLIC_FUNCTION amqp_tx_commit_ok_t * AMQP_CALL amqp_tx_commit(amqp_connection_state_t state, amqp_channel_t channel); 00635 AMQP_PUBLIC_FUNCTION amqp_tx_rollback_ok_t * AMQP_CALL amqp_tx_rollback(amqp_connection_state_t state, amqp_channel_t channel); 00636 AMQP_PUBLIC_FUNCTION amqp_confirm_select_ok_t * AMQP_CALL amqp_confirm_select(amqp_connection_state_t state, amqp_channel_t channel); 00637 00638 AMQP_END_DECLS 00639 00640 #endif /* AMQP_FRAMING_H */