Retrieve attachment information from message parts. More...
Static Public Member Functions | |
| static bool | isBodyPartAnAttachment (ref< const bodyPart > part) |
| static ref< const attachment > | getBodyPartAttachment (ref< const bodyPart > part) |
| static const std::vector< ref < const attachment > > | findAttachmentsInMessage (ref< const message > msg) |
| static void | addAttachment (ref< message > msg, ref< attachment > att) |
| static void | addAttachment (ref< message > msg, ref< message > amsg) |
Static Protected Member Functions | |
| static const std::vector< ref < const attachment > > | findAttachmentsInBodyPart (ref< const bodyPart > part) |
| static ref< bodyPart > | findBodyPart (ref< bodyPart > part, const mediaType &type) |
Retrieve attachment information from message parts.
Add a message attachment to the specified message.
| msg | message into which to add the attachment | |
| amsg | message to attach |
References attachmentHelper::addAttachment().
| void addAttachment | ( | ref< message > | msg, | |
| ref< attachment > | att | |||
| ) | [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().
| const std::vector< ref< const attachment > > findAttachmentsInBodyPart | ( | ref< const bodyPart > | part | ) | [static, protected] |
References attachmentHelper::getBodyPartAttachment(), and attachmentHelper::isBodyPartAnAttachment().
Referenced by attachmentHelper::findAttachmentsInMessage().
| const std::vector< ref< const attachment > > findAttachmentsInMessage | ( | ref< const message > | msg | ) | [static] |
Find all attachments contained in the specified message.
This is simply a recursive call to getBodyPartAttachment().
| msg | message in which to search |
References attachmentHelper::findAttachmentsInBodyPart().
Referenced by attachmentHelper::addAttachment().
| ref< const attachment > getBodyPartAttachment | ( | ref< const bodyPart > | part | ) | [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 |
References vmime::mediaTypes::APPLICATION, vmime::mediaTypes::APPLICATION_OCTET_STREAM, vmime::fields::CONTENT_TYPE, mediaType::getSubType(), mediaType::getType(), headerField::getValue(), attachmentHelper::isBodyPartAnAttachment(), vmime::mediaTypes::MESSAGE, and vmime::mediaTypes::MESSAGE_RFC822.
Referenced by attachmentHelper::findAttachmentsInBodyPart().
| bool isBodyPartAnAttachment | ( | ref< const bodyPart > | part | ) | [static] |
Test whether a body part is an attachment.
| part | message part to test |
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(), headerField::getValue(), vmime::contentDispositionTypes::INLINE, vmime::mediaTypes::MULTIPART, and vmime::mediaTypes::TEXT.
Referenced by attachmentHelper::findAttachmentsInBodyPart(), and attachmentHelper::getBodyPartAttachment().
1.6.2