Merge from Teknologs branch
authorLars Persson <lars.persson@embeddev.se>
Thu, 01 Apr 2010 11:41:33 +0200
changeset 99 41d00e97e2f7
parent 98 523e04129df6 (current diff)
parent 96 a8538f50e2ba (diff)
child 100 e0fc52a5df4d
Merge from Teknologs branch
application/inc/PodcastFeedView.h
application/src/PodcastAppui.cpp
engine/src/FeedEngine.cpp
test.txt
--- a/application/data/PodcastClient_english.rls	Thu Apr 01 11:39:23 2010 +0200
+++ b/application/data/PodcastClient_english.rls	Thu Apr 01 11:41:33 2010 +0200
@@ -38,8 +38,8 @@
 rls_string STRING_r_tabgroup_queue_counter "Queue (%d)"
 
 // Question dialogs
-rls_string STRING_r_add_feed_prompt "Enter search terms or feed URL"
-rls_string STRING_r_edit_feed_prompt "Feed URL"
+rls_string STRING_r_add_feed_prompt "Enter search terms or feed address"
+rls_string STRING_r_edit_feed_prompt "Feed address"
 rls_string STRING_r_add_feed_title_prompt "Feed title"
 rls_string STRING_r_remove_feed_prompt "Remove feed '%S'?"
 rls_string STRING_r_enable_downloads_prompt "There are shows in the download queue. Do you want to download now?"
@@ -58,6 +58,9 @@
 rls_string STRING_r_podcast_setting_alwaysask "Always ask"
 rls_string STRING_r_podcast_setting_useiap "Select access point"
 rls_string STRING_r_podcast_setting_iaplist "Access points"
+rls_string STRING_r_on "On"
+rls_string STRING_r_off "Off"
+
 
 // Choicelist for autodownload
 rls_string STRING_podcast_autoupdate_option1 "Off"
@@ -66,6 +69,10 @@
 rls_string STRING_podcast_autoupdate_option4 "Twice a day"
 rls_string STRING_podcast_autoupdate_option5 "Daily"
 
+// Auto download settings
+rls_string STRING_r_on "On"
+rls_string STRING_r_off "Off"
+
 // Feed import/export
 rls_string STRING_r_view_import_feeds_title "Select OPML file"
 rls_string STRING_r_enter_filename "Enter file name"
@@ -110,7 +117,7 @@
 rls_string STRING_add_feed_success "Feed added. Update now?"
 rls_string STRING_add_feed_error "Could not add feed"
 rls_string STRING_r_add_feed_replace "All existing shows in this feed will be deleted! Continue?" // shown when changing an existing feed URL
-rls_string STRING_r_add_feed_exists "A feed with this URL already exists" // shown when adding or changing a feed to a URL that already exists
+rls_string STRING_r_add_feed_exists "A feed with this address already exists" // shown when adding or changing a feed to a URL that already exists
 
 // Feed searching
 
@@ -132,6 +139,7 @@
 rls_string STRING_r_view_stop_downloads_cmd "Suspend downloading"
 rls_string STRING_r_view_resume_downloads_cmd "Resume downloading"
 rls_string STRING_r_view_remove_all_downloads_cmd_short "Clear"
+rls_string STRING_r_view_remove_all_downloads_cmd "Clear download queue"
 rls_string STRING_r_clear_query "Clear download queue?"
 rls_string STRING_r_view_remove_download_short_cmd "Remove"
-rls_string STRING_r_view_remove_download_cmd "Remove Download"
+rls_string STRING_r_view_remove_download_cmd "Remove download"
--- a/application/data/PodcastQueueView.ra	Thu Apr 01 11:39:23 2010 +0200
+++ b/application/data/PodcastQueueView.ra	Thu Apr 01 11:41:33 2010 +0200
@@ -140,11 +140,6 @@
 	{
 		items =
 		{
-	/*		STYLUS_POPUP_MENU_ITEM
-				{
-					txt = STRING_r_view_show_info_cmd;
-					command = EPodcastShowInfo;
-				},*/
 			STYLUS_POPUP_MENU_ITEM
 				{
 					txt = STRING_r_view_remove_download_short_cmd;
--- a/application/data/PodcastShowsView.ra	Thu Apr 01 11:39:23 2010 +0200
+++ b/application/data/PodcastShowsView.ra	Thu Apr 01 11:41:33 2010 +0200
@@ -98,9 +98,10 @@
                            }  
                         };
                     };
-                }
-#ifdef SYMBIAN1_UI
-            ,TBAR_CTRL
+                },
+// we keep the download toolbar button in S^3, but always disable it
+// because there are drawing issues with only one item in the toolbar
+            TBAR_CTRL
 			{
 			type = EAknCtButton;
 			id = EPodcastDownloadShow;
@@ -117,7 +118,9 @@
 						}  
 					};
 				};
-			},		
+			}
+#ifdef SYMBIAN1_UI                
+        ,		
 		TBAR_CTRL
 			{
 			type = EAknCtButton;
--- a/application/data/PodcastStrings.ra	Thu Apr 01 11:39:23 2010 +0200
+++ b/application/data/PodcastStrings.ra	Thu Apr 01 11:41:33 2010 +0200
@@ -16,22 +16,10 @@
 *
 */
 
-RESOURCE TBUF r_podcast_main_player_cmd{buf = STRING_r_view_player_cmd;}
-RESOURCE TBUF r_podcast_show_cmd{buf = STRING_r_view_show_cmd;}
-RESOURCE TBUF r_podcast_update_cmd{buf = STRING_r_update_feeds_cmd;}
 RESOURCE TBUF r_podcast_update_all_cmd{buf = STRING_r_update_all_feeds_cmd;}
-RESOURCE TBUF r_podcast_view_cmd {buf = STRING_r_view_cmd;}
-RESOURCE TBUF r_podcast_remove_feed_title {buf = STRING_r_remove_feed_title;}
 RESOURCE TBUF r_podcast_remove_feed_prompt {buf = STRING_r_remove_feed_prompt;}
-RESOURCE TBUF r_podcast_update_new_feed_title {buf = STRING_r_update_new_feed_title;}
 RESOURCE TBUF r_podcast_update_new_feed_prompt {buf = STRING_r_update_new_feed_prompt;}
-RESOURCE TBUF r_podcast_delete_played_title {buf = STRING_r_delete_played_title;}
-RESOURCE TBUF r_podcast_delete_played_prompt {buf = STRING_r_delete_played_prompt;}
-RESOURCE TBUF r_podcast_delete_show_title {buf = STRING_r_delete_show_title;}
 RESOURCE TBUF r_podcast_delete_show_prompt {buf = STRING_r_delete_show_prompt;}
-RESOURCE TBUF r_podcast_remove_chapter_title {buf = STRING_r_remove_chapter_title;}
-RESOURCE TBUF r_podcast_remove_chapter_prompt {buf = STRING_r_remove_chapter_prompt;}
-RESOURCE TBUF r_podcast_enable_downloads_title {buf = STRING_r_enable_downloads_title;}
 RESOURCE TBUF r_podcast_enable_downloads_prompt {buf = STRING_r_enable_downloads_prompt;}
 RESOURCE TBUF r_podcast_feeds_title_format {buf = STRING_r_podcast_feeds_title_format;}
 RESOURCE TBUF r_podcast_feeds_status_format {buf = STRING_r_podcast_feeds_status_format;}
@@ -47,30 +35,19 @@
 RESOURCE TBUF r_podcast_feeds_never_updated {buf = STRING_r_podcast_shows_never_updated;}
 RESOURCE TBUF r_podcast_feeds_is_updating {buf = STRING_r_podcast_feeds_is_updating;}
 RESOURCE TBUF r_podcast_feeds_no_feeds {buf = STRING_r_podcast_no_feeds;}
-RESOURCE TBUF r_podcast_import_feeds_title {buf = STRING_r_view_import_feeds_title;}
-RESOURCE TBUF r_podcast_export_feeds_title {buf = STRING_r_view_export_feeds_title;}
 RESOURCE TBUF r_podcast_export_feeds_softkey {buf = STRING_r_view_export_feeds_softkey;}
 RESOURCE TBUF r_podcast_pending_status_active {buf = STRING_r_podcast_shows_title_download;}
 RESOURCE TBUF r_podcast_pending_status_suspended {buf = STRING_r_podcast_shows_downloads_suspended;}
 RESOURCE TBUF r_podcast_feeds_status {buf = STRING_r_view_feeds_status;}
 RESOURCE TBUF r_add_feed_exists {buf = STRING_r_add_feed_exists;}
-RESOURCE TBUF r_add_feed_exists_title {buf = STRING_r_add_feed_exists_title;}
 RESOURCE TBUF r_add_feed_replace {buf = STRING_r_add_feed_replace;}
-RESOURCE TBUF r_add_feed_replace_title {buf = STRING_r_add_feed_replace_title;}
-RESOURCE TBUF r_catchup_feed {buf = STRING_r_catchup_feed;}
-RESOURCE TBUF r_catchup_feed_title {buf = STRING_r_catchup_feed_title;}
 RESOURCE TBUF r_remove_all_dlg {buf = STRING_r_remove_all_dlg;}
-RESOURCE TBUF r_question_title {buf = STRING_r_question_title;}
 RESOURCE TBUF r_podcast_addfeed_prompt {buf = STRING_r_add_feed_prompt;}
 RESOURCE TBUF r_podcast_addfeed_title_prompt {buf = STRING_r_add_feed_title_prompt;}
 RESOURCE TBUF r_tabgroup_feeds {buf = STRING_r_tabgroup_feeds;}
 RESOURCE TBUF r_tabgroup_queue {buf = STRING_r_tabgroup_queue;}
 RESOURCE TBUF r_tabgroup_queue_counter {buf = STRING_r_tabgroup_queue_counter;}
-RESOURCE TBUF r_tabgroup_search {buf = STRING_r_search;}
-RESOURCE TBUF r_tabgroup_shows {buf = STRING_r_tabgroup_shows;}
-RESOURCE TBUF r_search_prompt {buf = STRING_r_search_title;}
 RESOURCE TBUF r_podcast_no_search_results {buf = STRING_r_podcast_empty_list;}
-RESOURCE TBUF r_add_feed_title {buf=STRING_add_feed_title;}
 RESOURCE TBUF r_add_feed_query {buf=STRING_add_feed_query;}
 RESOURCE TBUF r_add_feed_success {buf=STRING_add_feed_success;}
 RESOURCE TBUF r_add_feed_failure {buf=STRING_add_feed_error;}
--- a/application/inc/PodcastAppui.h	Thu Apr 01 11:39:23 2010 +0200
+++ b/application/inc/PodcastAppui.h	Thu Apr 01 11:41:33 2010 +0200
@@ -58,7 +58,7 @@
 class MTimeoutObserver
 {
 public:
-    virtual void HandleTimeout(const CTimeout& aId, TInt aError)=0;
+    virtual void HandleTimeoutL(const CTimeout& aId, TInt aError)=0;
 protected:
     virtual ~MTimeoutObserver() {}
 };
@@ -99,7 +99,7 @@
     void RunL()
     	{
     	    TInt r=iStatus.Int();
-    	    iObserver.HandleTimeout(*this, r);
+    	    iObserver.HandleTimeoutL(*this, r);
     	}
 
 protected:
@@ -115,9 +115,9 @@
        ~CPodcastAppUi();
 
        void SetActiveTab(TInt aIndex);
-       void UpdateQueueTab(TInt aQueueLength);
-       void TabLeft();
-       void TabRight();
+       void UpdateQueueTabL(TInt aQueueLength);
+       void TabLeftL();
+       void TabRightL();
        void NaviSetTextL(TInt aResourceId);
        void NaviShowTabGroupL();
        
@@ -128,7 +128,7 @@
         CArrayFix<TCoeHelpContext>* HelpContextL() const;
         void HandleCommandL(TInt aCommand);
     protected:
-    	void HandleTimeout(const CTimeout& aId, TInt aError);
+    	void HandleTimeoutL(const CTimeout& aId, TInt aError);
 
     protected:
     	// from MConnectionObserver
--- a/application/inc/PodcastFeedView.h	Thu Apr 01 11:39:23 2010 +0200
+++ b/application/inc/PodcastFeedView.h	Thu Apr 01 11:41:33 2010 +0200
@@ -39,9 +39,10 @@
         static CPodcastFeedView* NewLC(CPodcastModel& aPodcastModel);
         ~CPodcastFeedView();
         void UpdateItemL(TInt aIndex);
-		void CheckResumeDownload();
+		void CheckResumeDownloadL();
 		void UpdateToolbar(TBool aVisible=ETrue);
-
+		TBool ViewingShows();
+		
 	protected:
 	    void ConstructL();
 		CPodcastFeedView(CPodcastModel& aPodcastModel);
--- a/application/inc/PodcastListView.h	Thu Apr 01 11:39:23 2010 +0200
+++ b/application/inc/PodcastListView.h	Thu Apr 01 11:41:33 2010 +0200
@@ -63,7 +63,7 @@
 		void ScrollToVisible();
     	void Draw(const TRect& aRect) const;
     	
-    	void SetLongTapDetected(TBool aLongTapDetected);
+    	void SetLongTapDetectedL(TBool aLongTapDetected);
 
     	CEikFormattedCellListBox * iListbox;		
 
@@ -87,7 +87,8 @@
     public: 
         ~CPodcastListView();
 		virtual void UpdateToolbar(TBool aVisible=ETrue) = 0;
-
+		TBool IsVisible();
+		
 	protected:
 	    void ConstructL();
 		CPodcastListView();	
@@ -133,9 +134,9 @@
 		
         void RunAboutDialogL();
         void SetEmptyTextL(TInt aResourceId);
-        void ShowOkMessage(TDesC &aText);
-        void ShowErrorMessage(TDesC &aText);
-        TInt ShowQueryMessage(TDesC &aText);
+        void ShowOkMessageL(TDesC &aText);
+        void ShowErrorMessageL(TDesC &aText);
+        TInt ShowQueryMessageL(TDesC &aText);
 		void CloseToolbarExtension();
 		void ShowWaitDialogL(TDesC &aWaitText);
 		void CloseWaitDialog();
--- a/application/inc/PodcastShowsView.h	Thu Apr 01 11:39:23 2010 +0200
+++ b/application/inc/PodcastShowsView.h	Thu Apr 01 11:41:33 2010 +0200
@@ -29,12 +29,9 @@
 #include "PodcastModel.h"
 #include "Podcast.hrh"
 #include "PodcastListView.h"
-#include "Imagehandler.h"
-
-class CImageHandler;
 
 class CPodcastShowsView : public CPodcastListView, public MEikListBoxObserver, 
-	public MFeedEngineObserver, public MShowEngineObserver, public MImageHandlerCallback
+	public MFeedEngineObserver, public MShowEngineObserver
 	{
 public: 
 	static CPodcastShowsView* NewL(CPodcastModel& aPodcastModel);
@@ -104,12 +101,9 @@
 private:
 	void GetShowIcons(CShowInfo* aShowInfo, TInt& aIconIndex);
 	void DisplayShowInfoDialogL();
-	/*
-	 * Called by CImageHandler when an image has been loaded.
-	 * @param aError Error code given by the CImageHandler or 0 (zero) if the
-	 *   image was loaded successfully.
-	 */
-	virtual void ImageOperationCompleteL(TInt aError, TUint aHandle, CPodcastModel& aPodcastModel);
+	void HandleSetShowPlayedL(TBool aPlayed);
+	void HandleDeleteShowL();
+	void ImageOperationCompleteL(TInt aError, TUint aHandle, CPodcastModel& aPodcastModel) {}
 	void HandleSetShowPlayed(TBool aPlayed);
 	void HandleDeleteShow();
 	void UpdateViewTitleL();
Binary file application/sis/podcatcher_udeb.sis has changed
Binary file application/sis/podcatcher_udeb_signed.sis has changed
Binary file application/sis/podcatcher_urel.sis has changed
Binary file application/sis/podcatcher_urel_signed.sis has changed
--- a/application/src/PodcastAppui.cpp	Thu Apr 01 11:39:23 2010 +0200
+++ b/application/src/PodcastAppui.cpp	Thu Apr 01 11:41:33 2010 +0200
@@ -133,9 +133,8 @@
 			break;
         	}
 	case EPodcastHelp:
-        	{
-        	CArrayFix<TCoeHelpContext>* buf = CPodcastAppUi::AppHelpContextL();		
-        	HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), buf);
+        	{	
+        	HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), HelpContextL());
         	}
         	break;      	
         default:
@@ -148,11 +147,15 @@
     CArrayFixFlat<TCoeHelpContext>* array = 
                 new(ELeave)CArrayFixFlat<TCoeHelpContext>(1);
     CleanupStack::PushL(array);
-    // todo: view detection doesn't seem to work
-    if (ViewShown(KUidPodcastSearchViewID)) {
+    
+    if (iFeedView->IsVisible()) {
+		array->AppendL(TCoeHelpContext(KUidPodcast,KContextFeedsView));
+    } else if (iShowsView->IsVisible()) {
+		array->AppendL(TCoeHelpContext(KUidPodcast,KContextShowsView));
+    } else if (iQueueView->IsVisible()) {
+		array->AppendL(TCoeHelpContext(KUidPodcast,KContextDownloadQueue));
+    } else {
 		array->AppendL(TCoeHelpContext(KUidPodcast,KContextSettings));
-    } else {
-		array->AppendL(TCoeHelpContext(KUidPodcast,KContextApplication));
     }
 	
     CleanupStack::Pop(array);
@@ -202,7 +205,7 @@
 	iNaviPane->PushL(*iNaviTabGroup);
 	iNaviStyle = ENaviTabGroup;
 
-	UpdateQueueTab(iPodcastModel->ShowEngine().GetNumDownloadingShows());
+	UpdateQueueTabL(iPodcastModel->ShowEngine().GetNumDownloadingShows());
 	}
 
 void CPodcastAppUi::TabChangedL (TInt aIndex)
@@ -213,14 +216,25 @@
 		{
 		TUid newview = TUid::Uid(0);
 		TUid messageUid = TUid::Uid(0);
-		
-		if (aIndex == KTabIdFeeds) {
-			newview = KUidPodcastFeedViewID;
-		} else if (aIndex == KTabIdQueue) {
+		if (aIndex == KTabIdFeeds) 
+			{
+			if (iFeedView->ViewingShows())
+				{
+				newview = KUidPodcastShowsViewID;
+				}
+			else
+				{
+				newview = KUidPodcastFeedViewID;
+				}
+			} 
+		else if (aIndex == KTabIdQueue)
+			{
 			newview = KUidPodcastQueueViewID;
-		} else {
+			} 
+		else 
+			{
 			User::Leave(KErrTooBig);
-		}
+			}
 		
 		if(newview.iUid != 0)
 			{			
@@ -236,12 +250,12 @@
 		}
 }
 
-void CPodcastAppUi::HandleTimeout(const CTimeout& /*aId*/, TInt /*aError*/)
+void CPodcastAppUi::HandleTimeoutL(const CTimeout& /*aId*/, TInt /*aError*/)
 	{
-	iFeedView->CheckResumeDownload();
+	iFeedView->CheckResumeDownloadL();
 	}
 
-void CPodcastAppUi::UpdateQueueTab(TInt aQueueLength)
+void CPodcastAppUi::UpdateQueueTabL(TInt aQueueLength)
 	{
 	if (iNaviStyle == ENaviTabGroup)
 		{
@@ -264,7 +278,7 @@
 		}
 	}
 
-void CPodcastAppUi::TabLeft()
+void CPodcastAppUi::TabLeftL()
 	{
 	if (iNaviStyle == ENaviTabGroup) 
 		{
@@ -277,7 +291,7 @@
 		}
 	}
 
-void CPodcastAppUi::TabRight()
+void CPodcastAppUi::TabRightL()
 	{
 	if (iNaviStyle == ENaviTabGroup) 
 		{
--- a/application/src/PodcastFeedView.cpp	Thu Apr 01 11:39:23 2010 +0200
+++ b/application/src/PodcastFeedView.cpp	Thu Apr 01 11:41:33 2010 +0200
@@ -175,27 +175,19 @@
 	                                  const TDesC8& aCustomMessage)
 	{
 	CPodcastListView::DoActivateL(aPrevViewId, aCustomMessageId, aCustomMessage);
-
+	
 	if (aPrevViewId.iViewUid == KUidPodcastShowsViewID)
 		{
 		// back key from shows view
 		iViewingShows = EFalse;
 		}
 	
-	if (iViewingShows)
-		{
-		// go to shows view
-		AppUi()->ActivateLocalViewL(KUidPodcastShowsViewID,  TUid::Uid(0), KNullDesC8());
-		} 
-	else 
-		{
 		UpdateListboxItemsL();		
 		UpdateToolbar();
 
-		if (iFirstActivateAfterLaunch)
-			{
-			iFirstActivateAfterLaunch = EFalse;
-			}
+	if (iFirstActivateAfterLaunch)
+		{
+		iFirstActivateAfterLaunch = EFalse;
 		}
 	}
 
@@ -216,11 +208,9 @@
 			DP("PEN DOWN");
 			break;
 			
-//#ifndef SYMBIAN1_UI
+#ifndef SYMBIAN1_UI
 	case EEventItemClicked:
-		DP("SINGLE TAP");
-		break;
-//#endif
+#endif
 	case EEventEnterKeyPressed:
 	case EEventItemDoubleClicked:
 	case EEventItemActioned:
@@ -269,7 +259,7 @@
 				{
 				TBuf<KMaxMessageLength> message;
 				iEikonEnv->ReadResourceL(message, R_PODCAST_CONNECTION_ERROR);
-				ShowErrorMessage(message);
+				ShowErrorMessageL(message);
 				}
 			}
 			break;
@@ -545,7 +535,7 @@
 				{
 				TBuf<KMaxMessageLength> message;
 				iEikonEnv->ReadResourceL(message, R_EXIT_SHOWS_DOWNLOADING);
-				if(ShowQueryMessage(message))
+				if(ShowQueryMessageL(message))
 					{
 					// pass it on to AppUi, which will exit for us
 					CPodcastListView::HandleCommandL(aCommand);
@@ -563,7 +553,7 @@
 			break;
 		}
 	
-	iListContainer->SetLongTapDetected(EFalse); // in case we got here by long tapping
+	iListContainer->SetLongTapDetectedL(EFalse); // in case we got here by long tapping
 	UpdateToolbar();
 	}
 
@@ -624,7 +614,7 @@
 				// ask if users wants to update it now
 				TBuf<KMaxMessageLength> message;
 				iEikonEnv->ReadResourceL(message, R_ADD_FEED_SUCCESS);
-				if(ShowQueryMessage(message))
+				if(ShowQueryMessageL(message))
 					{
 					CFeedInfo *info = iPodcastModel.FeedEngine().GetFeedInfoByUid(newFeedInfo->Uid());
 					
@@ -638,7 +628,7 @@
 				{
 				TBuf<KMaxMessageLength> message;
 				iEikonEnv->ReadResourceL(message, R_ADD_FEED_EXISTS);
-				ShowErrorMessage(message);
+				ShowErrorMessageL(message);
 				}		
 			
 			CleanupStack::PopAndDestroy(newFeedInfo);
@@ -669,7 +659,7 @@
 				iEikonEnv->ReadResourceL(dlgMessage, R_ADD_FEED_REPLACE);
 
 				// Ask the user if it is OK to remove all shows
-				if ( ShowQueryMessage(dlgMessage))
+				if ( ShowQueryMessageL(dlgMessage))
 					{
 					PodcastUtils::FixProtocolsL(url);
 					
@@ -696,7 +686,7 @@
 						// the feed existed. Object deleted in AddFeed.	
 						TBuf<KMaxMessageLength> dlgMessage;
 						iEikonEnv->ReadResourceL(dlgMessage, R_ADD_FEED_EXISTS);
-						ShowErrorMessage(dlgMessage);
+						ShowErrorMessageL(dlgMessage);
 					}
 					CleanupStack::PopAndDestroy(temp);
 				}
@@ -706,7 +696,7 @@
 				{
 					info->SetTitleL(title);
 					info->SetCustomTitle();	
-					iPodcastModel.FeedEngine().UpdateFeed(info);
+					iPodcastModel.FeedEngine().UpdateFeedL(info);
 					UpdateListboxItemsL();
 				}
 			}
@@ -727,7 +717,7 @@
 			TBuf<KMaxMessageLength> message;
 			iEikonEnv->ReadResourceL(templ, R_PODCAST_REMOVE_FEED_PROMPT);
 			message.Format(templ, &info->Title());					
-			if(ShowQueryMessage(message))
+			if(ShowQueryMessageL(message))
 				{
 				iPodcastModel.FeedEngine().RemoveFeedL(iItemIdArray[index]);
 				iItemArray->Delete(index);
@@ -791,7 +781,7 @@
 				if (err != KErrNone) {
 					TBuf<KMaxMessageLength> message;
 					iEikonEnv->ReadResourceL(message, R_IMPORT_FEED_FAILURE);
-					ShowErrorMessage(message);
+					ShowErrorMessageL(message);
 					}
 				}
 				
@@ -847,13 +837,13 @@
 					TBuf<KMaxMessageLength> templ;
 					iEikonEnv->ReadResourceL(templ, R_EXPORT_FEED_SUCCESS);
 					message.Format(templ, numFeeds);
-					ShowOkMessage(message);
+					ShowOkMessageL(message);
 					} 
 				else 
 					{
 					TBuf<KMaxMessageLength> message;
 					iEikonEnv->ReadResourceL(message, R_EXPORT_FEED_FAILURE);
-					ShowErrorMessage(message);
+					ShowErrorMessageL(message);
 					}
 				}
 			CleanupStack::PopAndDestroy(fileDlg);
@@ -863,7 +853,7 @@
 	CleanupStack::PopAndDestroy(memDlg);									
 	}
 
-void CPodcastFeedView::CheckResumeDownload()
+void CPodcastFeedView::CheckResumeDownloadL()
 	{
 	// if there are shows queued for downloading, ask if we should resume now
 	RShowInfoArray showsDownloading;
@@ -874,7 +864,7 @@
 		TBuf<KMaxMessageLength> msg;
 		iEikonEnv->ReadResourceL(msg, R_PODCAST_ENABLE_DOWNLOADS_PROMPT);
 	
-		if (ShowQueryMessage(msg))
+		if (ShowQueryMessageL(msg))
 			{
 			// need to suspend downloads before ResumeDownloadL will work :)
 			iPodcastModel.SettingsEngine().SetDownloadSuspended(ETrue);
@@ -902,7 +892,7 @@
 			{
 			TBuf<KMaxMessageLength> message;
 			iEikonEnv->ReadResourceL(message, R_PODCAST_CONNECTION_ERROR);
-			ShowErrorMessage(message);
+			ShowErrorMessageL(message);
 			}
 			break;
 		case KErrNone: 
@@ -922,7 +912,7 @@
 				iEikonEnv->ReadResourceL(templ, R_IMPORT_FEED_SUCCESS);
 				message.Format(templ, aNumFeedsImported);
 				
-				if(ShowQueryMessage(message))
+				if(ShowQueryMessageL(message))
 					{
 					HandleCommandL(EPodcastUpdateAllFeeds);
 					}
@@ -930,11 +920,12 @@
 				break;
 			case EOpmlSearching:
 				delete iWaitDialog;
+				iWaitDialog = NULL;
 				if (iPodcastModel.FeedEngine().GetSearchResults().Count() == 0)
 					{
 					TBuf<KMaxMessageLength> message;
 					iEikonEnv->ReadResourceL(message, R_SEARCH_NORESULTS);
-					ShowErrorMessage(message);
+					ShowErrorMessageL(message);
 					}
 				else
 					{
@@ -968,7 +959,7 @@
 		return; // we don't allow feed manipulation while update is running
 	}
 
-	iListContainer->SetLongTapDetected(ETrue);
+	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(
@@ -981,3 +972,8 @@
     }
 	DP("CPodcastListView::HandleLongTapEventL END");
 }
+
+TBool CPodcastFeedView::ViewingShows()
+	{
+	return iViewingShows;
+	}
--- a/application/src/PodcastListView.cpp	Thu Apr 01 11:39:23 2010 +0200
+++ b/application/src/PodcastListView.cpp	Thu Apr 01 11:41:33 2010 +0200
@@ -29,6 +29,7 @@
 #include <akntoolbarextension.h>
 #include <aknquerydialog.h>
 #include <barsread.h>
+#include <akntitle.h>
 
 const TInt KDefaultGran = 5;
 
@@ -100,7 +101,7 @@
         }
     }
 
-void CPodcastListContainer::SetLongTapDetected(TBool aLongTapDetected)
+void CPodcastListContainer::SetLongTapDetectedL(TBool aLongTapDetected)
 	{
 	iLongTapDetected = aLongTapDetected;
 	
@@ -262,6 +263,11 @@
 		AppUi()->AddToStackL(*this, iListContainer);
 		iListContainer->MakeVisible(ETrue);
 	}
+	
+	CAknTitlePane* titlePane = static_cast<CAknTitlePane*>
+		      ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
+	titlePane->SetTextToDefaultL();
+
 	DP("CPodcastListView::DoActivateL() END");
 
 }
@@ -296,10 +302,9 @@
 	case EAknSoftkeyBack:
 		{
 		AppUi()->ActivateViewL(iPreviousView);
-		if (iPreviousView.iViewUid == KUidPodcastFeedViewID) {
-			((CPodcastAppUi*)AppUi())->SetActiveTab(KTabIdFeeds);
+		((CPodcastAppUi*)AppUi())->SetActiveTab(KTabIdFeeds);
 		}
-		}break;
+		break;
 	case EPodcastSettings:
 		AppUi()->ActivateLocalViewL(KUidPodcastSettingsViewID);
 		break;
@@ -311,6 +316,10 @@
 	}
 }
 
+TBool CPodcastListView::IsVisible()
+	{
+	return iListContainer->IsVisible();
+	}
 
 void CPodcastListView::RunAboutDialogL()
 {
@@ -325,7 +334,7 @@
 	CleanupStack::PopAndDestroy(emptyText);	
 	}
 
-void CPodcastListView::ShowOkMessage(TDesC &aText)
+void CPodcastListView::ShowOkMessageL(TDesC &aText)
 	{
 	CAknNoteDialog* dlg= new(ELeave) CAknNoteDialog();
 	CleanupStack::PushL(dlg);
@@ -334,7 +343,7 @@
 	dlg->ExecuteLD(R_MESSAGEDLG_OK);
 	}
 
-void CPodcastListView::ShowErrorMessage(TDesC &aText)
+void CPodcastListView::ShowErrorMessageL(TDesC &aText)
 	{
 	CAknNoteDialog* dlg= new(ELeave) CAknNoteDialog();
 	CleanupStack::PushL(dlg);
@@ -343,7 +352,7 @@
 	dlg->ExecuteLD(R_ERRORDLG_OK);
 	}
 
-TInt CPodcastListView::ShowQueryMessage(TDesC &aText)
+TInt CPodcastListView::ShowQueryMessageL(TDesC &aText)
 	{
 	CAknQueryDialog* dlg= new(ELeave) CAknQueryDialog();
 	
@@ -375,16 +384,17 @@
 void CPodcastListView::HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& /* aPenEventScreenLocation */)
 {
 	DP("CPodcastListView::HandleLongTapEventL BEGIN");
-	iListContainer->SetLongTapDetected(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);
     }
+    
 	DP("CPodcastListView::HandleLongTapEventL END");
 }
 
@@ -421,10 +431,10 @@
 		switch (aKeyEvent.iCode)
 			{
 			case EKeyRightArrow:
-				((CPodcastAppUi*)AppUi())->TabRight();
+				((CPodcastAppUi*)AppUi())->TabRightL();
 				return EKeyWasConsumed;
 			case EKeyLeftArrow:
-				((CPodcastAppUi*)AppUi())->TabLeft();
+				((CPodcastAppUi*)AppUi())->TabLeftL();
 				return EKeyWasConsumed;
 			}
 		}
--- a/application/src/PodcastQueueView.cpp	Thu Apr 01 11:39:23 2010 +0200
+++ b/application/src/PodcastQueueView.cpp	Thu Apr 01 11:41:33 2010 +0200
@@ -25,7 +25,6 @@
 #include "imagehandler.h"
 #include "PodcastShowsView.h"
 
-#include <akntitle.h>
 #include <podcast.rsg>
 #include <podcast.mbg>
 #include <gulicon.h>
@@ -127,12 +126,15 @@
 	
 	iPodcastModel.FeedEngine().AddObserver(this);
 	iPodcastModel.ShowEngine().AddObserver(this);
-	
+
+	// no popup options apply to S^1
+#ifndef SYMBIAN1_UI
 	iStylusPopupMenu = CAknStylusPopUpMenu::NewL( this , TPoint(0,0));
 	TResourceReader reader;
 	iCoeEnv->CreateResourceReaderLC(reader,R_QUEUEVIEW_POPUP_MENU);
 	iStylusPopupMenu->ConstructFromResourceL(reader);
 	CleanupStack::PopAndDestroy();
+#endif
 	SetEmptyTextL(R_PODCAST_EMPTY_QUEUE);
 	}
 
@@ -200,7 +202,7 @@
 	DP("CPodcastQueueView::DoActivateL BEGIN");
 	
 	CPodcastListView::DoActivateL(aPrevViewId, aCustomMessageId, aCustomMessage);
-	iPreviousView = TVwsViewId(KUidPodcast, KUidPodcastFeedViewID);
+	iPreviousView = aPrevViewId;
 	
 	UpdateFeedUpdateStateL();
 	UpdateToolbar();
@@ -249,7 +251,7 @@
 				{
 				TBuf<KMaxMessageLength> message;
 				iEikonEnv->ReadResourceL(message, R_PODCAST_CONNECTION_ERROR);
-				ShowErrorMessage(message);
+				ShowErrorMessageL(message);
 				}
 				break;
 			default: // Do nothing
@@ -388,20 +390,11 @@
 		aShowInfo.PubDate().FormatL(showDate, KDateFormatShort());
 		}
 
-	if(aShowInfo.LastError() != KErrNone)
-		{
-		TBuf<KSizeBufLen> errorBuffer;
-		iEikonEnv->GetErrorText(errorBuffer, aShowInfo.LastError());
-		iListboxFormatbuffer.Format(KShowErrorFormat(), iconIndex, &aShowInfo.Title(), &errorBuffer);
-		}
-	else	
-		{
-		if (infoSize.Length() > 0) {
-			infoSize.Insert(0,_L(", "));
-		}
-		
-		iListboxFormatbuffer.Format(KShowQueueFormat(), iconIndex, &aShowInfo.Title(), &showDate, &infoSize);
-		}
+	if (infoSize.Length() > 0) {
+		infoSize.Insert(0,_L(", "));
+	}
+	
+	iListboxFormatbuffer.Format(KShowQueueFormat(), iconIndex, &aShowInfo.Title(), &showDate, &infoSize);
 	}
 
 void CPodcastQueueView::UpdateShowItemDataL(CShowInfo* aShowInfo,TInt aIndex, TInt aSizeDownloaded)
@@ -517,9 +510,9 @@
 			TBuf<KMaxMessageLength> msg;
 			iEikonEnv->ReadResourceL(msg, R_CLEAR_QUERY);
 												
-			if(ShowQueryMessage(msg))
+			if(ShowQueryMessageL(msg))
 				{
-				iPodcastModel.ShowEngine().RemoveAllDownloads();
+				iPodcastModel.ShowEngine().RemoveAllDownloadsL();
 				UpdateListboxItemsL();
 				}
 			}
@@ -559,6 +552,7 @@
 			CPodcastListView::HandleCommandL(aCommand);
 			break;
 		}
+	iListContainer->SetLongTapDetectedL(EFalse); // in case we got here by long tapping
 	UpdateToolbar();
 	}
 	
--- a/application/src/PodcastSearchView.cpp	Thu Apr 01 11:39:23 2010 +0200
+++ b/application/src/PodcastSearchView.cpp	Thu Apr 01 11:41:33 2010 +0200
@@ -37,7 +37,6 @@
 #include <pathinfo.h> 
 #include <f32file.h>
 #include <akntoolbarextension.h>
-#include <akntitle.h>
 
 const TInt KMaxFeedNameLength = 100;
 const TInt KDefaultGran = 5;
@@ -128,23 +127,18 @@
 	                                  TUid aCustomMessageId,
 	                                  const TDesC8& aCustomMessage)
 {
-	UpdateToolbar();
-	
-	 CAknTitlePane* titlePane = static_cast<CAknTitlePane*>
-		      ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
-
-    ((CPodcastAppUi*)AppUi())->NaviSetTextL(R_SEARCH_RESULTS);
-
 	CPodcastListView::DoActivateL(aPrevViewId, aCustomMessageId, aCustomMessage);
 	iPreviousView = TVwsViewId(KUidPodcast, KUidPodcastFeedViewID);
+	
+    ((CPodcastAppUi*)AppUi())->NaviSetTextL(R_SEARCH_RESULTS);
+    
+	UpdateListboxItemsL();
+	UpdateToolbar();
 }
 
 void CPodcastSearchView::DoDeactivate()
 {
 	CPodcastListView::DoDeactivate();
-	CAknTitlePane* titlePane = static_cast<CAknTitlePane*>
-		     ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
-	titlePane->SetTextToDefaultL();
 	((CPodcastAppUi*)AppUi())->NaviShowTabGroupL();
 }
 
@@ -239,7 +233,7 @@
 								
 				iEikonEnv->ReadResourceL(templ, R_ADD_FEED_QUERY);
 				message.Format(templ, &newInfo->Title());
-				if(ShowQueryMessage(message)) {
+				if(ShowQueryMessageL(message)) {
 					TBool added = iPodcastModel.FeedEngine().AddFeedL(*newInfo);
 					
 					if (added)
@@ -247,7 +241,7 @@
 						// ask if user wants to update it now
 						TBuf<KMaxMessageLength> message;
 						iEikonEnv->ReadResourceL(message, R_ADD_FEED_SUCCESS);
-						if(ShowQueryMessage(message))
+						if(ShowQueryMessageL(message))
 							{
 							CFeedInfo *info = iPodcastModel.FeedEngine().GetFeedInfoByUid(newInfo->Uid());
 							
@@ -261,7 +255,7 @@
 						{
 						TBuf<KMaxMessageLength> message;
 						iEikonEnv->ReadResourceL(message, R_ADD_FEED_EXISTS);
-						ShowErrorMessage(message);
+						ShowErrorMessageL(message);
 						}		
 				}
 				}
@@ -277,8 +271,7 @@
 void CPodcastSearchView::OpmlParsingComplete(TInt /*aError*/, TUint /*aNumFeedsImported*/)
 	{
 	DP("CPodcastSearchView::OpmlParsingComplete BEGIN");
-	UpdateListboxItemsL();
-	UpdateToolbar();
+
 	DP("CPodcastSearchView::OpmlParsingComplete END");
 	}
 
--- a/application/src/PodcastSettingsView.cpp	Thu Apr 01 11:39:23 2010 +0200
+++ b/application/src/PodcastSettingsView.cpp	Thu Apr 01 11:41:33 2010 +0200
@@ -511,6 +511,7 @@
 		{
 		iNaviPane->PushL(*iNaviDecorator);
 		}
+
 	DP("CPodcastSettingsView::DoActivateL END");
 }
 
--- a/application/src/PodcastShowsView.cpp	Thu Apr 01 11:39:23 2010 +0200
+++ b/application/src/PodcastShowsView.cpp	Thu Apr 01 11:41:33 2010 +0200
@@ -203,12 +203,11 @@
 		TUid aCustomMessageId, const TDesC8& aCustomMessage)
 	{
 	DP("CPodcastShowsView::DoActivateL BEGIN");
+	CPodcastListView::DoActivateL(aPrevViewId, aCustomMessageId, aCustomMessage);
+	
+	iPreviousView = TVwsViewId(KUidPodcast, KUidPodcastFeedViewID);
 	
 	UpdateViewTitleL();
-	
-	CPodcastListView::DoActivateL(aPrevViewId, aCustomMessageId, aCustomMessage);
-	iPreviousView = TVwsViewId(KUidPodcast, KUidPodcastFeedViewID);
-	
 	UpdateFeedUpdateStateL();
 	UpdateToolbar();
 	DP("CPodcastShowsView::DoActivateL END");
@@ -216,12 +215,6 @@
 
 void CPodcastShowsView::DoDeactivate()
 	{
-	CAknTitlePane* titlePane = static_cast<CAknTitlePane*>
-		     ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
-	
-//	titlePane->SetSmallPicture(NULL, NULL, ETrue);
-	titlePane->SetPicture(NULL, NULL);
-	titlePane->SetTextToDefaultL();
 	CPodcastListView::DoDeactivate();
 	}
 
@@ -269,7 +262,7 @@
 			{
 			TBuf<KMaxMessageLength> message;
 			iEikonEnv->ReadResourceL(message, R_PODCAST_CONNECTION_ERROR);
-			ShowErrorMessage(message);
+			ShowErrorMessageL(message);
 			}
 			break;
 		default:
@@ -563,17 +556,17 @@
 	switch (aCommand)
 		{
 		case EPodcastMarkAsPlayed:
-			HandleSetShowPlayed(ETrue);
+			HandleSetShowPlayedL(ETrue);
 			break;
 		case EPodcastMarkAsUnplayed:
-			HandleSetShowPlayed(EFalse);
+			HandleSetShowPlayedL(EFalse);
 			break;
 		case EPodcastMarkAllPlayed:
-			iPodcastModel.MarkSelectionPlayed();
+			iPodcastModel.MarkSelectionPlayedL();
 			UpdateListboxItemsL();
 			break;
 		case EPodcastDeleteShow:
-			HandleDeleteShow();
+			HandleDeleteShowL();
 			break;
 		case EPodcastDownloadShow:
 			{
@@ -614,7 +607,7 @@
 			CPodcastListView::HandleCommandL(aCommand);
 			break;
 		}
-	iListContainer->SetLongTapDetected(EFalse);
+	iListContainer->SetLongTapDetectedL(EFalse);
 
 	UpdateToolbar();
 	}
@@ -628,30 +621,6 @@
 		}
 }
 	
-void CPodcastShowsView::ImageOperationCompleteL(TInt aError, TUint /*aHandle*/, CPodcastModel& /*aPodcastModel*/)
-	{
-	iLastImageHandlerError = aError;
-	if(iSetTitlebarImage)
-		{
-		iSetTitlebarImage = EFalse;
-		if(aError == KErrNone)
-			{
-			CAknTitlePane* titlePane = static_cast<CAknTitlePane*>
-						 ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
-			titlePane->SetSmallPicture(iPodcastModel.ImageHandler().ScaledBitmap(), NULL, ETrue);
-			}
-		else
-			{
-			iPodcastModel.ImageHandler().ScaledBitmap();
-			}
-			
-		}
-	else
-		{
-		CActiveScheduler::Stop();
-		}
-	}
-	
 void CPodcastShowsView::DisplayShowInfoDialogL()
 	{
 	TInt index = iListContainer->Listbox()->CurrentItemIndex();
@@ -683,8 +652,12 @@
 	
 		toolbar->HideItem(EPodcastUpdateFeed, updatingState, ETrue ); 
 		toolbar->HideItem(EPodcastCancelUpdateAllFeeds, !updatingState, ETrue );
-
-#ifdef SYMBIAN1_UI
+#ifndef SYMBIAN1_UI
+		// there seems to be drawing bugs in the toolbar if there is only
+		// one or two buttons defined in the resource, so we have download
+		// there but always hidden
+		toolbar->HideItem(EPodcastDownloadShow, ETrue, ETrue );
+#else SYMBIAN1_UI
 		RShowInfoArray &fItems = iPodcastModel.ActiveShowList();
 		TInt itemCnt = fItems.Count();
 	
@@ -748,7 +721,7 @@
 {
 	DP("CPodcastShowsView::HandleLongTapEventL BEGIN");
 
-	iListContainer->SetLongTapDetected(ETrue);
+	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(
@@ -777,7 +750,7 @@
 	DP("CPodcastShowsView::HandleLongTapEventL END");
 }
 
-void CPodcastShowsView::HandleSetShowPlayed(TBool aPlayed)
+void CPodcastShowsView::HandleSetShowPlayedL(TBool aPlayed)
 	{
 
 	TInt index = iListContainer->Listbox()->CurrentItemIndex();
@@ -786,13 +759,13 @@
 		{
 		CShowInfo *info = iPodcastModel.ActiveShowList()[index];
 		info->SetPlayState(aPlayed ? EPlayed : ENeverPlayed);
-		iPodcastModel.ShowEngine().UpdateShow(*info);
+		iPodcastModel.ShowEngine().UpdateShowL(*info);
 		UpdateShowItemDataL(iPodcastModel.ActiveShowList()[index], index, 0);
 		iListContainer->Listbox()->DrawItem(index);					
 		}
 	}
 
-void CPodcastShowsView::HandleDeleteShow()
+void CPodcastShowsView::HandleDeleteShowL()
 	{
 	TInt index = iListContainer->Listbox()->CurrentItemIndex();
 
@@ -803,7 +776,7 @@
 		TBuf<KMaxMessageLength> templ;
 		iEikonEnv->ReadResourceL(templ, R_PODCAST_DELETE_SHOW_PROMPT);
 		msg.Format(templ, &(info->Title()));
-		if (ShowQueryMessage(msg))
+		if (ShowQueryMessageL(msg))
 			{
 			iPodcastModel.ShowEngine().DeleteShowL(iPodcastModel.ActiveShowList()[index]->Uid());
 			
@@ -811,7 +784,7 @@
 			
 			info->SetDownloadState(ENotDownloaded);
 			info->SetPlayState(EPlayed);
-			iPodcastModel.ShowEngine().UpdateShow(*info);
+			iPodcastModel.ShowEngine().UpdateShowL(*info);
 			
 			UpdateShowItemDataL(iPodcastModel.ActiveShowList()[index], index, 0);
 			iListContainer->Listbox()->DrawItem(index);					
@@ -821,7 +794,7 @@
 
 void CPodcastShowsView::DownloadQueueUpdatedL(TInt aDownloadingShows, TInt aQueuedShows)
 	{
-	((CPodcastAppUi*)AppUi())->UpdateQueueTab(aDownloadingShows+aQueuedShows);
+	((CPodcastAppUi*)AppUi())->UpdateQueueTabL(aDownloadingShows+aQueuedShows);
 	UpdateListboxItemsL();
 	}
 
@@ -855,7 +828,6 @@
 			}
 		else
 			{
-			titlePane->SetPicture(NULL, NULL);
 			titlePane->SetTextToDefaultL();
 			}
 		
--- a/engine/group/engine.mmp	Thu Apr 01 11:39:23 2010 +0200
+++ b/engine/group/engine.mmp	Thu Apr 01 11:41:33 2010 +0200
@@ -37,7 +37,6 @@
 SOURCE			FeedParser.cpp 
 SOURCE			FeedEngine.cpp 
 SOURCE			ShowInfo.cpp
-SOURCE			SoundEngine.cpp
 SOURCE			FeedInfo.cpp
 SOURCE			FeedTimer.cpp
 SOURCE			ShowEngine.cpp
--- a/engine/inc/ConnectionEngine.h	Thu Apr 01 11:39:23 2010 +0200
+++ b/engine/inc/ConnectionEngine.h	Thu Apr 01 11:41:33 2010 +0200
@@ -90,7 +90,7 @@
 	// UI Setting
 	TBool ConnectionSettingL();
 	
-	void ReportConnection(TInt aError);
+	void ReportConnectionL(TInt aError);
 	void ReportConnectionSelectionStart();
 	void ReportConnectionSelectionEnd();
 	
--- a/engine/inc/FeedEngine.h	Thu Apr 01 11:39:23 2010 +0200
+++ b/engine/inc/FeedEngine.h	Thu Apr 01 11:41:33 2010 +0200
@@ -78,7 +78,7 @@
 
 	void RunFeedTimer();
 	
-	IMPORT_C void UpdateFeed(CFeedInfo *aItem);
+	IMPORT_C void UpdateFeedL(CFeedInfo *aItem);
 	/**
 	 * Returns the current internal state of the feed engine4
 	 */
@@ -94,7 +94,7 @@
 	IMPORT_C void AddSearchResultL(CFeedInfo *item);
 	IMPORT_C const RFeedInfoArray& GetSearchResults();
 
-	IMPORT_C void OpmlParsingComplete(TInt aError, TUint aNumFeedsAdded);
+	IMPORT_C void OpmlParsingCompleteL(TInt aError, TUint aNumFeedsAdded);
 	void NotifyFeedUpdateComplete(TInt aFeedUid, TInt aError);
 protected:
 	
@@ -118,8 +118,7 @@
 	void GetFeedImageL(CFeedInfo *aFeedInfo);
 	
 	void UpdateNextFeedL();
-	void NotifyFeedUpdateComplete(TInt aError);	
-	void NotifyOpmlParsingComplete(TInt aError, TUint aNumFeedsAdded);
+	void NotifyOpmlParsingCompleteL(TInt aError, TUint aNumFeedsAdded);
 
 	
 private:
@@ -128,7 +127,7 @@
 	TBool DBAddFeedL(const CFeedInfo& aTtem);
 	CFeedInfo* DBGetFeedInfoByUidL(TUint aFeedUid);	
 	TUint DBGetFeedCount();
-	TBool DBUpdateFeed(const CFeedInfo& aItem);
+	TBool DBUpdateFeedL(const CFeedInfo& aItem);
 	void DBGetStatsByFeed(TUint aFeedUid, TUint &aNumShows, TUint &aNumUnplayed);
 
 		
--- a/engine/inc/MetaDataReaderObserver.h	Thu Apr 01 11:39:23 2010 +0200
+++ b/engine/inc/MetaDataReaderObserver.h	Thu Apr 01 11:41:33 2010 +0200
@@ -21,7 +21,7 @@
 
 class MMetaDataReaderObserver {
 public:
-	virtual void ReadMetaData(CShowInfo& aShowInfo) = 0;
+	virtual void ReadMetaDataL(CShowInfo& aShowInfo) = 0;
 	virtual void ReadMetaDataCompleteL() = 0;
 };
 
--- a/engine/inc/PodcastModel.h	Thu Apr 01 11:39:23 2010 +0200
+++ b/engine/inc/PodcastModel.h	Thu Apr 01 11:41:33 2010 +0200
@@ -36,7 +36,6 @@
 //#define DONT_SORT_SQL
 class RCmManager;
 class CFeedEngine;
-class CSoundEngine;
 class CShowEngine;
 class CSettingsEngine;
 class CCommsDatabase;
@@ -60,7 +59,6 @@
 	IMPORT_C ~CPodcastModel();
 	IMPORT_C CFeedEngine& FeedEngine();
 	IMPORT_C CShowEngine& ShowEngine();
-	IMPORT_C CSoundEngine& SoundEngine();
 	IMPORT_C CSettingsEngine& SettingsEngine();
 	IMPORT_C CConnectionEngine& ConnectionEngine();
 	IMPORT_C CShowInfo* PlayingPodcast();
@@ -93,7 +91,7 @@
 	IMPORT_C void GetShowsDownloadedL();
 	IMPORT_C void GetShowsDownloadingL();
 	IMPORT_C void GetShowsByFeedL(TUint aFeedUid);
-	IMPORT_C void MarkSelectionPlayed();
+	IMPORT_C void MarkSelectionPlayedL();
 	
 	TInt FindActiveShowByUid(TUint aUid);
 	IMPORT_C TBool IsFirstStartup();
@@ -108,7 +106,6 @@
    
    CFeedEngine* iFeedEngine;
    CShowEngine* iShowEngine;
-   CSoundEngine* iSoundEngine;
    CSettingsEngine *iSettingsEngine;
    CConnectionEngine* iConnectionEngine;
    RShowInfoArray iActiveShowList;
--- a/engine/inc/ShowEngine.h	Thu Apr 01 11:39:23 2010 +0200
+++ b/engine/inc/ShowEngine.h	Thu Apr 01 11:41:33 2010 +0200
@@ -38,7 +38,7 @@
 public:
 	IMPORT_C void AddDownloadL(CShowInfo& info);
 	IMPORT_C TBool RemoveDownloadL(TUint aUid);
-	IMPORT_C void RemoveAllDownloads();
+	IMPORT_C void RemoveAllDownloadsL();
 
 	IMPORT_C void SuspendDownloads();
 	IMPORT_C void ResumeDownloadsL();
@@ -57,7 +57,7 @@
 	IMPORT_C CShowInfo* DBGetShowByFileNameL(TFileName aFileName);
 	
 	IMPORT_C TBool AddShowL(const CShowInfo& item);
-	IMPORT_C void DeletePlayedShows(RShowInfoArray &aShowInfoArray);
+	IMPORT_C void DeletePlayedShowsL(RShowInfoArray &aShowInfoArray);
 	IMPORT_C void DeleteAllShowsByFeedL(TUint aFeedUid,TBool aDeleteFiles=ETrue);
 	IMPORT_C void DeleteShowL(TUint aShowUid, TBool aRemoveFile=ETrue);
 	IMPORT_C void DeleteOldShowsByFeed(TUint aFeedUid);
@@ -66,7 +66,7 @@
 	IMPORT_C void RemoveObserver(MShowEngineObserver *observer);
 
 	IMPORT_C void NotifyShowListUpdatedL();
-	IMPORT_C void UpdateShow(CShowInfo& aInfo);
+	IMPORT_C void UpdateShowL(CShowInfo& aInfo);
 
 	IMPORT_C void GetMimeType(const TDesC& aFileName, TDes& aMimeType);
 
@@ -81,7 +81,7 @@
 	void DownloadInfo(CHttpClient* aClient, int aSize);
 	void FileError(TUint aError);
 	// from MetaDataReaderObserver
-	void ReadMetaData(CShowInfo& aShowInfo);
+	void ReadMetaDataL(CShowInfo& aShowInfo);
 	void ReadMetaDataCompleteL();
 	
 private:
@@ -106,8 +106,8 @@
 	// DB methods
 	CShowInfo* DBGetShowByUidL(TUint aUid);
 	void DBFillShowInfoFromStmtL(sqlite3_stmt *st, CShowInfo* showInfo);
-	TBool DBAddShow(const CShowInfo& aItem);
-	TBool DBUpdateShow(CShowInfo& aItem);
+	TBool DBAddShowL(const CShowInfo& aItem);
+	TBool DBUpdateShowL(CShowInfo& aItem);
 	void DBGetShowsByFeedL(RShowInfoArray& aShowArray, TUint aFeedUid);
 	void DBGetAllShowsL(RShowInfoArray& aShowArray);
 	void DBGetNewShowsL(RShowInfoArray& aShowArray);
--- a/engine/src/ConnectionEngine.cpp	Thu Apr 01 11:39:23 2010 +0200
+++ b/engine/src/ConnectionEngine.cpp	Thu Apr 01 11:41:33 2010 +0200
@@ -64,7 +64,7 @@
 		}
 	
 	iConnectionState = iStatus.Int() == KErrNone?CConnectionEngine::EConnected:CConnectionEngine::ENotConnected;
-	ReportConnection( iStatus.Int() );
+	ReportConnectionL( iStatus.Int() );
 	}
 
 void CConnectionEngine::DoCancel()
@@ -272,7 +272,7 @@
 	}
 
 
-void CConnectionEngine::ReportConnection(TInt aError)
+void CConnectionEngine::ReportConnectionL(TInt aError)
 	{
 	TInt noObservers = iObserverArray.Count();
 	while(noObservers)
--- a/engine/src/FeedEngine.cpp	Thu Apr 01 11:39:23 2010 +0200
+++ b/engine/src/FeedEngine.cpp	Thu Apr 01 11:41:33 2010 +0200
@@ -208,7 +208,7 @@
 		}
 	
 	iActiveFeed->SetLastError(KErrNone);
-	DBUpdateFeed(*iActiveFeed);
+	DBUpdateFeedL(*iActiveFeed);
 	
 	iUpdatingFeedFileName.Copy (iPodcastModel.SettingsEngine().PrivatePath ());
 	_LIT(KFileNameFormat, "%lu.xml");
@@ -277,18 +277,11 @@
 	
 	// complete file path is base dir + rel path
 	filePath.Append(relPath);
-	// This file might exist in the podcast directory already so check this first
-	if(BaflUtils::FileExists(iPodcastModel.FsSession(), filePath))
+	aFeedInfo->SetImageFileNameL(filePath);
+
+	if(iFeedClient->GetL(aFeedInfo->ImageUrl(), filePath, ETrue))
 		{
-			aFeedInfo->SetImageFileNameL(filePath, &iPodcastModel);
-		}
-	else
-		{
-			aFeedInfo->SetImageFileNameL(filePath, NULL);
-			if(iFeedClient->GetL(aFeedInfo->ImageUrl(), filePath, ETrue))
-			{
-				iClientState = EUpdatingImage;
-			}
+			iClientState = EUpdatingImage;
 		}
 	}
 
@@ -375,7 +368,7 @@
 		if (iSortedFeeds[i]->Uid() == aUid) 
 			{
 			iPodcastModel.ShowEngine().DeleteAllShowsByFeedL(aUid);
-					
+
 			CFeedInfo* feedToRemove = iSortedFeeds[i];
 			
 			//delete the image file if it exists
@@ -434,7 +427,7 @@
 	return EFalse;	
 	}
 
-TBool CFeedEngine::DBUpdateFeed(const CFeedInfo &aItem)
+TBool CFeedEngine::DBUpdateFeedL(const CFeedInfo &aItem)
 	{
 	DP2("CFeedEngine::DBUpdateFeed, title=%S, URL=%S", &aItem.Title(), &aItem.Url());
 	
@@ -524,7 +517,7 @@
 				time.HomeTime();
 				iActiveFeed->SetLastUpdated(time);
 				iActiveFeed->SetLastError(aError);
-				NotifyFeedUpdateComplete(aError);
+				NotifyFeedUpdateComplete(iActiveFeed->Uid(), aError);
 				}
 			break;
 		case EUpdatingFeed: 
@@ -594,8 +587,8 @@
 				}break;
 			}
 		
-n			NotifyFeedUpdateComplete(aError);
-	
+			NotifyFeedUpdateComplete(iActiveFeed->Uid(), aError);
+
 			// we will wait until the image has been downloaded to start the next feed update.
 			if (iClientState == EIdle)
 				{
@@ -615,7 +608,7 @@
 					}				
 				}
 			
-			NotifyFeedUpdateComplete(aError);
+			NotifyFeedUpdateComplete(iActiveFeed->Uid(), aError);
 			UpdateNextFeedL();
 			}break;
 		case ESearching: 
@@ -635,7 +628,7 @@
 				}
 			else
 				{
-				NotifyOpmlParsingComplete(aError, 0);
+				NotifyOpmlParsingCompleteL(aError, 0);
 				}
 			
 			BaflUtils::DeleteFile(iPodcastModel.FsSession(), iSearchResultsFileName);
@@ -644,16 +637,6 @@
 	DP("CFeedEngine::CompleteL END");
 	}
 
-void CFeedEngine::NotifyFeedUpdateComplete(TInt aError)
-	{
-	DP("CFeedEngine::NotifyFeedUpdateComplete");
-	DBUpdateFeed(*iActiveFeed);
-	for (TInt i=0;i<iObservers.Count();i++) 
-		{
-		TRAP_IGNORE(iObservers[i]->FeedDownloadFinishedL(iAutoUpdatedInitiator?MFeedEngineObserver::EFeedAutoUpdate:MFeedEngineObserver::EFeedManualUpdate, iActiveFeed->Uid(), aError));
-		}
-	}
-
 void CFeedEngine::NotifyFeedUpdateComplete(TInt aFeedUid, TInt aError)
 	{
 	DP("CFeedEngine::NotifyFeedUpdateComplete");	
@@ -933,7 +916,7 @@
 
 			const void *imagefilez = sqlite3_column_text16(st, 4);
 			TPtrC16 imagefile((const TUint16*)imagefilez);
-			feedInfo->SetImageFileNameL(imagefile, &iPodcastModel);
+			feedInfo->SetImageFileNameL(imagefile);
 						
 			const void *linkz = sqlite3_column_text16(st, 5);
 			TPtrC16 link((const TUint16*)linkz);
@@ -1037,9 +1020,9 @@
 	return feedInfo;
 }
 
-EXPORT_C void CFeedEngine::UpdateFeed(CFeedInfo *aItem)
+EXPORT_C void CFeedEngine::UpdateFeedL(CFeedInfo *aItem)
 	{
-	DBUpdateFeed(*aItem);
+	DBUpdateFeedL(*aItem);
 	}
 
 EXPORT_C void CFeedEngine::SearchForFeedL(TDesC& aSearchString)
@@ -1095,12 +1078,12 @@
 	}
 
 
-EXPORT_C void CFeedEngine::OpmlParsingComplete(TInt aError, TUint aNumFeedsAdded)
+EXPORT_C void CFeedEngine::OpmlParsingCompleteL(TInt aError, TUint aNumFeedsAdded)
 	{
-	NotifyOpmlParsingComplete(aError, aNumFeedsAdded);
+	NotifyOpmlParsingCompleteL(aError, aNumFeedsAdded);
 	}
 
-void CFeedEngine::NotifyOpmlParsingComplete(TInt aError, TUint aNumFeedsAdded)
+void CFeedEngine::NotifyOpmlParsingCompleteL(TInt aError, TUint aNumFeedsAdded)
 	{
 	for (TInt i=0;i<iObservers.Count();i++) 
 		{
--- a/engine/src/MetaDataReader.cpp	Thu Apr 01 11:39:23 2010 +0200
+++ b/engine/src/MetaDataReader.cpp	Thu Apr 01 11:41:33 2010 +0200
@@ -148,7 +148,7 @@
 		buf = NULL;
 	}
 
-	iObserver.ReadMetaData(*iShow);
+	TRAP_IGNORE(iObserver.ReadMetaDataL(*iShow));
 	iPlayer->Stop();
 	iShow = NULL;
 	TRAP_IGNORE(ParseNextShowL());
--- a/engine/src/OpmlParser.cpp	Thu Apr 01 11:39:23 2010 +0200
+++ b/engine/src/OpmlParser.cpp	Thu Apr 01 11:41:33 2010 +0200
@@ -73,7 +73,7 @@
 
 void COpmlParser::OnEndDocumentL(TInt aErrorCode)
 	{
-	iFeedEngine.OpmlParsingComplete(aErrorCode, iNumFeedsAdded);
+	iFeedEngine.OpmlParsingCompleteL(aErrorCode, iNumFeedsAdded);
 	//DP("OnEndDocumentL()");
 	}
 
@@ -152,7 +152,8 @@
 				iFeedEngine.AddSearchResultL(newFeed);
 				CleanupStack::Pop(newFeed);
 			} else {
-				if(iFeedEngine.AddFeedL(*newFeed))
+				TRAPD(err, iFeedEngine.AddFeedL(*newFeed))
+				if (err == KErrNone)
 					{
 					iNumFeedsAdded++;
 					}
@@ -229,7 +230,7 @@
 void COpmlParser::OnError(TInt aErrorCode)
 	{
 	DP1("COpmlParser::OnError %d", aErrorCode);
-	iFeedEngine.OpmlParsingComplete(aErrorCode, iNumFeedsAdded);
+	iFeedEngine.OpmlParsingCompleteL(aErrorCode, iNumFeedsAdded);
 	}
 
 TAny* COpmlParser::GetExtendedInterface(const TInt32 /*aUid*/)
--- a/engine/src/PodcastModel.cpp	Thu Apr 01 11:39:23 2010 +0200
+++ b/engine/src/PodcastModel.cpp	Thu Apr 01 11:41:33 2010 +0200
@@ -19,7 +19,6 @@
 #include <commdb.h>
 #include "PodcastModel.h"
 #include "FeedEngine.h"
-#include "SoundEngine.h"
 #include "SettingsEngine.h"
 #include "ShowEngine.h"
 #include "connectionengine.h"
@@ -45,7 +44,6 @@
 {
 	
 	delete iFeedEngine;
-	delete iSoundEngine;
 	delete iSettingsEngine;
 	delete iShowEngine;
 
@@ -89,7 +87,6 @@
 	iFeedEngine = CFeedEngine::NewL(*this);
 	iShowEngine = CShowEngine::NewL(*this);
 
-	iSoundEngine = CSoundEngine::NewL(*this);	
 	DP("CPodcastModel::ConstructL END");
 }
 
@@ -199,11 +196,6 @@
 	return *iShowEngine;
 }
 
-EXPORT_C CSoundEngine& CPodcastModel::SoundEngine()
-{
-	return *iSoundEngine;
-}
-
 EXPORT_C CSettingsEngine& CPodcastModel::SettingsEngine()
 {
 	return *iSettingsEngine;
@@ -216,40 +208,8 @@
 
 EXPORT_C void CPodcastModel::PlayPausePodcastL(CShowInfo* aPodcast, TBool aPlayOnInit) 
 	{
-	
-	// special treatment if this podcast is already active
-	if (iPlayingPodcast->Uid() == aPodcast->Uid() && SoundEngine().State() > ESoundEngineOpening ) {
-		if (aPodcast->PlayState() == EPlaying) {
-			SoundEngine().Pause();
-			aPodcast->SetPosition(iSoundEngine->Position());
-			aPodcast->SetPlayState(EPlayed);
-			aPodcast->SetPlayState(EPlayed);
-		} else {
-			iSoundEngine->Play();
-		}
-	} else {
-		// switching file, so save position
-		iSoundEngine->Pause();
-		if (iPlayingPodcast != NULL) {
-			iPlayingPodcast->SetPosition(iSoundEngine->Position());
-		}
-		
-		iSoundEngine->Stop(EFalse);
-
-		// we play video podcasts through the external player
-		if(aPodcast != NULL && aPodcast->ShowType() != EVideoPodcast) {
-			DP1("Starting: %S", &(aPodcast->FileName()));
-			TRAPD( error, iSoundEngine->OpenFileL(aPodcast->FileName(), aPlayOnInit) );
-			if (error != KErrNone) {
-				DP1("Error: %d", error);
-			} else {
-				iSoundEngine->SetPosition(aPodcast->Position().Int64() / 1000000);
-			}
-		}
-
-		iPlayingPodcast = aPodcast;		
+	// TODO: interact with MPX
 	}
-}
 
 EXPORT_C CFeedInfo* CPodcastModel::ActiveFeedInfo()
 {
@@ -279,6 +239,7 @@
 
 sqlite3* CPodcastModel::DB()
 {
+	DP("CPodcastModel::DB BEGIN");
 	if (iDB == NULL) {		
 		TFileName dbFileName;
 		dbFileName.Copy(iSettingsEngine->PrivatePath());
@@ -298,7 +259,8 @@
 		
 		TBuf8<KMaxFileName> filename8;
 		filename8.Copy(dbFileName);
-		int rc = rc = sqlite3_open((const char*) filename8.PtrZ(), &iDB);
+		DP("Before sqlite3_open");
+		int rc = sqlite3_open((const char*) filename8.PtrZ(), &iDB);
 		if( rc != SQLITE_OK){
 			DP("Error loading DB");
 			User::Panic(_L("Podcatcher"), 10);
@@ -306,6 +268,7 @@
 
 
 	}
+	DP("CPodcastModel::DB END");
 	return iDB;
 }
 
@@ -410,12 +373,12 @@
 	iShowEngine->GetShowsByFeedL(iActiveShowList, aFeedUid);
 	}
 
-EXPORT_C void CPodcastModel::MarkSelectionPlayed()
+EXPORT_C void CPodcastModel::MarkSelectionPlayedL()
 	{
 	for (int i=0;i<iActiveShowList.Count();i++) {
 		if(iActiveShowList[i]->PlayState() != EPlayed) {
 			iActiveShowList[i]->SetPlayState(EPlayed);
-			iShowEngine->UpdateShow(*iActiveShowList[i]);
+			iShowEngine->UpdateShowL(*iActiveShowList[i]);
 		}
 	}
 	}
--- a/engine/src/SettingsEngine.cpp	Thu Apr 01 11:39:23 2010 +0200
+++ b/engine/src/SettingsEngine.cpp	Thu Apr 01 11:41:33 2010 +0200
@@ -19,7 +19,6 @@
 #include <bautils.h>
 #include <s32file.h>
 #include "SettingsEngine.h"
-#include "SoundEngine.h"
 #include "FeedEngine.h"
 #include "ShowEngine.h"
 
--- a/engine/src/ShowEngine.cpp	Thu Apr 01 11:39:23 2010 +0200
+++ b/engine/src/ShowEngine.cpp	Thu Apr 01 11:41:33 2010 +0200
@@ -24,7 +24,6 @@
 #include "SettingsEngine.h"
 #include <e32hashtab.h>
 #include <httperr.h>
-#include "SoundEngine.h"
 #include "debug.h"
 #include "PodcastUtils.h"
 
@@ -115,7 +114,7 @@
 	DP("CShowEngine::ResumeDownloadsL END");
 	}
 
-EXPORT_C void CShowEngine::RemoveAllDownloads()
+EXPORT_C void CShowEngine::RemoveAllDownloadsL()
 	{
 	if (!iPodcastModel.SettingsEngine().DownloadSuspended())
 		{
@@ -145,7 +144,7 @@
 	if (info != NULL)
 		{
 		info->SetDownloadState(ENotDownloaded);
-		DBUpdateShow(*info);
+		DBUpdateShowL(*info);
 		delete info;
 		}
 	DBRemoveDownload(aUid);
@@ -231,7 +230,7 @@
 
 	if (showInfo == NULL)
 		{
-		DBAddShow(aItem);
+		DBAddShowL(aItem);
 		return ETrue;
 		}
 	else
@@ -299,7 +298,7 @@
 					}
 
 				iShowDownloading->SetDownloadState(EDownloaded);
-				DBUpdateShow(*iShowDownloading);
+				DBUpdateShowL(*iShowDownloading);
 				DBRemoveDownload(iShowDownloading->Uid());
 				AddShowToMpxCollection(*iShowDownloading);				
 				NotifyShowFinishedL(aError);
@@ -313,7 +312,7 @@
 				if(aError >= HTTPStatus::EBadRequest && aError <= HTTPStatus::EBadRequest+200)
 					{
 					iShowDownloading->SetDownloadState(EFailedDownload);
-					DBUpdateShow(*iShowDownloading);
+					DBUpdateShowL(*iShowDownloading);
 					DBRemoveDownload(iShowDownloading->Uid());
 					NotifyShowFinishedL(aError);
 
@@ -323,7 +322,7 @@
 				else // other kind of error, missing network etc, reque this show
 					{
 					iShowDownloading->SetDownloadState(EQueued);
-					DBUpdateShow(*iShowDownloading);
+					DBUpdateShowL(*iShowDownloading);
 					}
 
 				iDownloadErrors++;
@@ -343,7 +342,7 @@
 			if(iShowDownloading)
 				{
 				iShowDownloading->SetDownloadState(EQueued);
-				DBUpdateShow(*iShowDownloading);
+				DBUpdateShowL(*iShowDownloading);
 				}
 			iPodcastModel.SettingsEngine().SetDownloadSuspended(ETrue);
 			NotifyShowFinishedL(aError);
@@ -734,7 +733,7 @@
 	showInfo->SetLastError(lasterror);
 	}
 
-TBool CShowEngine::DBAddShow(const CShowInfo& aItem)
+TBool CShowEngine::DBAddShowL(const CShowInfo& aItem)
 	{
 	DP2("CShowEngine::DBAddShow, title=%S, URL=%S", &aItem.Title(), &aItem.Url());
 
@@ -804,7 +803,7 @@
 	sqlite3_finalize(st);
 	}
 
-TBool CShowEngine::DBUpdateShow(CShowInfo& aItem)
+TBool CShowEngine::DBUpdateShowL(CShowInfo& aItem)
 	{
 	DP1("CShowEngine::DBUpdateShow, title='%S'", &aItem.Title());
 
@@ -1058,21 +1057,16 @@
 		}
 	}
 
-EXPORT_C void CShowEngine::DeletePlayedShows(RShowInfoArray &aShowInfoArray)
+EXPORT_C void CShowEngine::DeletePlayedShowsL(RShowInfoArray &aShowInfoArray)
 	{
 	for (TInt i = 0; i < aShowInfoArray.Count(); i++)
 		{
 		if (aShowInfoArray[i]->PlayState() == EPlayed
 				&& aShowInfoArray[i]->FileName().Length() > 0)
 			{
-			if (CompareShowsByUid(*(iPodcastModel.PlayingPodcast()), *(aShowInfoArray[i]))
-					&& iPodcastModel.SoundEngine().State() != ESoundEngineNotInitialized)
-				{
-				iPodcastModel.SoundEngine().Stop();
-				}
 			BaflUtils::DeleteFile(iPodcastModel.FsSession(), aShowInfoArray[i]->FileName());
 			aShowInfoArray[i]->SetDownloadState(ENotDownloaded);
-			DBUpdateShow(*aShowInfoArray[i]);
+			DBUpdateShowL(*aShowInfoArray[i]);
 			}
 		}
 	}
@@ -1086,6 +1080,13 @@
 
 	for (TInt i = count - 1; i >= 0; i--)
 		{
+		if (iShowDownloading && iShowDownloading->Uid() == array[i]->Uid())
+			{
+			// trying to delete the active download
+			RemoveDownloadL(iShowDownloading->Uid());
+			}
+		
+		// delete downloaded file
 		if (array[i]->FileName().Length() > 0)
 			{
 			if (aDeleteFiles)
@@ -1095,7 +1096,15 @@
 			}
 		}
 	array.ResetAndDestroy();
+	
+	// delete all shows from DB
 	DBDeleteAllShowsByFeed(aFeedUid);
+
+	// this will clear out deleted shows from the download queue
+	DBGetAllDownloadsL(array);
+	array.ResetAndDestroy();
+
+	NotifyDownloadQueueUpdatedL();
 	}
 
 EXPORT_C void CShowEngine::DeleteOldShowsByFeed(TUint aFeedUid)
@@ -1116,7 +1125,7 @@
 			}
 		
 		info->SetDownloadState(ENotDownloaded);
-		DBUpdateShow(*info);
+		DBUpdateShowL(*info);
 		delete info;
 		}
 	}
@@ -1159,7 +1168,7 @@
 EXPORT_C void CShowEngine::AddDownloadL(CShowInfo& aInfo)
 	{
 	aInfo.SetDownloadState(EQueued);
-	DBUpdateShow(aInfo);
+	DBUpdateShowL(aInfo);
 	DBAddDownload(aInfo.Uid());
 	DownloadNextShowL();
 	}
@@ -1200,7 +1209,7 @@
 				DP1("CShowEngine::DownloadNextShow\tDownloading: %S", &(info->Title()));
 				info->SetDownloadState(EDownloading);
 				info->SetLastError(KErrNone);
-				DBUpdateShow(*info);
+				DBUpdateShowL(*info);
 				iShowDownloading = info;
 				// Inform the observers
 				// important to do this after we change download state
@@ -1211,7 +1220,7 @@
 					{
 					info->SetDownloadState(EFailedDownload);
 					DBRemoveDownload(info->Uid());
-					DBUpdateShow(*info);
+					DBUpdateShowL(*info);
 					info = DBGetNextDownloadL();
 					
 					if(info == NULL)
@@ -1271,10 +1280,10 @@
 		}
 	}
 
-void CShowEngine::ReadMetaData(CShowInfo& aShowInfo)
+void CShowEngine::ReadMetaDataL(CShowInfo& aShowInfo)
 	{
 	//DP1("Read %S", &(aShowInfo->Title()));
-	DBUpdateShow(aShowInfo);
+	DBUpdateShowL(aShowInfo);
 	}
 
 void CShowEngine::ReadMetaDataCompleteL()
@@ -1283,9 +1292,9 @@
 	MetaDataReader().SetIgnoreTrackNo(EFalse);
 	}
 
-EXPORT_C void CShowEngine::UpdateShow(CShowInfo& aInfo)
+EXPORT_C void CShowEngine::UpdateShowL(CShowInfo& aInfo)
 	{
-	DBUpdateShow(aInfo);
+	DBUpdateShowL(aInfo);
 	}
 
 EXPORT_C CMetaDataReader& CShowEngine::MetaDataReader()
--- a/test.txt	Thu Apr 01 11:39:23 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2 +0,0 @@
-Test file
-Lars Was HERE!!
\ No newline at end of file