|
VMime
|
#include <attachmentHelper.hpp>
Public Types | |
| enum | FindOptions { INLINE_OBJECTS = (1 << 0) } |
Static Public Member Functions | |
| static bool | isBodyPartAnAttachment (shared_ptr< const bodyPart > part, const unsigned int options=0) |
| static shared_ptr< const attachment > | getBodyPartAttachment (shared_ptr< const bodyPart > part, const unsigned int options=0) |
| static const std::vector< shared_ptr< const attachment > > | findAttachmentsInBodyPart (shared_ptr< const bodyPart > part, const unsigned int options=0) |
| static const std::vector< shared_ptr< const attachment > > | findAttachmentsInMessage (shared_ptr< const message > msg, const unsigned int options=0) |
| static void | addAttachment (shared_ptr< message > msg, shared_ptr< attachment > att) |
| static void | addAttachment (shared_ptr< message > msg, shared_ptr< message > amsg) |
Static Protected Member Functions | |
| static shared_ptr< bodyPart > | findBodyPart (shared_ptr< bodyPart > part, const mediaType &type) |
Retrieve attachment information from message parts.
Options for use with the following functions: findAttachmentsInMessage, getBodyPartAttachment, and isBodyPartAnAttachment.
| Enumerator | |
|---|---|
| INLINE_OBJECTS | Recognize and return inline objects. The aim is to consider MHTML objects (parts with a "Content-Id" or a "Content-Location", such as inline images) as attachments. |
|
static |
Add an attachment to the specified message.
| msg | message into which to add the attachment |
| att | attachment to add |
References vmime::fields::CONTENT_DISPOSITION, vmime::fields::CONTENT_TRANSFER_ENCODING, vmime::fields::CONTENT_TYPE, vmime::dynamicCast(), attachmentHelper::findBodyPart(), vmime::mediaTypes::MULTIPART, and vmime::mediaTypes::MULTIPART_MIXED.
Referenced by attachmentHelper::addAttachment().
|
static |
Add a message attachment to the specified message.
| msg | message into which to add the attachment |
| amsg | message to attach |
References attachmentHelper::addAttachment(), and vmime::dynamicCast().
|
static |
Find all attachments contained in the specified part and all its children parts.
This is simply a recursive call to getBodyPartAttachment().
| part | part in which to search |
| options | search options (see FindOptions) |
References vmime::dynamicCast(), attachmentHelper::findAttachmentsInBodyPart(), attachmentHelper::getBodyPartAttachment(), and attachmentHelper::isBodyPartAnAttachment().
Referenced by attachmentHelper::findAttachmentsInBodyPart(), and attachmentHelper::findAttachmentsInMessage().
|
static |
Find all attachments contained in the specified message.
This is simply a recursive call to getBodyPartAttachment().
| msg | message in which to search |
| options | search options (see FindOptions) |
References vmime::dynamicCast(), and attachmentHelper::findAttachmentsInBodyPart().
|
staticprotected |
References vmime::dynamicCast(), and attachmentHelper::findBodyPart().
Referenced by attachmentHelper::addAttachment(), and attachmentHelper::findBodyPart().
|
static |
Return attachment information in the specified body part.
If the specified body part does not contain attachment information (ie. is not an attachment), NULL is returned.
| part | message part in which to search |
| options | search options (see FindOptions) |
References vmime::mediaTypes::APPLICATION, vmime::mediaTypes::APPLICATION_OCTET_STREAM, vmime::fields::CONTENT_TYPE, vmime::dynamicCast(), mediaType::getSubType(), mediaType::getType(), attachmentHelper::isBodyPartAnAttachment(), vmime::mediaTypes::MESSAGE, and vmime::mediaTypes::MESSAGE_RFC822.
Referenced by attachmentHelper::findAttachmentsInBodyPart().
|
static |
Test whether a body part is an attachment.
| part | message part to test |
| options | search options (see FindOptions) |
References vmime::mediaTypes::APPLICATION, vmime::mediaTypes::APPLICATION_OCTET_STREAM, vmime::fields::CONTENT_DISPOSITION, vmime::fields::CONTENT_ID, vmime::fields::CONTENT_LOCATION, vmime::fields::CONTENT_TYPE, vmime::dynamicCast(), mediaType::getType(), vmime::contentDispositionTypes::INLINE, attachmentHelper::INLINE_OBJECTS, vmime::mediaTypes::MULTIPART, and vmime::mediaTypes::TEXT.
Referenced by attachmentHelper::findAttachmentsInBodyPart(), and attachmentHelper::getBodyPartAttachment().