engine/src/ShowEngine.cpp
branchsymbian1
changeset 147 2e626f5a52c8
parent 145 cc0182a5da39
parent 130 92572a695a1d
child 148 e3f9b65d6910
equal deleted inserted replaced
146:78d1b03a94ff 147:2e626f5a52c8
   538 	{
   538 	{
   539 	DP1("CShowEngine::DBGetShowsByFeed BEGIN, feedUid=%u", aFeedUid);
   539 	DP1("CShowEngine::DBGetShowsByFeed BEGIN, feedUid=%u", aFeedUid);
   540 	_LIT(KSqlStatement, "select url, title, description, filename, position, playtime, playstate, downloadstate, feeduid, uid, showsize, trackno, pubdate, showtype, lasterror from shows where feeduid=%u");
   540 	_LIT(KSqlStatement, "select url, title, description, filename, position, playtime, playstate, downloadstate, feeduid, uid, showsize, trackno, pubdate, showtype, lasterror from shows where feeduid=%u");
   541 	iSqlBuffer.Format(KSqlStatement, aFeedUid);
   541 	iSqlBuffer.Format(KSqlStatement, aFeedUid);
   542 
   542 
       
   543 	if (iShowFilter == ENewShows)
       
   544 		{
       
   545 		_LIT(KSqlStatementNewShows, " and playstate = 0"); // ENeverPlayed
       
   546 		iSqlBuffer.Append(KSqlStatementNewShows);
       
   547 		}
       
   548 	else if (iShowFilter == EDownloadedShows)
       
   549 		{
       
   550 	_LIT(KSqlStatementDownloadedShows, " and downloadstate = 4"); // EDownloaded
       
   551 		iSqlBuffer.Append(KSqlStatementDownloadedShows);
       
   552 		}
       
   553 	else if (iShowFilter == ENewAndDownloadedShows)
       
   554 		{
       
   555 	_LIT(KSqlStatementDownloadedAndNewShows, " and (downloadstate = 4 or playstate = 0)"); // EDownloaded or ENeverPlayed
       
   556 		iSqlBuffer.Append(KSqlStatementDownloadedAndNewShows);
       
   557 	
       
   558 		}
       
   559 	
   543 #ifndef DONT_SORT_SQL	
   560 #ifndef DONT_SORT_SQL	
   544 	_LIT(KSqlOrderByDate, " order by pubdate desc");
   561 	_LIT(KSqlOrderByDate, " order by pubdate desc");
   545 	iSqlBuffer.Append(KSqlOrderByDate);
   562 	iSqlBuffer.Append(KSqlOrderByDate);
   546 #endif
   563 #endif
   547 
   564