summaryrefslogtreecommitdiff
path: root/cpp/lib/common/framing/AMQMethodBody.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-01-12 18:24:13 +0000
committerAlan Conway <aconway@apache.org>2007-01-12 18:24:13 +0000
commita2f603a03b5a6451139d4fcb22fd6e34f55c11e5 (patch)
tree82bb1d533568e3d40f060f00cf7d70474dffee2c /cpp/lib/common/framing/AMQMethodBody.cpp
parent482ff88ac8fcaf14207db6e23d3b9981365dfd62 (diff)
downloadqpid-python-a2f603a03b5a6451139d4fcb22fd6e34f55c11e5.tar.gz
Use amqp 0-9 request/response framing in broker and client.
Updated: framing, client, broker, generated code. The new request/response data (request-id etc.) is not yet being used, we are simply running the old Basic protocol over request/response frames. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/qpid.0-9@495679 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/lib/common/framing/AMQMethodBody.cpp')
-rw-r--r--cpp/lib/common/framing/AMQMethodBody.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/cpp/lib/common/framing/AMQMethodBody.cpp b/cpp/lib/common/framing/AMQMethodBody.cpp
index cd6db9b1a9..de081243ee 100644
--- a/cpp/lib/common/framing/AMQMethodBody.cpp
+++ b/cpp/lib/common/framing/AMQMethodBody.cpp
@@ -25,14 +25,9 @@
namespace qpid {
namespace framing {
-void AMQMethodBody::encode(Buffer& buffer) const{
+void AMQMethodBody::encodeId(Buffer& buffer) const{
buffer.putShort(amqpClassId());
buffer.putShort(amqpMethodId());
- encodeContent(buffer);
-}
-
-void AMQMethodBody::decode(Buffer& buffer, u_int32_t /*size*/){
- decodeContent(buffer);
}
bool AMQMethodBody::match(AMQMethodBody* other) const{
@@ -43,17 +38,25 @@ void AMQMethodBody::invoke(AMQP_ServerOperations& /*target*/, u_int16_t /*channe
THROW_QPID_ERROR(PROTOCOL_ERROR, "Method not supported by AMQP Server.");
}
-
-
AMQMethodBody::shared_ptr AMQMethodBody::create(
AMQP_MethodVersionMap& versionMap, ProtocolVersion version,
Buffer& buffer)
{
- u_int16_t classId = buffer.getShort();
- u_int16_t methodId = buffer.getShort();
+ MethodId id;
+ id.decode(buffer);
return AMQMethodBody::shared_ptr(
versionMap.createMethodBody(
- classId, methodId, version.getMajor(), version.getMinor()));
+ id.classId, id.methodId, version.getMajor(), version.getMinor()));
}
+void AMQMethodBody::MethodId::decode(Buffer& buffer) {
+ classId = buffer.getShort();
+ methodId = buffer.getShort();
+}
+
+void AMQMethodBody::decode(Buffer& buffer, u_int32_t /*size*/) {
+ decodeContent(buffer);
+}
+
+
}} // namespace qpid::framing