VMime
|
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.
enum FindOptions |
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, attachmentHelper::findBodyPart(), vmime::mediaTypes::MULTIPART, and vmime::mediaTypes::MULTIPART_MIXED.
Referenced by attachmentHelper::addAttachment().
Add a message attachment to the specified message.
msg | message into which to add the attachment |
amsg | message to attach |
References attachmentHelper::addAttachment().
|
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) |
|
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) |
|
staticprotected |
Referenced by attachmentHelper::addAttachment().
|
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, mediaType::getSubType(), mediaType::getType(), vmime::mediaTypes::MESSAGE, and vmime::mediaTypes::MESSAGE_RFC822.
|
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, contentDisposition::getName(), mediaType::getType(), vmime::contentDispositionTypes::INLINE, vmime::mediaTypes::MULTIPART, and vmime::mediaTypes::TEXT.