class UserPromptService::CPolicyEvaluator : public CActive |
Abstract base class for a policy evaluator ECOM plug-in. Policy evaluators are primarily responsible for generating the fingerprints used to locate previous decision records related to the current request.
Public Member Functions | |
---|---|
~CPolicyEvaluator () | |
IMPORT_C TBool | ForcePromptL (const CDecisionRecord &, TUint &) |
void | GenerateFingerprints (const CPromptRequest &, const CPolicy &, RPointerArray < CFingerprint > &, const CClientEntity *&, const TAny *&, TRequestStatus &) |
IMPORT_C TInt | GetExtension ( TUint , TAny *&, TAny *) |
IMPORT_C CPolicyEvaluator * | NewL (const TUid &) |
Protected Member Functions | |
---|---|
CPolicyEvaluator () | |
IMPORT_C TInt | Extension_ ( TUint , TAny *&, TAny *) |
Inherited Enumerations | |
---|---|
CActive:TPriority |
Private Attributes | |
---|---|
TUid | iDtor_ID_Key |
TAny * | iReserved |
Inherited Attributes | |
---|---|
CActive::iStatus |
IMPORT_C TInt | Extension_ | ( | TUint | aExtensionId, |
TAny *& | a0, | |||
TAny * | a1 | |||
) | [protected, virtual] |
IMPORT_C TBool | ForcePromptL | ( | const CDecisionRecord & | aDecision, |
TUint & | aNewEvaluatorInfo | |||
) | [virtual] |
If a decision record matching one of the fingerprints created by CPolicyEvaluator::GenerateFingerprints was found then this method will be invoked. This allows the policy evaluator to instruct the user prompt service to ignore the result of the decision record and prompt the user. This functionality could be used to trigger periodic prompts if an application makes very high usage of a service e.g. after 100 SMS messages have been sent. The usage could be tracked externally or via the evaluatorInfo field in the decision record. N.B. The User Prompt Service does not mandate the contents or usage of the evaluatorInfo field.
The default implementation CPolicyEvaluator::ForcePromptL always returns EFalse and does not modifiy aNewEvaluatorInfo.
const CDecisionRecord & aDecision | The first decision record that matched a fingerprint generated by CPolicyEvaluator::GenerateFingerprints |
TUint & aNewEvaluatorInfo | A reference to a copy of the evaluatorInfo field from the decision record. If this method modifies this value then this field will be updated in the decision record regardless of whether a prompt is required. |
void | GenerateFingerprints | ( | const CPromptRequest & | aRequest, |
const CPolicy & | aPolicy, | |||
RPointerArray < CFingerprint > & | aFingerprints, | |||
const CClientEntity *& | aClientEntity, | |||
const TAny *& | aDialogCreatorParams, | |||
TRequestStatus & | aStatus | |||
) | [pure virtual] |
Asynchronously generates an ordered list the fingerprints used to locate decision records related to the request. A fingerprint is typically a hash created from the Destination and OpaqueData values in the request structure e.g. Hash(phone number).
Fingerprints should be ordered most-specific to least-specific.
Fingerprints are not required to be a hash or a fixed length.
The policy evaluator may also specify the entity within the client process to which a decision applies e.g. the id of the script or midlet.
The policy evaluator may also generate an opaque data structure for use by the dialog creator object.
const CPromptRequest & aRequest | The parameters supplied by the system server. |
const CPolicy & aPolicy | The policy being evaluated. |
RPointerArray < CFingerprint > & aFingerprints | An ordered set of fingerprints to match against decision records. This is only required if the result is ECheckDatabase (OUT parameter) |
const CClientEntity *& aClientEntity | Optionally, identifies an entity within the client process e.g. a script. This is only used if the result is ECheckDatabase. Ownership is NOT transferred to the caller. (OUT parameter) |
const TAny *& aDialogCreatorParams | Optional opaque data to pass to the dialog creator if a prompt is displayed. Ownership is NOT transferred to the caller. (OUT parameter) |
TRequestStatus & aStatus | The request object to complete once the fingerprints have been generated. |
IMPORT_C TInt | GetExtension | ( | TUint | aExtensionId, |
TAny *& | a0, | |||
TAny * | a1 | |||
) |
Allows extension of this interface. Calls Extension_
IMPORT_C CPolicyEvaluator * | NewL | ( | const TUid & | aPolicyEvaluatormplementationId | ) | [static] |
Creates a new policy evaluator.
const TUid & aPolicyEvaluatormplementationId | The UID of the policy evaluator implemenation as specified in the policy file. |
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.