Symbian3/PDK/Source/GUID-01979029-C009-5FD3-9925-2B7945FB96A6.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 16 Jul 2010 17:23:46 +0100
changeset 12 80ef3a206772
parent 9 59758314f811
child 14 578be2adaf3e
permissions -rw-r--r--
Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     2
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     3
<!-- This component and the accompanying materials are made available under the terms of the License 
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     5
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     6
<!-- Initial Contributors:
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     7
    Nokia Corporation - initial contribution.
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     8
Contributors: 
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
     9
-->
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    10
<!DOCTYPE concept
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
12
80ef3a206772 Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 9
diff changeset
    12
<concept xml:lang="en" id="GUID-01979029-C009-5FD3-9925-2B7945FB96A6"><title>Restarting a Network Connection Tutorial</title><shortdesc>This section describes the steps used to start a network connection that was stopped due to contention. </shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody><section id="GUID-6799E3F3-353E-5C00-A38C-D32F888392AA-GENID-1-12-1-24-1-1-8-1-6-1-5-1-8-1-3-1"><title>Introduction</title> <p>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. </p> </section> <section><title>Introduction</title> <ol id="GUID-409D0186-1BE4-5F7B-999D-0A9FFDED5F14"><li id="GUID-99D5A504-3DE4-59A1-AFC0-A49D13A8B7F5"><p>To terminate the high priority connection on of the following occurs: </p> <ol id="GUID-CF81E2BE-E5E4-5143-AA5C-B0355FB9F9BE"><li id="GUID-E8FE9288-9E3C-58CC-B7AA-435FB1D8DFBF"><p>The Connection Provider (CPR) receives a <codeph>TStopNormal</codeph> message to terminate the process. </p> </li> <li id="GUID-DC6D3CEA-8CD1-5B36-856A-A20AEED6DA0E"><p>The connection remains idle and is automatically terminated. </p> </li> </ol> </li> <li id="GUID-9F56D151-DD81-5706-B82B-3194FA85DAD0"><p>The PDP Tier Manager does the following: </p> <ol id="GUID-E813DD8A-5F6C-5D92-9F99-B596FC7CB8D7"><li id="GUID-6D80A333-6517-5314-B8CA-797AF13D21C3"><p>Indicates to the PDP Meta-Connection Provider (MCPR) of the low priority connection that it can restore the connection. </p> </li> <li id="GUID-D14D495F-5C98-5C80-8A90-50C22806ADC3"><p>The PDP MCPR sends an availability notification to the <codeph>CConnection</codeph> of the low priority connection. </p> </li> </ol> </li> <li id="GUID-AA69E7A9-F16C-5284-9406-C6874569C897"><p> <codeph>CConnection</codeph> of the low priority connection receives the availability notification and uses <xref href="GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD.dita#GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD/GUID-C7F27821-BE25-3560-B1A9-74D1A2BB38A9"><apiname>RConnection::Start(TConnPrefList)</apiname></xref> to establish the connection. </p> </li> </ol>  </section> <section><title>Restoring a connection </title> <p>Use the following code to ensure a stopped connection is restored when the higher priority connection has completed. </p> <codeblock id="GUID-92251970-53D1-5DE7-A67E-BC392C43B470" xml:space="preserve">
9
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    13
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    14
    TConnPrefList* prefs = TConnPrefList::NewL();
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    15
    CleanupStack::PushL(prefs);
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    16
    TConnAPPref* APPref = TConnAPPref::NewL(iSnapNumber);
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    17
    CleanupStack::PushL(APPref);
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    18
    TConnAutoStartPref* autoPref = TConnAutoStartPref::NewL();
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    19
    CleanupStack::PushL(autoPref);
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    20
    prefs-&gt;AppendL(APPref);
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    21
    prefs-&gt;AppendL(autoPref);
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    22
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    23
    error = iConnection-&gt;Start(*prefs);  //Synchronous start. 
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    24
    // For asynchronous variant iConnection-&gt;Start(*iPrefs,  iStatus), you need to     // store “prefs” as a class member and delete them in RunL .
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    25
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    26
    delete APPref;
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    27
    delete autoPref;
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    28
    prefs-&gt;Remove(0);
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    29
    prefs-&gt;Remove(0);
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    30
    delete prefs;
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    31
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    32
</codeblock> </section> </conbody><related-links><link href="GUID-CD57B3EB-B8FD-53CE-B319-FB6275BE391E.dita"><linktext>What is Contention?</linktext> </link> <link href="GUID-0E0D4E95-470F-54BE-8DCB-719976C8B84C.dita"><linktext>What is Contention
59758314f811 Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 5
diff changeset
    33
                Management?</linktext> </link> <link href="GUID-FF81C5C5-09B7-5194-928E-0BA87417B2CD.dita"><linktext>What are Access Point
1
25a17d01db0c Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff changeset
    34
                Priorities?</linktext> </link> </related-links></concept>