bearermanagement/mpm/src/mpmwlanquerydialog.cpp
branchRCL_3
changeset 69 cf1b3ddbe9a1
parent 62 bb1f80fb7db2
equal deleted inserted replaced
65:14754bf06654 69:cf1b3ddbe9a1
   196             {
   196             {
   197             iIapSelection.Session()->MyServer().SetOfflineWlanQueryResponse(
   197             iIapSelection.Session()->MyServer().SetOfflineWlanQueryResponse(
   198                     EOfflineResponseYes );
   198                     EOfflineResponseYes );
   199             if( iIapSelection.Session()->MyServer().CommsDatAccess()->CheckEasyWLanL( iWlanIapId ) )
   199             if( iIapSelection.Session()->MyServer().CommsDatAccess()->CheckEasyWLanL( iWlanIapId ) )
   200                 {
   200                 {
   201                 MPMLOGSTRING( "CMPMWlanQueryDialog::RunL starting wlan network query" )
   201                 // It may be possible that there's still an active WLAN, which we'll now share.
   202                 GetNetworkPrefs();
   202                 TUint32 activeWlanIap = iIapSelection.Session()->MyServer().IsWlanConnectionStartedL( 
   203                 return;
   203                         iIapSelection.Session()->MyServer().CommsDatAccess() );
       
   204                 if ( activeWlanIap )
       
   205                     {
       
   206                     iWlanIapId = activeWlanIap;
       
   207                     }
       
   208                 else
       
   209                     {
       
   210                     MPMLOGSTRING( "CMPMWlanQueryDialog::RunL starting wlan network query" )
       
   211                     GetNetworkPrefs();
       
   212                     return;
       
   213                     }
   204                 }
   214                 }
   205             }
   215             }
   206         else if ( iStatus.Int() == KErrCancel )
   216         else if ( iStatus.Int() == KErrCancel )
   207             {
   217             {
   208             iIapSelection.Session()->MyServer().SetOfflineWlanQueryResponse(
   218             iIapSelection.Session()->MyServer().SetOfflineWlanQueryResponse(
   209                     EOfflineResponseNo );
   219                     EOfflineResponseNo );
   210             iIapSelection.Session()->MyServer().StartOfflineQueryTimer();
       
   211             MPMLOGSTRING2( "CMPMWlanQueryDialog::RunL offline query returned %d", 
   220             MPMLOGSTRING2( "CMPMWlanQueryDialog::RunL offline query returned %d", 
   212                            iStatus.Int() )
   221                            iStatus.Int() )
   213             }
   222             }
   214         else
   223         else
   215             {
   224             {
   463     noteBehaviour = iIapSelection.MpmConnPref().NoteBehaviour();
   472     noteBehaviour = iIapSelection.MpmConnPref().NoteBehaviour();
   464     MPMLOGSTRING2( "CMPMWlanQueryDialog::StartWlanQuery noteBehaviour = %d", noteBehaviour )
   473     MPMLOGSTRING2( "CMPMWlanQueryDialog::StartWlanQuery noteBehaviour = %d", noteBehaviour )
   465     
   474     
   466     if( !emergencyCallEstablished && 
   475     if( !emergencyCallEstablished && 
   467         iIapSelection.Session()->MyServer().IsPhoneOffline() && 
   476         iIapSelection.Session()->MyServer().IsPhoneOffline() && 
   468         !activeWlanIap && 
       
   469         iIapSelection.Session()->MyServer().OfflineWlanQueryResponse() != EOfflineResponseYes &&
   477         iIapSelection.Session()->MyServer().OfflineWlanQueryResponse() != EOfflineResponseYes &&
   470         iOverrideStatus == KErrNone )
   478         iOverrideStatus == KErrNone )
   471         {
   479         {
   472         if ( noteBehaviour & TExtendedConnPref::ENoteBehaviourConnDisableQueries )
   480         if ( noteBehaviour & TExtendedConnPref::ENoteBehaviourConnDisableQueries )
   473             {
   481             {
   474             MPMLOGSTRING( "CMPMWlanQueryDialog::StartWlanQuery offline note query not shown due to disabled queries" )
   482             MPMLOGSTRING( "CMPMWlanQueryDialog::StartWlanQuery offline note query not shown due to disabled queries" )
   475             iIapSelection.UserWlanSelectionDoneL( KErrPermissionDenied, iWlanIapId );
   483             iIapSelection.UserWlanSelectionDoneL( KErrPermissionDenied, iWlanIapId );
   476             }
   484             }
   477         else
   485         else
   478             {         
   486             {
       
   487             MPMLOGSTRING( "CMPMWlanQueryDialog::StartWlanQuery, starting offline note" )            
   479             iWlanQueryState = EOffline;
   488             iWlanQueryState = EOffline;
   480             if ( !iIapSelection.Session()->MyServer().IsOfflineQueryTimerOn() )
   489             iNotifier.StartNotifierAndGetResponse( iStatus, 
   481                 {
   490                                                    KUidCOfflineWlanNoteDlg, 
   482                 MPMLOGSTRING( "CMPMWlanQueryDialog::StartWlanQuery, starting offline query" )        
   491                                                    KNullDesC8(), 
   483                 iNotifier.StartNotifierAndGetResponse( iStatus, 
   492                                                    iOfflineReply );
   484                                                        KUidCOfflineWlanNoteDlg, 
   493             SetActive();
   485                                                        KNullDesC8(), 
       
   486                                                        iOfflineReply );
       
   487                 SetActive();
       
   488                 }
       
   489             else
       
   490                 {
       
   491                 MPMLOGSTRING( "CMPMWlanQueryDialog::StartWlanQuery, offline note not shown as OfflineQueryTimer is active" )        
       
   492                 iIapSelection.UserWlanSelectionDoneL( KErrPermissionDenied, iWlanIapId );
       
   493                 }
       
   494             }
   494             }
   495         }
   495         }
   496     // if easy wlan iap and some wlan iap started, use existing connection
   496     // if easy wlan iap and some wlan iap started, use existing connection
   497     //
   497     //
   498     else if( iIapSelection.Session()->MyServer().CommsDatAccess()->CheckEasyWLanL( iWlanIapId )  && 
   498     else if( iIapSelection.Session()->MyServer().CommsDatAccess()->CheckEasyWLanL( iWlanIapId )  &&