Symbian3/PDK/Source/GUID-D9040B2E-C4C6-576C-A3B2-9F68E8FCE4A6.dita
changeset 12 80ef3a206772
parent 9 59758314f811
equal deleted inserted replaced
11:5072524fcc79 12:80ef3a206772
     7     Nokia Corporation - initial contribution.
     7     Nokia Corporation - initial contribution.
     8 Contributors: 
     8 Contributors: 
     9 -->
     9 -->
    10 <!DOCTYPE task
    10 <!DOCTYPE task
    11   PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
    11   PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd">
    12 <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-18-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
    12 <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
    13 // that implements the observer interface
    13 // that implements the observer interface
    14 
    14 
    15 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
    15 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
    16                 GPS PSY Configuration API Overview</linktext> </link> </related-links></task>
    16                 GPS PSY Configuration API Overview</linktext> </link> </related-links></task>