summaryrefslogtreecommitdiff
path: root/deps/rabbitmq_codegen
diff options
context:
space:
mode:
Diffstat (limited to 'deps/rabbitmq_codegen')
-rw-r--r--deps/rabbitmq_codegen/.gitignore11
-rw-r--r--deps/rabbitmq_codegen/CODE_OF_CONDUCT.md44
-rw-r--r--deps/rabbitmq_codegen/CONTRIBUTING.md38
-rw-r--r--deps/rabbitmq_codegen/LICENSE6
-rw-r--r--deps/rabbitmq_codegen/LICENSE-MPL-RabbitMQ373
-rw-r--r--deps/rabbitmq_codegen/Makefile42
-rw-r--r--deps/rabbitmq_codegen/README.extensions.md189
-rw-r--r--deps/rabbitmq_codegen/amqp-1.0/messaging.xml168
-rw-r--r--deps/rabbitmq_codegen/amqp-1.0/security.xml76
-rw-r--r--deps/rabbitmq_codegen/amqp-1.0/transactions.xml73
-rw-r--r--deps/rabbitmq_codegen/amqp-1.0/transport.xml200
-rw-r--r--deps/rabbitmq_codegen/amqp-1.0/types.xml125
-rw-r--r--deps/rabbitmq_codegen/amqp-rabbitmq-0.8.json659
-rw-r--r--deps/rabbitmq_codegen/amqp-rabbitmq-0.9.1.json483
-rw-r--r--deps/rabbitmq_codegen/amqp_codegen.py287
-rw-r--r--deps/rabbitmq_codegen/credit_extension.json54
-rw-r--r--deps/rabbitmq_codegen/demo_extension.json18
-rw-r--r--deps/rabbitmq_codegen/license_info4
18 files changed, 2850 insertions, 0 deletions
diff --git a/deps/rabbitmq_codegen/.gitignore b/deps/rabbitmq_codegen/.gitignore
new file mode 100644
index 0000000000..7ced2f9af7
--- /dev/null
+++ b/deps/rabbitmq_codegen/.gitignore
@@ -0,0 +1,11 @@
+*~
+.sw?
+.*.sw?
+*.beam
+*.pyc
+erl_crash.dump
+/build/
+/cover/
+/dist/
+/ebin/
+/tmp/
diff --git a/deps/rabbitmq_codegen/CODE_OF_CONDUCT.md b/deps/rabbitmq_codegen/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000000..08697906fd
--- /dev/null
+++ b/deps/rabbitmq_codegen/CODE_OF_CONDUCT.md
@@ -0,0 +1,44 @@
+# Contributor Code of Conduct
+
+As contributors and maintainers of this project, and in the interest of fostering an open
+and welcoming community, we pledge to respect all people who contribute through reporting
+issues, posting feature requests, updating documentation, submitting pull requests or
+patches, and other activities.
+
+We are committed to making participation in this project a harassment-free experience for
+everyone, regardless of level of experience, gender, gender identity and expression,
+sexual orientation, disability, personal appearance, body size, race, ethnicity, age,
+religion, or nationality.
+
+Examples of unacceptable behavior by participants include:
+
+ * The use of sexualized language or imagery
+ * Personal attacks
+ * Trolling or insulting/derogatory comments
+ * Public or private harassment
+ * Publishing other's private information, such as physical or electronic addresses,
+ without explicit permission
+ * Other unethical or unprofessional conduct
+
+Project maintainers have the right and responsibility to remove, edit, or reject comments,
+commits, code, wiki edits, issues, and other contributions that are not aligned to this
+Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors
+that they deem inappropriate, threatening, offensive, or harmful.
+
+By adopting this Code of Conduct, project maintainers commit themselves to fairly and
+consistently applying these principles to every aspect of managing this project. Project
+maintainers who do not follow or enforce the Code of Conduct may be permanently removed
+from the project team.
+
+This Code of Conduct applies both within project spaces and in public spaces when an
+individual is representing the project or its community.
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by
+contacting a project maintainer at [info@rabbitmq.com](mailto:info@rabbitmq.com). All complaints will
+be reviewed and investigated and will result in a response that is deemed necessary and
+appropriate to the circumstances. Maintainers are obligated to maintain confidentiality
+with regard to the reporter of an incident.
+
+This Code of Conduct is adapted from the
+[Contributor Covenant](https://contributor-covenant.org), version 1.3.0, available at
+[contributor-covenant.org/version/1/3/0/](https://contributor-covenant.org/version/1/3/0/)
diff --git a/deps/rabbitmq_codegen/CONTRIBUTING.md b/deps/rabbitmq_codegen/CONTRIBUTING.md
new file mode 100644
index 0000000000..23a92fef9c
--- /dev/null
+++ b/deps/rabbitmq_codegen/CONTRIBUTING.md
@@ -0,0 +1,38 @@
+## Overview
+
+RabbitMQ projects use pull requests to discuss, collaborate on and accept code contributions.
+Pull requests is the primary place of discussing code changes.
+
+## How to Contribute
+
+The process is fairly standard:
+
+ * Fork the repository or repositories you plan on contributing to
+ * Clone [RabbitMQ umbrella repository](https://github.com/rabbitmq/rabbitmq-public-umbrella)
+ * `cd umbrella`, `make co`
+ * Create a branch with a descriptive name in the relevant repositories
+ * Make your changes, run tests, commit with a [descriptive message](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html), push to your fork
+ * Submit pull requests with an explanation what has been changed and **why**
+ * Submit a filled out and signed [Contributor Agreement](https://github.com/rabbitmq/ca#how-to-submit) if needed (see below)
+ * Be patient. We will get to your pull request eventually
+
+If what you are going to work on is a substantial change, please first ask the core team
+of their opinion on [RabbitMQ mailing list](https://groups.google.com/forum/#!forum/rabbitmq-users).
+
+
+## Code of Conduct
+
+See [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md).
+
+
+## Contributor Agreement
+
+If you want to contribute a non-trivial change, please submit a signed copy of our
+[Contributor Agreement](https://github.com/rabbitmq/ca#how-to-submit) around the time
+you submit your pull request. This will make it much easier (in some cases, possible)
+for the RabbitMQ team at Pivotal to merge your contribution.
+
+
+## Where to Ask Questions
+
+If something isn't clear, feel free to ask on our [mailing list](https://groups.google.com/forum/#!forum/rabbitmq-users).
diff --git a/deps/rabbitmq_codegen/LICENSE b/deps/rabbitmq_codegen/LICENSE
new file mode 100644
index 0000000000..06ac104533
--- /dev/null
+++ b/deps/rabbitmq_codegen/LICENSE
@@ -0,0 +1,6 @@
+This package, the RabbitMQ code generation library and associated
+files, is licensed under the MPL 2.0. For the MPL 2.0, please see
+LICENSE-MPL-RabbitMQ.
+
+If you have any questions regarding licensing, please contact us at
+info@rabbitmq.com.
diff --git a/deps/rabbitmq_codegen/LICENSE-MPL-RabbitMQ b/deps/rabbitmq_codegen/LICENSE-MPL-RabbitMQ
new file mode 100644
index 0000000000..14e2f777f6
--- /dev/null
+++ b/deps/rabbitmq_codegen/LICENSE-MPL-RabbitMQ
@@ -0,0 +1,373 @@
+Mozilla Public License Version 2.0
+==================================
+
+1. Definitions
+--------------
+
+1.1. "Contributor"
+ means each individual or legal entity that creates, contributes to
+ the creation of, or owns Covered Software.
+
+1.2. "Contributor Version"
+ means the combination of the Contributions of others (if any) used
+ by a Contributor and that particular Contributor's Contribution.
+
+1.3. "Contribution"
+ means Covered Software of a particular Contributor.
+
+1.4. "Covered Software"
+ means Source Code Form to which the initial Contributor has attached
+ the notice in Exhibit A, the Executable Form of such Source Code
+ Form, and Modifications of such Source Code Form, in each case
+ including portions thereof.
+
+1.5. "Incompatible With Secondary Licenses"
+ means
+
+ (a) that the initial Contributor has attached the notice described
+ in Exhibit B to the Covered Software; or
+
+ (b) that the Covered Software was made available under the terms of
+ version 1.1 or earlier of the License, but not also under the
+ terms of a Secondary License.
+
+1.6. "Executable Form"
+ means any form of the work other than Source Code Form.
+
+1.7. "Larger Work"
+ means a work that combines Covered Software with other material, in
+ a separate file or files, that is not Covered Software.
+
+1.8. "License"
+ means this document.
+
+1.9. "Licensable"
+ means having the right to grant, to the maximum extent possible,
+ whether at the time of the initial grant or subsequently, any and
+ all of the rights conveyed by this License.
+
+1.10. "Modifications"
+ means any of the following:
+
+ (a) any file in Source Code Form that results from an addition to,
+ deletion from, or modification of the contents of Covered
+ Software; or
+
+ (b) any new file in Source Code Form that contains any Covered
+ Software.
+
+1.11. "Patent Claims" of a Contributor
+ means any patent claim(s), including without limitation, method,
+ process, and apparatus claims, in any patent Licensable by such
+ Contributor that would be infringed, but for the grant of the
+ License, by the making, using, selling, offering for sale, having
+ made, import, or transfer of either its Contributions or its
+ Contributor Version.
+
+1.12. "Secondary License"
+ means either the GNU General Public License, Version 2.0, the GNU
+ Lesser General Public License, Version 2.1, the GNU Affero General
+ Public License, Version 3.0, or any later versions of those
+ licenses.
+
+1.13. "Source Code Form"
+ means the form of the work preferred for making modifications.
+
+1.14. "You" (or "Your")
+ means an individual or a legal entity exercising rights under this
+ License. For legal entities, "You" includes any entity that
+ controls, is controlled by, or is under common control with You. For
+ purposes of this definition, "control" means (a) the power, direct
+ or indirect, to cause the direction or management of such entity,
+ whether by contract or otherwise, or (b) ownership of more than
+ fifty percent (50%) of the outstanding shares or beneficial
+ ownership of such entity.
+
+2. License Grants and Conditions
+--------------------------------
+
+2.1. Grants
+
+Each Contributor hereby grants You a world-wide, royalty-free,
+non-exclusive license:
+
+(a) under intellectual property rights (other than patent or trademark)
+ Licensable by such Contributor to use, reproduce, make available,
+ modify, display, perform, distribute, and otherwise exploit its
+ Contributions, either on an unmodified basis, with Modifications, or
+ as part of a Larger Work; and
+
+(b) under Patent Claims of such Contributor to make, use, sell, offer
+ for sale, have made, import, and otherwise transfer either its
+ Contributions or its Contributor Version.
+
+2.2. Effective Date
+
+The licenses granted in Section 2.1 with respect to any Contribution
+become effective for each Contribution on the date the Contributor first
+distributes such Contribution.
+
+2.3. Limitations on Grant Scope
+
+The licenses granted in this Section 2 are the only rights granted under
+this License. No additional rights or licenses will be implied from the
+distribution or licensing of Covered Software under this License.
+Notwithstanding Section 2.1(b) above, no patent license is granted by a
+Contributor:
+
+(a) for any code that a Contributor has removed from Covered Software;
+ or
+
+(b) for infringements caused by: (i) Your and any other third party's
+ modifications of Covered Software, or (ii) the combination of its
+ Contributions with other software (except as part of its Contributor
+ Version); or
+
+(c) under Patent Claims infringed by Covered Software in the absence of
+ its Contributions.
+
+This License does not grant any rights in the trademarks, service marks,
+or logos of any Contributor (except as may be necessary to comply with
+the notice requirements in Section 3.4).
+
+2.4. Subsequent Licenses
+
+No Contributor makes additional grants as a result of Your choice to
+distribute the Covered Software under a subsequent version of this
+License (see Section 10.2) or under the terms of a Secondary License (if
+permitted under the terms of Section 3.3).
+
+2.5. Representation
+
+Each Contributor represents that the Contributor believes its
+Contributions are its original creation(s) or it has sufficient rights
+to grant the rights to its Contributions conveyed by this License.
+
+2.6. Fair Use
+
+This License is not intended to limit any rights You have under
+applicable copyright doctrines of fair use, fair dealing, or other
+equivalents.
+
+2.7. Conditions
+
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
+in Section 2.1.
+
+3. Responsibilities
+-------------------
+
+3.1. Distribution of Source Form
+
+All distribution of Covered Software in Source Code Form, including any
+Modifications that You create or to which You contribute, must be under
+the terms of this License. You must inform recipients that the Source
+Code Form of the Covered Software is governed by the terms of this
+License, and how they can obtain a copy of this License. You may not
+attempt to alter or restrict the recipients' rights in the Source Code
+Form.
+
+3.2. Distribution of Executable Form
+
+If You distribute Covered Software in Executable Form then:
+
+(a) such Covered Software must also be made available in Source Code
+ Form, as described in Section 3.1, and You must inform recipients of
+ the Executable Form how they can obtain a copy of such Source Code
+ Form by reasonable means in a timely manner, at a charge no more
+ than the cost of distribution to the recipient; and
+
+(b) You may distribute such Executable Form under the terms of this
+ License, or sublicense it under different terms, provided that the
+ license for the Executable Form does not attempt to limit or alter
+ the recipients' rights in the Source Code Form under this License.
+
+3.3. Distribution of a Larger Work
+
+You may create and distribute a Larger Work under terms of Your choice,
+provided that You also comply with the requirements of this License for
+the Covered Software. If the Larger Work is a combination of Covered
+Software with a work governed by one or more Secondary Licenses, and the
+Covered Software is not Incompatible With Secondary Licenses, this
+License permits You to additionally distribute such Covered Software
+under the terms of such Secondary License(s), so that the recipient of
+the Larger Work may, at their option, further distribute the Covered
+Software under the terms of either this License or such Secondary
+License(s).
+
+3.4. Notices
+
+You may not remove or alter the substance of any license notices
+(including copyright notices, patent notices, disclaimers of warranty,
+or limitations of liability) contained within the Source Code Form of
+the Covered Software, except that You may alter any license notices to
+the extent required to remedy known factual inaccuracies.
+
+3.5. Application of Additional Terms
+
+You may choose to offer, and to charge a fee for, warranty, support,
+indemnity or liability obligations to one or more recipients of Covered
+Software. However, You may do so only on Your own behalf, and not on
+behalf of any Contributor. You must make it absolutely clear that any
+such warranty, support, indemnity, or liability obligation is offered by
+You alone, and You hereby agree to indemnify every Contributor for any
+liability incurred by such Contributor as a result of warranty, support,
+indemnity or liability terms You offer. You may include additional
+disclaimers of warranty and limitations of liability specific to any
+jurisdiction.
+
+4. Inability to Comply Due to Statute or Regulation
+---------------------------------------------------
+
+If it is impossible for You to comply with any of the terms of this
+License with respect to some or all of the Covered Software due to
+statute, judicial order, or regulation then You must: (a) comply with
+the terms of this License to the maximum extent possible; and (b)
+describe the limitations and the code they affect. Such description must
+be placed in a text file included with all distributions of the Covered
+Software under this License. Except to the extent prohibited by statute
+or regulation, such description must be sufficiently detailed for a
+recipient of ordinary skill to be able to understand it.
+
+5. Termination
+--------------
+
+5.1. The rights granted under this License will terminate automatically
+if You fail to comply with any of its terms. However, if You become
+compliant, then the rights granted under this License from a particular
+Contributor are reinstated (a) provisionally, unless and until such
+Contributor explicitly and finally terminates Your grants, and (b) on an
+ongoing basis, if such Contributor fails to notify You of the
+non-compliance by some reasonable means prior to 60 days after You have
+come back into compliance. Moreover, Your grants from a particular
+Contributor are reinstated on an ongoing basis if such Contributor
+notifies You of the non-compliance by some reasonable means, this is the
+first time You have received notice of non-compliance with this License
+from such Contributor, and You become compliant prior to 30 days after
+Your receipt of the notice.
+
+5.2. If You initiate litigation against any entity by asserting a patent
+infringement claim (excluding declaratory judgment actions,
+counter-claims, and cross-claims) alleging that a Contributor Version
+directly or indirectly infringes any patent, then the rights granted to
+You by any and all Contributors for the Covered Software under Section
+2.1 of this License shall terminate.
+
+5.3. In the event of termination under Sections 5.1 or 5.2 above, all
+end user license agreements (excluding distributors and resellers) which
+have been validly granted by You or Your distributors under this License
+prior to termination shall survive termination.
+
+************************************************************************
+* *
+* 6. Disclaimer of Warranty *
+* ------------------------- *
+* *
+* Covered Software is provided under this License on an "as is" *
+* basis, without warranty of any kind, either expressed, implied, or *
+* statutory, including, without limitation, warranties that the *
+* Covered Software is free of defects, merchantable, fit for a *
+* particular purpose or non-infringing. The entire risk as to the *
+* quality and performance of the Covered Software is with You. *
+* Should any Covered Software prove defective in any respect, You *
+* (not any Contributor) assume the cost of any necessary servicing, *
+* repair, or correction. This disclaimer of warranty constitutes an *
+* essential part of this License. No use of any Covered Software is *
+* authorized under this License except under this disclaimer. *
+* *
+************************************************************************
+
+************************************************************************
+* *
+* 7. Limitation of Liability *
+* -------------------------- *
+* *
+* Under no circumstances and under no legal theory, whether tort *
+* (including negligence), contract, or otherwise, shall any *
+* Contributor, or anyone who distributes Covered Software as *
+* permitted above, be liable to You for any direct, indirect, *
+* special, incidental, or consequential damages of any character *
+* including, without limitation, damages for lost profits, loss of *
+* goodwill, work stoppage, computer failure or malfunction, or any *
+* and all other commercial damages or losses, even if such party *
+* shall have been informed of the possibility of such damages. This *
+* limitation of liability shall not apply to liability for death or *
+* personal injury resulting from such party's negligence to the *
+* extent applicable law prohibits such limitation. Some *
+* jurisdictions do not allow the exclusion or limitation of *
+* incidental or consequential damages, so this exclusion and *
+* limitation may not apply to You. *
+* *
+************************************************************************
+
+8. Litigation
+-------------
+
+Any litigation relating to this License may be brought only in the
+courts of a jurisdiction where the defendant maintains its principal
+place of business and such litigation shall be governed by laws of that
+jurisdiction, without reference to its conflict-of-law provisions.
+Nothing in this Section shall prevent a party's ability to bring
+cross-claims or counter-claims.
+
+9. Miscellaneous
+----------------
+
+This License represents the complete agreement concerning the subject
+matter hereof. If any provision of this License is held to be
+unenforceable, such provision shall be reformed only to the extent
+necessary to make it enforceable. Any law or regulation which provides
+that the language of a contract shall be construed against the drafter
+shall not be used to construe this License against a Contributor.
+
+10. Versions of the License
+---------------------------
+
+10.1. New Versions
+
+Mozilla Foundation is the license steward. Except as provided in Section
+10.3, no one other than the license steward has the right to modify or
+publish new versions of this License. Each version will be given a
+distinguishing version number.
+
+10.2. Effect of New Versions
+
+You may distribute the Covered Software under the terms of the version
+of the License under which You originally received the Covered Software,
+or under the terms of any subsequent version published by the license
+steward.
+
+10.3. Modified Versions
+
+If you create software not governed by this License, and you want to
+create a new license for such software, you may create and use a
+modified version of this License if you rename the license and remove
+any references to the name of the license steward (except to note that
+such modified license differs from this License).
+
+10.4. Distributing Source Code Form that is Incompatible With Secondary
+Licenses
+
+If You choose to distribute Source Code Form that is Incompatible With
+Secondary Licenses under the terms of this version of the License, the
+notice described in Exhibit B of this License must be attached.
+
+Exhibit A - Source Code Form License Notice
+-------------------------------------------
+
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+If it is not possible or desirable to put the notice in a particular
+file, then You may include the notice in a location (such as a LICENSE
+file in a relevant directory) where a recipient would be likely to look
+for such a notice.
+
+You may add additional accurate notices of copyright ownership.
+
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+---------------------------------------------------------
+
+ This Source Code Form is "Incompatible With Secondary Licenses", as
+ defined by the Mozilla Public License, v. 2.0.
diff --git a/deps/rabbitmq_codegen/Makefile b/deps/rabbitmq_codegen/Makefile
new file mode 100644
index 0000000000..55d72ed88a
--- /dev/null
+++ b/deps/rabbitmq_codegen/Makefile
@@ -0,0 +1,42 @@
+.PHONY: all clean distclean
+
+all:
+ @:
+
+clean:
+ rm -f *.pyc
+
+distclean: clean
+ find . -regex '.*\(~\|#\|\.swp\)' -exec rm {} \;
+
+# Upstream URL for the current project.
+RABBITMQ_COMPONENT_REPO_NAME := rabbitmq-codegen
+RABBITMQ_UPSTREAM_FETCH_URL ?= https://github.com/rabbitmq/$(RABBITMQ_COMPONENT_REPO_NAME).git
+RABBITMQ_UPSTREAM_PUSH_URL ?= git@github.com:rabbitmq/$(RABBITMQ_COMPONENT_REPO_NAME).git
+
+# Current URL for the current project. If this is not a Git clone,
+# default to the upstream Git repository.
+ifneq ($(wildcard .git),)
+git_origin_fetch_url := $(shell git config remote.origin.url)
+git_origin_push_url := $(shell git config remote.origin.pushurl || git config remote.origin.url)
+RABBITMQ_CURRENT_FETCH_URL ?= $(git_origin_fetch_url)
+RABBITMQ_CURRENT_PUSH_URL ?= $(git_origin_push_url)
+else
+RABBITMQ_CURRENT_FETCH_URL ?= $(RABBITMQ_UPSTREAM_FETCH_URL)
+RABBITMQ_CURRENT_PUSH_URL ?= $(RABBITMQ_UPSTREAM_PUSH_URL)
+endif
+
+.PHONY: show-upstream-git-fetch-url show-upstream-git-push-url \
+ show-current-git-fetch-url show-current-git-push-url
+
+show-upstream-git-fetch-url:
+ @echo $(RABBITMQ_UPSTREAM_FETCH_URL)
+
+show-upstream-git-push-url:
+ @echo $(RABBITMQ_UPSTREAM_PUSH_URL)
+
+show-current-git-fetch-url:
+ @echo $(RABBITMQ_CURRENT_FETCH_URL)
+
+show-current-git-push-url:
+ @echo $(RABBITMQ_CURRENT_PUSH_URL)
diff --git a/deps/rabbitmq_codegen/README.extensions.md b/deps/rabbitmq_codegen/README.extensions.md
new file mode 100644
index 0000000000..0a22d41913
--- /dev/null
+++ b/deps/rabbitmq_codegen/README.extensions.md
@@ -0,0 +1,189 @@
+# Protocol extensions
+
+The `amqp_codegen.py` AMQP specification compiler has recently been
+enhanced to take more than a single specification file, which allows
+AMQP library authors to include extensions to the core protocol
+without needing to modify the core AMQP specification file as
+distributed.
+
+The compiler is invoked with the path to a single "main" specification
+document and zero or more paths to "extension" documents.
+
+The order of the extensions matters: any later class property
+definitions, for instance, are added to the list of definitions in
+order of appearance. In general, composition of extensions with a core
+specification document is therefore non-commutative.
+
+## The main document
+
+Written in the style of a
+[json-shapes](https://github.com/tonyg/json-shapes) schema:
+
+ DomainDefinition = _and(array_of(string()), array_length_equals(2));
+
+ ConstantDefinition = {
+ "name": string(),
+ "value": number(),
+ "class": optional(_or("soft-error", "hard-error"))
+ };
+
+ FieldDefinition = {
+ "name": string(),
+ "type": string(),
+ "default-value": optional(anything())
+ };
+
+ MethodDefinition = {
+ "name": string(),
+ "id": number(),
+ "arguments": array_of(FieldDefinition),
+ "synchronous": optional(boolean()),
+ "content": optional(boolean())
+ };
+
+ ClassDefinition = {
+ "name": string(),
+ "id": number(),
+ "methods": array_of(MethodDefinition),
+ "properties": optional(array_of(FieldDefinition))
+ };
+
+ MainDocument = {
+ "major-version": number(),
+ "minor-version": number(),
+ "revision": optional(number()),
+ "port": number(),
+ "domains": array_of(DomainDefinition),
+ "constants": array_of(ConstantDefinition),
+ "classes": array_of(ClassDefinition),
+ }
+
+Within a `FieldDefinition`, the keyword `domain` can be used instead
+of `type`, but `type` is preferred and `domain` is deprecated.
+
+Type names can either be a defined `domain` name or a built-in name
+from the following list:
+
+ - octet
+ - shortstr
+ - longstr
+ - short
+ - long
+ - longlong
+ - bit
+ - table
+ - timestamp
+
+Method and class IDs must be integers between 0 and 65535,
+inclusive. Note that there is no specific subset of the space reserved
+for experimental or site-local extensions, so be careful not to
+conflict with IDs used by the AMQP core specification.
+
+If the `synchronous` field of a `MethodDefinition` is missing, it is
+assumed to be `false`; the same applies to the `content` field.
+
+A `ConstantDefinition` with a `class` attribute is considered to be an
+error-code definition; otherwise, it is considered to be a
+straightforward numeric constant.
+
+## Extensions
+
+Written in the style of a
+[json-shapes](https://github.com/tonyg/json-shapes) schema, and
+referencing some of the type definitions given above:
+
+ ExtensionDocument = {
+ "extension": anything(),
+ "domains": array_of(DomainDefinition),
+ "constants": array_of(ConstantDefinition),
+ "classes": array_of(ClassDefinition)
+ };
+
+The `extension` keyword is used to describe the extension informally
+for human readers. Typically it will be a dictionary, with members
+such as:
+
+ {
+ "name": "The name of the extension",
+ "version": "1.0",
+ "copyright": "Copyright (C) 1234 Yoyodyne, Inc."
+ }
+
+## Merge behaviour
+
+In the case of conflicts between values specified in the main document
+and in any extension documents, type-specific merge operators are
+invoked.
+
+ - Any doubly-defined domain names are regarded as true
+ conflicts. Otherwise, all the domain definitions from all the main
+ and extension documents supplied to the compiler are merged into a
+ single dictionary.
+
+ - Constant definitions are treated as per domain names above,
+ *mutatis mutandis*.
+
+ - Classes and their methods are a little trickier: if an extension
+ defines a class with the same name as one previously defined, then
+ only the `methods` and `properties` fields of the extension's class
+ definition are attended to.
+
+ - Any doubly-defined method names or property names within a class
+ are treated as true conflicts.
+
+ - Properties defined in an extension are added to the end of the
+ extant property list for the class.
+
+ (Extensions are of course permitted to define brand new classes as
+ well as to extend existing ones.)
+
+ - Any other kind of conflict leads to a raised
+ `AmqpSpecFileMergeConflict` exception.
+
+## Invoking the spec compiler
+
+Your code generation code should invoke `amqp_codegen.do_main_dict`
+with a dictionary of functions as the sole argument. Each will be
+used for generationg a separate file. The `do_main_dict` function
+will parse the command-line arguments supplied when python was
+invoked.
+
+The command-line will be parsed as:
+
+ python your_codegen.py <action> <mainspec> [<extspec> ...] <outfile>
+
+where `<action>` is a key into the dictionary supplied to
+`do_main_dict` and is used to select which generation function is
+called. The `<mainspec>` and `<extspec>` arguments are file names of
+specification documents containing expressions in the syntax given
+above. The *final* argument on the command line, `<outfile>`, is the
+name of the source-code file to generate.
+
+Here's a tiny example of the layout of a code generation module that
+uses `amqp_codegen`:
+
+ import amqp_codegen
+
+ def generateHeader(specPath):
+ spec = amqp_codegen.AmqpSpec(specPath)
+ ...
+
+ def generateImpl(specPath):
+ spec = amqp_codegen.AmqpSpec(specPath)
+ ...
+
+ if __name__ == "__main__":
+ amqp_codegen.do_main_dict({"header": generateHeader,
+ "body": generateImpl})
+
+The reasons for allowing more than one action, are that
+
+ - many languages have separate "header"-type files (C and Erlang, to
+ name two)
+ - `Makefile`s often require separate rules for generating the two
+ kinds of file, but it's convenient to keep the generation code
+ together in a single python module
+
+The main reason things are laid out this way, however, is simply that
+it's an accident of the history of the code. We may change the API to
+`amqp_codegen` in future to clean things up a little.
diff --git a/deps/rabbitmq_codegen/amqp-1.0/messaging.xml b/deps/rabbitmq_codegen/amqp-1.0/messaging.xml
new file mode 100644
index 0000000000..f3b9b3a18f
--- /dev/null
+++ b/deps/rabbitmq_codegen/amqp-1.0/messaging.xml
@@ -0,0 +1,168 @@
+<?xml version="1.0"?>
+
+<!--
+Copyright Bank of America, N.A., Barclays Bank PLC, Cisco Systems, Credit
+Suisse, Deutsche Boerse, Envoy Technologies Inc., Goldman Sachs, HCL
+Technologies Ltd, IIT Software GmbH, iMatix Corporation, INETCO Systems Limited,
+Informatica Corporation, JPMorgan Chase & Co., Kaazing Corporation, N.A,
+Microsoft Corporation, my-Channels, Novell, Progress Software, Red Hat Inc.,
+Software AG, Solace Systems Inc., StormMQ Ltd., Tervela Inc., TWIST Process
+Innovations Ltd, GoPivotal, Inc., and WS02 Inc. 2006-2011. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<amqp name="messaging" xmlns="https://www.amqp.org/schema/amqp.xsd">
+ <section name="message-format">
+ <type name="header" class="composite" source="list" provides="section">
+ <descriptor name="amqp:header:list" code="0x00000000:0x00000070"/>
+ <field name="durable" type="boolean"/>
+ <field name="priority" type="ubyte"/>
+ <field name="ttl" type="milliseconds"/>
+ <field name="first-acquirer" type="boolean"/>
+ <field name="delivery-count" type="uint"/>
+ </type>
+ <type name="delivery-annotations" class="restricted" source="annotations" provides="section">
+ <descriptor name="amqp:delivery-annotations:map" code="0x00000000:0x00000071"/>
+ </type>
+ <type name="message-annotations" class="restricted" source="annotations" provides="section">
+ <descriptor name="amqp:message-annotations:map" code="0x00000000:0x00000072"/>
+ </type>
+ <type name="properties" class="composite" source="list" provides="section">
+ <descriptor name="amqp:properties:list" code="0x00000000:0x00000073"/>
+ <field name="message-id" type="*" requires="message-id"/>
+ <field name="user-id" type="binary"/>
+ <field name="to" type="*" requires="address"/>
+ <field name="subject" type="string"/>
+ <field name="reply-to" type="*" requires="address"/>
+ <field name="correlation-id" type="*" requires="message-id"/>
+ <field name="content-type" type="symbol"/>
+ <field name="content-encoding" type="symbol"/>
+ <field name="absolute-expiry-time" type="timestamp"/>
+ <field name="creation-time" type="timestamp"/>
+ <field name="group-id" type="string"/>
+ <field name="group-sequence" type="sequence-no"/>
+ <field name="reply-to-group-id" type="string"/>
+ </type>
+ <type name="application-properties" class="restricted" source="map" provides="section">
+ <descriptor name="amqp:application-properties:map" code="0x00000000:0x00000074"/>
+ </type>
+ <type name="data" class="restricted" source="binary" provides="section">
+ <descriptor name="amqp:data:binary" code="0x00000000:0x00000075"/>
+ </type>
+ <type name="amqp-sequence" class="restricted" source="list" provides="section">
+ <descriptor name="amqp:amqp-sequence:list" code="0x00000000:0x00000076"/>
+ </type>
+ <type name="amqp-value" class="restricted" source="*" provides="section">
+ <descriptor name="amqp:amqp-value:*" code="0x00000000:0x00000077"/>
+ </type>
+ <type name="footer" class="restricted" source="annotations" provides="section">
+ <descriptor name="amqp:footer:map" code="0x00000000:0x00000078"/>
+ </type>
+ <type name="annotations" class="restricted" source="map"/>
+ <type name="message-id-ulong" class="restricted" source="ulong" provides="message-id"/>
+ <type name="message-id-uuid" class="restricted" source="uuid" provides="message-id"/>
+ <type name="message-id-binary" class="restricted" source="binary" provides="message-id"/>
+ <type name="message-id-string" class="restricted" source="string" provides="message-id"/>
+ <type name="address-string" class="restricted" source="string" provides="address"/>
+ <definition name="MESSAGE-FORMAT" value="0"/>
+ </section>
+ <section name="delivery-state">
+ <type name="received" class="composite" source="list" provides="delivery-state">
+ <descriptor name="amqp:received:list" code="0x00000000:0x00000023"/>
+ <field name="section-number" type="uint" mandatory="true"/>
+ <field name="section-offset" type="ulong" mandatory="true"/>
+ </type>
+ <type name="accepted" class="composite" source="list" provides="delivery-state, outcome">
+ <descriptor name="amqp:accepted:list" code="0x00000000:0x00000024"/>
+ </type>
+ <type name="rejected" class="composite" source="list" provides="delivery-state, outcome">
+ <descriptor name="amqp:rejected:list" code="0x00000000:0x00000025"/>
+ <field name="error" type="error"/>
+ </type>
+ <type name="released" class="composite" source="list" provides="delivery-state, outcome">
+ <descriptor name="amqp:released:list" code="0x00000000:0x00000026"/>
+ </type>
+ <type name="modified" class="composite" source="list" provides="delivery-state, outcome">
+ <descriptor name="amqp:modified:list" code="0x00000000:0x00000027"/>
+ <field name="delivery-failed" type="boolean"/>
+ <field name="undeliverable-here" type="boolean"/>
+ <field name="message-annotations" type="fields"/>
+ </type>
+ </section>
+ <section name="addressing">
+ <type name="source" class="composite" source="list" provides="source">
+ <descriptor name="amqp:source:list" code="0x00000000:0x00000028"/>
+ <field name="address" type="*" requires="address"/>
+ <field name="durable" type="terminus-durability" default="none"/>
+ <field name="expiry-policy" type="terminus-expiry-policy" default="session-end"/>
+ <field name="timeout" type="seconds" default="0"/>
+ <field name="dynamic" type="boolean" default="false"/>
+ <field name="dynamic-node-properties" type="node-properties"/>
+ <field name="distribution-mode" type="symbol" requires="distribution-mode"/>
+ <field name="filter" type="filter-set"/>
+ <field name="default-outcome" type="*" requires="outcome"/>
+ <field name="outcomes" type="symbol" multiple="true"/>
+ <field name="capabilities" type="symbol" multiple="true"/>
+ </type>
+ <type name="target" class="composite" source="list" provides="target">
+ <descriptor name="amqp:target:list" code="0x00000000:0x00000029"/>
+ <field name="address" type="*" requires="address"/>
+ <field name="durable" type="terminus-durability" default="none"/>
+ <field name="expiry-policy" type="terminus-expiry-policy" default="session-end"/>
+ <field name="timeout" type="seconds" default="0"/>
+ <field name="dynamic" type="boolean" default="false"/>
+ <field name="dynamic-node-properties" type="node-properties"/>
+ <field name="capabilities" type="symbol" multiple="true"/>
+ </type>
+ <type name="terminus-durability" class="restricted" source="uint">
+ <choice name="none" value="0"/>
+ <choice name="configuration" value="1"/>
+ <choice name="unsettled-state" value="2"/>
+ </type>
+ <type name="terminus-expiry-policy" class="restricted" source="symbol">
+ <choice name="link-detach" value="link-detach"/>
+ <choice name="session-end" value="session-end"/>
+ <choice name="connection-close" value="connection-close"/>
+ <choice name="never" value="never"/>
+ </type>
+ <type name="std-dist-mode" class="restricted" source="symbol" provides="distribution-mode">
+ <choice name="move" value="move"/>
+ <choice name="copy" value="copy"/>
+ </type>
+ <type name="filter-set" class="restricted" source="map"/>
+ <type name="node-properties" class="restricted" source="fields"/>
+ <type name="delete-on-close" class="composite" source="list" provides="lifetime-policy">
+ <descriptor name="amqp:delete-on-close:list" code="0x00000000:0x0000002b"/>
+ </type>
+ <type name="delete-on-no-links" class="composite" source="list" provides="lifetime-policy">
+ <descriptor name="amqp:delete-on-no-links:list" code="0x00000000:0x0000002c"/>
+ </type>
+ <type name="delete-on-no-messages" class="composite" source="list" provides="lifetime-policy">
+ <descriptor name="amqp:delete-on-no-messages:list" code="0x00000000:0x0000002d"/>
+ </type>
+ <type name="delete-on-no-links-or-messages" class="composite" source="list" provides="lifetime-policy">
+ <descriptor name="amqp:delete-on-no-links-or-messages:list" code="0x00000000:0x0000002e"/>
+ </type>
+ </section>
+</amqp>
diff --git a/deps/rabbitmq_codegen/amqp-1.0/security.xml b/deps/rabbitmq_codegen/amqp-1.0/security.xml
new file mode 100644
index 0000000000..22b2bb3839
--- /dev/null
+++ b/deps/rabbitmq_codegen/amqp-1.0/security.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0"?>
+
+<!--
+Copyright Bank of America, N.A., Barclays Bank PLC, Cisco Systems, Credit
+Suisse, Deutsche Boerse, Envoy Technologies Inc., Goldman Sachs, HCL
+Technologies Ltd, IIT Software GmbH, iMatix Corporation, INETCO Systems Limited,
+Informatica Corporation, JPMorgan Chase & Co., Kaazing Corporation, N.A,
+Microsoft Corporation, my-Channels, Novell, Progress Software, Red Hat Inc.,
+Software AG, Solace Systems Inc., StormMQ Ltd., Tervela Inc., TWIST Process
+Innovations Ltd, GoPivotal, Inc., and WS02 Inc. 2006-2011. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<amqp name="security" xmlns="https://www.amqp.org/schema/amqp.xsd">
+ <section name="tls">
+ <definition name="TLS-MAJOR" value="1"/>
+ <definition name="TLS-MINOR" value="0"/>
+ <definition name="TLS-REVISION" value="0"/>
+ </section>
+ <section name="sasl">
+ <type name="sasl-mechanisms" class="composite" source="list" provides="sasl-frame">
+ <descriptor name="amqp:sasl-mechanisms:list" code="0x00000000:0x00000040"/>
+ <field name="sasl-server-mechanisms" type="symbol" mandatory="true" multiple="true"/>
+ </type>
+ <type name="sasl-init" class="composite" source="list" provides="sasl-frame">
+ <descriptor name="amqp:sasl-init:list" code="0x00000000:0x00000041"/>
+ <field name="mechanism" type="symbol" mandatory="true"/>
+ <field name="initial-response" type="binary"/>
+ <field name="hostname" type="string"/>
+ </type>
+ <type name="sasl-challenge" class="composite" source="list" provides="sasl-frame">
+ <descriptor name="amqp:sasl-challenge:list" code="0x00000000:0x00000042"/>
+ <field name="challenge" type="binary" mandatory="true"/>
+ </type>
+ <type name="sasl-response" class="composite" source="list" provides="sasl-frame">
+ <descriptor name="amqp:sasl-response:list" code="0x00000000:0x00000043"/>
+ <field name="response" type="binary" mandatory="true"/>
+ </type>
+ <type name="sasl-outcome" class="composite" source="list" provides="sasl-frame">
+ <descriptor name="amqp:sasl-outcome:list" code="0x00000000:0x00000044"/>
+ <field name="code" type="sasl-code" mandatory="true"/>
+ <field name="additional-data" type="binary"/>
+ </type>
+ <type name="sasl-code" class="restricted" source="ubyte">
+ <choice name="ok" value="0"/>
+ <choice name="auth" value="1"/>
+ <choice name="sys" value="2"/>
+ <choice name="sys-perm" value="3"/>
+ <choice name="sys-temp" value="4"/>
+ </type>
+ <definition name="SASL-MAJOR" value="1"/>
+ <definition name="SASL-MINOR" value="0"/>
+ <definition name="SASL-REVISION" value="0"/>
+ </section>
+</amqp>
diff --git a/deps/rabbitmq_codegen/amqp-1.0/transactions.xml b/deps/rabbitmq_codegen/amqp-1.0/transactions.xml
new file mode 100644
index 0000000000..c562d75643
--- /dev/null
+++ b/deps/rabbitmq_codegen/amqp-1.0/transactions.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+
+<!--
+Copyright Bank of America, N.A., Barclays Bank PLC, Cisco Systems, Credit
+Suisse, Deutsche Boerse, Envoy Technologies Inc., Goldman Sachs, HCL
+Technologies Ltd, IIT Software GmbH, iMatix Corporation, INETCO Systems Limited,
+Informatica Corporation, JPMorgan Chase & Co., Kaazing Corporation, N.A,
+Microsoft Corporation, my-Channels, Novell, Progress Software, Red Hat Inc.,
+Software AG, Solace Systems Inc., StormMQ Ltd., Tervela Inc., TWIST Process
+Innovations Ltd, GoPivotal, Inc., and WS02 Inc. 2006-2011. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<amqp name="transactions" xmlns="https://www.amqp.org/schema/amqp.xsd">
+ <section name="coordination">
+ <type name="coordinator" class="composite" source="list" provides="target">
+ <descriptor name="amqp:coordinator:list" code="0x00000000:0x00000030"/>
+ <field name="capabilities" type="symbol" requires="txn-capability" multiple="true"/>
+ </type>
+ <type name="declare" class="composite" source="list">
+ <descriptor name="amqp:declare:list" code="0x00000000:0x00000031"/>
+ <field name="global-id" type="*" requires="global-tx-id"/>
+ </type>
+ <type name="discharge" class="composite" source="list">
+ <descriptor name="amqp:discharge:list" code="0x00000000:0x00000032"/>
+ <field name="txn-id" type="*" mandatory="true" requires="txn-id"/>
+ <field name="fail" type="boolean"/>
+ </type>
+ <type name="transaction-id" class="restricted" source="binary" provides="txn-id"/>
+ <type name="declared" class="composite" source="list" provides="delivery-state, outcome">
+ <descriptor name="amqp:declared:list" code="0x00000000:0x00000033"/>
+ <field name="txn-id" type="*" mandatory="true" requires="txn-id"/>
+ </type>
+ <type name="transactional-state" class="composite" source="list" provides="delivery-state">
+ <descriptor name="amqp:transactional-state:list" code="0x00000000:0x00000034"/>
+ <field name="txn-id" type="*" mandatory="true" requires="txn-id"/>
+ <field name="outcome" type="*" requires="outcome"/>
+ </type>
+ <type name="txn-capability" class="restricted" source="symbol" provides="txn-capability">
+ <choice name="local-transactions" value="amqp:local-transactions"/>
+ <choice name="distributed-transactions" value="amqp:distributed-transactions"/>
+ <choice name="promotable-transactions" value="amqp:promotable-transactions"/>
+ <choice name="multi-txns-per-ssn" value="amqp:multi-txns-per-ssn"/>
+ <choice name="multi-ssns-per-txn" value="amqp:multi-ssns-per-txn"/>
+ </type>
+ <type name="transaction-error" class="restricted" source="symbol" provides="error-condition">
+ <choice name="unknown-id" value="amqp:transaction:unknown-id"/>
+ <choice name="transaction-rollback" value="amqp:transaction:rollback"/>
+ <choice name="transaction-timeout" value="amqp:transaction:timeout"/>
+ </type>
+ </section>
+</amqp>
diff --git a/deps/rabbitmq_codegen/amqp-1.0/transport.xml b/deps/rabbitmq_codegen/amqp-1.0/transport.xml
new file mode 100644
index 0000000000..34c1cf25fd
--- /dev/null
+++ b/deps/rabbitmq_codegen/amqp-1.0/transport.xml
@@ -0,0 +1,200 @@
+<?xml version="1.0"?>
+
+<!--
+Copyright Bank of America, N.A., Barclays Bank PLC, Cisco Systems, Credit
+Suisse, Deutsche Boerse, Envoy Technologies Inc., Goldman Sachs, HCL
+Technologies Ltd, IIT Software GmbH, iMatix Corporation, INETCO Systems Limited,
+Informatica Corporation, JPMorgan Chase & Co., Kaazing Corporation, N.A,
+Microsoft Corporation, my-Channels, Novell, Progress Software, Red Hat Inc.,
+Software AG, Solace Systems Inc., StormMQ Ltd., Tervela Inc., TWIST Process
+Innovations Ltd, GoPivotal, Inc., and WS02 Inc. 2006-2011. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<amqp name="transport" xmlns="https://www.amqp.org/schema/amqp.xsd">
+ <section name="performatives">
+ <type name="open" class="composite" source="list" provides="frame">
+ <descriptor name="amqp:open:list" code="0x00000000:0x00000010"/>
+ <field name="container-id" type="string" mandatory="true"/>
+ <field name="hostname" type="string"/>
+ <field name="max-frame-size" type="uint" default="4294967295"/>
+ <field name="channel-max" type="ushort" default="65535"/>
+ <field name="idle-time-out" type="milliseconds"/>
+ <field name="outgoing-locales" type="ietf-language-tag" multiple="true"/>
+ <field name="incoming-locales" type="ietf-language-tag" multiple="true"/>
+ <field name="offered-capabilities" type="symbol" multiple="true"/>
+ <field name="desired-capabilities" type="symbol" multiple="true"/>
+ <field name="properties" type="fields"/>
+ </type>
+ <type name="begin" class="composite" source="list" provides="frame">
+ <descriptor name="amqp:begin:list" code="0x00000000:0x00000011"/>
+ <field name="remote-channel" type="ushort"/>
+ <field name="next-outgoing-id" type="transfer-number" mandatory="true"/>
+ <field name="incoming-window" type="uint" mandatory="true"/>
+ <field name="outgoing-window" type="uint" mandatory="true"/>
+ <field name="handle-max" type="handle" default="4294967295"/>
+ <field name="offered-capabilities" type="symbol" multiple="true"/>
+ <field name="desired-capabilities" type="symbol" multiple="true"/>
+ <field name="properties" type="fields"/>
+ </type>
+ <type name="attach" class="composite" source="list" provides="frame">
+ <descriptor name="amqp:attach:list" code="0x00000000:0x00000012"/>
+ <field name="name" type="string" mandatory="true"/>
+ <field name="handle" type="handle" mandatory="true"/>
+ <field name="role" type="role" mandatory="true"/>
+ <field name="snd-settle-mode" type="sender-settle-mode" default="mixed"/>
+ <field name="rcv-settle-mode" type="receiver-settle-mode" default="first"/>
+ <field name="source" type="*" requires="source"/>
+ <field name="target" type="*" requires="target"/>
+ <field name="unsettled" type="map"/>
+ <field name="incomplete-unsettled" type="boolean" default="false"/>
+ <field name="initial-delivery-count" type="sequence-no"/>
+ <field name="max-message-size" type="ulong"/>
+ <field name="offered-capabilities" type="symbol" multiple="true"/>
+ <field name="desired-capabilities" type="symbol" multiple="true"/>
+ <field name="properties" type="fields"/>
+ </type>
+ <type name="flow" class="composite" source="list" provides="frame">
+ <descriptor name="amqp:flow:list" code="0x00000000:0x00000013"/>
+ <field name="next-incoming-id" type="transfer-number"/>
+ <field name="incoming-window" type="uint" mandatory="true"/>
+ <field name="next-outgoing-id" type="transfer-number" mandatory="true"/>
+ <field name="outgoing-window" type="uint" mandatory="true"/>
+ <field name="handle" type="handle"/>
+ <field name="delivery-count" type="sequence-no"/>
+ <field name="link-credit" type="uint"/>
+ <field name="available" type="uint"/>
+ <field name="drain" type="boolean" default="false"/>
+ <field name="echo" type="boolean" default="false"/>
+ <field name="properties" type="fields"/>
+ </type>
+ <type name="transfer" class="composite" source="list" provides="frame">
+ <descriptor name="amqp:transfer:list" code="0x00000000:0x00000014"/>
+ <field name="handle" type="handle" mandatory="true"/>
+ <field name="delivery-id" type="delivery-number"/>
+ <field name="delivery-tag" type="delivery-tag"/>
+ <field name="message-format" type="message-format"/>
+ <field name="settled" type="boolean"/>
+ <field name="more" type="boolean" default="false"/>
+ <field name="rcv-settle-mode" type="receiver-settle-mode"/>
+ <field name="state" type="*" requires="delivery-state"/>
+ <field name="resume" type="boolean" default="false"/>
+ <field name="aborted" type="boolean" default="false"/>
+ <field name="batchable" type="boolean" default="false"/>
+ </type>
+ <type name="disposition" class="composite" source="list" provides="frame">
+ <descriptor name="amqp:disposition:list" code="0x00000000:0x00000015"/>
+ <field name="role" type="role" mandatory="true"/>
+ <field name="first" type="delivery-number" mandatory="true"/>
+ <field name="last" type="delivery-number"/>
+ <field name="settled" type="boolean" default="false"/>
+ <field name="state" type="*" requires="delivery-state"/>
+ <field name="batchable" type="boolean" default="false"/>
+ </type>
+ <type name="detach" class="composite" source="list" provides="frame">
+ <descriptor name="amqp:detach:list" code="0x00000000:0x00000016"/>
+ <field name="handle" type="handle" mandatory="true"/>
+ <field name="closed" type="boolean" default="false"/>
+ <field name="error" type="error"/>
+ </type>
+ <type name="end" class="composite" source="list" provides="frame">
+ <descriptor name="amqp:end:list" code="0x00000000:0x00000017"/>
+ <field name="error" type="error"/>
+ </type>
+ <type name="close" class="composite" source="list" provides="frame">
+ <descriptor name="amqp:close:list" code="0x00000000:0x00000018"/>
+ <field name="error" type="error"/>
+ </type>
+ </section>
+ <section name="definitions">
+ <type name="role" class="restricted" source="boolean">
+ <choice name="sender" value="false"/>
+ <choice name="receiver" value="true"/>
+ </type>
+ <type name="sender-settle-mode" class="restricted" source="ubyte">
+ <choice name="unsettled" value="0"/>
+ <choice name="settled" value="1"/>
+ <choice name="mixed" value="2"/>
+ </type>
+ <type name="receiver-settle-mode" class="restricted" source="ubyte">
+ <choice name="first" value="0"/>
+ <choice name="second" value="1"/>
+ </type>
+ <type name="handle" class="restricted" source="uint"/>
+ <type name="seconds" class="restricted" source="uint"/>
+ <type name="milliseconds" class="restricted" source="uint"/>
+ <type name="delivery-tag" class="restricted" source="binary"/>
+ <type name="delivery-number" class="restricted" source="sequence-no"/>
+ <type name="transfer-number" class="restricted" source="sequence-no"/>
+ <type name="sequence-no" class="restricted" source="uint"/>
+ <type name="message-format" class="restricted" source="uint"/>
+ <type name="ietf-language-tag" class="restricted" source="symbol"/>
+ <type name="fields" class="restricted" source="map"/>
+ <type name="error" class="composite" source="list">
+ <descriptor name="amqp:error:list" code="0x00000000:0x0000001d"/>
+ <field name="condition" type="symbol" mandatory="true" requires="error-condition"/>
+ <field name="description" type="string"/>
+ <field name="info" type="fields"/>
+ </type>
+ <type name="amqp-error" class="restricted" source="symbol" provides="error-condition">
+ <choice name="internal-error" value="amqp:internal-error"/>
+ <choice name="not-found" value="amqp:not-found"/>
+ <choice name="unauthorized-access" value="amqp:unauthorized-access"/>
+ <choice name="decode-error" value="amqp:decode-error"/>
+ <choice name="resource-limit-exceeded" value="amqp:resource-limit-exceeded"/>
+ <choice name="not-allowed" value="amqp:not-allowed"/>
+ <choice name="invalid-field" value="amqp:invalid-field"/>
+ <choice name="not-implemented" value="amqp:not-implemented"/>
+ <choice name="resource-locked" value="amqp:resource-locked"/>
+ <choice name="precondition-failed" value="amqp:precondition-failed"/>
+ <choice name="resource-deleted" value="amqp:resource-deleted"/>
+ <choice name="illegal-state" value="amqp:illegal-state"/>
+ <choice name="frame-size-too-small" value="amqp:frame-size-too-small"/>
+ </type>
+ <type name="connection-error" class="restricted" source="symbol" provides="error-condition">
+ <choice name="connection-forced" value="amqp:connection:forced"/>
+ <choice name="framing-error" value="amqp:connection:framing-error"/>
+ <choice name="redirect" value="amqp:connection:redirect"/>
+ </type>
+ <type name="session-error" class="restricted" source="symbol" provides="error-condition">
+ <choice name="window-violation" value="amqp:session:window-violation"/>
+ <choice name="errant-link" value="amqp:session:errant-link"/>
+ <choice name="handle-in-use" value="amqp:session:handle-in-use"/>
+ <choice name="unattached-handle" value="amqp:session:unattached-handle"/>
+ </type>
+ <type name="link-error" class="restricted" source="symbol" provides="error-condition">
+ <choice name="detach-forced" value="amqp:link:detach-forced"/>
+ <choice name="transfer-limit-exceeded" value="amqp:link:transfer-limit-exceeded"/>
+ <choice name="message-size-exceeded" value="amqp:link:message-size-exceeded"/>
+ <choice name="redirect" value="amqp:link:redirect"/>
+ <choice name="stolen" value="amqp:link:stolen"/>
+ </type>
+ <definition name="PORT" value="5672"/>
+ <definition name="SECURE-PORT" value="5671"/>
+ <definition name="MAJOR" value="1"/>
+ <definition name="MINOR" value="0"/>
+ <definition name="REVISION" value="0"/>
+ <definition name="MIN-MAX-FRAME-SIZE" value="512"/>
+ </section>
+</amqp>
diff --git a/deps/rabbitmq_codegen/amqp-1.0/types.xml b/deps/rabbitmq_codegen/amqp-1.0/types.xml
new file mode 100644
index 0000000000..f91baa3d59
--- /dev/null
+++ b/deps/rabbitmq_codegen/amqp-1.0/types.xml
@@ -0,0 +1,125 @@
+<?xml version="1.0"?>
+
+<!--
+Copyright Bank of America, N.A., Barclays Bank PLC, Cisco Systems, Credit
+Suisse, Deutsche Boerse, Envoy Technologies Inc., Goldman Sachs, HCL
+Technologies Ltd, IIT Software GmbH, iMatix Corporation, INETCO Systems Limited,
+Informatica Corporation, JPMorgan Chase & Co., Kaazing Corporation, N.A,
+Microsoft Corporation, my-Channels, Novell, Progress Software, Red Hat Inc.,
+Software AG, Solace Systems Inc., StormMQ Ltd., Tervela Inc., TWIST Process
+Innovations Ltd, GoPivotal, Inc., and WS02 Inc. 2006-2011. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+
+<amqp name="types" xmlns="https://www.amqp.org/schema/amqp.xsd">
+ <section name="encodings">
+ <type name="null" class="primitive">
+ <encoding code="0x40" category="fixed" width="0"/>
+ </type>
+ <type name="boolean" class="primitive">
+ <encoding code="0x56" category="fixed" width="1"/>
+ <encoding name="true" code="0x41" category="fixed" width="0"/>
+ <encoding name="false" code="0x42" category="fixed" width="0"/>
+ </type>
+ <type name="ubyte" class="primitive">
+ <encoding code="0x50" category="fixed" width="1"/>
+ </type>
+ <type name="ushort" class="primitive">
+ <encoding code="0x60" category="fixed" width="2"/>
+ </type>
+ <type name="uint" class="primitive">
+ <encoding code="0x70" category="fixed" width="4"/>
+ <encoding name="smalluint" code="0x52" category="fixed" width="1"/>
+ <encoding name="uint0" code="0x43" category="fixed" width="0"/>
+ </type>
+ <type name="ulong" class="primitive">
+ <encoding code="0x80" category="fixed" width="8"/>
+ <encoding name="smallulong" code="0x53" category="fixed" width="1"/>
+ <encoding name="ulong0" code="0x44" category="fixed" width="0"/>
+ </type>
+ <type name="byte" class="primitive">
+ <encoding code="0x51" category="fixed" width="1"/>
+ </type>
+ <type name="short" class="primitive">
+ <encoding code="0x61" category="fixed" width="2"/>
+ </type>
+ <type name="int" class="primitive">
+ <encoding code="0x71" category="fixed" width="4"/>
+ <encoding name="smallint" code="0x54" category="fixed" width="1"/>
+ </type>
+ <type name="long" class="primitive">
+ <encoding code="0x81" category="fixed" width="8"/>
+ <encoding name="smalllong" code="0x55" category="fixed" width="1"/>
+ </type>
+ <type name="float" class="primitive">
+ <encoding name="ieee-754" code="0x72" category="fixed" width="4"/>
+ </type>
+ <type name="double" class="primitive">
+ <encoding name="ieee-754" code="0x82" category="fixed" width="8"/>
+ </type>
+ <type name="decimal32" class="primitive">
+ <encoding name="ieee-754" code="0x74" category="fixed" width="4"/>
+ </type>
+ <type name="decimal64" class="primitive">
+ <encoding name="ieee-754" code="0x84" category="fixed" width="8"/>
+ </type>
+ <type name="decimal128" class="primitive">
+ <encoding name="ieee-754" code="0x94" category="fixed" width="16"/>
+ </type>
+ <type name="char" class="primitive">
+ <encoding name="utf32" code="0x73" category="fixed" width="4"/>
+ </type>
+ <type name="timestamp" class="primitive">
+ <encoding name="ms64" code="0x83" category="fixed" width="8"/>
+ </type>
+ <type name="uuid" class="primitive">
+ <encoding code="0x98" category="fixed" width="16"/>
+ </type>
+ <type name="binary" class="primitive">
+ <encoding name="vbin8" code="0xa0" category="variable" width="1"/>
+ <encoding name="vbin32" code="0xb0" category="variable" width="4"/>
+ </type>
+ <type name="string" class="primitive">
+ <encoding name="str8-utf8" code="0xa1" category="variable" width="1"/>
+ <encoding name="str32-utf8" code="0xb1" category="variable" width="4"/>
+ </type>
+ <type name="symbol" class="primitive">
+ <encoding name="sym8" code="0xa3" category="variable" width="1"/>
+ <encoding name="sym32" code="0xb3" category="variable" width="4"/>
+ </type>
+ <type name="list" class="primitive">
+ <encoding name="list0" code="0x45" category="fixed" width="0"/>
+ <encoding name="list8" code="0xc0" category="compound" width="1"/>
+ <encoding name="list32" code="0xd0" category="compound" width="4"/>
+ </type>
+ <type name="map" class="primitive">
+ <encoding name="map8" code="0xc1" category="compound" width="1"/>
+ <encoding name="map32" code="0xd1" category="compound" width="4"/>
+ </type>
+ <type name="array" class="primitive">
+ <encoding name="array8" code="0xe0" category="array" width="1"/>
+ <encoding name="array32" code="0xf0" category="array" width="4"/>
+ </type>
+ </section>
+</amqp>
diff --git a/deps/rabbitmq_codegen/amqp-rabbitmq-0.8.json b/deps/rabbitmq_codegen/amqp-rabbitmq-0.8.json
new file mode 100644
index 0000000000..c0b30a5d44
--- /dev/null
+++ b/deps/rabbitmq_codegen/amqp-rabbitmq-0.8.json
@@ -0,0 +1,659 @@
+{
+ "name": "AMQP",
+ "major-version": 8,
+ "minor-version": 0,
+ "port": 5672,
+ "copyright": [
+ "Copyright (C) 2008-2020 VMware, Inc. or its affiliates.\n",
+ "\n",
+ "Permission is hereby granted, free of charge, to any person\n",
+ "obtaining a copy of this file (the \"Software\"), to deal in the\n",
+ "Software without restriction, including without limitation the \n",
+ "rights to use, copy, modify, merge, publish, distribute, \n",
+ "sublicense, and/or sell copies of the Software, and to permit \n",
+ "persons to whom the Software is furnished to do so, subject to \n",
+ "the following conditions:\n",
+ "\n",
+ "The above copyright notice and this permission notice shall be\n",
+ "included in all copies or substantial portions of the Software.\n",
+ "\n",
+ "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n",
+ "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n",
+ "OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n",
+ "NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n",
+ "HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n",
+ "WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n",
+ "FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n",
+ "OTHER DEALINGS IN THE SOFTWARE.\n",
+ "\n",
+ "Class information entered from amqp_xml0-8.pdf and domain types from amqp-xml-doc0-9.pdf\n",
+ "\n",
+ "b3cb053f15e7b98808c0ccc67f23cb3e amqp_xml0-8.pdf\n",
+ "http://twiststandards.org/?option=com_docman&task=cat_view&gid=28&Itemid=90\n",
+ "8444db91e2949dbecfb2585e9eef6d64 amqp-xml-doc0-9.pdf\n",
+ "https://jira.amqp.org/confluence/download/attachments/720900/amqp-xml-doc0-9.pdf?version=1\n"],
+
+ "domains": [
+ ["access-ticket", "short"],
+ ["bit", "bit"],
+ ["channel-id", "longstr"],
+ ["class-id", "short"],
+ ["consumer-tag", "shortstr"],
+ ["delivery-tag", "longlong"],
+ ["destination", "shortstr"],
+ ["duration", "longlong"],
+ ["exchange-name", "shortstr"],
+ ["known-hosts", "shortstr"],
+ ["long", "long"],
+ ["longlong", "longlong"],
+ ["longstr", "longstr"],
+ ["method-id", "short"],
+ ["no-ack", "bit"],
+ ["no-local", "bit"],
+ ["octet", "octet"],
+ ["offset", "longlong"],
+ ["path", "shortstr"],
+ ["peer-properties", "table"],
+ ["queue-name", "shortstr"],
+ ["redelivered", "bit"],
+ ["reference", "longstr"],
+ ["reject-code", "short"],
+ ["reject-text", "shortstr"],
+ ["reply-code", "short"],
+ ["reply-text", "shortstr"],
+ ["security-token", "longstr"],
+ ["short", "short"],
+ ["shortstr", "shortstr"],
+ ["table", "table"],
+ ["timestamp", "timestamp"]
+ ],
+
+ "constants": [
+ {"name": "FRAME-METHOD", "value": 1},
+ {"name": "FRAME-HEADER", "value": 2},
+ {"name": "FRAME-BODY", "value": 3},
+ {"name": "FRAME-OOB-METHOD", "value": 4},
+ {"name": "FRAME-OOB-HEADER", "value": 5},
+ {"name": "FRAME-OOB-BODY", "value": 6},
+ {"name": "FRAME-TRACE", "value": 7},
+ {"name": "FRAME-HEARTBEAT", "value": 8},
+ {"name": "FRAME-MIN-SIZE", "value": 4096},
+ {"name": "FRAME-END", "value": 206},
+ {"name": "REPLY-SUCCESS", "value": 200},
+ {"name": "NOT-DELIVERED", "value": 310, "class": "soft-error"},
+ {"name": "CONTENT-TOO-LARGE", "value": 311, "class": "soft-error"},
+ {"name": "NO-ROUTE", "value": 312, "class": "soft-error"},
+ {"name": "NO-CONSUMERS", "value": 313, "class": "soft-error"},
+ {"name": "ACCESS-REFUSED", "value": 403, "class": "soft-error"},
+ {"name": "NOT-FOUND", "value": 404, "class": "soft-error"},
+ {"name": "RESOURCE-LOCKED", "value": 405, "class": "soft-error"},
+ {"name": "PRECONDITION-FAILED", "value": 406, "class": "soft-error"},
+ {"name": "CONNECTION-FORCED", "value": 320, "class": "hard-error"},
+ {"name": "INVALID-PATH", "value": 402, "class": "hard-error"},
+ {"name": "FRAME-ERROR", "value": 501, "class": "hard-error"},
+ {"name": "SYNTAX-ERROR", "value": 502, "class": "hard-error"},
+ {"name": "COMMAND-INVALID", "value": 503, "class": "hard-error"},
+ {"name": "CHANNEL-ERROR", "value": 504, "class": "hard-error"},
+ {"name": "UNEXPECTED-FRAME", "value": 505, "class": "hard-error"},
+ {"name": "RESOURCE-ERROR", "value": 506, "class": "hard-error"},
+ {"name": "NOT-ALLOWED", "value": 530, "class": "hard-error"},
+ {"name": "NOT-IMPLEMENTED", "value": 540, "class": "hard-error"},
+ {"name": "INTERNAL-ERROR", "value": 541, "class": "hard-error"}
+ ],
+
+ "classes": [
+ {
+ "id": 10,
+ "methods": [{"id": 10,
+ "arguments": [{"type": "octet", "name": "version-major", "default-value": 0},
+ {"type": "octet", "name": "version-minor", "default-value": 8},
+ {"domain": "peer-properties", "name": "server-properties"},
+ {"type": "longstr", "name": "mechanisms", "default-value": "PLAIN"},
+ {"type": "longstr", "name": "locales", "default-value": "en_US"}],
+ "name": "start",
+ "synchronous" : true},
+ {"id": 11,
+ "arguments": [{"domain": "peer-properties", "name": "client-properties"},
+ {"type": "shortstr", "name": "mechanism", "default-value": "PLAIN"},
+ {"type": "longstr", "name": "response"},
+ {"type": "shortstr", "name": "locale", "default-value": "en_US"}],
+ "name": "start-ok"},
+ {"id": 20,
+ "arguments": [{"type": "longstr", "name": "challenge"}],
+ "name": "secure",
+ "synchronous" : true},
+ {"id": 21,
+ "arguments": [{"type": "longstr", "name": "response"}],
+ "name": "secure-ok"},
+ {"id": 30,
+ "arguments": [{"type": "short", "name": "channel-max", "default-value": 0},
+ {"type": "long", "name": "frame-max", "default-value": 0},
+ {"type": "short", "name": "heartbeat", "default-value": 0}],
+ "name": "tune",
+ "synchronous" : true},
+ {"id": 31,
+ "arguments": [{"type": "short", "name": "channel-max", "default-value": 0},
+ {"type": "long", "name": "frame-max", "default-value": 0},
+ {"type": "short", "name": "heartbeat", "default-value": 0}],
+ "name": "tune-ok"},
+ {"id": 40,
+ "arguments": [{"type": "shortstr", "name": "virtual-host", "default-value": "/"},
+ {"type": "shortstr", "name": "capabilities", "default-value": ""},
+ {"type": "bit", "name": "insist", "default-value": false}],
+ "name": "open",
+ "synchronous" : true},
+ {"id": 41,
+ "arguments": [{"type": "shortstr", "name": "known-hosts", "default-value": ""}],
+ "name": "open-ok"},
+ {"id": 50,
+ "arguments": [{"type": "shortstr", "name": "host"},
+ {"type": "shortstr", "name": "known-hosts", "default-value": ""}],
+ "name": "redirect"},
+ {"id": 60,
+ "arguments": [{"type": "short", "name": "reply-code"},
+ {"type": "shortstr", "name": "reply-text", "default-value": ""},
+ {"type": "short", "name": "class-id"},
+ {"type": "short", "name": "method-id"}],
+ "name": "close",
+ "synchronous" : true},
+ {"id": 61,
+ "arguments": [],
+ "name": "close-ok"}],
+ "name": "connection",
+ "properties": []
+ },
+ {
+ "id": 20,
+ "methods": [{"id": 10,
+ "arguments": [{"type": "shortstr", "name": "out-of-band", "default-value": ""}],
+ "name": "open",
+ "synchronous" : true},
+ {"id": 11,
+ "arguments": [],
+ "name": "open-ok"},
+ {"id": 20,
+ "arguments": [{"type": "bit", "name": "active"}],
+ "name": "flow",
+ "synchronous" : true},
+ {"id": 21,
+ "arguments": [{"type": "bit", "name": "active"}],
+ "name": "flow-ok"},
+ {"id": 30,
+ "arguments": [{"type": "short", "name": "reply-code"},
+ {"type": "shortstr", "name": "reply-text", "default-value": ""},
+ {"type": "table", "name": "details", "default-value": {}}],
+ "name": "alert"},
+ {"id": 40,
+ "arguments": [{"type": "short", "name": "reply-code"},
+ {"type": "shortstr", "name": "reply-text", "default-value": ""},
+ {"type": "short", "name": "class-id"},
+ {"type": "short", "name": "method-id"}],
+ "name": "close",
+ "synchronous" : true},
+ {"id": 41,
+ "arguments": [],
+ "name": "close-ok"}],
+ "name": "channel"
+ },
+ {
+ "id": 30,
+ "methods": [{"id": 10,
+ "arguments": [{"type": "shortstr", "name": "realm", "default-value": "/data"},
+ {"type": "bit", "name": "exclusive", "default-value": false},
+ {"type": "bit", "name": "passive", "default-value": true},
+ {"type": "bit", "name": "active", "default-value": true},
+ {"type": "bit", "name": "write", "default-value": true},
+ {"type": "bit", "name": "read", "default-value": true}],
+ "name": "request",
+ "synchronous" : true},
+ {"id": 11,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 1}],
+ "name": "request-ok"}],
+ "name": "access"
+ },
+ {
+ "id": 40,
+ "methods": [{"id": 10,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
+ {"type": "shortstr", "name": "exchange"},
+ {"type": "shortstr", "name": "type", "default-value": "direct"},
+ {"type": "bit", "name": "passive", "default-value": false},
+ {"type": "bit", "name": "durable", "default-value": false},
+ {"type": "bit", "name": "auto-delete", "default-value": false},
+ {"type": "bit", "name": "internal", "default-value": false},
+ {"type": "bit", "name": "nowait", "default-value": false},
+ {"type": "table", "name": "arguments", "default-value": {}}],
+ "name": "declare",
+ "synchronous" : true},
+ {"id": 11,
+ "arguments": [],
+ "name": "declare-ok"},
+ {"id": 20,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
+ {"type": "shortstr", "name": "exchange"},
+ {"type": "bit", "name": "if-unused", "default-value": false},
+ {"type": "bit", "name": "nowait", "default-value": false}],
+ "name": "delete",
+ "synchronous" : true},
+ {"id": 21,
+ "arguments": [],
+ "name": "delete-ok"}],
+ "name": "exchange"
+ },
+ {
+ "id": 50,
+ "methods": [{"id": 10,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
+ {"type": "shortstr", "name": "queue", "default-value": ""},
+ {"type": "bit", "name": "passive", "default-value": false},
+ {"type": "bit", "name": "durable", "default-value": false},
+ {"type": "bit", "name": "exclusive", "default-value": false},
+ {"type": "bit", "name": "auto-delete", "default-value": false},
+ {"type": "bit", "name": "nowait", "default-value": false},
+ {"type": "table", "name": "arguments", "default-value": {}}],
+ "name": "declare",
+ "synchronous" : true},
+ {"id": 11,
+ "arguments": [{"type": "shortstr", "name": "queue"},
+ {"type": "long", "name": "message-count"},
+ {"type": "long", "name": "consumer-count"}],
+ "name": "declare-ok"},
+ {"id": 20,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
+ {"type": "shortstr", "name": "queue", "default-value": ""},
+ {"type": "shortstr", "name": "exchange"},
+ {"type": "shortstr", "name": "routing-key", "default-value": ""},
+ {"type": "bit", "name": "nowait", "default-value": false},
+ {"type": "table", "name": "arguments", "default-value": {}}],
+ "name": "bind",
+ "synchronous" : true},
+ {"id": 21,
+ "arguments": [],
+ "name": "bind-ok"},
+ {"id": 30,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
+ {"type": "shortstr", "name": "queue", "default-value": ""},
+ {"type": "bit", "name": "nowait", "default-value": false}],
+ "name": "purge",
+ "synchronous" : true},
+ {"id": 31,
+ "arguments": [{"type": "long", "name": "message-count"}],
+ "name": "purge-ok"},
+ {"id": 40,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
+ {"type": "shortstr", "name": "queue", "default-value": ""},
+ {"type": "bit", "name": "if-unused", "default-value": false},
+ {"type": "bit", "name": "if-empty", "default-value": false},
+ {"type": "bit", "name": "nowait", "default-value": false}],
+ "name": "delete",
+ "synchronous" : true},
+ {"id": 41,
+ "arguments": [{"type": "long", "name": "message-count"}],
+ "name": "delete-ok"},
+ {"id": 50,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
+ {"type": "shortstr", "name": "queue", "default-value": ""},
+ {"type": "shortstr", "name": "exchange"},
+ {"type": "shortstr", "name": "routing-key", "default-value": ""},
+ {"type": "table", "name": "arguments", "default-value": {}}],
+ "name": "unbind",
+ "synchronous" : true},
+ {"id": 51,
+ "arguments": [],
+ "name": "unbind-ok"}
+ ],
+ "name": "queue"
+ },
+ {
+ "id": 60,
+ "methods": [{"id": 10,
+ "arguments": [{"type": "long", "name": "prefetch-size", "default-value": 0},
+ {"type": "short", "name": "prefetch-count", "default-value": 0},
+ {"type": "bit", "name": "global", "default-value": false}],
+ "name": "qos",
+ "synchronous" : true},
+ {"id": 11,
+ "arguments": [],
+ "name": "qos-ok"},
+ {"id": 20,
+ "arguments": [{"domain": "access-ticket", "name": "ticket", "default-value": 1},
+ {"type": "shortstr", "name": "queue", "default-value": ""},
+ {"type": "shortstr", "name": "consumer-tag", "default-value": ""},
+ {"type": "bit", "name": "no-local", "default-value": false},
+ {"type": "bit", "name": "no-ack", "default-value": false},
+ {"type": "bit", "name": "exclusive", "default-value": false},
+ {"type": "bit", "name": "nowait", "default-value": false}],
+ "name": "consume",
+ "synchronous" : true},
+ {"id": 21,
+ "arguments": [{"type": "shortstr", "name": "consumer-tag"}],
+ "name": "consume-ok"},
+ {"id": 30,
+ "arguments": [{"type": "shortstr", "name": "consumer-tag"},
+ {"type": "bit", "name": "nowait", "default-value": false}],
+ "name": "cancel",
+ "synchronous" : true},
+ {"id": 31,
+ "arguments": [{"type": "shortstr", "name": "consumer-tag"}],
+ "name": "cancel-ok"},
+ {"content": true,
+ "id": 40,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
+ {"type": "shortstr", "name": "exchange", "default-value": ""},
+ {"type": "shortstr", "name": "routing-key", "default-value": ""},
+ {"type": "bit", "name": "mandatory", "default-value": false},
+ {"type": "bit", "name": "immediate", "default-value": false}],
+ "name": "publish"},
+ {"content": true,
+ "id": 50,
+ "arguments": [{"type": "short", "name": "reply-code"},
+ {"type": "shortstr", "name": "reply-text", "default-value": ""},
+ {"type": "shortstr", "name": "exchange"},
+ {"type": "shortstr", "name": "routing-key"}],
+ "name": "return"},
+ {"content": true,
+ "id": 60,
+ "arguments": [{"type": "shortstr", "name": "consumer-tag"},
+ {"type": "longlong", "name": "delivery-tag"},
+ {"type": "bit", "name": "redelivered", "default-value": false},
+ {"type": "shortstr", "name": "exchange"},
+ {"type": "shortstr", "name": "routing-key"}],
+ "name": "deliver"},
+ {"id": 70,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
+ {"type": "shortstr", "name": "queue", "default-value": ""},
+ {"type": "bit", "name": "no-ack", "default-value": false}],
+ "name": "get",
+ "synchronous" : true},
+ {"content": true,
+ "id": 71,
+ "arguments": [{"type": "longlong", "name": "delivery-tag"},
+ {"type": "bit", "name": "redelivered", "default-value": false},
+ {"type": "shortstr", "name": "exchange"},
+ {"type": "shortstr", "name": "routing-key"},
+ {"type": "long", "name": "message-count"}],
+ "name": "get-ok"},
+ {"id": 72,
+ "arguments": [{"type": "shortstr", "name": "cluster-id", "default-value": ""}],
+ "name": "get-empty"},
+ {"id": 80,
+ "arguments": [{"type": "longlong", "name": "delivery-tag", "default-value": 0},
+ {"type": "bit", "name": "multiple", "default-value": false}],
+ "name": "ack"},
+ {"id": 90,
+ "arguments": [{"type": "longlong", "name": "delivery-tag"},
+ {"type": "bit", "name": "requeue", "default-value": true}],
+ "name": "reject"},
+ {"id": 100,
+ "arguments": [{"type": "bit", "name": "requeue", "default-value": false}],
+ "name": "recover-async"},
+ {"id": 110,
+ "arguments": [{"type": "bit", "name": "requeue", "default-value": false}],
+ "name": "recover",
+ "synchronous" : true},
+ {"id": 111,
+ "arguments": [],
+ "name": "recover-ok"}],
+ "name": "basic",
+ "properties": [{"type": "shortstr", "name": "content-type"},
+ {"type": "shortstr", "name": "content-encoding"},
+ {"type": "table", "name": "headers"},
+ {"type": "octet", "name": "delivery-mode"},
+ {"type": "octet", "name": "priority"},
+ {"type": "shortstr", "name": "correlation-id"},
+ {"type": "shortstr", "name": "reply-to"},
+ {"type": "shortstr", "name": "expiration"},
+ {"type": "shortstr", "name": "message-id"},
+ {"type": "timestamp", "name": "timestamp"},
+ {"type": "shortstr", "name": "type"},
+ {"type": "shortstr", "name": "user-id"},
+ {"type": "shortstr", "name": "app-id"},
+ {"type": "shortstr", "name": "cluster-id"}]
+ },
+ {
+ "id": 70,
+ "methods": [{"id": 10,
+ "arguments": [{"type": "long", "name": "prefetch-size", "default-value": 0},
+ {"type": "short", "name": "prefetch-count", "default-value": 0},
+ {"type": "bit", "name": "global", "default-value": false}],
+ "name": "qos",
+ "synchronous" : true},
+ {"id": 11,
+ "arguments": [],
+ "name": "qos-ok"},
+ {"id": 20,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
+ {"type": "shortstr", "name": "queue", "default-value": ""},
+ {"type": "shortstr", "name": "consumer-tag", "default-value": ""},
+ {"type": "bit", "name": "no-local", "default-value": false},
+ {"type": "bit", "name": "no-ack", "default-value": false},
+ {"type": "bit", "name": "exclusive", "default-value": false},
+ {"type": "bit", "name": "nowait", "default-value": false}],
+ "name": "consume",
+ "synchronous" : true},
+ {"id": 21,
+ "arguments": [{"type": "shortstr", "name": "consumer-tag"}],
+ "name": "consume-ok"},
+ {"id": 30,
+ "arguments": [{"type": "shortstr", "name": "consumer-tag"},
+ {"type": "bit", "name": "nowait", "default-value": false}],
+ "name": "cancel",
+ "synchronous" : true},
+ {"id": 31,
+ "arguments": [{"type": "shortstr", "name": "consumer-tag"}],
+ "name": "cancel-ok"},
+ {"id": 40,
+ "arguments": [{"type": "shortstr", "name": "identifier"},
+ {"type": "longlong", "name": "content-size"}],
+ "name": "open",
+ "synchronous" : true},
+ {"id": 41,
+ "arguments": [{"type": "longlong", "name": "staged-size"}],
+ "name": "open-ok"},
+ {"content": true,
+ "id": 50,
+ "arguments": [],
+ "name": "stage"},
+ {"id": 60,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
+ {"type": "shortstr", "name": "exchange", "default-value": ""},
+ {"type": "shortstr", "name": "routing-key", "default-value": ""},
+ {"type": "bit", "name": "mandatory", "default-value": false},
+ {"type": "bit", "name": "immediate", "default-value": false},
+ {"type": "shortstr", "name": "identifier"}],
+ "name": "publish"},
+ {"content": true,
+ "id": 70,
+ "arguments": [{"type": "short", "name": "reply-code", "default-value": 200},
+ {"type": "shortstr", "name": "reply-text", "default-value": ""},
+ {"type": "shortstr", "name": "exchange"},
+ {"type": "shortstr", "name": "routing-key"}],
+ "name": "return"},
+ {"id": 80,
+ "arguments": [{"type": "shortstr", "name": "consumer-tag"},
+ {"type": "longlong", "name": "delivery-tag"},
+ {"type": "bit", "name": "redelivered", "default-value": false},
+ {"type": "shortstr", "name": "exchange"},
+ {"type": "shortstr", "name": "routing-key"},
+ {"type": "shortstr", "name": "identifier"}],
+ "name": "deliver"},
+ {"id": 90,
+ "arguments": [{"type": "longlong", "name": "delivery-tag", "default-value": 0},
+ {"type": "bit", "name": "multiple", "default-value": false}],
+ "name": "ack"},
+ {"id": 100,
+ "arguments": [{"type": "longlong", "name": "delivery-tag"},
+ {"type": "bit", "name": "requeue", "default-value": true}],
+ "name": "reject"}],
+ "name": "file",
+ "properties": [{"type": "shortstr", "name": "content-type"},
+ {"type": "shortstr", "name": "content-encoding"},
+ {"type": "table", "name": "headers"},
+ {"type": "octet", "name": "priority"},
+ {"type": "shortstr", "name": "reply-to"},
+ {"type": "shortstr", "name": "message-id"},
+ {"type": "shortstr", "name": "filename"},
+ {"type": "timestamp", "name": "timestamp"},
+ {"type": "shortstr", "name": "cluster-id"}]
+ },
+ {
+ "id": 80,
+ "methods": [{"id": 10,
+ "arguments": [{"type": "long", "name": "prefetch-size", "default-value": 0},
+ {"type": "short", "name": "prefetch-count", "default-value": 0},
+ {"type": "long", "name": "consume-rate", "default-value": 0},
+ {"type": "bit", "name": "global", "default-value": false}],
+ "name": "qos",
+ "synchronous" : true},
+ {"id": 11,
+ "arguments": [],
+ "name": "qos-ok"},
+ {"id": 20,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
+ {"type": "shortstr", "name": "queue", "default-value": ""},
+ {"type": "shortstr", "name": "consumer-tag", "default-value": ""},
+ {"type": "bit", "name": "no-local", "default-value": false},
+ {"type": "bit", "name": "exclusive", "default-value": false},
+ {"type": "bit", "name": "nowait", "default-value": false}],
+ "name": "consume",
+ "synchronous" : true},
+ {"id": 21,
+ "arguments": [{"type": "shortstr", "name": "consumer-tag"}],
+ "name": "consume-ok"},
+ {"id": 30,
+ "arguments": [{"type": "shortstr", "name": "consumer-tag"},
+ {"type": "bit", "name": "nowait", "default-value": false}],
+ "name": "cancel",
+ "synchronous" : true},
+ {"id": 31,
+ "arguments": [{"type": "shortstr", "name": "consumer-tag"}],
+ "name": "cancel-ok"},
+ {"content": true,
+ "id": 40,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 1},
+ {"type": "shortstr", "name": "exchange", "default-value": ""},
+ {"type": "shortstr", "name": "routing-key", "default-value": ""},
+ {"type": "bit", "name": "mandatory", "default-value": false},
+ {"type": "bit", "name": "immediate", "default-value": false}],
+ "name": "publish"},
+ {"content": true,
+ "id": 50,
+ "arguments": [{"type": "short", "name": "reply-code", "default-value": 200},
+ {"type": "shortstr", "name": "reply-text", "default-value": ""},
+ {"type": "shortstr", "name": "exchange"},
+ {"type": "shortstr", "name": "routing-key"}],
+ "name": "return"},
+ {"content": true,
+ "id": 60,
+ "arguments": [{"type": "shortstr", "name": "consumer-tag"},
+ {"type": "longlong", "name": "delivery-tag"},
+ {"type": "shortstr", "name": "exchange"},
+ {"type": "shortstr", "name": "queue"}],
+ "name": "deliver"}],
+ "name": "stream",
+ "properties": [{"type": "shortstr", "name": "content-type"},
+ {"type": "shortstr", "name": "content-encoding"},
+ {"type": "table", "name": "headers"},
+ {"type": "octet", "name": "priority"},
+ {"type": "timestamp", "name": "timestamp"}]
+ },
+ {
+ "id": 90,
+ "methods": [{"id": 10,
+ "arguments": [],
+ "name": "select",
+ "synchronous" : true},
+ {"id": 11,
+ "arguments": [],
+ "name": "select-ok"},
+ {"id": 20,
+ "arguments": [],
+ "name": "commit",
+ "synchronous" : true},
+ {"id": 21,
+ "arguments": [],
+ "name": "commit-ok"},
+ {"id": 30,
+ "arguments": [],
+ "name": "rollback",
+ "synchronous" : true},
+ {"id": 31,
+ "arguments": [],
+ "name": "rollback-ok"}],
+ "name": "tx"
+ },
+ {
+ "id": 100,
+ "methods": [{"id": 10,
+ "arguments": [],
+ "name": "select",
+ "synchronous" : true},
+ {"id": 11,
+ "arguments": [],
+ "name": "select-ok"},
+ {"id": 20,
+ "arguments": [{"type": "shortstr", "name": "dtx-identifier"}],
+ "name": "start",
+ "synchronous" : true},
+ {"id": 21,
+ "arguments": [], "name": "start-ok"}],
+ "name": "dtx"
+ },
+ {
+ "id": 110,
+ "methods": [{"content": true,
+ "id": 10,
+ "arguments": [{"type": "table", "name": "meta-data"}],
+ "name": "request"}],
+ "name": "tunnel",
+ "properties": [{"type": "table", "name": "headers"},
+ {"type": "shortstr", "name": "proxy-name"},
+ {"type": "shortstr", "name": "data-name"},
+ {"type": "octet", "name": "durable"},
+ {"type": "octet", "name": "broadcast"}]
+ },
+ {
+ "id": 120,
+ "methods": [{"id": 10,
+ "arguments": [{"type": "octet", "name": "integer-1"},
+ {"type": "short", "name": "integer-2"},
+ {"type": "long", "name": "integer-3"},
+ {"type": "longlong", "name": "integer-4"},
+ {"type": "octet", "name": "operation"}],
+ "name": "integer",
+ "synchronous" : true},
+ {"id": 11,
+ "arguments": [{"type": "longlong", "name": "result"}],
+ "name": "integer-ok"},
+ {"id": 20,
+ "arguments": [{"type": "shortstr", "name": "string-1"},
+ {"type": "longstr", "name": "string-2"},
+ {"type": "octet", "name": "operation"}],
+ "name": "string",
+ "synchronous" : true},
+ {"id": 21,
+ "arguments": [{"type": "longstr", "name": "result"}],
+ "name": "string-ok"},
+ {"id": 30,
+ "arguments": [{"type": "table", "name": "table"},
+ {"type": "octet", "name": "integer-op"},
+ {"type": "octet", "name": "string-op"}],
+ "name": "table",
+ "synchronous" : true},
+ {"id": 31,
+ "arguments": [{"type": "longlong", "name": "integer-result"},
+ {"type": "longstr", "name": "string-result"}],
+ "name": "table-ok"},
+ {"content": true,
+ "id": 40,
+ "arguments": [],
+ "name": "content",
+ "synchronous" : true},
+ {"content": true,
+ "id": 41,
+ "arguments": [{"type": "long", "name": "content-checksum"}],
+ "name": "content-ok"}],
+ "name": "test"
+ }
+ ]
+}
diff --git a/deps/rabbitmq_codegen/amqp-rabbitmq-0.9.1.json b/deps/rabbitmq_codegen/amqp-rabbitmq-0.9.1.json
new file mode 100644
index 0000000000..329d63ee97
--- /dev/null
+++ b/deps/rabbitmq_codegen/amqp-rabbitmq-0.9.1.json
@@ -0,0 +1,483 @@
+{
+ "name": "AMQP",
+ "major-version": 0,
+ "minor-version": 9,
+ "revision": 1,
+ "port": 5672,
+ "copyright": [
+ "Copyright (C) 2008-2020 VMware, Inc. or its affiliates.\n",
+ "\n",
+ "Permission is hereby granted, free of charge, to any person\n",
+ "obtaining a copy of this file (the \"Software\"), to deal in the\n",
+ "Software without restriction, including without limitation the \n",
+ "rights to use, copy, modify, merge, publish, distribute, \n",
+ "sublicense, and/or sell copies of the Software, and to permit \n",
+ "persons to whom the Software is furnished to do so, subject to \n",
+ "the following conditions:\n",
+ "\n",
+ "The above copyright notice and this permission notice shall be\n",
+ "included in all copies or substantial portions of the Software.\n",
+ "\n",
+ "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n",
+ "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n",
+ "OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n",
+ "NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n",
+ "HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n",
+ "WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n",
+ "FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n",
+ "OTHER DEALINGS IN THE SOFTWARE.\n",
+ "\n",
+ "Class information entered from amqp_xml0-8.pdf and domain types from amqp-xml-doc0-9.pdf\n",
+ "Updated for 0-9-1 by Tony Garnock-Jones\n",
+ "\n",
+ "b3cb053f15e7b98808c0ccc67f23cb3e amqp_xml0-8.pdf\n",
+ "http://twiststandards.org/?option=com_docman&task=cat_view&gid=28&Itemid=90\n",
+ "8444db91e2949dbecfb2585e9eef6d64 amqp-xml-doc0-9.pdf\n",
+ "https://jira.amqp.org/confluence/download/attachments/720900/amqp-xml-doc0-9.pdf?version=1\n"],
+
+ "domains": [
+ ["bit", "bit"],
+ ["channel-id", "longstr"],
+ ["class-id", "short"],
+ ["consumer-tag", "shortstr"],
+ ["delivery-tag", "longlong"],
+ ["destination", "shortstr"],
+ ["duration", "longlong"],
+ ["exchange-name", "shortstr"],
+ ["long", "long"],
+ ["longlong", "longlong"],
+ ["longstr", "longstr"],
+ ["message-count", "long"],
+ ["method-id", "short"],
+ ["no-ack", "bit"],
+ ["no-local", "bit"],
+ ["octet", "octet"],
+ ["offset", "longlong"],
+ ["path", "shortstr"],
+ ["peer-properties", "table"],
+ ["queue-name", "shortstr"],
+ ["redelivered", "bit"],
+ ["reference", "longstr"],
+ ["reject-code", "short"],
+ ["reject-text", "shortstr"],
+ ["reply-code", "short"],
+ ["reply-text", "shortstr"],
+ ["security-token", "longstr"],
+ ["short", "short"],
+ ["shortstr", "shortstr"],
+ ["table", "table"],
+ ["timestamp", "timestamp"]
+ ],
+
+ "constants": [
+ {"name": "FRAME-METHOD", "value": 1},
+ {"name": "FRAME-HEADER", "value": 2},
+ {"name": "FRAME-BODY", "value": 3},
+ {"name": "FRAME-HEARTBEAT", "value": 8},
+ {"name": "FRAME-MIN-SIZE", "value": 4096},
+ {"name": "FRAME-END", "value": 206},
+ {"name": "REPLY-SUCCESS", "value": 200},
+ {"name": "CONTENT-TOO-LARGE", "value": 311, "class": "soft-error"},
+ {"name": "NO-ROUTE", "value": 312, "class": "soft-error"},
+ {"name": "NO-CONSUMERS", "value": 313, "class": "soft-error"},
+ {"name": "ACCESS-REFUSED", "value": 403, "class": "soft-error"},
+ {"name": "NOT-FOUND", "value": 404, "class": "soft-error"},
+ {"name": "RESOURCE-LOCKED", "value": 405, "class": "soft-error"},
+ {"name": "PRECONDITION-FAILED", "value": 406, "class": "soft-error"},
+ {"name": "CONNECTION-FORCED", "value": 320, "class": "hard-error"},
+ {"name": "INVALID-PATH", "value": 402, "class": "hard-error"},
+ {"name": "FRAME-ERROR", "value": 501, "class": "hard-error"},
+ {"name": "SYNTAX-ERROR", "value": 502, "class": "hard-error"},
+ {"name": "COMMAND-INVALID", "value": 503, "class": "hard-error"},
+ {"name": "CHANNEL-ERROR", "value": 504, "class": "hard-error"},
+ {"name": "UNEXPECTED-FRAME", "value": 505, "class": "hard-error"},
+ {"name": "RESOURCE-ERROR", "value": 506, "class": "hard-error"},
+ {"name": "NOT-ALLOWED", "value": 530, "class": "hard-error"},
+ {"name": "NOT-IMPLEMENTED", "value": 540, "class": "hard-error"},
+ {"name": "INTERNAL-ERROR", "value": 541, "class": "hard-error"}
+ ],
+
+ "classes": [
+ {
+ "id": 10,
+ "methods": [{"id": 10,
+ "arguments": [{"type": "octet", "name": "version-major", "default-value": 0},
+ {"type": "octet", "name": "version-minor", "default-value": 9},
+ {"domain": "peer-properties", "name": "server-properties"},
+ {"type": "longstr", "name": "mechanisms", "default-value": "PLAIN"},
+ {"type": "longstr", "name": "locales", "default-value": "en_US"}],
+ "name": "start",
+ "synchronous" : true},
+ {"id": 11,
+ "arguments": [{"domain": "peer-properties", "name": "client-properties"},
+ {"type": "shortstr", "name": "mechanism", "default-value": "PLAIN"},
+ {"type": "longstr", "name": "response"},
+ {"type": "shortstr", "name": "locale", "default-value": "en_US"}],
+ "name": "start-ok"},
+ {"id": 20,
+ "arguments": [{"type": "longstr", "name": "challenge"}],
+ "name": "secure",
+ "synchronous" : true},
+ {"id": 21,
+ "arguments": [{"type": "longstr", "name": "response"}],
+ "name": "secure-ok"},
+ {"id": 30,
+ "arguments": [{"type": "short", "name": "channel-max", "default-value": 0},
+ {"type": "long", "name": "frame-max", "default-value": 0},
+ {"type": "short", "name": "heartbeat", "default-value": 0}],
+ "name": "tune",
+ "synchronous" : true},
+ {"id": 31,
+ "arguments": [{"type": "short", "name": "channel-max", "default-value": 0},
+ {"type": "long", "name": "frame-max", "default-value": 0},
+ {"type": "short", "name": "heartbeat", "default-value": 0}],
+ "name": "tune-ok"},
+ {"id": 40,
+ "arguments": [{"type": "shortstr", "name": "virtual-host", "default-value": "/"},
+ {"type": "shortstr", "name": "capabilities", "default-value": ""},
+ {"type": "bit", "name": "insist", "default-value": false}],
+ "name": "open",
+ "synchronous" : true},
+ {"id": 41,
+ "arguments": [{"type": "shortstr", "name": "known-hosts", "default-value": ""}],
+ "name": "open-ok"},
+ {"id": 50,
+ "arguments": [{"type": "short", "name": "reply-code"},
+ {"type": "shortstr", "name": "reply-text", "default-value": ""},
+ {"type": "short", "name": "class-id"},
+ {"type": "short", "name": "method-id"}],
+ "name": "close",
+ "synchronous" : true},
+ {"id": 51,
+ "arguments": [],
+ "name": "close-ok"},
+ {"id": 60,
+ "arguments": [{"type": "shortstr", "name": "reason", "default-value": ""}],
+ "name": "blocked"},
+ {"id": 61,
+ "arguments": [],
+ "name": "unblocked"},
+ {"id": 70,
+ "arguments": [{"type": "longstr", "name": "new-secret"},
+ {"type": "shortstr", "name": "reason"}],
+ "name": "update-secret",
+ "synchronous" : true},
+ {"id": 71,
+ "arguments": [],
+ "name": "update-secret-ok"}
+ ],
+ "name": "connection",
+ "properties": []
+ },
+ {
+ "id": 20,
+ "methods": [{"id": 10,
+ "arguments": [{"type": "shortstr", "name": "out-of-band", "default-value": ""}],
+ "name": "open",
+ "synchronous" : true},
+ {"id": 11,
+ "arguments": [{"type": "longstr", "name": "channel-id", "default-value": ""}],
+ "name": "open-ok"},
+ {"id": 20,
+ "arguments": [{"type": "bit", "name": "active"}],
+ "name": "flow",
+ "synchronous" : true},
+ {"id": 21,
+ "arguments": [{"type": "bit", "name": "active"}],
+ "name": "flow-ok"},
+ {"id": 40,
+ "arguments": [{"type": "short", "name": "reply-code"},
+ {"type": "shortstr", "name": "reply-text", "default-value": ""},
+ {"type": "short", "name": "class-id"},
+ {"type": "short", "name": "method-id"}],
+ "name": "close",
+ "synchronous" : true},
+ {"id": 41,
+ "arguments": [],
+ "name": "close-ok"}],
+ "name": "channel"
+ },
+ {
+ "id": 30,
+ "methods": [{"id": 10,
+ "arguments": [{"type": "shortstr", "name": "realm", "default-value": "/data"},
+ {"type": "bit", "name": "exclusive", "default-value": false},
+ {"type": "bit", "name": "passive", "default-value": true},
+ {"type": "bit", "name": "active", "default-value": true},
+ {"type": "bit", "name": "write", "default-value": true},
+ {"type": "bit", "name": "read", "default-value": true}],
+ "name": "request",
+ "synchronous" : true},
+ {"id": 11,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 1}],
+ "name": "request-ok"}],
+ "name": "access"
+ },
+ {
+ "id": 40,
+ "methods": [{"id": 10,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 0},
+ {"domain": "exchange-name", "name": "exchange"},
+ {"type": "shortstr", "name": "type", "default-value": "direct"},
+ {"type": "bit", "name": "passive", "default-value": false},
+ {"type": "bit", "name": "durable", "default-value": false},
+ {"type": "bit", "name": "auto-delete", "default-value": false},
+ {"type": "bit", "name": "internal", "default-value": false},
+ {"type": "bit", "name": "nowait", "default-value": false},
+ {"type": "table", "name": "arguments", "default-value": {}}],
+ "name": "declare",
+ "synchronous" : true},
+ {"id": 11,
+ "arguments": [],
+ "name": "declare-ok"},
+ {"id": 20,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 0},
+ {"domain": "exchange-name", "name": "exchange"},
+ {"type": "bit", "name": "if-unused", "default-value": false},
+ {"type": "bit", "name": "nowait", "default-value": false}],
+ "name": "delete",
+ "synchronous" : true},
+ {"id": 21,
+ "arguments": [],
+ "name": "delete-ok"},
+ {"id": 30,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 0},
+ {"domain": "exchange-name", "name": "destination"},
+ {"domain": "exchange-name", "name": "source"},
+ {"type": "shortstr", "name": "routing-key", "default-value": ""},
+ {"type": "bit", "name": "nowait", "default-value": false},
+ {"type": "table", "name": "arguments", "default-value": {}}],
+ "name": "bind",
+ "synchronous" : true},
+ {"id": 31,
+ "arguments": [],
+ "name": "bind-ok"},
+ {"id": 40,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 0},
+ {"domain": "exchange-name", "name": "destination"},
+ {"domain": "exchange-name", "name": "source"},
+ {"type": "shortstr", "name": "routing-key", "default-value": ""},
+ {"type": "bit", "name": "nowait", "default-value": false},
+ {"type": "table", "name": "arguments", "default-value": {}}],
+ "name": "unbind",
+ "synchronous" : true},
+ {"id": 51,
+ "arguments": [],
+ "name": "unbind-ok"}],
+ "name": "exchange"
+ },
+ {
+ "id": 50,
+ "methods": [{"id": 10,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 0},
+ {"domain": "queue-name", "name": "queue", "default-value": ""},
+ {"type": "bit", "name": "passive", "default-value": false},
+ {"type": "bit", "name": "durable", "default-value": false},
+ {"type": "bit", "name": "exclusive", "default-value": false},
+ {"type": "bit", "name": "auto-delete", "default-value": false},
+ {"type": "bit", "name": "nowait", "default-value": false},
+ {"type": "table", "name": "arguments", "default-value": {}}],
+ "name": "declare",
+ "synchronous" : true},
+ {"id": 11,
+ "arguments": [{"domain": "queue-name", "name": "queue"},
+ {"domain": "message-count", "name": "message-count"},
+ {"type": "long", "name": "consumer-count"}],
+ "name": "declare-ok"},
+ {"id": 20,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 0},
+ {"domain": "queue-name", "name": "queue", "default-value": ""},
+ {"domain": "exchange-name", "name": "exchange"},
+ {"type": "shortstr", "name": "routing-key", "default-value": ""},
+ {"type": "bit", "name": "nowait", "default-value": false},
+ {"type": "table", "name": "arguments", "default-value": {}}],
+ "name": "bind",
+ "synchronous" : true},
+ {"id": 21,
+ "arguments": [],
+ "name": "bind-ok"},
+ {"id": 30,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 0},
+ {"domain": "queue-name", "name": "queue", "default-value": ""},
+ {"type": "bit", "name": "nowait", "default-value": false}],
+ "name": "purge",
+ "synchronous" : true},
+ {"id": 31,
+ "arguments": [{"domain": "message-count", "name": "message-count"}],
+ "name": "purge-ok"},
+ {"id": 40,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 0},
+ {"domain": "queue-name", "name": "queue", "default-value": ""},
+ {"type": "bit", "name": "if-unused", "default-value": false},
+ {"type": "bit", "name": "if-empty", "default-value": false},
+ {"type": "bit", "name": "nowait", "default-value": false}],
+ "name": "delete",
+ "synchronous" : true},
+ {"id": 41,
+ "arguments": [{"domain": "message-count", "name": "message-count"}],
+ "name": "delete-ok"},
+ {"id": 50,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 0},
+ {"domain": "queue-name", "name": "queue", "default-value": ""},
+ {"domain": "exchange-name", "name": "exchange"},
+ {"type": "shortstr", "name": "routing-key", "default-value": ""},
+ {"type": "table", "name": "arguments", "default-value": {}}],
+ "name": "unbind",
+ "synchronous" : true},
+ {"id": 51,
+ "arguments": [],
+ "name": "unbind-ok"}
+ ],
+ "name": "queue"
+ },
+ {
+ "id": 60,
+ "methods": [{"id": 10,
+ "arguments": [{"type": "long", "name": "prefetch-size", "default-value": 0},
+ {"type": "short", "name": "prefetch-count", "default-value": 0},
+ {"type": "bit", "name": "global", "default-value": false}],
+ "name": "qos",
+ "synchronous" : true},
+ {"id": 11,
+ "arguments": [],
+ "name": "qos-ok"},
+ {"id": 20,
+ "arguments": [{"domain": "short", "name": "ticket", "default-value": 0},
+ {"domain": "queue-name", "name": "queue", "default-value": ""},
+ {"type": "shortstr", "name": "consumer-tag", "default-value": ""},
+ {"type": "bit", "name": "no-local", "default-value": false},
+ {"type": "bit", "name": "no-ack", "default-value": false},
+ {"type": "bit", "name": "exclusive", "default-value": false},
+ {"type": "bit", "name": "nowait", "default-value": false},
+ {"type": "table", "name": "arguments", "default-value": {}}],
+ "name": "consume",
+ "synchronous" : true},
+ {"id": 21,
+ "arguments": [{"type": "shortstr", "name": "consumer-tag"}],
+ "name": "consume-ok"},
+ {"id": 30,
+ "arguments": [{"type": "shortstr", "name": "consumer-tag"},
+ {"type": "bit", "name": "nowait", "default-value": false}],
+ "name": "cancel",
+ "synchronous" : true},
+ {"id": 31,
+ "arguments": [{"type": "shortstr", "name": "consumer-tag"}],
+ "name": "cancel-ok"},
+ {"content": true,
+ "id": 40,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 0},
+ {"domain": "exchange-name", "name": "exchange", "default-value": ""},
+ {"type": "shortstr", "name": "routing-key", "default-value": ""},
+ {"type": "bit", "name": "mandatory", "default-value": false},
+ {"type": "bit", "name": "immediate", "default-value": false}],
+ "name": "publish"},
+ {"content": true,
+ "id": 50,
+ "arguments": [{"type": "short", "name": "reply-code"},
+ {"type": "shortstr", "name": "reply-text", "default-value": ""},
+ {"domain": "exchange-name", "name": "exchange"},
+ {"type": "shortstr", "name": "routing-key"}],
+ "name": "return"},
+ {"content": true,
+ "id": 60,
+ "arguments": [{"type": "shortstr", "name": "consumer-tag"},
+ {"type": "longlong", "name": "delivery-tag"},
+ {"type": "bit", "name": "redelivered", "default-value": false},
+ {"domain": "exchange-name", "name": "exchange"},
+ {"type": "shortstr", "name": "routing-key"}],
+ "name": "deliver"},
+ {"id": 70,
+ "arguments": [{"type": "short", "name": "ticket", "default-value": 0},
+ {"domain": "queue-name", "name": "queue", "default-value": ""},
+ {"type": "bit", "name": "no-ack", "default-value": false}],
+ "name": "get",
+ "synchronous" : true},
+ {"content": true,
+ "id": 71,
+ "arguments": [{"type": "longlong", "name": "delivery-tag"},
+ {"type": "bit", "name": "redelivered", "default-value": false},
+ {"domain": "exchange-name", "name": "exchange"},
+ {"type": "shortstr", "name": "routing-key"},
+ {"domain": "message-count", "name": "message-count"}],
+ "name": "get-ok"},
+ {"id": 72,
+ "arguments": [{"type": "shortstr", "name": "cluster-id", "default-value": ""}],
+ "name": "get-empty"},
+ {"id": 80,
+ "arguments": [{"type": "longlong", "name": "delivery-tag", "default-value": 0},
+ {"type": "bit", "name": "multiple", "default-value": false}],
+ "name": "ack"},
+ {"id": 90,
+ "arguments": [{"type": "longlong", "name": "delivery-tag"},
+ {"type": "bit", "name": "requeue", "default-value": true}],
+ "name": "reject"},
+ {"id": 100,
+ "arguments": [{"type": "bit", "name": "requeue", "default-value": false}],
+ "name": "recover-async"},
+ {"id": 110,
+ "arguments": [{"type": "bit", "name": "requeue", "default-value": false}],
+ "name": "recover",
+ "synchronous" : true},
+ {"id": 111,
+ "arguments": [],
+ "name": "recover-ok"},
+ {"id": 120,
+ "arguments": [{"type": "longlong", "name": "delivery-tag", "default-value": 0},
+ {"type": "bit", "name": "multiple", "default-value": false},
+ {"type": "bit", "name": "requeue", "default-value": true}],
+ "name": "nack"}],
+ "name": "basic",
+ "properties": [{"type": "shortstr", "name": "content-type"},
+ {"type": "shortstr", "name": "content-encoding"},
+ {"type": "table", "name": "headers"},
+ {"type": "octet", "name": "delivery-mode"},
+ {"type": "octet", "name": "priority"},
+ {"type": "shortstr", "name": "correlation-id"},
+ {"type": "shortstr", "name": "reply-to"},
+ {"type": "shortstr", "name": "expiration"},
+ {"type": "shortstr", "name": "message-id"},
+ {"type": "timestamp", "name": "timestamp"},
+ {"type": "shortstr", "name": "type"},
+ {"type": "shortstr", "name": "user-id"},
+ {"type": "shortstr", "name": "app-id"},
+ {"type": "shortstr", "name": "cluster-id"}]
+ },
+ {
+ "id": 90,
+ "methods": [{"id": 10,
+ "arguments": [],
+ "name": "select",
+ "synchronous" : true},
+ {"id": 11,
+ "arguments": [],
+ "name": "select-ok"},
+ {"id": 20,
+ "arguments": [],
+ "name": "commit",
+ "synchronous" : true},
+ {"id": 21,
+ "arguments": [],
+ "name": "commit-ok"},
+ {"id": 30,
+ "arguments": [],
+ "name": "rollback",
+ "synchronous" : true},
+ {"id": 31,
+ "arguments": [],
+ "name": "rollback-ok"}],
+ "name": "tx"
+ },
+ {
+ "id": 85,
+ "methods": [{"id": 10,
+ "arguments": [
+ {"type": "bit", "name": "nowait", "default-value": false}],
+ "name": "select",
+ "synchronous": true},
+ {"id": 11,
+ "arguments": [],
+ "name": "select-ok"}],
+ "name": "confirm"
+ }
+ ]
+}
diff --git a/deps/rabbitmq_codegen/amqp_codegen.py b/deps/rabbitmq_codegen/amqp_codegen.py
new file mode 100644
index 0000000000..39fb825239
--- /dev/null
+++ b/deps/rabbitmq_codegen/amqp_codegen.py
@@ -0,0 +1,287 @@
+## This Source Code Form is subject to the terms of the Mozilla Public
+## License, v. 2.0. If a copy of the MPL was not distributed with this
+## file, You can obtain one at https://mozilla.org/MPL/2.0/.
+##
+## Copyright (c) 2007-2020 VMware, Inc. or its affiliates. All rights reserved.
+##
+
+from __future__ import nested_scopes, print_function
+import errno
+import re
+import sys
+import os
+from optparse import OptionParser
+
+try:
+ try:
+ import simplejson as json
+ except ImportError as e:
+ if sys.hexversion >= 0x20600f0:
+ import json
+ else:
+ raise e
+except ImportError:
+ print(" You don't appear to have simplejson.py installed", file = sys.stderr)
+ print(" (an implementation of a JSON reader and writer in Python).", file = sys.stderr)
+ print(" You can install it:", file = sys.stderr)
+ print(" - by running 'apt-get install python-simplejson' on Debian-based systems,", file = sys.stderr)
+ print(" - by running 'yum install python-simplejson' on Fedora/Red Hat system,", file = sys.stderr)
+ print(" - by running 'port install py25-simplejson' on Macports on OS X", file = sys.stderr)
+ print(" (you may need to say 'make PYTHON=python2.5', as well),", file = sys.stderr)
+ print(" - from sources from 'https://pypi.python.org/pypi/simplejson'", file = sys.stderr)
+ print(" - simplejson is a standard json library in the Python core since 2.6", file = sys.stderr)
+ sys.exit(1)
+
+def insert_base_types(d):
+ for t in ['octet', 'shortstr', 'longstr', 'short', 'long',
+ 'longlong', 'bit', 'table', 'timestamp']:
+ d[t] = t
+
+class AmqpSpecFileMergeConflict(Exception): pass
+
+# If ignore_conflicts is true, then we allow acc and new to conflict,
+# with whatever's already in acc winning and new being ignored. If
+# ignore_conflicts is false, acc and new must not conflict.
+
+def default_spec_value_merger(key, acc, new, ignore_conflicts):
+ if acc is None or acc == new or ignore_conflicts:
+ return new
+ else:
+ raise AmqpSpecFileMergeConflict(key, acc, new)
+
+def extension_info_merger(key, acc, new, ignore_conflicts):
+ return acc + [new]
+
+def domains_merger(key, acc, new, ignore_conflicts):
+ merged = dict((k, v) for [k, v] in acc)
+ for [k, v] in new:
+ if k in merged:
+ if not ignore_conflicts:
+ raise AmqpSpecFileMergeConflict(key, acc, new)
+ else:
+ merged[k] = v
+
+ return [[k, v] for (k, v) in merged.items()]
+
+def merge_dict_lists_by(dict_key, acc, new, ignore_conflicts):
+ acc_index = set(v[dict_key] for v in acc)
+ result = list(acc) # shallow copy
+ for v in new:
+ if v[dict_key] in acc_index:
+ if not ignore_conflicts:
+ raise AmqpSpecFileMergeConflict(description, acc, new)
+ else:
+ result.append(v)
+ return result
+
+def constants_merger(key, acc, new, ignore_conflicts):
+ return merge_dict_lists_by("name", acc, new, ignore_conflicts)
+
+def methods_merger(classname, acc, new, ignore_conflicts):
+ return merge_dict_lists_by("name", acc, new, ignore_conflicts)
+
+def properties_merger(classname, acc, new, ignore_conflicts):
+ return merge_dict_lists_by("name", acc, new, ignore_conflicts)
+
+def class_merger(acc, new, ignore_conflicts):
+ acc["methods"] = methods_merger(acc["name"],
+ acc["methods"],
+ new["methods"],
+ ignore_conflicts)
+ acc["properties"] = properties_merger(acc["name"],
+ acc.get("properties", []),
+ new.get("properties", []),
+ ignore_conflicts)
+
+def classes_merger(key, acc, new, ignore_conflicts):
+ acc_dict = dict((v["name"], v) for v in acc)
+ result = list(acc) # shallow copy
+ for w in new:
+ if w["name"] in acc_dict:
+ class_merger(acc_dict[w["name"]], w, ignore_conflicts)
+ else:
+ result.append(w)
+ return result
+
+mergers = {
+ "extension": (extension_info_merger, []),
+ "domains": (domains_merger, []),
+ "constants": (constants_merger, []),
+ "classes": (classes_merger, []),
+}
+
+def merge_load_specs(filenames, ignore_conflicts):
+ handles = [open(filename) for filename in filenames]
+ docs = [json.load(handle) for handle in handles]
+ spec = {}
+ for doc in docs:
+ for (key, value) in doc.items():
+ (merger, default_value) = mergers.get(key, (default_spec_value_merger, None))
+ spec[key] = merger(key, spec.get(key, default_value), value, ignore_conflicts)
+ for handle in handles: handle.close()
+ return spec
+
+class AmqpSpec:
+ # Slight wart: use a class member rather than change the ctor signature
+ # to avoid breaking everyone else's code.
+ ignore_conflicts = False
+
+ def __init__(self, filenames):
+ self.spec = merge_load_specs(filenames, AmqpSpec.ignore_conflicts)
+
+ self.major = self.spec['major-version']
+ self.minor = self.spec['minor-version']
+ self.revision = ('revision' in self.spec) and (self.spec['revision'] or 0)
+ self.port = self.spec['port']
+
+ self.domains = {}
+ insert_base_types(self.domains)
+ for entry in self.spec['domains']:
+ self.domains[ entry[0] ] = entry[1]
+
+ self.constants = []
+ for d in self.spec['constants']:
+ if 'class' in d:
+ klass = d['class']
+ else:
+ klass = ''
+ self.constants.append((d['name'], d['value'], klass))
+
+ self.classes = []
+ for element in self.spec['classes']:
+ self.classes.append(AmqpClass(self, element))
+
+ def allClasses(self):
+ return self.classes
+
+ def allMethods(self):
+ return [m for c in self.classes for m in c.allMethods()]
+
+ def resolveDomain(self, n):
+ return self.domains[n]
+
+class AmqpEntity:
+ def __init__(self, element):
+ self.element = element
+ self.name = element['name']
+
+class AmqpClass(AmqpEntity):
+ def __init__(self, spec, element):
+ AmqpEntity.__init__(self, element)
+ self.spec = spec
+ self.index = int(self.element['id'])
+
+ self.methods = []
+ for method_element in self.element['methods']:
+ self.methods.append(AmqpMethod(self, method_element))
+
+ self.hasContentProperties = False
+ for method in self.methods:
+ if method.hasContent:
+ self.hasContentProperties = True
+ break
+
+ self.fields = []
+ if 'properties' in self.element:
+ index = 0
+ for e in self.element['properties']:
+ self.fields.append(AmqpField(self, e, index))
+ index = index + 1
+
+ def allMethods(self):
+ return self.methods
+
+ def __repr__(self):
+ return 'AmqpClass("' + self.name + '")'
+
+class AmqpMethod(AmqpEntity):
+ def __init__(self, klass, element):
+ AmqpEntity.__init__(self, element)
+ self.klass = klass
+ self.index = int(self.element['id'])
+ if 'synchronous' in self.element:
+ self.isSynchronous = self.element['synchronous']
+ else:
+ self.isSynchronous = False
+ if 'content' in self.element:
+ self.hasContent = self.element['content']
+ else:
+ self.hasContent = False
+ self.arguments = []
+
+ index = 0
+ for argument in element['arguments']:
+ self.arguments.append(AmqpField(self, argument, index))
+ index = index + 1
+
+ def __repr__(self):
+ return 'AmqpMethod("' + self.klass.name + "." + self.name + '" ' + repr(self.arguments) + ')'
+
+class AmqpField(AmqpEntity):
+ def __init__(self, method, element, index):
+ AmqpEntity.__init__(self, element)
+ self.method = method
+ self.index = index
+
+ if 'type' in self.element:
+ self.domain = self.element['type']
+ else:
+ self.domain = self.element['domain']
+ if 'default-value' in self.element:
+ self.defaultvalue = self.element['default-value']
+ else:
+ self.defaultvalue = None
+
+ def __repr__(self):
+ return 'AmqpField("' + self.name + '")'
+
+def do_main(header_fn, body_fn):
+ do_main_dict({"header": header_fn, "body": body_fn})
+
+def do_main_dict(funcDict):
+ def usage():
+ print("Usage:", file = sys.stderr)
+ print(" {0} <function> <path_to_amqp_spec.json>... <path_to_output_file>".format(sys.argv[0]), file = sys.stderr)
+ print(" where <function> is one of: {0}".format(", ".join([k for k in funcDict.keys()])), file = sys.stderr)
+
+ def mkdir_p(path):
+ try:
+ os.makedirs(path)
+ except OSError as exc: # Python >2.5
+ if exc.errno == errno.EEXIST and os.path.isdir(path):
+ pass
+ else:
+ raise
+
+ def execute(fn, amqp_specs, out_file):
+ stdout = sys.stdout
+ mkdir_p(os.path.dirname(out_file))
+ f = open(out_file, 'w')
+ success = False
+ try:
+ sys.stdout = f
+ fn(amqp_specs)
+ success = True
+ finally:
+ sys.stdout = stdout
+ f.close()
+ if not success:
+ os.remove(out_file)
+
+ parser = OptionParser()
+ parser.add_option("--ignore-conflicts", action="store_true", dest="ignore_conflicts", default=False)
+ (options, args) = parser.parse_args()
+
+ if len(args) < 3:
+ usage()
+ sys.exit(1)
+ else:
+ function = args[0]
+ sources = args[1:-1]
+ dest = args[-1]
+ AmqpSpec.ignore_conflicts = options.ignore_conflicts
+ if function in funcDict:
+ execute(funcDict[function], sources, dest)
+ else:
+ usage()
+ sys.exit(1)
diff --git a/deps/rabbitmq_codegen/credit_extension.json b/deps/rabbitmq_codegen/credit_extension.json
new file mode 100644
index 0000000000..0fedebb0e2
--- /dev/null
+++ b/deps/rabbitmq_codegen/credit_extension.json
@@ -0,0 +1,54 @@
+{
+ "extension": {
+ "name": "credit",
+ "version": "0.1",
+ "status": [
+ "This extension is used internally by the broker and plugins. ",
+ "It is NOT intended to be used by regular clients over the ",
+ "network. This extension is subject to change without notice; ",
+ "hence you are strongly discouraged from building clients ",
+ "which use it."],
+ "copyright": [
+ "Copyright (C) 2008-2020 VMware, Inc. or its affiliates.\n",
+ "\n",
+ "Permission is hereby granted, free of charge, to any person\n",
+ "obtaining a copy of this file (the \"Software\"), to deal in the\n",
+ "Software without restriction, including without limitation the \n",
+ "rights to use, copy, modify, merge, publish, distribute, \n",
+ "sublicense, and/or sell copies of the Software, and to permit \n",
+ "persons to whom the Software is furnished to do so, subject to \n",
+ "the following conditions:\n",
+ "\n",
+ "The above copyright notice and this permission notice shall be\n",
+ "included in all copies or substantial portions of the Software.\n",
+ "\n",
+ "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n",
+ "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n",
+ "OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n",
+ "NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n",
+ "HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n",
+ "WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n",
+ "FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n",
+ "OTHER DEALINGS IN THE SOFTWARE.\n"]
+ },
+
+ "classes": [
+ {
+ "id": 60,
+ "methods": [{"id": 200,
+ "arguments": [{"type": "shortstr", "name": "consumer-tag", "default-value": ""},
+ {"type": "long", "name": "credit"},
+ {"type": "bit", "name": "drain"}],
+ "name": "credit",
+ "synchronous" : true},
+ {"id": 201,
+ "arguments": [{"type": "long", "name": "available"}],
+ "name": "credit-ok"},
+ {"id": 202,
+ "arguments": [{"type": "shortstr", "name": "consumer-tag", "default-value": ""},
+ {"type": "long", "name": "credit-drained"}],
+ "name": "credit-drained"}],
+ "name": "basic"
+ }
+ ]
+}
diff --git a/deps/rabbitmq_codegen/demo_extension.json b/deps/rabbitmq_codegen/demo_extension.json
new file mode 100644
index 0000000000..8eff39474e
--- /dev/null
+++ b/deps/rabbitmq_codegen/demo_extension.json
@@ -0,0 +1,18 @@
+{
+ "extension": {
+ "name": "demo",
+ "version": "1.0",
+ "copyright": "Copyright (C) 2009-2020 VMware, Inc. or its affiliates."
+ },
+ "domains": [
+ ["foo-domain", "shortstr"]
+ ],
+ "constants": [
+ {"name": "FOO-CONSTANT", "value": 121212}
+ ],
+ "classes": [
+ {"name": "demo",
+ "id": 555,
+ "methods": [{"name": "one", "id": 1, "arguments": []}]}
+ ]
+}
diff --git a/deps/rabbitmq_codegen/license_info b/deps/rabbitmq_codegen/license_info
new file mode 100644
index 0000000000..b64ea5bec9
--- /dev/null
+++ b/deps/rabbitmq_codegen/license_info
@@ -0,0 +1,4 @@
+The files amqp-rabbitmq-0.8.json and amqp-rabbitmq-0.9.1.json are
+"Copyright (C) 2008-2020 VMware, Inc. or its affiliates. and are covered by the MIT
+license.
+