summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/framing/TransferContent.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/framing/TransferContent.cpp')
-rw-r--r--cpp/src/qpid/framing/TransferContent.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/cpp/src/qpid/framing/TransferContent.cpp b/cpp/src/qpid/framing/TransferContent.cpp
index 1faa24ae0c..4c2d06ae42 100644
--- a/cpp/src/qpid/framing/TransferContent.cpp
+++ b/cpp/src/qpid/framing/TransferContent.cpp
@@ -61,4 +61,35 @@ DeliveryProperties& TransferContent::getDeliveryProperties()
return *header.get<DeliveryProperties>(true);
}
+void TransferContent::populate(const FrameSet& frameset)
+{
+ header = *frameset.getHeaders();
+ frameset.getContent(data);
+}
+
+const MessageProperties& TransferContent::getMessageProperties() const
+{
+ const MessageProperties* props = header.get<MessageProperties>();
+ if (!props) throw NoSuchPropertiesException();
+ return *props;
+}
+
+const DeliveryProperties& TransferContent::getDeliveryProperties() const
+{
+ const DeliveryProperties* props = header.get<DeliveryProperties>();
+ if (!props) throw NoSuchPropertiesException();
+ return *props;
+}
+
+bool TransferContent::hasMessageProperties() const
+{
+ return header.get<MessageProperties>();
+}
+
+bool TransferContent::hasDeliveryProperties() const
+{
+ return header.get<DeliveryProperties>();
+}
+
+
}}