UserPromptService::CPolicyEvaluator Class Reference

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.

Inherits from

Constructor & Destructor Documentation

CPolicyEvaluator()

IMPORT_CCPolicyEvaluator()[protected]

Constructor

~CPolicyEvaluator()

IMPORT_C~CPolicyEvaluator()

Destructor

Member Functions Documentation

Extension_(TUint, TAny *&, TAny *)

IMPORT_C TIntExtension_(TUintaExtensionId,
TAny *&a0,
TAny *a1
)[protected, virtual]

Parameters

TUint aExtensionId
TAny *& a0
TAny * a1

ForcePromptL(const CDecisionRecord &, TUint &)

IMPORT_C TBoolForcePromptL(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.

Parameters

const CDecisionRecord & aDecisionThe first decision record that matched a fingerprint generated by CPolicyEvaluator::GenerateFingerprints
TUint & aNewEvaluatorInfoA 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.

GenerateFingerprints(const CPromptRequest &, const CPolicy &, RPointerArray< CFingerprint > &, const CClientEntity *&, const TAny *&, TRequestStatus &)

voidGenerateFingerprints(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.

Parameters

const CPromptRequest & aRequestThe parameters supplied by the system server.
const CPolicy & aPolicyThe policy being evaluated.
RPointerArray< CFingerprint > & aFingerprintsAn ordered set of fingerprints to match against decision records. This is only required if the result is ECheckDatabase (OUT parameter)
const CClientEntity *& aClientEntityOptionally, 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 *& aDialogCreatorParamsOptional opaque data to pass to the dialog creator if a prompt is displayed. Ownership is NOT transferred to the caller. (OUT parameter)
TRequestStatus & aStatusThe request object to complete once the fingerprints have been generated.

GetExtension(TUint, TAny *&, TAny *)

IMPORT_C TIntGetExtension(TUintaExtensionId,
TAny *&a0,
TAny *a1
)

Allows extension of this interface. Calls Extension_

Parameters

TUint aExtensionIdThe UID of the interface to instantiate.
TAny *& a0A reference to a pointer that should be set to the newly instantiated object.
TAny * a1Data specific to the instantiate of the specified interface.

NewL(const TUid &)

IMPORT_C CPolicyEvaluator *NewL(const TUid &aPolicyEvaluatormplementationId)[static]

Creates a new policy evaluator.

Parameters

const TUid & aPolicyEvaluatormplementationIdThe UID of the policy evaluator implemenation as specified in the policy file.

Member Data Documentation

TUid iDtor_ID_Key

TUid iDtor_ID_Key[private]

TAny * iReserved

TAny *iReserved[private]