diff options
Diffstat (limited to 'qpid/cpp/include')
| -rw-r--r-- | qpid/cpp/include/qpid/messaging/Message.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/qpid/cpp/include/qpid/messaging/Message.h b/qpid/cpp/include/qpid/messaging/Message.h index 5b14c7cf27..10569eb006 100644 --- a/qpid/cpp/include/qpid/messaging/Message.h +++ b/qpid/cpp/include/qpid/messaging/Message.h @@ -42,6 +42,7 @@ class MessageImpl; class QPID_MESSAGING_CLASS_EXTERN Message { public: + QPID_MESSAGING_EXTERN Message(qpid::types::Variant&); QPID_MESSAGING_EXTERN Message(const std::string& bytes = std::string()); QPID_MESSAGING_EXTERN Message(const char*, size_t); QPID_MESSAGING_EXTERN Message(const Message&); @@ -164,6 +165,27 @@ class QPID_MESSAGING_CLASS_EXTERN Message /** Get the content as a std::string */ QPID_MESSAGING_EXTERN std::string getContent() const; + /** Get the content as raw bytes (an alias for getContent() */ + QPID_MESSAGING_EXTERN std::string getContentBytes() const; + /** Set the content as raw bytes (an alias for setContent() */ + QPID_MESSAGING_EXTERN void setContentBytes(const std::string&); + /** + * Get the content as a Variant, which can represent an object of + * different types. This can be used for content representing a + * map or a list for example. + */ + QPID_MESSAGING_EXTERN qpid::types::Variant& getContentObject(); + /** + * Get the content as a Variant, which can represent an object of + * different types. This can be used for content representing a + * map or a list for example. + */ + QPID_MESSAGING_EXTERN const qpid::types::Variant& getContentObject() const; + /** + * Set the content using a Variant, which can represent an object + * of different types. + */ + QPID_MESSAGING_EXTERN void setContentObject(const qpid::types::Variant&); /** * Get a const pointer to the start of the content data. The * memory pointed to is owned by the message. The getContentSize() |
