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_C CPolicyEvaluator ( ) [protected]

Constructor

~CPolicyEvaluator()

IMPORT_C ~CPolicyEvaluator ( )

Destructor

Member Functions Documentation

Extension_(TUint, TAny *&, TAny *)

IMPORT_C TInt Extension_ ( TUint aExtensionId,
TAny *& a0,
TAny * a1
) [protected, virtual]

Parameters

TUint aExtensionId
TAny *& a0
TAny * a1

ForcePromptL(const CDecisionRecord &, TUint &)

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.

Parameters

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.

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

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.

Parameters

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.

GetExtension(TUint, TAny *&, TAny *)

IMPORT_C TInt GetExtension ( TUint aExtensionId,
TAny *& a0,
TAny * a1
)

Allows extension of this interface. Calls Extension_

Parameters

TUint aExtensionId The UID of the interface to instantiate.
TAny *& a0 A reference to a pointer that should be set to the newly instantiated object.
TAny * a1 Data 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 & aPolicyEvaluatormplementationId The 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]