appinstall_plat/sifui_api/inc/sifuiprivate.h
branchRCL_3
changeset 25 7333d7932ef7
equal deleted inserted replaced
24:5cc91383ab1e 25:7333d7932ef7
       
     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:  Private implementation part of the CSifUi API.
       
    15 */
       
    16 
       
    17 
       
    18 #ifndef C_SIFUIPRIVATE_H
       
    19 #define C_SIFUIPRIVATE_H
       
    20 
       
    21 #include <e32base.h>                            // CActive
       
    22 #include <hb/hbcore/hbdevicedialogsymbian.h>    // MHbDeviceDialogObserver
       
    23 #include <hb/hbcore/hbindicatorsymbian.h>       // MHbIndicatorSymbianObserver
       
    24 #include <bamdesca.h>                           // MDesCArray
       
    25 #include <sifui.h>                              // CSifUi::TOptionalButtons
       
    26 #include <sifuidefs.h>                          // TSifUiDeviceDialogType
       
    27 
       
    28 class CHbSymbianVariantMap;
       
    29 class CHbSymbianVariant;
       
    30 class CActiveSchedulerWait;
       
    31 
       
    32 namespace Swi {
       
    33     class CAppInfo;
       
    34     class CCertificateInfo;
       
    35 }
       
    36 
       
    37 /**
       
    38  * Private part of the SIF UI API.
       
    39  * Only CSifUi class should use CSifUiPrivate class.
       
    40  */
       
    41 class CSifUiPrivate : public CActive, public MHbDeviceDialogObserver,
       
    42         public MHbIndicatorSymbianObserver
       
    43     {
       
    44     public:     // constructor and destructor
       
    45         static CSifUiPrivate* NewL();
       
    46         ~CSifUiPrivate();
       
    47 
       
    48     public:     // new functions
       
    49         void ShowPreparingL();
       
    50         void SetMemorySelectionL( const RArray<TInt>& aDriveNumbers );
       
    51         void SetCertificateInfoL( const RPointerArray<CSifUiCertificateInfo>& aCertificates );
       
    52         TBool ShowConfirmationL( const CSifUiAppInfo& aAppInfo );
       
    53         TInt SelectedDrive( TInt& aDriveNumber );
       
    54         void ShowProgressL( const CSifUiAppInfo& aAppInfo, TInt aProgressBarFinalValue,
       
    55                 CSifUi::TInstallingPhase aPhase );
       
    56         void IncreaseProgressBarValueL( TInt aIncrement );
       
    57         TBool IsCancelled();
       
    58         void ShowCompleteL();
       
    59         void ShowFailedL( const CSifUiErrorInfo& aErrorInfo );
       
    60         void SetButtonVisible( CSifUi::TOptionalButton aButton, TBool aIsVisible );
       
    61         TBool ShowGrantCapabilitiesL( const TCapabilitySet& aCapabilities );
       
    62         TInt ShowSelectLanguageL( const RArray<TLanguage>& aLanguages );
       
    63         TBool ShowSelectOptionsL( const MDesCArray& aSelectableItems,
       
    64                 RArray<TInt>& aSelectedIndexes );
       
    65 
       
    66     protected:  // from CActive
       
    67         void DoCancel();
       
    68         void RunL();
       
    69 
       
    70     private:    // from MHbDeviceDialogObserver
       
    71         void DataReceived( CHbSymbianVariantMap& aData );
       
    72         void DeviceDialogClosed( TInt aCompletionCode );
       
    73 
       
    74     private:    // from MHbIndicatorSymbianObserver
       
    75         void IndicatorUserActivated( const TDesC& aType, CHbSymbianVariantMap& aData );
       
    76 
       
    77     private:    // new functions
       
    78         CSifUiPrivate();
       
    79         void ConstructL();
       
    80         void ClearParams();
       
    81         CHbSymbianVariantMap* VariantMapL();
       
    82         void ChangeNoteTypeL( TInt aType );
       
    83         void AddParamL( const TDesC& aKey, TInt aValue );
       
    84         void AddParamL( const TDesC& aKey, const TDesC& aValue );
       
    85         void AddParamListL( const TDesC& aKey, const MDesCArray& aList );
       
    86         void AddParamBinaryL( const TDesC& aKey, const CBufBase& aBinary );
       
    87         void AddParamPckgL( const TDesC& aKey, const TDesC8& aPckg );
       
    88         void AddParamsAppInfoL( const CSifUiAppInfo& aAppInfo );
       
    89         void AddParamsCertificatesL();
       
    90         void AddParamsHiddenButtonsL();
       
    91         void ResendAllInstallationDetailsL();
       
    92         void ActivateInstallIndicatorL();
       
    93         void UpdateInstallIndicatorProgressL();
       
    94         void CloseInstallIndicator();
       
    95         TBool IsIndicatorActive();
       
    96         void ShowInstallIndicatorCompleteL( TInt aErrorCode );
       
    97         void UpdateDialogAndWaitForResponseL();
       
    98         void UpdateDialogOrIndicatorWithoutWaitingL();
       
    99         void CompleteDialogOrIndicatorAndWaitForResponseL( TInt aErrorCode );
       
   100         void DisplayDeviceDialogL();
       
   101         void WaitForResponseL();
       
   102         void WaitedResponseReceived( TInt aCompletionCode );
       
   103 
       
   104     private:    // data
       
   105         CHbDeviceDialogSymbian* iDeviceDialog;
       
   106         CHbIndicatorSymbian* iIndicator;
       
   107         CHbSymbianVariantMap* iVariantMap;
       
   108         CActiveSchedulerWait* iWait;
       
   109         TBool iIsDisplayingDialog;
       
   110         TBool iIsFirstTimeToDisplay;
       
   111         TInt iWaitCompletionCode;
       
   112         TInt iDialogReturnValue;
       
   113         TSifUiDeviceDialogType iDialogType;
       
   114         CSifUiAppInfo* iAppInfo;
       
   115         CBufBase* iCertificateBuffer;
       
   116         HBufC* iSelectableDrives;
       
   117         TBool iSelectedDriveSet;
       
   118         TChar iSelectedDrive;
       
   119         TInt iProgressBarFinalValue;
       
   120         TInt iProgressBarCurrentValue;
       
   121         CSifUi::TInstallingPhase iInstallingPhase;
       
   122         TBool iNoHideProgressButton;
       
   123         TBool iNoCancelProgressButton;
       
   124         TBool iNoShowInAppLibButton;
       
   125         TBool iNoErrorDetailsButton;
       
   126         TInt iSelectedLanguage;
       
   127         RArray<TInt> iSelectedOptions;
       
   128     };
       
   129 
       
   130 
       
   131 #endif  // C_SIFUIPRIVATE_H
       
   132