class CPosPrivacyNotifier : public CBase |
Base class for LBS Privacy Query & Notify (Q&N) privacy notifiers.
A privacy notifier is a UI plug-in which handles privacy query and notification requests.
This class contains declarations for event methods that must be implemented by the notifier in order to receive information about new requests or cancelled requests.
It also contains methods for accessing information about a request and for completing a request.
Public Member Functions | |
---|---|
~CPosPrivacyNotifier () | |
IMPORT_C TPosVerifyCancelReason | CancelReason () |
IMPORT_C TBool | CheckClientSecureId ( TSecureId ) |
IMPORT_C void | CompleteAllRequests ( TInt ) |
IMPORT_C void | CompleteRequest ( TPosQNRequestId , TInt ) |
IMPORT_C TPosQNRequestId | CurrentRequest () |
IMPORT_C void | GetRequestsL ( RArray < TPosQNRequestId > &) |
void | HandleAllRequestCancelled () |
void | HandleNewRequestL ( TPosQNRequestId ) |
void | HandleRequestCancelled ( TPosQNRequestId ) |
IMPORT_C TPosRequestDecision | LocationRequestDecision () |
IMPORT_C TPosNotificationReason | NotificationReason () |
IMPORT_C MEikSrvNotifierBase2 * | NotifierBase () |
IMPORT_C TPosRequestDecision | QueryTimeoutStrategy () |
IMPORT_C TPosRequestSource | RequestSource () |
IMPORT_C TRequestType | RequestTypeL ( TPosQNRequestId ) |
IMPORT_C TInt | RequestorCountL () |
IMPORT_C CPosRequestor * | RequestorLC ( TInt ) |
IMPORT_C void | SetCurrentRequestL ( TPosQNRequestId ) |
Protected Member Functions | |
---|---|
CPosPrivacyNotifier () | |
IMPORT_C void | BaseConstructL ( TUid , TInt ) |
Private Member Functions | |
---|---|
CPosPrivacyNotifier (const CPosPrivacyNotifier &) | |
CPosPrivacyNotifier & | operator= (const CPosPrivacyNotifier &) |
Public Member Enumerations | |
---|---|
enum | TRequestType { EQuery = 0, ENotification } |
Private Attributes | |
---|---|
CPosPrivacyNotifierExtension * | iExtension |
IMPORT_C | CPosPrivacyNotifier | ( | ) | [protected] |
Default constructor.
This constructor assumes that the notifier only supports EBasicCapabilities, i.e. the notifier supports queries but only notifications of accepted requests are supported. If the notifier is more advanced, the overloaded constructor should be used.
CPosPrivacyNotifier | ( | const CPosPrivacyNotifier & | ) | [private] |
const CPosPrivacyNotifier & |
IMPORT_C void | BaseConstructL | ( | TUid | aChannel, |
TInt | aPriority | |||
) | [protected] |
Symbian 2nd phase constructor. Must be called first thing during construction.
The notifier must specify channel and priority. These attributes are defined by the Notifier Framework in eiknotapi.h.
The different priority values are defined in MEikSrvNotifierBase2::TNotifierPriority .
IMPORT_C TPosVerifyCancelReason | CancelReason | ( | ) | const |
Retrieves the cancel reason.
Cancel reason can only be retrieved when HandleRequestCancelled or HandleAllRequestCancelled is running. If the method is called at another time, it will return ECancelReasonNotAvailable.
Note that the TCancelReason enum is designed to be extendable, i.e. new values may be added in the future. This means that any unrecognized value must be treated like ECancelReasonNotAvailable.
HandleRequestCancelled() HandleAllRequestCancelled() ECancelReasonNotAvailable TCancelReason
IMPORT_C TBool | CheckClientSecureId | ( | TSecureId | aSecureId | ) |
Checks that the Privacy UI was launched by the expected client.
The caller specifies the secure ID of the expected client and this method returns whether the Privacy UI was launched by that client or not.
TSecureId aSecureId | The secureID of the expected client |
IMPORT_C void | CompleteAllRequests | ( | TInt | aCompletionCode | ) |
This method completes all outstanding requests.
This method can be used to accept or reject all outstanding requests by completing with codes KErrNone or KErrAccessDenied respectively. All notification requests will also be completed with this code.
TInt aCompletionCode | The request completion code. |
IMPORT_C void | CompleteRequest | ( | TPosQNRequestId | aRequestId, |
TInt | aCompletionCode | |||
) |
This method completes a privacy query or notification request.
KErrNone if the phone user dismisses the privacy notification
KErrTimedOut if the notification times out.
TPosQNRequestId aRequestId | The ID of the privacy query or notification request to complete. |
TInt aCompletionCode | The request completion code. If the request is a privacy query, the completion code should be one of:KErrNone if query is accepted by the phone user.KErrAccessDenied if query is rejected by the phone user.KErrTimedOut if the query times out. |
IMPORT_C TPosQNRequestId | CurrentRequest | ( | ) | const |
Returns the ID of the current request.
Current request specifies the request which will be accessed when RequestorCountL and RequestorLC are called.
IMPORT_C void | GetRequestsL | ( | RArray < TPosQNRequestId > & | aRequestArray | ) | const |
Returns a list of all outstanding privacy query and notification requests.
If there are no outstanding requests, an empty array will be returned.
RArray < TPosQNRequestId > & aRequestArray | On return, this array will contain all outstanding query and notification requests. |
void | HandleAllRequestCancelled | ( | ) | [pure virtual] |
This method is called to cancel all outstanding requests.
It is not necessary to call CompleteRequest for a cancelled request.
void | HandleNewRequestL | ( | TPosQNRequestId | aRequestId | ) | [pure virtual] |
This method is called when a new privacy query or notification has been requested.
TPosQNRequestId aRequestId | The ID of the new query or notification request. |
void | HandleRequestCancelled | ( | TPosQNRequestId | aRequestId | ) | [pure virtual] |
This method is called when a privacy query or notification request is cancelled.
It is not necessary to call CompleteRequest for a cancelled request.
TPosQNRequestId aRequestId | The ID of the cancelled query or notification request. |
IMPORT_C TPosRequestDecision | LocationRequestDecision | ( | ) | const |
Retrieves whether the location request was accepted or rejected.
For notification requests, this method will return the request decision. For queries, this method will return EPosDecisionNotAvailable.
Before calling this method, current request must first be set by calling SetCurrentRequestL, otherwise this method will return EPosDecisionNotAvailable.
Note that the TPosRequestDecision enum is designed to be extendable, i.e. new values may be added in the future. This means that any unrecognized value must be treated like EPosDecisionNotAvailable.
IMPORT_C TPosNotificationReason | NotificationReason | ( | ) | const |
Retrieves the reason for a notification.
Note that the TPosNotificationReason enum is designed to be extendable, i.e. new values may be added in the future. This means that any unrecognized value must be treated like EPosNotificationReasonNotAvailable. If the notification reason is not known, the notification request should be completed with code KErrNotSupported.
Before calling this method, current request must first be set by calling SetCurrentRequestL, otherwise this method will return EPosNotificationReasonNotAvailable.
EPosNotificationReasonNotAvailable SetCurrentRequestL() TPosNotificationReason
IMPORT_C MEikSrvNotifierBase2 * | NotifierBase | ( | ) | const |
Retrieves a handle to the notifier base.
This handle is needed to populate the notifier base array in the notifier factory method.
IMPORT_C TPosRequestDecision | QueryTimeoutStrategy | ( | ) | const |
Retrieves the timeout strategy for a query.
Timeout strategy specifies what the decision will be if the verification query times out. The decision is either EPosDecisionRejected or EPosDecisionAccepted.
Before calling this method, current request must first be set by calling SetCurrentRequestL.
Timeout strategy can only be retrieved for a query request. If the current request is a notification, this method will return EPosDecisionNotAvailable.
Note that the TPosRequestDecision enum is designed to be extendable, i.e. new values may be added in the future. This means that any unrecognized value must be treated like EPosDecisionNotAvailable.
IMPORT_C TPosRequestSource | RequestSource | ( | ) | const |
Retrieves the source of the location request.
Before calling this method, current request must first be set by calling SetCurrentRequestL.
Note that the TPosRequestSource enum is designed to be extendable, i.e. new values may be added in the future. This means that any unrecognized value must be treated like EPosRequestSourceNotAvailable.
IMPORT_C TRequestType | RequestTypeL | ( | TPosQNRequestId | aRequestId | ) | const |
Checks whether a request is privacy query or notification type.
TPosQNRequestId aRequestId | The ID of the request to check. |
IMPORT_C TInt | RequestorCountL | ( | ) | const |
Returns the number of requestors in the current request.
Before calling this method, current request must first be set by calling SetCurrentRequestL.
IMPORT_C CPosRequestor * | RequestorLC | ( | TInt | aRequestorIndex | ) | const |
Returns basic information about the requestor at a specified index.
Before calling this method, current request must first be set by calling SetCurrentRequestL.
Whether the requestor is a contact or a service can be found by calling CPosRequestor::RequestorType .
If the requestor is a contact, the requestor object can be cast to CPosContactRequestor .
If the requestor is a service, the requestor object can be cast to CPosServiceRequestor .
SetCurrentRequestL() RequestorCountL() CPosContactRequestor CPosServiceRequestor CPosRequestor::RequestorType
TInt aRequestorIndex | The index of the requestor. |
IMPORT_C void | SetCurrentRequestL | ( | TPosQNRequestId | aRequestId | ) |
Sets the request which the notifier wants to read information about.
Current request specifies the request which will be accessed when RequestorCountL and RequestorLC are called.
TPosQNRequestId aRequestId | The ID of the current request. |
CPosPrivacyNotifier & | operator= | ( | const CPosPrivacyNotifier & | ) | [private] |
const CPosPrivacyNotifier & |
Specifies whether the requested dialog should be a query or a notification dialog.
EQuery = 0 |
Query dialog requested. |
ENotification |
Notification dialog requested. |
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.