32 #include "attachmentcollector.h"
36 static bool isInSkipList( partNode * ) {
40 static bool isInExclusionList( const partNode * node ) {
44 switch ( node->type() ) {
45 case DwMime::kTypeApplication:
46 switch ( node->subType() ) {
47 case DwMime::kSubtypePkcs7Mime:
48 case DwMime::kSubtypePkcs7Signature:
49 case DwMime::kSubtypePgpSignature:
50 case DwMime::kSubtypePgpEncrypted:
54 case DwMime::kTypeMultipart:
61 void KMail::AttachmentCollector::collectAttachmentsFrom( partNode * node ) {
63 if ( node->isFirstTextPart() ) {
67 if ( isInSkipList( node ) ) {
68 node = node->next( false );
71 if ( isInExclusionList( node ) ) {
76 if ( node->isHeuristicalAttachment() ) {
77 mAttachments.push_back( node );
78 node = node->next( false );
|