1 /* Generated code. Do not edit. Edit and re-run codegen.py instead.
2 *
3 * ***** BEGIN LICENSE BLOCK *****
4 * Version: MIT
5 *
6 * Portions created by Alan Antonuk are Copyright (c) 2012-2013
7 * Alan Antonuk. All Rights Reserved.
8 *
9 * Portions created by VMware are Copyright (c) 2007-2012 VMware, Inc.
10 * All Rights Reserved.
11 *
12 * Portions created by Tony Garnock-Jones are Copyright (c) 2009-2010
13 * VMware, Inc. and Tony Garnock-Jones. All Rights Reserved.
14 *
15 * Permission is hereby granted, free of charge, to any person
16 * obtaining a copy of this software and associated documentation
17 * files (the "Software"), to deal in the Software without
18 * restriction, including without limitation the rights to use, copy,
19 * modify, merge, publish, distribute, sublicense, and/or sell copies
20 * of the Software, and to permit persons to whom the Software is
21 * furnished to do so, subject to the following conditions:
22 *
23 * The above copyright notice and this permission notice shall be
24 * included in all copies or substantial portions of the Software.
25 *
26 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
29 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
30 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
31 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
32 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33 * SOFTWARE.
34 * ***** END LICENSE BLOCK *****
35 */
36
37 /** @file amqp_framing.h */
38 #ifndef AMQP_FRAMING_H
39 #define AMQP_FRAMING_H
40
41 #include <amqp.h>
42
43 AMQP_BEGIN_DECLS
44
45 #define AMQP_PROTOCOL_VERSION_MAJOR 0 /**< AMQP protocol version major */
46 #define AMQP_PROTOCOL_VERSION_MINOR 9 /**< AMQP protocol version minor */
47 #define AMQP_PROTOCOL_VERSION_REVISION \
48 1 /**< AMQP protocol version revision \
49 */
50 #define AMQP_PROTOCOL_PORT 5672 /**< Default AMQP Port */
51 #define AMQP_FRAME_METHOD 1 /**< Constant: FRAME-METHOD */
52 #define AMQP_FRAME_HEADER 2 /**< Constant: FRAME-HEADER */
53 #define AMQP_FRAME_BODY 3 /**< Constant: FRAME-BODY */
54 #define AMQP_FRAME_HEARTBEAT 8 /**< Constant: FRAME-HEARTBEAT */
55 #define AMQP_FRAME_MIN_SIZE 4096 /**< Constant: FRAME-MIN-SIZE */
56 #define AMQP_FRAME_END 206 /**< Constant: FRAME-END */
57 #define AMQP_REPLY_SUCCESS 200 /**< Constant: REPLY-SUCCESS */
58 #define AMQP_CONTENT_TOO_LARGE 311 /**< Constant: CONTENT-TOO-LARGE */
59 #define AMQP_NO_ROUTE 312 /**< Constant: NO-ROUTE */
60 #define AMQP_NO_CONSUMERS 313 /**< Constant: NO-CONSUMERS */
61 #define AMQP_ACCESS_REFUSED 403 /**< Constant: ACCESS-REFUSED */
62 #define AMQP_NOT_FOUND 404 /**< Constant: NOT-FOUND */
63 #define AMQP_RESOURCE_LOCKED 405 /**< Constant: RESOURCE-LOCKED */
64 #define AMQP_PRECONDITION_FAILED 406 /**< Constant: PRECONDITION-FAILED */
65 #define AMQP_CONNECTION_FORCED 320 /**< Constant: CONNECTION-FORCED */
66 #define AMQP_INVALID_PATH 402 /**< Constant: INVALID-PATH */
67 #define AMQP_FRAME_ERROR 501 /**< Constant: FRAME-ERROR */
68 #define AMQP_SYNTAX_ERROR 502 /**< Constant: SYNTAX-ERROR */
69 #define AMQP_COMMAND_INVALID 503 /**< Constant: COMMAND-INVALID */
70 #define AMQP_CHANNEL_ERROR 504 /**< Constant: CHANNEL-ERROR */
71 #define AMQP_UNEXPECTED_FRAME 505 /**< Constant: UNEXPECTED-FRAME */
72 #define AMQP_RESOURCE_ERROR 506 /**< Constant: RESOURCE-ERROR */
73 #define AMQP_NOT_ALLOWED 530 /**< Constant: NOT-ALLOWED */
74 #define AMQP_NOT_IMPLEMENTED 540 /**< Constant: NOT-IMPLEMENTED */
75 #define AMQP_INTERNAL_ERROR 541 /**< Constant: INTERNAL-ERROR */
76
77 /* Function prototypes. */
78
79 /**
80 * Get constant name string from constant
81 *
82 * @param [in] constantNumber constant to get the name of
83 * @returns string describing the constant. String is managed by
84 * the library and should not be free()'d by the program
85 */
86 AMQP_PUBLIC_FUNCTION
87 char const *AMQP_CALL amqp_constant_name(int constantNumber);
88
89 /**
90 * Checks to see if a constant is a hard error
91 *
92 * A hard error occurs when something severe enough
93 * happens that the connection must be closed.
94 *
95 * @param [in] constantNumber the error constant
96 * @returns true if its a hard error, false otherwise
97 */
98 AMQP_PUBLIC_FUNCTION
99 amqp_boolean_t AMQP_CALL amqp_constant_is_hard_error(int constantNumber);
100
101 /**
102 * Get method name string from method number
103 *
104 * @param [in] methodNumber the method number
105 * @returns method name string. String is managed by the library
106 * and should not be freed()'d by the program
107 */
108 AMQP_PUBLIC_FUNCTION
109 char const *AMQP_CALL amqp_method_name(amqp_method_number_t methodNumber);
110
111 /**
112 * Check whether a method has content
113 *
114 * A method that has content will receive the method frame
115 * a properties frame, then 1 to N body frames
116 *
117 * @param [in] methodNumber the method number
118 * @returns true if method has content, false otherwise
119 */
120 AMQP_PUBLIC_FUNCTION
121 amqp_boolean_t AMQP_CALL
122 amqp_method_has_content(amqp_method_number_t methodNumber);
123
124 /**
125 * Decodes a method from AMQP wireformat
126 *
127 * @param [in] methodNumber the method number for the decoded parameter
128 * @param [in] pool the memory pool to allocate the decoded method from
129 * @param [in] encoded the encoded byte string buffer
130 * @param [out] decoded pointer to the decoded method struct
131 * @returns 0 on success, an error code otherwise
132 */
133 AMQP_PUBLIC_FUNCTION
134 int AMQP_CALL amqp_decode_method(amqp_method_number_t methodNumber,
135 amqp_pool_t *pool, amqp_bytes_t encoded,
136 void **decoded);
137
138 /**
139 * Decodes a header frame properties structure from AMQP wireformat
140 *
141 * @param [in] class_id the class id for the decoded parameter
142 * @param [in] pool the memory pool to allocate the decoded properties from
143 * @param [in] encoded the encoded byte string buffer
144 * @param [out] decoded pointer to the decoded properties struct
145 * @returns 0 on success, an error code otherwise
146 */
147 AMQP_PUBLIC_FUNCTION
148 int AMQP_CALL amqp_decode_properties(uint16_t class_id, amqp_pool_t *pool,
149 amqp_bytes_t encoded, void **decoded);
150
151 /**
152 * Encodes a method structure in AMQP wireformat
153 *
154 * @param [in] methodNumber the method number for the decoded parameter
155 * @param [in] decoded the method structure (e.g., amqp_connection_start_t)
156 * @param [in] encoded an allocated byte buffer for the encoded method
157 * structure to be written to. If the buffer isn't large enough
158 * to hold the encoded method, an error code will be returned.
159 * @returns 0 on success, an error code otherwise.
160 */
161 AMQP_PUBLIC_FUNCTION
162 int AMQP_CALL amqp_encode_method(amqp_method_number_t methodNumber,
163 void *decoded, amqp_bytes_t encoded);
164
165 /**
166 * Encodes a properties structure in AMQP wireformat
167 *
168 * @param [in] class_id the class id for the decoded parameter
169 * @param [in] decoded the properties structure (e.g., amqp_basic_properties_t)
170 * @param [in] encoded an allocated byte buffer for the encoded properties to
171 * written to.
172 * If the buffer isn't large enough to hold the encoded method, an
173 * an error code will be returned
174 * @returns 0 on success, an error code otherwise.
175 */
176 AMQP_PUBLIC_FUNCTION
177 int AMQP_CALL amqp_encode_properties(uint16_t class_id, void *decoded,
178 amqp_bytes_t encoded);
179
180 /* Method field records. */
181
182 #define AMQP_CONNECTION_START_METHOD \
183 ((amqp_method_number_t)0x000A000A) /**< connection.start method id \
184 @internal 10, 10; 655370 */
185 /** connection.start method fields */
186 typedef struct amqp_connection_start_t_ {
187 uint8_t version_major; /**< version-major */
188 uint8_t version_minor; /**< version-minor */
189 amqp_table_t server_properties; /**< server-properties */
190 amqp_bytes_t mechanisms; /**< mechanisms */
191 amqp_bytes_t locales; /**< locales */
192 } amqp_connection_start_t;
193
194 #define AMQP_CONNECTION_START_OK_METHOD \
195 ((amqp_method_number_t)0x000A000B) /**< connection.start-ok method id \
196 @internal 10, 11; 655371 */
197 /** connection.start-ok method fields */
198 typedef struct amqp_connection_start_ok_t_ {
199 amqp_table_t client_properties; /**< client-properties */
200 amqp_bytes_t mechanism; /**< mechanism */
201 amqp_bytes_t response; /**< response */
202 amqp_bytes_t locale; /**< locale */
203 } amqp_connection_start_ok_t;
204
205 #define AMQP_CONNECTION_SECURE_METHOD \
206 ((amqp_method_number_t)0x000A0014) /**< connection.secure method id \
207 @internal 10, 20; 655380 */
208 /** connection.secure method fields */
209 typedef struct amqp_connection_secure_t_ {
210 amqp_bytes_t challenge; /**< challenge */
211 } amqp_connection_secure_t;
212
213 #define AMQP_CONNECTION_SECURE_OK_METHOD \
214 ((amqp_method_number_t)0x000A0015) /**< connection.secure-ok method id \
215 @internal 10, 21; 655381 */
216 /** connection.secure-ok method fields */
217 typedef struct amqp_connection_secure_ok_t_ {
218 amqp_bytes_t response; /**< response */
219 } amqp_connection_secure_ok_t;
220
221 #define AMQP_CONNECTION_TUNE_METHOD \
222 ((amqp_method_number_t)0x000A001E) /**< connection.tune method id \
223 @internal 10, 30; 655390 */
224 /** connection.tune method fields */
225 typedef struct amqp_connection_tune_t_ {
226 uint16_t channel_max; /**< channel-max */
227 uint32_t frame_max; /**< frame-max */
228 uint16_t heartbeat; /**< heartbeat */
229 } amqp_connection_tune_t;
230
231 #define AMQP_CONNECTION_TUNE_OK_METHOD \
232 ((amqp_method_number_t)0x000A001F) /**< connection.tune-ok method id \
233 @internal 10, 31; 655391 */
234 /** connection.tune-ok method fields */
235 typedef struct amqp_connection_tune_ok_t_ {
236 uint16_t channel_max; /**< channel-max */
237 uint32_t frame_max; /**< frame-max */
238 uint16_t heartbeat; /**< heartbeat */
239 } amqp_connection_tune_ok_t;
240
241 #define AMQP_CONNECTION_OPEN_METHOD \
242 ((amqp_method_number_t)0x000A0028) /**< connection.open method id \
243 @internal 10, 40; 655400 */
244 /** connection.open method fields */
245 typedef struct amqp_connection_open_t_ {
246 amqp_bytes_t virtual_host; /**< virtual-host */
247 amqp_bytes_t capabilities; /**< capabilities */
248 amqp_boolean_t insist; /**< insist */
249 } amqp_connection_open_t;
250
251 #define AMQP_CONNECTION_OPEN_OK_METHOD \
252 ((amqp_method_number_t)0x000A0029) /**< connection.open-ok method id \
253 @internal 10, 41; 655401 */
254 /** connection.open-ok method fields */
255 typedef struct amqp_connection_open_ok_t_ {
256 amqp_bytes_t known_hosts; /**< known-hosts */
257 } amqp_connection_open_ok_t;
258
259 #define AMQP_CONNECTION_CLOSE_METHOD \
260 ((amqp_method_number_t)0x000A0032) /**< connection.close method id \
261 @internal 10, 50; 655410 */
262 /** connection.close method fields */
263 typedef struct amqp_connection_close_t_ {
264 uint16_t reply_code; /**< reply-code */
265 amqp_bytes_t reply_text; /**< reply-text */
266 uint16_t class_id; /**< class-id */
267 uint16_t method_id; /**< method-id */
268 } amqp_connection_close_t;
269
270 #define AMQP_CONNECTION_CLOSE_OK_METHOD \
271 ((amqp_method_number_t)0x000A0033) /**< connection.close-ok method id \
272 @internal 10, 51; 655411 */
273 /** connection.close-ok method fields */
274 typedef struct amqp_connection_close_ok_t_ {
275 char dummy; /**< Dummy field to avoid empty struct */
276 } amqp_connection_close_ok_t;
277
278 #define AMQP_CONNECTION_BLOCKED_METHOD \
279 ((amqp_method_number_t)0x000A003C) /**< connection.blocked method id \
280 @internal 10, 60; 655420 */
281 /** connection.blocked method fields */
282 typedef struct amqp_connection_blocked_t_ {
283 amqp_bytes_t reason; /**< reason */
284 } amqp_connection_blocked_t;
285
286 #define AMQP_CONNECTION_UNBLOCKED_METHOD \
287 ((amqp_method_number_t)0x000A003D) /**< connection.unblocked method id \
288 @internal 10, 61; 655421 */
289 /** connection.unblocked method fields */
290 typedef struct amqp_connection_unblocked_t_ {
291 char dummy; /**< Dummy field to avoid empty struct */
292 } amqp_connection_unblocked_t;
293
294 #define AMQP_CHANNEL_OPEN_METHOD \
295 ((amqp_method_number_t)0x0014000A) /**< channel.open method id @internal \
296 20, 10; 1310730 */
297 /** channel.open method fields */
298 typedef struct amqp_channel_open_t_ {
299 amqp_bytes_t out_of_band; /**< out-of-band */
300 } amqp_channel_open_t;
301
302 #define AMQP_CHANNEL_OPEN_OK_METHOD \
303 ((amqp_method_number_t)0x0014000B) /**< channel.open-ok method id \
304 @internal 20, 11; 1310731 */
305 /** channel.open-ok method fields */
306 typedef struct amqp_channel_open_ok_t_ {
307 amqp_bytes_t channel_id; /**< channel-id */
308 } amqp_channel_open_ok_t;
309
310 #define AMQP_CHANNEL_FLOW_METHOD \
311 ((amqp_method_number_t)0x00140014) /**< channel.flow method id @internal \
312 20, 20; 1310740 */
313 /** channel.flow method fields */
314 typedef struct amqp_channel_flow_t_ {
315 amqp_boolean_t active; /**< active */
316 } amqp_channel_flow_t;
317
318 #define AMQP_CHANNEL_FLOW_OK_METHOD \
319 ((amqp_method_number_t)0x00140015) /**< channel.flow-ok method id \
320 @internal 20, 21; 1310741 */
321 /** channel.flow-ok method fields */
322 typedef struct amqp_channel_flow_ok_t_ {
323 amqp_boolean_t active; /**< active */
324 } amqp_channel_flow_ok_t;
325
326 #define AMQP_CHANNEL_CLOSE_METHOD \
327 ((amqp_method_number_t)0x00140028) /**< channel.close method id @internal \
328 20, 40; 1310760 */
329 /** channel.close method fields */
330 typedef struct amqp_channel_close_t_ {
331 uint16_t reply_code; /**< reply-code */
332 amqp_bytes_t reply_text; /**< reply-text */
333 uint16_t class_id; /**< class-id */
334 uint16_t method_id; /**< method-id */
335 } amqp_channel_close_t;
336
337 #define AMQP_CHANNEL_CLOSE_OK_METHOD \
338 ((amqp_method_number_t)0x00140029) /**< channel.close-ok method id \
339 @internal 20, 41; 1310761 */
340 /** channel.close-ok method fields */
341 typedef struct amqp_channel_close_ok_t_ {
342 char dummy; /**< Dummy field to avoid empty struct */
343 } amqp_channel_close_ok_t;
344
345 #define AMQP_ACCESS_REQUEST_METHOD \
346 ((amqp_method_number_t)0x001E000A) /**< access.request method id @internal \
347 30, 10; 1966090 */
348 /** access.request method fields */
349 typedef struct amqp_access_request_t_ {
350 amqp_bytes_t realm; /**< realm */
351 amqp_boolean_t exclusive; /**< exclusive */
352 amqp_boolean_t passive; /**< passive */
353 amqp_boolean_t active; /**< active */
354 amqp_boolean_t write; /**< write */
355 amqp_boolean_t read; /**< read */
356 } amqp_access_request_t;
357
358 #define AMQP_ACCESS_REQUEST_OK_METHOD \
359 ((amqp_method_number_t)0x001E000B) /**< access.request-ok method id \
360 @internal 30, 11; 1966091 */
361 /** access.request-ok method fields */
362 typedef struct amqp_access_request_ok_t_ {
363 uint16_t ticket; /**< ticket */
364 } amqp_access_request_ok_t;
365
366 #define AMQP_EXCHANGE_DECLARE_METHOD \
367 ((amqp_method_number_t)0x0028000A) /**< exchange.declare method id \
368 @internal 40, 10; 2621450 */
369 /** exchange.declare method fields */
370 typedef struct amqp_exchange_declare_t_ {
371 uint16_t ticket; /**< ticket */
372 amqp_bytes_t exchange; /**< exchange */
373 amqp_bytes_t type; /**< type */
374 amqp_boolean_t passive; /**< passive */
375 amqp_boolean_t durable; /**< durable */
376 amqp_boolean_t auto_delete; /**< auto-delete */
377 amqp_boolean_t internal; /**< internal */
378 amqp_boolean_t nowait; /**< nowait */
379 amqp_table_t arguments; /**< arguments */
380 } amqp_exchange_declare_t;
381
382 #define AMQP_EXCHANGE_DECLARE_OK_METHOD \
383 ((amqp_method_number_t)0x0028000B) /**< exchange.declare-ok method id \
384 @internal 40, 11; 2621451 */
385 /** exchange.declare-ok method fields */
386 typedef struct amqp_exchange_declare_ok_t_ {
387 char dummy; /**< Dummy field to avoid empty struct */
388 } amqp_exchange_declare_ok_t;
389
390 #define AMQP_EXCHANGE_DELETE_METHOD \
391 ((amqp_method_number_t)0x00280014) /**< exchange.delete method id \
392 @internal 40, 20; 2621460 */
393 /** exchange.delete method fields */
394 typedef struct amqp_exchange_delete_t_ {
395 uint16_t ticket; /**< ticket */
396 amqp_bytes_t exchange; /**< exchange */
397 amqp_boolean_t if_unused; /**< if-unused */
398 amqp_boolean_t nowait; /**< nowait */
399 } amqp_exchange_delete_t;
400
401 #define AMQP_EXCHANGE_DELETE_OK_METHOD \
402 ((amqp_method_number_t)0x00280015) /**< exchange.delete-ok method id \
403 @internal 40, 21; 2621461 */
404 /** exchange.delete-ok method fields */
405 typedef struct amqp_exchange_delete_ok_t_ {
406 char dummy; /**< Dummy field to avoid empty struct */
407 } amqp_exchange_delete_ok_t;
408
409 #define AMQP_EXCHANGE_BIND_METHOD \
410 ((amqp_method_number_t)0x0028001E) /**< exchange.bind method id @internal \
411 40, 30; 2621470 */
412 /** exchange.bind method fields */
413 typedef struct amqp_exchange_bind_t_ {
414 uint16_t ticket; /**< ticket */
415 amqp_bytes_t destination; /**< destination */
416 amqp_bytes_t source; /**< source */
417 amqp_bytes_t routing_key; /**< routing-key */
418 amqp_boolean_t nowait; /**< nowait */
419 amqp_table_t arguments; /**< arguments */
420 } amqp_exchange_bind_t;
421
422 #define AMQP_EXCHANGE_BIND_OK_METHOD \
423 ((amqp_method_number_t)0x0028001F) /**< exchange.bind-ok method id \
424 @internal 40, 31; 2621471 */
425 /** exchange.bind-ok method fields */
426 typedef struct amqp_exchange_bind_ok_t_ {
427 char dummy; /**< Dummy field to avoid empty struct */
428 } amqp_exchange_bind_ok_t;
429
430 #define AMQP_EXCHANGE_UNBIND_METHOD \
431 ((amqp_method_number_t)0x00280028) /**< exchange.unbind method id \
432 @internal 40, 40; 2621480 */
433 /** exchange.unbind method fields */
434 typedef struct amqp_exchange_unbind_t_ {
435 uint16_t ticket; /**< ticket */
436 amqp_bytes_t destination; /**< destination */
437 amqp_bytes_t source; /**< source */
438 amqp_bytes_t routing_key; /**< routing-key */
439 amqp_boolean_t nowait; /**< nowait */
440 amqp_table_t arguments; /**< arguments */
441 } amqp_exchange_unbind_t;
442
443 #define AMQP_EXCHANGE_UNBIND_OK_METHOD \
444 ((amqp_method_number_t)0x00280033) /**< exchange.unbind-ok method id \
445 @internal 40, 51; 2621491 */
446 /** exchange.unbind-ok method fields */
447 typedef struct amqp_exchange_unbind_ok_t_ {
448 char dummy; /**< Dummy field to avoid empty struct */
449 } amqp_exchange_unbind_ok_t;
450
451 #define AMQP_QUEUE_DECLARE_METHOD \
452 ((amqp_method_number_t)0x0032000A) /**< queue.declare method id @internal \
453 50, 10; 3276810 */
454 /** queue.declare method fields */
455 typedef struct amqp_queue_declare_t_ {
456 uint16_t ticket; /**< ticket */
457 amqp_bytes_t queue; /**< queue */
458 amqp_boolean_t passive; /**< passive */
459 amqp_boolean_t durable; /**< durable */
460 amqp_boolean_t exclusive; /**< exclusive */
461 amqp_boolean_t auto_delete; /**< auto-delete */
462 amqp_boolean_t nowait; /**< nowait */
463 amqp_table_t arguments; /**< arguments */
464 } amqp_queue_declare_t;
465
466 #define AMQP_QUEUE_DECLARE_OK_METHOD \
467 ((amqp_method_number_t)0x0032000B) /**< queue.declare-ok method id \
468 @internal 50, 11; 3276811 */
469 /** queue.declare-ok method fields */
470 typedef struct amqp_queue_declare_ok_t_ {
471 amqp_bytes_t queue; /**< queue */
472 uint32_t message_count; /**< message-count */
473 uint32_t consumer_count; /**< consumer-count */
474 } amqp_queue_declare_ok_t;
475
476 #define AMQP_QUEUE_BIND_METHOD \
477 ((amqp_method_number_t)0x00320014) /**< queue.bind method id @internal 50, \
478 20; 3276820 */
479 /** queue.bind method fields */
480 typedef struct amqp_queue_bind_t_ {
481 uint16_t ticket; /**< ticket */
482 amqp_bytes_t queue; /**< queue */
483 amqp_bytes_t exchange; /**< exchange */
484 amqp_bytes_t routing_key; /**< routing-key */
485 amqp_boolean_t nowait; /**< nowait */
486 amqp_table_t arguments; /**< arguments */
487 } amqp_queue_bind_t;
488
489 #define AMQP_QUEUE_BIND_OK_METHOD \
490 ((amqp_method_number_t)0x00320015) /**< queue.bind-ok method id @internal \
491 50, 21; 3276821 */
492 /** queue.bind-ok method fields */
493 typedef struct amqp_queue_bind_ok_t_ {
494 char dummy; /**< Dummy field to avoid empty struct */
495 } amqp_queue_bind_ok_t;
496
497 #define AMQP_QUEUE_PURGE_METHOD \
498 ((amqp_method_number_t)0x0032001E) /**< queue.purge method id @internal \
499 50, 30; 3276830 */
500 /** queue.purge method fields */
501 typedef struct amqp_queue_purge_t_ {
502 uint16_t ticket; /**< ticket */
503 amqp_bytes_t queue; /**< queue */
504 amqp_boolean_t nowait; /**< nowait */
505 } amqp_queue_purge_t;
506
507 #define AMQP_QUEUE_PURGE_OK_METHOD \
508 ((amqp_method_number_t)0x0032001F) /**< queue.purge-ok method id @internal \
509 50, 31; 3276831 */
510 /** queue.purge-ok method fields */
511 typedef struct amqp_queue_purge_ok_t_ {
512 uint32_t message_count; /**< message-count */
513 } amqp_queue_purge_ok_t;
514
515 #define AMQP_QUEUE_DELETE_METHOD \
516 ((amqp_method_number_t)0x00320028) /**< queue.delete method id @internal \
517 50, 40; 3276840 */
518 /** queue.delete method fields */
519 typedef struct amqp_queue_delete_t_ {
520 uint16_t ticket; /**< ticket */
521 amqp_bytes_t queue; /**< queue */
522 amqp_boolean_t if_unused; /**< if-unused */
523 amqp_boolean_t if_empty; /**< if-empty */
524 amqp_boolean_t nowait; /**< nowait */
525 } amqp_queue_delete_t;
526
527 #define AMQP_QUEUE_DELETE_OK_METHOD \
528 ((amqp_method_number_t)0x00320029) /**< queue.delete-ok method id \
529 @internal 50, 41; 3276841 */
530 /** queue.delete-ok method fields */
531 typedef struct amqp_queue_delete_ok_t_ {
532 uint32_t message_count; /**< message-count */
533 } amqp_queue_delete_ok_t;
534
535 #define AMQP_QUEUE_UNBIND_METHOD \
536 ((amqp_method_number_t)0x00320032) /**< queue.unbind method id @internal \
537 50, 50; 3276850 */
538 /** queue.unbind method fields */
539 typedef struct amqp_queue_unbind_t_ {
540 uint16_t ticket; /**< ticket */
541 amqp_bytes_t queue; /**< queue */
542 amqp_bytes_t exchange; /**< exchange */
543 amqp_bytes_t routing_key; /**< routing-key */
544 amqp_table_t arguments; /**< arguments */
545 } amqp_queue_unbind_t;
546
547 #define AMQP_QUEUE_UNBIND_OK_METHOD \
548 ((amqp_method_number_t)0x00320033) /**< queue.unbind-ok method id \
549 @internal 50, 51; 3276851 */
550 /** queue.unbind-ok method fields */
551 typedef struct amqp_queue_unbind_ok_t_ {
552 char dummy; /**< Dummy field to avoid empty struct */
553 } amqp_queue_unbind_ok_t;
554
555 #define AMQP_BASIC_QOS_METHOD \
556 ((amqp_method_number_t)0x003C000A) /**< basic.qos method id @internal 60, \
557 10; 3932170 */
558 /** basic.qos method fields */
559 typedef struct amqp_basic_qos_t_ {
560 uint32_t prefetch_size; /**< prefetch-size */
561 uint16_t prefetch_count; /**< prefetch-count */
562 amqp_boolean_t global; /**< global */
563 } amqp_basic_qos_t;
564
565 #define AMQP_BASIC_QOS_OK_METHOD \
566 ((amqp_method_number_t)0x003C000B) /**< basic.qos-ok method id @internal \
567 60, 11; 3932171 */
568 /** basic.qos-ok method fields */
569 typedef struct amqp_basic_qos_ok_t_ {
570 char dummy; /**< Dummy field to avoid empty struct */
571 } amqp_basic_qos_ok_t;
572
573 #define AMQP_BASIC_CONSUME_METHOD \
574 ((amqp_method_number_t)0x003C0014) /**< basic.consume method id @internal \
575 60, 20; 3932180 */
576 /** basic.consume method fields */
577 typedef struct amqp_basic_consume_t_ {
578 uint16_t ticket; /**< ticket */
579 amqp_bytes_t queue; /**< queue */
580 amqp_bytes_t consumer_tag; /**< consumer-tag */
581 amqp_boolean_t no_local; /**< no-local */
582 amqp_boolean_t no_ack; /**< no-ack */
583 amqp_boolean_t exclusive; /**< exclusive */
584 amqp_boolean_t nowait; /**< nowait */
585 amqp_table_t arguments; /**< arguments */
586 } amqp_basic_consume_t;
587
588 #define AMQP_BASIC_CONSUME_OK_METHOD \
589 ((amqp_method_number_t)0x003C0015) /**< basic.consume-ok method id \
590 @internal 60, 21; 3932181 */
591 /** basic.consume-ok method fields */
592 typedef struct amqp_basic_consume_ok_t_ {
593 amqp_bytes_t consumer_tag; /**< consumer-tag */
594 } amqp_basic_consume_ok_t;
595
596 #define AMQP_BASIC_CANCEL_METHOD \
597 ((amqp_method_number_t)0x003C001E) /**< basic.cancel method id @internal \
598 60, 30; 3932190 */
599 /** basic.cancel method fields */
600 typedef struct amqp_basic_cancel_t_ {
601 amqp_bytes_t consumer_tag; /**< consumer-tag */
602 amqp_boolean_t nowait; /**< nowait */
603 } amqp_basic_cancel_t;
604
605 #define AMQP_BASIC_CANCEL_OK_METHOD \
606 ((amqp_method_number_t)0x003C001F) /**< basic.cancel-ok method id \
607 @internal 60, 31; 3932191 */
608 /** basic.cancel-ok method fields */
609 typedef struct amqp_basic_cancel_ok_t_ {
610 amqp_bytes_t consumer_tag; /**< consumer-tag */
611 } amqp_basic_cancel_ok_t;
612
613 #define AMQP_BASIC_PUBLISH_METHOD \
614 ((amqp_method_number_t)0x003C0028) /**< basic.publish method id @internal \
615 60, 40; 3932200 */
616 /** basic.publish method fields */
617 typedef struct amqp_basic_publish_t_ {
618 uint16_t ticket; /**< ticket */
619 amqp_bytes_t exchange; /**< exchange */
620 amqp_bytes_t routing_key; /**< routing-key */
621 amqp_boolean_t mandatory; /**< mandatory */
622 amqp_boolean_t immediate; /**< immediate */
623 } amqp_basic_publish_t;
624
625 #define AMQP_BASIC_RETURN_METHOD \
626 ((amqp_method_number_t)0x003C0032) /**< basic.return method id @internal \
627 60, 50; 3932210 */
628 /** basic.return method fields */
629 typedef struct amqp_basic_return_t_ {
630 uint16_t reply_code; /**< reply-code */
631 amqp_bytes_t reply_text; /**< reply-text */
632 amqp_bytes_t exchange; /**< exchange */
633 amqp_bytes_t routing_key; /**< routing-key */
634 } amqp_basic_return_t;
635
636 #define AMQP_BASIC_DELIVER_METHOD \
637 ((amqp_method_number_t)0x003C003C) /**< basic.deliver method id @internal \
638 60, 60; 3932220 */
639 /** basic.deliver method fields */
640 typedef struct amqp_basic_deliver_t_ {
641 amqp_bytes_t consumer_tag; /**< consumer-tag */
642 uint64_t delivery_tag; /**< delivery-tag */
643 amqp_boolean_t redelivered; /**< redelivered */
644 amqp_bytes_t exchange; /**< exchange */
645 amqp_bytes_t routing_key; /**< routing-key */
646 } amqp_basic_deliver_t;
647
648 #define AMQP_BASIC_GET_METHOD \
649 ((amqp_method_number_t)0x003C0046) /**< basic.get method id @internal 60, \
650 70; 3932230 */
651 /** basic.get method fields */
652 typedef struct amqp_basic_get_t_ {
653 uint16_t ticket; /**< ticket */
654 amqp_bytes_t queue; /**< queue */
655 amqp_boolean_t no_ack; /**< no-ack */
656 } amqp_basic_get_t;
657
658 #define AMQP_BASIC_GET_OK_METHOD \
659 ((amqp_method_number_t)0x003C0047) /**< basic.get-ok method id @internal \
660 60, 71; 3932231 */
661 /** basic.get-ok method fields */
662 typedef struct amqp_basic_get_ok_t_ {
663 uint64_t delivery_tag; /**< delivery-tag */
664 amqp_boolean_t redelivered; /**< redelivered */
665 amqp_bytes_t exchange; /**< exchange */
666 amqp_bytes_t routing_key; /**< routing-key */
667 uint32_t message_count; /**< message-count */
668 } amqp_basic_get_ok_t;
669
670 #define AMQP_BASIC_GET_EMPTY_METHOD \
671 ((amqp_method_number_t)0x003C0048) /**< basic.get-empty method id \
672 @internal 60, 72; 3932232 */
673 /** basic.get-empty method fields */
674 typedef struct amqp_basic_get_empty_t_ {
675 amqp_bytes_t cluster_id; /**< cluster-id */
676 } amqp_basic_get_empty_t;
677
678 #define AMQP_BASIC_ACK_METHOD \
679 ((amqp_method_number_t)0x003C0050) /**< basic.ack method id @internal 60, \
680 80; 3932240 */
681 /** basic.ack method fields */
682 typedef struct amqp_basic_ack_t_ {
683 uint64_t delivery_tag; /**< delivery-tag */
684 amqp_boolean_t multiple; /**< multiple */
685 } amqp_basic_ack_t;
686
687 #define AMQP_BASIC_REJECT_METHOD \
688 ((amqp_method_number_t)0x003C005A) /**< basic.reject method id @internal \
689 60, 90; 3932250 */
690 /** basic.reject method fields */
691 typedef struct amqp_basic_reject_t_ {
692 uint64_t delivery_tag; /**< delivery-tag */
693 amqp_boolean_t requeue; /**< requeue */
694 } amqp_basic_reject_t;
695
696 #define AMQP_BASIC_RECOVER_ASYNC_METHOD \
697 ((amqp_method_number_t)0x003C0064) /**< basic.recover-async method id \
698 @internal 60, 100; 3932260 */
699 /** basic.recover-async method fields */
700 typedef struct amqp_basic_recover_async_t_ {
701 amqp_boolean_t requeue; /**< requeue */
702 } amqp_basic_recover_async_t;
703
704 #define AMQP_BASIC_RECOVER_METHOD \
705 ((amqp_method_number_t)0x003C006E) /**< basic.recover method id @internal \
706 60, 110; 3932270 */
707 /** basic.recover method fields */
708 typedef struct amqp_basic_recover_t_ {
709 amqp_boolean_t requeue; /**< requeue */
710 } amqp_basic_recover_t;
711
712 #define AMQP_BASIC_RECOVER_OK_METHOD \
713 ((amqp_method_number_t)0x003C006F) /**< basic.recover-ok method id \
714 @internal 60, 111; 3932271 */
715 /** basic.recover-ok method fields */
716 typedef struct amqp_basic_recover_ok_t_ {
717 char dummy; /**< Dummy field to avoid empty struct */
718 } amqp_basic_recover_ok_t;
719
720 #define AMQP_BASIC_NACK_METHOD \
721 ((amqp_method_number_t)0x003C0078) /**< basic.nack method id @internal 60, \
722 120; 3932280 */
723 /** basic.nack method fields */
724 typedef struct amqp_basic_nack_t_ {
725 uint64_t delivery_tag; /**< delivery-tag */
726 amqp_boolean_t multiple; /**< multiple */
727 amqp_boolean_t requeue; /**< requeue */
728 } amqp_basic_nack_t;
729
730 #define AMQP_TX_SELECT_METHOD \
731 ((amqp_method_number_t)0x005A000A) /**< tx.select method id @internal 90, \
732 10; 5898250 */
733 /** tx.select method fields */
734 typedef struct amqp_tx_select_t_ {
735 char dummy; /**< Dummy field to avoid empty struct */
736 } amqp_tx_select_t;
737
738 #define AMQP_TX_SELECT_OK_METHOD \
739 ((amqp_method_number_t)0x005A000B) /**< tx.select-ok method id @internal \
740 90, 11; 5898251 */
741 /** tx.select-ok method fields */
742 typedef struct amqp_tx_select_ok_t_ {
743 char dummy; /**< Dummy field to avoid empty struct */
744 } amqp_tx_select_ok_t;
745
746 #define AMQP_TX_COMMIT_METHOD \
747 ((amqp_method_number_t)0x005A0014) /**< tx.commit method id @internal 90, \
748 20; 5898260 */
749 /** tx.commit method fields */
750 typedef struct amqp_tx_commit_t_ {
751 char dummy; /**< Dummy field to avoid empty struct */
752 } amqp_tx_commit_t;
753
754 #define AMQP_TX_COMMIT_OK_METHOD \
755 ((amqp_method_number_t)0x005A0015) /**< tx.commit-ok method id @internal \
756 90, 21; 5898261 */
757 /** tx.commit-ok method fields */
758 typedef struct amqp_tx_commit_ok_t_ {
759 char dummy; /**< Dummy field to avoid empty struct */
760 } amqp_tx_commit_ok_t;
761
762 #define AMQP_TX_ROLLBACK_METHOD \
763 ((amqp_method_number_t)0x005A001E) /**< tx.rollback method id @internal \
764 90, 30; 5898270 */
765 /** tx.rollback method fields */
766 typedef struct amqp_tx_rollback_t_ {
767 char dummy; /**< Dummy field to avoid empty struct */
768 } amqp_tx_rollback_t;
769
770 #define AMQP_TX_ROLLBACK_OK_METHOD \
771 ((amqp_method_number_t)0x005A001F) /**< tx.rollback-ok method id @internal \
772 90, 31; 5898271 */
773 /** tx.rollback-ok method fields */
774 typedef struct amqp_tx_rollback_ok_t_ {
775 char dummy; /**< Dummy field to avoid empty struct */
776 } amqp_tx_rollback_ok_t;
777
778 #define AMQP_CONFIRM_SELECT_METHOD \
779 ((amqp_method_number_t)0x0055000A) /**< confirm.select method id @internal \
780 85, 10; 5570570 */
781 /** confirm.select method fields */
782 typedef struct amqp_confirm_select_t_ {
783 amqp_boolean_t nowait; /**< nowait */
784 } amqp_confirm_select_t;
785
786 #define AMQP_CONFIRM_SELECT_OK_METHOD \
787 ((amqp_method_number_t)0x0055000B) /**< confirm.select-ok method id \
788 @internal 85, 11; 5570571 */
789 /** confirm.select-ok method fields */
790 typedef struct amqp_confirm_select_ok_t_ {
791 char dummy; /**< Dummy field to avoid empty struct */
792 } amqp_confirm_select_ok_t;
793
794 /* Class property records. */
795 #define AMQP_CONNECTION_CLASS \
796 (0x000A) /**< connection class id @internal 10 \
797 */
798 /** connection class properties */
799 typedef struct amqp_connection_properties_t_ {
800 amqp_flags_t _flags; /**< bit-mask of set fields */
801 char dummy; /**< Dummy field to avoid empty struct */
802 } amqp_connection_properties_t;
803
804 #define AMQP_CHANNEL_CLASS (0x0014) /**< channel class id @internal 20 */
805 /** channel class properties */
806 typedef struct amqp_channel_properties_t_ {
807 amqp_flags_t _flags; /**< bit-mask of set fields */
808 char dummy; /**< Dummy field to avoid empty struct */
809 } amqp_channel_properties_t;
810
811 #define AMQP_ACCESS_CLASS (0x001E) /**< access class id @internal 30 */
812 /** access class properties */
813 typedef struct amqp_access_properties_t_ {
814 amqp_flags_t _flags; /**< bit-mask of set fields */
815 char dummy; /**< Dummy field to avoid empty struct */
816 } amqp_access_properties_t;
817
818 #define AMQP_EXCHANGE_CLASS (0x0028) /**< exchange class id @internal 40 */
819 /** exchange class properties */
820 typedef struct amqp_exchange_properties_t_ {
821 amqp_flags_t _flags; /**< bit-mask of set fields */
822 char dummy; /**< Dummy field to avoid empty struct */
823 } amqp_exchange_properties_t;
824
825 #define AMQP_QUEUE_CLASS (0x0032) /**< queue class id @internal 50 */
826 /** queue class properties */
827 typedef struct amqp_queue_properties_t_ {
828 amqp_flags_t _flags; /**< bit-mask of set fields */
829 char dummy; /**< Dummy field to avoid empty struct */
830 } amqp_queue_properties_t;
831
832 #define AMQP_BASIC_CLASS (0x003C) /**< basic class id @internal 60 */
833 #define AMQP_BASIC_CONTENT_TYPE_FLAG (1 << 15)
834 #define AMQP_BASIC_CONTENT_ENCODING_FLAG (1 << 14)
835 #define AMQP_BASIC_HEADERS_FLAG (1 << 13)
836 #define AMQP_BASIC_DELIVERY_MODE_FLAG (1 << 12)
837 #define AMQP_BASIC_PRIORITY_FLAG (1 << 11)
838 #define AMQP_BASIC_CORRELATION_ID_FLAG (1 << 10)
839 #define AMQP_BASIC_REPLY_TO_FLAG (1 << 9)
840 #define AMQP_BASIC_EXPIRATION_FLAG (1 << 8)
841 #define AMQP_BASIC_MESSAGE_ID_FLAG (1 << 7)
842 #define AMQP_BASIC_TIMESTAMP_FLAG (1 << 6)
843 #define AMQP_BASIC_TYPE_FLAG (1 << 5)
844 #define AMQP_BASIC_USER_ID_FLAG (1 << 4)
845 #define AMQP_BASIC_APP_ID_FLAG (1 << 3)
846 #define AMQP_BASIC_CLUSTER_ID_FLAG (1 << 2)
847 /** basic class properties */
848 typedef struct amqp_basic_properties_t_ {
849 amqp_flags_t _flags; /**< bit-mask of set fields */
850 amqp_bytes_t content_type; /**< content-type */
851 amqp_bytes_t content_encoding; /**< content-encoding */
852 amqp_table_t headers; /**< headers */
853 uint8_t delivery_mode; /**< delivery-mode */
854 uint8_t priority; /**< priority */
855 amqp_bytes_t correlation_id; /**< correlation-id */
856 amqp_bytes_t reply_to; /**< reply-to */
857 amqp_bytes_t expiration; /**< expiration */
858 amqp_bytes_t message_id; /**< message-id */
859 uint64_t timestamp; /**< timestamp */
860 amqp_bytes_t type; /**< type */
861 amqp_bytes_t user_id; /**< user-id */
862 amqp_bytes_t app_id; /**< app-id */
863 amqp_bytes_t cluster_id; /**< cluster-id */
864 } amqp_basic_properties_t;
865
866 #define AMQP_TX_CLASS (0x005A) /**< tx class id @internal 90 */
867 /** tx class properties */
868 typedef struct amqp_tx_properties_t_ {
869 amqp_flags_t _flags; /**< bit-mask of set fields */
870 char dummy; /**< Dummy field to avoid empty struct */
871 } amqp_tx_properties_t;
872
873 #define AMQP_CONFIRM_CLASS (0x0055) /**< confirm class id @internal 85 */
874 /** confirm class properties */
875 typedef struct amqp_confirm_properties_t_ {
876 amqp_flags_t _flags; /**< bit-mask of set fields */
877 char dummy; /**< Dummy field to avoid empty struct */
878 } amqp_confirm_properties_t;
879
880 /* API functions for methods */
881
882 /**
883 * amqp_channel_open
884 *
885 * @param [in] state connection state
886 * @param [in] channel the channel to do the RPC on
887 * @returns amqp_channel_open_ok_t
888 */
889 AMQP_PUBLIC_FUNCTION
890 amqp_channel_open_ok_t *AMQP_CALL
891 amqp_channel_open(amqp_connection_state_t state, amqp_channel_t channel);
892 /**
893 * amqp_channel_flow
894 *
895 * @param [in] state connection state
896 * @param [in] channel the channel to do the RPC on
897 * @param [in] active active
898 * @returns amqp_channel_flow_ok_t
899 */
900 AMQP_PUBLIC_FUNCTION
901 amqp_channel_flow_ok_t *AMQP_CALL
902 amqp_channel_flow(amqp_connection_state_t state, amqp_channel_t channel,
903 amqp_boolean_t active);
904 /**
905 * amqp_exchange_declare
906 *
907 * @param [in] state connection state
908 * @param [in] channel the channel to do the RPC on
909 * @param [in] exchange exchange
910 * @param [in] type type
911 * @param [in] passive passive
912 * @param [in] durable durable
913 * @param [in] auto_delete auto_delete
914 * @param [in] internal internal
915 * @param [in] arguments arguments
916 * @returns amqp_exchange_declare_ok_t
917 */
918 AMQP_PUBLIC_FUNCTION
919 amqp_exchange_declare_ok_t *AMQP_CALL amqp_exchange_declare(
920 amqp_connection_state_t state, amqp_channel_t channel,
921 amqp_bytes_t exchange, amqp_bytes_t type, amqp_boolean_t passive,
922 amqp_boolean_t durable, amqp_boolean_t auto_delete, amqp_boolean_t internal,
923 amqp_table_t arguments);
924 /**
925 * amqp_exchange_delete
926 *
927 * @param [in] state connection state
928 * @param [in] channel the channel to do the RPC on
929 * @param [in] exchange exchange
930 * @param [in] if_unused if_unused
931 * @returns amqp_exchange_delete_ok_t
932 */
933 AMQP_PUBLIC_FUNCTION
934 amqp_exchange_delete_ok_t *AMQP_CALL
935 amqp_exchange_delete(amqp_connection_state_t state, amqp_channel_t channel,
936 amqp_bytes_t exchange, amqp_boolean_t if_unused);
937 /**
938 * amqp_exchange_bind
939 *
940 * @param [in] state connection state
941 * @param [in] channel the channel to do the RPC on
942 * @param [in] destination destination
943 * @param [in] source source
944 * @param [in] routing_key routing_key
945 * @param [in] arguments arguments
946 * @returns amqp_exchange_bind_ok_t
947 */
948 AMQP_PUBLIC_FUNCTION
949 amqp_exchange_bind_ok_t *AMQP_CALL
950 amqp_exchange_bind(amqp_connection_state_t state, amqp_channel_t channel,
951 amqp_bytes_t destination, amqp_bytes_t source,
952 amqp_bytes_t routing_key, amqp_table_t arguments);
953 /**
954 * amqp_exchange_unbind
955 *
956 * @param [in] state connection state
957 * @param [in] channel the channel to do the RPC on
958 * @param [in] destination destination
959 * @param [in] source source
960 * @param [in] routing_key routing_key
961 * @param [in] arguments arguments
962 * @returns amqp_exchange_unbind_ok_t
963 */
964 AMQP_PUBLIC_FUNCTION
965 amqp_exchange_unbind_ok_t *AMQP_CALL
966 amqp_exchange_unbind(amqp_connection_state_t state, amqp_channel_t channel,
967 amqp_bytes_t destination, amqp_bytes_t source,
968 amqp_bytes_t routing_key, amqp_table_t arguments);
969 /**
970 * amqp_queue_declare
971 *
972 * @param [in] state connection state
973 * @param [in] channel the channel to do the RPC on
974 * @param [in] queue queue
975 * @param [in] passive passive
976 * @param [in] durable durable
977 * @param [in] exclusive exclusive
978 * @param [in] auto_delete auto_delete
979 * @param [in] arguments arguments
980 * @returns amqp_queue_declare_ok_t
981 */
982 AMQP_PUBLIC_FUNCTION
983 amqp_queue_declare_ok_t *AMQP_CALL amqp_queue_declare(
984 amqp_connection_state_t state, amqp_channel_t channel, amqp_bytes_t queue,
985 amqp_boolean_t passive, amqp_boolean_t durable, amqp_boolean_t exclusive,
986 amqp_boolean_t auto_delete, amqp_table_t arguments);
987 /**
988 * amqp_queue_bind
989 *
990 * @param [in] state connection state
991 * @param [in] channel the channel to do the RPC on
992 * @param [in] queue queue
993 * @param [in] exchange exchange
994 * @param [in] routing_key routing_key
995 * @param [in] arguments arguments
996 * @returns amqp_queue_bind_ok_t
997 */
998 AMQP_PUBLIC_FUNCTION
999 amqp_queue_bind_ok_t *AMQP_CALL amqp_queue_bind(
1000 amqp_connection_state_t state, amqp_channel_t channel, amqp_bytes_t queue,
1001 amqp_bytes_t exchange, amqp_bytes_t routing_key, amqp_table_t arguments);
1002 /**
1003 * amqp_queue_purge
1004 *
1005 * @param [in] state connection state
1006 * @param [in] channel the channel to do the RPC on
1007 * @param [in] queue queue
1008 * @returns amqp_queue_purge_ok_t
1009 */
1010 AMQP_PUBLIC_FUNCTION
1011 amqp_queue_purge_ok_t *AMQP_CALL amqp_queue_purge(amqp_connection_state_t state,
1012 amqp_channel_t channel,
1013 amqp_bytes_t queue);
1014 /**
1015 * amqp_queue_delete
1016 *
1017 * @param [in] state connection state
1018 * @param [in] channel the channel to do the RPC on
1019 * @param [in] queue queue
1020 * @param [in] if_unused if_unused
1021 * @param [in] if_empty if_empty
1022 * @returns amqp_queue_delete_ok_t
1023 */
1024 AMQP_PUBLIC_FUNCTION
1025 amqp_queue_delete_ok_t *AMQP_CALL amqp_queue_delete(
1026 amqp_connection_state_t state, amqp_channel_t channel, amqp_bytes_t queue,
1027 amqp_boolean_t if_unused, amqp_boolean_t if_empty);
1028 /**
1029 * amqp_queue_unbind
1030 *
1031 * @param [in] state connection state
1032 * @param [in] channel the channel to do the RPC on
1033 * @param [in] queue queue
1034 * @param [in] exchange exchange
1035 * @param [in] routing_key routing_key
1036 * @param [in] arguments arguments
1037 * @returns amqp_queue_unbind_ok_t
1038 */
1039 AMQP_PUBLIC_FUNCTION
1040 amqp_queue_unbind_ok_t *AMQP_CALL amqp_queue_unbind(
1041 amqp_connection_state_t state, amqp_channel_t channel, amqp_bytes_t queue,
1042 amqp_bytes_t exchange, amqp_bytes_t routing_key, amqp_table_t arguments);
1043 /**
1044 * amqp_basic_qos
1045 *
1046 * @param [in] state connection state
1047 * @param [in] channel the channel to do the RPC on
1048 * @param [in] prefetch_size prefetch_size
1049 * @param [in] prefetch_count prefetch_count
1050 * @param [in] global global
1051 * @returns amqp_basic_qos_ok_t
1052 */
1053 AMQP_PUBLIC_FUNCTION
1054 amqp_basic_qos_ok_t *AMQP_CALL amqp_basic_qos(amqp_connection_state_t state,
1055 amqp_channel_t channel,
1056 uint32_t prefetch_size,
1057 uint16_t prefetch_count,
1058 amqp_boolean_t global);
1059 /**
1060 * amqp_basic_consume
1061 *
1062 * @param [in] state connection state
1063 * @param [in] channel the channel to do the RPC on
1064 * @param [in] queue queue
1065 * @param [in] consumer_tag consumer_tag
1066 * @param [in] no_local no_local
1067 * @param [in] no_ack no_ack
1068 * @param [in] exclusive exclusive
1069 * @param [in] arguments arguments
1070 * @returns amqp_basic_consume_ok_t
1071 */
1072 AMQP_PUBLIC_FUNCTION
1073 amqp_basic_consume_ok_t *AMQP_CALL amqp_basic_consume(
1074 amqp_connection_state_t state, amqp_channel_t channel, amqp_bytes_t queue,
1075 amqp_bytes_t consumer_tag, amqp_boolean_t no_local, amqp_boolean_t no_ack,
1076 amqp_boolean_t exclusive, amqp_table_t arguments);
1077 /**
1078 * amqp_basic_cancel
1079 *
1080 * @param [in] state connection state
1081 * @param [in] channel the channel to do the RPC on
1082 * @param [in] consumer_tag consumer_tag
1083 * @returns amqp_basic_cancel_ok_t
1084 */
1085 AMQP_PUBLIC_FUNCTION
1086 amqp_basic_cancel_ok_t *AMQP_CALL
1087 amqp_basic_cancel(amqp_connection_state_t state, amqp_channel_t channel,
1088 amqp_bytes_t consumer_tag);
1089 /**
1090 * amqp_basic_recover
1091 *
1092 * @param [in] state connection state
1093 * @param [in] channel the channel to do the RPC on
1094 * @param [in] requeue requeue
1095 * @returns amqp_basic_recover_ok_t
1096 */
1097 AMQP_PUBLIC_FUNCTION
1098 amqp_basic_recover_ok_t *AMQP_CALL
1099 amqp_basic_recover(amqp_connection_state_t state, amqp_channel_t channel,
1100 amqp_boolean_t requeue);
1101 /**
1102 * amqp_tx_select
1103 *
1104 * @param [in] state connection state
1105 * @param [in] channel the channel to do the RPC on
1106 * @returns amqp_tx_select_ok_t
1107 */
1108 AMQP_PUBLIC_FUNCTION
1109 amqp_tx_select_ok_t *AMQP_CALL amqp_tx_select(amqp_connection_state_t state,
1110 amqp_channel_t channel);
1111 /**
1112 * amqp_tx_commit
1113 *
1114 * @param [in] state connection state
1115 * @param [in] channel the channel to do the RPC on
1116 * @returns amqp_tx_commit_ok_t
1117 */
1118 AMQP_PUBLIC_FUNCTION
1119 amqp_tx_commit_ok_t *AMQP_CALL amqp_tx_commit(amqp_connection_state_t state,
1120 amqp_channel_t channel);
1121 /**
1122 * amqp_tx_rollback
1123 *
1124 * @param [in] state connection state
1125 * @param [in] channel the channel to do the RPC on
1126 * @returns amqp_tx_rollback_ok_t
1127 */
1128 AMQP_PUBLIC_FUNCTION
1129 amqp_tx_rollback_ok_t *AMQP_CALL amqp_tx_rollback(amqp_connection_state_t state,
1130 amqp_channel_t channel);
1131 /**
1132 * amqp_confirm_select
1133 *
1134 * @param [in] state connection state
1135 * @param [in] channel the channel to do the RPC on
1136 * @returns amqp_confirm_select_ok_t
1137 */
1138 AMQP_PUBLIC_FUNCTION
1139 amqp_confirm_select_ok_t *AMQP_CALL
1140 amqp_confirm_select(amqp_connection_state_t state, amqp_channel_t channel);
1141
1142 AMQP_END_DECLS
1143
1144 #endif /* AMQP_FRAMING_H */
1145