engine/src/ShowEngine.cpp
branchsymbian1
changeset 164 000f9fc147b2
parent 149 70b2f592a460
child 167 4bfc2fcec5f6
--- a/engine/src/ShowEngine.cpp	Tue Jul 06 03:44:46 2010 +0530
+++ b/engine/src/ShowEngine.cpp	Wed Jul 07 14:19:21 2010 +0100
@@ -27,10 +27,6 @@
 #include "debug.h"
 #include "PodcastUtils.h"
 
-//#include <mpxmedia.h>
-//#include <mpxattribute.h>
-//#include <mpxmediageneraldefs.h>
-
 const TUint KMaxDownloadErrors = 3;
 const TInt KMimeBufLength = 100;
 
@@ -241,13 +237,7 @@
 
 void CShowEngine::AddShowToMpxCollection(CShowInfo &/*aShowInfo*/)
 	{
-/*	RArray<TInt> contentIDs;
-	contentIDs.AppendL( KMPXMediaIdGeneral );
-	
-	CMPXMedia* media = CMPXMedia::NewL( contentIDs.Array() );
-	CleanupStack::PushL( media );
-	contentIDs.Close();
-	CleanupStack::PopAndDestroy(media);   */
+	// do nothing (right now)
 	}
 
 void CShowEngine::CompleteL(CHttpClient* /*aHttpClient*/, TInt aError)
@@ -700,8 +690,7 @@
 	// 2. select the first MaxListItems shows
 	// 3. delete the rest if downloadstate is ENotDownloaded
 	
-	_LIT(KSqlStatement,"delete from shows where feeduid=%u and downloadstate=0 and uid not in " \
-			"(select uid from shows where feeduid=%u order by pubdate desc limit %u)");
+	_LIT(KSqlStatement,"delete from shows where feeduid=%u and downloadstate=0 and uid not in (select uid from shows where feeduid=%u order by pubdate desc limit %u)");
 	iSqlBuffer.Format(KSqlStatement, aFeedUid, aFeedUid, iPodcastModel.SettingsEngine().MaxListItems());
 
 	sqlite3_stmt *st;
@@ -803,8 +792,7 @@
 	descPtr.Copy(aItem.Description());
 	PodcastUtils::SQLEncode(descPtr);
 	
-	_LIT(KSqlStatement, "insert into shows (url, title, description, filename, position, playtime, playstate, downloadstate, feeduid, uid, showsize, trackno, pubdate, showtype)"
-			" values (\"%S\",\"%S\", \"%S\", \"%S\", \"%Lu\", \"%u\", \"%u\", \"%u\", \"%u\", \"%u\", \"%u\", \"%u\", \"%Lu\", \"%d\")");
+	_LIT(KSqlStatement, "insert into shows (url, title, description, filename, position, playtime, playstate, downloadstate, feeduid, uid, showsize, trackno, pubdate, showtype) values (\"%S\",\"%S\", \"%S\", \"%S\", \"%Lu\", \"%u\", \"%u\", \"%u\", \"%u\", \"%u\", \"%u\", \"%u\", \"%Lu\", \"%d\")");
 	
 	iSqlBuffer.Format(KSqlStatement, &aItem.Url(), &titlePtr, &descPtr,
 			&aItem.FileName(), aItem.Position().Int64(), aItem.PlayTime(),
@@ -877,9 +865,7 @@
 	descPtr.Copy(aItem.Description());
 	PodcastUtils::SQLEncode(descPtr);
 
-	_LIT(KSqlStatement, "update shows set url=\"%S\", title=\"%S\", description=\"%S\", filename=\"%S\", position=\"%Lu\","
-			"playtime=\"%u\", playstate=\"%u\", downloadstate=\"%u\", feeduid=\"%u\", showsize=\"%u\", trackno=\"%u\","
-			"pubdate=\"%Lu\", showtype=\"%d\", lasterror=\"%d\" where uid=\"%u\"");
+	_LIT(KSqlStatement, "update shows set url=\"%S\", title=\"%S\", description=\"%S\", filename=\"%S\", position=\"%Lu\", playtime=\"%u\", playstate=\"%u\", downloadstate=\"%u\", feeduid=\"%u\", showsize=\"%u\", trackno=\"%u\",pubdate=\"%Lu\", showtype=\"%d\", lasterror=\"%d\" where uid=\"%u\"");
 	iSqlBuffer.Format(KSqlStatement, &aItem.Url(), &titlePtr, &descPtr,
 			&aItem.FileName(), aItem.Position().Int64(), aItem.PlayTime(),
 			aItem.PlayState(), aItem.DownloadState(), aItem.FeedUid(),
@@ -1580,4 +1566,3 @@
 		User::Leave(KErrCorrupt);
 		}
 	}
-