52 // --------------------------------------------------------------------------- |
53 // --------------------------------------------------------------------------- |
53 // CSisxSifPluginUiHandlerSilent::DisplayTextL() |
54 // CSisxSifPluginUiHandlerSilent::DisplayTextL() |
54 // --------------------------------------------------------------------------- |
55 // --------------------------------------------------------------------------- |
55 // |
56 // |
56 TBool CSisxSifPluginUiHandlerSilent::DisplayTextL( const Swi::CAppInfo& /*aAppInfo*/, |
57 TBool CSisxSifPluginUiHandlerSilent::DisplayTextL( const Swi::CAppInfo& /*aAppInfo*/, |
57 Swi::TFileTextOption /*aOption*/, const TDesC& /*aText*/ ) |
58 Swi::TFileTextOption aOption, const TDesC& aText ) |
58 { |
59 { |
59 TBool okToContinue = EFalse; |
60 TBool okToContinue = EFalse; |
|
61 |
60 if( iInstallParams ) |
62 if( iInstallParams ) |
61 { |
63 { |
62 switch( iInstallParams->PackageInfo() ) |
64 switch( iInstallParams->PackageInfo() ) |
63 { |
65 { |
64 case EAllowed: |
66 case EAllowed: |
65 okToContinue = ETrue; |
67 okToContinue = ETrue; |
66 break; |
68 break; |
67 case EUserConfirm: |
69 case EUserConfirm: |
68 // TODO: EPolicyUserConfirm |
70 switch( aOption ) |
|
71 { |
|
72 case Swi::EInstFileTextOptionContinue: |
|
73 ShowQuestionWithContinueL( aText ); |
|
74 okToContinue = ETrue; |
|
75 break; |
|
76 case Swi::EInstFileTextOptionSkipOneIfNo: |
|
77 okToContinue = ShowQuestionL( aText ); |
|
78 break; |
|
79 case Swi::EInstFileTextOptionAbortIfNo: |
|
80 case Swi::EInstFileTextOptionExitIfNo: |
|
81 okToContinue = ShowQuestionL( aText ); |
|
82 break; |
|
83 case Swi::EInstFileTextOptionForceAbort: |
|
84 ShowQuestionWithContinueL( aText ); |
|
85 break; |
|
86 default: |
|
87 break; |
|
88 } |
69 break; |
89 break; |
70 case ENotAllowed: |
90 case ENotAllowed: |
71 default: |
91 default: |
72 break; |
92 SetErrorL( KErrPermissionDenied, ESifUiNeedsPackageInfoParameter, aText ); |
73 } |
93 break; |
74 } |
94 } |
|
95 } |
|
96 |
75 return okToContinue; |
97 return okToContinue; |
76 } |
98 } |
77 |
99 |
78 // --------------------------------------------------------------------------- |
100 // --------------------------------------------------------------------------- |
79 // CSisxSifPluginUiHandlerSilent::DisplayErrorL() |
101 // CSisxSifPluginUiHandlerSilent::DisplayErrorL() |
80 // --------------------------------------------------------------------------- |
102 // --------------------------------------------------------------------------- |
81 // |
103 // |
82 void CSisxSifPluginUiHandlerSilent::DisplayErrorL( const Swi::CAppInfo& /*aAppInfo*/, |
104 void CSisxSifPluginUiHandlerSilent::DisplayErrorL( const Swi::CAppInfo& /*aAppInfo*/, |
83 Swi::TErrorDialog aType, const TDesC& aParam ) |
105 Swi::TErrorDialog aType, const TDesC& aParam ) |
84 { |
106 { |
85 SetDisplayErrorL( aType, aParam ); |
107 SetErrorSwiErrorL( aType, aParam ); |
86 } |
108 } |
87 |
109 |
88 // --------------------------------------------------------------------------- |
110 // --------------------------------------------------------------------------- |
89 // CSisxSifPluginUiHandlerSilent::DisplayDependencyBreakL() |
111 // CSisxSifPluginUiHandlerSilent::DisplayDependencyBreakL() |
90 // --------------------------------------------------------------------------- |
112 // --------------------------------------------------------------------------- |
91 // |
113 // |
92 TBool CSisxSifPluginUiHandlerSilent::DisplayDependencyBreakL( const Swi::CAppInfo& /*aAppInfo*/, |
114 TBool CSisxSifPluginUiHandlerSilent::DisplayDependencyBreakL( const Swi::CAppInfo& /*aAppInfo*/, |
93 const RPointerArray<TDesC>& /*aComponents*/ ) |
115 const RPointerArray<TDesC>& /*aComponents*/ ) |
94 { |
116 { |
95 TBool okToContinue = EFalse; |
117 TBool okToContinue = EFalse; |
|
118 |
96 if( iInstallParams ) |
119 if( iInstallParams ) |
97 { |
120 { |
98 switch( iInstallParams->AllowAppBreakDependency() ) |
121 switch( iInstallParams->AllowAppBreakDependency() ) |
99 { |
122 { |
100 case EAllowed: |
123 case EAllowed: |
101 okToContinue = ETrue; |
124 okToContinue = ETrue; |
102 break; |
125 break; |
103 case EUserConfirm: |
126 case EUserConfirm: |
104 case ENotAllowed: |
127 case ENotAllowed: |
105 default: |
128 default: |
106 break; |
129 SetErrorL( KErrPermissionDenied, ESifUiNeedsAllowAppBreakDependencyParameter ); |
107 } |
130 break; |
108 } |
131 } |
|
132 } |
|
133 |
109 return okToContinue; |
134 return okToContinue; |
110 } |
135 } |
111 |
136 |
112 // --------------------------------------------------------------------------- |
137 // --------------------------------------------------------------------------- |
113 // CSisxSifPluginUiHandlerSilent::DisplayApplicationsInUseL() |
138 // CSisxSifPluginUiHandlerSilent::DisplayApplicationsInUseL() |
115 // |
140 // |
116 TBool CSisxSifPluginUiHandlerSilent::DisplayApplicationsInUseL( const Swi::CAppInfo& /*aAppInfo*/, |
141 TBool CSisxSifPluginUiHandlerSilent::DisplayApplicationsInUseL( const Swi::CAppInfo& /*aAppInfo*/, |
117 const RPointerArray<TDesC>& /*aAppNames*/ ) |
142 const RPointerArray<TDesC>& /*aAppNames*/ ) |
118 { |
143 { |
119 TBool okToContinue = EFalse; |
144 TBool okToContinue = EFalse; |
|
145 |
120 if( iInstallParams ) |
146 if( iInstallParams ) |
121 { |
147 { |
122 switch( iInstallParams->AllowAppShutdown() ) |
148 switch( iInstallParams->AllowAppShutdown() ) |
123 { |
149 { |
124 case EAllowed: |
150 case EAllowed: |
125 okToContinue = ETrue; |
151 okToContinue = ETrue; |
126 break; |
152 break; |
127 case EUserConfirm: |
153 case EUserConfirm: |
128 case ENotAllowed: |
154 case ENotAllowed: |
129 default: |
155 default: |
130 break; |
156 SetErrorL( KErrPermissionDenied, ESifUiNeedsAllowAppShutdownParameter ); |
131 } |
157 break; |
132 } |
158 } |
|
159 } |
|
160 |
133 return okToContinue; |
161 return okToContinue; |
134 } |
162 } |
135 |
163 |
136 // --------------------------------------------------------------------------- |
164 // --------------------------------------------------------------------------- |
137 // CSisxSifPluginUiHandlerSilent::DisplayQuestionL() |
165 // CSisxSifPluginUiHandlerSilent::DisplayQuestionL() |
138 // --------------------------------------------------------------------------- |
166 // --------------------------------------------------------------------------- |
139 // |
167 // |
140 TBool CSisxSifPluginUiHandlerSilent::DisplayQuestionL( const Swi::CAppInfo& /*aAppInfo*/, |
168 TBool CSisxSifPluginUiHandlerSilent::DisplayQuestionL( const Swi::CAppInfo& /*aAppInfo*/, |
141 Swi::TQuestionDialog aQuestion, const TDesC& /*aDes*/ ) |
169 Swi::TQuestionDialog aQuestion, const TDesC& aDes ) |
142 { |
170 { |
143 TBool okToContinue = EFalse; |
171 TBool okToContinue = EFalse; |
|
172 |
144 switch( aQuestion ) |
173 switch( aQuestion ) |
145 { |
174 { |
146 case Swi::EQuestionIncompatible: |
175 case Swi::EQuestionIncompatible: |
147 if( iInstallParams ) |
176 if( iInstallParams ) |
148 { |
177 { |
336 // --------------------------------------------------------------------------- |
379 // --------------------------------------------------------------------------- |
337 // CSisxSifPluginUiHandlerSilent::HandleInstallEventL() |
380 // CSisxSifPluginUiHandlerSilent::HandleInstallEventL() |
338 // --------------------------------------------------------------------------- |
381 // --------------------------------------------------------------------------- |
339 // |
382 // |
340 TBool CSisxSifPluginUiHandlerSilent::HandleInstallEventL( const Swi::CAppInfo& /*aAppInfo*/, |
383 TBool CSisxSifPluginUiHandlerSilent::HandleInstallEventL( const Swi::CAppInfo& /*aAppInfo*/, |
341 Swi::TInstallEvent /*aEvent*/, TInt /*aValue*/, const TDesC& /*aDes*/ ) |
384 Swi::TInstallEvent aEvent, TInt aValue, const TDesC& /*aDes*/ ) |
342 { |
385 { |
|
386 switch( aEvent ) |
|
387 { |
|
388 case Swi::EEventSetProgressBarFinalValue: |
|
389 iProgressBarFinalValue = aValue; |
|
390 break; |
|
391 |
|
392 case Swi::EEventUpdateProgressBar: |
|
393 iProgressBarCurrentValue += aValue; |
|
394 PublishProgressL( EFileOperation ); |
|
395 break; |
|
396 |
|
397 case Swi::EEventDevCert: |
|
398 case Swi::EEventOcspCheckEnd: |
|
399 case Swi::EEventAbortedInstall: |
|
400 case Swi::EEventAbortedUnInstall: |
|
401 case Swi::EEventCompletedInstall: |
|
402 case Swi::EEventCompletedUnInstall: |
|
403 case Swi::EEventCompletedNoMessage: |
|
404 case Swi::EEventLeave: |
|
405 default: |
|
406 break; |
|
407 } |
|
408 |
343 return ETrue; |
409 return ETrue; |
344 } |
410 } |
345 |
411 |
346 // --------------------------------------------------------------------------- |
412 // --------------------------------------------------------------------------- |
347 // CSisxSifPluginUiHandlerSilent::HandleCancellableInstallEventL() |
413 // CSisxSifPluginUiHandlerSilent::HandleCancellableInstallEventL() |
348 // --------------------------------------------------------------------------- |
414 // --------------------------------------------------------------------------- |
349 // |
415 // |
350 void CSisxSifPluginUiHandlerSilent::HandleCancellableInstallEventL( |
416 void CSisxSifPluginUiHandlerSilent::HandleCancellableInstallEventL( |
351 const Swi::CAppInfo& /*aAppInfo*/, Swi::TInstallCancellableEvent /*aEvent*/, |
417 const Swi::CAppInfo& /*aAppInfo*/, Swi::TInstallCancellableEvent aEvent, |
352 Swi::MCancelHandler& /*aCancelHandler*/, TInt /*aValue*/, const TDesC& /*aDes*/ ) |
418 Swi::MCancelHandler& /*aCancelHandler*/, TInt /*aValue*/, const TDesC& /*aDes*/ ) |
353 { |
419 { |
|
420 switch( aEvent ) |
|
421 { |
|
422 case Swi::EEventOcspCheckStart: |
|
423 PublishProgressL( EOCSPCheck ); |
|
424 break; |
|
425 |
|
426 case Swi::EEventRemovingFiles: |
|
427 case Swi::EEventCopyingFiles: |
|
428 case Swi::EEventShuttingDownApps: |
|
429 default: |
|
430 break; |
|
431 } |
354 } |
432 } |
355 |
433 |
356 // --------------------------------------------------------------------------- |
434 // --------------------------------------------------------------------------- |
357 // CSisxSifPluginUiHandlerSilent::DisplaySecurityWarningL() |
435 // CSisxSifPluginUiHandlerSilent::DisplaySecurityWarningL() |
358 // --------------------------------------------------------------------------- |
436 // --------------------------------------------------------------------------- |
405 // --------------------------------------------------------------------------- |
483 // --------------------------------------------------------------------------- |
406 // CSisxSifPluginUiHandlerSilent::DisplayOcspResultL() |
484 // CSisxSifPluginUiHandlerSilent::DisplayOcspResultL() |
407 // --------------------------------------------------------------------------- |
485 // --------------------------------------------------------------------------- |
408 // |
486 // |
409 TBool CSisxSifPluginUiHandlerSilent::DisplayOcspResultL( const Swi::CAppInfo& /*aAppInfo*/, |
487 TBool CSisxSifPluginUiHandlerSilent::DisplayOcspResultL( const Swi::CAppInfo& /*aAppInfo*/, |
410 Swi::TRevocationDialogMessage /*aMessage*/, RPointerArray<TOCSPOutcome>& /*aOutcomes*/, |
488 Swi::TRevocationDialogMessage aMessage, RPointerArray<TOCSPOutcome>& /*aOutcomes*/, |
411 RPointerArray<Swi::CCertificateInfo>& /*aCertificates*/, TBool aWarningOnly ) |
489 RPointerArray<Swi::CCertificateInfo>& /*aCertificates*/, TBool aWarningOnly ) |
412 { |
490 { |
413 TBool okToContinue = EFalse; |
491 TBool okToContinue = EFalse; |
414 // TODO: KSWInstallerOcspProcedure setting (off/on/must) |
492 |
415 if( iInstallParams && aWarningOnly ) |
493 if( aWarningOnly && !IsOcspMandatoryL() ) |
416 { |
494 { |
417 switch( iInstallParams->IgnoreOCSPWarnings() ) |
495 if( iInstallParams ) |
|
496 { |
|
497 switch( iInstallParams->IgnoreOCSPWarnings() ) |
|
498 { |
|
499 case EAllowed: |
|
500 okToContinue = ETrue; |
|
501 break; |
|
502 case EUserConfirm: |
|
503 case ENotAllowed: |
|
504 default: |
|
505 break; |
|
506 } |
|
507 } |
|
508 } |
|
509 |
|
510 if( !okToContinue ) |
|
511 { |
|
512 SetOcspErrorL( aMessage ); |
|
513 } |
|
514 |
|
515 return okToContinue; |
|
516 } |
|
517 |
|
518 // --------------------------------------------------------------------------- |
|
519 // CSisxSifPluginUiHandlerSilent::DisplayCannotOverwriteFileL() |
|
520 // --------------------------------------------------------------------------- |
|
521 // |
|
522 void CSisxSifPluginUiHandlerSilent::DisplayCannotOverwriteFileL( const Swi::CAppInfo& /*aAppInfo*/, |
|
523 const Swi::CAppInfo& /*aInstalledAppInfo*/, const TDesC& aFileName ) |
|
524 { |
|
525 // TODO: localized UI string needed: "The package tries to overwrite file '%1' it does not own." |
|
526 TName detailsString; |
|
527 detailsString.Format( _L("The package tries to overwrite file '%S' it does not own."), &aFileName ); |
|
528 SetErrorL( KErrPermissionDenied, ESifUiCannotOverwriteFile, detailsString ); |
|
529 } |
|
530 |
|
531 // --------------------------------------------------------------------------- |
|
532 // CSisxSifPluginUiHandlerSilent::DisplayMissingDependencyL() |
|
533 // --------------------------------------------------------------------------- |
|
534 // |
|
535 TBool CSisxSifPluginUiHandlerSilent::DisplayMissingDependencyL( const Swi::CAppInfo& /*aAppInfo*/, |
|
536 const TDesC& /*aDependencyName*/, TVersion /*aWantedVersionFrom*/, |
|
537 TVersion /*aWantedVersionTo*/, TVersion /*aInstalledVersion*/ ) |
|
538 { |
|
539 TBool okToContinue = EFalse; |
|
540 |
|
541 if( iInstallParams ) |
|
542 { |
|
543 switch( iInstallParams->AllowAppBreakDependency() ) |
418 { |
544 { |
419 case EAllowed: |
545 case EAllowed: |
420 okToContinue = ETrue; |
546 okToContinue = ETrue; |
421 break; |
547 break; |
422 case EUserConfirm: |
548 case EUserConfirm: |
423 case ENotAllowed: |
549 case ENotAllowed: |
424 default: |
550 default: |
425 break; |
551 break; |
426 } |
552 } |
427 } |
553 } |
428 return okToContinue; |
554 |
429 } |
555 if( !okToContinue ) |
430 |
556 { |
431 // --------------------------------------------------------------------------- |
557 SetErrorL( KErrSifMissingDependencies, 0, KNullDesC ); |
432 // CSisxSifPluginUiHandlerSilent::DisplayCannotOverwriteFileL() |
558 } |
433 // --------------------------------------------------------------------------- |
559 |
434 // |
|
435 void CSisxSifPluginUiHandlerSilent::DisplayCannotOverwriteFileL( const Swi::CAppInfo& /*aAppInfo*/, |
|
436 const Swi::CAppInfo& /*aInstalledAppInfo*/, const TDesC& /*aFileName*/ ) |
|
437 { |
|
438 // TODO: error handling |
|
439 } |
|
440 |
|
441 // --------------------------------------------------------------------------- |
|
442 // CSisxSifPluginUiHandlerSilent::DisplayMissingDependencyL() |
|
443 // --------------------------------------------------------------------------- |
|
444 // |
|
445 TBool CSisxSifPluginUiHandlerSilent::DisplayMissingDependencyL( const Swi::CAppInfo& /*aAppInfo*/, |
|
446 const TDesC& /*aDependencyName*/, TVersion /*aWantedVersionFrom*/, |
|
447 TVersion /*aWantedVersionTo*/, TVersion /*aInstalledVersion*/ ) |
|
448 { |
|
449 TBool okToContinue = EFalse; |
|
450 if( iInstallParams ) |
|
451 { |
|
452 switch( iInstallParams->AllowAppBreakDependency() ) |
|
453 { |
|
454 case EAllowed: |
|
455 okToContinue = ETrue; |
|
456 break; |
|
457 case EUserConfirm: |
|
458 case ENotAllowed: |
|
459 default: |
|
460 break; |
|
461 } |
|
462 } |
|
463 return okToContinue; |
560 return okToContinue; |
464 } |
561 } |
465 |
562 |
466 // --------------------------------------------------------------------------- |
563 // --------------------------------------------------------------------------- |
467 // CSisxSifPluginUiHandlerSilent::DisplayUninstallL() |
564 // CSisxSifPluginUiHandlerSilent::DisplayUninstallL() |
468 // --------------------------------------------------------------------------- |
565 // --------------------------------------------------------------------------- |
469 // |
566 // |
470 TBool CSisxSifPluginUiHandlerSilent::DisplayUninstallL( const Swi::CAppInfo& /*aAppInfo*/ ) |
567 TBool CSisxSifPluginUiHandlerSilent::DisplayUninstallL( const Swi::CAppInfo& /*aAppInfo*/ ) |
471 { |
568 { |
|
569 iOperationPhase = EUninstalling; |
472 return ETrue; |
570 return ETrue; |
473 } |
571 } |
474 |
572 |
475 // --------------------------------------------------------------------------- |
573 // --------------------------------------------------------------------------- |
476 // CSisxSifPluginUiHandlerSilent::DisplayPreparingInstallL() |
574 // CSisxSifPluginUiHandlerSilent::DisplayPreparingInstallL() |