appinstaller/AppinstUi/sisxsifplugin/inc/sisxsifpluginuihandlerbase.h
branchRCL_3
changeset 26 8b7f4e561641
parent 25 7333d7932ef7
child 27 e8965914fac7
equal deleted inserted replaced
25:7333d7932ef7 26:8b7f4e561641
     1 /*
       
     2 * Copyright (c) 2010 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:  Base class for SISX SIF plugin UI handlers.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_SISXSIFPLUGUIHANDLERBASE_H
       
    19 #define C_SISXSIFPLUGUIHANDLERBASE_H
       
    20 
       
    21 #include <e32base.h>                    // CBase
       
    22 #include <swi/msisuihandlers.h>         // MUiHandler
       
    23 #include <f32file.h>                    // RFs
       
    24 #include <sifui.h>                      // CSifUi
       
    25 #include <usif/sif/sifcommon.h>         // CComponentInfo::CNode
       
    26 #include <usif/sif/sifnotification.h>   // TSifOperationSubPhase, TErrorCategory
       
    27 
       
    28 
       
    29 namespace Usif
       
    30 {
       
    31     class CComponentEntry;
       
    32     class CSisxSifPluginInstallParams;
       
    33     class CSisxSifPluginErrorHandler;
       
    34 
       
    35 
       
    36     /**
       
    37      * Base class for SISX SIF plugin UI handlers.
       
    38      */
       
    39     class CSisxSifPluginUiHandlerBase : public CBase, public Swi::MUiHandler
       
    40         {
       
    41     public:     // constructors and destructor
       
    42         CSisxSifPluginUiHandlerBase( RFs& aFs, CSisxSifPluginErrorHandler& aErrorHandler );
       
    43         ~CSisxSifPluginUiHandlerBase();
       
    44 
       
    45     public:     // new functions
       
    46         virtual void DisplayPreparingInstallL( const TDesC& aFileName ) = 0;
       
    47         virtual void DisplayCompleteL() = 0;
       
    48         virtual void DisplayFailedL( const CSisxSifPluginErrorHandler& aError ) = 0;
       
    49 
       
    50     public:     // new functions
       
    51         void SetInstallParamsL( const CSisxSifPluginInstallParams& aInstallParams );
       
    52         void SetMaxInstalledSize( TInt aSize );
       
    53         void SetDriveSelectionRequired( TBool aIsRequired );
       
    54         TBool IsOcspMandatoryL() const;
       
    55 
       
    56         // functions to publish operation progress
       
    57         void PublishStartL( const CComponentInfo::CNode& aRootNode );
       
    58         void PublishStartL( const CComponentEntry& aEntry );
       
    59         void PublishProgressL( TSifOperationSubPhase aSubPhase );
       
    60         void PublishCompletionL();
       
    61 
       
    62     protected:  // new functions
       
    63         void SetErrorL( TInt aErrorCode, TInt aExtErrorCode );
       
    64         void SetErrorL( TInt aErrorCode, TInt aExtErrorCode, const TDesC& aErrMsgDetails );
       
    65         void SetErrorSwiErrorL( Swi::TErrorDialog aType, const TDesC& aParam );
       
    66         void SetOcspErrorL( Swi::TRevocationDialogMessage aMessage );
       
    67         TBool ShowQuestionL( const TDesC& aText ) const;
       
    68         void ShowQuestionWithContinueL( const TDesC& aText ) const;
       
    69 
       
    70     protected:	// data
       
    71         RFs& iFs;
       
    72         CSisxSifPluginErrorHandler& iErrorHandler;
       
    73         TInt iMaxInstalledSize;
       
    74         TBool iIsDriveSelectionRequired;
       
    75         CSisxSifPluginInstallParams* iInstallParams;
       
    76 
       
    77         // members for publishing operation progress
       
    78         CPublishSifOperationInfo* iPublishSifOperationInfo;
       
    79         TSifOperationPhase iOperationPhase;
       
    80         HBufC* iGlobalComponentId;
       
    81         TInt iProgressBarCurrentValue;
       
    82         TInt iProgressBarFinalValue;
       
    83         };
       
    84 
       
    85 }   // namespace Usif
       
    86 
       
    87 #endif      // C_SISXSIFPLUGUIHANDLERBASE_H
       
    88