diff options
author | Vincent Richard <[email protected]> | 2005-10-13 18:58:33 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2005-10-13 18:58:33 +0000 |
commit | b9471c9543312a7a51ce4bccb23dd02a72b07e61 (patch) | |
tree | 5f58f4d9357dea6d70306d122069b53b97df4a24 | |
parent | Don't return references. (diff) | |
download | vmime-b9471c9543312a7a51ce4bccb23dd02a72b07e61.tar.gz vmime-b9471c9543312a7a51ce4bccb23dd02a72b07e61.zip |
Added getPart() and getHeader() on attachment.
-rw-r--r-- | src/defaultAttachment.cpp | 12 | ||||
-rw-r--r-- | vmime/attachment.hpp | 15 | ||||
-rw-r--r-- | vmime/defaultAttachment.hpp | 4 |
3 files changed, 31 insertions, 0 deletions
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 <const object> defaultAttachment::getPart() const +{ + return NULL; +} + + +ref <const header> 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 <const object> 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 <const header> 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 <const contentHandler> getData() const; const encoding getEncoding() const; + ref <const object> getPart() const; + + ref <const header> getHeader() const; + protected: mediaType m_type; /**< Media type (eg. "application/octet-stream") */ |