Added #define to enable/disable MPX integration, since it requires capabilities that can't be granted when self signed
authorSebastian Brannstrom <sebastianb@symbian.org>
Thu, 22 Jul 2010 10:22:58 +0100
changeset 200 79076725bab9
parent 199 3d1a62b029ef
child 201 4b8ca3632bf6
Added #define to enable/disable MPX integration, since it requires capabilities that can't be granted when self signed
application/group/Podcast.mmp
application/sis/podcatcher_udeb.sis
application/sis/podcatcher_udeb_signed.sis
engine/group/engine.mmp
engine/inc/ShowEngine.h
engine/src/ShowEngine.cpp
--- a/application/group/Podcast.mmp	Thu Jul 22 10:22:28 2010 +0100
+++ b/application/group/Podcast.mmp	Thu Jul 22 10:22:58 2010 +0100
@@ -15,12 +15,20 @@
  * Description:
  *
  */
+  
+// MPX integration can not be enabled for self signed versions 
+MACRO ENABLE_MPX_INTEGRATION
+#define ENABLE_MPX_INTEGRATION
 
 TARGET			Podcast.exe
 TARGETTYPE  	exe
 UID				0x100039CE 0xA0009D00  
 
+#ifdef ENABLE_MPX_INTEGRATION
 CAPABILITY NetworkServices UserEnvironment WriteUserData ReadDeviceData WriteDeviceData MultimediaDD
+#else
+CAPABILITY NetworkServices UserEnvironment
+#endif
 
 EPOCSTACKSIZE 81920
 EPOCHEAPSIZE 1024000 32768000
Binary file application/sis/podcatcher_udeb.sis has changed
Binary file application/sis/podcatcher_udeb_signed.sis has changed
--- a/engine/group/engine.mmp	Thu Jul 22 10:22:28 2010 +0100
+++ b/engine/group/engine.mmp	Thu Jul 22 10:22:58 2010 +0100
@@ -16,6 +16,10 @@
  *
  */
  
+// MPX integration can not be enabled for self signed versions 
+MACRO ENABLE_MPX_INTEGRATION
+#define ENABLE_MPX_INTEGRATION
+ 
 TARGET podcastengine.dll
 TARGETTYPE DLL
 UID             0x1000008d 0xA11F867F
@@ -67,8 +71,9 @@
 LIBRARY imageconversion.lib 
 LIBRARY bitmaptransforms.lib 
 LIBRARY eikcore.lib 
+#ifdef ENABLE_MPX_INTEGRATION  
 LIBRARY mpxcollectionhelper.lib
-LIBRARY apmime.lib    // TDataType
+#endif
 LIBRARY commonui.lib  // CDocumentHandler
 LIBRARY apparc.lib
 LIBRARY avkon.lib
--- a/engine/inc/ShowEngine.h	Thu Jul 22 10:22:28 2010 +0100
+++ b/engine/inc/ShowEngine.h	Thu Jul 22 10:22:58 2010 +0100
@@ -28,17 +28,22 @@
 #include "ShowEngineObserver.h"
 #include "MetaDataReader.h"
 #include <sqlite3.h>
+#ifdef ENABLE_MPX_INTEGRATION    
 #include "mpxcollectionhelper.h"
 #include "mpxcollectionhelperobserver.h"
+#endif
 
 struct TDownload
 	{
 	TUint iIndex;
 	TUint iUid;
 	};
-
+#ifdef ENABLE_MPX_INTEGRATION    
 class CShowEngine : public CBase, public MHttpClientObserver, public MMetaDataReaderObserver,
 					public MMPXCollectionHelperObserver
+#else
+class CShowEngine : public CBase, public MHttpClientObserver, public MMetaDataReaderObserver
+#endif
 {
 public:
 	IMPORT_C static CShowEngine* NewL(CPodcastModel& aPodcastModel);
@@ -156,8 +161,9 @@
 	
 	sqlite3& iDB;
     TBuf<KDefaultSQLDataBufferLength> iSqlBuffer;
-    
+#ifdef ENABLE_MPX_INTEGRATION    
     MMPXCollectionHelper* iCollectionHelper;
+#endif
 };
 
 #endif /*SHOWENGINE_H_*/
--- a/engine/src/ShowEngine.cpp	Thu Jul 22 10:22:28 2010 +0100
+++ b/engine/src/ShowEngine.cpp	Thu Jul 22 10:22:58 2010 +0100
@@ -44,9 +44,10 @@
 	delete iShowDownloading;
 	delete iMetaDataReader;
 	iApaSession.Close();
-	
+#ifdef ENABLE_MPX_INTEGRATION  	
 	if (iCollectionHelper)
 		delete iCollectionHelper;
+#endif
 	}
 
 EXPORT_C CShowEngine* CShowEngine::NewL(CPodcastModel& aPodcastModel)
@@ -236,12 +237,13 @@
 
 void CShowEngine::AddShowToMpxCollection(CShowInfo &aShowInfo)
 	{
+#ifdef ENABLE_MPX_INTEGRATION
 	if (!iCollectionHelper)
 		iCollectionHelper = CMPXCollectionHelperFactory::NewCollectionHelperL();
 	
 	// if this leaves, not much we can do anyway
 	TRAP_IGNORE(iCollectionHelper->AddL(aShowInfo.FileName(), this));
-
+#endif
 	}
 
 void CShowEngine::CompleteL(CHttpClient* /*aHttpClient*/, TInt aError)