summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/amqp_0_10
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2008-09-09 14:06:07 +0000
committerAlan Conway <aconway@apache.org>2008-09-09 14:06:07 +0000
commit833cf68a5bf58e882f377d144768ceb546e5e036 (patch)
tree8b2ca57e790956a38c33583970a5c4198b407073 /cpp/src/qpid/amqp_0_10
parent7feb5546e82e0d003f26027524ceb07e9b9b0452 (diff)
downloadqpid-python-833cf68a5bf58e882f377d144768ceb546e5e036.tar.gz
Generate c++ enum types for AMQP enums in framing/enum.h.
Modified enum scheme to avoid name clashes: namespace amqp_class { EnumName { ENUM_NAME_X=1, ENUM_NAME_X=2 ...}}; git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@693465 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/amqp_0_10')
-rw-r--r--cpp/src/qpid/amqp_0_10/SessionHandler.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/cpp/src/qpid/amqp_0_10/SessionHandler.cpp b/cpp/src/qpid/amqp_0_10/SessionHandler.cpp
index 35587940e5..8bf12d248a 100644
--- a/cpp/src/qpid/amqp_0_10/SessionHandler.cpp
+++ b/cpp/src/qpid/amqp_0_10/SessionHandler.cpp
@@ -23,6 +23,7 @@
#include "qpid/SessionState.h"
#include "qpid/framing/reply_exceptions.h"
#include "qpid/framing/AllInvoker.h"
+#include "qpid/framing/enum.h"
#include "qpid/log/Statement.h"
@@ -92,16 +93,16 @@ void SessionHandler::handleIn(AMQFrame& f) {
}
catch(const std::exception& e) {
QPID_LOG(error, "Unexpected exception: " << e.what());
- connectionException(connection::FRAMING_ERROR, e.what());
+ connectionException(connection::CLOSE_CODE_FRAMING_ERROR, e.what());
}
}
namespace {
bool isControl(const AMQFrame& f) {
- return f.getMethod() && f.getMethod()->type() == framing::CONTROL;
+ return f.getMethod() && f.getMethod()->type() == framing::SEGMENT_TYPE_CONTROL;
}
bool isCommand(const AMQFrame& f) {
- return f.getMethod() && f.getMethod()->type() == framing::COMMAND;
+ return f.getMethod() && f.getMethod()->type() == framing::SEGMENT_TYPE_COMMAND;
}
} // namespace
@@ -146,14 +147,14 @@ void SessionHandler::attached(const std::string& name) {
void SessionHandler::detach(const std::string& name) {
checkName(name);
- peer.detached(name, session::NORMAL);
+ peer.detached(name, session::DETACH_CODE_NORMAL);
handleDetach();
}
void SessionHandler::detached(const std::string& name, uint8_t code) {
checkName(name);
ignoring = false;
- if (code != session::NORMAL)
+ if (code != session::DETACH_CODE_NORMAL)
channelException(code, "session.detached from peer.");
else {
handleDetach();