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.
The code below shows how the observer class can respond to privacy requests by calling CLbsPrivacyController::RespondNetworkLocationRequest().
// Send a privacy response to the LBS subsystem void CMyLbsPrivacyControllerObserver::SendResponse(TUint aRequestId, CLbsPrivacyController::TRequestVerificationResult aResult) { // aRequestId is the ID of a privacy request that was previously received iController->RespondNetworkLocationRequest(aRequestId, aResult); }
The code below shows how the observer class can cancel privacy verification requests by calling CLbsPrivacyController::CancelNetworkLocationRequest().
There is no guarantee that a privacy request will be cancelled by calling CLbsPrivacyController::CancelNetworkLocationRequest(). If a privacy request was first accepted and then later cancelled by a Privacy Controller, the network may accept the request before the cancel message is processed. The sequence diagrams in LBS Privacy Controllerr describe this situation in more detail.
// Cancel a privacy response void CMyLbsPrivacyControllerObserver::CancelRequest(TUint aRequestId) { // aRequestId is the ID of a privacy request that was previously received iController->CancelNetworkLocationRequest(aRequestId); }
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.