amqp_framing.h 47 KB

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