Symbian3/SDK/Source/GUID-E34D0F11-4B34-575C-BE78-8EAD13E9CD64.dita
changeset 0 89d6a7a84779
equal deleted inserted replaced
-1:000000000000 0:89d6a7a84779
       
     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-E34D0F11-4B34-575C-BE78-8EAD13E9CD64" xml:lang="en"><title> Starting
       
    13 and Closing a Management Plane session: Tutorial</title><prolog><metadata><keywords/></metadata></prolog><taskbody>
       
    14 
       
    15 
       
    16 <prereq><p> This tutorial shows how an application connects to
       
    17 the Sockets Server to access the Management Plane functionality. The Management
       
    18 Plane functionality allows an application to access the Access Points. The
       
    19 Management Plane uses a different API to other Sockets Server connections.
       
    20  </p><p> The <xref href="GUID-55FE59B7-4FA9-3B1A-BD4C-9B7611FE75C2.dita"><apiname>RConnectionServ</apiname></xref> API is accessed through the <xref href="GUID-61E0CD76-A2E3-5066-84A8-146EECA8ADCD.dita">Sockets Server</xref> client
       
    21 API, so you need to ensure that <filepath>esock.lib</filepath> is included
       
    22 in the MMP file.  </p><p>The user must supply a valid Tier ID when the connection
       
    23 is made. Tier's are discussed in the topic <xref href="GUID-4841AEDF-D22C-57D0-872D-7BD8B6A29CF5.dita">Tiers
       
    24 Manager</xref>. Use the <xref href="GUID-387A8240-0765-52F2-98A4-8F9FC809E03E.dita#GUID-387A8240-0765-52F2-98A4-8F9FC809E03E/GUID-437C4AE0-D16B-50B7-8AD8-A4E8FA5F15E5">Tier
       
    25 Table</xref> in the Communications Database to find the Tier IDs. </p><p>The
       
    26 high level steps to connect to the Management Plane are:</p> </prereq>
       
    27 <steps id="GUID-F9A14241-7E5B-5DAD-BD7D-35C84380392F">
       
    28 <step id="GUID-712ED667-E5F7-5817-BF7E-8BE4A62ECE50"><cmd>Determine which
       
    29 Tier ID to supply </cmd>
       
    30 </step>
       
    31 <step id="GUID-E852EB65-63E0-59F2-8477-7BBEBFE104A3"><cmd/>
       
    32 <stepxmp>Call the <xref href="GUID-55FE59B7-4FA9-3B1A-BD4C-9B7611FE75C2.dita"><apiname>RConnectionServ::Connect(TUint
       
    33                 aTierId)</apiname></xref> function with the Tier ID. This will connect
       
    34 to the Management Plane. </stepxmp>
       
    35 <info>By default, <codeph>aTierId</codeph> is Null to indicate all Tiers are
       
    36 available. The <codeph>aTierId</codeph> must specify a valid tier. The <codeph>RConnectionServ</codeph> API
       
    37 does not have any functionality if the default value for <codeph>aTierId</codeph> is
       
    38 used. </info>
       
    39 </step>
       
    40 <step id="GUID-76388961-E75A-5BAD-ABCF-DAD394DE30FD"><cmd/>
       
    41 <info>Perform operations on the Tier. All actions on this <xref href="GUID-55FE59B7-4FA9-3B1A-BD4C-9B7611FE75C2.dita"><apiname>RConnectionServ</apiname></xref> connection
       
    42 will depend on the specified Tier. </info>
       
    43 </step>
       
    44 <step id="GUID-B13476C2-ADB9-5102-A754-1C024E6D0C36"><cmd/>
       
    45 <info>Call the <xref href="GUID-55FE59B7-4FA9-3B1A-BD4C-9B7611FE75C2.dita"><apiname>RConnectionServ::Close()</apiname></xref> function
       
    46 to end the connection with the Management Plane. </info>
       
    47 <info>The <codeph>Close()</codeph> function ends the <xref href="GUID-55FE59B7-4FA9-3B1A-BD4C-9B7611FE75C2.dita"><apiname>RConnectionServ</apiname></xref> session
       
    48 with the Tier specified using the <codeph>Connect()</codeph> function. </info>
       
    49 </step>
       
    50 </steps>
       
    51 <example id="GUID-4922B67C-A24B-592A-96A4-26ABAB232E16"><title>Connect and
       
    52 Close example</title> <p>The following example shows how to start and close
       
    53 a session. </p> <codeblock id="GUID-6919C0BC-3D4A-52F7-B3AB-3B54E656F60D" xml:space="preserve">
       
    54 #include &lt;comms-infras/es_connectionserv.h&gt;
       
    55 #include &lt;sometechnology.h&gt; // for KSomeTierId
       
    56 
       
    57 using namespace ConnectionServ;
       
    58 
       
    59 // Assumption: RConnectionServ is owned as an attribute of some working object
       
    60 protected:
       
    61   RConnectionServ iConnServ;
       
    62 
       
    63 // Start the session
       
    64 User::LeaveIfError(iConnServ.Connect(KSomeTierId));
       
    65 
       
    66 // Close the session
       
    67 iConnServ.Close();
       
    68 </codeblock> </example>
       
    69 </taskbody></task>