diff -r 89d6a7a84779 -r 25a17d01db0c Symbian3/PDK/Source/GUID-EE715BD5-3DCA-58A5-8A9E-9D29046749C4.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/PDK/Source/GUID-EE715BD5-3DCA-58A5-8A9E-9D29046749C4.dita Fri Jan 22 18:26:19 2010 +0000 @@ -0,0 +1,29 @@ + + + + + +Retrieving the List of Devices 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.

Call CLbsBtGpsConfig::GetDeviceListL(RPointerArray<TLbsBtGpsDeviceInfo>&). This function passes a reference to an empty RPointerArray to be populated with device entries from the list. // 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.

Bluetooth + GPS PSY Configuration API Overview
\ No newline at end of file