diff options
| author | Gordon Sim <gsim@apache.org> | 2008-03-03 14:49:06 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2008-03-03 14:49:06 +0000 |
| commit | b4dac41573e33e1a04a2b7b8c9a35f5e72b662bc (patch) | |
| tree | 15e25a2dc7b42f3788f9dccdd7e632dcf8c346d2 /cpp/src/qpid/framing/Buffer.cpp | |
| parent | 928699508993a5ccc59254027773281883d1e973 (diff) | |
| download | qpid-python-b4dac41573e33e1a04a2b7b8c9a35f5e72b662bc.tar.gz | |
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
Diffstat (limited to 'cpp/src/qpid/framing/Buffer.cpp')
| -rw-r--r-- | cpp/src/qpid/framing/Buffer.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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); |
