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.
Public Member Functions | |
---|---|
~CLbsPrivacyController() | |
IMPORT_C void | CancelNetworkLocationRequest(TUint) |
IMPORT_C CLbsPrivacyController * | NewL(MLbsPrivacyObserver &) |
IMPORT_C void | RespondNetworkLocationRequest(TUint, TRequestVerificationResult) |
Private Member Functions | |
---|---|
CLbsPrivacyController() | |
void | ConstructL(MLbsPrivacyObserver &) |
Public Member Enumerations | |
---|---|
enum | TRequestVerificationResult { ERequestUnknown = 0, ERequestAccepted, ERequestRejected, ERequestIgnore } |
Private Attributes | |
---|---|
CLbsPrivacyControllerImpl * | iImpl |
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.
TUint aRequestId | The Id of the network location request (MT-LR) to cancel. |
void | ConstructL | ( | MLbsPrivacyObserver & | aObserver | ) | [private] |
Standard ConstructL for CPrivacyController. It creates the object that implements the functionality for CLbsPrivacyObserver.
MLbsPrivacyObserver & aObserver | Reference to an observer that will be notified when a network location request is recieved by the LBS system. |
IMPORT_C CLbsPrivacyController * | NewL | ( | MLbsPrivacyObserver & | aObserver | ) | [static] |
Standard Symbian OS two-phase constructor.
MLbsPrivacyObserver & aObserver | Reference to an observer that will be notified when a network location request is recieved by the LBS system. |
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.
TUint aRequestId | Identifies the request within the LBS system. |
TRequestVerificationResult aResult | The response to the network location request. |
The user response to the network location request dialog.
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. |
CLbsPrivacyControllerImpl * | iImpl | [private] |
CLbsPrivacyControllerImp* Impl is the internal handle to the Implementation
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.