wmdrm/camese/wmdrmdla/src/wmdrmdlahandler.cpp
changeset 0 95b198f216e5
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Implementation class for WMDRM DLA functionality
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "wmdrmdlahandler.h"
       
    20 #include "wmdrmdlahandlerimpl.h"
       
    21 
       
    22 // ======== LOCAL FUNCTIONS ========
       
    23 
       
    24 // ======== MEMBER FUNCTIONS ========
       
    25 
       
    26 // ---------------------------------------------------------------------------
       
    27 // CWmDrmDlaHandler::ConstructL
       
    28 // ---------------------------------------------------------------------------
       
    29 //
       
    30 void CWmDrmDlaHandler::ConstructL()
       
    31     {
       
    32     iImpl = CWmDrmDlaHandlerImpl::NewL();
       
    33     }
       
    34 
       
    35 // ---------------------------------------------------------------------------
       
    36 // CWmDrmDlaHandler::CWmDrmDlaHandler
       
    37 // ---------------------------------------------------------------------------
       
    38 //
       
    39 CWmDrmDlaHandler::CWmDrmDlaHandler()
       
    40     {
       
    41     }
       
    42 
       
    43 // ---------------------------------------------------------------------------
       
    44 // CWmDrmDlaHandler::NewL
       
    45 // ---------------------------------------------------------------------------
       
    46 //
       
    47 EXPORT_C CWmDrmDlaHandler* CWmDrmDlaHandler::NewL()
       
    48     {
       
    49     CWmDrmDlaHandler* self = CWmDrmDlaHandler::NewLC();
       
    50     CleanupStack::Pop( self );
       
    51     return self;
       
    52     }
       
    53 
       
    54 
       
    55 // ---------------------------------------------------------------------------
       
    56 // CWmDrmDlaHandler::NewLC
       
    57 // ---------------------------------------------------------------------------
       
    58 //
       
    59 EXPORT_C CWmDrmDlaHandler* CWmDrmDlaHandler::NewLC()
       
    60     {
       
    61     CWmDrmDlaHandler* self = new( ELeave ) CWmDrmDlaHandler;
       
    62     CleanupStack::PushL( self );
       
    63     self->ConstructL();
       
    64     return self;
       
    65     }
       
    66 
       
    67 
       
    68 // ---------------------------------------------------------------------------
       
    69 // CWmDrmDlaHandler::~CWmDrmDlaHandler
       
    70 // ---------------------------------------------------------------------------
       
    71 //
       
    72 CWmDrmDlaHandler::~CWmDrmDlaHandler()
       
    73     {
       
    74     delete iImpl;
       
    75     }
       
    76 
       
    77 // ---------------------------------------------------------------------------
       
    78 // CWmDrmDlaHandler::SilentL
       
    79 // ---------------------------------------------------------------------------
       
    80 //
       
    81 EXPORT_C TBool CWmDrmDlaHandler::SilentL( 
       
    82     const RFile& aFile )
       
    83     {
       
    84     return iImpl->SilentL( aFile );
       
    85     }
       
    86 
       
    87 // ---------------------------------------------------------------------------
       
    88 // CWmDrmDlaHandler::AcquireLicenseL
       
    89 // ---------------------------------------------------------------------------
       
    90 //
       
    91 EXPORT_C void CWmDrmDlaHandler::AcquireLicenseL( 
       
    92     const RFile& aFile, 
       
    93     HBufC*& aContentUrl, 
       
    94     HBufC*& aHtmlData )
       
    95     {
       
    96     iImpl->AcquireLicenseL( aFile, aContentUrl, aHtmlData );
       
    97     }
       
    98 
       
    99 // ---------------------------------------------------------------------------
       
   100 // CWmDrmDlaHandler::AcquireLicense
       
   101 // ---------------------------------------------------------------------------
       
   102 //
       
   103 EXPORT_C void CWmDrmDlaHandler::AcquireLicense( 
       
   104     const RFile& aFile, 
       
   105     HBufC*& aContentUrl, 
       
   106     HBufC*& aHtmlData, 
       
   107     TRequestStatus& aStatus )
       
   108     {
       
   109     iImpl->AcquireLicense( aFile, aContentUrl, aHtmlData, aStatus );
       
   110     }
       
   111 
       
   112 // ---------------------------------------------------------------------------
       
   113 // CWmDrmDlaHandler::AcquireLicenseFromDrmHeaderL
       
   114 // ---------------------------------------------------------------------------
       
   115 //
       
   116 EXPORT_C void CWmDrmDlaHandler::AcquireLicenseFromDrmHeaderL( 
       
   117     const TDesC8& aDrmHeader,
       
   118     HBufC* aErrorUrl,
       
   119     HBufC*& aContentUrl, 
       
   120     HBufC*& aHtmlData )
       
   121     {
       
   122     iImpl->AcquireLicenseFromDrmHeaderL( aDrmHeader, aErrorUrl, 
       
   123                                          aContentUrl, aHtmlData );
       
   124     }
       
   125 
       
   126 // ---------------------------------------------------------------------------
       
   127 // CWmDrmDlaHandler::AcquireLicenseFromDrmHeader
       
   128 // ---------------------------------------------------------------------------
       
   129 //
       
   130 EXPORT_C void CWmDrmDlaHandler::AcquireLicenseFromDrmHeader( 
       
   131     const TDesC8& aDrmHeader,
       
   132     HBufC* aErrorUrl,
       
   133     HBufC*& aContentUrl, 
       
   134     HBufC*& aHtmlData, 
       
   135     TRequestStatus& aStatus )
       
   136     {
       
   137     iImpl->AcquireLicenseFromDrmHeader( aDrmHeader, aErrorUrl, 
       
   138                                         aContentUrl, aHtmlData, aStatus );
       
   139     }
       
   140 
       
   141 // ---------------------------------------------------------------------------
       
   142 // CWmDrmDlaHandler::CancelLicenseAcquisition
       
   143 // ---------------------------------------------------------------------------
       
   144 //
       
   145 EXPORT_C void CWmDrmDlaHandler::CancelLicenseAcquisition()
       
   146     {
       
   147     iImpl->CancelLicenseAcquisition();
       
   148     }
       
   149 
       
   150 // ---------------------------------------------------------------------------
       
   151 // CWmDrmDlaHandler::ProcessMeteringCertificateL
       
   152 // ---------------------------------------------------------------------------
       
   153 //
       
   154 EXPORT_C void CWmDrmDlaHandler::ProcessMeteringCertificateL( 
       
   155     const TDesC8& aCertificate )
       
   156     {
       
   157     iImpl->ProcessMeteringCertificateL( aCertificate );
       
   158     }
       
   159 
       
   160 // ---------------------------------------------------------------------------
       
   161 // CWmDrmDlaHandler::ProcessMeteringCertificate
       
   162 // ---------------------------------------------------------------------------
       
   163 //
       
   164 EXPORT_C void CWmDrmDlaHandler::ProcessMeteringCertificate( 
       
   165     const TDesC8& aCertificate, 
       
   166     TRequestStatus& aStatus )
       
   167     {
       
   168     iImpl->ProcessMeteringCertificate( aCertificate, aStatus );
       
   169     }
       
   170 
       
   171 // ---------------------------------------------------------------------------
       
   172 // CWmDrmDlaHandler::CancelMetering
       
   173 // ---------------------------------------------------------------------------
       
   174 //
       
   175 EXPORT_C void CWmDrmDlaHandler::CancelMetering()
       
   176     {
       
   177     iImpl->CancelMetering();
       
   178     }
       
   179 
       
   180 // ---------------------------------------------------------------------------
       
   181 // CWmDrmDlaHandler::SetIapId
       
   182 // ---------------------------------------------------------------------------
       
   183 //
       
   184 EXPORT_C void CWmDrmDlaHandler::SetIapId( 
       
   185     TInt aIapId )
       
   186     {
       
   187     iImpl->SetIapId( aIapId );
       
   188     }