Merge from Teknologs branch
authorLars Persson <lars.persson@embeddev.se>
Thu, 01 Apr 2010 11:41:33 +0200
changeset 99 41d00e97e2f7
parent 98 523e04129df6 (diff)
parent 96 a8538f50e2ba (current diff)
child 100 e0fc52a5df4d
Merge from Teknologs branch
application/inc/PodcastFeedView.h
application/src/PodcastAppui.cpp
engine/src/FeedEngine.cpp
test.txt
--- a/application/inc/PodcastFeedView.h	Wed Mar 31 16:09:11 2010 +0100
+++ b/application/inc/PodcastFeedView.h	Thu Apr 01 11:41:33 2010 +0200
@@ -119,7 +119,6 @@
 		TBool iFirstActivateAfterLaunch;
 		TOpmlState iOpmlState;
 		TBool iViewingShows;
-		RArray<TInt> iFeedIdForIconArray;
 };
 
 #endif // PODCASTFEEDVIEWH
--- a/application/src/PodcastAppui.cpp	Wed Mar 31 16:09:11 2010 +0100
+++ b/application/src/PodcastAppui.cpp	Thu Apr 01 11:41:33 2010 +0200
@@ -127,8 +127,8 @@
             }
         case EEikCmdExit:
         	{
-			TApaTask task(CEikonEnv::Static()->WsSession());
-			task.SetWgId(CEikonEnv::Static()->RootWin().Identifier());
+			TApaTask task(iEikonEnv->WsSession());
+			task.SetWgId(iEikonEnv->RootWin().Identifier());
 			task.SendToBackground(); 
 			break;
         	}
--- a/engine/BWINS/podcastengineu.def	Wed Mar 31 16:09:11 2010 +0100
+++ b/engine/BWINS/podcastengineu.def	Thu Apr 01 11:41:33 2010 +0200
@@ -121,54 +121,55 @@
 	?SetFeedIcon@CFeedInfo@@QAEXPAVCFbsBitmap@@@Z @ 120 NONAME ; void CFeedInfo::SetFeedIcon(class CFbsBitmap *)
 	?SetFeedUid@CShowInfo@@QAEXI@Z @ 121 NONAME ; void CShowInfo::SetFeedUid(unsigned int)
 	?SetFileNameL@CShowInfo@@QAEXABVTDesC16@@@Z @ 122 NONAME ; void CShowInfo::SetFileNameL(class TDesC16 const &)
-	?SetImageFileNameL@CFeedInfo@@QAEXABVTDesC16@@@Z @ 123 NONAME ; void CFeedInfo::SetImageFileNameL(class TDesC16 const &)
-	?SetImageUrlL@CFeedInfo@@QAEXABVTDesC16@@@Z @ 124 NONAME ; void CFeedInfo::SetImageUrlL(class TDesC16 const &)
-	?SetLastError@CFeedInfo@@QAEXH@Z @ 125 NONAME ; void CFeedInfo::SetLastError(int)
-	?SetLastError@CShowInfo@@QAEXH@Z @ 126 NONAME ; void CShowInfo::SetLastError(int)
-	?SetLastUpdated@CFeedInfo@@QAEXVTTime@@@Z @ 127 NONAME ; void CFeedInfo::SetLastUpdated(class TTime)
-	?SetLinkL@CFeedInfo@@QAEXABVTDesC16@@@Z @ 128 NONAME ; void CFeedInfo::SetLinkL(class TDesC16 const &)
-	?SetPlayState@CShowInfo@@QAEXW4TPlayState@@@Z @ 129 NONAME ; void CShowInfo::SetPlayState(enum TPlayState)
-	?SetPlayTime@CShowInfo@@QAEXI@Z @ 130 NONAME ; void CShowInfo::SetPlayTime(unsigned int)
-	?SetPlayingPodcast@CPodcastModel@@QAEXPAVCShowInfo@@@Z @ 131 NONAME ; void CPodcastModel::SetPlayingPodcast(class CShowInfo *)
-	?SetPosition@CShowInfo@@QAEXVTTimeIntervalMicroSeconds@@@Z @ 132 NONAME ; void CShowInfo::SetPosition(class TTimeIntervalMicroSeconds)
-	?SetPosition@CSoundEngine@@QAEXI@Z @ 133 NONAME ; void CSoundEngine::SetPosition(unsigned int)
-	?SetPubDate@CShowInfo@@QAEXVTTime@@@Z @ 134 NONAME ; void CShowInfo::SetPubDate(class TTime)
-	?SetShowSize@CShowInfo@@QAEXI@Z @ 135 NONAME ; void CShowInfo::SetShowSize(unsigned int)
-	?SetShowType@CShowInfo@@QAEXW4TShowType@@@Z @ 136 NONAME ; void CShowInfo::SetShowType(enum TShowType)
-	?SetSpecificIAP@CSettingsEngine@@QAEXH@Z @ 137 NONAME ; void CSettingsEngine::SetSpecificIAP(int)
-	?SetTitleL@CFeedInfo@@QAEXABVTDesC16@@@Z @ 138 NONAME ; void CFeedInfo::SetTitleL(class TDesC16 const &)
-	?SetTitleL@CShowInfo@@QAEXABVTDesC16@@@Z @ 139 NONAME ; void CShowInfo::SetTitleL(class TDesC16 const &)
-	?SetTrackNo@CShowInfo@@QAEXI@Z @ 140 NONAME ; void CShowInfo::SetTrackNo(unsigned int)
-	?SetUid@CShowInfo@@QAEXI@Z @ 141 NONAME ; void CShowInfo::SetUid(unsigned int)
-	?SetUpdateAutomatically@CSettingsEngine@@QAEXW4TAutoUpdateSetting@@@Z @ 142 NONAME ; void CSettingsEngine::SetUpdateAutomatically(enum TAutoUpdateSetting)
-	?SetUpdateFeedInterval@CSettingsEngine@@QAEXH@Z @ 143 NONAME ; void CSettingsEngine::SetUpdateFeedInterval(int)
-	?SetUpdateFeedTime@CSettingsEngine@@QAEXVTTime@@@Z @ 144 NONAME ; void CSettingsEngine::SetUpdateFeedTime(class TTime)
-	?SetUrlL@CFeedInfo@@QAEXABVTDesC16@@@Z @ 145 NONAME ; void CFeedInfo::SetUrlL(class TDesC16 const &)
-	?SetUrlL@CShowInfo@@QAEXABVTDesC16@@@Z @ 146 NONAME ; void CShowInfo::SetUrlL(class TDesC16 const &)
-	?SettingsEngine@CPodcastModel@@QAEAAVCSettingsEngine@@XZ @ 147 NONAME ; class CSettingsEngine & CPodcastModel::SettingsEngine(void)
-	?ShowDownloading@CShowEngine@@QAEPAVCShowInfo@@XZ @ 148 NONAME ; class CShowInfo * CShowEngine::ShowDownloading(void)
-	?ShowEngine@CPodcastModel@@QAEAAVCShowEngine@@XZ @ 149 NONAME ; class CShowEngine & CPodcastModel::ShowEngine(void)
-	?ShowSize@CShowInfo@@QBEIXZ @ 150 NONAME ; unsigned int CShowInfo::ShowSize(void) const
-	?ShowType@CShowInfo@@QBE?AW4TShowType@@XZ @ 151 NONAME ; enum TShowType CShowInfo::ShowType(void) const
-	?SoundEngine@CPodcastModel@@QAEAAVCSoundEngine@@XZ @ 152 NONAME ; class CSoundEngine & CPodcastModel::SoundEngine(void)
-	?SpecificIAP@CSettingsEngine@@QAEHXZ @ 153 NONAME ; int CSettingsEngine::SpecificIAP(void)
-	?State@CSoundEngine@@QAE?AW4TSoundEngineState@@XZ @ 154 NONAME ; enum TSoundEngineState CSoundEngine::State(void)
-	?Stop@CSoundEngine@@QAEXH@Z @ 155 NONAME ; void CSoundEngine::Stop(int)
-	?SuspendDownloads@CShowEngine@@QAEXXZ @ 156 NONAME ; void CShowEngine::SuspendDownloads(void)
-	?Title@CFeedInfo@@QBEABVTDesC16@@XZ @ 157 NONAME ; class TDesC16 const & CFeedInfo::Title(void) const
-	?Title@CShowInfo@@QBEABVTDesC16@@XZ @ 158 NONAME ; class TDesC16 const & CShowInfo::Title(void) const
-	?TrackNo@CShowInfo@@QBEIXZ @ 159 NONAME ; unsigned int CShowInfo::TrackNo(void) const
-	?Uid@CFeedInfo@@QBEIXZ @ 160 NONAME ; unsigned int CFeedInfo::Uid(void) const
-	?Uid@CShowInfo@@QBEIXZ @ 161 NONAME ; unsigned int CShowInfo::Uid(void) const
-	?UpdateAllFeedsL@CFeedEngine@@QAEXH@Z @ 162 NONAME ; void CFeedEngine::UpdateAllFeedsL(int)
-	?UpdateAutomatically@CSettingsEngine@@QAE?AW4TAutoUpdateSetting@@XZ @ 163 NONAME ; enum TAutoUpdateSetting CSettingsEngine::UpdateAutomatically(void)
-	?UpdateFeed@CFeedEngine@@QAEXPAVCFeedInfo@@@Z @ 164 NONAME ; void CFeedEngine::UpdateFeed(class CFeedInfo *)
-	?UpdateFeedInterval@CSettingsEngine@@QAEHXZ @ 165 NONAME ; int CSettingsEngine::UpdateFeedInterval(void)
-	?UpdateFeedL@CFeedEngine@@QAEHI@Z @ 166 NONAME ; int CFeedEngine::UpdateFeedL(unsigned int)
-	?UpdateFeedTime@CSettingsEngine@@QAE?AVTTime@@XZ @ 167 NONAME ; class TTime CSettingsEngine::UpdateFeedTime(void)
-	?UpdateIAPListL@CPodcastModel@@QAEXXZ @ 168 NONAME ; void CPodcastModel::UpdateIAPListL(void)
-	?UpdateSNAPListL@CPodcastModel@@QAEXXZ @ 169 NONAME ; void CPodcastModel::UpdateSNAPListL(void)
-	?UpdateShow@CShowEngine@@QAEXAAVCShowInfo@@@Z @ 170 NONAME ; void CShowEngine::UpdateShow(class CShowInfo &)
-	?Url@CFeedInfo@@QBEABVTDesC16@@XZ @ 171 NONAME ; class TDesC16 const & CFeedInfo::Url(void) const
-	?NewL@CImageHandler@@SAPAV1@AAVRFs@@AAVCPodcastModel@@@Z @ 172 NONAME ; class CImageHandler * CImageHandler::NewL(class RFs &, class CPodcastModel &)
-	?NewLC@CImageHandler@@SAPAV1@AAVRFs@@AAVCPodcastModel@@@Z @ 173 NONAME ; class CImageHandler * CImageHandler::NewLC(class RFs &, class CPodcastModel &)
+	?NewL@CImageHandler@@SAPAV1@AAVRFs@@AAVCPodcastModel@@@Z @ 123 NONAME ; class CImageHandler * CImageHandler::NewL(class RFs &, class CPodcastModel &)
+	?NewLC@CImageHandler@@SAPAV1@AAVRFs@@AAVCPodcastModel@@@Z @ 124 NONAME ; class CImageHandler * CImageHandler::NewLC(class RFs &, class CPodcastModel &)
+	?SetImageFileNameL@CFeedInfo@@QAEXABVTDesC16@@PAVCPodcastModel@@@Z @ 125 NONAME ; void CFeedInfo::SetImageFileNameL(class TDesC16 const &, class CPodcastModel *)
+	?SetImageUrlL@CFeedInfo@@QAEXABVTDesC16@@@Z @ 126 NONAME ; void CFeedInfo::SetImageUrlL(class TDesC16 const &)
+	?SetLastError@CFeedInfo@@QAEXH@Z @ 127 NONAME ; void CFeedInfo::SetLastError(int)
+	?SetLastError@CShowInfo@@QAEXH@Z @ 128 NONAME ; void CShowInfo::SetLastError(int)
+	?SetLastUpdated@CFeedInfo@@QAEXVTTime@@@Z @ 129 NONAME ; void CFeedInfo::SetLastUpdated(class TTime)
+	?SetLinkL@CFeedInfo@@QAEXABVTDesC16@@@Z @ 130 NONAME ; void CFeedInfo::SetLinkL(class TDesC16 const &)
+	?SetPlayState@CShowInfo@@QAEXW4TPlayState@@@Z @ 131 NONAME ; void CShowInfo::SetPlayState(enum TPlayState)
+	?SetPlayTime@CShowInfo@@QAEXI@Z @ 132 NONAME ; void CShowInfo::SetPlayTime(unsigned int)
+	?SetPlayingPodcast@CPodcastModel@@QAEXPAVCShowInfo@@@Z @ 133 NONAME ; void CPodcastModel::SetPlayingPodcast(class CShowInfo *)
+	?SetPosition@CShowInfo@@QAEXVTTimeIntervalMicroSeconds@@@Z @ 134 NONAME ; void CShowInfo::SetPosition(class TTimeIntervalMicroSeconds)
+	?SetPosition@CSoundEngine@@QAEXI@Z @ 135 NONAME ; void CSoundEngine::SetPosition(unsigned int)
+	?SetPubDate@CShowInfo@@QAEXVTTime@@@Z @ 136 NONAME ; void CShowInfo::SetPubDate(class TTime)
+	?SetShowSize@CShowInfo@@QAEXI@Z @ 137 NONAME ; void CShowInfo::SetShowSize(unsigned int)
+	?SetShowType@CShowInfo@@QAEXW4TShowType@@@Z @ 138 NONAME ; void CShowInfo::SetShowType(enum TShowType)
+	?SetSpecificIAP@CSettingsEngine@@QAEXH@Z @ 139 NONAME ; void CSettingsEngine::SetSpecificIAP(int)
+	?SetTitleL@CFeedInfo@@QAEXABVTDesC16@@@Z @ 140 NONAME ; void CFeedInfo::SetTitleL(class TDesC16 const &)
+	?SetTitleL@CShowInfo@@QAEXABVTDesC16@@@Z @ 141 NONAME ; void CShowInfo::SetTitleL(class TDesC16 const &)
+	?SetTrackNo@CShowInfo@@QAEXI@Z @ 142 NONAME ; void CShowInfo::SetTrackNo(unsigned int)
+	?SetUid@CShowInfo@@QAEXI@Z @ 143 NONAME ; void CShowInfo::SetUid(unsigned int)
+	?SetUpdateAutomatically@CSettingsEngine@@QAEXW4TAutoUpdateSetting@@@Z @ 144 NONAME ; void CSettingsEngine::SetUpdateAutomatically(enum TAutoUpdateSetting)
+	?SetUpdateFeedInterval@CSettingsEngine@@QAEXH@Z @ 145 NONAME ; void CSettingsEngine::SetUpdateFeedInterval(int)
+	?SetUpdateFeedTime@CSettingsEngine@@QAEXVTTime@@@Z @ 146 NONAME ; void CSettingsEngine::SetUpdateFeedTime(class TTime)
+	?SetUrlL@CFeedInfo@@QAEXABVTDesC16@@@Z @ 147 NONAME ; void CFeedInfo::SetUrlL(class TDesC16 const &)
+	?SetUrlL@CShowInfo@@QAEXABVTDesC16@@@Z @ 148 NONAME ; void CShowInfo::SetUrlL(class TDesC16 const &)
+	?SettingsEngine@CPodcastModel@@QAEAAVCSettingsEngine@@XZ @ 149 NONAME ; class CSettingsEngine & CPodcastModel::SettingsEngine(void)
+	?ShowDownloading@CShowEngine@@QAEPAVCShowInfo@@XZ @ 150 NONAME ; class CShowInfo * CShowEngine::ShowDownloading(void)
+	?ShowEngine@CPodcastModel@@QAEAAVCShowEngine@@XZ @ 151 NONAME ; class CShowEngine & CPodcastModel::ShowEngine(void)
+	?ShowSize@CShowInfo@@QBEIXZ @ 152 NONAME ; unsigned int CShowInfo::ShowSize(void) const
+	?ShowType@CShowInfo@@QBE?AW4TShowType@@XZ @ 153 NONAME ; enum TShowType CShowInfo::ShowType(void) const
+	?SoundEngine@CPodcastModel@@QAEAAVCSoundEngine@@XZ @ 154 NONAME ; class CSoundEngine & CPodcastModel::SoundEngine(void)
+	?SpecificIAP@CSettingsEngine@@QAEHXZ @ 155 NONAME ; int CSettingsEngine::SpecificIAP(void)
+	?State@CSoundEngine@@QAE?AW4TSoundEngineState@@XZ @ 156 NONAME ; enum TSoundEngineState CSoundEngine::State(void)
+	?Stop@CSoundEngine@@QAEXH@Z @ 157 NONAME ; void CSoundEngine::Stop(int)
+	?SuspendDownloads@CShowEngine@@QAEXXZ @ 158 NONAME ; void CShowEngine::SuspendDownloads(void)
+	?Title@CFeedInfo@@QBEABVTDesC16@@XZ @ 159 NONAME ; class TDesC16 const & CFeedInfo::Title(void) const
+	?Title@CShowInfo@@QBEABVTDesC16@@XZ @ 160 NONAME ; class TDesC16 const & CShowInfo::Title(void) const
+	?TrackNo@CShowInfo@@QBEIXZ @ 161 NONAME ; unsigned int CShowInfo::TrackNo(void) const
+	?Uid@CFeedInfo@@QBEIXZ @ 162 NONAME ; unsigned int CFeedInfo::Uid(void) const
+	?Uid@CShowInfo@@QBEIXZ @ 163 NONAME ; unsigned int CShowInfo::Uid(void) const
+	?UpdateAllFeedsL@CFeedEngine@@QAEXH@Z @ 164 NONAME ; void CFeedEngine::UpdateAllFeedsL(int)
+	?UpdateAutomatically@CSettingsEngine@@QAE?AW4TAutoUpdateSetting@@XZ @ 165 NONAME ; enum TAutoUpdateSetting CSettingsEngine::UpdateAutomatically(void)
+	?UpdateFeed@CFeedEngine@@QAEXPAVCFeedInfo@@@Z @ 166 NONAME ; void CFeedEngine::UpdateFeed(class CFeedInfo *)
+	?UpdateFeedInterval@CSettingsEngine@@QAEHXZ @ 167 NONAME ; int CSettingsEngine::UpdateFeedInterval(void)
+	?UpdateFeedL@CFeedEngine@@QAEHI@Z @ 168 NONAME ; int CFeedEngine::UpdateFeedL(unsigned int)
+	?UpdateFeedTime@CSettingsEngine@@QAE?AVTTime@@XZ @ 169 NONAME ; class TTime CSettingsEngine::UpdateFeedTime(void)
+	?UpdateIAPListL@CPodcastModel@@QAEXXZ @ 170 NONAME ; void CPodcastModel::UpdateIAPListL(void)
+	?UpdateSNAPListL@CPodcastModel@@QAEXXZ @ 171 NONAME ; void CPodcastModel::UpdateSNAPListL(void)
+	?UpdateShow@CShowEngine@@QAEXAAVCShowInfo@@@Z @ 172 NONAME ; void CShowEngine::UpdateShow(class CShowInfo &)
+	?Url@CFeedInfo@@QBEABVTDesC16@@XZ @ 173 NONAME ; class TDesC16 const & CFeedInfo::Url(void) const
+
--- a/engine/inc/FeedInfo.h	Wed Mar 31 16:09:11 2010 +0100
+++ b/engine/inc/FeedInfo.h	Thu Apr 01 11:41:33 2010 +0200
@@ -60,7 +60,7 @@
 		IMPORT_C TUint Uid() const;
 
 		IMPORT_C const TDesC& ImageFileName() const;
-		IMPORT_C void SetImageFileNameL(const TDesC &aFileName);
+		IMPORT_C void SetImageFileNameL(const TDesC &aFileName, CPodcastModel* aPodcastModel);
 			
 		IMPORT_C void SetCustomTitle();
 		IMPORT_C TBool CustomTitle() const;
--- a/engine/src/FeedInfo.cpp	Wed Mar 31 16:09:11 2010 +0100
+++ b/engine/src/FeedInfo.cpp	Thu Apr 01 11:41:33 2010 +0200
@@ -53,7 +53,7 @@
 	copy->SetBuildDate(BuildDate());
 	copy->SetLastUpdated(LastUpdated());
 	copy->iFeedIcon->Duplicate(iFeedIcon->Handle());
-	copy->SetImageFileNameL(ImageFileName());
+	copy->SetImageFileNameL(ImageFileName(), NULL);
 	if(CustomTitle())
 		{
 		copy->SetCustomTitle();
@@ -193,7 +193,7 @@
 	return iImageFileName ? *iImageFileName : KNullDesC();
 	}
 
-EXPORT_C void CFeedInfo::SetImageFileNameL(const TDesC& aFileName)
+EXPORT_C void CFeedInfo::SetImageFileNameL(const TDesC& aFileName, CPodcastModel* aPodcastModel)
 	{
 	TFileName cacheFileName;
 	
@@ -202,15 +202,22 @@
 		delete iImageFileName;
 		iImageFileName = NULL;
 		}
+	
 	iImageFileName = aFileName.AllocL();
 	TParsePtrC parser(*iImageFileName);
 	cacheFileName = parser.DriveAndPath();
 	cacheFileName.Append(parser.Name());
 	cacheFileName.Append(KMbmExtension());
+	
 	if( iFeedIcon->SizeInPixels() == TSize(0,0) && BaflUtils::FileExists(CEikonEnv::Static()->FsSession(), cacheFileName) )
 		{
 		iFeedIcon = CEikonEnv::Static()->CreateBitmapL(cacheFileName, 0);
-		}	
+		}
+	else if(aPodcastModel &&  BaflUtils::FileExists(CEikonEnv::Static()->FsSession(), ImageFileName() ))
+		{
+		// If this fails, no reason to worry
+		TRAP_IGNORE(aPodcastModel->ImageHandler().LoadFileAndScaleL(FeedIcon(), ImageFileName(), TSize(64,56), *this, Uid()));
+		}		
 	} 
 
 EXPORT_C TBool CFeedInfo::CustomTitle() const