109 // CMPMServerSession::~CMPMServerSession |
109 // CMPMServerSession::~CMPMServerSession |
110 // ----------------------------------------------------------------------------- |
110 // ----------------------------------------------------------------------------- |
111 // |
111 // |
112 CMPMServerSession::~CMPMServerSession() |
112 CMPMServerSession::~CMPMServerSession() |
113 { |
113 { |
114 delete iConfirmDlgRoaming; |
|
115 delete iIapSelection; |
|
116 |
114 |
117 // Remove serverside objects for notification session. |
115 // Remove serverside objects for notification session. |
118 // |
116 // |
119 iMyServer.RemoveSession( this ); |
117 iMyServer.RemoveSession( this ); |
120 |
118 |
140 // Make sure the connection is removed from server's information array. |
138 // Make sure the connection is removed from server's information array. |
141 iMyServer.RemoveBMConnection( iConnId, *this ); |
139 iMyServer.RemoveBMConnection( iConnId, *this ); |
142 |
140 |
143 // Cancel discreet popup |
141 // Cancel discreet popup |
144 iMyServer.ConnUiUtils()->CancelConnectingViaDiscreetPopup(); |
142 iMyServer.ConnUiUtils()->CancelConnectingViaDiscreetPopup(); |
|
143 |
|
144 delete iConfirmDlgRoaming; |
|
145 delete iIapSelection; |
145 } |
146 } |
146 |
147 |
147 |
148 |
148 // ----------------------------------------------------------------------------- |
149 // ----------------------------------------------------------------------------- |
149 // CMPMServerSession::ServiceL |
150 // CMPMServerSession::ServiceL |
3445 { |
3446 { |
3446 if ( ( iAppUid != iMyServer.CsIdWatcher()->ConnectScreenId() ) && |
3447 if ( ( iAppUid != iMyServer.CsIdWatcher()->ConnectScreenId() ) && |
3447 iMyServer.UserConnection() ) |
3448 iMyServer.UserConnection() ) |
3448 { |
3449 { |
3449 MPMLOGSTRING( "CMPMServerSession::UseUserConnPref - User connection active" ); |
3450 MPMLOGSTRING( "CMPMServerSession::UseUserConnPref - User connection active" ); |
|
3451 |
|
3452 // If user connection is blacklisted for this connection, don't use it. |
|
3453 RArray<TUint32> blacklistedIaps; |
|
3454 CleanupClosePushL( blacklistedIaps ); |
|
3455 iMyServer.GetBlacklistedIAP( iConnId, blacklistedIaps ); |
|
3456 TInt blacklistedIapFoundError = blacklistedIaps.Find( iMyServer.UserConnPref()->IapId() ); |
|
3457 CleanupStack::PopAndDestroy( &blacklistedIaps ); |
3450 |
3458 |
|
3459 if ( blacklistedIapFoundError != KErrNotFound ) |
|
3460 { |
|
3461 MPMLOGSTRING( "CMPMServerSession::UseUserConnPref -\ |
|
3462 User connection blacklisted -> don't use user connection" ); |
|
3463 return EFalse; |
|
3464 } |
|
3465 |
3451 // Check whether default connection will be used |
3466 // Check whether default connection will be used |
3452 if ( iIapSelection->MpmConnPref().ConnType() == TMpmConnPref::EConnTypeDefault ) |
3467 if ( iIapSelection->MpmConnPref().ConnType() == TMpmConnPref::EConnTypeDefault ) |
3453 { |
3468 { |
|
3469 MPMLOGSTRING( "CMPMServerSession::UseUserConnPref -\ |
|
3470 Default connection -> use user connection" ); |
3454 return ETrue; |
3471 return ETrue; |
3455 } |
3472 } |
3456 else if ( ( iIapSelection->MpmConnPref().ConnType() == |
3473 else if ( ( iIapSelection->MpmConnPref().ConnType() == |
3457 TMpmConnPref::EConnTypeImplicit ) && |
3474 TMpmConnPref::EConnTypeImplicit ) && |
3458 PrefsAllowWlan() ) |
3475 PrefsAllowWlan() ) |
3459 { |
3476 { |
3460 MPMLOGSTRING( "CMPMServerSession::UseUserConnPref -\ |
3477 MPMLOGSTRING( "CMPMServerSession::UseUserConnPref -\ |
3461 Prompt from the user" ); |
3478 Prompt from the user -> use user connection" ); |
3462 // Prompt from the user -> use user connection |
3479 // Prompt from the user -> use user connection |
3463 return ETrue; |
3480 return ETrue; |
3464 } |
3481 } |
3465 else |
3482 else |
3466 { |
3483 { |
3475 iIapSelection->MpmConnPref().IapId(), |
3492 iIapSelection->MpmConnPref().IapId(), |
3476 iIapSelection->MpmConnPref().SnapId() ) ); |
3493 iIapSelection->MpmConnPref().SnapId() ) ); |
3477 |
3494 |
3478 if ( ( error == KErrNone ) && ( isInternetSnap ) && PrefsAllowWlan() ) |
3495 if ( ( error == KErrNone ) && ( isInternetSnap ) && PrefsAllowWlan() ) |
3479 { |
3496 { |
|
3497 MPMLOGSTRING( "CMPMServerSession::UseUserConnPref -\ |
|
3498 Application preferencies in Internet SNAP -> use user connection" ); |
3480 // Iap belongs to internet snap -> use user connection |
3499 // Iap belongs to internet snap -> use user connection |
3481 return ETrue; |
3500 return ETrue; |
3482 } |
3501 } |
3483 } |
3502 } |
3484 } |
3503 } |