sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
*
|
sl@0
|
16 |
*/
|
sl@0
|
17 |
|
sl@0
|
18 |
|
sl@0
|
19 |
/**
|
sl@0
|
20 |
@file
|
sl@0
|
21 |
@test
|
sl@0
|
22 |
*/
|
sl@0
|
23 |
|
sl@0
|
24 |
|
sl@0
|
25 |
#if (!defined UPSQUERRY_STEP_H)
|
sl@0
|
26 |
#define UPSQUERRY_STEP_H
|
sl@0
|
27 |
#include <test/testexecutestepbase.h>
|
sl@0
|
28 |
#include <bautils.h>
|
sl@0
|
29 |
#include "tupsintegstepbase.h"
|
sl@0
|
30 |
#include "tups_clientapi_sysserver.h"
|
sl@0
|
31 |
#include "tupsproperty.h"
|
sl@0
|
32 |
|
sl@0
|
33 |
class TServiceRequestParameters
|
sl@0
|
34 |
{
|
sl@0
|
35 |
public:
|
sl@0
|
36 |
TServiceRequestParameters();
|
sl@0
|
37 |
TInt iServiceUID;
|
sl@0
|
38 |
TBuf<30> iServerName;
|
sl@0
|
39 |
TBuf<60> iDestination;
|
sl@0
|
40 |
TInt iExpectedError;
|
sl@0
|
41 |
TBuf8<50> iOpaqueData;
|
sl@0
|
42 |
TBuf<20> iSelectDialogOption;
|
sl@0
|
43 |
TInt iButtonsDisplayed;
|
sl@0
|
44 |
TInt iDialogCreatorInvoked;
|
sl@0
|
45 |
TInt iPolicyEvaluatorInvoked;
|
sl@0
|
46 |
TBuf<30> iAccessGranted;
|
sl@0
|
47 |
TBool iCloseSession;
|
sl@0
|
48 |
TBool iHoldEvaluatorOpen;
|
sl@0
|
49 |
TBool iHoldPrepareDialogOpen;
|
sl@0
|
50 |
TBool iHoldDisplayDialogOpen;
|
sl@0
|
51 |
TInt iRequestDurationThreshold;
|
sl@0
|
52 |
TBool iLeaveDialog;
|
sl@0
|
53 |
TBool iLeaveEvaluator;
|
sl@0
|
54 |
TBool iCancelUpsRequest;
|
sl@0
|
55 |
TBool iPlatSecPass;
|
sl@0
|
56 |
TBool iForcePrompt;
|
sl@0
|
57 |
TInt iExpectedEvaluatorInfo;
|
sl@0
|
58 |
TInt iSelectFingerprint;
|
sl@0
|
59 |
TBuf<60> iWaitUntilFileAppears;
|
sl@0
|
60 |
};
|
sl@0
|
61 |
|
sl@0
|
62 |
class COpenSession
|
sl@0
|
63 |
{
|
sl@0
|
64 |
public:
|
sl@0
|
65 |
static COpenSession* NewL(const TPtrC& aServerName);
|
sl@0
|
66 |
void ConstructL(const TPtrC& aServerName);
|
sl@0
|
67 |
~COpenSession();
|
sl@0
|
68 |
TBuf<30> iServerName;
|
sl@0
|
69 |
RUpsTestServ* iPointerToServer;
|
sl@0
|
70 |
RUpsTestSession* iPointerToSession;
|
sl@0
|
71 |
};
|
sl@0
|
72 |
|
sl@0
|
73 |
|
sl@0
|
74 |
class CUpsClientStep : public CTUpsIntegStepBase
|
sl@0
|
75 |
{
|
sl@0
|
76 |
public:
|
sl@0
|
77 |
CUpsClientStep();
|
sl@0
|
78 |
~CUpsClientStep();
|
sl@0
|
79 |
virtual TVerdict doTestStepPreambleL();
|
sl@0
|
80 |
virtual TVerdict doTestStepL();
|
sl@0
|
81 |
virtual TVerdict doTestStepPostambleL();
|
sl@0
|
82 |
|
sl@0
|
83 |
|
sl@0
|
84 |
TBool FindOpenSession(const TDesC& aServerName,TInt &position);
|
sl@0
|
85 |
RUpsTestSession* GetSessionToServerL(const TDesC& aServerName);
|
sl@0
|
86 |
void CloseSessionL(const TDesC& aServerName);
|
sl@0
|
87 |
void CloseAllOpenSessions();
|
sl@0
|
88 |
void SetTestDataL(TInt aIndex);
|
sl@0
|
89 |
void SetClientStatusCompleteL();
|
sl@0
|
90 |
TUpsDecision StringToTUpsDecision(const TPtrC& aString);
|
sl@0
|
91 |
TPtrC TUpsDecisionToString(TUpsDecision aDecision);
|
sl@0
|
92 |
TInt ButtonToInt(const TPtrC& aButton);
|
sl@0
|
93 |
TBool CheckResultsL(TInt aIndex);
|
sl@0
|
94 |
TBool CheckDialogCreatorResultsL(TInt aIndex);
|
sl@0
|
95 |
TBool CheckPolicyEvaluatorResultsL(TInt aIndex);
|
sl@0
|
96 |
void HoldClientL(void);
|
sl@0
|
97 |
|
sl@0
|
98 |
// Array containing pointers to open sessions
|
sl@0
|
99 |
// maps server name to pointer to session
|
sl@0
|
100 |
RArray<COpenSession*> iArraySessionsInUse;
|
sl@0
|
101 |
|
sl@0
|
102 |
public:
|
sl@0
|
103 |
// This array will hold all the services to be requested.
|
sl@0
|
104 |
RArray<TServiceRequestParameters> iArraySersToRequest;
|
sl@0
|
105 |
|
sl@0
|
106 |
TUpsTestServiceRequestData iRequestData;
|
sl@0
|
107 |
TUpsTestServiceReturn iReturnData;
|
sl@0
|
108 |
|
sl@0
|
109 |
CUpsProperty* iPropertyReader;
|
sl@0
|
110 |
TInt iStepRepeat;
|
sl@0
|
111 |
TInt iServerId;
|
sl@0
|
112 |
TName iTEFServerName;
|
sl@0
|
113 |
TInt32 iExpectedClientSid;
|
sl@0
|
114 |
TInt iHoldClientStepKey;
|
sl@0
|
115 |
|
sl@0
|
116 |
};
|
sl@0
|
117 |
|
sl@0
|
118 |
_LIT(KUPSClientStep,"UPSClientStep");
|
sl@0
|
119 |
|
sl@0
|
120 |
#endif
|