equal
deleted
inserted
replaced
439 TInt err = file.Open( fs, *filename, EFileRead ); |
439 TInt err = file.Open( fs, *filename, EFileRead ); |
440 file.Close(); |
440 file.Close(); |
441 if( KErrNone != err ) |
441 if( KErrNone != err ) |
442 { |
442 { |
443 // if any error in opening file then return EFalse |
443 // if any error in opening file then return EFalse |
|
444 CleanupStack::PopAndDestroy(filename); |
444 return EFalse; |
445 return EFalse; |
445 } |
446 } |
446 |
447 |
447 AddAttachmentL(*filename); |
448 AddAttachmentL(*filename); |
448 |
449 |
671 attachment->SetLabelL(fileNameParser.NameAndExt()); |
672 attachment->SetLabelL(fileNameParser.NameAndExt()); |
672 // sets mime type for the attachment |
673 // sets mime type for the attachment |
673 attachment->SetMimeTypeL(attachmentInfo->DataType().Des8()); |
674 attachment->SetMimeTypeL(attachmentInfo->DataType().Des8()); |
674 entry->AddAttachmentL(*attachment); |
675 entry->AddAttachmentL(*attachment); |
675 CleanupStack::Pop(attachment); |
676 CleanupStack::Pop(attachment); |
676 } |
677 } |
|
678 else |
|
679 { |
|
680 CleanupStack::PopAndDestroy(data); |
|
681 } |
677 } |
682 } |
678 CleanupStack::PopAndDestroy(&fileHandle); |
683 else |
|
684 { |
|
685 CleanupStack::PopAndDestroy(data); |
|
686 } |
|
687 CleanupStack::PopAndDestroy(&fileHandle); |
679 } |
688 } |
680 } |
689 } |
681 |
690 |
682 attachmentInfoList.Close(); |
691 attachmentInfoList.Close(); |
683 |
692 |
843 User::LeaveIfError(content->GetAttribute(EIsProtected, isDRMProtected)); |
852 User::LeaveIfError(content->GetAttribute(EIsProtected, isDRMProtected)); |
844 if (isDRMProtected) |
853 if (isDRMProtected) |
845 { |
854 { |
846 aProtection = ETrue; |
855 aProtection = ETrue; |
847 |
856 |
848 //DRM protected file: can't attach the DRM protected file |
857 //DRM protected file: can't attach the DRM protected file |
849 CAknInformationNote* note = new ( ELeave ) CAknInformationNote(ETrue); |
|
850 HBufC* cannotAttach = StringLoader::LoadLC( |
858 HBufC* cannotAttach = StringLoader::LoadLC( |
851 R_QTN_CALEN_INFO_CANNOT_OPEN, CCoeEnv::Static() ); |
859 R_QTN_CALEN_INFO_CANNOT_OPEN, CCoeEnv::Static() ); |
852 note->ExecuteLD( *cannotAttach ); |
860 CAknInformationNote* note = new ( ELeave ) CAknInformationNote(ETrue); |
|
861 note->ExecuteLD( *cannotAttach ); |
853 CleanupStack::PopAndDestroy( cannotAttach ); |
862 CleanupStack::PopAndDestroy( cannotAttach ); |
854 } |
863 } |
855 else |
864 else |
856 { |
865 { |
857 aProtection = EFalse; |
866 aProtection = EFalse; |