This topic shows you how to retrieve the list of devices.
Retrieving the list of devices returns a list of TLbsBtGpsDeviceInfo objects. Each object contains information about a device in the list, for example, its Bluetooth GPS device type. A device's unique key (TLbsBtGpsEntryKey) can also be returned in this way. This key is required to identify a device when performing operations such as moving or removing.
// Retrieve the list of devices iDeviceList.ResetAndDestroy(); iConfig->GetDeviceListL(iDeviceList); // Loop through the devices for (TInt index=0; index<iDeviceList.Count(); ++index) { // Get at the device information from the list const TLbsBtGpsDeviceInfo* deviceInfo = iDeviceList[index]; // Do something, for example, display on a GUI } // Destroy the retrieved copy of the list now we have finished using it iDeviceList.ResetAndDestroy(); }If the client does not have the required capabilities, KErrPermissionDenied is returned.
The list of devices is returned.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.