wmdrm/camese/wmdrmdladefaultuiplugin/inc/wmdrmdladefaultuiplugin.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:  WMDRM DLA Default UI Plugin
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_WMDRMDLADEFAULTUIPLUGIN_H
       
    20 #define C_WMDRMDLADEFAULTUIPLUGIN_H
       
    21 
       
    22 #include <wmdrmdlauiplugin.h>
       
    23 #include "wmdrmdlaui.h"
       
    24  
       
    25 /**
       
    26  * WMDRM DLA Default UI Plugin
       
    27  * Shows wait note, when SetProgress is set to EProcessingDRMHeader or 
       
    28  * to EProcessingMeteringChallenge. Removes wait note, if HandleErrorL is
       
    29  * called or SetProgress is set to EIdle. Won't handle any errors, but
       
    30  * always leaves with KErrNotSupported. Supports user cancellation from
       
    31  * wait note. If CCoeEnv isn't available, then wait note can't be shown,
       
    32  * but object creation still succeeds.
       
    33  *
       
    34  *  @lib wmdrmdladefaultuiplugin.lib
       
    35  *  @since S60 v9.1
       
    36  */
       
    37 NONSHARABLE_CLASS( CWmDrmDlaDefaultUiPlugin ) : public CWmDrmDlaUiPluginIf, 
       
    38                                                 public MWmDrmDlaWaitNoteCallback
       
    39     {
       
    40 
       
    41 public:
       
    42 
       
    43     static CWmDrmDlaDefaultUiPlugin* NewL();
       
    44     ~CWmDrmDlaDefaultUiPlugin();
       
    45 
       
    46 public: //From CWmDrmDlaUiPluginIf
       
    47     
       
    48     /**
       
    49      * Called by the framework to set cancel observer. UI plugin can use 
       
    50      * observer to inform framework about user cancelling DLA process from
       
    51      * UI component.
       
    52      * 
       
    53      * @param aObserver Cancellation observer
       
    54      */
       
    55     void SetCancelObserver( MWmDrmDlaCancelObserver* aObserver );
       
    56     
       
    57     /**
       
    58      * Called to inform UI plugin if the license acquisition is silent
       
    59      *
       
    60      * @param aSilent ETrue if license acquisition should be silent
       
    61      */
       
    62     void SetSilent( TBool aSilent );
       
    63 
       
    64     /**
       
    65      * Called to inform UI plugin about the license acquisition progress
       
    66      *
       
    67      * @param aState License acquisition progress state
       
    68      */
       
    69     void SetProgress( TInt aState );
       
    70 
       
    71     /**
       
    72      * Informs that error happened during the license acquisition
       
    73      *
       
    74      * @param aError Error code
       
    75      */
       
    76     void HandleErrorL( TInt aError );
       
    77 
       
    78 public: //From MWmDrmDlaWaitNoteCallback    
       
    79     
       
    80     /**
       
    81      * Called if user cancels the wait note
       
    82      */
       
    83     void UserWaitNoteCancellation();
       
    84     
       
    85 private:
       
    86 
       
    87     CWmDrmDlaDefaultUiPlugin();
       
    88     void ConstructL();
       
    89     
       
    90 private: // data
       
    91 
       
    92     CWmDrmDlaUi* iUi;
       
    93     
       
    94     //Not owned
       
    95     MWmDrmDlaCancelObserver* iObserver;
       
    96     
       
    97     };
       
    98 
       
    99 #endif // C_WMDRMDLADEFAULTUIPLUGIN_H