drm_plat/wmdrm_access_api/inc/wmdrmaccessecominterface.h
changeset 0 95b198f216e5
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     1 /*
       
     2 * Copyright (c) 2009 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:
       
    15 *  wmdrmaccessecominterface.h
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef _WMDRMACCESSECOMINTERFACE_H_
       
    20 #define _WMDRMACCESSECOMINTERFACE_H_
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 // Class declaration
       
    25 // CWmDrmAccessEcomInterface
       
    26 // ecom plugin interface for WM DRM access implementation
       
    27 // @see CWmDrmAccess
       
    28 NONSHARABLE_CLASS( CWmDrmAccessEcomInterface ) : public CBase
       
    29     {
       
    30 public:
       
    31     // Constructors
       
    32     static CWmDrmAccessEcomInterface* NewL();
       
    33     static CWmDrmAccessEcomInterface* NewLC();
       
    34 
       
    35     // Destructor
       
    36     virtual ~CWmDrmAccessEcomInterface();
       
    37 
       
    38     // Initialises decryption context.
       
    39     // @see CWmDrmAccess::Initialize
       
    40     // @post class ready for decrypting WM DRM protected file,
       
    41     //  header of which is given in aHeader.
       
    42     virtual TInt Initialize( const TDesC8& aHeader ) = 0;
       
    43 
       
    44     // Decrypts encrypted data in place.
       
    45     // @see CWmDrmAccess::Decrypt
       
    46     // @pre Succesful call of Initialize, data to be decrypted in aBuffer
       
    47     // @post decrypted data in aBuffer
       
    48     virtual TInt Decrypt( TDes8& aBuffer ) = 0;
       
    49 
       
    50     // Closes decryption context.
       
    51     // @see CWmDrmAccess::Close
       
    52     virtual TInt Close() = 0;
       
    53 
       
    54 private:
       
    55     // internal variable used on freeing ecom related resources
       
    56     TUid iDtor_ID_Key;
       
    57     };
       
    58 
       
    59 #include "wmdrmaccessecominterface.inl"
       
    60 #endif _WMDRMACCESSECOMINTERFACE_H_