omadrm/drmengine/agentv2/src/Oma2AgentManager.cpp
branchRCL_3
changeset 32 457cd4423b8c
parent 18 8a03a285ab14
child 41 29f3cf766061
equal deleted inserted replaced
25:04da681812a9 32:457cd4423b8c
     1 /*
     1 /*
     2 * Copyright (c) 2005 - 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2005 - 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".
    30 #include <apgtask.h>
    30 #include <apgtask.h>
    31 #include <apgcli.h>
    31 #include <apgcli.h>
    32 #include <apaserverapp.h>
    32 #include <apaserverapp.h>
    33 #include <sysutil.h>
    33 #include <sysutil.h>
    34 #include <centralrepository.h>
    34 #include <centralrepository.h>
       
    35 #include <featmgr.h>
    35 
    36 
    36 #include "Oma2AgentManager.h"
    37 #include "Oma2AgentManager.h"
    37 #include "Oma2AgentAttributes.h"
    38 #include "Oma2AgentAttributes.h"
    38 #include "Oma1Dcf.h"
    39 #include "Oma1Dcf.h"
    39 #include "oma2dcf.h"
    40 #include "oma2dcf.h"
   128             {
   129             {
   129             delete iOmaBasedMimeType;
   130             delete iOmaBasedMimeType;
   130             }
   131             }
   131         iOmaBasedMimeType = NULL;
   132         iOmaBasedMimeType = NULL;
   132         }
   133         }
   133 
   134     
       
   135     FeatureManager::InitializeLibL();
       
   136     
   134     }
   137     }
   135 
   138 
   136 // -----------------------------------------------------------------------------
   139 // -----------------------------------------------------------------------------
   137 // COma2AgentManager::FetchOmaBasedInfoL
   140 // COma2AgentManager::FetchOmaBasedInfoL
   138 // -----------------------------------------------------------------------------
   141 // -----------------------------------------------------------------------------
   198         delete iNotifier;
   201         delete iNotifier;
   199         }
   202         }
   200     delete iWatchedId;
   203     delete iWatchedId;
   201 
   204 
   202     delete iOmaBasedMimeType;
   205     delete iOmaBasedMimeType;
       
   206     
       
   207     FeatureManager::UnInitializeLib();
   203     }
   208     }
   204 
   209 
   205 // -----------------------------------------------------------------------------
   210 // -----------------------------------------------------------------------------
   206 // COma2AgentManager::DeleteFile
   211 // COma2AgentManager::DeleteFile
   207 // -----------------------------------------------------------------------------
   212 // -----------------------------------------------------------------------------
   721     {
   726     {
   722     TBool r = EFalse;
   727     TBool r = EFalse;
   723     TInt err = KErrNone;
   728     TInt err = KErrNone;
   724     CDcfCommon* dcf = NULL;
   729     CDcfCommon* dcf = NULL;
   725 
   730 
   726 #ifdef __DRM_OMA2
   731 #ifdef __DRM_OMA2   
   727     if ( !aFileName.Right(4).CompareF( KOma2DcfExtension ) ||
   732     if ( !aFileName.Right(4).CompareF( KOma2DcfExtension ) ||
   728         !aFileName.Right(4).CompareF( KOma2DcfExtensionAudio ) ||
   733             !aFileName.Right(4).CompareF( KOma2DcfExtensionAudio ) ||
   729         !aFileName.Right(4).CompareF( KOma2DcfExtensionVideo ) ||
   734             !aFileName.Right(4).CompareF( KOma2DcfExtensionVideo ) ||
   730         COma2Dcf::IsValidDcf(aBuffer) )
   735             COma2Dcf::IsValidDcf(aBuffer) )
   731         {
   736         {
   732         aFileMimeType.Copy(KOma2DcfContentType);
   737         aFileMimeType.Copy(KOma2DcfContentType);
   733         aContentMimeType.Copy(KCafMimeType);
   738         aContentMimeType.Copy(KCafMimeType);
   734         r = ETrue; // file was recognized as OMA2 DCF
   739         r = ETrue; // file was recognized as OMA2 DCF
   735         }
   740         }
   793         {
   798         {
   794         case EOmaDrmMethods:
   799         case EOmaDrmMethods:
   795                 {
   800                 {
   796                 aOutputBuffer.Copy(_L8("FL CD SD"));
   801                 aOutputBuffer.Copy(_L8("FL CD SD"));
   797 #ifdef __DRM_OMA2
   802 #ifdef __DRM_OMA2
   798                 aOutputBuffer.Append(_L8(" OMADRM2"));
   803                 if( FeatureManager::FeatureSupported( 
       
   804                         KFeatureIdFfOmadrm2Support ) )
       
   805                     {
       
   806                     aOutputBuffer.Append(_L8(" OMADRM2"));
       
   807                     }
   799 #endif
   808 #endif
   800                 }
   809                 }
   801             break;
   810             break;
   802         case ESetPendingRightsETA:
   811         case ESetPendingRightsETA:
   803                 {
   812                 {