From 5b9afdca3c850e7b33ac9555e8dc3e5e77d4e241 Mon Sep 17 00:00:00 2001 From: "Hoa V. DINH" Date: Sun, 1 May 2016 22:54:40 -0700 Subject: Added partID to RFC 822 messages, provided a way to retrieve data for serialized MessageParser --- src/core/rfc822/MCMultipart.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/core/rfc822/MCMultipart.cpp') diff --git a/src/core/rfc822/MCMultipart.cpp b/src/core/rfc822/MCMultipart.cpp index 0be76430..0e3ee1ab 100644 --- a/src/core/rfc822/MCMultipart.cpp +++ b/src/core/rfc822/MCMultipart.cpp @@ -6,14 +6,33 @@ using namespace mailcore; Multipart::Multipart() { + init(); } Multipart::Multipart(Multipart * other) : AbstractMultipart(other) { + init(); + setPartID(other->partID()); +} + +void Multipart::init() +{ + mPartID = NULL; } Multipart::~Multipart() { + MC_SAFE_RELEASE(mPartID); +} + +void Multipart::setPartID(String * partID) +{ + MC_SAFE_REPLACE_COPY(String, mPartID, partID); +} + +String * Multipart::partID() +{ + return mPartID; } Object * Multipart::copy() -- cgit v1.2.3