From b9471c9543312a7a51ce4bccb23dd02a72b07e61 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Thu, 13 Oct 2005 18:58:33 +0000 Subject: [PATCH] Added getPart() and getHeader() on attachment. --- src/defaultAttachment.cpp | 12 ++++++++++++ vmime/attachment.hpp | 15 +++++++++++++++ vmime/defaultAttachment.hpp | 4 ++++ 3 files changed, 31 insertions(+) diff --git a/src/defaultAttachment.cpp b/src/defaultAttachment.cpp index 9b1e86e1..909dca10 100644 --- a/src/defaultAttachment.cpp +++ b/src/defaultAttachment.cpp @@ -127,4 +127,16 @@ const encoding defaultAttachment::getEncoding() const } +ref defaultAttachment::getPart() const +{ + return NULL; +} + + +ref defaultAttachment::getHeader() const +{ + return NULL; +} + + } // vmime diff --git a/vmime/attachment.hpp b/vmime/attachment.hpp index 5787c05e..222b5fa7 100644 --- a/vmime/attachment.hpp +++ b/vmime/attachment.hpp @@ -86,6 +86,21 @@ public: */ virtual const encoding getEncoding() const = 0; + /** Return the part in which the attachment has been found. + * This can be a vmime::bodyPart or a vmime::net::part object. + * + * @return attachment part or NULL if the attachment is not + * attached to a part + */ + virtual ref getPart() const = 0; + + /** Return the header of the attachment part. + * + * @return attachment part header or NULL if the attachment + * is not attached to a part + */ + virtual ref getHeader() const = 0; + protected: /** Generate the attachment in the specified body part. diff --git a/vmime/defaultAttachment.hpp b/vmime/defaultAttachment.hpp index e33c2269..b4e9ce54 100644 --- a/vmime/defaultAttachment.hpp +++ b/vmime/defaultAttachment.hpp @@ -59,6 +59,10 @@ public: const ref getData() const; const encoding getEncoding() const; + ref getPart() const; + + ref getHeader() const; + protected: mediaType m_type; /**< Media type (eg. "application/octet-stream") */