emailservices/emailstore/base_plugin/src/basepluginparts.cpp
changeset 75 47d84de1c893
parent 72 64e38f08e49c
equal deleted inserted replaced
72:64e38f08e49c 75:47d84de1c893
   251     return result;
   251     return result;
   252     }
   252     }
   253 
   253 
   254 
   254 
   255 /**
   255 /**
   256  * The method will leave with KErrNotSupported if the msgstore is encrypted.
   256  * The method will leave with KErrNotSupported if the msgstore is encrypted or if trying to open the file for writing.
   257  */
   257  */
   258 EXPORT_C TInt CBasePlugin::GetMessagePartFileL(
   258 EXPORT_C TInt CBasePlugin::GetMessagePartFileL(
   259     const TFSMailMsgId& aMailBoxId,
   259     const TFSMailMsgId& aMailBoxId,
   260     const TFSMailMsgId& /*aParentFolderId*/,
   260     const TFSMailMsgId& /*aParentFolderId*/,
   261     const TFSMailMsgId& aMessageId,
   261     const TFSMailMsgId& aMessageId,
   262     const TFSMailMsgId& aMessagePartId,
   262     const TFSMailMsgId& aMessagePartId,
   263     RFile& aFileHandle )
   263     RFile& aFileHandle,
   264 
   264     TBool aForWriting)
   265     {
   265 
       
   266     {
       
   267     if (aForWriting)
       
   268         {
       
   269         return KErrNotSupported;
       
   270         }
   266     CMailboxInfo& mailBox = GetMailboxInfoL( aMailBoxId.Id() );
   271     CMailboxInfo& mailBox = GetMailboxInfoL( aMailBoxId.Id() );
   267     
   272     
   268     CMsgStoreMessage* msg = mailBox().FetchMessageL( aMessageId.Id(), KMsgStoreInvalidId );
   273     CMsgStoreMessage* msg = mailBox().FetchMessageL( aMessageId.Id(), KMsgStoreInvalidId );
   269     CleanupStack::PushL( msg );
   274     CleanupStack::PushL( msg );
   270     
   275