engine/src/ShowEngine.cpp
changeset 82 c70a6524a236
parent 77 6284a24658d6
equal deleted inserted replaced
81:46e6a623d36d 82:c70a6524a236
    24 #include "SettingsEngine.h"
    24 #include "SettingsEngine.h"
    25 #include <e32hashtab.h>
    25 #include <e32hashtab.h>
    26 #include <httperr.h>
    26 #include <httperr.h>
    27 #include "debug.h"
    27 #include "debug.h"
    28 #include "PodcastUtils.h"
    28 #include "PodcastUtils.h"
    29 
    29 #include <mpxcollectionhelperfactory.h>
    30 //#include <mpxmedia.h>
       
    31 //#include <mpxattribute.h>
       
    32 //#include <mpxmediageneraldefs.h>
       
    33 
    30 
    34 const TUint KMaxDownloadErrors = 3;
    31 const TUint KMaxDownloadErrors = 3;
    35 const TInt KMimeBufLength = 100;
    32 const TInt KMimeBufLength = 100;
    36 
    33 
    37 CShowEngine::CShowEngine(CPodcastModel& aPodcastModel) :
    34 CShowEngine::CShowEngine(CPodcastModel& aPodcastModel) :
    45 	delete iShowClient;
    42 	delete iShowClient;
    46 	iObservers.Close();
    43 	iObservers.Close();
    47 	delete iShowDownloading;
    44 	delete iShowDownloading;
    48 	delete iMetaDataReader;
    45 	delete iMetaDataReader;
    49 	iApaSession.Close();
    46 	iApaSession.Close();
       
    47 	
       
    48 	if (iCollectionHelper)
       
    49 		delete iCollectionHelper;
    50 	}
    50 	}
    51 
    51 
    52 EXPORT_C CShowEngine* CShowEngine::NewL(CPodcastModel& aPodcastModel)
    52 EXPORT_C CShowEngine* CShowEngine::NewL(CPodcastModel& aPodcastModel)
    53 	{
    53 	{
    54 	CShowEngine* self = new (ELeave) CShowEngine(aPodcastModel);
    54 	CShowEngine* self = new (ELeave) CShowEngine(aPodcastModel);
   237 		{
   237 		{
   238 		iObservers.Remove(index);
   238 		iObservers.Remove(index);
   239 		}
   239 		}
   240 	}
   240 	}
   241 
   241 
   242 void CShowEngine::AddShowToMpxCollection(CShowInfo &/*aShowInfo*/)
   242 void CShowEngine::AddShowToMpxCollection(CShowInfo &aShowInfo)
   243 	{
   243 	{
   244 /*	RArray<TInt> contentIDs;
   244 	if (!iCollectionHelper)
   245 	contentIDs.AppendL( KMPXMediaIdGeneral );
   245 		iCollectionHelper = CMPXCollectionHelperFactory::NewCollectionHelperL();
   246 	
   246 	
   247 	CMPXMedia* media = CMPXMedia::NewL( contentIDs.Array() );
   247 	// if this leaves, not much we can do anyway
   248 	CleanupStack::PushL( media );
   248 	TRAP_IGNORE(iCollectionHelper->AddL(aShowInfo.FileName(), this));
   249 	contentIDs.Close();
   249 
   250 	CleanupStack::PopAndDestroy(media);   */
       
   251 	}
   250 	}
   252 
   251 
   253 void CShowEngine::CompleteL(CHttpClient* /*aHttpClient*/, TInt aError)
   252 void CShowEngine::CompleteL(CHttpClient* /*aHttpClient*/, TInt aError)
   254 	{
   253 	{
   255 	if (iShowDownloading != NULL)
   254 	if (iShowDownloading != NULL)