omadrm/drmengine/roap/src/RoapEngBase.cpp
branchRCL_3
changeset 27 1481bf457703
parent 26 1221b68b8a5f
equal deleted inserted replaced
26:1221b68b8a5f 27:1481bf457703
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 // INCLUDE FILES
    19 // INCLUDE FILES
       
    20 #include <featmgr.h>
    20 #include <DRMRights.h>
    21 #include <DRMRights.h>
    21 #include <DRMRightsClient.h>
    22 #include <DRMRightsClient.h>
    22 // #include <GenericParam.h> // from S60
    23 // #include <GenericParam.h> // from S60
    23 #include "RoapEngBase.h"
    24 #include "RoapEngBase.h"
    24 #include "RoapHttpHandler.h"
    25 #include "RoapHttpHandler.h"
    48     delete iHttpHandler;
    49     delete iHttpHandler;
    49     delete iStoredRiContext;
    50     delete iStoredRiContext;
    50     iReturnedROs.ResetAndDestroy();
    51     iReturnedROs.ResetAndDestroy();
    51     delete iDomainRightsResp;
    52     delete iDomainRightsResp;
    52     delete iRiAlias;
    53     delete iRiAlias;
       
    54     
       
    55     FeatureManager::UnInitializeLib();
    53     }
    56     }
    54 
    57 
    55 // ---------------------------------------------------------
    58 // ---------------------------------------------------------
    56 // CRoapEngBase::CRoapEngBase()
    59 // CRoapEngBase::CRoapEngBase()
    57 // ---------------------------------------------------------
    60 // ---------------------------------------------------------
    76     iAllowedToContactRi = EFalse;
    79     iAllowedToContactRi = EFalse;
    77     iUseRiContextUrl = EFalse;
    80     iUseRiContextUrl = EFalse;
    78     iImplicitJoinDomain = EFalse;
    81     iImplicitJoinDomain = EFalse;
    79     iReRegistered = EFalse;
    82     iReRegistered = EFalse;
    80     iRiAlias = NULL;
    83     iRiAlias = NULL;
       
    84     
       
    85     FeatureManager::InitializeLibL();
    81     }
    86     }
    82 
    87 
    83 
    88 
    84 // ---------------------------------------------------------
    89 // ---------------------------------------------------------
    85 // CRoapEngBase::SetTriggerL()
    90 // CRoapEngBase::SetTriggerL()
    92     TDomainOperation& aDomainOperation,
    97     TDomainOperation& aDomainOperation,
    93     RPointerArray<HBufC8>& aContentIdList )
    98     RPointerArray<HBufC8>& aContentIdList )
    94     {
    99     {
    95     LOGLIT( "CRoapEngBase::SetTriggerL" )
   100     LOGLIT( "CRoapEngBase::SetTriggerL" )
    96 
   101 
    97 #ifndef __DRM_OMA2
   102     if ( !( FeatureManager::FeatureSupported( 
    98     User::Leave(KErrNotSupported);
   103             KFeatureIdFfOmadrm2Support ) ) )    
    99 #endif
   104         {
   100 
   105         User::Leave(KErrNotSupported);
       
   106         }
       
   107         
   101     __ASSERT_ALWAYS( iState == EInit || iState == EReady, \
   108     __ASSERT_ALWAYS( iState == EInit || iState == EReady, \
   102         User::Invariant() );
   109         User::Invariant() );
   103     TBool registered = EFalse;
   110     TBool registered = EFalse;
   104     TBool isValidDomainGeneration = ETrue;
   111     TBool isValidDomainGeneration = ETrue;
   105     TInt error = KErrNone;
   112     TInt error = KErrNone;