#include <lbs/lbsprivacycontroller.h>
class CLbsPrivacyController : public CBase |
Public Member Enumerations | |
---|---|
enum | TRequestVerificationResult { ERequestUnknown, ERequestAccepted, ERequestRejected, ERequestIgnore } |
Public Member Functions | |
---|---|
~CLbsPrivacyController() | |
IMPORT_C void | CancelNetworkLocationRequest(TUint) |
IMPORT_C CLbsPrivacyController * | NewL(MLbsPrivacyObserver &) |
IMPORT_C void | RespondNetworkLocationRequest(TUint, TRequestVerificationResult) |
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.
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.
Parameter | Description |
---|---|
aRequestId | The Id of the network location request (MT-LR) to cancel. |
IMPORT_C CLbsPrivacyController * | NewL | ( | MLbsPrivacyObserver & | aObserver | ) | [static] |
Standard Symbian OS two-phase constructor.
Parameter | Description |
---|---|
aObserver | Reference to an observer that will be notified when a network location request is recieved by the LBS system. |
Returns: A new CLbsPrivacyController object.
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.
See also: CLbsPrivacyController::TRequestVerificationResult MLbsPrivacyObserver::ProcessNetworkLocationRequest
Parameter | Description |
---|---|
aRequestId | Identifies the request within the LBS system. |
aResult | The response to the network location request. |