drm_plat/camese_framework_api/inc/wmdrmdlauinotifier.h
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:  Interface to send notifications from http plugin ui plugin
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_WMDRMDLAUINOTIFIER_H
       
    20 #define C_WMDRMDLAUINOTIFIER_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class MWmDrmDlaCancelObserver;
       
    25 class CWmDrmDlaUiNotifierImpl;
       
    26 
       
    27 /**
       
    28  *  WMDRM DLA UiNotifier
       
    29  *
       
    30  *  @lib wmdrmdla.lib
       
    31  *  @since S60 v9.1
       
    32  */
       
    33 NONSHARABLE_CLASS( CWmDrmDlaUiNotifier ) : public CBase
       
    34     {
       
    35 
       
    36 public:
       
    37 
       
    38     IMPORT_C static CWmDrmDlaUiNotifier* NewL();
       
    39     IMPORT_C static CWmDrmDlaUiNotifier* NewLC();    
       
    40 
       
    41     /**
       
    42     * Destructor.
       
    43     */
       
    44     virtual ~CWmDrmDlaUiNotifier();
       
    45 
       
    46     /**
       
    47      * Selects UI plugin based on UID
       
    48      *
       
    49      * @param aUid Uid of the plugin implementation
       
    50      * @leave KErrNotFound if corresponding plugin is not found
       
    51      */
       
    52     IMPORT_C void InitializeL( TUid aUid );
       
    53 
       
    54     /**
       
    55      * Selects UI plugin based on data
       
    56      * If corresponding plugin is not be found, tries to initialize default
       
    57      * plugin
       
    58      *
       
    59      * @param aOpaqueData Opaque data of the plugin implementation
       
    60      * @leave KErrNotFound if corresponding and default plugin is not found
       
    61      */
       
    62     IMPORT_C void InitializeL( TDesC8& aOpaqueData );
       
    63 
       
    64     /**
       
    65      * Called by the framework to set cancel observer. UI plugin can use this
       
    66      * to inform framework about user cancelling DLA process from UI component.
       
    67      * 
       
    68      * @param aObserver Cancellation observer
       
    69      */
       
    70     IMPORT_C void SetCancelObserver( MWmDrmDlaCancelObserver* aObserver );
       
    71     
       
    72     /**
       
    73      * Informs that license acquisition is silent
       
    74      *
       
    75      * @param aSilent Is license acquisition silent
       
    76      */
       
    77     IMPORT_C void SetSilent( TBool aSilent );
       
    78 
       
    79     /**
       
    80      * Passes progress information to UI plugin
       
    81      *
       
    82      * @param aState License acquisition progress state
       
    83      * @see wmdrmdlatypes.h
       
    84      */
       
    85     IMPORT_C void SetProgress( TInt aState );
       
    86 
       
    87     /**
       
    88      * Informs that error happened during the license acquisition
       
    89      *
       
    90      * @param aError Error code
       
    91      */
       
    92     IMPORT_C void HandleErrorL( TInt aError );
       
    93 
       
    94 protected:
       
    95 
       
    96 private:
       
    97 
       
    98     CWmDrmDlaUiNotifier();
       
    99 
       
   100     void ConstructL();
       
   101 
       
   102 private: // data
       
   103 
       
   104     /**
       
   105      * Implementation class
       
   106      * Own.
       
   107      */
       
   108     CWmDrmDlaUiNotifierImpl* iImpl;
       
   109 
       
   110     };
       
   111 
       
   112 #endif // C_WMDRMDLAUINOTIFIER_H