# HG changeset patch # User Brendan Donegan # Date 1268387626 0 # Node ID 3a22449b5c73a6fdaf6d531d2a44d8db9048dd1e # Parent 3c0683f9f72ca03a7f6979e055cd1e271fcb748c# Parent e7b10d6d7ba32d14ce34b946529c6a2d45215916 Merged updates to common code into Symbian3 branch diff -r 3c0683f9f72c -r 3a22449b5c73 application/data/PodcastClient_english.rls --- a/application/data/PodcastClient_english.rls Wed Mar 10 10:50:53 2010 +0000 +++ b/application/data/PodcastClient_english.rls Fri Mar 12 09:53:46 2010 +0000 @@ -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" diff -r 3c0683f9f72c -r 3a22449b5c73 application/data/PodcastStrings.ra --- a/application/data/PodcastStrings.ra Wed Mar 10 10:50:53 2010 +0000 +++ b/application/data/PodcastStrings.ra Fri Mar 12 09:53:46 2010 +0000 @@ -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;} diff -r 3c0683f9f72c -r 3a22449b5c73 application/inc/PodcastFeedView.h --- a/application/inc/PodcastFeedView.h Wed Mar 10 10:50:53 2010 +0000 +++ b/application/inc/PodcastFeedView.h Fri Mar 12 09:53:46 2010 +0000 @@ -41,7 +41,8 @@ void UpdateItemL(TInt aIndex); void CheckResumeDownloadL(); void UpdateToolbar(TBool aVisible=ETrue); - + TBool ViewingShows(); + protected: void ConstructL(); CPodcastFeedView(CPodcastModel& aPodcastModel); diff -r 3c0683f9f72c -r 3a22449b5c73 application/inc/PodcastListView.h --- a/application/inc/PodcastListView.h Wed Mar 10 10:50:53 2010 +0000 +++ b/application/inc/PodcastListView.h Fri Mar 12 09:53:46 2010 +0000 @@ -87,7 +87,8 @@ public: ~CPodcastListView(); virtual void UpdateToolbar(TBool aVisible=ETrue) = 0; - + TBool IsVisible(); + protected: void ConstructL(); CPodcastListView(); diff -r 3c0683f9f72c -r 3a22449b5c73 application/inc/PodcastShowsView.h --- a/application/inc/PodcastShowsView.h Wed Mar 10 10:50:53 2010 +0000 +++ b/application/inc/PodcastShowsView.h Fri Mar 12 09:53:46 2010 +0000 @@ -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,6 @@ 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); void HandleSetShowPlayedL(TBool aPlayed); void HandleDeleteShowL(); void UpdateViewTitleL(); @@ -120,8 +111,6 @@ CPodcastModel& iPodcastModel; TBool iProgressAdded; - TInt iLastImageHandlerError; - TBool iSetTitlebarImage; }; #endif // PODCASTSHOWSVIEWH diff -r 3c0683f9f72c -r 3a22449b5c73 application/sis/podcatcher_udeb.sis Binary file application/sis/podcatcher_udeb.sis has changed diff -r 3c0683f9f72c -r 3a22449b5c73 application/sis/podcatcher_udeb_signed.sis Binary file application/sis/podcatcher_udeb_signed.sis has changed diff -r 3c0683f9f72c -r 3a22449b5c73 application/sis/podcatcher_urel.sis Binary file application/sis/podcatcher_urel.sis has changed diff -r 3c0683f9f72c -r 3a22449b5c73 application/sis/podcatcher_urel_signed.sis Binary file application/sis/podcatcher_urel_signed.sis has changed diff -r 3c0683f9f72c -r 3a22449b5c73 application/src/PodcastAppui.cpp --- a/application/src/PodcastAppui.cpp Wed Mar 10 10:50:53 2010 +0000 +++ b/application/src/PodcastAppui.cpp Fri Mar 12 09:53:46 2010 +0000 @@ -137,9 +137,8 @@ break; } case EPodcastHelp: - { - CArrayFix* buf = CPodcastAppUi::AppHelpContextL(); - HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), buf); + { + HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), HelpContextL()); } break; default: @@ -152,11 +151,15 @@ CArrayFixFlat* array = new(ELeave)CArrayFixFlat(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); @@ -217,14 +220,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) { diff -r 3c0683f9f72c -r 3a22449b5c73 application/src/PodcastFeedView.cpp --- a/application/src/PodcastFeedView.cpp Wed Mar 10 10:50:53 2010 +0000 +++ b/application/src/PodcastFeedView.cpp Fri Mar 12 09:53:46 2010 +0000 @@ -172,27 +172,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; } } @@ -985,3 +977,8 @@ } DP("CPodcastListView::HandleLongTapEventL END"); } + +TBool CPodcastFeedView::ViewingShows() + { + return iViewingShows; + } diff -r 3c0683f9f72c -r 3a22449b5c73 application/src/PodcastListView.cpp --- a/application/src/PodcastListView.cpp Wed Mar 10 10:50:53 2010 +0000 +++ b/application/src/PodcastListView.cpp Fri Mar 12 09:53:46 2010 +0000 @@ -29,6 +29,7 @@ #include #include #include +#include const TInt KDefaultGran = 5; @@ -262,6 +263,11 @@ AppUi()->AddToStackL(*this, iListContainer); iListContainer->MakeVisible(ETrue); } + + CAknTitlePane* titlePane = static_cast + ( 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() { diff -r 3c0683f9f72c -r 3a22449b5c73 application/src/PodcastQueueView.cpp --- a/application/src/PodcastQueueView.cpp Wed Mar 10 10:50:53 2010 +0000 +++ b/application/src/PodcastQueueView.cpp Fri Mar 12 09:53:46 2010 +0000 @@ -25,7 +25,6 @@ #include "imagehandler.h" #include "PodcastShowsView.h" -#include #include #include #include @@ -200,7 +199,7 @@ DP("CPodcastQueueView::DoActivateL BEGIN"); CPodcastListView::DoActivateL(aPrevViewId, aCustomMessageId, aCustomMessage); - iPreviousView = TVwsViewId(KUidPodcast, KUidPodcastFeedViewID); + iPreviousView = aPrevViewId; UpdateFeedUpdateStateL(); UpdateToolbar(); @@ -559,6 +558,7 @@ CPodcastListView::HandleCommandL(aCommand); break; } + iListContainer->SetLongTapDetectedL(EFalse); // in case we got here by long tapping UpdateToolbar(); } diff -r 3c0683f9f72c -r 3a22449b5c73 application/src/PodcastSearchView.cpp --- a/application/src/PodcastSearchView.cpp Wed Mar 10 10:50:53 2010 +0000 +++ b/application/src/PodcastSearchView.cpp Fri Mar 12 09:53:46 2010 +0000 @@ -37,7 +37,6 @@ #include #include #include -#include const TInt KMaxFeedNameLength = 100; const TInt KDefaultGran = 5; @@ -128,23 +127,16 @@ TUid aCustomMessageId, const TDesC8& aCustomMessage) { - UpdateToolbar(); - - CAknTitlePane* titlePane = static_cast - ( 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); + UpdateToolbar(); } void CPodcastSearchView::DoDeactivate() { CPodcastListView::DoDeactivate(); - CAknTitlePane* titlePane = static_cast - ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); - titlePane->SetTextToDefaultL(); ((CPodcastAppUi*)AppUi())->NaviShowTabGroupL(); } diff -r 3c0683f9f72c -r 3a22449b5c73 application/src/PodcastSettingsView.cpp --- a/application/src/PodcastSettingsView.cpp Wed Mar 10 10:50:53 2010 +0000 +++ b/application/src/PodcastSettingsView.cpp Fri Mar 12 09:53:46 2010 +0000 @@ -511,6 +511,7 @@ { iNaviPane->PushL(*iNaviDecorator); } + DP("CPodcastSettingsView::DoActivateL END"); } diff -r 3c0683f9f72c -r 3a22449b5c73 application/src/PodcastShowsView.cpp --- a/application/src/PodcastShowsView.cpp Wed Mar 10 10:50:53 2010 +0000 +++ b/application/src/PodcastShowsView.cpp Fri Mar 12 09:53:46 2010 +0000 @@ -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 - ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); - -// titlePane->SetSmallPicture(NULL, NULL, ETrue); - titlePane->SetPicture(NULL, NULL); - titlePane->SetTextToDefaultL(); CPodcastListView::DoDeactivate(); } @@ -628,30 +621,6 @@ } } -void CPodcastShowsView::ImageOperationCompleteL(TInt aError, TUint /*aHandle*/) - { - iLastImageHandlerError = aError; - if(iSetTitlebarImage) - { - iSetTitlebarImage = EFalse; - if(aError == KErrNone) - { - CAknTitlePane* titlePane = static_cast - ( 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(); @@ -855,7 +824,6 @@ } else { - titlePane->SetPicture(NULL, NULL); titlePane->SetTextToDefaultL(); } diff -r 3c0683f9f72c -r 3a22449b5c73 engine/group/engine.mmp --- a/engine/group/engine.mmp Wed Mar 10 10:50:53 2010 +0000 +++ b/engine/group/engine.mmp Fri Mar 12 09:53:46 2010 +0000 @@ -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 diff -r 3c0683f9f72c -r 3a22449b5c73 engine/inc/PodcastModel.h --- a/engine/inc/PodcastModel.h Wed Mar 10 10:50:53 2010 +0000 +++ b/engine/inc/PodcastModel.h Fri Mar 12 09:53:46 2010 +0000 @@ -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(); @@ -108,7 +106,6 @@ CFeedEngine* iFeedEngine; CShowEngine* iShowEngine; - CSoundEngine* iSoundEngine; CSettingsEngine *iSettingsEngine; CConnectionEngine* iConnectionEngine; RShowInfoArray iActiveShowList; diff -r 3c0683f9f72c -r 3a22449b5c73 engine/src/PodcastModel.cpp --- a/engine/src/PodcastModel.cpp Wed Mar 10 10:50:53 2010 +0000 +++ b/engine/src/PodcastModel.cpp Fri Mar 12 09:53:46 2010 +0000 @@ -19,7 +19,6 @@ #include #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() { diff -r 3c0683f9f72c -r 3a22449b5c73 engine/src/SettingsEngine.cpp --- a/engine/src/SettingsEngine.cpp Wed Mar 10 10:50:53 2010 +0000 +++ b/engine/src/SettingsEngine.cpp Fri Mar 12 09:53:46 2010 +0000 @@ -19,7 +19,6 @@ #include #include #include "SettingsEngine.h" -#include "SoundEngine.h" #include "FeedEngine.h" #include "ShowEngine.h" diff -r 3c0683f9f72c -r 3a22449b5c73 engine/src/ShowEngine.cpp --- a/engine/src/ShowEngine.cpp Wed Mar 10 10:50:53 2010 +0000 +++ b/engine/src/ShowEngine.cpp Fri Mar 12 09:53:46 2010 +0000 @@ -24,7 +24,6 @@ #include "SettingsEngine.h" #include #include -#include "SoundEngine.h" #include "debug.h" #include "PodcastUtils.h" @@ -1065,11 +1064,6 @@ 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); DBUpdateShowL(*aShowInfoArray[i]);