Creating an Instance of the Bluetooth GPS PSY Configuration API

This topic shows you how to create a new instance of the Bluetooth GPS PSY Configuration API.

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 LocalServices capability to do this.

When creating a new instance, the client can request to receive update notifications about changes to the list by implementing the MLbsBtGpsConfigObserver observer class. The client can use these update notifications to refresh its own copy of the list.

Call CLbsBtGpsConfig::NewL(MLbsBtGpsConfigObserver&). This function takes the MLbsBtGpsConfigObserver observer interface as input. Note: If the client does not require an observer interface, the CLbsBtGpsConfig::NewL() overload can be called instead.
// Create a new instance of the API
// that implements the observer interface

iConfig = CLbsBtGpsConfig::NewL(*this);
This step returns a newly constructed CLbsBtGpsConfig object. If the client does not have the required capabilities, KErrPermissionDenied is returned.

A new instance of the Bluetooth GPS PSY Configuration API is created.