diff options
Diffstat (limited to 'src/core/imap/MCIMAPMessagePart.cc')
-rw-r--r-- | src/core/imap/MCIMAPMessagePart.cc | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/src/core/imap/MCIMAPMessagePart.cc b/src/core/imap/MCIMAPMessagePart.cc index 31a6f7e5..bd97657c 100644 --- a/src/core/imap/MCIMAPMessagePart.cc +++ b/src/core/imap/MCIMAPMessagePart.cc @@ -4,24 +4,36 @@ using namespace mailcore; IMAPMessagePart::IMAPMessagePart() { + init(); } IMAPMessagePart::IMAPMessagePart(IMAPMessagePart * other) : AbstractMessagePart(other) { + init(); + MC_SAFE_REPLACE_COPY(String, mPartID, other->mPartID); } IMAPMessagePart::~IMAPMessagePart() { + MC_SAFE_RELEASE(mPartID); } -#if 0 -String * IMAPMessagePart::className() +Object * IMAPMessagePart::copy() { - return MCSTR("IMAPMessagePart"); + return new IMAPMessagePart(this); } -#endif -Object * IMAPMessagePart::copy() +void IMAPMessagePart::init() { - return new IMAPMessagePart(this); + mPartID = NULL; +} + +void IMAPMessagePart::setPartID(String * partID) +{ + MC_SAFE_REPLACE_COPY(String, mPartID, partID); +} + +String * IMAPMessagePart::partID() +{ + return mPartID; } |