engine/src/ShowEngine.cpp
changeset 53 b778853e60a7
parent 44 f6f9647922ba
child 67 9c24c921ec35
child 109 223f270fa7ff
equal deleted inserted replaced
52:15f885e4eb92 53:b778853e60a7
  1078 
  1078 
  1079 	const TInt count = array.Count();
  1079 	const TInt count = array.Count();
  1080 
  1080 
  1081 	for (TInt i = count - 1; i >= 0; i--)
  1081 	for (TInt i = count - 1; i >= 0; i--)
  1082 		{
  1082 		{
       
  1083 		if (iShowDownloading && iShowDownloading->Uid() == array[i]->Uid())
       
  1084 			{
       
  1085 			// trying to delete the active download
       
  1086 			RemoveDownloadL(iShowDownloading->Uid());
       
  1087 			}
       
  1088 		
       
  1089 		// delete downloaded file
  1083 		if (array[i]->FileName().Length() > 0)
  1090 		if (array[i]->FileName().Length() > 0)
  1084 			{
  1091 			{
  1085 			if (aDeleteFiles)
  1092 			if (aDeleteFiles)
  1086 				{
  1093 				{
  1087 				BaflUtils::DeleteFile(iPodcastModel.FsSession(), array[i]->FileName());
  1094 				BaflUtils::DeleteFile(iPodcastModel.FsSession(), array[i]->FileName());
  1088 				}
  1095 				}
  1089 			}
  1096 			}
  1090 		}
  1097 		}
  1091 	array.ResetAndDestroy();
  1098 	array.ResetAndDestroy();
       
  1099 	
       
  1100 	// delete all shows from DB
  1092 	DBDeleteAllShowsByFeed(aFeedUid);
  1101 	DBDeleteAllShowsByFeed(aFeedUid);
       
  1102 
       
  1103 	// this will clear out deleted shows from the download queue
       
  1104 	DBGetAllDownloadsL(array);
       
  1105 	array.ResetAndDestroy();
       
  1106 
       
  1107 	NotifyDownloadQueueUpdatedL();
  1093 	}
  1108 	}
  1094 
  1109 
  1095 EXPORT_C void CShowEngine::DeleteOldShowsByFeed(TUint aFeedUid)
  1110 EXPORT_C void CShowEngine::DeleteOldShowsByFeed(TUint aFeedUid)
  1096 	{
  1111 	{
  1097 		DBDeleteOldShowsByFeed(aFeedUid);
  1112 		DBDeleteOldShowsByFeed(aFeedUid);