authorisation/userpromptservice/test/tups/src/tupsdbmanagementstep.h
changeset 8 35751d3474b7
child 15 da2ae96f639b
equal deleted inserted replaced
2:675a964f4eb5 8:35751d3474b7
       
     1 /*
       
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     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".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 /**
       
    20  @file  
       
    21  @test
       
    22 */
       
    23  
       
    24 #if (!defined __UPSDB_STEP_H__)
       
    25 #define __UPSDB_STEP_H__
       
    26 #include <test/testexecutestepbase.h>
       
    27 #include "tupsintegstepbase.h"
       
    28 #include <test/tups_clientapi_sysserver.h>
       
    29 #include "tupsproperty.h"
       
    30 #include <ups/upsclient.h>
       
    31 using namespace UserPromptService;
       
    32 
       
    33 /**
       
    34 Class for storing a single instance of a UPS Database Request
       
    35 */
       
    36 class CUpsDbRequest
       
    37 	{
       
    38 public:
       
    39 	static CUpsDbRequest* NewL();
       
    40 	~CUpsDbRequest();
       
    41 	
       
    42 	TBuf<30>	iOperation;
       
    43 	TInt		iClientSid;
       
    44 	TInt 		iEvaluatorId;
       
    45 	TInt		iServiceId;
       
    46 	TInt		iServerSid;
       
    47 	TBuf8<32>	iFingerprint;
       
    48 	TBuf8<50>	iClientEntity;
       
    49 	TBuf<60>	iDescription;	
       
    50 	TBuf<3>		iDecisionResult;
       
    51 	TInt		iMajorPolicyVersion;
       
    52 	TInt		iRecordId;
       
    53 	TInt		iEvaluatorInfo;
       
    54 	TInt		iExpectedDecisionCount;
       
    55 	
       
    56 	/**
       
    57 	 * Pointer to the Decision Filter object
       
    58 	 */
       
    59 	CDecisionFilter* iDecisionFilter;	
       
    60 	
       
    61 protected:
       
    62 	CUpsDbRequest();
       
    63 	void ConstructL();
       
    64 	};
       
    65 
       
    66 
       
    67 class CUPSDbManagementStep : public CTUpsIntegStepBase
       
    68 	{
       
    69 public:
       
    70 	CUPSDbManagementStep();
       
    71 	~CUPSDbManagementStep();
       
    72 	virtual TVerdict doTestStepPreambleL();
       
    73 	virtual TVerdict doTestStepL();
       
    74 	virtual TVerdict doTestStepPostambleL();
       
    75 	TBool CheckDecisionRecordL(TInt aIndex, const CDecisionRecord& aRecord);
       
    76 	HBufC8* StringToHexLC(const TDes8 &aString);
       
    77 	HBufC8* StringToBinaryLC(const TDes8 &aString);
       
    78 
       
    79 protected:
       
    80 	// This array will hold all the request data and corresponding Decision Filter
       
    81 	RPointerArray<CUpsDbRequest>	iArraySersToRequest; 
       
    82 	RUpsManagement 					iUpsManager;
       
    83 	TInt							iStepRepeat;
       
    84 	TName 							iTEFServerName;
       
    85 	TInt32 							iExpectedClientSid;
       
    86 	};
       
    87 	
       
    88 _LIT(KUPSDbManagementStep,"UPSDbManagementStep");
       
    89 
       
    90 #endif
       
    91