1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @test |
|
19 @internalComponent - Internal Symbian test code |
|
20 */ |
|
21 |
|
22 |
|
23 #if (!defined TE_IPUPS_UPS_STEP_H) |
|
24 #define TE_IPUPS_UPS_STEP_H |
|
25 #include <test/testexecutestepbase.h> |
|
26 #include "te_ipups_stepbase.h" |
|
27 #include <ups/upsnotifierutil.h> |
|
28 |
|
29 class CIpUpsStep : public CTeIpUpsStepBase |
|
30 { |
|
31 public: |
|
32 CIpUpsStep(); |
|
33 ~CIpUpsStep(); |
|
34 virtual TVerdict doTestStepPreambleL(); |
|
35 virtual TVerdict doTestStepL(); |
|
36 virtual TVerdict doTestStepPostambleL(); |
|
37 private: |
|
38 UserPromptService::CPolicy::TOptions ButtonToOption(const TPtrC& aButton); |
|
39 TPtrC TUpsDecisionToString(TUpsDecision aDecision); |
|
40 TUpsDecision TUpsDecisionFromString(const TPtrC& aDecision); |
|
41 TBool OptionsFlagToString(TUint aOptions, TDes& aOptionString, TBool aCheckAgainstExpectedOpt=ETrue); |
|
42 TBool VerifyAndPrintPromptDataL(); |
|
43 void GetValueAt(const TInt aPos, const TPtrC& aArrayString, const TChar aDelimeter, TDes& aValue); |
|
44 |
|
45 void GetSessionAndSubSession(UserPromptService::RUpsSession& aUpsSession, UserPromptService::RUpsSubsession& aUpsSubsession); |
|
46 |
|
47 TInt iNotifyCount; |
|
48 UserPromptService::CPromptData* iPromptData; |
|
49 |
|
50 TInt iServiceUID; |
|
51 TPtrC iServerName; |
|
52 TPtrC iDestination; |
|
53 TPtrC iOpaqueData; |
|
54 TBuf8<64> iOpaqueDataStored; |
|
55 TPtrC iDialogOption; |
|
56 TPtrC iExpectedDialogOptions; |
|
57 TBool iPlatSecPass; |
|
58 TPtrC iExpectedUpsDecision; |
|
59 TInt iPromptTriggerCount; |
|
60 TInt iNoOfAuthoriseCalls; |
|
61 TBool iCancelPromptCall; |
|
62 |
|
63 TBool iAlwaysOpenNewSession; |
|
64 |
|
65 TBool iUseSameSubSession; |
|
66 TBool iUseSameSubSessionAfterClose; |
|
67 TBool iAlwaysOpenNewSubSession; |
|
68 TInt iTestNotifierMode; |
|
69 }; |
|
70 |
|
71 _LIT(KIpUpsClientStep,"IpUpsStep"); |
|
72 |
|
73 _LIT(KIpUpsServiceId, "ServiceId"); |
|
74 _LIT(KIpUpsDestination, "Destination"); |
|
75 _LIT(KIpUpsOpaqueData, "OpaqueData"); |
|
76 _LIT(KIpUpsDialogOptionSelection, "DialogOptionSelection"); |
|
77 _LIT(KExpectedDialogOptions, "ExpectedDialogOptions"); |
|
78 _LIT(KIpUpsPlatSecPass, "PlatSecPass"); |
|
79 _LIT(KIpUpsExpectedDecision, "ExpectedUpsDecision"); |
|
80 _LIT(KIpUpsPromptTriggerCount, "PromptTriggerCount"); |
|
81 _LIT(KIpUpsNoOfAuthoriseCalls, "NoOfAuthoriseCalls"); |
|
82 _LIT(KIpUpsCancelPromptCall, "CancelPromptCall"); |
|
83 |
|
84 _LIT(KIpUpsAlwaysOpenNewSession, "AlwaysOpenNewSession"); |
|
85 |
|
86 _LIT(KIpUpsUseSameSubSession, "UseSameSubSession"); |
|
87 _LIT(KIpUpsUseSameSubSessionAfterClose, "UseSameSubSessionAfterClose"); |
|
88 _LIT(KIpUpsAlwaysOpenNewSubSession, "AlwaysOpenNewSubSession"); |
|
89 |
|
90 const TInt KMaxNoOfAuthoriseCalls = 10; |
|
91 const TChar KIniFileDelimeter = ','; |
|
92 |
|
93 #endif |
|