diff --git a/src/content/content.cpp b/src/content/content.cpp index 23b56f3cb..0557e3955 100644 --- a/src/content/content.cpp +++ b/src/content/content.cpp @@ -128,4 +128,8 @@ size_t Content::getSize () const { return d->body.size(); } +bool Content::isEmpty () const { + return getSize() == 0; +} + LINPHONE_END_NAMESPACE diff --git a/src/content/content.h b/src/content/content.h index 62b5cbe20..b68e7a344 100644 --- a/src/content/content.h +++ b/src/content/content.h @@ -48,12 +48,16 @@ public: const std::vector &getBody () const; std::string getBodyAsString () const; + void setBody (const std::vector &body); void setBody (const std::vector &&body); void setBody (const std::string &body); void setBody (const void *buffer, size_t size); + size_t getSize () const; + bool isEmpty () const; + private: L_DECLARE_PRIVATE(Content); };