bearermanagement/mpm/src/mpmiapselection.cpp
changeset 53 4af712113915
parent 46 95d45f234cf3
child 60 a9c709db68db
equal deleted inserted replaced
47:cb7afde124a3 53:4af712113915
   149         { 
   149         { 
   150         TMPMBearerType bearerType = iSession->MyServer().CommsDatAccess()->GetBearerTypeL( iChooseIapPref.IapId() );
   150         TMPMBearerType bearerType = iSession->MyServer().CommsDatAccess()->GetBearerTypeL( iChooseIapPref.IapId() );
   151         MPMLOGSTRING2( "CMPMIapSelection::ChooseIapL: bearerType: %i", bearerType )
   151         MPMLOGSTRING2( "CMPMIapSelection::ChooseIapL: bearerType: %i", bearerType )
   152 
   152 
   153         // Complete selection with error code if wlan only was set and cellular IAP other 
   153         // Complete selection with error code if wlan only was set and cellular IAP other 
   154         // than MMS IAP was tried to access  
   154         // than MMS IAP was tried to access
   155         if ( wlanOnly && 
   155         // Note that CurrentCellularDataUsage()tells if internal cellular connections are 
   156                 ( bearerType == EMPMBearerTypePacketData ) && 
   156         // temporarily disabled because dial-up connection is prioritized over internal connections.
   157                 ( iSession->IsMMSIap( iChooseIapPref.IapId() ) == EFalse ) ) 
   157         // 
       
   158         if ( ( wlanOnly || CurrentCellularDataUsage() == ECmCellularDataUsageDisabled ) && 
       
   159              ( bearerType == EMPMBearerTypePacketData ) && 
       
   160              ( iSession->IsMMSIap( iChooseIapPref.IapId() ) == EFalse ) ) 
   158             {            
   161             {            
   159             ChooseIapComplete( KErrPermissionDenied, NULL );
   162             ChooseIapComplete( KErrPermissionDenied, NULL );
   160             return;
   163             return;
   161             }
   164             }
   162         }
   165         }
  1140 TMpmConnPref CMPMIapSelection::MpmConnPref()
  1143 TMpmConnPref CMPMIapSelection::MpmConnPref()
  1141     {
  1144     {
  1142     return iChooseIapPref;
  1145     return iChooseIapPref;
  1143     }
  1146     }
  1144 
  1147 
       
  1148 // ---------------------------------------------------------------------------
       
  1149 // Get current cellular data usage setting
       
  1150 // ---------------------------------------------------------------------------
       
  1151 //
       
  1152 TInt CMPMIapSelection::CurrentCellularDataUsage() const
       
  1153     {
       
  1154     return iSession->MyServer().DataUsageWatcher()->CellularDataUsage();
       
  1155     }