diff -r 6b5524b4f673 -r 38bb213f60ba phonebookui/Phonebook2/CommandsExtension/src/CPbk2SendContactCmd.cpp --- a/phonebookui/Phonebook2/CommandsExtension/src/CPbk2SendContactCmd.cpp Wed Sep 15 11:56:55 2010 +0300 +++ b/phonebookui/Phonebook2/CommandsExtension/src/CPbk2SendContactCmd.cpp Wed Oct 13 14:15:33 2010 +0300 @@ -22,8 +22,8 @@ #include "Pbk2SendCmdUtils.h" #include "CPbk2vCardConverter.h" #include -#include -#include +#include +#include #include #include #include @@ -42,7 +42,7 @@ #include #include #include -#include +#include // System includes #include @@ -369,7 +369,6 @@ iUiControl->RegisterCommand( NULL ); } - delete iWaiter; delete iSelectedContacts; delete iConverter; delete iVCardSender; @@ -547,25 +546,6 @@ ProcessDone( KErrCancel ); break; } - case EReleaseResource: - { - CPbk2AttachmentFileArray& fileArray = iConverter->AttachmentFileArray(); - TInt count = fileArray.Count(); - TInt deleteIndex = count -1; - CPbk2AttachmentFile * file = fileArray.At(deleteIndex); - fileArray.Delete(deleteIndex); - delete file; - - if ( count > 1) - { - IssueRequest(); - } - else - { - iWaiter->AsyncStop(); - } - break; - } } } @@ -575,9 +555,6 @@ // TInt CPbk2SendContactCmd::RunError(TInt aError) { - if( iWaiter && iWaiter->IsStarted() ) - iWaiter->AsyncStop(); - return FilterErrors(aError); } @@ -587,9 +564,6 @@ // void CPbk2SendContactCmd::DoCancel() { - if( iWaiter && iWaiter->IsStarted() ) - iWaiter->AsyncStop(); - delete iRetrieveOperation; iRetrieveOperation = NULL; } @@ -1285,51 +1259,4 @@ return result; } -// -------------------------------------------------------------------------- -// CPbk2SendContactCmd::CommandExtension -// -------------------------------------------------------------------------- -// -TAny* CPbk2SendContactCmd::CommandExtension(TUid aExtensionUid ) - { - if( aExtensionUid == TUid::Uid(MPbk2ResourceReleaseUID) ) - { - return static_cast(this); - } - else - { - return NULL; - } - } - -// -------------------------------------------------------------------------- -// CPbk2SendContactCmd::ReleaseResource -// -------------------------------------------------------------------------- -// -void CPbk2SendContactCmd::ReleaseResource() - { - Cancel(); - if (iConverter) - { - iConverter->Cancel(); - CPbk2AttachmentFileArray& fileArray = iConverter->AttachmentFileArray(); - if (fileArray.Count() > 0) - { - if ( !iWaiter ) - { - TInt err( KErrNone ); - TRAP( err,iWaiter = new (ELeave) CActiveSchedulerWait()); - if ( err != KErrNone ) - { - fileArray.ResetAndDestroy(); - return; - } - } - - iState = EReleaseResource; - IssueRequest(); - iWaiter->Start(); - } - } - } - // End of File