bearermanagement/mpm/src/mpmiapselection.cpp
branchRCL_3
changeset 45 4c83dcfb6f1a
parent 36 04408506c6e0
child 54 984e13af52c4
equal deleted inserted replaced
36:04408506c6e0 45:4c83dcfb6f1a
   491     ChooseBestIAPL( iChooseIapPref, availableIAPList, iNextBestExists );
   491     ChooseBestIAPL( iChooseIapPref, availableIAPList, iNextBestExists );
   492     TUint32 validateIapId = iChooseIapPref.IapId();
   492     TUint32 validateIapId = iChooseIapPref.IapId();
   493     // Check if any suitable IAP's were found, if not then complete selection with error code
   493     // Check if any suitable IAP's were found, if not then complete selection with error code
   494     if ( validateIapId == 0 )
   494     if ( validateIapId == 0 )
   495         {
   495         {
   496         if ( !( iChooseIapPref.NoteBehaviour() & TExtendedConnPref::ENoteBehaviourConnDisableQueries ) &&
   496         ChooseIapComplete( KErrNotFound, NULL );
   497                 ( iChooseIapPref.ConnType() == TMpmConnPref::EConnTypeDefault ||
       
   498                 ( iChooseIapPref.ConnType() == TMpmConnPref::EConnTypeExplicit &&
       
   499                   iCommsDatAccess->IsInternetSnapL( 0, snap ) ) ) )
       
   500             {
       
   501             ImplicitConnectionL();
       
   502             }
       
   503         else
       
   504             {
       
   505             ChooseIapComplete( KErrNotFound, NULL );
       
   506             }
       
   507         CleanupStack::PopAndDestroy( &availableIAPList );
   497         CleanupStack::PopAndDestroy( &availableIAPList );
   508         return;
   498         return;
   509         }
   499         }
   510     
   500     
   511     TUint32 retNetId( 0 );
   501     TUint32 retNetId( 0 );
   735     
   725     
   736     if ( ( aError == KErrNone ) &&
   726     if ( ( aError == KErrNone ) &&
   737         !( iChooseIapPref.NoteBehaviour() &
   727         !( iChooseIapPref.NoteBehaviour() &
   738            TExtendedConnPref::ENoteBehaviourConnDisableNotes ) )
   728            TExtendedConnPref::ENoteBehaviourConnDisableNotes ) )
   739         {
   729         {
   740         TBool connectionAlreadyActive =
   730         TConnectionState state =
   741             iSession->MyServer().CheckIfStarted( aPolicyPref->IapId(), 
   731             iSession->MyServer().CheckUsageOfIap( aPolicyPref->IapId(), 
   742                                                  iSession->ConnectionId() );
   732                                                   iSession->ConnectionId() );
       
   733         TBool connectionAlreadyActive = (state == EStarted || state == EStarting || state == ERoaming);
   743         if ( !connectionAlreadyActive &&
   734         if ( !connectionAlreadyActive &&
   744                 ( iSession->IsMMSIap( aPolicyPref->IapId() ) == EFalse ) )
   735                 ( iSession->IsMMSIap( aPolicyPref->IapId() ) == EFalse ) )
   745             {
   736             {
   746             CConnectionUiUtilities* connUiUtils;
   737             CConnectionUiUtilities* connUiUtils;
   747             TRAPD( popupError, connUiUtils = CConnectionUiUtilities::NewL() );
   738             TRAPD( popupError, connUiUtils = CConnectionUiUtilities::NewL() );