This document describes the classes that were used in earlier versions of the Symbian platform to identify the requester of location information to the LBS subsystem.
Use of these classes is now optional. It is recommended that you still use them if your LBS applications must run on devices based on earlier versions of Symbian.
The privacy requester classes were defined
as part of the Location Acquisition API before platform security was introduced
in Symbian OS v9. On all platforms based on Symbian OS v9 and later, client
applications are required to have the Location
capability
to use the Location Acquisition API. Platform security checks fulfil much
of the role of the privacy requester classes.
This section describes the privacy requester classes.
Class description
Figure 1 shows the Privacy classes provided by the Location Acquisition API.
Figure: Figure 1. Location Acquisition API privacy classes.
A requester is defined as an agent that requests location information. There are two requester types:
Service requesters
A service requester represents any terminal or network application or service.
Contact requesters
A contact requester represents an individual person requesting the location.
CRequestor::RequestorType()
defines the type
of the requester. The requester information is sent to Location Server before
requesting location estimates.
Defining requesters
Requesters may be defined in one of two ways:
Defining a single requester
A single requester is defined by
calling RPositioner::SetRequestorL()
. The method signature
is: TInt SetRequestor(CRequestor::TRequestorType aType,
CRequestor::TRequestorFormat aFormat, const TDesC&
aData)
.
The requester is defined directly by the values supplied to the function’s parameters. This case is used by applications or services if they are the only request source.
CRequestor::TRequestorType
defines
the type of requester: a service or contact.
CRequestor::TRequestorFormat
defines
the format of the requester identifier passed in aData
: an
application name, contact, email address etc.
Defining a stack of requesters
If an application requests
location information on behalf of another agent or agents, it can specify
the chain of requesters by calling a second variant of RPositioner::SetRequestorL()
.
The method signature is: TInt SetRequestor(const RRequestorStack&
aRequestorStack)
RRequestorStack
is
a container for a list of the requesters on behalf of which the request is
made. Each requester in the stack is represented by a CRequestor
class.
Note: Regardless of the number of requesters, there is always one service
requester, because the application executing the location request must be
always shown, even if it made the request on behalf of a contact requester.
For this reason, the last item in the requester stack must always be a service
requester (type CRequestorBase::ERequestorService
).