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.
Using the Tutorial
The code fragments in this tutorial are derived from the Bluetooth Example application available in /src/COMMON/DEVELOPERLIBRARY/examples/Bluetooth/BTExample1. 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.
Intended Audience:
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.
Basic procedure:
The high level steps to remove a device from a PAN are:
The user will be presented with a list of menu options. Selecting the option to stop the connection will trigger the following:
... if(iIapStarted) { rerr = iConnection.Stop(); if(rerr != KErrNone) { iConsole.Printf(_L("Failed to STOP IAP. Err %d.\n"), rerr); } iIapStarted = EFalse; } } return rerr;
Recall from Creating a Personal Area Network tutorial that iConnection is an RConnection.