Symbian3/PDK/Source/GUID-D9040B2E-C4C6-576C-A3B2-9F68E8FCE4A6.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 16 Jul 2010 17:23:46 +0100
changeset 12 80ef3a206772
parent 9 59758314f811
permissions -rw-r--r--
Week 28 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 1897, Bug 344, Bug 2681, Bug 463, Bug 1522.

<?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-D9040B2E-C4C6-576C-A3B2-9F68E8FCE4A6"><title>Creating an Instance of the Bluetooth GPS PSY Configuration API</title><shortdesc>This topic shows you how to create a new instance of the Bluetooth GPS PSY Configuration API. </shortdesc><prolog><metadata><keywords/></metadata></prolog><taskbody><context id="GUID-6799E3F3-353E-5C00-A38C-D32F888392AA-GENID-1-12-1-19-1-1-11-1-6-1-8-1-5-1-3-1-3-1"><p>To start using the Bluetooth GPS PSY Configuration API, the client application must first create a new instance of the API. Note that the client must have the <codeph>LocalServices</codeph> capability to do this. </p> <p>When creating a new instance, the client can request to receive update notifications about changes to the list by implementing the <xref href="GUID-75221780-805A-3DF5-853E-1A01B06C36ED.dita"><apiname>MLbsBtGpsConfigObserver</apiname></xref> observer class. The client can use these update notifications to refresh its own copy of the list. </p> </context> <steps-unordered><step id="GUID-CCD652B5-F8B7-58AB-892B-508BD29FEBE3"><cmd>Call <xref href="GUID-2D92CE4A-3784-35E6-969F-504888DFA4FF.dita#GUID-2D92CE4A-3784-35E6-969F-504888DFA4FF/GUID-51AD065D-5AB0-3899-8FC3-FFF9FE5465BC"><apiname>CLbsBtGpsConfig::NewL(MLbsBtGpsConfigObserver&amp;)</apiname></xref>. This function takes the <xref href="GUID-75221780-805A-3DF5-853E-1A01B06C36ED.dita"><apiname>MLbsBtGpsConfigObserver</apiname></xref> observer interface as input. </cmd> <info> Note: If the client does not require an observer interface, the <xref href="GUID-2D92CE4A-3784-35E6-969F-504888DFA4FF.dita#GUID-2D92CE4A-3784-35E6-969F-504888DFA4FF/GUID-AE4C17AC-B857-3EE3-9C0C-BB157CD09789"><apiname>CLbsBtGpsConfig::NewL()</apiname></xref> overload can be called instead. </info> <stepxmp><codeblock id="GUID-A2FD7D4F-E8B1-58E1-AEFB-447C8D9CBE67" xml:space="preserve">// Create a new instance of the API
// that implements the observer interface

iConfig = CLbsBtGpsConfig::NewL(*this);</codeblock> </stepxmp> <stepresult>This step returns a newly constructed <codeph>CLbsBtGpsConfig</codeph> object. If the client does not have the required capabilities, <codeph>KErrPermissionDenied</codeph> is returned. </stepresult> </step> </steps-unordered> <result><p>A new instance of the Bluetooth GPS PSY Configuration API is created. </p> </result> <postreq><p><xref href="GUID-9619335F-7345-5C9B-BAF6-4C3D8172ECE6.dita">Adding a Device to the Start of 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>