Symbian3/SDK/Source/GUID-50CDF6E0-C352-5771-8686-B551267C6BE6.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Tue, 20 Jul 2010 12:00:49 +0100
changeset 13 48780e181b38
parent 0 89d6a7a84779
permissions -rw-r--r--
Week 28 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 1897 and Bug 1522.

<?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 concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept xml:lang="en" id="GUID-50CDF6E0-C352-5771-8686-B551267C6BE6"><title>Closing the PAN</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>So far in this tutorial series we have looked at the steps involved in creating a Personal Area Network and adding and removing devices on the PAN. Now we will look at Closing the PAN. </p> <p><b>Using the Tutorial </b> </p> <p>The code fragments in this tutorial are derived from the Bluetooth Example application available in <filepath>/src/COMMON/DEVELOPERLIBRARY/examples/Bluetooth/BTExample1</filepath>. Although the code has been reformatted to the requirements of the tutorial there is always enough information included with the code to find the actual example code. </p> <p><b>Intended Audience: </b> </p> <p>This tutorial is designed for Symbian licensees only. Several APIs mentioned ad used throughout this tutorial series are only available in a device creators kit environment. </p> <p><b>Basic procedure: </b> </p> <p>The high level steps to remove a device from a PAN are: </p> <ul><li id="GUID-3D636E0E-7FDA-5769-960A-F17F1BA386F0"><p>User sends a stop command from the UI. </p> </li> <li id="GUID-FCC4DD0A-C63B-5383-9BBC-034CD0D6B101"><p>The connection is stopped. </p> </li> </ul> <section><title>Closing the PAN Connection</title> <p>The user will be presented with a list of menu options. Selecting the option to stop the connection will trigger the following: </p> <codeblock id="GUID-A32C8F4A-7BC9-5C0B-90F4-54E27EE747BA" xml:space="preserve">...
 if(iIapStarted)
 {
  rerr = iConnection.Stop();
  if(rerr != KErrNone)
 {
  iConsole.Printf(_L("Failed to STOP IAP.  Err %d.\n"), rerr);
 }
 iIapStarted = EFalse;
 }
}
return rerr;</codeblock> <p>Recall from <xref href="GUID-91C4F00B-E241-57DC-8520-8C16A302C983.dita">Creating a Personal Area Network</xref> tutorial that <codeph>iConnection</codeph> is an <xref href="GUID-BED8A733-2ED7-31AD-A911-C1F4707C67FD.dita"><apiname>RConnection</apiname></xref>. </p> </section> <section><title>What's next?</title> <p>There is nothing more to the PAN Profile tutorial series. In this series you have learned about the following: </p> <ul><li id="GUID-28BF47A7-5D36-5868-B52B-0ADF2DC9F5AE"><p> <xref href="GUID-91C4F00B-E241-57DC-8520-8C16A302C983.dita">Creating a Personal Area Network</xref>  </p> </li> <li id="GUID-10BF394F-3D57-5E4F-A04C-0E74FFB69D35"><p> <xref href="GUID-685AD682-10DC-553B-9C3A-04D0376138C4.dita"> Adding a device to the PAN</xref>  </p> </li> <li id="GUID-492FA736-BF43-56A4-8A22-0534B1EDD6F0"><p> <xref href="GUID-197648C4-A42C-5769-82B7-F8BA510631D9.dita">Removing a device from the PAN</xref>  </p> </li> <li id="GUID-F4FC4A0B-68CD-5F98-AF10-42571A8CC07F"><p> <b>Closing the PAN</b> - This document </p> </li> </ul> </section> </conbody></concept>