diff -r 43e204e6ae2e -r e7b10d6d7ba3 engine/src/ShowEngine.cpp --- a/engine/src/ShowEngine.cpp Fri Mar 12 00:20:10 2010 +0000 +++ b/engine/src/ShowEngine.cpp Fri Mar 12 09:34:08 2010 +0000 @@ -24,7 +24,6 @@ #include "SettingsEngine.h" #include #include -#include "SoundEngine.h" #include "debug.h" #include "PodcastUtils.h" @@ -115,7 +114,7 @@ DP("CShowEngine::ResumeDownloadsL END"); } -EXPORT_C void CShowEngine::RemoveAllDownloads() +EXPORT_C void CShowEngine::RemoveAllDownloadsL() { if (!iPodcastModel.SettingsEngine().DownloadSuspended()) { @@ -145,7 +144,7 @@ if (info != NULL) { info->SetDownloadState(ENotDownloaded); - DBUpdateShow(*info); + DBUpdateShowL(*info); delete info; } DBRemoveDownload(aUid); @@ -231,7 +230,7 @@ if (showInfo == NULL) { - DBAddShow(aItem); + DBAddShowL(aItem); return ETrue; } else @@ -299,7 +298,7 @@ } iShowDownloading->SetDownloadState(EDownloaded); - DBUpdateShow(*iShowDownloading); + DBUpdateShowL(*iShowDownloading); DBRemoveDownload(iShowDownloading->Uid()); AddShowToMpxCollection(*iShowDownloading); NotifyShowFinishedL(aError); @@ -313,7 +312,7 @@ if(aError >= HTTPStatus::EBadRequest && aError <= HTTPStatus::EBadRequest+200) { iShowDownloading->SetDownloadState(EFailedDownload); - DBUpdateShow(*iShowDownloading); + DBUpdateShowL(*iShowDownloading); DBRemoveDownload(iShowDownloading->Uid()); NotifyShowFinishedL(aError); @@ -323,7 +322,7 @@ else // other kind of error, missing network etc, reque this show { iShowDownloading->SetDownloadState(EQueued); - DBUpdateShow(*iShowDownloading); + DBUpdateShowL(*iShowDownloading); } iDownloadErrors++; @@ -343,7 +342,7 @@ if(iShowDownloading) { iShowDownloading->SetDownloadState(EQueued); - DBUpdateShow(*iShowDownloading); + DBUpdateShowL(*iShowDownloading); } iPodcastModel.SettingsEngine().SetDownloadSuspended(ETrue); NotifyShowFinishedL(aError); @@ -734,7 +733,7 @@ showInfo->SetLastError(lasterror); } -TBool CShowEngine::DBAddShow(const CShowInfo& aItem) +TBool CShowEngine::DBAddShowL(const CShowInfo& aItem) { DP2("CShowEngine::DBAddShow, title=%S, URL=%S", &aItem.Title(), &aItem.Url()); @@ -804,7 +803,7 @@ sqlite3_finalize(st); } -TBool CShowEngine::DBUpdateShow(CShowInfo& aItem) +TBool CShowEngine::DBUpdateShowL(CShowInfo& aItem) { DP1("CShowEngine::DBUpdateShow, title='%S'", &aItem.Title()); @@ -1058,21 +1057,16 @@ } } -EXPORT_C void CShowEngine::DeletePlayedShows(RShowInfoArray &aShowInfoArray) +EXPORT_C void CShowEngine::DeletePlayedShowsL(RShowInfoArray &aShowInfoArray) { for (TInt i = 0; i < aShowInfoArray.Count(); i++) { if (aShowInfoArray[i]->PlayState() == EPlayed && aShowInfoArray[i]->FileName().Length() > 0) { - if (CompareShowsByUid(*(iPodcastModel.PlayingPodcast()), *(aShowInfoArray[i])) - && iPodcastModel.SoundEngine().State() != ESoundEngineNotInitialized) - { - iPodcastModel.SoundEngine().Stop(); - } BaflUtils::DeleteFile(iPodcastModel.FsSession(), aShowInfoArray[i]->FileName()); aShowInfoArray[i]->SetDownloadState(ENotDownloaded); - DBUpdateShow(*aShowInfoArray[i]); + DBUpdateShowL(*aShowInfoArray[i]); } } } @@ -1116,7 +1110,7 @@ } info->SetDownloadState(ENotDownloaded); - DBUpdateShow(*info); + DBUpdateShowL(*info); delete info; } } @@ -1159,7 +1153,7 @@ EXPORT_C void CShowEngine::AddDownloadL(CShowInfo& aInfo) { aInfo.SetDownloadState(EQueued); - DBUpdateShow(aInfo); + DBUpdateShowL(aInfo); DBAddDownload(aInfo.Uid()); DownloadNextShowL(); } @@ -1200,7 +1194,7 @@ DP1("CShowEngine::DownloadNextShow\tDownloading: %S", &(info->Title())); info->SetDownloadState(EDownloading); info->SetLastError(KErrNone); - DBUpdateShow(*info); + DBUpdateShowL(*info); iShowDownloading = info; // Inform the observers // important to do this after we change download state @@ -1211,7 +1205,7 @@ { info->SetDownloadState(EFailedDownload); DBRemoveDownload(info->Uid()); - DBUpdateShow(*info); + DBUpdateShowL(*info); info = DBGetNextDownloadL(); if(info == NULL) @@ -1271,10 +1265,10 @@ } } -void CShowEngine::ReadMetaData(CShowInfo& aShowInfo) +void CShowEngine::ReadMetaDataL(CShowInfo& aShowInfo) { //DP1("Read %S", &(aShowInfo->Title())); - DBUpdateShow(aShowInfo); + DBUpdateShowL(aShowInfo); } void CShowEngine::ReadMetaDataCompleteL() @@ -1283,9 +1277,9 @@ MetaDataReader().SetIgnoreTrackNo(EFalse); } -EXPORT_C void CShowEngine::UpdateShow(CShowInfo& aInfo) +EXPORT_C void CShowEngine::UpdateShowL(CShowInfo& aInfo) { - DBUpdateShow(aInfo); + DBUpdateShowL(aInfo); } EXPORT_C CMetaDataReader& CShowEngine::MetaDataReader()