diff -r d39add9822e2 -r 5bfc169077b2 browserutilities/downloadmgr/DownloadMgrUiLib/Src/UserInteractionsEventHandler.cpp --- a/browserutilities/downloadmgr/DownloadMgrUiLib/Src/UserInteractionsEventHandler.cpp Tue Feb 02 00:56:45 2010 +0200 +++ b/browserutilities/downloadmgr/DownloadMgrUiLib/Src/UserInteractionsEventHandler.cpp Fri Mar 19 09:52:28 2010 +0200 @@ -15,14 +15,17 @@ * */ + + // INCLUDE FILES -#include +//#include +#include #include "UserInteractionsEventHandler.h" #include "CUserInteractionsUtils.h" #include "ProgressInfoCreator.h" -#include -#include -#include +#include "CDownloadMgrUiLibRegistry.h" +#include "CDownloadMgrUiDownloadsList.h" +#include "CDownloadMgrUiUserInteractions.h" #include "UiLibLogger.h" #include "DMgrUiLibPanic.h" #include @@ -38,6 +41,10 @@ #include #include + +// following line is temporary: AVKON dependency removal +#undef BRDO_APP_GALLERY_SUPPORTED_FF + #ifdef BRDO_APP_GALLERY_SUPPORTED_FF #include #include @@ -69,8 +76,8 @@ // ----------------------------------------------------------------------------- // CUserInteractionsEventHandler::CUserInteractionsEventHandler - ( RHttpDownload& aDownload, THttpDownloadEvent aEvent, - MDownloadMgrUiLibRegModel& aRegistryModel, + ( RHttpDownload& aDownload, THttpDownloadEvent aEvent, + MDownloadMgrUiLibRegModel& aRegistryModel, CAsyncEventHandlerArray& aOwner, CUserInteractionsUtils& aUiUtils ) : CAsyncEventHandlerBase( aDownload, aEvent, aRegistryModel, aOwner ), @@ -121,7 +128,7 @@ RFs fs; User::LeaveIfError( fs.Connect() ); CleanupClosePushL( fs ); - + TInt bytesToWrite = aSize; if (bytesToWrite < 0) bytesToWrite = 0; @@ -163,13 +170,13 @@ bytesToWrite, selectedDrive ) ); - // If there is error, then isSpaceBelowCL is untouched and - // contains the right value. Otherwise it also contains + // If there is error, then isSpaceBelowCL is untouched and + // contains the right value. Otherwise it also contains // the right value. CLOG_WRITE_FORMAT(" DiskSpace: isSpaceBelowCL: %d",isSpaceBelowCL); #else - isSpaceBelowCL = SysUtil::DiskSpaceBelowCriticalLevelL( &fs, + isSpaceBelowCL = SysUtil::DiskSpaceBelowCriticalLevelL( &fs, bytesToWrite, EDriveC ); CLOG_WRITE_FORMAT(" C: isSpaceBelowCL: %d",isSpaceBelowCL); @@ -177,10 +184,10 @@ if ( isSpaceBelowCL ) { // Check MMC - TRAP_IGNORE( isSpaceBelowCL = + TRAP_IGNORE( isSpaceBelowCL = SysUtil::MMCSpaceBelowCriticalLevelL( &fs, bytesToWrite ) ); - // If there is error, then isSpaceBelowCL is untouched and - // contains the right value. Otherwise it also contains + // If there is error, then isSpaceBelowCL is untouched and + // contains the right value. Otherwise it also contains // the right value. CLOG_WRITE_FORMAT(" MMC: isSpaceBelowCL: %d",isSpaceBelowCL); } @@ -222,7 +229,7 @@ User::LeaveIfError( aDownload.GetIntAttribute ( EDlAttrMultipleMOLength, totalLength ) ); CLOG_WRITE_FORMAT(" EDlAttrMultipleMOLength: %d",totalLength); - + User::LeaveIfError( aDownload.GetIntAttribute ( EDlAttrMultipleMODownloadedSize, downloadedSize ) ); CLOG_WRITE_FORMAT(" EDlAttrMultipleMODownloadedSizes: %d",downloadedSize); @@ -230,7 +237,7 @@ HBufC8* contentType = iUiUtils.ContentTypeL( aDownload, ETrue ); CleanupStack::PushL( contentType ); - // Don't show the confirmation query if the downloading + // Don't show the confirmation query if the downloading // already finished if ( downloadedSize == totalLength ) { @@ -240,16 +247,16 @@ { ret = ETrue; } - // GGUO-775RXR for widgets we don't need to have download confirmation either - else if ( contentType->Compare( KWidgetMimeType) == 0 ) + // GGUO-775RXR for widgets we don't need to have download confirmation either + else if ( contentType->Compare( KWidgetMimeType) == 0 ) { - ret = ETrue; - } + ret = ETrue; + } else { ret = ShowDownloadConfirmationL( aDownload, aCbaResource ); } - CleanupStack::PopAndDestroy( contentType ); + CleanupStack::PopAndDestroy( contentType ); } CLOG_LEAVEFN("CUserInteractionsEventHandler::ShowDownloadConfirmationL aForce"); @@ -260,7 +267,7 @@ // ----------------------------------------------------------------------------- // // Cod we used the following order -// name/size/type/price(optional)/description(no)/vendor(no) +// name/size/type/price(optional)/description(no)/vendor(no) TBool CUserInteractionsEventHandler::ShowDownloadConfirmationL ( RHttpDownload& aDownload, TInt aCbaResource ) @@ -286,7 +293,7 @@ MDesCArray* itemList = listBox->Model()->ItemTextArray(); CDesCArray* itemArray = (CDesCArray*)itemList; - + //------------------------------------------- // Header // @@ -315,8 +322,8 @@ #endif { // Not enough free disk space! - HBufC* notEnoughSpace = - StringLoader::LoadLC( R_DMUL_DOWNLOADCONF_NOT_ENOUGH_MEM ); + HBufC* notEnoughSpace = + StringLoader::LoadLC( R_DMUL_DOWNLOADCONF_NOT_ENOUGH_MEM ); itemArray->AppendL( *notEnoughSpace ); CleanupStack::PopAndDestroy( notEnoughSpace ); // notEnoughSpace // and disable OK button @@ -328,17 +335,17 @@ // //------------------------------------------- - // Add name here - // name/size/type/price(optional)/description(no)/vendor(no) + // Add name here + // name/size/type/price(optional)/description(no)/vendor(no) HBufC* nameHeader = StringLoader::LoadLC( R_DMUL_DOWNLOADCONF_NAME ); - HBufC* dlName = HBufC::NewLC( KMaxPath ); + HBufC* dlName = HBufC::NewLC( KMaxPath ); TPtr dlNamePtr = dlName->Des(); User::LeaveIfError( aDownload.GetStringAttribute( EDlAttrName, dlNamePtr ) ); itemText = FormatListBoxItemLC( *nameHeader, *dlName ); itemArray->AppendL( *itemText ); CleanupStack::PopAndDestroy( 3, nameHeader ); // itemText, sizeHeader - dlName = NULL; + dlName = NULL; itemText = NULL; nameHeader = NULL; @@ -368,7 +375,7 @@ //------------------------------------------- // Application Name - only show if Supported - // + // HBufC* handlerHeader = StringLoader::LoadLC( R_DMUL_DOWNLOADCONF_OPENWITH ); RApaLsSession apaLs; @@ -377,7 +384,7 @@ TUid appUid; HBufC8* contentType = iUiUtils.ContentTypeL( aDownload, ETrue ); CleanupStack::PushL( contentType ); - + #ifdef _DEBUG HBufC* contType = HBufC::NewL( contentType->Length() ); TPtr ptr = contType->Des(); @@ -386,13 +393,13 @@ delete contType; contType = NULL; #endif // _DEBUG - + User::LeaveIfError( apaLs.AppForDataType( TDataType(*contentType), appUid ) ); HBufC* handlerName = ConstructHandlerAppNameLC( appUid, apaLs ); itemText = FormatListBoxItemLC( *handlerHeader, *handlerName ); CleanupStack::PopAndDestroy( itemText ); - + CleanupStack::PopAndDestroy( handlerName ); CleanupStack::Pop( contentType ); // Still needed - push later again CleanupStack::PopAndDestroy( &apaLs ); @@ -401,8 +408,8 @@ handlerName = NULL; handlerHeader = NULL; CleanupStack::PushL( contentType ); - - + + //------------------------------------------- // MIME Content Type // @@ -416,7 +423,7 @@ typeString->Des().Copy( *contentType ); } else - { + { typeString = StringLoader::LoadLC( R_DMUL_DOWNLOADCONF_UNKNOWN ); } @@ -430,25 +437,25 @@ contentType = NULL; //------------------------------------------- - // Price: since dm has no info, we don't need this at all here + // Price: since dm has no info, we don't need this at all here // //------------------------------------------- - // Description: since dm has no info, we don't need this at all here + // Description: since dm has no info, we don't need this at all here // //------------------------------------------- - // Vendor: since dm has no info, we don't need this at all here + // Vendor: since dm has no info, we don't need this at all here // - // Show popup list - it calls CActiveScheduler::Start(), so be careful + // Show popup list - it calls CActiveScheduler::Start(), so be careful // when using data members after ExecuteLD! iDownloadConfirmationShown = ETrue; iPopupList = popupList; TBool deleted( EFalse ); iDownloadConfirmationDeletedPtr = &deleted; TInt pressedOk = popupList->ExecuteLD(); - CleanupStack::Pop( popupList ); // popupList + CleanupStack::Pop( popupList ); // popupList if ( !deleted ) { // We can use members only in this case! @@ -463,7 +470,7 @@ CLOG_LEAVEFN("CUserInteractionsEventHandler::ShowDownloadConfirmationL"); return (TBool)pressedOk; } - + // ----------------------------------------------------------------------------- // CUserInteractionsEventHandler::ConstructHandlerAppNameLC // ----------------------------------------------------------------------------- @@ -472,7 +479,7 @@ ( const TUid& aAppUid, RApaLsSession& aApaLs ) { CLOG_ENTERFN("CUserInteractionsEventHandler::ConstructHandlerAppNameLC"); - + HBufC* handlerName = NULL; if ( aAppUid == TUid::Null() ) { @@ -486,10 +493,10 @@ CLOG_WRITE_FORMAT(" appInfo.iFullName: %S",&appInfo.iFullName); CLOG_WRITE_FORMAT(" appInfo.iCaption: %S",&appInfo.iCaption); CLOG_WRITE_FORMAT(" appInfo.iShortCaption: %S",&appInfo.iShortCaption); - // In many cases there is long caption. We should use short caption only - // if it is empty. They say that sometimes the long caption is not empty, + // In many cases there is long caption. We should use short caption only + // if it is empty. They say that sometimes the long caption is not empty, // but it contains only a space (0x20). In this case we must use the short. - // For safety reasons, we will check the whole long caption, if it + // For safety reasons, we will check the whole long caption, if it // contains only space characters. const TDesC& longCap = appInfo.iCaption; TBool longCapIsEmpty = (longCap.Length() == 0); @@ -522,7 +529,7 @@ handlerName = appInfo.iCaption.AllocLC(); } } - + CLOG_LEAVEFN("CUserInteractionsEventHandler::ConstructHandlerAppNameLC"); return handlerName; } @@ -534,8 +541,8 @@ HBufC* CUserInteractionsEventHandler::FormatListBoxItemLC ( const TDesC& aFirst, const TDesC& aSecond ) { - HBufC* res = HBufC::NewLC( aFirst.Length() + - aSecond.Length() + + HBufC* res = HBufC::NewLC( aFirst.Length() + + aSecond.Length() + KListBoxSeparator().Length() ); res->Des().Copy( aFirst ); res->Des().Append( KListBoxSeparator ); @@ -554,7 +561,7 @@ // GET - download is in progress - user can cancel if( iEvent.iProgressState == EHttpProgCodDownloadStarted && iEvent.iDownloadState == EHttpDlInprogress ) { - iRegistryModel.DownloadsList().CancelDisplayingDownloadsList(); + iRegistryModel.DownloadsList().CancelDisplayingDownloadsList(); } if ( iEvent.iProgressState == EHttpContTypeRecognitionAvail ) { @@ -576,7 +583,7 @@ ( iDownload.GetStringAttribute( EDlAttrContentType, contentTypePtr ) ); if( 0 == contentType->Compare( KMultiPartMimeType ) ) { - // Don't show confirmation query yet, but + // Don't show confirmation query yet, but // observe EHttpProgSupportedMultiPart. } else @@ -584,9 +591,9 @@ iUiUtils.IsContentTypeSupportedL( iDownload ); TBool suppressDownloadConfirmation( EFalse ); iRegistryModel.UserInteractions().GetBoolAttributeL - ( CDownloadMgrUiUserInteractions::EAttrSuppressDownloadConfirmation, + ( CDownloadMgrUiUserInteractions::EAttrSuppressDownloadConfirmation, suppressDownloadConfirmation ); - CLOG_WRITE_FORMAT(" suppressDownloadConfirmation: %d", + CLOG_WRITE_FORMAT(" suppressDownloadConfirmation: %d", suppressDownloadConfirmation); if ( suppressDownloadConfirmation ) @@ -614,16 +621,15 @@ { userConfirms = ShowDownloadConfirmationL ( iDownload, R_AVKON_SOFTKEYS_OK_CANCEL__OK, EFalse ); - + // executes a wait dialog! Check if this is deleted meanwhile if ( aThisDeleted ) { CLOG_WRITE_FORMAT(" this deleted: %x", this); CLOG_LEAVEFN("CUserInteractionsEventHandler::HandleInProgressStateL"); - CleanupStack::PopAndDestroy( contentType ); return; } - + if ( userConfirms ) { TBool isLaunchType( EFalse ); @@ -646,16 +652,16 @@ else { //part of error PNIO-73GEM3.Sis file progress should be visible to user - if( (KSisxApplication().Find( contentTypePtr)!= KErrNotFound) || + if( (KSisxApplication().Find( contentTypePtr)!= KErrNotFound) || (KPipApplication().Find( contentTypePtr)!= KErrNotFound) || (KWidgetMimeType().Find( contentTypePtr)!= KErrNotFound) || (KSharingConfig().Find( contentTypePtr)!= KErrNotFound) ) { isLaunchType = ETrue; User::LeaveIfError( iDownload.SetIntAttribute( - EDlAttrAction, ELaunch ) ); + EDlAttrAction, ELaunch ) ); } - // Open the download list if there is no more + // Open the download list if there is no more // download confirmation shown: if ( iRegistryModel.UserInteractions(). DownloadConfirmationsShown() == 0 ) @@ -678,23 +684,23 @@ } if (userConfirms) { - + #ifdef __DMGR_PD_TESTHARNESS iUiUtils.TestLaunchPdAppL(iDownload); - #else - //#ifdef RD_BROWSER_PROGRESSIVE_DOWNLOAD + #else + //#ifdef RD_BROWSER_PROGRESSIVE_DOWNLOAD - // check if it's PdLaunch action + // check if it's PdLaunch action TInt32 action(0); - User::LeaveIfError( iDownload.GetIntAttribute( EDlAttrAction, action ) ); - if( (action & EPdLaunch) && + User::LeaveIfError( iDownload.GetIntAttribute( EDlAttrAction, action ) ); + if( (action & EPdLaunch) && iUiUtils.CanLaunchAsProgDownload( iDownload, iRegistryModel.DownloadsList(),EFalse )) { CLOG_WRITE( " launchPdAppL(iDownload)" ); iUiUtils.LaunchPdAppL(iDownload, ETrue); } //#endif //RD_BROWSER_PROGRESSIVE_DOWNLOAD - #endif //__DMGR_PD_TESTHARNESS + #endif //__DMGR_PD_TESTHARNESS } } CleanupStack::PopAndDestroy( contentType ); // contentType @@ -707,30 +713,30 @@ ( EDlAttrCodPdAvailable, isCodPdAvailable ) ); if ( isCodPdAvailable ) { - + #ifdef __DMGR_PD_TESTHARNESS iUiUtils.TestLaunchPdAppL(iDownload); #else - // check if it's PdLaunch action + // check if it's PdLaunch action TInt32 action(0); - User::LeaveIfError( iDownload.GetIntAttribute( EDlAttrAction, action ) ); - if ( (action & EPdLaunch) && + User::LeaveIfError( iDownload.GetIntAttribute( EDlAttrAction, action ) ); + if ( (action & EPdLaunch) && iUiUtils.CanLaunchAsProgDownload( iDownload, iRegistryModel.DownloadsList(),ETrue )) { iUiUtils.LaunchPdAppL(iDownload, ETrue); } #endif //__DMGR_PD_TESTHARNESS } - } + } else if ( iEvent.iProgressState == EHttpProgCodDescriptorAccepted ) { - // COD load accepted. Download is turned to visible, and + // COD load accepted. Download is turned to visible, and // downloads list is shown. User::LeaveIfError( iDownload.SetBoolAttribute ( EDlAttrHidden, EFalse ) ); CLOG_WRITE(" SetBoolAttribute EDlAttrHidden OK"); - // If this download's ServiceFlow was running, it's not more - // a ServiceFlow, thus the next postponed download can be + // If this download's ServiceFlow was running, it's not more + // a ServiceFlow, thus the next postponed download can be // scheduled. if ( iRegistryModel.UserInteractions().IsCodServiceFlowRunning( iDownload ) ) { @@ -747,7 +753,7 @@ { // UI state must be checked before we set download to hidden! TBool isUiBusyNow = iRegistryModel.UserInteractions().IsUiBusy(); - // COD load has ended. Download is turned to hidden, removed from + // COD load has ended. Download is turned to hidden, removed from // downloads list, and restarted (ServiceFlow). CLOG_WRITE(" SetBoolAttribute EDlAttrHidden OK"); @@ -755,7 +761,7 @@ // (UserInteractions must be installed...) if ( isUiBusyNow ) { - // Not possible to do it. Postpone the Service Flow and + // Not possible to do it. Postpone the Service Flow and // invoke when no more handler is running. // The download is already hidden! iRegistryModel.UserInteractions().PostponeCodHandlingL( iDownload ); @@ -783,9 +789,9 @@ { TBool suppressDownloadConfirmation( EFalse ); iRegistryModel.UserInteractions().GetBoolAttributeL - ( CDownloadMgrUiUserInteractions::EAttrSuppressDownloadConfirmation, + ( CDownloadMgrUiUserInteractions::EAttrSuppressDownloadConfirmation, suppressDownloadConfirmation ); - CLOG_WRITE_FORMAT(" suppressDownloadConfirmation: %d", + CLOG_WRITE_FORMAT(" suppressDownloadConfirmation: %d", suppressDownloadConfirmation); if ( suppressDownloadConfirmation ) @@ -796,7 +802,7 @@ { TBool userConfirms = ShowDownloadConfirmationL ( iDownload, R_AVKON_SOFTKEYS_OK_CANCEL__OK, EFalse ); - + // executes a wait dialog! Check if this is deleted meanwhile if ( aThisDeleted ) { @@ -804,10 +810,10 @@ CLOG_LEAVEFN("CUserInteractionsEventHandler::HandleInProgressStateL"); return; } - + if ( userConfirms ) { - // Open the download list if there is no more + // Open the download list if there is no more // download confirmation shown: if ( iRegistryModel.UserInteractions(). DownloadConfirmationsShown() == 0 ) @@ -832,7 +838,7 @@ CLOG_LEAVEFN("CUserInteractionsEventHandler::HandleInProgressStateL"); } - + // ----------------------------------------------------------------------------- // CUserInteractionsEventHandler::HandlePausedStateL // ----------------------------------------------------------------------------- @@ -856,9 +862,9 @@ { TBool suppressDownloadConfirmation( EFalse ); iRegistryModel.UserInteractions().GetBoolAttributeL - ( CDownloadMgrUiUserInteractions::EAttrSuppressDownloadConfirmation, + ( CDownloadMgrUiUserInteractions::EAttrSuppressDownloadConfirmation, suppressDownloadConfirmation ); - CLOG_WRITE_FORMAT(" suppressDownloadConfirmation: %d", + CLOG_WRITE_FORMAT(" suppressDownloadConfirmation: %d", suppressDownloadConfirmation); if ( suppressDownloadConfirmation ) @@ -880,13 +886,13 @@ CLOG_LEAVEFN("CUserInteractionsEventHandler::HandlePausedStateL"); return; } - + // Open Downloads List if user confirms: if ( userConfirms ) { // Resume the download: User::LeaveIfError( iDownload.Start() ); - // and open the download list if there is no more + // and open the download list if there is no more // download confirmation shown: if ( iRegistryModel.UserInteractions(). DownloadConfirmationsShown() == 0 ) @@ -927,7 +933,7 @@ else if ( iEvent.iProgressState == EHttpProgContentFileMoved || iEvent.iProgressState == EHttpProgContentFileMovedAndDestFNChanged ) { // An asynchronous move has ended. - + CLOG_WRITE(" Move has ended"); // After successful moving, display updated download list iRegistryModel.DownloadsList().DisplayDownloadsListL( iDownload ); @@ -935,11 +941,11 @@ // first get path to gallery where file was moved HBufC* fileName = HBufC::NewLC( KMaxPath ); TPtr fileNamePtr = fileName->Des(); - TInt attErr = iDownload.GetStringAttribute( + TInt attErr = iDownload.GetStringAttribute( EDlAttrDestFilename, fileNamePtr ); CLOG_WRITE_FORMAT(" EDlAttrDestFilename: %S",&fileNamePtr); TBool havePath = (attErr == KErrNone) && (fileNamePtr.Length() > 0); - + #ifdef BRDO_APP_GALLERY_SUPPORTED_FF // CMGXFileManager* mgFileManager = MGXFileManagerFactory::NewFileManagerL( @@ -953,19 +959,19 @@ { TRAP_IGNORE( mgFileManager->UpdateL() ); } - + delete mgFileManager; mgFileManager = NULL; - + #else if( havePath ) { TRAP_IGNORE( iUiUtils.UpdateDCFRepositoryL( fileNamePtr ) ); } - #endif - + #endif + CleanupStack::PopAndDestroy( fileName ); - + } else { @@ -992,32 +998,32 @@ CLOG_WRITE_FORMAT(" EDlAttrProgressive err: %d",err); // 'err' is ignored. CLOG_WRITE_FORMAT(" EDlAttrProgressive: %d", isProgressive); - + // check if move is already issued TBool isMoveIssued = EFalse; TInt32 progState(0); User::LeaveIfError( iDownload.GetIntAttribute ( EDlAttrProgressState, progState ) ); - - if(progState == EHttpProgMovingContentFile) isMoveIssued = ETrue; + + if(progState == EHttpProgMovingContentFile) isMoveIssued = ETrue; if( isCodDownload ) { HBufC8* contentType = HBufC8::NewLC( KMaxContentTypeLength ); TPtr8 contentTypePtr = contentType->Des(); User::LeaveIfError - ( iDownload.GetStringAttribute( EDlAttrContentType, contentTypePtr ) ); + ( iDownload.GetStringAttribute( EDlAttrContentType, contentTypePtr ) ); if( !contentType->Compare(KRoapMimeType)) { User::LeaveIfError ( iDownload.Delete()); } - CleanupStack::PopAndDestroy( contentType ); + CleanupStack::PopAndDestroy( contentType ); } else if( isProgressive || isMoveIssued ) { //do not move - + } else { @@ -1050,19 +1056,19 @@ fileNamePtr.Delete( 0, lastSlashPos ); } } - + // Setting RootPath for new Destination file fileNamePtr.Insert( 0, rootPath ); // Setting KDownloadPath fileNamePtr.Insert( rootPath.Length(), KDownloadPath ); #else - + TParse p; p.SetNoWild(fileNamePtr, NULL, NULL); TDriveUnit currentDrive(fileNamePtr); TFileName rootPath; User::LeaveIfError( PathInfo::GetRootPath( rootPath, currentDrive ) ); - + TPtrC namePtr = p.NameAndExt(); fileNamePtr.Format( _L("%S%S\\%S"), &rootPath, &KDownloadPath, @@ -1099,7 +1105,7 @@ } else if ( action & EPdLaunch ) { - // do nothing since PdLaunch was already launched during the progress + // do nothing since PdLaunch was already launched during the progress } else { @@ -1127,8 +1133,8 @@ CLOG_WRITE_FORMAT("EDlAttrCodDownload: %d",isCodDownload); if ( isCodDownload ) { - // If the ServiceFlow of the download was running, but failed, - // schedule the next download for running. + // If the ServiceFlow of the download was running, but failed, + // schedule the next download for running. // UserInteractions is assumed to be installed. // Do not delete the download yet (because IsCodServiceFlowRunning needs it)! if ( iRegistryModel.UserInteractions().IsCodServiceFlowRunning( iDownload ) ) @@ -1168,11 +1174,11 @@ else { TBool errorHandled( EFalse ); - + if ( !errorHandled ) { iUiUtils.ShowErrorNoteL( iDownload, errorId ); - // This component is responsible for deleting + // This component is responsible for deleting // not recoverable downloads if ( iUiUtils.IsRecoverableFailL( iDownload, errorId ) ) { @@ -1231,13 +1237,13 @@ CleanupStack::PopAndDestroy( url ); } - // iDownload can now been deleted + // iDownload can now been deleted User::LeaveIfError( iDownload.Delete() ); CLOG_WRITE(" Delete OK"); HBufC* infoPrompt = StringLoader::LoadLC( R_DMUL_ERROR_CANCELLED, *dlName ); CLOG_WRITE(" StringLoader OK"); - + CAknNoteDialog* dlg = new (ELeave) CAknNoteDialog(); dlg->PrepareLC( R_DMUL_DOWNLOAD_OK_INFO ); dlg->SetTextL( *infoPrompt ); @@ -1272,11 +1278,11 @@ TBool deleted( EFalse ); iDeletedPtr = &deleted; - // Incase of completed and moved downloads, subsession will be closed and whole download info will be cached client side. - // No need to check for subsession close + // Incase of completed and moved downloads, subsession will be closed and whole download info will be cached client side. + // No need to check for subsession close if(!(iEvent.iDownloadState == EHttpDlMultipleMOCompleted && (iEvent.iProgressState == EHttpProgContentFileMoved || iEvent.iProgressState == EHttpProgContentFileMovedAndDestFNChanged ))) { - // Due to the postponed event handling, it may happen that somebody already + // Due to the postponed event handling, it may happen that somebody already // closed the download meanwhile. Check if it is still alive: if ( iDownload.SubSessionHandle() == 0 ) { @@ -1288,7 +1294,7 @@ return; } } - + switch ( iEvent.iDownloadState ) { //--------------------------------------------- @@ -1353,7 +1359,7 @@ // Necessary task done in RunL. This object is no more necessary. delete this; } - + CLOG_LEAVEFN("CUserInteractionsEventHandler::RunL"); }