commondrm/drmutility/inc/drmutilitywmdrm.h
changeset 0 95b198f216e5
equal deleted inserted replaced
-1:000000000000 0:95b198f216e5
       
     1 /*
       
     2 * Copyright (c) 2007 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:  DrmUtilityWmdrmWrapper loader
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_DRMUTILITYWMDRM_H
       
    20 #define C_DRMUTILITYWMDRM_H
       
    21 
       
    22 //*** system include files go here:
       
    23 #include <e32base.h>
       
    24 
       
    25 //*** forward declarations go here
       
    26 class CCoeEnv;
       
    27 
       
    28 namespace DRM 
       
    29     {
       
    30 
       
    31     //*** forward declarations go here:
       
    32     class CDrmUtilityWMDrmWrapper;
       
    33     class MDrmUtilityWMDrmWrapper;
       
    34 
       
    35 /**
       
    36  *  This class encapsulates WMDrm functionality
       
    37  *
       
    38  *  @lib drmutilitycommon.lib
       
    39  *  @since S60 v5.0
       
    40  */
       
    41 NONSHARABLE_CLASS( CDrmUtilityWMDrm ) : public CBase
       
    42     {
       
    43     
       
    44 public:
       
    45 
       
    46     /**
       
    47      * Creates a new CDrmUtilityWMDrm object and returns a pointer to it
       
    48      *
       
    49      * @return A functional CDrmUtilityCommon -object
       
    50      * @leave System wide error code
       
    51      */	
       
    52     IMPORT_C static CDrmUtilityWMDrm* NewL( CCoeEnv* aCoeEnv = NULL );
       
    53     
       
    54     /**
       
    55      * Creates a new CDrmUtilityWMDrm object and returns a pointer to it
       
    56      * leaves the returned object to the cleanup stack
       
    57      *
       
    58      * @return A functional CDrmUtilityCommon -object
       
    59      * @leave System wide error code
       
    60      */	
       
    61     IMPORT_C static CDrmUtilityWMDrm* NewLC( CCoeEnv* aCoeEnv = NULL );
       
    62 
       
    63 
       
    64     /**
       
    65     * Destructor.
       
    66     */
       
    67     virtual ~CDrmUtilityWMDrm();
       
    68 
       
    69     /**
       
    70      * Returns a pointer to a class which implements the
       
    71      * MDrmUtilityWMDrmWrapper interface. The ownership
       
    72      * of the instance stays with the CDrmUtilityWMDrm -class
       
    73      *
       
    74      * @since S60 v5.0
       
    75      *
       
    76      * @return A pointer to a functional object implementing the
       
    77      *         MDrmUtilityWMDrmWrapper interface
       
    78      *
       
    79      * @leave None
       
    80      *
       
    81      * @see MDrmUtilityWMDrmWrapper
       
    82      */
       
    83     IMPORT_C MDrmUtilityWMDrmWrapper* GetWrapper();
       
    84 
       
    85 protected:
       
    86 
       
    87 private:
       
    88 
       
    89     CDrmUtilityWMDrm();
       
    90 
       
    91     void ConstructL( CCoeEnv* aCoeEnv );
       
    92 
       
    93 private: // Data members
       
    94 
       
    95     // Handle to load WMDrmWrapper dynamically
       
    96     RLibrary iWMDrmDll;
       
    97     
       
    98     // WMDrm wrapper
       
    99     CDrmUtilityWMDrmWrapper* iWMDrmHandler;
       
   100 
       
   101     };
       
   102 
       
   103     }
       
   104 
       
   105 #endif // C_DRMUTILITYWMDRM_H