First public contribution.
2 * Copyright (c) 2007-2010 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.
25 #if (!defined UPSQUERRY_STEP_H)
26 #define UPSQUERRY_STEP_H
27 #include <test/testexecutestepbase.h>
29 #include "tupsintegstepbase.h"
30 #include "tups_clientapi_sysserver.h"
31 #include "tupsproperty.h"
33 class TServiceRequestParameters
36 TServiceRequestParameters();
39 TBuf<60> iDestination;
41 TBuf8<50> iOpaqueData;
42 TBuf<20> iSelectDialogOption;
43 TInt iButtonsDisplayed;
44 TInt iDialogCreatorInvoked;
45 TInt iPolicyEvaluatorInvoked;
46 TBuf<30> iAccessGranted;
48 TBool iHoldEvaluatorOpen;
49 TBool iHoldPrepareDialogOpen;
50 TBool iHoldDisplayDialogOpen;
51 TInt iRequestDurationThreshold;
53 TBool iLeaveEvaluator;
54 TBool iCancelUpsRequest;
57 TInt iExpectedEvaluatorInfo;
58 TInt iSelectFingerprint;
59 TBuf<60> iWaitUntilFileAppears;
65 static COpenSession* NewL(const TPtrC& aServerName);
66 void ConstructL(const TPtrC& aServerName);
69 RUpsTestServ* iPointerToServer;
70 RUpsTestSession* iPointerToSession;
74 class CUpsClientStep : public CTUpsIntegStepBase
79 virtual TVerdict doTestStepPreambleL();
80 virtual TVerdict doTestStepL();
81 virtual TVerdict doTestStepPostambleL();
84 TBool FindOpenSession(const TDesC& aServerName,TInt &position);
85 RUpsTestSession* GetSessionToServerL(const TDesC& aServerName);
86 void CloseSessionL(const TDesC& aServerName);
87 void CloseAllOpenSessions();
88 void SetTestDataL(TInt aIndex);
89 void SetClientStatusCompleteL();
90 TUpsDecision StringToTUpsDecision(const TPtrC& aString);
91 TPtrC TUpsDecisionToString(TUpsDecision aDecision);
92 TInt ButtonToInt(const TPtrC& aButton);
93 TBool CheckResultsL(TInt aIndex);
94 TBool CheckDialogCreatorResultsL(TInt aIndex);
95 TBool CheckPolicyEvaluatorResultsL(TInt aIndex);
96 void HoldClientL(void);
98 // Array containing pointers to open sessions
99 // maps server name to pointer to session
100 RArray<COpenSession*> iArraySessionsInUse;
103 // This array will hold all the services to be requested.
104 RArray<TServiceRequestParameters> iArraySersToRequest;
106 TUpsTestServiceRequestData iRequestData;
107 TUpsTestServiceReturn iReturnData;
109 CUpsProperty* iPropertyReader;
112 TName iTEFServerName;
113 TInt32 iExpectedClientSid;
114 TInt iHoldClientStepKey;
118 _LIT(KUPSClientStep,"UPSClientStep");