omadrm/drmengine/dm/src/DRMMessageParser.cpp
branchRCL_3
changeset 32 457cd4423b8c
parent 18 8a03a285ab14
child 71 1221b68b8a5f
--- a/omadrm/drmengine/dm/src/DRMMessageParser.cpp	Tue Apr 27 16:56:11 2010 +0300
+++ b/omadrm/drmengine/dm/src/DRMMessageParser.cpp	Tue May 11 16:28:38 2010 +0300
@@ -24,6 +24,7 @@
 #include <caf/caftypes.h>
 #include <wspdecoder.h>
 #include <wspencoder.h>
+#include <featmgr.h>
 
 #ifdef RD_MULTIPLE_DRIVE
 #include <driveinfo.h>
@@ -223,6 +224,9 @@
     Reset();
 
     User::Free( const_cast< TUint8* >( iInputBuffer.Ptr() ) );
+    
+    FeatureManager::UnInitializeLib();
+    
     }
 
 // -----------------------------------------------------------------------------
@@ -331,6 +335,9 @@
 //
 void CDRMMessageParser::ConstructL()
     {
+    
+    FeatureManager::InitializeLibL();
+    
     // Make some extra room for crazy b64decode().
     iInputBuffer.Set( reinterpret_cast< TUint8* >(
                         User::AllocL( KInputBufferSize + 2 ) ),
@@ -486,9 +493,12 @@
                 SetBit( EReadingHeaderPart );
 
                 res.Set( NULL, 0 );
-#ifndef __DRM_FULL
-                User::Leave(KErrNotSupported);
-#endif
+                
+                if ( !( FeatureManager::FeatureSupported(
+                        KFeatureIdFfOmadrm1FullSupport ) ) )
+                    {
+                    User::Leave(KErrNotSupported);
+                    }  
                 }
             else
                 {