Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


Privacy requester classes

[Top]


Purpose

Obtaining the location of a mobile device user raises privacy and security issues. The privacy requester classes of the Location Acquisition API provide a means of passing information about the identity of the agent (or agents) requesting location information to the LBS subsystem. A requester is an agent such as a contact or service that requests location information.

A requester may be seeking to obtain location information for its own use or it may be acting as an intermediary. A client acts as an intermediary when it is requesting location information on behalf of an external source or another installed application. The latter may occur in scripting environments where the client has the responsibility of performing security checks on the executing script.

Important note: It is only necessary to use privacy requester classes if using the Location Acquisition API on the S60 platform (on which clients must use lbs.dll to connect to a Location Server). On other platforms (where clients link with lbsselflocate.dll) use of the privacy requester classes is optional.

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.

[Top]


Privacy requester classes

This section describes the privacy requester classes.


Privacy class description

Figure 1 shows the Privacy classes provided by the Location Acquisition API.

Figure 1. Location Acquisition API priva...


Figure 1. Location Acquisition API privacy classes.

A requester is defined as an agent that requests location information. There are two requester types:

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).

[Top]


See also

How to get location information for examples of using privacy requesters.