|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE task |
|
11 PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"> |
|
12 <task id="GUID-D0FEE812-AD80-40D8-B902-05EC16C44C42" xml:lang="en"><title>Opening |
|
13 a Connection to an IAP</title><shortdesc>Extended Connection Preferences API can be used by applications |
|
14 to set the preferred Internet Access Point (IAP) prior to establishing a connection.</shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody> |
|
15 <context id="GUID-707C9659-1FAE-418E-88D7-1E62C0D7A7E1"> <p>Specifying |
|
16 IAP ID enables the applications to start a connection to a specific IAP. The |
|
17 application acquires a connection to the requested IAP, regardless of the |
|
18 existing connections.</p> </context> |
|
19 <steps id="GUID-4DD07DEC-6017-4237-BE46-1D69E5FBD744-GENID-1-10-1-14-1-1-4-1-1-5-1-1-5-1-3-2"> |
|
20 <step id="GUID-9A69E5AD-E938-4092-A8C2-CB65C37C8962-GENID-1-10-1-14-1-1-4-1-1-5-1-1-5-1-3-2-1"><cmd>Connect to<xref href="GUID-1277D793-4A0A-50A7-9414-AEE93E906E80.dita"> socket server </xref>.</cmd> |
|
21 <info> <codeblock xml:space="preserve">RSocketServ ss; |
|
22 ss.Connect(); </codeblock> </info> |
|
23 </step> |
|
24 <step id="GUID-9A69E5AD-E938-4092-A8C2-CB65C37C8962-GENID-1-10-1-14-1-1-4-1-1-5-1-1-5-1-3-2-2"><cmd> Open a <xref href="GUID-BD8446C5-3ADE-59A6-A13A-A5482D6FC56F.dita"> RConnection </xref> object.</cmd> |
|
25 <info> <codeblock xml:space="preserve">RConnection conn; |
|
26 conn.Open( ss );</codeblock> </info> |
|
27 </step> |
|
28 <step id="GUID-9A69E5AD-E938-4092-A8C2-CB65C37C8962-GENID-1-10-1-14-1-1-4-1-1-5-1-1-5-1-3-2-3"><cmd>Create a connection |
|
29 preference list and extended connection preferences object.</cmd> |
|
30 <info> <codeblock xml:space="preserve">TConnPrefList prefList; |
|
31 TExtendedConnPref preferences; </codeblock> </info> |
|
32 </step> |
|
33 <step id="GUID-A2DF22F2-7FB2-43EE-9DC6-A87BFB47B23F"><cmd>Define the IAP using <xref href="GUID-B78E8AC0-CDC8-3DEC-AF3C-98C8994DA34A.dita#GUID-B78E8AC0-CDC8-3DEC-AF3C-98C8994DA34A/GUID-D81D45EE-CA3C-3CB1-83EE-2EA313807AF4"><apiname>TExtendedConnPref::SetIapId()</apiname></xref>. </cmd> |
|
34 <info><codeblock xml:space="preserve">preferences.SetIapId( 8 );</codeblock></info> |
|
35 </step> |
|
36 <step id="GUID-65E4E92C-BDA3-4E95-8797-9A4E9A829B5D"><cmd>Append extended |
|
37 connection preferences into connection preference list. </cmd> |
|
38 <info><codeblock xml:space="preserve">prefList.AppendL( &preferences );</codeblock></info> |
|
39 </step> |
|
40 <step id="GUID-7B2046C2-1F25-46C9-BDD8-66168AC52034"><cmd>Start a connection |
|
41 with connection preferences.</cmd> |
|
42 <info><codeblock xml:space="preserve">conn.Start( prefList );</codeblock></info> |
|
43 </step> |
|
44 </steps> |
|
45 <result id="GUID-705D9124-7F06-4305-B9A7-BE59A5052977"> <p>The application |
|
46 is connected to the specified IAP.</p> </result> |
|
47 </taskbody><related-links> |
|
48 <link href="GUID-3490A064-8421-4ABB-9E93-99A5565CF4D7.dita"><linktext>Additional |
|
49 Connection Preferences</linktext></link> |
|
50 </related-links></task> |