engine/src/ShowEngine.cpp
changeset 15 93d9f66bf50b
parent 6 e211a78d3037
child 21 420a1b4930da
equal deleted inserted replaced
14:4e75731546eb 15:93d9f66bf50b
   269 void CShowEngine::CompleteL(CHttpClient* /*aHttpClient*/, TInt aError)
   269 void CShowEngine::CompleteL(CHttpClient* /*aHttpClient*/, TInt aError)
   270 	{
   270 	{
   271 	if (iShowDownloading != NULL)
   271 	if (iShowDownloading != NULL)
   272 		{
   272 		{
   273 		DP1("CShowEngine::Complete\tDownload of file: %S is complete", &iShowDownloading->FileName());		
   273 		DP1("CShowEngine::Complete\tDownload of file: %S is complete", &iShowDownloading->FileName());		
   274 		// decide what kind of file this is		
       
   275 		if(aError != KErrCouldNotConnect)
   274 		if(aError != KErrCouldNotConnect)
   276 			{
   275 			{
   277 			if(aError == KErrDisconnected && iPodcastModel.SettingsEngine().DownloadSuspended())
   276 			if(aError == KErrDisconnected && iPodcastModel.SettingsEngine().DownloadSuspended())
   278 				{
   277 				{
   279 				// no error if disconnect happened because of suspended downloading
   278 				// no error if disconnect happened because of suspended downloading
   301 				iShowDownloading->SetDownloadState(EDownloaded);
   300 				iShowDownloading->SetDownloadState(EDownloaded);
   302 				DBUpdateShow(*iShowDownloading);
   301 				DBUpdateShow(*iShowDownloading);
   303 				DBRemoveDownload(iShowDownloading->Uid());
   302 				DBRemoveDownload(iShowDownloading->Uid());
   304 				AddShowToMpxCollection(*iShowDownloading);				
   303 				AddShowToMpxCollection(*iShowDownloading);				
   305 				NotifyShowFinishedL(aError);
   304 				NotifyShowFinishedL(aError);
   306 
   305 				iDownloadErrors = 0;
   307 				delete iShowDownloading;
   306 				delete iShowDownloading;
   308 				iShowDownloading = NULL;
   307 				iShowDownloading = NULL;
   309 				}
   308 				}
   310 			else
   309 			else
   311 				{
   310 				{