voipplugins/sipconnectionprovider/src/scpservicemanager.cpp
branchRCL_3
changeset 15 43658d24f35d
parent 11 6134b5029079
child 20 65a3ef1d5bd0
equal deleted inserted replaced
14:be41ab7b952f 15:43658d24f35d
  1047         RCmManager cmm;
  1047         RCmManager cmm;
  1048         cmm.OpenL();
  1048         cmm.OpenL();
  1049         CleanupClosePushL( cmm );
  1049         CleanupClosePushL( cmm );
  1050         RCmDestination destination( cmm.DestinationL( snapId ) );
  1050         RCmDestination destination( cmm.DestinationL( snapId ) );
  1051         CleanupClosePushL( destination );
  1051         CleanupClosePushL( destination );
  1052 
  1052         
       
  1053         TBool wlanIapFound( EFalse );
       
  1054         
  1053         for ( TInt i = 0; i < destination.ConnectionMethodCount(); i++ )
  1055         for ( TInt i = 0; i < destination.ConnectionMethodCount(); i++ )
  1054             {
  1056             {
  1055             RCmConnectionMethod cm = destination.ConnectionMethodL( i );
  1057             RCmConnectionMethod cm = destination.ConnectionMethodL( i );
  1056             CleanupClosePushL( cm );
  1058             CleanupClosePushL( cm );
  1057 
  1059 
  1058             if( KUidWlanBearerType == 
  1060             if( KUidWlanBearerType == 
  1059                 cm.GetIntAttributeL( CMManager::ECmBearerType ) )
  1061                 cm.GetIntAttributeL( CMManager::ECmBearerType ) )
  1060                 {
  1062                 {
  1061                 SCPLOGSTRING( "CScpServiceManager::CheckAvailableConnectionsL WLAN IAP found" );
  1063                 SCPLOGSTRING( "CScpServiceManager::CheckAvailableConnectionsL WLAN IAP found" );
  1062                 iaps.Append( cm.GetIntAttributeL( CMManager::ECmIapId ) );
  1064                 iaps.Append( cm.GetIntAttributeL( CMManager::ECmIapId ) );
       
  1065                 wlanIapFound = ETrue;
  1063                 }
  1066                 }
  1064             else
  1067             else
  1065                 {
  1068                 {
  1066                 SCPLOGSTRING2( "CScpServiceManager::CheckAvailableConnectionsL iaps count = %d", iaps.Count() );
  1069                 SCPLOGSTRING2( "CScpServiceManager::CheckAvailableConnectionsL iaps count = %d", iaps.Count() );
  1067                 SCPLOGSTRING( "CScpServiceManager::CheckAvailableConnectionsL 3G IAP found break the loop" );
  1070                 SCPLOGSTRING( "CScpServiceManager::CheckAvailableConnectionsL 3G IAP found break the loop" );
  1089         if( sipConnectionCreated )
  1092         if( sipConnectionCreated )
  1090             {
  1093             {
  1091             CleanupStack::PopAndDestroy( sipConnection );
  1094             CleanupStack::PopAndDestroy( sipConnection );
  1092             }
  1095             }
  1093         
  1096         
  1094         if ( !available )
  1097         if ( !available && wlanIapFound )
       
  1098             {
       
  1099             User::Leave( KCCHErrorNetworkLost );
       
  1100             }
       
  1101         
       
  1102         else if( !wlanIapFound )
  1095             {
  1103             {
  1096             User::Leave( KCCHErrorAccessPointNotDefined );
  1104             User::Leave( KCCHErrorAccessPointNotDefined );
  1097             }
  1105             }
  1098         }
  1106         }
  1099     }
  1107     }