omadrm/drmengine/roap/src/RoapEngBase.cpp
branchRCL_3
changeset 72 1481bf457703
parent 71 1221b68b8a5f
--- a/omadrm/drmengine/roap/src/RoapEngBase.cpp	Tue Aug 31 15:29:38 2010 +0300
+++ b/omadrm/drmengine/roap/src/RoapEngBase.cpp	Wed Sep 01 12:21:16 2010 +0100
@@ -17,6 +17,7 @@
 
 
 // INCLUDE FILES
+#include <featmgr.h>
 #include <DRMRights.h>
 #include <DRMRightsClient.h>
 // #include <GenericParam.h> // from S60
@@ -50,6 +51,8 @@
     iReturnedROs.ResetAndDestroy();
     delete iDomainRightsResp;
     delete iRiAlias;
+    
+    FeatureManager::UnInitializeLib();
     }
 
 // ---------------------------------------------------------
@@ -78,6 +81,8 @@
     iImplicitJoinDomain = EFalse;
     iReRegistered = EFalse;
     iRiAlias = NULL;
+    
+    FeatureManager::InitializeLibL();
     }
 
 
@@ -94,10 +99,12 @@
     {
     LOGLIT( "CRoapEngBase::SetTriggerL" )
 
-#ifndef __DRM_OMA2
-    User::Leave(KErrNotSupported);
-#endif
-
+    if ( !( FeatureManager::FeatureSupported( 
+            KFeatureIdFfOmadrm2Support ) ) )    
+        {
+        User::Leave(KErrNotSupported);
+        }
+        
     __ASSERT_ALWAYS( iState == EInit || iState == EReady, \
         User::Invariant() );
     TBool registered = EFalse;