sl@0: /* sl@0: * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of the License "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: /** sl@0: @file sl@0: @test sl@0: */ sl@0: sl@0: sl@0: #if (!defined UPSQUERRY_STEP_H) sl@0: #define UPSQUERRY_STEP_H sl@0: #include sl@0: #include sl@0: #include "tupsintegstepbase.h" sl@0: #include "tups_clientapi_sysserver.h" sl@0: #include "tupsproperty.h" sl@0: sl@0: class TServiceRequestParameters sl@0: { sl@0: public: sl@0: TServiceRequestParameters(); sl@0: TInt iServiceUID; sl@0: TBuf<30> iServerName; sl@0: TBuf<60> iDestination; sl@0: TInt iExpectedError; sl@0: TBuf8<50> iOpaqueData; sl@0: TBuf<20> iSelectDialogOption; sl@0: TInt iButtonsDisplayed; sl@0: TInt iDialogCreatorInvoked; sl@0: TInt iPolicyEvaluatorInvoked; sl@0: TBuf<30> iAccessGranted; sl@0: TBool iCloseSession; sl@0: TBool iHoldEvaluatorOpen; sl@0: TBool iHoldPrepareDialogOpen; sl@0: TBool iHoldDisplayDialogOpen; sl@0: TInt iRequestDurationThreshold; sl@0: TBool iLeaveDialog; sl@0: TBool iLeaveEvaluator; sl@0: TBool iCancelUpsRequest; sl@0: TBool iPlatSecPass; sl@0: TBool iForcePrompt; sl@0: TInt iExpectedEvaluatorInfo; sl@0: TInt iSelectFingerprint; sl@0: TBuf<60> iWaitUntilFileAppears; sl@0: }; sl@0: sl@0: class COpenSession sl@0: { sl@0: public: sl@0: static COpenSession* NewL(const TPtrC& aServerName); sl@0: void ConstructL(const TPtrC& aServerName); sl@0: ~COpenSession(); sl@0: TBuf<30> iServerName; sl@0: RUpsTestServ* iPointerToServer; sl@0: RUpsTestSession* iPointerToSession; sl@0: }; sl@0: sl@0: sl@0: class CUpsClientStep : public CTUpsIntegStepBase sl@0: { sl@0: public: sl@0: CUpsClientStep(); sl@0: ~CUpsClientStep(); sl@0: virtual TVerdict doTestStepPreambleL(); sl@0: virtual TVerdict doTestStepL(); sl@0: virtual TVerdict doTestStepPostambleL(); sl@0: sl@0: sl@0: TBool FindOpenSession(const TDesC& aServerName,TInt &position); sl@0: RUpsTestSession* GetSessionToServerL(const TDesC& aServerName); sl@0: void CloseSessionL(const TDesC& aServerName); sl@0: void CloseAllOpenSessions(); sl@0: void SetTestDataL(TInt aIndex); sl@0: void SetClientStatusCompleteL(); sl@0: TUpsDecision StringToTUpsDecision(const TPtrC& aString); sl@0: TPtrC TUpsDecisionToString(TUpsDecision aDecision); sl@0: TInt ButtonToInt(const TPtrC& aButton); sl@0: TBool CheckResultsL(TInt aIndex); sl@0: TBool CheckDialogCreatorResultsL(TInt aIndex); sl@0: TBool CheckPolicyEvaluatorResultsL(TInt aIndex); sl@0: void HoldClientL(void); sl@0: sl@0: // Array containing pointers to open sessions sl@0: // maps server name to pointer to session sl@0: RArray iArraySessionsInUse; sl@0: sl@0: public: sl@0: // This array will hold all the services to be requested. sl@0: RArray iArraySersToRequest; sl@0: sl@0: TUpsTestServiceRequestData iRequestData; sl@0: TUpsTestServiceReturn iReturnData; sl@0: sl@0: CUpsProperty* iPropertyReader; sl@0: TInt iStepRepeat; sl@0: TInt iServerId; sl@0: TName iTEFServerName; sl@0: TInt32 iExpectedClientSid; sl@0: TInt iHoldClientStepKey; sl@0: sl@0: }; sl@0: sl@0: _LIT(KUPSClientStep,"UPSClientStep"); sl@0: sl@0: #endif