--- a/application/data/PodcastShowsView.ra Tue Jul 06 03:44:46 2010 +0530
+++ b/application/data/PodcastShowsView.ra Wed Jul 07 14:19:21 2010 +0100
@@ -40,12 +40,12 @@
command = EPodcastMarkAllPlayed;
txt = STRING_r_view_mark_all_played_cmd;
},
- MENU_ITEM
- {
- command = EPodcastFilterShows;
- txt = STRING_r_view_filter_shows_cmd;
- cascade = r_filtershows_menu;
- },
+// MENU_ITEM
+// {
+// command = EPodcastFilterShows;
+// txt = STRING_r_view_filter_shows_cmd;
+// cascade = r_filtershows_menu;
+// },
MENU_ITEM
{
command = EPodcastAbout;
--- a/application/inc/PodcastFeedView.h Tue Jul 06 03:44:46 2010 +0530
+++ b/application/inc/PodcastFeedView.h Wed Jul 07 14:19:21 2010 +0100
@@ -113,7 +113,7 @@
private:
CPodcastModel& iPodcastModel;
- TBool iUpdatingAllRunning;
+ TBool iUpdatingRunning;
HBufC* iFeedsFormat;
HBufC* iNeverUpdated;
CPodcastFeedViewUpdater* iUpdater;
--- a/application/inc/buildno.h Tue Jul 06 03:44:46 2010 +0530
+++ b/application/inc/buildno.h Wed Jul 07 14:19:21 2010 +0100
@@ -1,2 +1,2 @@
// Build number generated by increment_buildno.py, do not edit manually
-#define BUILD_NO 26
\ No newline at end of file
+#define BUILD_NO 27
\ No newline at end of file
--- a/application/sis/buildno.txt Tue Jul 06 03:44:46 2010 +0530
+++ b/application/sis/buildno.txt Wed Jul 07 14:19:21 2010 +0100
@@ -1,1 +1,1 @@
-26
\ No newline at end of file
+27
\ No newline at end of file
--- a/application/sis/podcatcher_udeb.pkg Tue Jul 06 03:44:46 2010 +0530
+++ b/application/sis/podcatcher_udeb.pkg Wed Jul 07 14:19:21 2010 +0100
@@ -1,7 +1,7 @@
&EN
:"Symbian Foundation"
%{"Podcatcher"}
-#{"Podcatcher"},(0xA0009D00), 1, 00, 26, TYPE=SA
+#{"Podcatcher"},(0xA0009D00), 1, 00, 27, TYPE=SA
;Supports S60 3rd edition
[0x101F7961], 0, 0, 0, {"Series60ProductID"}
Binary file application/sis/podcatcher_udeb.sis has changed
Binary file application/sis/podcatcher_udeb_signed.sis has changed
--- a/application/sis/podcatcher_urel.pkg Tue Jul 06 03:44:46 2010 +0530
+++ b/application/sis/podcatcher_urel.pkg Wed Jul 07 14:19:21 2010 +0100
@@ -1,7 +1,7 @@
&EN
:"Symbian Foundation"
%{"Podcatcher"}
-#{"Podcatcher"},(0xA0009D00), 1, 00, 26, TYPE=SA
+#{"Podcatcher"},(0xA0009D00), 1, 00, 27, TYPE=SA
;Supports S60 3rd edition
[0x101F7961], 0, 0, 0, {"Series60ProductID"}
--- a/application/src/PodcastFeedView.cpp Tue Jul 06 03:44:46 2010 +0530
+++ b/application/src/PodcastFeedView.cpp Wed Jul 07 14:19:21 2010 +0100
@@ -37,11 +37,8 @@
const TInt KMaxFeedNameLength = 100;
const TInt KMaxUnplayedFeedsLength =64;
const TInt KADayInHours = 24;
-const TInt KDefaultGran = 5;
-const TInt KNumberOfFilesMaxLength = 4;
#define KMaxMessageLength 200
#define KMaxTitleLength 100
-const TInt KMimeBufLength = 100;
_LIT(KFeedFormat, "%d\t%S\t%S%S");
enum
@@ -227,13 +224,14 @@
void CPodcastFeedView::FeedUpdateAllCompleteL(TFeedState /*aState*/)
{
- iUpdatingAllRunning = EFalse;
+ iUpdatingRunning = EFalse;
UpdateToolbar();
}
void CPodcastFeedView::FeedDownloadStartedL(TFeedState /*aState*/, TUint aFeedUid)
{
// Update status text
+ iUpdatingRunning = ETrue;
UpdateFeedInfoStatusL(aFeedUid, ETrue);
UpdateToolbar();
@@ -420,6 +418,7 @@
void CPodcastFeedView::UpdateListboxItemsL()
{
+ DP("CPodcastFeedView::UpdateListboxItemsL BEGIN");
// No reason to do any work if it isn't going to show..
if(!iListContainer->IsVisible())
{
@@ -465,7 +464,8 @@
itemProps.SetHiddenSelection(ETrue);
iListContainer->Listbox()->ItemDrawer()->SetPropertiesL(0, itemProps);
}
- iListContainer->Listbox()->HandleItemAdditionL();
+ iListContainer->Listbox()->HandleItemAdditionL();
+ DP("CPodcastFeedView::UpdateListboxItemsL END");
}
/**
@@ -475,7 +475,8 @@
*/
void CPodcastFeedView::HandleCommandL(TInt aCommand)
{
- //CloseToolbarExtension();
+ DP("CPodcastFeedView::HandleCommandL BEGIN");
+
switch(aCommand)
{
case EPodcastHide:
@@ -499,7 +500,6 @@
break;
case EPodcastUpdateAllFeeds:
{
- iUpdatingAllRunning = ETrue;
iPodcastModel.FeedEngine().UpdateAllFeedsL();
UpdateToolbar();
}break;
@@ -509,9 +509,8 @@
}break;
case EPodcastCancelUpdateAllFeeds:
{
- if(iUpdatingAllRunning)
+ if(iUpdatingRunning)
{
- iUpdatingAllRunning = EFalse;
iPodcastModel.FeedEngine().CancelUpdateAllFeeds();
}
}break;
@@ -547,10 +546,12 @@
iListContainer->SetLongTapDetectedL(EFalse); // in case we got here by long tapping
UpdateToolbar();
+ DP("CPodcastFeedView::HandleCommandL END");
}
void CPodcastFeedView::UpdateToolbar(TBool aVisible)
{
+ DP("CPodcastFeedView::UpdateToolbar BEGIN");
CAknToolbar* toolbar = Toolbar();
if (toolbar)
@@ -558,11 +559,12 @@
if (iListContainer->IsVisible()) {
toolbar->SetToolbarVisibility(aVisible);
}
- toolbar->HideItem(EPodcastUpdateAllFeeds, iUpdatingAllRunning, ETrue);
- toolbar->HideItem(EPodcastCancelUpdateAllFeeds, !iUpdatingAllRunning, ETrue );
- toolbar->SetItemDimmed(EPodcastAddFeed, iUpdatingAllRunning, ETrue );
- toolbar->SetItemDimmed(EPodcastSettings, iUpdatingAllRunning, ETrue );
+ toolbar->HideItem(EPodcastUpdateAllFeeds, iUpdatingRunning, ETrue);
+ toolbar->HideItem(EPodcastCancelUpdateAllFeeds, !iUpdatingRunning, ETrue );
+ toolbar->SetItemDimmed(EPodcastAddFeed, iUpdatingRunning, ETrue );
+ toolbar->SetItemDimmed(EPodcastSettings, iUpdatingRunning, ETrue );
}
+ DP("CPodcastFeedView::UpdateToolbar END");
}
void CPodcastFeedView::HandleAddFeedL()
--- a/application/src/PodcastQueueView.cpp Tue Jul 06 03:44:46 2010 +0530
+++ b/application/src/PodcastQueueView.cpp Wed Jul 07 14:19:21 2010 +0100
@@ -73,7 +73,7 @@
iStylusPopupMenu->ConstructFromResourceL(reader);
CleanupStack::PopAndDestroy();
-
+
SetEmptyTextL(R_PODCAST_EMPTY_QUEUE);
}
--- a/application/src/PodcastSettingsView.cpp Tue Jul 06 03:44:46 2010 +0530
+++ b/application/src/PodcastSettingsView.cpp Wed Jul 07 14:19:21 2010 +0100
@@ -543,6 +543,7 @@
}
break;
case EPodcastResetDb:
+ {
CAknQueryDialog* dlg= new(ELeave) CAknQueryDialog();
CleanupStack::PushL(dlg);
@@ -555,9 +556,12 @@
iPodcastModel.DropDB();
AppUi()->Exit();
}
+ }
break;
default:
+ {
AppUi()->HandleCommandL(aCommand);
+ }
break;
}
}
--- a/application/src/PodcastShowsView.cpp Tue Jul 06 03:44:46 2010 +0530
+++ b/application/src/PodcastShowsView.cpp Wed Jul 07 14:19:21 2010 +0100
@@ -38,8 +38,6 @@
_LIT(KShowsSizeFormatS60, "%.1f MB");
_LIT(KShowFormat, "%d\t%S\t%S%S\t");
-_LIT(KShowErrorFormat, "%d\t%S\t%S\t");
-_LIT(KShowQueueFormat, "%d\t%S\t%S%S\t");
// these must correspond with TShowsIconIndex
@@ -581,11 +579,9 @@
{
case EPodcastMarkAsPlayed:
HandleSetShowPlayedL(ETrue);
- UpdateListboxItemsL();
break;
case EPodcastMarkAsUnplayed:
HandleSetShowPlayedL(EFalse);
- UpdateListboxItemsL();
break;
case EPodcastMarkAllPlayed:
iPodcastModel.MarkSelectionPlayedL();
@@ -593,7 +589,6 @@
break;
case EPodcastDeleteShow:
HandleDeleteShowL();
- UpdateListboxItemsL();
break;
case EPodcastDownloadShow:
{
--- a/engine/src/ConnectionEngine.cpp Tue Jul 06 03:44:46 2010 +0530
+++ b/engine/src/ConnectionEngine.cpp Wed Jul 07 14:19:21 2010 +0100
@@ -117,9 +117,9 @@
}
}
-void CConnectionEngine::Error( TInt aError )
+void CConnectionEngine::Error( TInt /*aError*/ )
{
- DP1("CConnectionEngine::Error, aError=%d", aError)
+
}
TBool CConnectionEngine::ConnectionSettingL()
--- a/engine/src/FeedEngine.cpp Tue Jul 06 03:44:46 2010 +0530
+++ b/engine/src/FeedEngine.cpp Wed Jul 07 14:19:21 2010 +0100
@@ -136,7 +136,6 @@
if (interval != 0)
{
- DP1("Running feed timer with interval %d", interval);
iFeedTimer.SetPeriod(interval);
iFeedTimer.RunPeriodically();
}
@@ -358,7 +357,7 @@
void CFeedEngine::DBAddFeedL(const CFeedInfo& aItem)
{
- DP2("CFeedEngine::DBAddFeed, title=%S, URL=%S", &aItem.Title(), &aItem.Url());
+ DP2("CFeedEngine::DBAddFeed BEGIN, title=%S, URL=%S", &aItem.Title(), &aItem.Url());
CFeedInfo *info;
@@ -379,8 +378,7 @@
descPtr.Copy(aItem.Description());
PodcastUtils::SQLEncode(descPtr);
- _LIT(KSqlStatement, "insert into feeds (url, title, description, imageurl, imagefile, link, built, lastupdated, uid, feedtype, customtitle, lasterror)"
- " values (\"%S\",\"%S\", \"%S\", \"%S\", \"%S\", \"%S\", \"%Ld\", \"%Ld\", \"%u\", \"%u\", \"%u\", \"%d\")");
+ _LIT(KSqlStatement, "insert into feeds (url, title, description, imageurl, imagefile, link, built, lastupdated, uid, feedtype, customtitle, lasterror) values (\"%S\",\"%S\", \"%S\", \"%S\", \"%S\", \"%S\", \"%Ld\", \"%Ld\", \"%u\", \"%u\", \"%u\", \"%d\")");
iSqlBuffer.Format(KSqlStatement,
&aItem.Url(), titleBuf, descBuf, &aItem.ImageUrl(), &aItem.ImageFileName(), &aItem.Link(),
aItem.BuildDate().Int64(), aItem.LastUpdated().Int64(), aItem.Uid(), EAudioPodcast, aItem.CustomTitle(), aItem.LastError());
@@ -407,6 +405,7 @@
{
User::Leave(KErrCorrupt);
}
+ DP("CFeedEngine::DBAddFeed END");
}
EXPORT_C void CFeedEngine::RemoveFeedL(TUint aUid)
@@ -452,7 +451,7 @@
void CFeedEngine::DBRemoveFeedL(TUint aUid)
{
- DP("CFeedEngine::DBRemoveFeed");
+ DP("CFeedEngine::DBRemoveFeed BEGIN");
_LIT(KSqlStatement, "delete from feeds where uid=%u");
iSqlBuffer.Format(KSqlStatement, aUid);
@@ -476,11 +475,12 @@
{
User::Leave(KErrCorrupt);
}
+ DP("CFeedEngine::DBRemoveFeed END");
}
void CFeedEngine::DBUpdateFeedL(const CFeedInfo &aItem)
{
- DP2("CFeedEngine::DBUpdateFeed, title=%S, URL=%S", &aItem.Title(), &aItem.Url());
+ DP2("CFeedEngine::DBUpdateFeed BEGIN, title=%S, URL=%S", &aItem.Title(), &aItem.Url());
HBufC* titleBuf = HBufC::NewLC(KMaxLineLength);
TPtr titlePtr(titleBuf->Des());
@@ -492,8 +492,7 @@
descPtr.Copy(aItem.Description());
PodcastUtils::SQLEncode(descPtr);
- _LIT(KSqlStatement, "update feeds set url=\"%S\", title=\"%S\", description=\"%S\", imageurl=\"%S\", imagefile=\"%S\"," \
- "link=\"%S\", built=\"%Lu\", lastupdated=\"%Lu\", feedtype=\"%u\", customtitle=\"%u\", lasterror=\"%d\" where uid=\"%u\"");
+ _LIT(KSqlStatement, "update feeds set url=\"%S\", title=\"%S\", description=\"%S\", imageurl=\"%S\", imagefile=\"%S\", link=\"%S\", built=\"%Lu\", lastupdated=\"%Lu\", feedtype=\"%u\", customtitle=\"%u\", lasterror=\"%d\" where uid=\"%u\"");
iSqlBuffer.Format(KSqlStatement,
&aItem.Url(), titleBuf, descBuf, &aItem.ImageUrl(), &aItem.ImageFileName(), &aItem.Link(),
aItem.BuildDate().Int64(), aItem.LastUpdated().Int64(), EAudioPodcast, aItem.CustomTitle(), aItem.LastError(), aItem.Uid());
@@ -520,6 +519,7 @@
{
User::Leave(KErrCorrupt);
}
+ DP("CFeedEngine::DBUpdateFeed END");
}
void CFeedEngine::ParsingCompleteL(CFeedInfo *item)
@@ -1001,7 +1001,7 @@
CFeedInfo* CFeedEngine::DBGetFeedInfoByUidL(TUint aFeedUid)
{
- DP("CFeedEngine::DBGetFeedInfoByUid");
+ DP("CFeedEngine::DBGetFeedInfoByUid BEGIN");
CFeedInfo *feedInfo = NULL;
_LIT(KSqlStatement, "select url, title, description, imageurl, imagefile, link, built, lastupdated, uid, feedtype, customtitle, lasterror from feeds where uid=%u");
iSqlBuffer.Format(KSqlStatement, aFeedUid);
@@ -1070,7 +1070,7 @@
{
User::Leave(KErrNotFound);
}
-
+ DP("CFeedEngine::DBGetFeedInfoByUid END");
return feedInfo;
}
--- a/engine/src/HttpClient.cpp Tue Jul 06 03:44:46 2010 +0530
+++ b/engine/src/HttpClient.cpp Wed Jul 07 14:19:21 2010 +0100
@@ -192,12 +192,15 @@
TBool CHttpClient::GetL(const TDesC& aUrl, const TDesC& aFileName, TBool aSilent) {
DP("CHttpClient::Get START");
- DP2("Getting '%S' to '%S'", &aUrl, &aFileName);
if (iIsActive)
{
return EFalse;
}
+
+ DP1("Getting URL: %S", &aUrl);
+ DP1("Writing file: %S", &aFileName);
+
iCurrentURL.Copy(aUrl);
TInt urlError = iUriParser.Parse(iCurrentURL);
--- a/engine/src/HttpEventHandler.cpp Tue Jul 06 03:44:46 2010 +0530
+++ b/engine/src/HttpEventHandler.cpp Wed Jul 07 14:19:21 2010 +0100
@@ -114,7 +114,7 @@
TInt err = iRespBodyFile.Open(iFileServ, iParsedFileName.FullName(),EFileWrite);
if (err)
{
- DP2("There was an error opening file '%S', err=%d", &iParsedFileName.FullName(), err);
+ DP2("There was an error=%d opening file '%S'", err, &iParsedFileName.FullName());
iSavingResponseBody = EFalse;
iHttpClient->ClientRequestCompleteL(KErrInUse);
User::Leave(err);
@@ -222,7 +222,7 @@
{
DP1("<unrecognised event: %d>", aEvent.iStatus);
// close off the transaction if it's an error
- if (aEvent.iStatus < 100)
+ if (aEvent.iStatus < 0)
{
iRespBodyFile.Close();
aTransaction.Close();
@@ -242,6 +242,7 @@
void CHttpEventHandler::SetSaveFileName(const TDesC &fName, TBool aContinue)
{
+ DP1("CHttpEventHandler::SetSaveFileName, aContinue=%d", aContinue);
iFileName.Copy(fName);
iContinue = aContinue;
}
--- a/engine/src/PodcastModel.cpp Tue Jul 06 03:44:46 2010 +0530
+++ b/engine/src/PodcastModel.cpp Wed Jul 07 14:19:21 2010 +0100
@@ -31,6 +31,7 @@
#include <aknserverapp.h> // MAknServerAppExitObserver
#include <DocumentHandler.h>
+
const TInt KDefaultGranu = 5;
_LIT(KDBFileName, "podcatcher.sqlite");
_LIT(KDBTemplateFileName, "podcatcher.sqlite.template");
@@ -75,21 +76,26 @@
{
DP("CPodcastModel::ConstructL BEGIN");
User::LeaveIfError(iFsSession.Connect());
-
iCommDB = CCommsDatabase::NewL (EDatabaseTypeUnspecified);
- //iCommDB ->ShowHiddenRecords(); // magic
iIapNameArray = new (ELeave) CDesCArrayFlat(KDefaultGranu);
iSNAPNameArray = new (ELeave) CDesCArrayFlat(KDefaultGranu);
- iCmManager.OpenL();
+
iImageHandler = CImageHandler::NewL(FsSession(), *this);
iDocHandler = CDocumentHandler::NewL(CEikonEnv::Static()->Process());
- UpdateIAPListL();
- UpdateSNAPListL();
+
+ TRAPD(err,iCmManager.OpenL());
+ DP1("iCmManager.OpenL(),err=%d;", err);
+
+ if (err == KErrNone)
+ {
+ UpdateIAPListL();
+ UpdateSNAPListL();
+ }
iSettingsEngine = CSettingsEngine::NewL(*this);
iConnectionEngine = CConnectionEngine::NewL(*this);
- TRAPD(err, OpenDBL());
+ TRAP(err, OpenDBL());
if (err != KErrNone)
{
@@ -226,7 +232,7 @@
return *iConnectionEngine;
}
-EXPORT_C void CPodcastModel::PlayPausePodcastL(CShowInfo* aPodcast, TBool /*aPlayOnInit*/)
+EXPORT_C void CPodcastModel::PlayPausePodcastL(CShowInfo* aPodcast, TBool /* aPlayOnInit */)
{
DP("CPodcastModel::PlayPausePodcastL BEGIN");
TRAPD(err, LaunchFileEmbeddedL(aPodcast->FileName()));
@@ -507,3 +513,4 @@
//Handle closing the handler application
MAknServerAppExitObserver::HandleServerAppExit(aReason);
}
+
--- 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);
}
}
-