omadrm/drmengine/dcf/src/Oma2Dcf.cpp
branchRCL_3
changeset 32 457cd4423b8c
parent 18 8a03a285ab14
child 71 1221b68b8a5f
equal deleted inserted replaced
25:04da681812a9 32:457cd4423b8c
     1 /*
     1 /*
     2 * Copyright (c) 2002 - 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2002 - 2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    21 #include <e32const.h> // KMaxTUint32
    21 #include <e32const.h> // KMaxTUint32
    22 #include <e32cmn.h> // Max, Min
    22 #include <e32cmn.h> // Max, Min
    23 #include <e32base.h>
    23 #include <e32base.h>
    24 #include <f32file.h>
    24 #include <f32file.h>
    25 #include <utf.h>
    25 #include <utf.h>
       
    26 #include <featmgr.h>
    26 #include <caf/caf.h>
    27 #include <caf/caf.h>
    27 #include <caf/cafplatform.h>
    28 #include <caf/cafplatform.h>
    28 #include "Oma2Agent.h"
    29 #include "Oma2Agent.h"
    29 #include "oma2dcf.h"
    30 #include "oma2dcf.h"
    30 #include "Oma2DcfPartInfo.h"
    31 #include "Oma2DcfPartInfo.h"
   289 //
   290 //
   290 EXPORT_C TBool COma2Dcf::IsValidDcf(
   291 EXPORT_C TBool COma2Dcf::IsValidDcf(
   291     const TDesC8& aDcfFragment )
   292     const TDesC8& aDcfFragment )
   292     {
   293     {
   293     TBool r( EFalse );
   294     TBool r( EFalse );
       
   295     TInt err( KErrNone );
   294 
   296 
   295     if ( aDcfFragment.Length() >= KBrandingSize &&
   297     if ( aDcfFragment.Length() >= KBrandingSize &&
   296         aDcfFragment.Left( KBrandingSize ).Compare( KOma2DcfBranding ) == 0 )
   298         aDcfFragment.Left( KBrandingSize ).Compare( KOma2DcfBranding ) == 0 )
   297         {
   299         {
   298         r = ETrue;
   300     
       
   301         TRAP( err, FeatureManager::InitializeLibL() );
       
   302     
       
   303         if ( !err && FeatureManager::FeatureSupported( KFeatureIdFfOmadrm2Support ) )
       
   304             {
       
   305             r = ETrue;
       
   306             }
       
   307         
       
   308         if ( !err )
       
   309             {
       
   310             FeatureManager::UnInitializeLib();
       
   311             }
       
   312         
   299         }
   313         }
   300     return r;
   314     return r;
   301     }
   315     }
   302 
   316 
   303 // -----------------------------------------------------------------------------
   317 // -----------------------------------------------------------------------------