engine/src/PodcastModel.cpp
branch3rded
changeset 390 d7abecc9d189
parent 343 9c56bf585696
equal deleted inserted replaced
345:702ba9ffe210 390:d7abecc9d189
   226 	DP("CPodcastModel::PlayPausePodcastL BEGIN");
   226 	DP("CPodcastModel::PlayPausePodcastL BEGIN");
   227 	TRAPD(err, LaunchFileEmbeddedL(aPodcast->FileName()));
   227 	TRAPD(err, LaunchFileEmbeddedL(aPodcast->FileName()));
   228 	
   228 	
   229 	if (err == KErrNone)
   229 	if (err == KErrNone)
   230 		{
   230 		{
   231 		aPodcast->SetPlayState(EPlayed);
   231 		iShowEngine->PostPlayHandling(aPodcast);
   232 		iShowEngine->UpdateShowL(*aPodcast);
       
   233 		}
   232 		}
   234 	else
   233 	else
   235 		{
   234 		{
   236 		User::Leave(err);
   235 		User::Leave(err);
   237 		}
   236 		}
   455 	iShowEngine->DeleteOldShowsByFeedL(aFeedUid);
   454 	iShowEngine->DeleteOldShowsByFeedL(aFeedUid);
   456 	iShowEngine->CheckForDeletedShows(aFeedUid);
   455 	iShowEngine->CheckForDeletedShows(aFeedUid);
   457 	iShowEngine->GetShowsByFeedL(iActiveShowList, aFeedUid);
   456 	iShowEngine->GetShowsByFeedL(iActiveShowList, aFeedUid);
   458 	}
   457 	}
   459 
   458 
       
   459 EXPORT_C void CPodcastModel::GetNewShowsL()
       
   460 	{
       
   461 	iActiveShowList.ResetAndDestroy();
       
   462 	iShowEngine->GetNewShowsL(iActiveShowList);
       
   463 	}
       
   464 
   460 EXPORT_C void CPodcastModel::MarkSelectionPlayedL()
   465 EXPORT_C void CPodcastModel::MarkSelectionPlayedL()
   461 	{
   466 	{
   462 	for (int i=0;i<iActiveShowList.Count();i++) {
   467 	for (int i=0;i<iActiveShowList.Count();i++) {
   463 		if(iActiveShowList[i]->PlayState() != EPlayed) {
   468 		if(iActiveShowList[i]->PlayState() != EPlayed) {
   464 			iActiveShowList[i]->SetPlayState(EPlayed);
   469 			ShowEngine().PostPlayHandling(iActiveShowList[i]);
   465 			iShowEngine->UpdateShowL(*iActiveShowList[i]);
       
   466 		}
   470 		}
   467 	}
   471 	}
   468 	}
   472 	}
   469 
   473 
   470 TInt CPodcastModel::FindActiveShowByUid(TUint aUid)
   474 TInt CPodcastModel::FindActiveShowByUid(TUint aUid)