This section describes the steps used to start a network connection that was stopped due to contention.
A low priority connection is terminated when a contention issue occurs and the incoming connection has a higher priority. The low priority connection can be restarted when the higher priority connection is complete. For example, if an always-on Internet connection is terminated to enable the user to send an MMS, the Internet connection is restarted when the message is sent.
To terminate the high priority connection on of the following occurs:
The PDP Tier Manager does the following:
CConnection of the low priority connection receives the availability notification and uses RConnection::Start(TConnPrefList) to establish the connection.
Use the following code to ensure a stopped connection is restored when the higher priority connection has completed.
TConnPrefList* prefs = TConnPrefList::NewL(); CleanupStack::PushL(prefs); TConnAPPref* APPref = TConnAPPref::NewL(iSnapNumber); CleanupStack::PushL(APPref); TConnAutoStartPref* autoPref = TConnAutoStartPref::NewL(); CleanupStack::PushL(autoPref); prefs->AppendL(APPref); prefs->AppendL(autoPref); error = iConnection->Start(*prefs); //Synchronous start. // For asynchronous variant iConnection->Start(*iPrefs, iStatus), you need to // store “prefs” as a class member and delete them in RunL . delete APPref; delete autoPref; prefs->Remove(0); prefs->Remove(0); delete prefs;
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.