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