diff options
| author | Ted Ross <tross@apache.org> | 2009-06-11 15:54:37 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2009-06-11 15:54:37 +0000 |
| commit | 52be8c6219f98781d83711b32d4c5971b1fa6d1c (patch) | |
| tree | 812f608b9472a76d757e92be8dc3a184a2e2ae13 /cpp/src/qpid/console | |
| parent | 2a61047873520b644cbc368ebd59fb2d5a0c217d (diff) | |
| download | qpid-python-52be8c6219f98781d83711b32d4c5971b1fa6d1c.tar.gz | |
QPID-1786 - Committed qmf patches from Bryan Kearney
Additionally updated existing qmf and Qman to be compatible.
The magic number for qmf messages has been incremented.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@783818 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/console')
| -rw-r--r-- | cpp/src/qpid/console/Broker.cpp | 4 | ||||
| -rw-r--r-- | cpp/src/qpid/console/Schema.cpp | 15 | ||||
| -rw-r--r-- | cpp/src/qpid/console/Value.cpp | 2 | ||||
| -rw-r--r-- | cpp/src/qpid/console/Value.h | 6 |
4 files changed, 21 insertions, 6 deletions
diff --git a/cpp/src/qpid/console/Broker.cpp b/cpp/src/qpid/console/Broker.cpp index 4f90afd39a..68279a4f8e 100644 --- a/cpp/src/qpid/console/Broker.cpp +++ b/cpp/src/qpid/console/Broker.cpp @@ -72,7 +72,7 @@ void Broker::encodeHeader(Buffer& buf, uint8_t opcode, uint32_t seq) const { buf.putOctet('A'); buf.putOctet('M'); - buf.putOctet('2'); + buf.putOctet('3'); buf.putOctet(opcode); buf.putLong (seq); } @@ -89,7 +89,7 @@ bool Broker::checkHeader(Buffer& buf, uint8_t *opcode, uint32_t *seq) const *opcode = buf.getOctet(); *seq = buf.getLong(); - return h1 == 'A' && h2 == 'M' && h3 == '2'; + return h1 == 'A' && h2 == 'M' && h3 == '3'; } void Broker::received(qpid::client::Message& msg) diff --git a/cpp/src/qpid/console/Schema.cpp b/cpp/src/qpid/console/Schema.cpp index 9b4312d11f..a248b2d09a 100644 --- a/cpp/src/qpid/console/Schema.cpp +++ b/cpp/src/qpid/console/Schema.cpp @@ -119,9 +119,18 @@ SchemaClass::SchemaClass(const uint8_t _kind, const ClassKey& _key, framing::Buf kind(_kind), key(_key) { if (kind == KIND_TABLE) { - uint16_t propCount = buffer.getShort(); - uint16_t statCount = buffer.getShort(); - uint16_t methodCount = buffer.getShort(); + uint8_t hasSupertype = buffer.getOctet(); + uint16_t propCount = buffer.getShort(); + uint16_t statCount = buffer.getShort(); + uint16_t methodCount = buffer.getShort(); + + if (hasSupertype) { + string unused; + buffer.getShortString(unused); + buffer.getShortString(unused); + buffer.getLongLong(); + buffer.getLongLong(); + } for (uint16_t idx = 0; idx < propCount; idx++) properties.push_back(new SchemaProperty(buffer)); diff --git a/cpp/src/qpid/console/Value.cpp b/cpp/src/qpid/console/Value.cpp index 1a7f690baf..c557699f33 100644 --- a/cpp/src/qpid/console/Value.cpp +++ b/cpp/src/qpid/console/Value.cpp @@ -114,7 +114,7 @@ string MapValue::str() const MapValue::MapValue(framing::Buffer& buffer) { - value.decode(buffer); + value.qmfDecode(buffer); } diff --git a/cpp/src/qpid/console/Value.h b/cpp/src/qpid/console/Value.h index 5a0915c69b..fbbe0b6a58 100644 --- a/cpp/src/qpid/console/Value.h +++ b/cpp/src/qpid/console/Value.h @@ -98,6 +98,8 @@ namespace console { std::string str() const; bool isUint() const { return true; } uint32_t asUint() const { return value; } + bool isUint64() const { return true; } + uint64_t asUint64() const { return (uint64_t) value; } private: uint32_t value; }; @@ -108,6 +110,8 @@ namespace console { std::string str() const; bool isInt() const { return true; } int32_t asInt() const { return value; } + bool isInt64() const { return true; } + int64_t asInt64() const { return (int64_t) value; } private: int32_t value; }; @@ -160,6 +164,8 @@ namespace console { std::string str() const; bool isFloat() const { return true; } float asFloat() const { return value; } + bool isDouble() const { return true; } + double asDouble() const { return (double) value; } private: float value; }; |
