engine/src/PodcastModel.cpp
branchsymbian1
changeset 164 000f9fc147b2
parent 148 e3f9b65d6910
child 176 1c8b56cb6409
child 211 aa8e7de6f033
--- a/engine/src/PodcastModel.cpp	Tue Jul 06 03:44:46 2010 +0530
+++ b/engine/src/PodcastModel.cpp	Wed Jul 07 14:19:21 2010 +0100
@@ -31,6 +31,7 @@
 #include <aknserverapp.h>  // MAknServerAppExitObserver
 #include <DocumentHandler.h>
 
+
 const TInt KDefaultGranu = 5;
 _LIT(KDBFileName, "podcatcher.sqlite");
 _LIT(KDBTemplateFileName, "podcatcher.sqlite.template");
@@ -75,21 +76,26 @@
 {
 	DP("CPodcastModel::ConstructL BEGIN");
 	User::LeaveIfError(iFsSession.Connect());
-	
 	iCommDB = CCommsDatabase::NewL (EDatabaseTypeUnspecified);
-	//iCommDB ->ShowHiddenRecords(); // magic
 	iIapNameArray = new (ELeave) CDesCArrayFlat(KDefaultGranu);
 	iSNAPNameArray = new (ELeave) CDesCArrayFlat(KDefaultGranu);
-	iCmManager.OpenL();
+
 	iImageHandler = CImageHandler::NewL(FsSession(), *this);
 	iDocHandler = CDocumentHandler::NewL(CEikonEnv::Static()->Process());
-	UpdateIAPListL();
-	UpdateSNAPListL();
+
+	TRAPD(err,iCmManager.OpenL());
+	DP1("iCmManager.OpenL(),err=%d;", err);
+	
+	if (err == KErrNone)
+		{
+		UpdateIAPListL();
+		UpdateSNAPListL();
+		}
 	
 	iSettingsEngine = CSettingsEngine::NewL(*this);
 	iConnectionEngine = CConnectionEngine::NewL(*this);	
 	
-	TRAPD(err, OpenDBL());
+	TRAP(err, OpenDBL());
 	
 	if (err != KErrNone)
 		{
@@ -226,7 +232,7 @@
 	return *iConnectionEngine;
 }
 
-EXPORT_C void CPodcastModel::PlayPausePodcastL(CShowInfo* aPodcast, TBool /*aPlayOnInit*/) 
+EXPORT_C void CPodcastModel::PlayPausePodcastL(CShowInfo* aPodcast, TBool /* aPlayOnInit */) 
 	{
 	DP("CPodcastModel::PlayPausePodcastL BEGIN");
 	TRAPD(err, LaunchFileEmbeddedL(aPodcast->FileName()));
@@ -507,3 +513,4 @@
     //Handle closing the handler application
     MAknServerAppExitObserver::HandleServerAppExit(aReason);
     }
+