26 |
27 |
27 // --------------------------------------------------------------------------- |
28 // --------------------------------------------------------------------------- |
28 // CSisxSifPluginUiHandlerBase::CSisxSifPluginUiHandlerBase() |
29 // CSisxSifPluginUiHandlerBase::CSisxSifPluginUiHandlerBase() |
29 // --------------------------------------------------------------------------- |
30 // --------------------------------------------------------------------------- |
30 // |
31 // |
31 CSisxSifPluginUiHandlerBase::CSisxSifPluginUiHandlerBase( RFs& aFs ) : iFs( aFs ) |
32 CSisxSifPluginUiHandlerBase::CSisxSifPluginUiHandlerBase( RFs& aFs, |
|
33 CSisxSifPluginErrorHandler& aErrorHandler ) : iFs( aFs ), |
|
34 iErrorHandler( aErrorHandler ) |
32 { |
35 { |
33 } |
36 } |
34 |
37 |
35 // --------------------------------------------------------------------------- |
38 // --------------------------------------------------------------------------- |
36 // CSisxSifPluginUiHandlerBase::~CSisxSifPluginUiHandlerBase() |
39 // CSisxSifPluginUiHandlerBase::~CSisxSifPluginUiHandlerBase() |
134 |
137 |
135 // --------------------------------------------------------------------------- |
138 // --------------------------------------------------------------------------- |
136 // CSisxSifPluginUiHandlerBase::PublishCompletionL() |
139 // CSisxSifPluginUiHandlerBase::PublishCompletionL() |
137 // --------------------------------------------------------------------------- |
140 // --------------------------------------------------------------------------- |
138 // |
141 // |
139 void CSisxSifPluginUiHandlerBase::PublishCompletionL( TErrorCategory aErrorCategory, |
142 void CSisxSifPluginUiHandlerBase::PublishCompletionL( const CSisxSifPluginErrorHandler& aError ) |
140 TInt aErrorCode, const TDesC& aErrorMessage, const TDesC& aErrorDetails ) |
|
141 { |
143 { |
142 User::LeaveIfNull( iPublishSifOperationInfo ); |
144 User::LeaveIfNull( iPublishSifOperationInfo ); |
143 CSifOperationEndData* data = CSifOperationEndData::NewLC( *iGlobalComponentId, |
145 CSifOperationEndData* data = CSifOperationEndData::NewLC( *iGlobalComponentId, |
144 aErrorCategory, aErrorCode, aErrorMessage, aErrorDetails ); |
146 aError.ErrorCategory(), aError.ErrorCode(), aError.ErrorMessage(), |
|
147 aError.ErrorMessageDetails() ); |
145 iPublishSifOperationInfo->PublishCompletionL( *data ); |
148 iPublishSifOperationInfo->PublishCompletionL( *data ); |
146 CleanupStack::PopAndDestroy( data ); |
149 CleanupStack::PopAndDestroy( data ); |
147 } |
150 } |
148 |
151 |
|
152 // --------------------------------------------------------------------------- |
|
153 // CSisxSifPluginUiHandlerBase::SetDisplayErrorL() |
|
154 // --------------------------------------------------------------------------- |
|
155 // |
|
156 void CSisxSifPluginUiHandlerBase::SetDisplayErrorL( Swi::TErrorDialog aType, const TDesC& aParam ) |
|
157 { |
|
158 iErrorHandler.SetExtendedErrorCode( aType ); |
|
159 |
|
160 // TODO: localised detailed error messages |
|
161 TBuf<512> details; |
|
162 switch( aType ) |
|
163 { |
|
164 case Swi::EUiAlreadyInRom: |
|
165 details.Copy(_L("EUiAlreadyInRom")); |
|
166 break; |
|
167 case Swi::EUiMissingDependency: |
|
168 details.Copy(_L("EUiMissingDependency")); |
|
169 break; |
|
170 case Swi::EUiRequireVer: |
|
171 details.Copy(_L("EUiRequireVer")); |
|
172 break; |
|
173 case Swi::EUiRequireVerOrGreater: |
|
174 details.Copy(_L("EUiRequireVerOrGreater")); |
|
175 break; |
|
176 case Swi::EUiFileCorrupt: |
|
177 details.Copy(_L("EUiFileCorrupt")); |
|
178 break; |
|
179 case Swi::EUiDiskNotPresent: |
|
180 details.Copy(_L("EUiDiskNotPresent")); |
|
181 break; |
|
182 case Swi::EUiCannotRead: |
|
183 details.Copy(_L("EUiCannotRead")); |
|
184 break; |
|
185 case Swi::EUiCannotDelete: |
|
186 details.Copy(_L("EUiCannotDelete")); |
|
187 break; |
|
188 case Swi::EUiInvalidFileName: |
|
189 details.Copy(_L("EUiInvalidFileName")); |
|
190 break; |
|
191 case Swi::EUiFileNotFound: |
|
192 details.Copy(_L("EUiFileNotFound")); |
|
193 break; |
|
194 case Swi::EUiInsufficientSpaceOnDrive: |
|
195 details.Copy(_L("EUiInsufficientSpaceOnDrive")); |
|
196 break; |
|
197 case Swi::EUiCapabilitiesCannotBeGranted: |
|
198 details.Copy(_L("EUiCapabilitiesCannotBeGranted")); |
|
199 break; |
|
200 case Swi::EUiUnknownFile: |
|
201 details.Copy(_L("EUiUnknownFile")); |
|
202 break; |
|
203 case Swi::EUiMissingBasePackage: |
|
204 details.Copy(_L("EUiMissingBasePackage")); |
|
205 break; |
|
206 case Swi::EUiConstraintsExceeded: |
|
207 details.Copy(_L("EUiConstraintsExceeded")); |
|
208 break; |
|
209 case Swi::EUiSIDViolation: |
|
210 details.Copy(_L("EUiSIDViolation")); |
|
211 break; |
|
212 case Swi::EUiVIDViolation: |
|
213 details.Copy(_L("EUiVIDViolation")); |
|
214 break; |
|
215 case Swi::EUiNoMemoryInDrive: |
|
216 details.Copy(_L("EUiNoMemoryInDrive")); |
|
217 break; |
|
218 case Swi::EUiUIDPackageViolation: |
|
219 details.Copy(_L("EUiUIDPackageViolation")); |
|
220 break; |
|
221 case Swi::EUiOSExeViolation: |
|
222 details.Copy(_L("EUiOSExeViolation")); |
|
223 break; |
|
224 case Swi::EUiSIDMismatch: |
|
225 details.Copy(_L("EUiSIDMismatch")); |
|
226 break; |
|
227 case Swi::EUiBlockingEclipsingFile: |
|
228 details.Copy(_L("EUiBlockingEclipsingFile")); |
|
229 break; |
|
230 default: |
|
231 break; |
|
232 } |
|
233 |
|
234 if( aParam.Length() ) |
|
235 { |
|
236 details.Append( _L("\n") ); |
|
237 details.Append( aParam ); |
|
238 } |
|
239 } |
|
240 |