equal
deleted
inserted
replaced
|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE task |
|
11 PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"> |
|
12 <task xml:lang="en" id="GUID-EE715BD5-3DCA-58A5-8A9E-9D29046749C4"><title>Retrieving the List of Devices </title><shortdesc>This topic shows you how to retrieve the list of devices. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody><context><p>Retrieving the list of devices returns a list of <xref href="GUID-BEC75264-9B15-3185-863B-7262ECBC56CA.dita"><apiname>TLbsBtGpsDeviceInfo</apiname></xref> objects. Each object contains information about a device in the list, for example, its Bluetooth GPS device type. A device's unique key (<xref href="GUID-4BAA1E3B-D73C-34CC-9FCA-D5D7924773DB.dita"><apiname>TLbsBtGpsEntryKey</apiname></xref>) can also be returned in this way. This key is required to identify a device when performing operations such as moving or removing. </p> </context> <steps-unordered><step id="GUID-4108783E-C610-5CB9-899D-1791E88C14EA"><cmd>Call <xref href="GUID-2D92CE4A-3784-35E6-969F-504888DFA4FF.dita#GUID-2D92CE4A-3784-35E6-969F-504888DFA4FF/GUID-B19FDD97-8883-321F-AE42-ED9CD42FD57C"><apiname>CLbsBtGpsConfig::GetDeviceListL(RPointerArray<TLbsBtGpsDeviceInfo>&)</apiname></xref>. This function passes a reference to an empty <codeph>RPointerArray</codeph> to be populated with device entries from the list. </cmd> <stepxmp><codeblock id="GUID-1148972E-DB8D-5CB8-861D-149889599363" xml:space="preserve">// Retrieve the list of devices |
|
13 iDeviceList.ResetAndDestroy(); |
|
14 iConfig->GetDeviceListL(iDeviceList); |
|
15 |
|
16 // Loop through the devices |
|
17 for (TInt index=0; index<iDeviceList.Count(); ++index) |
|
18 { |
|
19 // Get at the device information from the list |
|
20 const TLbsBtGpsDeviceInfo* deviceInfo = iDeviceList[index]; |
|
21 |
|
22 // Do something, for example, display on a GUI |
|
23 |
|
24 } |
|
25 |
|
26 // Destroy the retrieved copy of the list now we have finished using it |
|
27 iDeviceList.ResetAndDestroy(); |
|
28 }</codeblock> </stepxmp> <info>If the client does not have the required capabilities, <codeph>KErrPermissionDenied</codeph> is returned. </info> </step> </steps-unordered> <result><p>The list of devices is returned. </p> </result> </taskbody><related-links><link href="GUID-5CAF1B85-853F-5450-B79B-7E768DFA44EC.dita"><linktext>Bluetooth |
|
29 GPS PSY Configuration API Overview </linktext> </link> </related-links></task> |