equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2004-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
32 #include "mpmserversession.h" |
32 #include "mpmserversession.h" |
33 #include "mpmconnmonevents.h" |
33 #include "mpmconnmonevents.h" |
34 #include "mpmlogger.h" |
34 #include "mpmlogger.h" |
35 #include "mpmdtmwatcher.h" |
35 #include "mpmdtmwatcher.h" |
36 #include "mpmroamingwatcher.h" |
36 #include "mpmroamingwatcher.h" |
37 #include "mpmdisconnectdlg.h" |
|
38 #include "mpmconfirmdlgroaming.h" |
37 #include "mpmconfirmdlgroaming.h" |
39 #include "mpmconfirmdlgstarting.h" |
38 #include "mpmconfirmdlgstarting.h" |
40 #include "mpmcommsdataccess.h" |
39 #include "mpmcommsdataccess.h" |
41 #include "mpmprivatecrkeys.h" |
40 #include "mpmprivatecrkeys.h" |
42 #include "mpmcsidwatcher.h" |
41 #include "mpmcsidwatcher.h" |
82 iEvents( NULL ), |
81 iEvents( NULL ), |
83 iTSYLoaded( EFalse ), |
82 iTSYLoaded( EFalse ), |
84 iPacketServLoaded( EFalse ), |
83 iPacketServLoaded( EFalse ), |
85 iDtmWatcher( NULL ), |
84 iDtmWatcher( NULL ), |
86 iWLANScanRequired( EFalse ), |
85 iWLANScanRequired( EFalse ), |
87 iDisconnectQueue( NULL ), |
|
88 iRoamingQueue( NULL ), |
86 iRoamingQueue( NULL ), |
89 iStartingQueue( NULL ), |
87 iStartingQueue( NULL ), |
90 iConnectionCounter( 0 ), |
88 iConnectionCounter( 0 ), |
91 iOfflineMode( ECoreAppUIsNetworkConnectionAllowed ) |
89 iOfflineMode( ECoreAppUIsNetworkConnectionAllowed ) |
92 { |
90 { |
147 } |
145 } |
148 |
146 |
149 iRoamingWatcher = CMPMRoamingWatcher::NewL(iMobilePhone); |
147 iRoamingWatcher = CMPMRoamingWatcher::NewL(iMobilePhone); |
150 |
148 |
151 iCommsDatAccess = CMPMCommsDatAccess::NewL( ); |
149 iCommsDatAccess = CMPMCommsDatAccess::NewL( ); |
152 |
|
153 iDisconnectQueue = new ( ELeave ) CArrayPtrFlat<CMPMDisconnectDlg>( KGranularity ); |
|
154 iDisconnectQueue->Reset(); |
|
155 |
150 |
156 iRoamingQueue = new ( ELeave ) CArrayPtrFlat<CMPMConfirmDlgRoaming>( KGranularity ); |
151 iRoamingQueue = new ( ELeave ) CArrayPtrFlat<CMPMConfirmDlgRoaming>( KGranularity ); |
157 iRoamingQueue->Reset(); |
152 iRoamingQueue->Reset(); |
158 |
153 |
159 iStartingQueue = new ( ELeave ) CArrayPtrFlat<CMPMConfirmDlgStarting>( KGranularity ); |
154 iStartingQueue = new ( ELeave ) CArrayPtrFlat<CMPMConfirmDlgStarting>( KGranularity ); |
224 if ( iRoamingToWlanPeriodic ) |
219 if ( iRoamingToWlanPeriodic ) |
225 { |
220 { |
226 iRoamingToWlanPeriodic->Cancel(); |
221 iRoamingToWlanPeriodic->Cancel(); |
227 delete iRoamingToWlanPeriodic; |
222 delete iRoamingToWlanPeriodic; |
228 } |
223 } |
229 if ( iDisconnectQueue ) |
|
230 { |
|
231 iDisconnectQueue->ResetAndDestroy(); |
|
232 } |
|
233 delete iDisconnectQueue; |
|
234 |
|
235 if ( iRoamingQueue ) |
224 if ( iRoamingQueue ) |
236 { |
225 { |
237 iRoamingQueue->ResetAndDestroy(); |
226 iRoamingQueue->ResetAndDestroy(); |
238 } |
227 } |
239 delete iRoamingQueue; |
228 delete iRoamingQueue; |
840 MPMLOGSTRING( "CMPMServer::RemoveSession" ) |
829 MPMLOGSTRING( "CMPMServer::RemoveSession" ) |
841 |
830 |
842 TInt index = iSessions.Find( aSession ); |
831 TInt index = iSessions.Find( aSession ); |
843 if ( index != KErrNotFound ) |
832 if ( index != KErrNotFound ) |
844 { |
833 { |
|
834 if ( Events() ) |
|
835 { |
|
836 // Cancel WLAN scan request if one exists |
|
837 TRAP_IGNORE( Events()->CancelScanL( iSessions[index] ) ) |
|
838 } |
845 iSessions.Remove( index ); |
839 iSessions.Remove( index ); |
846 } |
840 } |
847 } |
841 } |
848 |
842 |
849 // ----------------------------------------------------------------------------- |
843 // ----------------------------------------------------------------------------- |