mmfenh/enhancedmediaclient/Client/src/Components/ClientDataBufferSource/DRMConfigIntfcImpl.cpp
changeset 0 71ca22bcf22a
equal deleted inserted replaced
-1:000000000000 0:71ca22bcf22a
       
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Header of DRMConfigIntfcImpl object.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "DRMConfigIntfcImpl.h"
       
    20 
       
    21 // ---------------------------------------------------------------------------
       
    22 // Contructor
       
    23 // ---------------------------------------------------------------------------
       
    24 CDRMConfigIntcfImpl::CDRMConfigIntcfImpl( CClientDataBufferSource& aDRMHandler )
       
    25 :iDRMHandler(&aDRMHandler)
       
    26     {
       
    27     // No Impl
       
    28     }
       
    29 
       
    30 // ---------------------------------------------------------------------------
       
    31 // Destructor
       
    32 // ---------------------------------------------------------------------------
       
    33 CDRMConfigIntcfImpl::~CDRMConfigIntcfImpl()    
       
    34     {
       
    35     // No Impl
       
    36     }
       
    37 
       
    38 // ---------------------------------------------------------------------------
       
    39 // NewL Method
       
    40 // ---------------------------------------------------------------------------
       
    41 CDRMConfigIntcfImpl* CDRMConfigIntcfImpl::NewL( CClientDataBufferSource& aDRMHandler )
       
    42     {
       
    43     CDRMConfigIntcfImpl* self = new (ELeave)CDRMConfigIntcfImpl(aDRMHandler);
       
    44     CleanupStack::PushL(self);
       
    45     self->ConstructL();
       
    46     CleanupStack::Pop(self);
       
    47     return self;
       
    48     }
       
    49 
       
    50 // ---------------------------------------------------------------------------
       
    51 // Second Phase Contructor
       
    52 // ---------------------------------------------------------------------------
       
    53 void CDRMConfigIntcfImpl::ConstructL()
       
    54     {
       
    55     // No Impl
       
    56     }
       
    57 
       
    58 // ---------------------------------------------------------------------------
       
    59 // GetDRMType: This method gets the DRMType stored in the Client
       
    60 // ---------------------------------------------------------------------------
       
    61 TInt CDRMConfigIntcfImpl::GetDRMType( TDRMType& aDRMType )
       
    62     {
       
    63     return iDRMHandler->GetDRMType(aDRMType);
       
    64     }
       
    65 
       
    66 // ---------------------------------------------------------------------------
       
    67 // SetDRMType: This method Sets the DRMType stored in the Client
       
    68 // ---------------------------------------------------------------------------
       
    69 TInt CDRMConfigIntcfImpl::SetDRMType( TDRMType aDRMType )
       
    70     {
       
    71     return iDRMHandler->SetDRMType(aDRMType);
       
    72     }
       
    73 
       
    74 // ---------------------------------------------------------------------------
       
    75 // GetAllowedOutputDeviceCount
       
    76 // ---------------------------------------------------------------------------
       
    77 TInt CDRMConfigIntcfImpl::GetAllowedOutputDeviceCount( TInt& aCount )
       
    78     {
       
    79     return iDRMHandler->GetAllowedOutputDeviceCount(aCount);
       
    80     }
       
    81 
       
    82 
       
    83 // ---------------------------------------------------------------------------
       
    84 // GetAllowedOutputDevice
       
    85 // ---------------------------------------------------------------------------
       
    86 TInt CDRMConfigIntcfImpl::GetAllowedOutputDevice(
       
    87                 TInt aIndex,
       
    88                 TDRMAllowedOutputDevice& aOutputDevice )
       
    89     {
       
    90     return iDRMHandler->GetAllowedOutputDevice( aIndex, aOutputDevice );
       
    91     }
       
    92 
       
    93 // ---------------------------------------------------------------------------
       
    94 // AppendAllowedOutputDevice
       
    95 // ---------------------------------------------------------------------------
       
    96 TInt CDRMConfigIntcfImpl::AppendAllowedOutputDevice(
       
    97                         TDRMAllowedOutputDevice aOutputDevice )
       
    98     {
       
    99     return iDRMHandler->AppendAllowedOutputDevice(aOutputDevice);
       
   100     }
       
   101 
       
   102 // ---------------------------------------------------------------------------
       
   103 // RemoveAllowedOutputDevice
       
   104 // ---------------------------------------------------------------------------
       
   105 TInt CDRMConfigIntcfImpl::RemoveAllowedOutputDevice(
       
   106                         TDRMAllowedOutputDevice aOutputDevice )
       
   107     {
       
   108     return iDRMHandler->RemoveAllowedOutputDevice(aOutputDevice);
       
   109     }
       
   110 
       
   111 // ---------------------------------------------------------------------------
       
   112 // Reset
       
   113 // ---------------------------------------------------------------------------
       
   114 TInt CDRMConfigIntcfImpl::Reset()
       
   115     {
       
   116     return iDRMHandler->ResetDRMConfig();
       
   117     }
       
   118 
       
   119 // ---------------------------------------------------------------------------
       
   120 // Commit
       
   121 // ---------------------------------------------------------------------------
       
   122 TInt CDRMConfigIntcfImpl::Commit()
       
   123     {
       
   124     return iDRMHandler->CommitDRMConfig();
       
   125     }
       
   126 
       
   127 // End of file