Symbian3/SDK/Source/GUID-E34D0F11-4B34-575C-BE78-8EAD13E9CD64.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 21 Jan 2010 18:18:20 +0000
changeset 0 89d6a7a84779
permissions -rw-r--r--
Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385

<?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-E34D0F11-4B34-575C-BE78-8EAD13E9CD64" xml:lang="en"><title> Starting
and Closing a Management Plane session: Tutorial</title><prolog><metadata><keywords/></metadata></prolog><taskbody>


<prereq><p> This tutorial shows how an application connects to
the Sockets Server to access the Management Plane functionality. The Management
Plane functionality allows an application to access the Access Points. The
Management Plane uses a different API to other Sockets Server connections.
 </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
API, so you need to ensure that <filepath>esock.lib</filepath> is included
in the MMP file.  </p><p>The user must supply a valid Tier ID when the connection
is made. Tier's are discussed in the topic <xref href="GUID-4841AEDF-D22C-57D0-872D-7BD8B6A29CF5.dita">Tiers
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
Table</xref> in the Communications Database to find the Tier IDs. </p><p>The
high level steps to connect to the Management Plane are:</p> </prereq>
<steps id="GUID-F9A14241-7E5B-5DAD-BD7D-35C84380392F">
<step id="GUID-712ED667-E5F7-5817-BF7E-8BE4A62ECE50"><cmd>Determine which
Tier ID to supply </cmd>
</step>
<step id="GUID-E852EB65-63E0-59F2-8477-7BBEBFE104A3"><cmd/>
<stepxmp>Call the <xref href="GUID-55FE59B7-4FA9-3B1A-BD4C-9B7611FE75C2.dita"><apiname>RConnectionServ::Connect(TUint
                aTierId)</apiname></xref> function with the Tier ID. This will connect
to the Management Plane. </stepxmp>
<info>By default, <codeph>aTierId</codeph> is Null to indicate all Tiers are
available. The <codeph>aTierId</codeph> must specify a valid tier. The <codeph>RConnectionServ</codeph> API
does not have any functionality if the default value for <codeph>aTierId</codeph> is
used. </info>
</step>
<step id="GUID-76388961-E75A-5BAD-ABCF-DAD394DE30FD"><cmd/>
<info>Perform operations on the Tier. All actions on this <xref href="GUID-55FE59B7-4FA9-3B1A-BD4C-9B7611FE75C2.dita"><apiname>RConnectionServ</apiname></xref> connection
will depend on the specified Tier. </info>
</step>
<step id="GUID-B13476C2-ADB9-5102-A754-1C024E6D0C36"><cmd/>
<info>Call the <xref href="GUID-55FE59B7-4FA9-3B1A-BD4C-9B7611FE75C2.dita"><apiname>RConnectionServ::Close()</apiname></xref> function
to end the connection with the Management Plane. </info>
<info>The <codeph>Close()</codeph> function ends the <xref href="GUID-55FE59B7-4FA9-3B1A-BD4C-9B7611FE75C2.dita"><apiname>RConnectionServ</apiname></xref> session
with the Tier specified using the <codeph>Connect()</codeph> function. </info>
</step>
</steps>
<example id="GUID-4922B67C-A24B-592A-96A4-26ABAB232E16"><title>Connect and
Close example</title> <p>The following example shows how to start and close
a session. </p> <codeblock id="GUID-6919C0BC-3D4A-52F7-B3AB-3B54E656F60D" xml:space="preserve">
#include &lt;comms-infras/es_connectionserv.h&gt;
#include &lt;sometechnology.h&gt; // for KSomeTierId

using namespace ConnectionServ;

// Assumption: RConnectionServ is owned as an attribute of some working object
protected:
  RConnectionServ iConnServ;

// Start the session
User::LeaveIfError(iConnServ.Connect(KSomeTierId));

// Close the session
iConnServ.Close();
</codeblock> </example>
</taskbody></task>