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 the License "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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "refnativeplugin.h" |
|
20 #include "usiflog.h" |
|
21 #include "sisregistrywritablesession.h" |
|
22 |
|
23 #include <usif/sif/sif.h> |
|
24 #include <usif/sif/sifcommon.h> |
|
25 #include <usif/usiferror.h> |
|
26 #include <usif/sif/sifplugin.h> |
|
27 #include <usif/scr/screntries.h> |
|
28 #include <usif/scr/scr.h> |
|
29 #include <swi/msisuihandlers.h> |
|
30 #include <swi/asynclauncher.h> |
|
31 #include <swi/sisinstallerrors.h> |
|
32 #include <e32property.h> |
|
33 #include <sacls.h> |
|
34 #include <swi/sisregistrysession.h> |
|
35 |
|
36 using namespace Usif; |
|
37 |
|
38 static const TInt KRefNativePluginImpId = 0x10285BC4; |
|
39 |
|
40 static const TImplementationProxy ImplementationTable[] = |
|
41 { |
|
42 IMPLEMENTATION_PROXY_ENTRY(KRefNativePluginImpId, CRefNativePlugin::NewL) |
|
43 }; |
|
44 |
|
45 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) |
|
46 { |
|
47 aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); |
|
48 return ImplementationTable; |
|
49 } |
|
50 |
|
51 CRefNativePlugin* CRefNativePlugin::NewL() |
|
52 { |
|
53 DEBUG_PRINTF(_L8("Constructing CRefNativePlugin")); |
|
54 CRefNativePlugin *self = new (ELeave) CRefNativePlugin(); |
|
55 CleanupStack::PushL(self); |
|
56 self->ConstructL(); |
|
57 CleanupStack::Pop(self); |
|
58 return self; |
|
59 } |
|
60 |
|
61 void CRefNativePlugin::ConstructL() |
|
62 { |
|
63 iImpl = CRefNativePluginActiveImpl::NewL(); |
|
64 } |
|
65 |
|
66 CRefNativePlugin::~CRefNativePlugin() |
|
67 { |
|
68 delete iImpl; |
|
69 } |
|
70 |
|
71 void CRefNativePlugin::CancelOperation() |
|
72 { |
|
73 DEBUG_PRINTF(_L8("Reference native plugin - Cancel")); |
|
74 iImpl->Cancel(); |
|
75 } |
|
76 |
|
77 void CRefNativePlugin::GetComponentInfo(const TDesC& aFileName, const TSecurityContext& /*aSecurityContext*/, |
|
78 CComponentInfo& aComponentInfo, TRequestStatus& aStatus) |
|
79 { |
|
80 iImpl->GetComponentInfo(aFileName, aComponentInfo, aStatus); |
|
81 } |
|
82 |
|
83 void CRefNativePlugin::GetComponentInfo(RFile& aFileHandle, const TSecurityContext& /*aSecurityContext*/, |
|
84 CComponentInfo& aComponentInfo, TRequestStatus& aStatus) |
|
85 { |
|
86 iImpl->GetComponentInfo(aFileHandle, aComponentInfo, aStatus); |
|
87 } |
|
88 |
|
89 void CRefNativePlugin::Install(const TDesC& aFileName, const TSecurityContext& aSecurityContext, |
|
90 const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams, |
|
91 TRequestStatus& aStatus) |
|
92 { |
|
93 iImpl->Install(aFileName, aSecurityContext, aInputParams, aOutputParams, aStatus); |
|
94 } |
|
95 |
|
96 void CRefNativePlugin::Install(RFile& aFileHandle, const TSecurityContext& aSecurityContext, |
|
97 const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams, |
|
98 TRequestStatus& aStatus) |
|
99 { |
|
100 iImpl->Install(aFileHandle, aSecurityContext, aInputParams, aOutputParams, aStatus); |
|
101 } |
|
102 |
|
103 void CRefNativePlugin::Uninstall(TComponentId aComponentId, const TSecurityContext& aSecurityContext, |
|
104 const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams, TRequestStatus& aStatus) |
|
105 { |
|
106 iImpl->Uninstall(aComponentId, aSecurityContext, aInputParams, aOutputParams, aStatus); |
|
107 } |
|
108 |
|
109 void CRefNativePlugin::Activate(TComponentId aComponentId, const TSecurityContext& aSecurityContext, TRequestStatus& aStatus) |
|
110 |
|
111 { |
|
112 DEBUG_PRINTF(_L8("Reference native plugin - Activate")); |
|
113 iImpl->Activate(aComponentId, aSecurityContext, aStatus); |
|
114 } |
|
115 |
|
116 void CRefNativePlugin::Deactivate(TComponentId aComponentId, const TSecurityContext& aSecurityContext, TRequestStatus& aStatus) |
|
117 { |
|
118 DEBUG_PRINTF(_L8("Reference native plugin - Deactivate")); |
|
119 iImpl->Deactivate(aComponentId, aSecurityContext, aStatus); |
|
120 } |
|
121 |
|
122 //------------------CRefNativePluginActiveImpl--------------------- |
|
123 |
|
124 CRefNativePluginActiveImpl* CRefNativePluginActiveImpl::NewL() |
|
125 { |
|
126 DEBUG_PRINTF(_L8("Reference native plugin - Constructing CRefNativePluginActiveImpl")); |
|
127 CRefNativePluginActiveImpl *self = new (ELeave) CRefNativePluginActiveImpl(); |
|
128 CleanupStack::PushL(self); |
|
129 self->ConstructL(); |
|
130 CleanupStack::Pop(1, self); |
|
131 return self; |
|
132 } |
|
133 |
|
134 void CRefNativePluginActiveImpl::ConstructL() |
|
135 { |
|
136 iInstallPrefs = Swi::CInstallPrefs::NewL(); |
|
137 iAsyncLauncher = Swi::CAsyncLauncher::NewL(); |
|
138 iComponentInfo = CComponentInfo::NewL(); |
|
139 CActiveScheduler::Add(this); |
|
140 } |
|
141 |
|
142 CRefNativePluginActiveImpl::~CRefNativePluginActiveImpl() |
|
143 { |
|
144 delete iAsyncLauncher; |
|
145 delete iInstallPrefs; |
|
146 delete iComponentInfo; |
|
147 } |
|
148 |
|
149 TBool CRefNativePluginActiveImpl::NeedUserCapabilityL() |
|
150 { |
|
151 // Silent install is not allowed when the package requires additional capabilities |
|
152 // than what it is signed for (Pakage may request for some capability that is not |
|
153 // granted by the certificate used to sign it). |
|
154 for(TInt cap=0; cap<ECapability_Limit; ++cap) |
|
155 { |
|
156 if (iComponentInfo->RootNodeL().UserGrantableCaps().HasCapability(TCapability(cap))) |
|
157 { |
|
158 DEBUG_PRINTF2(_L("Package requires additional capability - %d"), cap); |
|
159 return ETrue; |
|
160 } |
|
161 } |
|
162 |
|
163 return EFalse; |
|
164 } |
|
165 |
|
166 void CRefNativePluginActiveImpl::RunL() |
|
167 { |
|
168 if (iSilentInstall) |
|
169 { |
|
170 DEBUG_PRINTF(_L("Silent install - CRefNativePluginActiveImpl::RunL")); |
|
171 ProcessSilentInstallL(); |
|
172 } |
|
173 else |
|
174 { |
|
175 TInt res = iStatus.Int(); |
|
176 DEBUG_PRINTF2(_L8("Reference native plugin - Operation finished with result %d"), res); |
|
177 |
|
178 // Output options |
|
179 if (iOutputParams != NULL) |
|
180 { |
|
181 iOutputParams->AddIntL(KSifOutParam_ExtendedErrCode, res); |
|
182 |
|
183 if (iInstallRequest && res == KErrNone) |
|
184 { |
|
185 TComponentId resultComponentId = 0; |
|
186 TRAPD(getLastIdErr, resultComponentId = GetLastInstalledComponentIdL()); |
|
187 if (getLastIdErr == KErrNone) |
|
188 iOutputParams->AddIntL(KSifOutParam_ComponentId, resultComponentId); |
|
189 } |
|
190 } |
|
191 |
|
192 User::RequestComplete(iClientStatus, res); |
|
193 iClientStatus = NULL; |
|
194 } |
|
195 } |
|
196 |
|
197 void CRefNativePluginActiveImpl::ProcessSilentInstallL() |
|
198 { |
|
199 // We need to do this only once per installation request |
|
200 iSilentInstall = EFalse; |
|
201 iInstallRequest = ETrue; |
|
202 |
|
203 TBool isNotAuthenticated = (ENotAuthenticated == iComponentInfo->RootNodeL().Authenticity()); |
|
204 TBool reqUserCap = NeedUserCapabilityL(); |
|
205 if (isNotAuthenticated || reqUserCap) |
|
206 { |
|
207 if (isNotAuthenticated) |
|
208 { |
|
209 DEBUG_PRINTF(_L("Silent Install is not allowed on unsigned or self-signed packages")); |
|
210 } |
|
211 |
|
212 if (reqUserCap) |
|
213 { |
|
214 DEBUG_PRINTF(_L("Silent Install is not allowed when user capabilities are required")); |
|
215 } |
|
216 |
|
217 User::RequestComplete(iClientStatus, KErrNotSupported); |
|
218 iClientStatus = NULL; |
|
219 } |
|
220 else |
|
221 { |
|
222 TInt err; |
|
223 if (iFileHandle) |
|
224 { |
|
225 TRAP(err, iAsyncLauncher->InstallL(*this, *iFileHandle, *iInstallPrefs, iStatus)); |
|
226 } |
|
227 else |
|
228 { |
|
229 //DEBUG_PRINTF2(_L("!!!Silent install for %S"), iFileName); |
|
230 TRAP(err, iAsyncLauncher->InstallL(*this, iFileName, *iInstallPrefs, iStatus)); |
|
231 } |
|
232 |
|
233 if (err != KErrNone) |
|
234 { |
|
235 User::RequestComplete(iClientStatus, err); |
|
236 iClientStatus = NULL; |
|
237 } |
|
238 |
|
239 SetActive(); |
|
240 } |
|
241 } |
|
242 |
|
243 void CRefNativePluginActiveImpl::DoCancel() |
|
244 { |
|
245 if (iClientStatus) |
|
246 { |
|
247 iAsyncLauncher->CancelOperation(); |
|
248 delete iAsyncLauncher; |
|
249 iAsyncLauncher = NULL; |
|
250 |
|
251 User::RequestComplete(iClientStatus, KErrCancel); |
|
252 iClientStatus = NULL; |
|
253 } |
|
254 } |
|
255 |
|
256 void CRefNativePluginActiveImpl::CommonRequestPreamble(const TSecurityContext& aSecurityContext, const COpaqueNamedParams& aInputParams, |
|
257 COpaqueNamedParams& aOutputParams, TRequestStatus& aStatus) |
|
258 { |
|
259 aStatus = KRequestPending; |
|
260 iClientStatus = &aStatus; |
|
261 |
|
262 iInputParams = &aInputParams; |
|
263 iOutputParams = &aOutputParams; |
|
264 |
|
265 TInt declineOperation = 0; |
|
266 TRAPD(err, aInputParams.GetIntByNameL(KDeclineOperationOptionName, declineOperation)); |
|
267 if(err == KErrNone && declineOperation) |
|
268 { |
|
269 iDeclineOperation = ETrue; |
|
270 } |
|
271 |
|
272 // Check to see if we have the opaque input argument - InstallSilently |
|
273 TInt silentInstall = 0; |
|
274 TRAP_IGNORE(aInputParams.GetIntByNameL(KSifInParam_InstallSilently, silentInstall)); |
|
275 if (silentInstall) |
|
276 { |
|
277 iSilentInstall = ETrue; |
|
278 if (!aSecurityContext.HasCapability(ECapabilityTrustedUI)) |
|
279 { |
|
280 User::RequestComplete(iClientStatus, KErrPermissionDenied); |
|
281 iClientStatus = NULL; |
|
282 } |
|
283 } |
|
284 } |
|
285 |
|
286 TComponentId CRefNativePluginActiveImpl::GetLastInstalledComponentIdL() |
|
287 { |
|
288 ASSERT(iInstallRequest); |
|
289 |
|
290 // Find the id of the last installed component and return it |
|
291 TInt uid; |
|
292 User::LeaveIfError(RProperty::Get(KUidSystemCategory, KUidSwiLatestInstallation, uid)); |
|
293 |
|
294 Swi::RSisRegistrySession sisRegistrySession; |
|
295 User::LeaveIfError(sisRegistrySession.Connect()); |
|
296 CleanupClosePushL(sisRegistrySession); |
|
297 |
|
298 TUid tuid(TUid::Uid(uid)); |
|
299 TComponentId componentId = sisRegistrySession.GetComponentIdForUidL(tuid); |
|
300 CleanupStack::PopAndDestroy(&sisRegistrySession); |
|
301 |
|
302 return componentId; |
|
303 } |
|
304 |
|
305 void CRefNativePluginActiveImpl::GetComponentInfo(const TDesC& aFileName, CComponentInfo& aComponentInfo, TRequestStatus& aStatus) |
|
306 { |
|
307 DEBUG_PRINTF2(_L("Reference native plugin - retrieving component info for %S"), &aFileName); |
|
308 |
|
309 aStatus = KRequestPending; |
|
310 iClientStatus = &aStatus; |
|
311 |
|
312 TRAPD(err, iAsyncLauncher->GetComponentInfoL(*this, aFileName, *iInstallPrefs, aComponentInfo, iStatus)); |
|
313 if (err != KErrNone) |
|
314 { |
|
315 TRequestStatus *statusPtr(&aStatus); |
|
316 User::RequestComplete(statusPtr, err); |
|
317 return; |
|
318 } |
|
319 |
|
320 SetActive(); |
|
321 } |
|
322 |
|
323 void CRefNativePluginActiveImpl::GetComponentInfo(RFile& aFileHandle, CComponentInfo& aComponentInfo, TRequestStatus& aStatus) |
|
324 { |
|
325 DEBUG_PRINTF(_L8("Reference native plugin - getting component info by file handle")); |
|
326 |
|
327 aStatus = KRequestPending; |
|
328 iClientStatus = &aStatus; |
|
329 |
|
330 TRAPD(err, iAsyncLauncher->GetComponentInfoL(*this, aFileHandle, *iInstallPrefs, aComponentInfo, iStatus)); |
|
331 if (err != KErrNone) |
|
332 { |
|
333 TRequestStatus *statusPtr(&aStatus); |
|
334 User::RequestComplete(statusPtr, err); |
|
335 return; |
|
336 } |
|
337 |
|
338 SetActive(); |
|
339 } |
|
340 |
|
341 void CRefNativePluginActiveImpl::Install(const TDesC& aFileName, const TSecurityContext& aSecurityContext, |
|
342 const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams, |
|
343 TRequestStatus& aStatus) |
|
344 { |
|
345 DEBUG_PRINTF2(_L("Reference native plugin - install for %S"), &aFileName); |
|
346 |
|
347 CommonRequestPreamble(aSecurityContext, aInputParams, aOutputParams, aStatus); |
|
348 |
|
349 TInt err; |
|
350 if (iSilentInstall) |
|
351 { |
|
352 // Silent install does a few addtional checks on the package to see if is |
|
353 // signed and had the required capabilities. So we need to the get the |
|
354 // package component information with out installing it. |
|
355 DEBUG_PRINTF2(_L("Silent install - Get the ComponentInfo for %S"), &aFileName); |
|
356 iFileName = aFileName; |
|
357 TRAP(err, iAsyncLauncher->GetComponentInfoL(*this, aFileName, *iInstallPrefs, *iComponentInfo, iStatus)); |
|
358 } |
|
359 else |
|
360 { |
|
361 // Proceed with the normal installation. |
|
362 RArray<TInt> tmp; |
|
363 tmp.Append(01); |
|
364 tmp.Append(02); |
|
365 tmp.Append(03); |
|
366 tmp.Append(04); |
|
367 tmp.Append(05); |
|
368 TRAP(err, iAsyncLauncher->InstallL(*this, aFileName, *iInstallPrefs, tmp, iStatus)); |
|
369 tmp.Close(); |
|
370 iInstallRequest = ETrue; |
|
371 } |
|
372 |
|
373 if (err != KErrNone) |
|
374 { |
|
375 TRequestStatus *statusPtr(&aStatus); |
|
376 User::RequestComplete(statusPtr, err); |
|
377 return; |
|
378 } |
|
379 |
|
380 SetActive(); |
|
381 } |
|
382 |
|
383 void CRefNativePluginActiveImpl::Install(RFile& aFileHandle, const TSecurityContext& aSecurityContext, |
|
384 const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams, |
|
385 TRequestStatus& aStatus) |
|
386 { |
|
387 DEBUG_PRINTF(_L8("Reference native plugin - install by file handle")); |
|
388 |
|
389 CommonRequestPreamble(aSecurityContext, aInputParams, aOutputParams, aStatus); |
|
390 |
|
391 TInt err; |
|
392 if (iSilentInstall) |
|
393 { |
|
394 // Silent install does a few addtional checks on the package to see if is |
|
395 // signed and had the required capabilities. So we need to the get the |
|
396 // package component information with out installing it. |
|
397 iFileHandle = &aFileHandle; |
|
398 TRAP(err, iAsyncLauncher->GetComponentInfoL(*this, aFileHandle, *iInstallPrefs, *iComponentInfo, iStatus)); |
|
399 } |
|
400 else |
|
401 { |
|
402 // Proceed with the normal installation. |
|
403 TRAP(err, iAsyncLauncher->InstallL(*this, aFileHandle, *iInstallPrefs, iStatus)); |
|
404 iInstallRequest = ETrue; |
|
405 } |
|
406 |
|
407 if (err != KErrNone) |
|
408 { |
|
409 TRequestStatus *statusPtr(&aStatus); |
|
410 User::RequestComplete(statusPtr, err); |
|
411 return; |
|
412 } |
|
413 |
|
414 SetActive(); |
|
415 } |
|
416 |
|
417 void CRefNativePluginActiveImpl::Uninstall(TComponentId aComponentId, const TSecurityContext& aSecurityContext, |
|
418 const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams, TRequestStatus& aStatus) |
|
419 { |
|
420 TRAPD(err, UninstallL(aComponentId, aSecurityContext, aInputParams, aOutputParams, aStatus)); |
|
421 if (err != KErrNone) |
|
422 { |
|
423 TRequestStatus *statusPtr(&aStatus); |
|
424 User::RequestComplete(statusPtr, err); |
|
425 return; |
|
426 } |
|
427 SetActive(); |
|
428 } |
|
429 |
|
430 void CRefNativePluginActiveImpl::UninstallL(TComponentId aComponentId, const TSecurityContext& aSecurityContext, |
|
431 const COpaqueNamedParams& aInputParams, COpaqueNamedParams& aOutputParams, TRequestStatus& aStatus) |
|
432 { |
|
433 DEBUG_PRINTF(_L8("Reference native plugin - uninstall")); |
|
434 CommonRequestPreamble(aSecurityContext, aInputParams, aOutputParams, aStatus); |
|
435 // Get UID for given component id |
|
436 RSoftwareComponentRegistry scrSession; |
|
437 User::LeaveIfError(scrSession.Connect()); |
|
438 CleanupClosePushL(scrSession); |
|
439 |
|
440 CPropertyEntry* propertyEntry = scrSession.GetComponentPropertyL(aComponentId, _L("CompUid")); |
|
441 CleanupStack::PushL(propertyEntry); |
|
442 |
|
443 CIntPropertyEntry* intPropertyEntry = dynamic_cast<CIntPropertyEntry *>(propertyEntry); |
|
444 |
|
445 TRequestStatus *statusPtr(&aStatus); |
|
446 if (intPropertyEntry == NULL) |
|
447 { |
|
448 DEBUG_PRINTF2(_L8("UID property for component %d was not found"), aComponentId); |
|
449 User::RequestComplete(statusPtr, KErrNotFound); |
|
450 return; |
|
451 } |
|
452 |
|
453 TUid objectId = TUid::Uid(intPropertyEntry->IntValue()); |
|
454 CleanupStack::PopAndDestroy(2, &scrSession); |
|
455 |
|
456 iAsyncLauncher->UninstallL(*this, objectId, iStatus); |
|
457 } |
|
458 |
|
459 void CRefNativePluginActiveImpl::Activate(TComponentId aComponentId, const TSecurityContext& /*aSecurityContext*/, TRequestStatus& aStatus) |
|
460 { |
|
461 DEBUG_PRINTF(_L8("Reference native plugin - activate")); |
|
462 iStatus = KRequestPending; |
|
463 aStatus = KRequestPending; |
|
464 iClientStatus = &aStatus; |
|
465 |
|
466 TRequestStatus* rs(&iStatus); |
|
467 |
|
468 Swi::RSisRegistryWritableSession sisRegSession; |
|
469 TRAPD(err, |
|
470 User::LeaveIfError(sisRegSession.Connect()); |
|
471 sisRegSession.ActivateComponentL(aComponentId); |
|
472 ) |
|
473 sisRegSession.Close(); |
|
474 |
|
475 User::RequestComplete(rs, err); |
|
476 SetActive(); |
|
477 } |
|
478 |
|
479 void CRefNativePluginActiveImpl::Deactivate(TComponentId aComponentId, const TSecurityContext& /*aSecurityContext*/, TRequestStatus& aStatus) |
|
480 { |
|
481 DEBUG_PRINTF(_L8("Reference native plugin - deactivate")); |
|
482 iStatus = KRequestPending; |
|
483 aStatus = KRequestPending; |
|
484 iClientStatus = &aStatus; |
|
485 |
|
486 TRequestStatus* rs(&iStatus); |
|
487 |
|
488 Swi::RSisRegistryWritableSession sisRegSession; |
|
489 TRAPD(err, |
|
490 User::LeaveIfError(sisRegSession.Connect()); |
|
491 sisRegSession.DeactivateComponentL(aComponentId); |
|
492 ) |
|
493 sisRegSession.Close(); |
|
494 |
|
495 User::RequestComplete(rs, err); |
|
496 SetActive(); |
|
497 } |
|
498 |
|
499 // SWI::MUiHandler implementation |
|
500 TInt CRefNativePluginActiveImpl::DisplayLanguageL(const Swi::CAppInfo& /*aAppInfo*/,const RArray<TLanguage>& /*aLanguages*/) |
|
501 { |
|
502 DEBUG_PRINTF(_L8("Reference native plugin - DisplayLanguageL")); |
|
503 return 0; |
|
504 } |
|
505 |
|
506 TInt CRefNativePluginActiveImpl::DisplayDriveL(const Swi::CAppInfo& /*aAppInfo*/,TInt64 /*aSize*/, const RArray<TChar>& /*aDriveLetters*/, const RArray<TInt64>& /*aDriveSpaces*/) |
|
507 { |
|
508 DEBUG_PRINTF(_L8("Reference native plugin - DisplayDriveL")); |
|
509 return 0; |
|
510 } |
|
511 |
|
512 TBool CRefNativePluginActiveImpl::DisplayUninstallL(const Swi::CAppInfo& /*aAppInfo*/) |
|
513 { |
|
514 DEBUG_PRINTF(_L8("Reference native plugin - DisplayUninstallL")); |
|
515 if (iDeclineOperation) |
|
516 { |
|
517 DEBUG_PRINTF(_L8("Reference native plugin - Received an option to decline operation - stopping uninstall")); |
|
518 return EFalse; |
|
519 } |
|
520 return ETrue; |
|
521 } |
|
522 |
|
523 TBool CRefNativePluginActiveImpl::DisplayTextL(const Swi::CAppInfo& /*aAppInfo*/, Swi::TFileTextOption /*aOption*/, const TDesC& /*aText*/) |
|
524 { |
|
525 DEBUG_PRINTF(_L8("Reference native plugin - DisplayTextL")); |
|
526 return ETrue; |
|
527 } |
|
528 |
|
529 TBool CRefNativePluginActiveImpl::DisplayDependencyBreakL(const Swi::CAppInfo& /*aAppInfo*/, const RPointerArray<TDesC>& /*aComponents*/) |
|
530 { |
|
531 DEBUG_PRINTF(_L8("Reference native plugin - DisplayDependencyBreakL")); |
|
532 return ETrue; |
|
533 } |
|
534 |
|
535 TBool CRefNativePluginActiveImpl::DisplayApplicationsInUseL(const Swi::CAppInfo& /*aAppInfo*/, const RPointerArray<TDesC>& /*aAppNames*/) |
|
536 { |
|
537 DEBUG_PRINTF(_L8("Reference native plugin - DisplayApplicationsInUseL")); |
|
538 return ETrue; |
|
539 } |
|
540 |
|
541 TBool CRefNativePluginActiveImpl::DisplayQuestionL(const Swi::CAppInfo& /*aAppInfo*/, Swi::TQuestionDialog /*aQuestion*/, const TDesC& /*aDes*/) |
|
542 { |
|
543 DEBUG_PRINTF(_L8("Reference native plugin - DisplayQuestionL")); |
|
544 return ETrue; |
|
545 } |
|
546 |
|
547 TBool CRefNativePluginActiveImpl::DisplayInstallL(const Swi::CAppInfo& /*aAppInfo*/, const CApaMaskedBitmap* /*aLogo*/, const RPointerArray<Swi::CCertificateInfo>& /*aCertificates*/) |
|
548 { |
|
549 DEBUG_PRINTF(_L8("Reference native plugin - DisplayInstallL")); |
|
550 |
|
551 if (iDeclineOperation) |
|
552 { |
|
553 DEBUG_PRINTF(_L8("Reference native plugin - Received an option to decline operation - stopping install")); |
|
554 return EFalse; |
|
555 } |
|
556 return ETrue; |
|
557 } |
|
558 |
|
559 TBool CRefNativePluginActiveImpl::DisplayGrantCapabilitiesL(const Swi::CAppInfo& /*aAppInfo*/, const TCapabilitySet& /*aCapabilitySet*/) |
|
560 { |
|
561 DEBUG_PRINTF(_L8("Reference native plugin - DisplayGrantCapabilitiesL")); |
|
562 return ETrue; |
|
563 } |
|
564 |
|
565 TBool CRefNativePluginActiveImpl::DisplayUpgradeL(const Swi::CAppInfo& /*aAppInfo*/, const Swi::CAppInfo& /*aExistingAppInfo*/) |
|
566 { |
|
567 DEBUG_PRINTF(_L8("Reference native plugin - DisplayUpgradeL")); |
|
568 return ETrue; |
|
569 } |
|
570 |
|
571 TBool CRefNativePluginActiveImpl::DisplayOptionsL(const Swi::CAppInfo& /*aAppInfo*/, const RPointerArray<TDesC>& /*aOptions*/, RArray<TBool>& /*aSelections*/) |
|
572 { |
|
573 DEBUG_PRINTF(_L8("Reference native plugin - DisplayOptionsL")); |
|
574 return ETrue; |
|
575 } |
|
576 |
|
577 TBool CRefNativePluginActiveImpl::DisplaySecurityWarningL(const Swi::CAppInfo& /*aAppInfo*/, Swi::TSignatureValidationResult /*aSigValidationResult*/, |
|
578 RPointerArray<CPKIXValidationResultBase>& /*aPkixResults*/, RPointerArray<Swi::CCertificateInfo>& /*aCertificates*/, TBool /*aInstallAnyway*/) |
|
579 { |
|
580 DEBUG_PRINTF(_L8("Reference native plugin - DisplaySecurityWarningL")); |
|
581 return ETrue; |
|
582 } |
|
583 |
|
584 TBool CRefNativePluginActiveImpl::DisplayOcspResultL(const Swi::CAppInfo& /*aAppInfo*/, Swi::TRevocationDialogMessage /*aMessage*/, RPointerArray<TOCSPOutcome>& /*aOutcomes*/, |
|
585 RPointerArray<Swi::CCertificateInfo>& /*aCertificates*/,TBool /*aWarningOnly*/) |
|
586 { |
|
587 DEBUG_PRINTF(_L8("Reference native plugin - DisplayOcspResultL")); |
|
588 return ETrue; |
|
589 } |
|
590 |
|
591 TBool CRefNativePluginActiveImpl::DisplayMissingDependencyL(const Swi::CAppInfo& /*aAppInfo*/, const TDesC& /*aDependencyName*/, TVersion /*aWantedVersionFrom*/, |
|
592 TVersion /*aWantedVersionTo*/, TVersion /*aInstalledVersion*/) |
|
593 { |
|
594 DEBUG_PRINTF(_L8("Reference native plugin - DisplayMissingDependencyL")); |
|
595 return ETrue; |
|
596 } |
|
597 |
|
598 TBool CRefNativePluginActiveImpl::HandleInstallEventL(const Swi::CAppInfo& /*aAppInfo*/, Swi::TInstallEvent /*aEvent*/, TInt /*aValue*/, const TDesC& /*aDes*/) |
|
599 { |
|
600 DEBUG_PRINTF(_L8("Reference native plugin - HandleInstallEventL")); |
|
601 return ETrue; |
|
602 } |
|
603 |
|
604 void CRefNativePluginActiveImpl::HandleCancellableInstallEventL(const Swi::CAppInfo& /*aAppInfo*/, Swi::TInstallCancellableEvent /*aEvent*/, Swi::MCancelHandler& /*aCancelHandler*/, |
|
605 TInt /*aValue*/,const TDesC& /*aDes*/) |
|
606 { |
|
607 DEBUG_PRINTF(_L8("Reference native plugin - HandleCancellableInstallEventL")); |
|
608 } |
|
609 |
|
610 void CRefNativePluginActiveImpl::DisplayCannotOverwriteFileL(const Swi::CAppInfo& /*aAppInfo*/, const Swi::CAppInfo& /*aInstalledAppInfo*/,const TDesC& /*aFileName*/) |
|
611 { |
|
612 DEBUG_PRINTF(_L8("Reference native plugin - DisplayCannotOverwriteFileL")); |
|
613 } |
|
614 |
|
615 void CRefNativePluginActiveImpl::DisplayErrorL(const Swi::CAppInfo& /*aAppInfo*/, Swi::TErrorDialog /*aType*/, const TDesC& /*aParam*/) |
|
616 { |
|
617 DEBUG_PRINTF(_L8("Reference native plugin - DisplayErrorL")); |
|
618 } |
|
619 |
|