1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/security/authorisation/userpromptservice/test/tups/src/tupsdbmanagementstep.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,91 @@
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 +*
1.19 +*/
1.20 +
1.21 +
1.22 +/**
1.23 + @file
1.24 + @test
1.25 +*/
1.26 +
1.27 +#if (!defined __UPSDB_STEP_H__)
1.28 +#define __UPSDB_STEP_H__
1.29 +#include <test/testexecutestepbase.h>
1.30 +#include "tupsintegstepbase.h"
1.31 +#include "tups_clientapi_sysserver.h"
1.32 +#include "tupsproperty.h"
1.33 +#include <ups/upsclient.h>
1.34 +using namespace UserPromptService;
1.35 +
1.36 +/**
1.37 +Class for storing a single instance of a UPS Database Request
1.38 +*/
1.39 +class CUpsDbRequest
1.40 + {
1.41 +public:
1.42 + static CUpsDbRequest* NewL();
1.43 + ~CUpsDbRequest();
1.44 +
1.45 + TBuf<30> iOperation;
1.46 + TInt iClientSid;
1.47 + TInt iEvaluatorId;
1.48 + TInt iServiceId;
1.49 + TInt iServerSid;
1.50 + TBuf8<32> iFingerprint;
1.51 + TBuf8<50> iClientEntity;
1.52 + TBuf<60> iDescription;
1.53 + TBuf<3> iDecisionResult;
1.54 + TInt iMajorPolicyVersion;
1.55 + TInt iRecordId;
1.56 + TInt iEvaluatorInfo;
1.57 + TInt iExpectedDecisionCount;
1.58 +
1.59 + /**
1.60 + * Pointer to the Decision Filter object
1.61 + */
1.62 + CDecisionFilter* iDecisionFilter;
1.63 +
1.64 +protected:
1.65 + CUpsDbRequest();
1.66 + void ConstructL();
1.67 + };
1.68 +
1.69 +
1.70 +class CUPSDbManagementStep : public CTUpsIntegStepBase
1.71 + {
1.72 +public:
1.73 + CUPSDbManagementStep();
1.74 + ~CUPSDbManagementStep();
1.75 + virtual TVerdict doTestStepPreambleL();
1.76 + virtual TVerdict doTestStepL();
1.77 + virtual TVerdict doTestStepPostambleL();
1.78 + TBool CheckDecisionRecordL(TInt aIndex, const CDecisionRecord& aRecord);
1.79 + HBufC8* StringToHexLC(const TDes8 &aString);
1.80 + HBufC8* StringToBinaryLC(const TDes8 &aString);
1.81 +
1.82 +protected:
1.83 + // This array will hold all the request data and corresponding Decision Filter
1.84 + RPointerArray<CUpsDbRequest> iArraySersToRequest;
1.85 + RUpsManagement iUpsManager;
1.86 + TInt iStepRepeat;
1.87 + TName iTEFServerName;
1.88 + TInt32 iExpectedClientSid;
1.89 + };
1.90 +
1.91 +_LIT(KUPSDbManagementStep,"UPSDbManagementStep");
1.92 +
1.93 +#endif
1.94 +