summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/framing/FrameSet.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2007-09-13 17:29:16 +0000
committerGordon Sim <gsim@apache.org>2007-09-13 17:29:16 +0000
commit0a1b3430450f274aee273a9f792a2d43f771b85f (patch)
tree71be3bc1a920a568c0680f8e8a5e802c1c3bee8d /cpp/src/qpid/framing/FrameSet.cpp
parente00a1cfa3881e3bb8aadfecdf502f17903e319b1 (diff)
downloadqpid-python-0a1b3430450f274aee273a9f792a2d43f771b85f.tar.gz
Use frameset begin/end flags for determining frameset boundaries.
Set frameset & segment begin/end flags for content bearing methods (i.e. messages). git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@575377 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/framing/FrameSet.cpp')
-rw-r--r--cpp/src/qpid/framing/FrameSet.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/cpp/src/qpid/framing/FrameSet.cpp b/cpp/src/qpid/framing/FrameSet.cpp
index 12579f53cb..129219e0a1 100644
--- a/cpp/src/qpid/framing/FrameSet.cpp
+++ b/cpp/src/qpid/framing/FrameSet.cpp
@@ -38,20 +38,13 @@ void FrameSet::append(AMQFrame& part)
bool FrameSet::isComplete() const
{
- //TODO: should eventually use the 0-10 frame header flags when available
+ return !parts.empty() && parts.back().getEof();
+}
+
+bool FrameSet::isContentBearing() const
+{
const AMQMethodBody* method = getMethod();
- if (!method) {
- return false;
- } else if (method->isContentBearing()) {
- const AMQHeaderBody* header = getHeaders();
- if (header) {
- return header->getContentLength() == getContentSize();
- } else {
- return false;
- }
- } else {
- return true;
- }
+ return method && method->isContentBearing();
}
const AMQMethodBody* FrameSet::getMethod() const