qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject [3/4] qpid-dispatch git commit: DISPATCH-309: Added AMQP condition constants
Date Wed, 01 Mar 2017 20:54:56 GMT
DISPATCH-309: Added AMQP condition constants


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/275a8fb3
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/275a8fb3
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/275a8fb3

Branch: refs/heads/master
Commit: 275a8fb30058942c6e040c46388eedf89929101a
Parents: 454474e
Author: Alan Conway <aconway@redhat.com>
Authored: Mon Jan 23 10:08:51 2017 -0500
Committer: Alan Conway <aconway@redhat.com>
Committed: Wed Mar 1 13:59:59 2017 -0500

----------------------------------------------------------------------
 include/qpid/dispatch/amqp.h | 21 +++++++++++++++++++--
 src/amqp.c                   | 16 ++++++++++++++++
 2 files changed, 35 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/275a8fb3/include/qpid/dispatch/amqp.h
----------------------------------------------------------------------
diff --git a/include/qpid/dispatch/amqp.h b/include/qpid/dispatch/amqp.h
index bda1300..59332df 100644
--- a/include/qpid/dispatch/amqp.h
+++ b/include/qpid/dispatch/amqp.h
@@ -132,7 +132,7 @@ extern const char * const QD_CONNECTION_PROPERTY_COST_KEY;
 
 /** @name AMQP error codes. */
 /// @{
-/** An AMQP error status code and string description  */
+/** AMQP management error status code and string description (HTTP-style)  */
 typedef struct qd_amqp_error_t { int status; const char* description; } qd_amqp_error_t;
 extern const qd_amqp_error_t QD_AMQP_OK;
 extern const qd_amqp_error_t QD_AMQP_CREATED;
@@ -143,6 +143,23 @@ extern const qd_amqp_error_t QD_AMQP_NOT_FOUND;
 extern const qd_amqp_error_t QD_AMQP_NOT_IMPLEMENTED;
 /// @}
 
-/// @}
+/** @name Standard AMQP error condition names. */
+/// @{
+extern const char * const QD_AMQP_COND_INTERNAL_ERROR;
+extern const char * const QD_AMQP_COND_NOT_FOUND;
+extern const char * const QD_AMQP_COND_UNAUTHORIZED_ACCESS;
+extern const char * const QD_AMQP_COND_DECODE_ERROR;
+extern const char * const QD_AMQP_COND_RESOURCE_LIMIT_EXCEEDED;
+extern const char * const QD_AMQP_COND_NOT_ALLOWED;
+extern const char * const QD_AMQP_COND_INVALID_FIELD;
+extern const char * const QD_AMQP_COND_NOT_IMPLEMENTED;
+extern const char * const QD_AMQP_COND_RESOURCE_LOCKED;
+extern const char * const QD_AMQP_COND_PRECONDITION_FAILED;
+extern const char * const QD_AMQP_COND_RESOURCE_DELETED;
+extern const char * const QD_AMQP_COND_ILLEGAL_STATE;
+extern const char * const QD_AMQP_COND_FRAME_SIZE_TOO_SMALL;
+/// @};
 
+/// Name for AMQP conditions from the router that don't have a more specific name.
+extern const char * const QD_COND;
 #endif

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/275a8fb3/src/amqp.c
----------------------------------------------------------------------
diff --git a/src/amqp.c b/src/amqp.c
index 9568800..4d2062d 100644
--- a/src/amqp.c
+++ b/src/amqp.c
@@ -44,3 +44,19 @@ const qd_amqp_error_t QD_AMQP_BAD_REQUEST = { 400, "Bad Request" };
 const qd_amqp_error_t QD_AMQP_FORBIDDEN = { 403, "Forbidden" };
 const qd_amqp_error_t QD_AMQP_NOT_FOUND = { 404, "Not Found" };
 const qd_amqp_error_t QD_AMQP_NOT_IMPLEMENTED = { 501, "Not Implemented"};
+
+const char * const QD_AMQP_COND_INTERNAL_ERROR = "amqp:internal-error";
+const char * const QD_AMQP_COND_NOT_FOUND = "amqp:not-found";
+const char * const QD_AMQP_COND_UNAUTHORIZED_ACCESS = "amqp:unauthorized-access";
+const char * const QD_AMQP_COND_DECODE_ERROR = "amqp:decode-error";
+const char * const QD_AMQP_COND_RESOURCE_LIMIT_EXCEEDED = "amqp:resource-limit-exceeded";
+const char * const QD_AMQP_COND_NOT_ALLOWED = "amqp:not-allowed";
+const char * const QD_AMQP_COND_INVALID_FIELD = "amqp:invalid-field";
+const char * const QD_AMQP_COND_NOT_IMPLEMENTED = "amqp:not-implemented";
+const char * const QD_AMQP_COND_RESOURCE_LOCKED = "amqp:resource-locked";
+const char * const QD_AMQP_COND_PRECONDITION_FAILED = "amqp:precondition-failed";
+const char * const QD_AMQP_COND_RESOURCE_DELETED = "amqp:resource-deleted";
+const char * const QD_AMQP_COND_ILLEGAL_STATE = "amqp:illegal-state";
+const char * const QD_AMQP_COND_FRAME_SIZE_TOO_SMALL = "amqp:frame-size-too-small";
+
+const char * const QD_COND_NAME = "router:error";


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message