omadrm/drmengine/dm/src/DRMMessageParser.cpp
branchRCL_3
changeset 72 1481bf457703
parent 71 1221b68b8a5f
equal deleted inserted replaced
71:1221b68b8a5f 72:1481bf457703
    22 #include <s32file.h>
    22 #include <s32file.h>
    23 #include <s32mem.h>
    23 #include <s32mem.h>
    24 #include <caf/caftypes.h>
    24 #include <caf/caftypes.h>
    25 #include <wspdecoder.h>
    25 #include <wspdecoder.h>
    26 #include <wspencoder.h>
    26 #include <wspencoder.h>
       
    27 #include <featmgr.h>
    27 
    28 
    28 #ifdef RD_MULTIPLE_DRIVE
    29 #ifdef RD_MULTIPLE_DRIVE
    29 #include <driveinfo.h>
    30 #include <driveinfo.h>
    30 #endif
    31 #endif
    31 
    32 
   221     TRAP( error, FinalizeMessageParserL() );
   222     TRAP( error, FinalizeMessageParserL() );
   222 
   223 
   223     Reset();
   224     Reset();
   224 
   225 
   225     User::Free( const_cast< TUint8* >( iInputBuffer.Ptr() ) );
   226     User::Free( const_cast< TUint8* >( iInputBuffer.Ptr() ) );
       
   227     
       
   228     FeatureManager::UnInitializeLib();
       
   229     
   226     }
   230     }
   227 
   231 
   228 // -----------------------------------------------------------------------------
   232 // -----------------------------------------------------------------------------
   229 // CDRMMessageParser::
   233 // CDRMMessageParser::
   230 //
   234 //
   329 // Symbian 2nd phase constructor can leave.
   333 // Symbian 2nd phase constructor can leave.
   330 // -----------------------------------------------------------------------------
   334 // -----------------------------------------------------------------------------
   331 //
   335 //
   332 void CDRMMessageParser::ConstructL()
   336 void CDRMMessageParser::ConstructL()
   333     {
   337     {
       
   338     
       
   339     FeatureManager::InitializeLibL();
       
   340     
   334     // Make some extra room for crazy b64decode().
   341     // Make some extra room for crazy b64decode().
   335     iInputBuffer.Set( reinterpret_cast< TUint8* >(
   342     iInputBuffer.Set( reinterpret_cast< TUint8* >(
   336                         User::AllocL( KInputBufferSize + 2 ) ),
   343                         User::AllocL( KInputBufferSize + 2 ) ),
   337                       0,
   344                       0,
   338                       KInputBufferSize );
   345                       KInputBufferSize );
   484 
   491 
   485                 SetBit( EGotRightsPart );
   492                 SetBit( EGotRightsPart );
   486                 SetBit( EReadingHeaderPart );
   493                 SetBit( EReadingHeaderPart );
   487 
   494 
   488                 res.Set( NULL, 0 );
   495                 res.Set( NULL, 0 );
   489 #ifndef __DRM_FULL
   496                 
   490                 User::Leave(KErrNotSupported);
   497                 if ( !( FeatureManager::FeatureSupported(
   491 #endif
   498                         KFeatureIdFfOmadrm1FullSupport ) ) )
       
   499                     {
       
   500                     User::Leave(KErrNotSupported);
       
   501                     }  
   492                 }
   502                 }
   493             else
   503             else
   494                 {
   504                 {
   495                 SetBrokenStateL( KDRMMessageMalformed );
   505                 SetBrokenStateL( KDRMMessageMalformed );
   496                 }
   506                 }