First public contribution.
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
15 * Interface definition for UPS policy evaluator ECOM plug-in.
26 #ifndef POLICYEVALUATOR_H
27 #define POLICYEVALUATOR_H
31 #include <ups/ups.hrh>
32 #include <ups/cliententity.h>
33 #include <ups/fingerprint.h>
34 #include <ups/policy.h>
35 #include <ups/policyevaluator.h>
36 #include <ups/promptrequest.h>
39 namespace UserPromptService
45 class CDecisionRecord;
48 Abstract base class for a policy evaluator ECOM plug-in.
49 Policy evaluators are primarily responsible for generating the fingerprints
50 used to locate previous decision records related to the current request.
52 class CPolicyEvaluator : public CActive
55 IMPORT_C static CPolicyEvaluator* NewL(const TUid& aPolicyEvaluatormplementationId);
58 Asynchronously generates an ordered list the fingerprints used to locate
59 decision records related to the request.\n
60 A fingerprint is typically a hash created from the Destination
61 and OpaqueData values in the request structure e.g. Hash(phone number).
63 - Fingerprints should be ordered most-specific to least-specific.
64 - Fingerprints are not required to be a hash or a fixed length.
65 - The policy evaluator may also specify the entity within the client process to which
66 a decision applies e.g. the id of the script or midlet.
67 - The policy evaluator may also generate an opaque data structure for use by the
68 dialog creator object.
70 @param aRequest The parameters supplied by the system server.
71 @param aPolicy The policy being evaluated.
72 @param aFingerprints An ordered set of fingerprints to match against decision records.
73 This is only required if the result is ECheckDatabase\n
75 @param aClientEntity Optionally, identifies an entity within the client process e.g. a script.
76 This is only used if the result is ECheckDatabase.\n
77 Ownership is NOT transferred to the caller.\n
79 @param aDialogCreatorParams Optional opaque data to pass to the dialog creator if a prompt is displayed.
80 Ownership is NOT transferred to the caller.\n
82 @param aStatus The request object to complete once the fingerprints have been generated.
84 virtual void GenerateFingerprints(
85 const CPromptRequest& aRequest, const CPolicy& aPolicy,
86 RPointerArray<CFingerprint>& aFingerprints, const CClientEntity*& aClientEntity,
87 const TAny*& aDialogCreatorParams,
88 TRequestStatus& aStatus) = 0;
90 IMPORT_C virtual TBool ForcePromptL(const CDecisionRecord& aDecision, TUint& aNewEvaluatorInfo);
91 IMPORT_C TInt GetExtension(TUint aExtensionId, TAny*& a0, TAny* a1);
92 IMPORT_C ~CPolicyEvaluator();
94 IMPORT_C CPolicyEvaluator();
95 IMPORT_C virtual TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1);
98 TUid iDtor_ID_Key; // Required by ECOM
102 #endif // POLICYEVALUATOR_H