Using
the Privacy Controller API
This section gives guidance on how a Symbian platform licensee
can use the LBS Privacy Controller API to create a Privacy Controller.
This section is limited to describing how a licensee Privacy Controller
uses the API to interact with the LBS subsystem and does not deal with licensee-specific
implementation details such as how to implement privacy rules or policies
to automatically respond to privacy requests or how to show privacy dialogs
for user input. The code samples shown in this topic are therefore only outlines
that describe the API function calls and some important points to consider.
A typical design for a licensee Privacy Controller could be an application
that uses an engine class to manipulate privacy rules or policies and a separate
UI to allow these rules to be viewed and modified by a user.
- Defining a Privacy Controller Observer Class
To write a Privacy Controller a licensee must define a Privacy Controller observer class derived from MLbsPrivacyObserver (or MLbsPrivacyObserver2 for a Privacy Controller that must be automatically shutdown by the LBS subsystem when all privacy requests have completed. This is required when the LBS subsystem is configured and built in the Standalone Privacy Mode configuration).
- Implementing the MLbsPrivacyObserver Methods
A Privacy Controller must implement the virtual functions of the MLbsPrivacyObserver interface (and the shutdown function of the MLbsPrivacyObserver2 interface if appropriate).
- Responding to Requests and Cancelling Requests
As shown in the previous Privacy Controller API code examples, a Privacy Controller has a pointer to a CLbsPrivacyController class. The Privacy Controller uses this pointer to respond to privacy requests and to cancel them. The simple outline code in this section shows how a Privacy Controller calls these functions.
- Handling Multiple Simultaneous Privacy Requests
This topic describes how to design a Privacy Controller to handle multiple simultaneous privacy requests.
- Packaging the Privacy Controller
This topic describes how to package the Privacy Controller with the capabilities Location, ReadDeviceData and WriteDeviceData.
- Configuring the LBS Root Repository Initialisation File (Optional)
This topic describes how to configure LBS so that the Privacy Controller is started when a privacy request is received and LBS is in the Standalone Privacy Mode configuration.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.