|
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: MUiHandler for SISX SIF plugin. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef C_SISXSIFPLUGUIHANDLER_H |
|
19 #define C_SISXSIFPLUGUIHANDLER_H |
|
20 |
|
21 #include <e32base.h> // CBase |
|
22 #include <swi/msisuihandlers.h> // MUiHandler |
|
23 #include <f32file.h> // RFs |
|
24 #include <barsc.h> // RResourceFile |
|
25 #include <sifui.h> // CSifUi::TMode |
|
26 |
|
27 class CSifUi; |
|
28 class CSisxSifUiSelectionCache; |
|
29 |
|
30 |
|
31 namespace Usif |
|
32 { |
|
33 /** |
|
34 * SISX SIF plugin UI handler |
|
35 * Universal Software Install Framework (USIF) plugin for native SISX |
|
36 * installation. CSisxSifPluginActiveImpl is active object that takes |
|
37 * care of SISX installation operations. |
|
38 */ |
|
39 class CSisxSifPluginUiHandler : public CBase, public Swi::MUiHandler |
|
40 { |
|
41 public: // constructors and destructor |
|
42 static CSisxSifPluginUiHandler* NewL( RFs& aFs ); |
|
43 ~CSisxSifPluginUiHandler(); |
|
44 |
|
45 public: // from MUiHandler |
|
46 // from MCommonDialogs |
|
47 TBool DisplayTextL( const Swi::CAppInfo& aAppInfo, Swi::TFileTextOption aOption, |
|
48 const TDesC& aText ); |
|
49 void DisplayErrorL( const Swi::CAppInfo& aAppInfo, Swi::TErrorDialog aType, |
|
50 const TDesC& aParam ); |
|
51 TBool DisplayDependencyBreakL( const Swi::CAppInfo& aAppInfo, |
|
52 const RPointerArray<TDesC>& aComponents ); |
|
53 TBool DisplayApplicationsInUseL( const Swi::CAppInfo& aAppInfo, |
|
54 const RPointerArray<TDesC>& aAppNames ); |
|
55 TBool DisplayQuestionL( const Swi::CAppInfo& aAppInfo, Swi::TQuestionDialog aQuestion, |
|
56 const TDesC& aDes ); |
|
57 |
|
58 // from MInstallerUiHandler |
|
59 TBool DisplayInstallL( const Swi::CAppInfo& aAppInfo, const CApaMaskedBitmap* aLogo, |
|
60 const RPointerArray<Swi::CCertificateInfo>& aCertificates ); |
|
61 TBool DisplayGrantCapabilitiesL( const Swi::CAppInfo& aAppInfo, |
|
62 const TCapabilitySet& aCapabilitySet ); |
|
63 TInt DisplayLanguageL( const Swi::CAppInfo& aAppInfo, |
|
64 const RArray<TLanguage>& aLanguages ); |
|
65 TInt DisplayDriveL( const Swi::CAppInfo& aAppInfo, TInt64 aSize, |
|
66 const RArray<TChar>& aDriveLetters, const RArray<TInt64>& aDriveSpaces ); |
|
67 TBool DisplayUpgradeL( const Swi::CAppInfo& aAppInfo, |
|
68 const Swi::CAppInfo& aExistingAppInfo ); |
|
69 TBool DisplayOptionsL( const Swi::CAppInfo& aAppInfo, |
|
70 const RPointerArray<TDesC>& aOptions, RArray<TBool>& aSelections ); |
|
71 TBool HandleInstallEventL( const Swi::CAppInfo& aAppInfo, Swi::TInstallEvent aEvent, |
|
72 TInt aValue, const TDesC& aDes ); |
|
73 void HandleCancellableInstallEventL( const Swi::CAppInfo& aAppInfo, |
|
74 Swi::TInstallCancellableEvent aEvent, Swi::MCancelHandler& aCancelHandler, |
|
75 TInt aValue, const TDesC& aDes ); |
|
76 TBool DisplaySecurityWarningL( const Swi::CAppInfo& aAppInfo, |
|
77 Swi::TSignatureValidationResult aSigValidationResult, |
|
78 RPointerArray<CPKIXValidationResultBase>& aPkixResults, |
|
79 RPointerArray<Swi::CCertificateInfo>& aCertificates, TBool aInstallAnyway ); |
|
80 TBool DisplayOcspResultL( const Swi::CAppInfo& aAppInfo, |
|
81 Swi::TRevocationDialogMessage aMessage, |
|
82 RPointerArray<TOCSPOutcome>& aOutcomes, |
|
83 RPointerArray<Swi::CCertificateInfo>& aCertificates, TBool aWarningOnly ); |
|
84 void DisplayCannotOverwriteFileL( const Swi::CAppInfo& aAppInfo, |
|
85 const Swi::CAppInfo& aInstalledAppInfo, const TDesC& aFileName ); |
|
86 TBool DisplayMissingDependencyL( const Swi::CAppInfo& aAppInfo, |
|
87 const TDesC& aDependencyName, TVersion aWantedVersionFrom, |
|
88 TVersion aWantedVersionTo, TVersion aInstalledVersion ); |
|
89 |
|
90 // from MUninstallerUiHandler |
|
91 TBool DisplayUninstallL( const Swi::CAppInfo& aAppInfo ); |
|
92 |
|
93 public: // new functions |
|
94 void DisplayCompleteL(); |
|
95 void DisplayFailedL( TInt aErrorCode ); |
|
96 |
|
97 private: // new functions |
|
98 CSisxSifPluginUiHandler( RFs& aFs ); |
|
99 void ConstructL(); |
|
100 void OpenResourceFileL(); |
|
101 HBufC* ReadStringResourceL( TInt aResourceId ); |
|
102 void CloseResourceFile(); |
|
103 |
|
104 private: // data |
|
105 RFs& iFs; |
|
106 RResourceFile iResourceFile; |
|
107 CSisxSifUiSelectionCache* iSelectionCache; |
|
108 CSifUi* iSifUi; |
|
109 CApaMaskedBitmap* iLogo; |
|
110 TBool iQuestionIncompatibleDisplayed; |
|
111 }; |
|
112 |
|
113 } // namespace Usif |
|
114 |
|
115 #endif // C_SISXSIFPLUGUIHANDLER_H |
|
116 |