omadrm/drmengine/dcf/src/Oma2Dcf.cpp
branchRCL_3
changeset 71 1221b68b8a5f
parent 32 457cd4423b8c
child 72 1481bf457703
equal deleted inserted replaced
67:50c53e893c3f 71:1221b68b8a5f
     1 /*
     1 /*
     2 * Copyright (c) 2002 - 2010 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2002 - 2009 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>
       
    27 #include <caf/caf.h>
    26 #include <caf/caf.h>
    28 #include <caf/cafplatform.h>
    27 #include <caf/cafplatform.h>
    29 #include "Oma2Agent.h"
    28 #include "Oma2Agent.h"
    30 #include "oma2dcf.h"
    29 #include "oma2dcf.h"
    31 #include "Oma2DcfPartInfo.h"
    30 #include "Oma2DcfPartInfo.h"
   290 //
   289 //
   291 EXPORT_C TBool COma2Dcf::IsValidDcf(
   290 EXPORT_C TBool COma2Dcf::IsValidDcf(
   292     const TDesC8& aDcfFragment )
   291     const TDesC8& aDcfFragment )
   293     {
   292     {
   294     TBool r( EFalse );
   293     TBool r( EFalse );
   295     TInt err( KErrNone );
       
   296 
   294 
   297     if ( aDcfFragment.Length() >= KBrandingSize &&
   295     if ( aDcfFragment.Length() >= KBrandingSize &&
   298         aDcfFragment.Left( KBrandingSize ).Compare( KOma2DcfBranding ) == 0 )
   296         aDcfFragment.Left( KBrandingSize ).Compare( KOma2DcfBranding ) == 0 )
   299         {
   297         {
   300     
   298         r = ETrue;
   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         
       
   313         }
   299         }
   314     return r;
   300     return r;
   315     }
   301     }
   316 
   302 
   317 // -----------------------------------------------------------------------------
   303 // -----------------------------------------------------------------------------