34 |
34 |
35 const TInt KUsernameMaxLength = 255; |
35 const TInt KUsernameMaxLength = 255; |
36 const TInt KDomainMaxLength = 255; |
36 const TInt KDomainMaxLength = 255; |
37 const TInt KTempBufMaxLength = 255; |
37 const TInt KTempBufMaxLength = 255; |
38 |
38 |
39 const TUint32 KBearerWlanOnly = 1; |
|
40 |
|
41 #ifdef _DEBUG |
39 #ifdef _DEBUG |
42 const TInt KDebugInfoMaxLength = 255; |
40 const TInt KDebugInfoMaxLength = 255; |
43 #endif |
41 #endif |
44 |
42 |
45 // ----------------------------------------------------------------------------- |
43 // ----------------------------------------------------------------------------- |
1022 // CScpServiceManager::CheckRestrictedConnectionsL |
1020 // CScpServiceManager::CheckRestrictedConnectionsL |
1023 // ----------------------------------------------------------------------------- |
1021 // ----------------------------------------------------------------------------- |
1024 // |
1022 // |
1025 void CScpServiceManager::CheckRestrictedConnectionsL( TUint aServiceId ) |
1023 void CScpServiceManager::CheckRestrictedConnectionsL( TUint aServiceId ) |
1026 { |
1024 { |
1027 TBool sipConnectionCreated( EFalse ); |
1025 if ( !iSettingHandler->IsVoIPOverWcdmaAllowedL( aServiceId ) ) |
1028 CScpSipConnection* sipConnection = GetSipConnectionL( |
1026 { |
|
1027 SCPLOGSTRING( "CScpServiceManager::CheckRestrictedConnectionsL WCDMA not allowed" ); |
|
1028 |
|
1029 TBool sipConnectionCreated( EFalse ); |
|
1030 CScpSipConnection* sipConnection = GetSipConnectionL( |
1029 aServiceId, |
1031 aServiceId, |
1030 ECCHVoIPSub, |
1032 ECCHVoIPSub, |
1031 sipConnectionCreated ); |
1033 sipConnectionCreated ); |
1032 |
1034 |
1033 if( sipConnectionCreated ) |
1035 if( sipConnectionCreated ) |
1034 { |
1036 { |
1035 CleanupStack::PushL( sipConnection ); |
1037 CleanupStack::PushL( sipConnection ); |
1036 } |
1038 } |
1037 // Check bearer filttering setting from sip |
1039 |
1038 TUint32 bearerFilttering( 0 ); |
|
1039 TInt err = sipConnection->BearerFiltteringSetting( bearerFilttering ); |
|
1040 |
|
1041 SCPLOGSTRING2( "CScpServiceManager::CheckAvailableConnectionsL bearerFilttering = %d", bearerFilttering ); |
|
1042 |
|
1043 if ( ( KErrNone == err ) && ( KBearerWlanOnly == bearerFilttering ) ) |
|
1044 { |
|
1045 SCPLOGSTRING( "CScpServiceManager::CheckAvailableConnectionsL WLAN only" ); |
|
1046 TUint32 snapId( KErrNone ); |
1040 TUint32 snapId( KErrNone ); |
1047 sipConnection->GetSnap( snapId ); |
1041 sipConnection->GetSnap( snapId ); |
1048 |
1042 |
1049 RArray<TInt> iaps; |
1043 RArray<TInt> iaps; |
1050 CleanupClosePushL( iaps ); |
1044 CleanupClosePushL( iaps ); |
1093 |
1087 |
1094 CleanupStack::PopAndDestroy( &destination ); |
1088 CleanupStack::PopAndDestroy( &destination ); |
1095 CleanupStack::PopAndDestroy( &cmm ); |
1089 CleanupStack::PopAndDestroy( &cmm ); |
1096 CleanupStack::PopAndDestroy( &iaps ); |
1090 CleanupStack::PopAndDestroy( &iaps ); |
1097 |
1091 |
1098 |
1092 if( sipConnectionCreated ) |
|
1093 { |
|
1094 CleanupStack::PopAndDestroy( sipConnection ); |
|
1095 } |
1099 |
1096 |
1100 if ( !available && wlanIapFound ) |
1097 if ( !available && wlanIapFound ) |
1101 { |
1098 { |
1102 User::Leave( KCCHErrorNetworkLost ); |
1099 User::Leave( KCCHErrorNetworkLost ); |
1103 } |
1100 } |
1104 |
1101 |
1105 else if( !wlanIapFound ) |
1102 else if( !wlanIapFound ) |
1106 { |
1103 { |
1107 User::Leave( KCCHErrorAccessPointNotDefined ); |
1104 User::Leave( KCCHErrorAccessPointNotDefined ); |
1108 } |
1105 } |
1109 } |
|
1110 |
|
1111 if( sipConnectionCreated ) |
|
1112 { |
|
1113 CleanupStack::PopAndDestroy( sipConnection ); |
|
1114 } |
1106 } |
1115 } |
1107 } |
1116 |
1108 |
1117 // End of file |
1109 // End of file |