equal
deleted
inserted
replaced
226 // |
226 // |
227 TBool CSisxSifPluginUiHandlerSilent::DisplayInstallL( const Swi::CAppInfo& /*aAppInfo*/, |
227 TBool CSisxSifPluginUiHandlerSilent::DisplayInstallL( const Swi::CAppInfo& /*aAppInfo*/, |
228 const CApaMaskedBitmap* /*aLogo*/, |
228 const CApaMaskedBitmap* /*aLogo*/, |
229 const RPointerArray<Swi::CCertificateInfo>& /*aCertificates*/ ) |
229 const RPointerArray<Swi::CCertificateInfo>& /*aCertificates*/ ) |
230 { |
230 { |
231 iOperationPhase = EInstalling; |
231 ASSERT( iOperationPhase == EInstalling ); |
232 return ETrue; |
232 return ETrue; |
233 } |
233 } |
234 |
234 |
235 // --------------------------------------------------------------------------- |
235 // --------------------------------------------------------------------------- |
236 // CSisxSifPluginUiHandlerSilent::DisplayGrantCapabilitiesL() |
236 // CSisxSifPluginUiHandlerSilent::DisplayGrantCapabilitiesL() |
269 TInt languageIndex = 0; |
269 TInt languageIndex = 0; |
270 TBool found = EFalse; |
270 TBool found = EFalse; |
271 TInt languageCount = aLanguages.Count(); |
271 TInt languageCount = aLanguages.Count(); |
272 if( iInstallParams ) |
272 if( iInstallParams ) |
273 { |
273 { |
274 TLanguage lang = iInstallParams->Language(); |
274 const RArray<TLanguage>& preferredLanguages = iInstallParams->Languages(); |
275 TInt index = aLanguages.Find( lang ); |
275 for( TInt prefIndex = 0; prefIndex < preferredLanguages.Count() && !found; prefIndex++ ) |
276 if( index >= 0 && index < languageCount ) |
276 { |
277 { |
277 TInt selectedIndex = aLanguages.Find( preferredLanguages[ prefIndex ] ); |
278 languageIndex = index; |
278 if( selectedIndex >= 0 && selectedIndex < languageCount ) |
279 found = ETrue; |
279 { |
280 } |
280 languageIndex = selectedIndex; |
|
281 found = ETrue; |
|
282 } |
|
283 } |
281 } |
284 } |
282 if( !found ) |
285 if( !found ) |
283 { |
286 { |
284 TLanguage lang = User::Language(); |
287 TLanguage lang = User::Language(); |
285 TInt index = aLanguages.Find( lang ); |
288 TInt index = aLanguages.Find( lang ); |
302 TInt driveIndex = 0; |
305 TInt driveIndex = 0; |
303 TBool found = EFalse; |
306 TBool found = EFalse; |
304 TInt driveCount = aDriveLetters.Count(); |
307 TInt driveCount = aDriveLetters.Count(); |
305 if( iInstallParams ) |
308 if( iInstallParams ) |
306 { |
309 { |
|
310 const RArray<TUint>& preferredDrives = iInstallParams->Drives(); |
307 TChar driveLetter = 0; |
311 TChar driveLetter = 0; |
308 RFs::DriveToChar( iInstallParams->Drive(), driveLetter ); |
312 TIdentityRelation<TChar> relation(CompareDriveLetters); |
309 TInt index = aDriveLetters.Find( driveLetter ); |
313 for( TInt prefIndex = 0; prefIndex < preferredDrives.Count() && !found; prefIndex++ ) |
310 if( index >= 0 && index < driveCount ) |
314 { |
311 { |
315 RFs::DriveToChar( preferredDrives[ prefIndex ], driveLetter ); |
312 if( aDriveSpaces[ index ] > aSize ) |
316 TInt index = aDriveLetters.Find( driveLetter, relation ); |
313 { |
317 if( index >= 0 && index < driveCount ) |
314 driveIndex = index; |
318 { |
315 found = ETrue; |
319 if( aDriveSpaces[ index ] > aSize ) |
316 } |
320 { |
317 } |
321 driveIndex = index; |
318 } |
322 found = ETrue; |
319 // TODO: should there be some default drive? |
323 } |
|
324 } |
|
325 } |
|
326 } |
320 if( !found ) |
327 if( !found ) |
321 { |
328 { |
322 User::Leave( KErrNoMemory ); |
329 driveIndex = KErrNotFound; |
323 } |
330 } |
324 return driveIndex; |
331 return driveIndex; |
325 } |
332 } |
326 |
333 |
327 // --------------------------------------------------------------------------- |
334 // --------------------------------------------------------------------------- |
340 okToContinue = ETrue; |
347 okToContinue = ETrue; |
341 break; |
348 break; |
342 case EUserConfirm: |
349 case EUserConfirm: |
343 case ENotAllowed: |
350 case ENotAllowed: |
344 default: |
351 default: |
|
352 // TODO: SetError |
345 break; |
353 break; |
346 } |
354 } |
347 } |
355 } |
348 return okToContinue; |
356 return okToContinue; |
349 } |
357 } |
364 allowOptions = ETrue; |
372 allowOptions = ETrue; |
365 break; |
373 break; |
366 case EUserConfirm: |
374 case EUserConfirm: |
367 case ENotAllowed: |
375 case ENotAllowed: |
368 default: |
376 default: |
|
377 // TODO: SetError |
369 break; |
378 break; |
370 } |
379 } |
371 } |
380 } |
372 for( TInt index = 0; index < aOptions.Count(); ++index ) |
381 for( TInt index = 0; index < aOptions.Count(); ++index ) |
373 { |
382 { |
466 okToContinue = ETrue; |
475 okToContinue = ETrue; |
467 break; |
476 break; |
468 case EUserConfirm: |
477 case EUserConfirm: |
469 case ENotAllowed: |
478 case ENotAllowed: |
470 default: |
479 default: |
|
480 // TODO: SetError |
471 break; |
481 break; |
472 } |
482 } |
473 } |
483 } |
474 break; |
484 break; |
475 |
485 |
500 okToContinue = ETrue; |
510 okToContinue = ETrue; |
501 break; |
511 break; |
502 case EUserConfirm: |
512 case EUserConfirm: |
503 case ENotAllowed: |
513 case ENotAllowed: |
504 default: |
514 default: |
|
515 // TODO: SetError |
505 break; |
516 break; |
506 } |
517 } |
507 } |
518 } |
508 } |
519 } |
509 |
520 |
546 okToContinue = ETrue; |
557 okToContinue = ETrue; |
547 break; |
558 break; |
548 case EUserConfirm: |
559 case EUserConfirm: |
549 case ENotAllowed: |
560 case ENotAllowed: |
550 default: |
561 default: |
|
562 // TODO: SetError |
551 break; |
563 break; |
552 } |
564 } |
553 } |
565 } |
554 |
566 |
555 if( !okToContinue ) |
567 if( !okToContinue ) |
564 // CSisxSifPluginUiHandlerSilent::DisplayUninstallL() |
576 // CSisxSifPluginUiHandlerSilent::DisplayUninstallL() |
565 // --------------------------------------------------------------------------- |
577 // --------------------------------------------------------------------------- |
566 // |
578 // |
567 TBool CSisxSifPluginUiHandlerSilent::DisplayUninstallL( const Swi::CAppInfo& /*aAppInfo*/ ) |
579 TBool CSisxSifPluginUiHandlerSilent::DisplayUninstallL( const Swi::CAppInfo& /*aAppInfo*/ ) |
568 { |
580 { |
569 iOperationPhase = EUninstalling; |
581 ASSERT( iOperationPhase == EUninstalling ); |
570 return ETrue; |
582 return ETrue; |
571 } |
583 } |
572 |
584 |
573 // --------------------------------------------------------------------------- |
585 // --------------------------------------------------------------------------- |
574 // CSisxSifPluginUiHandlerSilent::DisplayPreparingInstallL() |
586 // CSisxSifPluginUiHandlerSilent::DisplayPreparingInstallL() |
594 // |
606 // |
595 void CSisxSifPluginUiHandlerSilent::DisplayFailedL( |
607 void CSisxSifPluginUiHandlerSilent::DisplayFailedL( |
596 const CSisxSifPluginErrorHandler& /*aError*/ ) |
608 const CSisxSifPluginErrorHandler& /*aError*/ ) |
597 { |
609 { |
598 // nothing displayed in silent mode |
610 // nothing displayed in silent mode |
|
611 } |
|
612 |
|
613 // --------------------------------------------------------------------------- |
|
614 // CSisxSifPluginUiHandlerSilent::CancelDialogs() |
|
615 // --------------------------------------------------------------------------- |
|
616 // |
|
617 void CSisxSifPluginUiHandlerSilent::CancelDialogs() |
|
618 { |
|
619 // nothing to do |
599 } |
620 } |
600 |
621 |
601 // --------------------------------------------------------------------------- |
622 // --------------------------------------------------------------------------- |
602 // CSisxSifPluginUiHandlerSilent::CSisxSifPluginUiHandlerSilent() |
623 // CSisxSifPluginUiHandlerSilent::CSisxSifPluginUiHandlerSilent() |
603 // --------------------------------------------------------------------------- |
624 // --------------------------------------------------------------------------- |