--- a/application/inc/PodcastFeedView.h Wed Jul 07 10:29:00 2010 +0100
+++ b/application/inc/PodcastFeedView.h Wed Jul 07 14:10:58 2010 +0100
@@ -113,7 +113,7 @@
private:
CPodcastModel& iPodcastModel;
- TBool iUpdatingAllRunning;
+ TBool iUpdatingRunning;
HBufC* iFeedsFormat;
HBufC* iNeverUpdated;
CPodcastFeedViewUpdater* iUpdater;
--- a/application/src/PodcastFeedView.cpp Wed Jul 07 10:29:00 2010 +0100
+++ b/application/src/PodcastFeedView.cpp Wed Jul 07 14:10:58 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
@@ -228,13 +225,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();
@@ -503,7 +501,6 @@
break;
case EPodcastUpdateAllFeeds:
{
- iUpdatingAllRunning = ETrue;
iPodcastModel.FeedEngine().UpdateAllFeedsL();
UpdateToolbar();
}break;
@@ -513,9 +510,8 @@
}break;
case EPodcastCancelUpdateAllFeeds:
{
- if(iUpdatingAllRunning)
+ if(iUpdatingRunning)
{
- iUpdatingAllRunning = EFalse;
iPodcastModel.FeedEngine().CancelUpdateAllFeeds();
}
}break;
@@ -564,10 +560,10 @@
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");
}
--- a/application/src/PodcastListView.cpp Wed Jul 07 10:29:00 2010 +0100
+++ b/application/src/PodcastListView.cpp Wed Jul 07 14:10:58 2010 +0100
@@ -380,13 +380,14 @@
void CPodcastListView::HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& /* aPenEventScreenLocation */)
{
DP("CPodcastListView::HandleLongTapEventL BEGIN");
+ iListContainer->SetLongTapDetectedL(ETrue);
+
const TInt KListboxDefaultHeight = 19; // for some reason it returns 19 for an empty listbox in S^1
TInt lbHeight = iListContainer->Listbox()->CalcHeightBasedOnNumOfItems(
iListContainer->Listbox()->Model()->NumberOfItems()) - KListboxDefaultHeight;
if(iStylusPopupMenu && aPenEventLocation.iY < lbHeight)
{
- iListContainer->SetLongTapDetectedL(ETrue);
iStylusPopupMenu->ShowMenu();
iStylusPopupMenu->SetPosition(aPenEventLocation);
}
--- a/application/src/PodcastQueueView.cpp Wed Jul 07 10:29:00 2010 +0100
+++ b/application/src/PodcastQueueView.cpp Wed Jul 07 14:10:58 2010 +0100
@@ -67,12 +67,11 @@
iPodcastModel.FeedEngine().AddObserver(this);
iPodcastModel.ShowEngine().AddObserver(this);
-
- // no popup options apply to S^1
iStylusPopupMenu = CAknStylusPopUpMenu::NewL( this , TPoint(0,0));
TResourceReader reader;
iCoeEnv->CreateResourceReaderLC(reader,R_QUEUEVIEW_POPUP_MENU);
iStylusPopupMenu->ConstructFromResourceL(reader);
+
CleanupStack::PopAndDestroy();
SetEmptyTextL(R_PODCAST_EMPTY_QUEUE);
@@ -322,30 +321,33 @@
}
void CPodcastQueueView::DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane)
-{
+ {
if(aResourceId == R_PODCAST_SHOWSVIEW_MENU)
{
aMenuPane->SetItemDimmed(EPodcastMarkAllPlayed, ETrue);
}
-}
+ }
void CPodcastQueueView::UpdateToolbar(TBool aVisible)
-{
+ {
CAknToolbar* toolbar = Toolbar();
- if (toolbar) {
+ if (toolbar)
+ {
RShowInfoArray &fItems = iPodcastModel.ActiveShowList();
TInt itemCnt = fItems.Count();
- if (iListContainer->IsVisible()) {
+ if (iListContainer->IsVisible())
+ {
toolbar->SetToolbarVisibility(aVisible);
- }
+ }
+
toolbar->HideItem(EPodcastRemoveAllDownloads, EFalse, ETrue);
toolbar->SetItemDimmed(EPodcastRemoveAllDownloads, itemCnt == 0, ETrue);
toolbar->HideItem(EPodcastSuspendDownloads,iPodcastModel.SettingsEngine().DownloadSuspended(), ETrue);
toolbar->HideItem(EPodcastResumeDownloads,!iPodcastModel.SettingsEngine().DownloadSuspended(), ETrue);
toolbar->SetItemDimmed(EPodcastRemoveDownload, itemCnt == 0, ETrue);
+ }
}
-}
void CPodcastQueueView::HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& /* aPenEventScreenLocation */)
{
--- a/application/src/PodcastSettingsView.cpp Wed Jul 07 10:29:00 2010 +0100
+++ b/application/src/PodcastSettingsView.cpp Wed Jul 07 14:10:58 2010 +0100
@@ -381,26 +381,32 @@
case EPodcastSettingShowDir:
DP("EPodcastSettingShowDir");
return new (ELeave) CAknTextSettingItem(aSettingId, iShowDir);
+ break;
case EPodcastSettingAutoUpdate:
DP("EPodcastSettingAutoUpdate");
iSettingAutoUpdate = new (ELeave) CAknEnumeratedTextPopupSettingItem(aSettingId, iAutoUpdate);
return iSettingAutoUpdate;
+ break;
case EPodcastSettingConnection:
DP("EPodcastSettingConnection");
return new (ELeave) CConnectionSetting (aSettingId, iConnection, iPodcastModel);
+ break;
case EPodcastSettingIAPList:
DP("EPodcastSettingIAPList");
iSettingIAP = new (ELeave) CIapSetting (aSettingId, iIap, iPodcastModel);
return iSettingIAP;
+ break;
case EPodcastSettingAutoDownload:
DP("EPodcastSettingAutoDownload");
iSettingAutoDownload = new (ELeave) CAknBinaryPopupSettingItem (aSettingId, iAutoDownload);
return iSettingAutoDownload;
+ break;
default:
return CAknSettingItemList::CreateSettingItemL(aSettingId);
+ break;
}
- //DP("CreateSettingItemL END");
- //return NULL;
+ DP("CreateSettingItemL END");
+ return NULL;
}
TFileName iShowDir;
--- a/application/src/PodcastShowsView.cpp Wed Jul 07 10:29:00 2010 +0100
+++ b/application/src/PodcastShowsView.cpp Wed Jul 07 14:10:58 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
--- a/engine/inc/ConnectionEngine.h Wed Jul 07 10:29:00 2010 +0100
+++ b/engine/inc/ConnectionEngine.h Wed Jul 07 14:10:58 2010 +0100
@@ -69,6 +69,7 @@
TConnectionState ConnectionState();
IMPORT_C void AddObserver(MConnectionObserver* aObserver);
RSocketServ& SockServ();
+ void Stop();
private: // Methods
CConnectionEngine(CPodcastModel& aPodcastModel);
void ConstructL();
--- a/engine/src/ConnectionEngine.cpp Wed Jul 07 10:29:00 2010 +0100
+++ b/engine/src/ConnectionEngine.cpp Wed Jul 07 14:10:58 2010 +0100
@@ -208,6 +208,14 @@
iConnectionState = CConnectionEngine::EConnecting;
}
+void CConnectionEngine::Stop()
+ {
+ DP("CConnectionEngine::Stop");
+ iConnection.Stop();
+ iConnectionState = CConnectionEngine::ENotConnected;
+ }
+
+
RConnection& CConnectionEngine::Connection()
{
return iConnection;
--- a/engine/src/HttpEventHandler.cpp Wed Jul 07 10:29:00 2010 +0100
+++ b/engine/src/HttpEventHandler.cpp Wed Jul 07 14:10:58 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);
@@ -242,6 +242,7 @@
void CHttpEventHandler::SetSaveFileName(const TDesC &fName, TBool aContinue)
{
+ DP1("CHttpEventHandler::SetSaveFileName, aContinue=%d", aContinue);
iFileName.Copy(fName);
iContinue = aContinue;
}