author | Graeme Price <GRAEME.PRICE@NOKIA.COM> |
Fri, 15 Oct 2010 14:32:18 +0100 | |
changeset 15 | 307f4279f433 |
parent 14 | 578be2adaf3e |
permissions | -rw-r--r-- |
14
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
1 |
<?xml version="1.0" encoding="utf-8"?> |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
2 |
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
3 |
<!-- This component and the accompanying materials are made available under the terms of the License |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
4 |
"Eclipse Public License v1.0" which accompanies this distribution, |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
5 |
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
6 |
<!-- Initial Contributors: |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
7 |
Nokia Corporation - initial contribution. |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
8 |
Contributors: |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
9 |
--> |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
10 |
<!DOCTYPE task |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
11 |
PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"> |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
12 |
<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&, |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
13 |
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 |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
14 |
TInt err; |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
15 |
TBTDevAddr deviceAddress; |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
16 |
TLbsBtGpsEntryKey key; |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
17 |
err = iConfig->AddDevice(deviceAddress, 0, key); |
578be2adaf3e
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582
Dominic Pinkman <dominic.pinkman@nokia.com>
parents:
5
diff
changeset
|
18 |
</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 |
1
25a17d01db0c
Addition of the PDK content and example code for Documentation_content according to Feature bug 1607 and bug 1608
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
19 |
GPS PSY Configuration API Overview</linktext> </link> </related-links></task> |