1 /* |
|
2 * Copyright (c) 2002-2004 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: This file contains the header file of the CSWSisUIHandler |
|
15 * class. |
|
16 * |
|
17 * This class handles the Ui for native installations. |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 #ifndef SISXUISILENTHANDLER_H |
|
23 #define SISXUISILENTHANDLER_H |
|
24 |
|
25 // INCLUDES |
|
26 #include <e32base.h> |
|
27 #include <swi/msisuihandlers.h> |
|
28 //#include <CUIDetailsDialog.h> |
|
29 |
|
30 //#include "CUIDialogs.h" |
|
31 #include "SisxUIResult.h" |
|
32 #include "SisxUIHandler.h" |
|
33 #include "SWInstPrivateUid.h" |
|
34 |
|
35 namespace SwiUI |
|
36 { |
|
37 |
|
38 /** |
|
39 * This class handles the Ui for native installations. |
|
40 * |
|
41 * @lib sisxui.lib |
|
42 * @since 3.0 |
|
43 */ |
|
44 class CSisxUISilentHandler : public CSisxUIHandler |
|
45 { |
|
46 public: // Constructors and destructor |
|
47 |
|
48 /** |
|
49 * Two-phased constructor. |
|
50 * @param aMode - Indicates if this is for install or uninstall |
|
51 */ |
|
52 static CSisxUISilentHandler* NewL( const TInstallOptions &aOptions, MSisxUICancelObserver* aCancelObserver ); |
|
53 static CSisxUISilentHandler* NewL( const TUninstallOptions &aOptions, MSisxUICancelObserver* aCancelObserver ); |
|
54 |
|
55 /** |
|
56 * Destructor. |
|
57 */ |
|
58 virtual ~CSisxUISilentHandler(); |
|
59 |
|
60 public: // From base classes |
|
61 |
|
62 /** |
|
63 * From MUiHandler, displays a dialog at the beginning of an installation |
|
64 * with details about the SISX package being installed. This dialog must |
|
65 * be shown in TrustedUI mode. |
|
66 */ |
|
67 TBool DisplayInstallL( const Swi::CAppInfo& aAppInfo, |
|
68 const CApaMaskedBitmap* aLogo, |
|
69 const RPointerArray<Swi::CCertificateInfo>& aCertificates ); |
|
70 |
|
71 /** |
|
72 * From MUiHandler, displays a dialog requesting that the user grants |
|
73 * these capabilities to the SISX package being installed. This dialog |
|
74 * must be shown in TrustedUI mode. |
|
75 */ |
|
76 TBool DisplayGrantCapabilitiesL( const Swi::CAppInfo& aAppInfo, |
|
77 const TCapabilitySet& aCapabilitySet ); |
|
78 |
|
79 /** |
|
80 * From MUiHandler, requests preferred language and dialect information |
|
81 * from the UI. |
|
82 */ |
|
83 TInt DisplayLanguageL( const Swi::CAppInfo& aAppInfo, |
|
84 const RArray<TLanguage>& aLanguages ); |
|
85 |
|
86 /** |
|
87 * From MUiHandler, requests the drive to install the package on, from |
|
88 * the UI. |
|
89 */ |
|
90 TInt DisplayDriveL( const Swi::CAppInfo& aAppInfo, |
|
91 TInt64 aSize, |
|
92 const RArray<TChar>& aDriveLetters, |
|
93 const RArray<TInt64>& aDriveSpaces ); |
|
94 |
|
95 /** |
|
96 * From MUiHandler, displays a dialog asking whether we want to upgrade an |
|
97 * application present on the device. |
|
98 */ |
|
99 TBool DisplayUpgradeL( const Swi::CAppInfo& aAppInfo, |
|
100 const Swi::CAppInfo& aExistingAppInfo ); |
|
101 |
|
102 /** |
|
103 * From MUiHandler, displays a dialog box asking which options the user |
|
104 * wishes to install. |
|
105 */ |
|
106 TBool DisplayOptionsL( const Swi::CAppInfo& aAppInfo, |
|
107 const RPointerArray<TDesC>& aOptions, |
|
108 RArray<TBool>& aSelections ); |
|
109 |
|
110 /** |
|
111 * From MUiHandler, informs the UI of events occurring during installation. |
|
112 */ |
|
113 TBool HandleInstallEventL( const Swi::CAppInfo& aAppInfo, |
|
114 Swi::TInstallEvent aEvent, |
|
115 TInt aValue = 0, |
|
116 const TDesC& aDes = KNullDesC ); |
|
117 /** |
|
118 * From MUiHandler, informs the UI of cancellable events occurring during |
|
119 * installation. |
|
120 */ |
|
121 void HandleCancellableInstallEventL( const Swi::CAppInfo& aAppInfo, |
|
122 Swi::TInstallCancellableEvent aEvent, |
|
123 Swi::MCancelHandler& aCancelHandler, |
|
124 TInt aValue = 0, |
|
125 const TDesC& aDes = KNullDesC ); |
|
126 /** |
|
127 * From MUiHandler, displays a dialog indicating that the package is unsigned, |
|
128 * or that signature validation has failed. |
|
129 */ |
|
130 TBool DisplaySecurityWarningL( const Swi::CAppInfo& aAppInfo, |
|
131 Swi::TSignatureValidationResult aSigValidationResult, |
|
132 RPointerArray<CPKIXValidationResultBase>& aPkixResults, |
|
133 RPointerArray<Swi::CCertificateInfo>& aCertificates, |
|
134 TBool aInstallAnyway ); |
|
135 |
|
136 /** |
|
137 * From MUiHandler, displays a dialog indicating that there was an error |
|
138 * carrying out online certificate status checking. |
|
139 */ |
|
140 TBool DisplayOcspResultL( const Swi::CAppInfo& aAppInfo, |
|
141 Swi::TRevocationDialogMessage aMessage, |
|
142 RPointerArray<TOCSPOutcome>& aOutcomes, |
|
143 RPointerArray<Swi::CCertificateInfo>& aCertificates, |
|
144 TBool aWarningOnly ); |
|
145 |
|
146 /** |
|
147 * From MUiHandler, used to inform the user the installation they are attempting |
|
148 * is trying to overwrite a file that does not belong to it. Following this |
|
149 * message installation is aborted. |
|
150 */ |
|
151 void DisplayCannotOverwriteFileL( const Swi::CAppInfo& aAppInfo, |
|
152 const Swi::CAppInfo& aInstalledAppInfo, |
|
153 const TDesC& aFileName ); |
|
154 |
|
155 /** |
|
156 * Used to inform the user of a missing dependency needed to install the |
|
157 * current package. It is up to the UI implementors and/or the user whether |
|
158 * or not this warning can be overridden. |
|
159 */ |
|
160 TBool DisplayMissingDependencyL( const Swi::CAppInfo& aAppInfo, |
|
161 const TDesC& aDependencyName, |
|
162 TVersion aWantedVersionFrom, |
|
163 TVersion aWantedVersionTo, |
|
164 TVersion aInstalledVersion ); |
|
165 |
|
166 /** |
|
167 * From MUiHandler, displays a dialog at the start of the uninstallation with |
|
168 * information about the application to be uninstalled. The user may cancel the |
|
169 * uninstallation at this stage. This dialog must be shown in TrustedUI mode. |
|
170 */ |
|
171 TBool DisplayUninstallL( const Swi::CAppInfo& aAppInfo ); |
|
172 |
|
173 /** |
|
174 * From MUiHandler, displays a dialog containing text. This dialog has only a |
|
175 * Continue button if aOption is EInstFileTextOptionContinue, or Yes and No buttons |
|
176 * otherwise. |
|
177 */ |
|
178 TBool DisplayTextL( const Swi::CAppInfo& aAppInfo, |
|
179 Swi::TFileTextOption aOption, |
|
180 const TDesC& aText ); |
|
181 |
|
182 /** |
|
183 * From MUiHandler, displays a dialog showing an error message. |
|
184 */ |
|
185 void DisplayErrorL( const Swi::CAppInfo& aAppInfo, |
|
186 Swi::TErrorDialog aType, |
|
187 const TDesC& aParam ); |
|
188 |
|
189 /** |
|
190 * From MUiHandler, displays a dialog indicating that a component which is being |
|
191 * uninstalled is a dependency of another component installed. |
|
192 */ |
|
193 TBool DisplayDependencyBreakL( const Swi::CAppInfo& aAppInfo, |
|
194 const RPointerArray<TDesC>& aComponents ); |
|
195 |
|
196 /** |
|
197 * From MUiHandler, informs user that the applications are in use during an |
|
198 * uninstallation. Return ETrue if the user wishes to continue the removal process and |
|
199 * close the applications anyway. |
|
200 */ |
|
201 TBool DisplayApplicationsInUseL( const Swi::CAppInfo& aAppInfo, |
|
202 const RPointerArray<TDesC>& aAppNames ); |
|
203 |
|
204 /** |
|
205 * From MUiHandler, displays a generic question dialog with a Yes/No answer. |
|
206 */ |
|
207 TBool DisplayQuestionL( const Swi::CAppInfo& aAppInfo, |
|
208 Swi::TQuestionDialog aQuestion, |
|
209 const TDesC& aDes = KNullDesC ); |
|
210 |
|
211 |
|
212 public: // From CSisxUIHandler |
|
213 |
|
214 |
|
215 /** |
|
216 * Show the final note. |
|
217 * @since 3.0 |
|
218 */ |
|
219 virtual void ShowFinalNoteL(); |
|
220 |
|
221 |
|
222 private: |
|
223 |
|
224 /** |
|
225 * Constructor. |
|
226 * @param aMode - Indicates if this is for install or uninstall |
|
227 */ |
|
228 CSisxUISilentHandler( const TInstallOptions &aOptions, MSisxUICancelObserver* aCancelObserver ); |
|
229 |
|
230 CSisxUISilentHandler( const TUninstallOptions &aOptions, MSisxUICancelObserver* aCancelObserver ); |
|
231 |
|
232 /** |
|
233 * 2nd phase constructor. |
|
234 */ |
|
235 void ConstructL(); |
|
236 |
|
237 /** |
|
238 * Constructor. |
|
239 * @aForeground - ETrue value brings Installer UI to foreground. EFalse sends it |
|
240 * to background. |
|
241 */ |
|
242 void BringToForeground( TBool aForeground ); |
|
243 |
|
244 private: // Data |
|
245 |
|
246 TInstallOptions iOptions; |
|
247 TUninstallOptions iUninstallOptions; |
|
248 }; |
|
249 |
|
250 } |
|
251 |
|
252 #endif // SISXUIHANDLER_H |
|
253 |
|
254 // End of File |
|