CLbsPrivacyController Class Reference

class CLbsPrivacyController : public CBase

An application can use this class to register itself as the user privacy controller for the LBS system.

The application must supply an implementation of the MLbsPrivacyObserver interface so that it can be notified of important events.

When it receives the MLbsPrivacyObserver::ProcessNetworkLocationRequest() notification it must reply by calling CLbsPrivacyController::RespondNetworkLocationRequest() to tell the LBS system the user response to the network location request.

If the request was accepted then the application will recieve more notifications: 1) MLbsPrivacyObserver::ProcessNetworkPositionUpdate() with the reference position when the assistance data is received from the network. 2) MLbsPrivacyObserver::ProcessNetworkPositionUpdate() with the calculated position when it is sent back to the network. 3) MLbsPrivacyObserver::ProcessRequestCompleted() when the application no longer needs to listen to notifications for that request.

Each notification contains aRequestId, which identifies each network location request within the LBS system. It is meant to be used so that each of the different notifications can be matched to the request they came from.

Inherits from

Constructor & Destructor Documentation

CLbsPrivacyController()

CLbsPrivacyController ( ) [private]

Standard C++ constructor.

~CLbsPrivacyController()

~CLbsPrivacyController ( )

Standard C++ destructor

Member Functions Documentation

CancelNetworkLocationRequest(TUint)

IMPORT_C void CancelNetworkLocationRequest ( TUint aRequestId )

Force the LBS system to cancel a currently running network location request, or to reject a request which has not yet been answered.

If this function is called after CLbsPrivacyController::RespondNetworkLocationRequest() then the LBS system will send a KErrCancel error in the next network Measurement Control message.

If this function is called before the request has been accepted (by a call to CLbsPrivacyController::RespondNetworkLocationRequest() ) the effect is the same as a call to CLbsPrivacyController::RespondNetworkLocationRequest() with the value ERequestRejected.

If aRequestId is not a currently active external location request then the call is ignored.

capability
ECapabilityLocation, ECapabilityWriteDeviceData

Parameters

TUint aRequestId The Id of the network location request (MT-LR) to cancel.

ConstructL(MLbsPrivacyObserver &)

void ConstructL ( MLbsPrivacyObserver & aObserver ) [private]

Standard ConstructL for CPrivacyController. It creates the object that implements the functionality for CLbsPrivacyObserver.

Parameters

MLbsPrivacyObserver & aObserver Reference to an observer that will be notified when a network location request is recieved by the LBS system.

NewL(MLbsPrivacyObserver &)

IMPORT_C CLbsPrivacyController * NewL ( MLbsPrivacyObserver & aObserver ) [static]

Standard Symbian OS two-phase constructor.

capability
ECapabilityLocation, ECapabilityReadDeviceData

Parameters

MLbsPrivacyObserver & aObserver Reference to an observer that will be notified when a network location request is recieved by the LBS system.

RespondNetworkLocationRequest(TUint, TRequestVerificationResult)

IMPORT_C void RespondNetworkLocationRequest ( TUint aRequestId,
TRequestVerificationResult aResult
)

The application that is listening to network location requests must use this function to give the LBS system the response to the location request.

The application is first notified of a network location request when MLbsObserver::ProcessNetworkLocationRequest is called. Then it can ask the user for verification if needed, or decide on its own. It must then use this function to tell the LBS system whether to accept or reject the network location request.

The response can be one of the values of TRequestVerificationResult, usually it will either be ERequestAccepted or ERequestRejected.

Parameters

TUint aRequestId Identifies the request within the LBS system.
TRequestVerificationResult aResult The response to the network location request.

Member Enumerations Documentation

Enum TRequestVerificationResult

The user response to the network location request dialog.

Enumerators

ERequestUnknown = 0

Unused request.

ERequestAccepted

Request accepted (permission granted).

ERequestRejected

Request rejected (permission denied).

ERequestIgnore

Tell the Lbs system to ignore the request. Currently not implemented.

Member Data Documentation

CLbsPrivacyControllerImpl * iImpl

CLbsPrivacyControllerImpl * iImpl [private]

CLbsPrivacyControllerImp* Impl is the internal handle to the Implementation