emailservices/emailcommon/src/CFSMailMessagePart.cpp
changeset 75 47d84de1c893
parent 72 64e38f08e49c
equal deleted inserted replaced
72:64e38f08e49c 75:47d84de1c893
   491 	
   491 	
   492 
   492 
   493 // -----------------------------------------------------------------------------
   493 // -----------------------------------------------------------------------------
   494 // CFSMailMessagePart::GetContentFileL
   494 // CFSMailMessagePart::GetContentFileL
   495 // -----------------------------------------------------------------------------
   495 // -----------------------------------------------------------------------------
   496 EXPORT_C RFile CFSMailMessagePart::GetContentFileL()
   496 EXPORT_C RFile CFSMailMessagePart::GetContentFileL( TBool aForWriting )
   497 	{
   497 	{
   498     NM_FUNCTION;
   498     NM_FUNCTION;
   499 	
   499 	
   500 	if(CFSMailPlugin* plugin = iRequestHandler->GetPluginByUid(GetPartId()))
   500 	if(CFSMailPlugin* plugin = iRequestHandler->GetPluginByUid(GetPartId()))
   501 		{
   501 		{
   502 		TInt rcode = plugin->GetMessagePartFileL( GetMailBoxId(), GetFolderId(),
   502 		TInt rcode = plugin->GetMessagePartFileL( GetMailBoxId(), GetFolderId(),
   503 					                            GetMessageId(), GetPartId(),
   503 					                            GetMessageId(), GetPartId(),
   504 					                            iFile );
   504 					                            iFile, aForWriting);
   505 		// if content is encrypted, use temp dir files
   505 		// if content is encrypted, use temp dir files
   506 		if(rcode == KErrNotSupported)
   506 		if(rcode == KErrNotSupported)
   507 		    {
   507 		    {
   508 		    // temp directory C:\Private\<uid>
   508 		    // temp directory C:\Private\<uid>
   509 		    TFileName fileName;
   509 		    TFileName fileName;
   958 	    buffer = HBufC::NewL(length);
   958 	    buffer = HBufC::NewL(length);
   959 	    if (ContentDisposition().FindF(KFSMailContentDispInline) != KErrNotFound)
   959 	    if (ContentDisposition().FindF(KFSMailContentDispInline) != KErrNotFound)
   960 	        {
   960 	        {
   961             buffer->Des().Append(KFSMailContentDispInline);
   961             buffer->Des().Append(KFSMailContentDispInline);
   962 	        }
   962 	        }
   963 	    else
   963 	    else if (ContentDisposition().FindF(KFSMailContentDispAttachment) != KErrNotFound)
   964 	        {
   964 	        {
   965             buffer->Des().Append(KFSMailContentDispAttachment);
   965             buffer->Des().Append(KFSMailContentDispAttachment);
   966 	        }
   966 	        }
   967 	    
   967 	    
   968 	    buffer->Des().Append(_L("; "));
   968 	    buffer->Des().Append(_L("; "));