os/security/authorisation/userpromptservice/policies/test/testpolicyevaluator/source/testpolicyevaluator.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/security/authorisation/userpromptservice/policies/test/testpolicyevaluator/source/testpolicyevaluator.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,75 @@
     1.4 +/*
     1.5 +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of the License "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +* refpolicyevaluator.h
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +/**
    1.24 + @file
    1.25 + @internalTechnology 
    1.26 + @test 
    1.27 +*/
    1.28 +
    1.29 +#ifndef TESTPOLICYEVALUATOR_H
    1.30 +#define TESTPOLICYEVALUATOR_H
    1.31 +
    1.32 +#include <e32base.h>
    1.33 +#include <e32cmn.h>
    1.34 +#include <hash.h>
    1.35 +#include <ups/policyevaluator.h>
    1.36 +
    1.37 +using namespace UserPromptService;
    1.38 +
    1.39 +/**
    1.40 +Test/Reference implementation of a policy evaluator.
    1.41 +*/
    1.42 +class CTestPolicyEvaluator : public CPolicyEvaluator 
    1.43 +	{
    1.44 +public:
    1.45 +	static CPolicyEvaluator* CreatePolicyEvaluatorL();
    1.46 +
    1.47 +	// From UserPromptService::CPolicyEvaluator
    1.48 +	void GenerateFingerprints(const CPromptRequest& aRequest, const CPolicy& aPolicy, 
    1.49 +		RPointerArray<CFingerprint>& aFingerprints, const CClientEntity*& aClientEntity, 
    1.50 +		const TAny*& aDialogCreatorParams, 
    1.51 +		TRequestStatus& aStatus);
    1.52 +		
    1.53 +	TBool ForcePromptL(const CDecisionRecord& aDecision, TUint& aNewEvaluatorInfo);
    1.54 +		
    1.55 +protected:
    1.56 +	// From CActive
    1.57 +	void DoCancel();
    1.58 +	void RunL();
    1.59 +	TInt RunError(TInt aError);
    1.60 +
    1.61 +	~CTestPolicyEvaluator();
    1.62 +private:		
    1.63 +	CTestPolicyEvaluator();	
    1.64 +	void ConstructL();
    1.65 +	void SetClientEntityL();	
    1.66 +
    1.67 +	const CPromptRequest* iRequest;
    1.68 +	const CPolicy* iPolicy;
    1.69 +	RPointerArray<CFingerprint>* iFingerprints;
    1.70 +	CClientEntity* iClientEntity;
    1.71 +	const CClientEntity** iClientEntityPtr;	///< UPS server's pointer to client entity
    1.72 +	
    1.73 +	TRequestStatus* iClientStatus;	///< Request object to complete after generating fingerprints
    1.74 +	CMessageDigest* iDigest;		///< Message digest used to create fingerprint
    1.75 +	};
    1.76 +
    1.77 +#endif // TESTPOLICYEVALUATOR_H
    1.78 +