2534 // ---------------------------------------------------- |
2534 // ---------------------------------------------------- |
2535 // CDownloadMgrUiDownloadsList::HandleAIWCommandL(TInt aCommand, RHttpDownload& aDownload) |
2535 // CDownloadMgrUiDownloadsList::HandleAIWCommandL(TInt aCommand, RHttpDownload& aDownload) |
2536 // ---------------------------------------------------- |
2536 // ---------------------------------------------------- |
2537 // |
2537 // |
2538 void CDownloadMgrUiDownloadsList::HandleAIWCommandL(TInt aCommand, RHttpDownload& aDownload) |
2538 void CDownloadMgrUiDownloadsList::HandleAIWCommandL(TInt aCommand, RHttpDownload& aDownload) |
2539 { |
2539 |
2540 // The command is an AIW command |
2540 { |
|
2541 //Check if file exists |
|
2542 HBufC* fileName = HBufC::NewLC( KMaxPath ); |
|
2543 TPtr fileNamePtr = fileName->Des(); |
|
2544 User::LeaveIfError( aDownload.GetStringAttribute( EDlAttrDestFilename, fileNamePtr ) ); |
|
2545 if(!iUiUtils->IsDuplicateL(fileNamePtr)) |
|
2546 { |
|
2547 HBufC* infoPrompt = StringLoader::LoadLC( R_DMUL_ERROR_FILE_NOT_FOUND); |
|
2548 CAknInformationNote* note = new(ELeave) CAknInformationNote(); |
|
2549 note->ExecuteLD(*infoPrompt); |
|
2550 CleanupStack::PopAndDestroy(infoPrompt); |
|
2551 CleanupStack::PopAndDestroy(fileName); |
|
2552 return; |
|
2553 } |
|
2554 CleanupStack::PopAndDestroy(fileName); |
|
2555 |
|
2556 // The command is an AIW command |
2541 CAiwGenericParamList& params = iAIWServiceHandler->InParamListL(); |
2557 CAiwGenericParamList& params = iAIWServiceHandler->InParamListL(); |
2542 TInt aiwOptions( 0 ); |
2558 TInt aiwOptions( 0 ); |
2543 |
2559 |
2544 ProvideInputParametersL( params, aiwOptions, aDownload ); |
2560 ProvideInputParametersL( params, aiwOptions, aDownload ); |
2545 CAiwGenericParamList& output = iAIWServiceHandler->OutParamListL(); |
2561 CAiwGenericParamList& output = iAIWServiceHandler->OutParamListL(); |