2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
 
     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".
 
     9 * Initial Contributors:
 
    10 * Nokia Corporation - initial contribution.
 
    14 * Description:  DRM License Checker interface definition
 
    19 #ifndef DRMLICENSECHECKER_H
 
    20 #define DRMLICENSECHECKER_H
 
    23 *  Check and decrypt protected data files encrypted by the license manager.
 
    25 *  @lib DRMLicenseChecker.lib
 
    26 *  @since Series 60 2.5
 
    28 class CDRMLicenseChecker: public CBase
 
    30     public:  // Local enumerations and types
 
    35             ERightsExpired = -100001,
 
    38     public:  // Constructors and destructor
 
    41         * Two-phased constructor.
 
    43         IMPORT_C static CDRMLicenseChecker* NewL();
 
    48         IMPORT_C virtual ~CDRMLicenseChecker();
 
    50     public: // New functions
 
    53         * This function performs a license check by decrypting a data file and
 
    54         * returning the decrypted contents of the data file. A license check
 
    55         * can only succeed if a rights object associated with the calling
 
    56         * application exists and sufficient rights are present. If the license
 
    57         * check fails, an error is returned.
 
    59         * @since Series 60 2.6
 
    60         * @param aDataFile: the data file to be decrypted
 
    61         * @param aDataBuffer: memory buffer which contains the decrypted
 
    62         *        contents of the data file.
 
    63         * @return ENoRights, ERightsExpired if the data file could not be opened
 
    64         *         because of insufficient rights, Symbian-wide error codes or
 
    65         *         KErrNone in case of success.
 
    67         IMPORT_C TInt CheckLicense(
 
    68             const TDesC& aDataFile,
 
    69             HBufC8*& aDataBuffer);
 
    74         * C++ default constructor.
 
    79         * By default Symbian 2nd phase constructor is private.
 
    84         * Leaving version of CheckLicense
 
    86         * @since Series 60 3.0
 
    87         * @param aDataFile: the data file to be decrypted
 
    88         * @param aDataBuffer: memory buffer which contains the decrypted
 
    89         *        contents of the data file.
 
    90         * @return ENoRights, ERightsExpired if the data file could not be opened
 
    91         *         because of insufficient rights, Symbian-wide error codes or
 
    92         *         KErrNone in case of success.
 
    95             const TDesC& aDataFile,
 
    96             HBufC8*& aDataBuffer);
 
   100 #endif      // DRMLICENSECHECKER_H