framing.h 48 KB

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