|
1 // Copyright (c) 2005-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 #ifndef __TE_SIMVOICE_TESTSTEP_BASE__ |
|
17 #define __TE_SIMVOICE_TESTSTEP_BASE__ |
|
18 |
|
19 #include <test/testexecutestepbase.h> |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <e32test.h> |
|
23 #include <e32keys.h> |
|
24 #include <c32comm.h> |
|
25 #include <f32file.h> |
|
26 #include <etel.h> |
|
27 #include <etelmm.h> |
|
28 #include "SimTsy.h" |
|
29 |
|
30 _LIT(KSimtsyName,"SIM"); |
|
31 |
|
32 const TInt KLocalTel=32; |
|
33 const TInt KRemoteTel=32; |
|
34 |
|
35 _LIT(KGoodNumber,"1789"); |
|
36 |
|
37 #define CHECKPOINT(code,expected,msg){\ |
|
38 TEST((code)==(expected));\ |
|
39 if (TestStepResult() != EPass ){\ |
|
40 INFO_PRINTF1(_L("Failed Checkpoint:"));\ |
|
41 INFO_PRINTF1(msg);\ |
|
42 }\ |
|
43 } |
|
44 |
|
45 class CSimVoiceTestStepBase : public CTestStep |
|
46 { |
|
47 public: |
|
48 virtual TVerdict doTestStepPreambleL(); |
|
49 virtual TVerdict doTestStepPostambleL(); |
|
50 void SetState(TInt aState); |
|
51 |
|
52 protected: |
|
53 void GetGoodNumber(TDes& aNum) ; |
|
54 void WaitWithTimeout(TRequestStatus& aStatus, TInt aNumberOfMicroSeconds) ; |
|
55 TInt CallMeDear() ; |
|
56 TInt HangMeUpDear() ; |
|
57 void Print_RCall_TStatus(RCall::TStatus& aArg) ; |
|
58 void Print_RLine_TCapsFlags(RLine::TCapsFlags& aArg); |
|
59 void Print_TCapsEnum(RCall::TCaps& aArg) ; |
|
60 void PrintCallCaps(TUint32 aCaps) ; |
|
61 void TestGetCallCapabilitiesL(RMobileCall& aCall) ; |
|
62 void TestLineCapabilitiesL() ; |
|
63 void Print_TMobilePhoneModeCaps(RMobilePhone::TMobilePhoneModeCaps& aArg) ; |
|
64 |
|
65 protected: |
|
66 RTelServer iTelServer; |
|
67 RMobilePhone iPhone; |
|
68 |
|
69 TBuf8<KLocalTel> iLocalNumber; //< Local telephone number |
|
70 TBuf8<KRemoteTel> iRemoteNumber; //< Remote telephone number (modem) |
|
71 |
|
72 TRequestStatus iStatus; //< Request status used by asynchronous functions |
|
73 TRequestStatus iStatus2; |
|
74 TRequestStatus iStatus3; |
|
75 TRequestStatus iStatus4; |
|
76 TRequestStatus iStatus5; |
|
77 TRequestStatus iStatus6; |
|
78 TRequestStatus iStatus7; |
|
79 |
|
80 RMobileLine iLine; |
|
81 RMobileCall iVoiceCall; |
|
82 RCall::TCallInfo iCallInfo; |
|
83 RPhone::TLineInfo iLineInfo; |
|
84 RPhone::TCaps iPhoneCaps; |
|
85 TInt iLineIndex; |
|
86 TInt iState; |
|
87 }; |
|
88 |
|
89 #endif // __TE_SIMVOICE_TESTSTEP_BASE__ |