engine/src/ShowEngine.cpp
branchsymbian1
changeset 44 f6f9647922ba
parent 36 e010fc411ddc
child 53 b778853e60a7
child 65 bcd88ba95046
equal deleted inserted replaced
41:56821195bd44 44:f6f9647922ba
    22 #include <bautils.h>
    22 #include <bautils.h>
    23 #include <s32file.h>
    23 #include <s32file.h>
    24 #include "SettingsEngine.h"
    24 #include "SettingsEngine.h"
    25 #include <e32hashtab.h>
    25 #include <e32hashtab.h>
    26 #include <httperr.h>
    26 #include <httperr.h>
    27 #include "SoundEngine.h"
       
    28 #include "debug.h"
    27 #include "debug.h"
    29 #include "PodcastUtils.h"
    28 #include "PodcastUtils.h"
    30 
    29 
    31 //#include <mpxmedia.h>
    30 //#include <mpxmedia.h>
    32 //#include <mpxattribute.h>
    31 //#include <mpxattribute.h>
  1063 	for (TInt i = 0; i < aShowInfoArray.Count(); i++)
  1062 	for (TInt i = 0; i < aShowInfoArray.Count(); i++)
  1064 		{
  1063 		{
  1065 		if (aShowInfoArray[i]->PlayState() == EPlayed
  1064 		if (aShowInfoArray[i]->PlayState() == EPlayed
  1066 				&& aShowInfoArray[i]->FileName().Length() > 0)
  1065 				&& aShowInfoArray[i]->FileName().Length() > 0)
  1067 			{
  1066 			{
  1068 			if (CompareShowsByUid(*(iPodcastModel.PlayingPodcast()), *(aShowInfoArray[i]))
       
  1069 					&& iPodcastModel.SoundEngine().State() != ESoundEngineNotInitialized)
       
  1070 				{
       
  1071 				iPodcastModel.SoundEngine().Stop();
       
  1072 				}
       
  1073 			BaflUtils::DeleteFile(iPodcastModel.FsSession(), aShowInfoArray[i]->FileName());
  1067 			BaflUtils::DeleteFile(iPodcastModel.FsSession(), aShowInfoArray[i]->FileName());
  1074 			aShowInfoArray[i]->SetDownloadState(ENotDownloaded);
  1068 			aShowInfoArray[i]->SetDownloadState(ENotDownloaded);
  1075 			DBUpdateShowL(*aShowInfoArray[i]);
  1069 			DBUpdateShowL(*aShowInfoArray[i]);
  1076 			}
  1070 			}
  1077 		}
  1071 		}