--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Symbian3/PDK/Source/GUID-9619335F-7345-5C9B-BAF6-4C3D8172ECE6.dita Fri Jan 22 18:26:19 2010 +0000
@@ -0,0 +1,19 @@
+<?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 task
+ PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
+<task xml:lang="en" id="GUID-9619335F-7345-5C9B-BAF6-4C3D8172ECE6"><title>Adding a Device to the Start of the List </title><shortdesc>This topic shows you how to add a device to the first position in the list. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody><context><p>The position of a device in the list is represented by a position index, where 0 indicates the start of the list, followed by 1 ,2, 3 and so on. Adding a device to the start of the list means that the device is the first device that the Bluetooth GPS PSY attempts to connect to. </p> <p>To add a device to the list, its Bluetooth device address (<xref href="GUID-D6B126B5-A6AA-37E1-845F-4D650033C603.dita"><apiname>TBTDevAddr</apiname></xref>) must be specified. A device's Bluetooth address is obtained by looking up the device in the Bluetooth Registry. Note that device addresses must be unique within the list. </p> </context> <steps-unordered><step id="GUID-4E8C55B2-8866-5257-8F87-C00DD8859422"><cmd>Call <xref href="GUID-2D92CE4A-3784-35E6-969F-504888DFA4FF.dita#GUID-2D92CE4A-3784-35E6-969F-504888DFA4FF/GUID-5F3D5F3F-42AE-334D-AA8F-918F579C72EB"><apiname>CLbsBtGpsConfig::AddDevice(const TBTDevAddr&,
+ TInt, TLbsBtGpsEntryKey&)</apiname></xref>. This function takes the address of the new device and the position in the list as input. Set <codeph>aPosition</codeph> = 0 to add the device to the start of the list. </cmd> <stepxmp><codeblock id="GUID-F09D1B14-82D5-5117-965F-B88E975113F6" xml:space="preserve">// Add a new device at the start of the list
+TInt err;
+TBTDevAddr deviceAddress;
+TLbsBtGpsEntryKey key;
+err = iConfig->AddDevice(deviceAddress, 0, key);
+</codeblock> </stepxmp> <stepresult><p>Upon success, this step returns <codeph>KErrNone</codeph> and the unique key (type <xref href="GUID-4BAA1E3B-D73C-34CC-9FCA-D5D7924773DB.dita"><apiname>TLbsBtGpsEntryKey</apiname></xref>) that identifies the new device. The key is returned via the key reference that is passed in. The key is used to identify the device in any future operations, such as moving or removing. </p> <p>If the address of the device being added is the same as one already in the list, then <codeph>KErrAlreadyExists</codeph> is returned. </p> </stepresult> </step> </steps-unordered> <result><p>The device is added to the first position in the list. If the connection to this device fails, then the Bluetooth GPS PSY moves onto the next in the list. </p> </result> <postreq><p><xref href="GUID-DEF5784C-FE4A-57FE-834D-3C4C0E179007.dita">Moving a Device to a New Position in the List</xref> </p> </postreq> </taskbody><related-links><link href="GUID-5CAF1B85-853F-5450-B79B-7E768DFA44EC.dita"><linktext>Bluetooth
+ GPS PSY Configuration API Overview</linktext> </link> </related-links></task>
\ No newline at end of file