class CPosNetworkPrivacy : public CBase |
Main class for handling network privacy.
This class controls the access to the Privacy Framework. It contains methods for handling privacy for location requests from the network.
This class also contains functions for configuring the Privacy Framework connection.
In some functions, the client can acquire a request ID. This ID represents the location request. In other functions the request ID is required as an input parameter to specify which location request it is connected to.
Public Member Functions | |
---|---|
~CPosNetworkPrivacy() | |
IMPORT_C void | CancelVerifyLocationRequest(TInt) |
IMPORT_C void | CancelVerifyLocationRequest(TInt, TCancelReason) |
IMPORT_C TTimeIntervalMicroSeconds32 | ConnectionTimeout() |
IMPORT_C CPosNetworkPrivacy * | NewL() |
IMPORT_C void | NotifyLocationRequestL(const CPosNetworkPrivacyRequestInfo &, TInt &) |
IMPORT_C void | NotifyVerificationTimeoutL(const CPosNetworkPrivacyRequestInfo &, TInt, TRequestDecision) |
IMPORT_C void | PositionUpdateL(TInt, const TPosition &) |
IMPORT_C void | SetConnectionTimeout(TTimeIntervalMicroSeconds32) |
IMPORT_C void | VerifyLocationRequestL(const CPosNetworkPrivacyRequestInfo &, TInt &, MPosVerificationObserver &) |
IMPORT_C void | VerifyLocationRequestL(const CPosNetworkPrivacyRequestInfo &, TInt &, MPosVerificationObserver &, TRequestDecision) |
Private Member Functions | |
---|---|
CPosNetworkPrivacy() | |
CPosNetworkPrivacy(const CPosNetworkPrivacy &) | |
void | ConstructL() |
CPosNetworkPrivacy & | operator=(const CPosNetworkPrivacy &) |
Public Member Enumerations | |
---|---|
enum | TCancelReason { ECancelReasonNotAvailable = 0, ECancelReasonTimeout } |
enum | TRequestDecision { EDecisionNotAvailable = 0, EDecisionRejected, EDecisionAccepted } |
enum | TRequestorType { ERequestorClientName, ERequesterId } |
Private Attributes | |
---|---|
CPosNetworkPrivacyImpl * | iImpl |
CPosNetworkPrivacy | ( | const CPosNetworkPrivacy & | ) | [private] |
const CPosNetworkPrivacy & |
IMPORT_C void | CancelVerifyLocationRequest | ( | TInt | aRequestId | ) |
TInt aRequestId | ID of the verification request to cancel. |
IMPORT_C void | CancelVerifyLocationRequest | ( | TInt | aRequestId, |
TCancelReason | aCancelReason | |||
) |
Cancels a verification request.
If no outstanding request with the specified ID exists, this call will be ignored.
This overload of the cancel function specifies the reason for canceling the verification request.
TInt aRequestId | ID of the verification request to cancel. |
TCancelReason aCancelReason | The cancel reason. |
IMPORT_C TTimeIntervalMicroSeconds32 | ConnectionTimeout | ( | ) | const |
Gets the timeout for the LBS subsystem connection.
If no client activity is registered, the LBS subsystem will be released after the timeout. The connection will be automatically restored when it is needed.
IMPORT_C void | NotifyLocationRequestL | ( | const CPosNetworkPrivacyRequestInfo & | aRequestInfo, |
TInt & | aRequestId | |||
) |
Called to notify the phone user of the location request.
If this function is called and CancelVerifyLocationRequest has already been called, the LBS subsystem will treat it as a new location request.
const CPosNetworkPrivacyRequestInfo & aRequestInfo | Network specific privacy request information. |
TInt & aRequestId | ID of the request. This can be used to perform more operations on the same request, e.g. PositionUpdateL. |
IMPORT_C void | NotifyVerificationTimeoutL | ( | const CPosNetworkPrivacyRequestInfo & | aRequestInfo, |
TInt | aRequestId, | |||
TRequestDecision | aRequestDecision | |||
) |
Called to report that a verification timed out.
This function is called by the client if the timeout occurs after the verification in the LBS subsystem was complete AND the timeout policy is different than the decision returned by LBS. It should not be called if * CancelVerifyLocationRequest was used to report the timeout during the verification.
This means that if the verification request is running, the timeout is reported by calling CancelVerifyLocationRequest(requestId, ECancelReasonTimeout) and if the verification is complete, the timeout is reported using this function.
const CPosNetworkPrivacyRequestInfo & aRequestInfo | Network specific privacy request information. |
TInt aRequestId | ID obtained in the verification request. |
TRequestDecision aRequestDecision | The request decision made by the network. If the value is EDecisionNotAvailable, this function will panic. |
IMPORT_C void | PositionUpdateL | ( | TInt | aRequestId, |
const TPosition & | aPosition | |||
) |
Reports the position acquired in a location request.
This function requires that VerifyLocationRequestL or NotifyLocationRequestL has previously been called for the same location request. The client must therefore specify the request ID acquired in the verification/notification.
If the request ID does not correspond to a known request, this call will be ignored.
IMPORT_C void | SetConnectionTimeout | ( | TTimeIntervalMicroSeconds32 | aTimeout | ) |
Sets a timeout for the connection to the LBS subsystem.
If no client activity is registered, the LBS subsystem connection will be released after the timeout. The connection will be automatically restored when it is needed.
TTimeIntervalMicroSeconds32 aTimeout | The connection timeout in microseconds. |
IMPORT_C void | VerifyLocationRequestL | ( | const CPosNetworkPrivacyRequestInfo & | aRequestInfo, |
TInt & | aRequestId, | |||
MPosVerificationObserver & | aObserver | |||
) |
Verifies a location request.
This function is asynchronous. On completion, MPosVerificationObserver::HandleVerifyComplete will be called in the passed observer object. The completion code and request ID are passed as parameters.
This function supports multiple outstanding asynchronous requests.
This call completes with code KErrNone if the location request is accepted, KErrAccessDenied if the location request is rejected, otherwise one of the system wide error codes.
The request can be cancelled by calling CancelVerifyLocationRequest with the request ID which was returned by the VerifyLocationRequestL call. In this case the observer will not be notified.
const CPosNetworkPrivacyRequestInfo & aRequestInfo | Network specific privacy request information. |
TInt & aRequestId | ID of the request. This can be used to cancel the request or to perform more operations on the same request, e.g. PositionUpdateL . |
MPosVerificationObserver & aObserver | An object observing the completion of the verification request. |
IMPORT_C void | VerifyLocationRequestL | ( | const CPosNetworkPrivacyRequestInfo & | aRequestInfo, |
TInt & | aRequestId, | |||
MPosVerificationObserver & | aObserver, | |||
TRequestDecision | aTimeoutStrategy | |||
) |
Verifies a location request. In this overload of the verification function, the caller can specify what the decision will be if the network thinks the verification takes too long. The decision is used when the verification is cancelled by the network.
const CPosNetworkPrivacyRequestInfo & aRequestInfo | Network specific privacy request information. |
TInt & aRequestId | ID of the request. This can be used to cancel the request or to perform more operations on the same request, e.g. PositionUpdateL. |
MPosVerificationObserver & aObserver | An object observing the completion of the verification request. |
TRequestDecision aTimeoutStrategy | Specifies whether the request will be accepted or rejected if the verification times out. |
CPosNetworkPrivacy & | operator= | ( | const CPosNetworkPrivacy & | ) | [private] |
const CPosNetworkPrivacy & |
When canceling a verification request, this enum can be used to specify why the verification was cancelled.
ECancelReasonNotAvailable = 0 |
The cancel reason is not given. |
ECancelReasonTimeout |
Verification request timed out. |
Whether a location request is accepted or rejected.
EDecisionNotAvailable = 0 |
Location request decision is not specified. |
EDecisionRejected |
Location request is rejected. |
EDecisionAccepted |
Location request is accepted. |
This enum specifies whether the requestor is a contact or a service.
ERequestorClientName |
The requestor is a service. |
ERequesterId |
The requestor is a contact. |
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.