Added getPart() and getHeader() on attachment.

This commit is contained in:
Vincent Richard 2005-10-13 18:58:33 +00:00
parent 3f7ce9bcd1
commit b9471c9543
3 changed files with 31 additions and 0 deletions

View File

@ -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

View File

@ -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.

View File

@ -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") */