equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
457 } |
457 } |
458 } |
458 } |
459 } |
459 } |
460 |
460 |
461 // ----------------------------------------------------------------------------- |
461 // ----------------------------------------------------------------------------- |
|
462 // CScpProfileHandler::StartAlrMigration |
|
463 // ----------------------------------------------------------------------------- |
|
464 // |
|
465 void CScpProfileHandler::StartAlrMigration( TUint32 aProfileId ) |
|
466 { |
|
467 SCPLOGSTRING2( "CScpProfileHandler::StartMigrtion profile: %i", aProfileId ); |
|
468 SCPLOGSTRING2( "CScpProfileHandler::StartMigrtion iNewAlrIapId: %i", iNewAlrIapId ); |
|
469 |
|
470 TRAP_IGNORE( |
|
471 iAlrController->AllowMigrationL( aProfileId, iNewAlrIapId ) ); |
|
472 |
|
473 CScpSipConnection* sipConnection( NULL ); |
|
474 |
|
475 sipConnection = GetSipConnection( aProfileId ); |
|
476 sipConnection->SetProfileCurrentlyRoaming(); |
|
477 |
|
478 SCPLOGSTRING( "CScpProfileHandler::StartMigrtion -exit" ); |
|
479 } |
|
480 |
|
481 // ----------------------------------------------------------------------------- |
462 // CScpProfileHandler::AlrEvent |
482 // CScpProfileHandler::AlrEvent |
463 // ----------------------------------------------------------------------------- |
483 // ----------------------------------------------------------------------------- |
464 // |
484 // |
465 void CScpProfileHandler::AlrEvent( MSipProfileAlrObserver::TEvent aEvent, |
485 void CScpProfileHandler::AlrEvent( MSipProfileAlrObserver::TEvent aEvent, |
466 TUint32 aProfileId, |
486 TUint32 aProfileId, |
500 sipConnection->SetIapAvailableOffered( ETrue ); |
520 sipConnection->SetIapAvailableOffered( ETrue ); |
501 } |
521 } |
502 } |
522 } |
503 else |
523 else |
504 { |
524 { |
505 sipConnection->SetProfileCurrentlyRoaming(); |
525 iAlrAllowedToStartImmediately = ETrue; |
506 |
526 |
507 TRAP_IGNORE( |
527 for ( TInt i = 0; i < iObservers.Count(); i++ ) |
508 iAlrController->AllowMigrationL( aProfileId, aIapId ) ); |
528 { |
|
529 if ( !iObservers[ i ]->IsSipProfileAllowedToStartAlr() ) |
|
530 { |
|
531 iAlrAllowedToStartImmediately = EFalse; |
|
532 break; |
|
533 } |
|
534 } |
|
535 if ( iAlrAllowedToStartImmediately ) |
|
536 { |
|
537 TRAP_IGNORE( |
|
538 iAlrController->AllowMigrationL( aProfileId, aIapId ) ); |
|
539 sipConnection->SetProfileCurrentlyRoaming(); |
|
540 } |
|
541 else |
|
542 { |
|
543 iNewAlrIapId = aIapId; |
|
544 sipConnection->HandleMigrationStarted(); |
|
545 } |
509 } |
546 } |
510 } |
547 } |
511 |
|
512 break; |
548 break; |
513 } |
549 } |
514 |
550 |
515 // For possible beyond use (E.g. Maybe we should change CHH state |
551 // For possible beyond use (E.g. Maybe we should change CHH state |
516 // during iap migration -> VoIP call not possible if iap migration |
552 // during iap migration -> VoIP call not possible if iap migration |
517 // ongoing.) |
553 // ongoing.) |
518 case MSipProfileAlrObserver::EMigrationStarted: |
554 case MSipProfileAlrObserver::EMigrationStarted: |
519 { |
555 { |
520 sipConnection = GetSipConnection( aProfileId ); |
556 sipConnection = GetSipConnection( aProfileId ); |
521 |
557 |
522 if( sipConnection ) |
558 if( sipConnection && iAlrAllowedToStartImmediately ) |
523 { |
559 { |
524 sipConnection->HandleMigrationStarted(); |
560 sipConnection->HandleMigrationStarted(); |
525 } |
561 } |
526 |
|
527 break; |
562 break; |
528 } |
563 } |
529 |
564 |
530 case MSipProfileAlrObserver::EMigrationCompleted: |
565 case MSipProfileAlrObserver::EMigrationCompleted: |
531 default: |
566 default: |
594 { |
629 { |
595 RemoveSipConnection( aProfileId ); |
630 RemoveSipConnection( aProfileId ); |
596 } |
631 } |
597 } |
632 } |
598 |
633 |
|
634 // ----------------------------------------------------------------------------- |
|
635 // CScpProfileHandler::IsSipProfileAllowedToStartAlr |
|
636 // ----------------------------------------------------------------------------- |
|
637 // |
|
638 TBool CScpProfileHandler::IsSipProfileAllowedToStartAlr() |
|
639 { |
|
640 return ETrue; |
|
641 } |
|
642 |
599 // ----------------------------------------------------------------------------- |
643 // ----------------------------------------------------------------------------- |
600 // CScpProfileHandler::VmbxInterfaceL |
644 // CScpProfileHandler::VmbxInterfaceL |
601 // ----------------------------------------------------------------------------- |
645 // ----------------------------------------------------------------------------- |
602 // |
646 // |
603 CIpVmbxInterface& CScpProfileHandler::VmbxInterfaceL( MIpVmbxObserver& aObserver ) |
647 CIpVmbxInterface& CScpProfileHandler::VmbxInterfaceL( MIpVmbxObserver& aObserver ) |