From b4dac41573e33e1a04a2b7b8c9a35f5e72b662bc Mon Sep 17 00:00:00 2001 From: Gordon Sim Date: Mon, 3 Mar 2008 14:49:06 +0000 Subject: A further step to final 0-10 spec. The extra.xml fragment adds class defs for connection in session that are in line with latest spec but use old schema. The preview codepath (99-0) remains unaltered. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@633108 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/framing/Buffer.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'cpp/src/qpid/framing/Buffer.cpp') diff --git a/cpp/src/qpid/framing/Buffer.cpp b/cpp/src/qpid/framing/Buffer.cpp index c0cd210042..60d67f1b07 100644 --- a/cpp/src/qpid/framing/Buffer.cpp +++ b/cpp/src/qpid/framing/Buffer.cpp @@ -194,6 +194,13 @@ void Buffer::putShortString(const string& s){ position += len; } +void Buffer::putMediumString(const string& s){ + uint16_t len = s.length(); + putShort(len); + s.copy(data + position, len); + position += len; +} + void Buffer::putLongString(const string& s){ uint32_t len = s.length(); putLong(len); @@ -208,6 +215,13 @@ void Buffer::getShortString(string& s){ position += len; } +void Buffer::getMediumString(string& s){ + uint16_t len = getShort(); + checkAvailable(len); + s.assign(data + position, len); + position += len; +} + void Buffer::getLongString(string& s){ uint32_t len = getLong(); checkAvailable(len); -- cgit v1.2.1