appinstall_plat/sifui_api/inc/sifuiprivate.h
changeset 29 26b6f0522fd8
child 33 8110bf1194d1
equal deleted inserted replaced
25:98b66e4fb0be 29:26b6f0522fd8
       
     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/hbsymbiandevicedialog.h>    // MHbDeviceDialogObserver
       
    23 #include <bamdesca.h>                           // MDesCArray
       
    24 
       
    25 class CHbDeviceDialog;
       
    26 class CHbSymbianVariantMap;
       
    27 class CActiveSchedulerWait;
       
    28 class CApaMaskedBitmap;
       
    29 
       
    30 namespace Swi {
       
    31     class CAppInfo;
       
    32     class CCertificateInfo;
       
    33 }
       
    34 
       
    35 /**
       
    36  * Private part of the SIF UI API.
       
    37  * Only CSifUi class should use CSifUiPrivate class.
       
    38  */
       
    39 class CSifUiPrivate : public CActive, public MHbDeviceDialogObserver
       
    40     {
       
    41     public:     // constructor and destructor
       
    42         static CSifUiPrivate* NewL();
       
    43         CSifUiPrivate::~CSifUiPrivate();
       
    44 
       
    45     public:     // new functions
       
    46         TBool ShowConfirmationL( const Swi::CAppInfo& aAppInfo, TInt aAppSize,
       
    47         		const CApaMaskedBitmap* aAppIcon );
       
    48         void SetMemorySelectionL( const RArray<TInt>& aDriveNumbers );
       
    49         TInt SelectedDrive( TInt& aDriveNumber );
       
    50         void SetCertificateInfoL( const RPointerArray<Swi::CCertificateInfo>& aCertificates );
       
    51         void ShowProgressL( const Swi::CAppInfo& aAppInfo, TInt aAppSize,
       
    52                 TInt aProgressBarFinalValue );
       
    53         void IncreaseProgressBarValueL( TInt aIncrement );
       
    54         void ShowCompleteL();
       
    55         void ShowFailedL( TInt aErrorCode, const TDesC& aErrorMessage,
       
    56                 const TDesC& aErrorDetails );
       
    57 
       
    58     protected:  // from CActive
       
    59         void DoCancel();
       
    60         void RunL();
       
    61 
       
    62     private:    // from MHbDeviceDialogObserver
       
    63         void DataReceived( CHbSymbianVariantMap& aData );
       
    64         void DeviceDialogClosed( TInt aCompletionCode );
       
    65 
       
    66     private:    // new functions
       
    67         CSifUiPrivate();
       
    68         void ConstructL();
       
    69         void ClearParamsL();
       
    70         void ChangeNoteTypeL( TInt aType );
       
    71         void AddParamL( const TDesC& aKey, TInt aValue );
       
    72         void AddParamL( const TDesC& aKey, const TDesC& aValue );
       
    73         void AddParamListL( const TDesC& aKey, const MDesCArray& aList );
       
    74         void AddParamsAppInfoAndSizeL( const Swi::CAppInfo& aAppInfo, TInt aAppSize );
       
    75         void AddParamsIconL( const CApaMaskedBitmap* aIcon );
       
    76         void AddParamsCertificatesL( const RPointerArray<Swi::CCertificateInfo>& aCertificates );
       
    77         void DisplayDeviceDialogL();
       
    78         TInt WaitForResponse();
       
    79         void ResponseReceived( TInt aCompletionCode );
       
    80 
       
    81     private:    // data
       
    82         CHbDeviceDialog* iDeviceDialog;
       
    83         CHbSymbianVariantMap* iVariantMap;
       
    84         CActiveSchedulerWait* iWait;
       
    85         TBool iIsDisplayingDialog;
       
    86         TInt iCompletionCode;
       
    87         TInt iReturnValue;
       
    88         CApaMaskedBitmap* iBitmap;
       
    89         HBufC* iSelectableDrives;
       
    90         TBool iSelectedDriveSet;
       
    91         TChar iSelectedDrive;
       
    92     };
       
    93 
       
    94 
       
    95 #endif  // C_SIFUIPRIVATE_H
       
    96