Symbian3/SDK/Source/GUID-7F6283C0-46E8-427C-B6A9-FB274A7D2C15.dita
changeset 8 ae94777fff8f
child 13 48780e181b38
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Symbian3/SDK/Source/GUID-7F6283C0-46E8-427C-B6A9-FB274A7D2C15.dita	Fri Jun 11 12:39:03 2010 +0100
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
+<!-- This component and the accompanying materials are made available under the terms of the License 
+"Eclipse Public License v1.0" which accompanies this distribution, 
+and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
+<!-- Initial Contributors:
+    Nokia Corporation - initial contribution.
+Contributors: 
+-->
+<!DOCTYPE task
+  PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
+<task id="GUID-7F6283C0-46E8-427C-B6A9-FB274A7D2C15" xml:lang="en"><title>Opening
+a Connection to a SNAP by specifying SNAP Type</title><shortdesc>Extended Connection Preferences API can be used by applications
+to set the SNAP type prior to establishing a connection.</shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody>
+<context id="GUID-DA2ED45B-65AC-4C82-B854-67284173FAF9-GENID-1-10-1-14-1-1-4-1-1-5-1-1-3-1-3-1">       <p>Specifying
+SNAP type enables the applications to start a connection to a specific SNAP
+(For example, Internet SNAP or Intranet SNAP) without iterating through the
+SNAP list to identify the appropriate type.</p>     </context>
+<steps id="GUID-4DD07DEC-6017-4237-BE46-1D69E5FBD744-GENID-1-10-1-14-1-1-4-1-1-5-1-1-3-1-3-2">
+<step id="GUID-9A69E5AD-E938-4092-A8C2-CB65C37C8962-GENID-1-10-1-14-1-1-4-1-1-5-1-1-3-1-3-2-1"><cmd>Connect to<xref href="GUID-1277D793-4A0A-50A7-9414-AEE93E906E80.dita"> socket server </xref>.</cmd>
+<info> <codeblock xml:space="preserve">RSocketServ ss;
+ss.Connect();       </codeblock>                  </info>
+</step>
+<step id="GUID-9A69E5AD-E938-4092-A8C2-CB65C37C8962-GENID-1-10-1-14-1-1-4-1-1-5-1-1-3-1-3-2-2"><cmd> Open a<xref href="GUID-BD8446C5-3ADE-59A6-A13A-A5482D6FC56F.dita"> RConnection </xref> object.</cmd>
+<info> <codeblock xml:space="preserve">RConnection conn;
+conn.Open( ss );</codeblock>                  </info>
+</step>
+<step id="GUID-DC3652D1-7EDB-4582-8B6B-117E248A1F70-GENID-1-10-1-14-1-1-4-1-1-5-1-1-3-1-3-2-3"><cmd>Create a connection
+preference list and extended connection preferences object.</cmd>
+<info> <codeblock xml:space="preserve">TConnPrefList prefList;
+TExtendedConnPref preferences;    </codeblock>                  </info>
+</step>
+<step id="GUID-3D1BD3F8-6244-45E9-AF47-C19E5667092C-GENID-1-10-1-14-1-1-4-1-1-5-1-1-3-1-3-2-4"><cmd>Set the SNAP type
+using <xref href="GUID-B78E8AC0-CDC8-3DEC-AF3C-98C8994DA34A.dita#GUID-B78E8AC0-CDC8-3DEC-AF3C-98C8994DA34A/GUID-D26E7C3A-0C40-3BF1-85E4-6D28044F356B"><apiname>TExtendedConnPref::SetSnapPurpose()</apiname></xref>.</cmd>
+<info><codeblock xml:space="preserve">preferences.SetSnapPurpose( CMManager::ESnapPurposeInternet );</codeblock></info>
+</step>
+<step id="GUID-9DE0CAE0-8F0A-4197-9FC1-B045C32A817F-GENID-1-10-1-14-1-1-4-1-1-5-1-1-3-1-3-2-5"><cmd>Append the extended
+connection preferences into connection preference list. </cmd>
+<info><codeblock xml:space="preserve">prefList.AppendL( &amp;preferences );</codeblock></info>
+</step>
+<step id="GUID-E492622A-4410-4F2D-A4DC-C0D8A3B33F99-GENID-1-10-1-14-1-1-4-1-1-5-1-1-3-1-3-2-6"><cmd>Start a connection
+with connection preferences.</cmd>
+<info><codeblock xml:space="preserve">conn.Start( prefList );</codeblock></info>
+</step>
+</steps>
+<result id="GUID-3B2081B8-6F9D-40C1-8407-0F0EB43790B5-GENID-1-10-1-14-1-1-4-1-1-5-1-1-3-1-3-3">       <p>The application
+is connected to Internet SNAP.</p>     </result>
+</taskbody><related-links>
+<link href="GUID-3490A064-8421-4ABB-9E93-99A5565CF4D7.dita"><linktext>Additional
+Connection Preferences</linktext></link>
+</related-links></task>
\ No newline at end of file