browserutilities/downloadmgr/DownloadMgrServEng/Src/HttpDownload.cpp
branchRCL_3
changeset 84 800203832575
parent 70 8bfb9186a8b8
child 93 79859ed3eea9
equal deleted inserted replaced
73:a1a5d4e727e8 84:800203832575
  3816             // In case of PDL for OMA2 the MP/VP moves the file after the playback is done.
  3816             // In case of PDL for OMA2 the MP/VP moves the file after the playback is done.
  3817 			// So, the download status should be changed after that
  3817 			// So, the download status should be changed after that
  3818 			//but we again send the progress state as EHttpProgContentFileMoved because we need to display
  3818 			//but we again send the progress state as EHttpProgContentFileMoved because we need to display
  3819 			//where file is saved(saved to gallery)
  3819 			//where file is saved(saved to gallery)
  3820 			//Change Dl State to Download Completed if not already           
  3820 			//Change Dl State to Download Completed if not already           
  3821 
  3821           
  3822 		    if(_OMADLOTA2_MULTI_DOWNLOAD)
  3822             if( iStatus ==KErrNone )
  3823 				{
  3823                 {
  3824 				TPtrC fileNamePtr = ((*iCodDlData)[iMOMoved])->DestFilename();
  3824 		          if(_OMADLOTA2_MULTI_DOWNLOAD)
  3825 				NotifyMediaGalleryL(fileNamePtr);
  3825 				     {
  3826 
  3826 				      TPtrC fileNamePtr = ((*iCodDlData)[iMOMoved])->DestFilename();
  3827 				// Initiate async move for the next media object
  3827 				      NotifyMediaGalleryL(fileNamePtr);
  3828 				iMOMoved++;
  3828 
  3829 				if(iMOMoved <= iCodDlData->Count())
  3829              	      // Initiate async move for the next media object
  3830 					{
  3830 				      iMOMoved++;
  3831 					MoveDownloadedMediaObjectL(iMOMoved);
  3831 				      if(iMOMoved <= iCodDlData->Count())
  3832 					break;
  3832 					     {
  3833 					}
  3833 					      MoveDownloadedMediaObjectL(iMOMoved);
  3834 				}
  3834 					      break;
  3835 
  3835 					     }
  3836             SetDownloadStatus( iDlNameChanged ? EHttpProgContentFileMovedAndDestFNChanged : EHttpProgContentFileMoved, 
  3836 				      }
       
  3837 
       
  3838                   SetDownloadStatus( iDlNameChanged ? EHttpProgContentFileMovedAndDestFNChanged : EHttpProgContentFileMoved, 
  3837                                iDlState = EHttpDlMultipleMOCompleted, 
  3839                                iDlState = EHttpDlMultipleMOCompleted, 
  3838                                iStatus == KErrNone ? ENoError : EMoveFailed,
  3840                                iStatus == KErrNone ? ENoError : EMoveFailed,
  3839                                iStatus.Int() );
  3841                                iStatus.Int() );
  3840             
  3842             
  3841             if(iStatus == KErrNone)
  3843                   if(iStatus == KErrNone)
  3842             	{
  3844             	      {
  3843             	iMoveInProgress = EFalse;	
  3845             	       iMoveInProgress = EFalse;	
  3844             	CLOG_WRITE("setting iMoveInProgress false when move is completed");
  3846             	       CLOG_WRITE("setting iMoveInProgress false when move is completed");
  3845             	}
  3847             	      }
  3846             
  3848             
       
  3849                   delete iFileMan; iFileMan = NULL;
  3847             
  3850             
  3848             delete iFileMan; iFileMan = NULL;
  3851                   if( !_OMADLOTA2_MULTI_DOWNLOAD)
  3849             
  3852 				     {
  3850 			if( !_OMADLOTA2_MULTI_DOWNLOAD)
  3853 				      TPtr fileNamePtr(iStorage->DestFilename()->Des());
  3851 				{
  3854 				      NotifyMediaGalleryL(fileNamePtr);
  3852 				TPtr fileNamePtr(iStorage->DestFilename()->Des());
  3855 				     }
  3853 				NotifyMediaGalleryL(fileNamePtr);
  3856                 }
  3854 				}
  3857             else
  3855             }
  3858                 {
       
  3859                 CLOG_WRITE("Move Operation Failed ");
       
  3860                 CLOG_WRITE("setting progress state to EHttpProgNone when move is Failing");
       
  3861                 SetDownloadStatus( EHttpProgNone, iDlState );
       
  3862                 CLOG_WRITE("setting iMoveInProgress false when move is Failing");
       
  3863                 iMoveInProgress = EFalse;
       
  3864                 }
       
  3865             } 
  3856             break;
  3866             break;
  3857 
  3867 
  3858         default:
  3868         default:
  3859             {
  3869             {
  3860             DMPanic( KErrUnknown );
  3870             DMPanic( KErrUnknown );