diff -r 578830873419 -r ecc8def7944a ipsservices/ipssosplugin/src/ipsplgsmtpservice.cpp --- a/ipsservices/ipssosplugin/src/ipsplgsmtpservice.cpp Fri Apr 16 14:51:52 2010 +0300 +++ b/ipsservices/ipssosplugin/src/ipsplgsmtpservice.cpp Mon May 03 12:23:15 2010 +0300 @@ -48,9 +48,6 @@ { FUNC_LOG; delete iMsgMapper; -// - iOperations.ResetAndDestroy(); -// } // --------------------------------------------------------------------------- @@ -94,46 +91,6 @@ iMsgMapper = CIpsPlgMsgMapper::NewL( iSession, iPlugin ); } -// -// ---------------------------------------------------------------------------- -// CIpsPlgSmtpService::OpCompleted -// ---------------------------------------------------------------------------- -void CIpsPlgSmtpService::OpCompleted( - CIpsPlgSingleOpWatcher& aOpWatcher, - TInt /*aCompletionCode*/ ) - { - FUNC_LOG; - // Get valid operation count in each, some operations could have been - // deleted in array - TInt opId = aOpWatcher.Operation().Id(); - - TInt count = iOperations.Count(); - - for ( TInt i = count - 1; i >= 0; i-- ) - { - CMsvOperation& oper = iOperations[i]->Operation(); - - if ( oper.Id() == opId ) - { - DeleteAndRemoveOperation( i ); - } - } - } - -// --------------------------------------------------------------------------- -// CIpsPlgSmtpService::DeleteAndRemoveOperation -// --------------------------------------------------------------------------- -void CIpsPlgSmtpService::DeleteAndRemoveOperation( const TInt aOpArrayIndex ) - { - FUNC_LOG; - CIpsPlgSingleOpWatcher* opWatcher = iOperations[aOpArrayIndex]; - - iOperations.Remove( aOpArrayIndex ); - delete opWatcher; - opWatcher = NULL; - } -// - // --------------------------------------------------------------------------- // CIpsPlgSmtpService::CreateDisplayStringLC // --------------------------------------------------------------------------- @@ -299,40 +256,6 @@ msgId, KErrNotFound, aMailBoxId.Id() ); } -// -// --------------------------------------------------------------------------- -// CIpsPlgSmtpService::CreateNewSmtpMessageL -// --------------------------------------------------------------------------- -// -void CIpsPlgSmtpService::CreateNewSmtpMessageL( - const TFSMailMsgId& aMailBoxId, - MFSMailRequestObserver& aOperationObserver, - const TInt aRequestId ) - { - TMsvPartList partList( KMsvMessagePartBody ); - - CIpsPlgSingleOpWatcher* watcher = CIpsPlgSingleOpWatcher::NewLC(*this); - - TMsvEntry mboxEntry; - TMsvId service; - User::LeaveIfError( - iSession.GetEntry( aMailBoxId.Id(), service, mboxEntry ) ); - - CIpsPlgCreateMessageOperation* op = CIpsPlgCreateMessageOperation::NewL( this, - iSession, - watcher->iStatus, - mboxEntry.iRelatedId, - partList, - aMailBoxId.Id(), - aOperationObserver, - aRequestId ); - watcher->SetOperation( op ); - - iOperations.AppendL( watcher ); - CleanupStack::Pop( watcher ); - } -// - // --------------------------------------------------------------------------- // CIpsPlgSmtpService::CreateForwardSmtpMessageL // --------------------------------------------------------------------------- @@ -382,56 +305,6 @@ return CreateFSMessageAndSetFlagsL( msgId, orgMsg.Id(), aMailBoxId.Id() ); } -// -// --------------------------------------------------------------------------- -// CIpsPlgSmtpService::CreateNewSmtpMessageL -// --------------------------------------------------------------------------- -// -void CIpsPlgSmtpService::CreateForwardSmtpMessageL( - const TFSMailMsgId& aMailBoxId, - const TFSMailMsgId& aOriginalMessageId, - MFSMailRequestObserver& aOperationObserver, - const TInt aRequestId ) - { - FUNC_LOG; - // 1. part of function checs that body text and all - // attachments are fetched - TMsvEntry orgMsg; - TMsvId service; - User::LeaveIfError( iSession.GetEntry( - aOriginalMessageId.Id(), service, orgMsg ) ); - - if ( orgMsg.Id() == KMsvNullIndexEntryIdValue ) - { - User::Leave(KErrNotFound); - } - - if ( ( orgMsg.Parent() == KMsvSentEntryIdValue ) && - ( orgMsg.iMtm == KSenduiMtmSmtpUid ) ) - { - ChangeServiceIdL( orgMsg ); - } - - TMsvPartList partList( KMsvMessagePartBody | KMsvMessagePartAttachments ); - - CIpsPlgSingleOpWatcher* watcher = CIpsPlgSingleOpWatcher::NewLC(*this); - - CIpsPlgCreateForwardMessageOperation* op = CIpsPlgCreateForwardMessageOperation::NewL( - this, - iSession, - watcher->iStatus, - partList, - aMailBoxId.Id(), - orgMsg.Id(), - aOperationObserver, - aRequestId ); - watcher->SetOperation( op ); - - iOperations.AppendL( watcher ); - CleanupStack::Pop( watcher ); - } -// - // --------------------------------------------------------------------------- // CIpsPlgSmtpService::CreateReplySmtpMessageL // --------------------------------------------------------------------------- @@ -538,62 +411,6 @@ return fsMsg; } -// -// --------------------------------------------------------------------------- -// CIpsPlgSmtpService::CreateReplySmtpMessageL -// --------------------------------------------------------------------------- -// -void CIpsPlgSmtpService::CreateReplySmtpMessageL( - const TFSMailMsgId& aMailBoxId, - const TFSMailMsgId& aOriginalMessageId, - TBool aReplyToAll, - MFSMailRequestObserver& aOperationObserver, - const TInt aRequestId ) - { - FUNC_LOG; - // find orginal message header and check that body is fetched - TMsvEntry orgMsg; - TMsvId service; - User::LeaveIfError( - iSession.GetEntry( aOriginalMessageId.Id(), service, orgMsg ) ); - - if ( orgMsg.Id() == KMsvNullIndexEntryIdValue ) - { - User::Leave(KErrNotFound); - } - - if ( ( orgMsg.Parent() == KMsvSentEntryIdValue ) && - ( orgMsg.iMtm == KSenduiMtmSmtpUid ) ) - { - ChangeServiceIdL( orgMsg ); - } - - // partList flags control e.g. what kind of recipient set is created - TMsvPartList partList = KMsvMessagePartBody | KMsvMessagePartDescription - | KMsvMessagePartOriginator; - if( aReplyToAll ) - { - partList |= KMsvMessagePartRecipient; - } - - CIpsPlgSingleOpWatcher* watcher = CIpsPlgSingleOpWatcher::NewLC(*this); - - CIpsPlgCreateReplyMessageOperation* op = CIpsPlgCreateReplyMessageOperation::NewL( - this, - iSession, - watcher->iStatus, - partList, - aMailBoxId.Id(), - orgMsg.Id(), - aOperationObserver, - aRequestId ); - watcher->SetOperation( op ); - - iOperations.AppendL( watcher ); - CleanupStack::Pop( watcher ); - } -// - // --------------------------------------------------------------------------- // CIpsPlgSmtpService::ChangeServiceIdL // ---------------------------------------------------------------------------