24
|
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 |
#include "Te_SimOutGoingDataTest.h"
|
|
17 |
|
|
18 |
CSimOutGoingDataTest::CSimOutGoingDataTest()
|
|
19 |
{
|
|
20 |
SetTestStepName(_L("OutGoingDataTest"));
|
|
21 |
}
|
|
22 |
|
|
23 |
TVerdict CSimOutGoingDataTest::doTestStepL()
|
|
24 |
{
|
|
25 |
INFO_PRINTF1(_L("BeginOutGoingDataTest"));
|
|
26 |
|
|
27 |
CreateConfigFileL(_L("c:\\config3.txt"));
|
|
28 |
SetTestNumberL(0);
|
|
29 |
|
|
30 |
TInt ret = iPhone.Open(iTelServer,KPhoneName);
|
|
31 |
INFO_PRINTF2(_L("Result: %d"),ret);
|
|
32 |
TESTL(ret == KErrNone);
|
|
33 |
INFO_PRINTF1(_L("Opened phone object"));
|
|
34 |
|
|
35 |
TESTL(iPhone.Initialise()==KErrNone);
|
|
36 |
INFO_PRINTF1(_L("Opened phone object"));
|
|
37 |
|
|
38 |
TESTL(iLine.Open(iPhone,KDataLineName)==KErrNone);
|
|
39 |
INFO_PRINTF1(_L("Opened Line object"));
|
|
40 |
|
|
41 |
TName callName;
|
|
42 |
TESTL(iCall.OpenNewCall(iLine,callName)==KErrNone);
|
|
43 |
INFO_PRINTF1(_L("Opened Call object"));
|
|
44 |
|
|
45 |
// Test a Dial with Core Call Params...
|
|
46 |
INFO_PRINTF1(_L("Get Bearer Information"));
|
|
47 |
RCall::TBearerService bearerServiceInfo;
|
|
48 |
TESTL(iCall.GetBearerServiceInfo(bearerServiceInfo)==KErrEtelCallNotActive);
|
|
49 |
|
|
50 |
INFO_PRINTF1(_L("Get DataCall Capabilities"));
|
|
51 |
RMobileCall::TMobileCallDataCapsV1 callCaps;
|
|
52 |
RMobileCall::TMobileCallDataCapsV1Pckg callCapsPckg(callCaps);
|
|
53 |
ret=iCall.GetMobileDataCallCaps(callCapsPckg);
|
|
54 |
CHECKPOINTL(ret,KErrNone,CHP_DATA_CASE("B.7"));
|
|
55 |
|
|
56 |
INFO_PRINTF1(_L("Get DataCall RLP Range"));
|
|
57 |
TRequestStatus stat0;
|
|
58 |
RMobileCall::TMobileDataRLPRangesV1 rlp;
|
|
59 |
RMobileCall::TMobileDataRLPRangesV1Pckg rlpPckg(rlp);
|
|
60 |
iCall.GetMobileDataCallRLPRange(stat0,1,rlpPckg);
|
|
61 |
User::WaitForRequest(stat0);
|
|
62 |
CHECKPOINTL(stat0,KErrNone,CHP_DATA_CASE("B.6"));
|
|
63 |
|
|
64 |
INFO_PRINTF1(_L("Get DataCall Hscsd information"));
|
|
65 |
RMobileCall::TMobileCallHscsdInfoV1 info;
|
|
66 |
RMobileCall::TMobileCallHscsdInfoV1Pckg infoPckg(info);
|
|
67 |
ret=iCall.GetCurrentHscsdInfo(infoPckg);
|
|
68 |
CHECKPOINTL(ret,KErrNone,CHP_DATA_CASE("B.9"));
|
|
69 |
|
|
70 |
INFO_PRINTF1(_L("Get Hscsd Call Params"));
|
|
71 |
RMobileCall::TMobileHscsdCallParamsV1 callParams;
|
|
72 |
RMobileCall::TMobileHscsdCallParamsV1Pckg callParamsPckg(callParams);
|
|
73 |
|
|
74 |
TESTL(iCall.GetCallParams(callParamsPckg)==KErrEtelCallNotActive);
|
|
75 |
|
|
76 |
StartNTRasSimulation();
|
|
77 |
INFO_PRINTF2(_L("Dialling %S "),&KTelephoneNumber);
|
|
78 |
TRequestStatus reqStatus0;
|
|
79 |
callParams.iSpeakerControl=RCall::EMonitorSpeakerControlAlwaysOn;
|
|
80 |
callParams.iSpeakerVolume=RCall::EMonitorSpeakerVolumeHigh;
|
|
81 |
callParams.iWaitForDialTone=RCall::EDialToneWait;
|
|
82 |
callParams.iInterval=1234;
|
|
83 |
callParams.iWantedAiur=RMobileCall::EAiurBps9600;
|
|
84 |
callParams.iWantedRxTimeSlots=5;
|
|
85 |
callParams.iMaxTimeSlots=30;
|
|
86 |
callParams.iCodings=RMobileCall::ETchCoding48;
|
|
87 |
|
|
88 |
iCall.Dial(reqStatus0,callParamsPckg,KTelephoneNumber);
|
|
89 |
User::WaitForRequest(reqStatus0); // Wait for the Call Status Change notification
|
|
90 |
TESTL(reqStatus0==KErrNone);
|
|
91 |
INFO_PRINTF2(_L("Result: %d"),reqStatus0.Int());
|
|
92 |
CHECKPOINTL(reqStatus0,KErrNone,CHP_DATA_CASE("B.1"));
|
|
93 |
|
|
94 |
INFO_PRINTF1(_L("Get Bearer Information again..."));
|
|
95 |
TESTL(iCall.GetBearerServiceInfo(bearerServiceInfo)==KErrNone);
|
|
96 |
TESTL(bearerServiceInfo.iBearerCaps==RCall::KBearerCapsCompressionV42bis);
|
|
97 |
TESTL(bearerServiceInfo.iBearerSpeed==RCall::EBearerData19200);
|
|
98 |
|
|
99 |
INFO_PRINTF1(_L("Check call state..."));
|
|
100 |
RMobileCall::TMobileCallStatus state;
|
|
101 |
TESTL(iCall.GetMobileCallStatus(state)==KErrNone);
|
|
102 |
TESTL(state==RMobileCall::EStatusConnected);
|
|
103 |
|
|
104 |
INFO_PRINTF1(_L("Check call params..."));
|
|
105 |
TESTL(iCall.GetCallParams(callParamsPckg)==KErrNone);
|
|
106 |
TESTL(callParams.iSpeakerControl==RCall::EMonitorSpeakerControlAlwaysOn);
|
|
107 |
TESTL(callParams.iSpeakerVolume==RCall::EMonitorSpeakerVolumeHigh);
|
|
108 |
TESTL(callParams.iWaitForDialTone==RCall::EDialToneWait);
|
|
109 |
TESTL(callParams.iInterval==1234);
|
|
110 |
|
|
111 |
INFO_PRINTF1(_L("Notification for Hscsd info changes"));
|
|
112 |
TRequestStatus reqStatus1;
|
|
113 |
iCall.NotifyHscsdInfoChange(reqStatus1,infoPckg);
|
|
114 |
|
|
115 |
INFO_PRINTF1(_L("Set DataCall Hscsd Dynamic Parameters"));
|
|
116 |
iCall.SetDynamicHscsdParams(reqStatus0,RMobileCall::EAiurBps57600, 15);
|
|
117 |
User::WaitForRequest(reqStatus0);
|
|
118 |
CHECKPOINTL(reqStatus0,KErrNone,CHP_DATA_CASE("B.8"));
|
|
119 |
User::WaitForRequest(reqStatus1);
|
|
120 |
CHECKPOINTL(reqStatus1,KErrNone,CHP_DATA_CASE("B.10"));
|
|
121 |
INFO_PRINTF1(_L("Completed notification..."));
|
|
122 |
|
|
123 |
INFO_PRINTF1(_L("Hanging up call"));
|
|
124 |
|
|
125 |
TESTL(iCall.HangUp()==KErrNone);
|
|
126 |
|
|
127 |
INFO_PRINTF1(_L("Check call state..."));
|
|
128 |
TESTL(iCall.GetMobileCallStatus(state)==KErrNone);
|
|
129 |
TESTL(state==RMobileCall::EStatusIdle);
|
|
130 |
|
|
131 |
// Start another session, this time using Multimode Call Params, so re-start the
|
|
132 |
// NTRasSimulator
|
|
133 |
StartNTRasSimulation();
|
|
134 |
|
|
135 |
INFO_PRINTF2(_L("Dialling %S "),&KTelephoneNumber);
|
|
136 |
RMobileCall::TMobileCallParamsV1 mobileCallParams;
|
|
137 |
RMobileCall::TMobileCallParamsV1Pckg mobileCallParamsPckg(mobileCallParams);
|
|
138 |
mobileCallParams.iSpeakerControl=RCall::EMonitorSpeakerControlOnExceptDuringDialling;
|
|
139 |
mobileCallParams.iSpeakerVolume=RCall::EMonitorSpeakerVolumeUnknown;
|
|
140 |
mobileCallParams.iWaitForDialTone=RCall::EDialToneNoWait;
|
|
141 |
mobileCallParams.iInterval=5678;
|
|
142 |
mobileCallParams.iAutoRedial=ETrue;
|
|
143 |
mobileCallParams.iCug.iCugIndex=99;
|
|
144 |
mobileCallParams.iIdRestrict=RMobileCall::ESendMyId;
|
|
145 |
iCall.Dial(reqStatus0,mobileCallParamsPckg,KTelephoneNumber);
|
|
146 |
User::WaitForRequest(reqStatus0); // Wait for the Call Status Change notification
|
|
147 |
TESTL(reqStatus0==KErrNone);
|
|
148 |
CHECKPOINTL(reqStatus0,KErrNone,CHP_DATA_CASE("B.2"));
|
|
149 |
|
|
150 |
INFO_PRINTF1(_L("Check call state..."));
|
|
151 |
TESTL(iCall.GetMobileCallStatus(state)==KErrNone);
|
|
152 |
TESTL(state==RMobileCall::EStatusConnected);
|
|
153 |
|
|
154 |
INFO_PRINTF1(_L("Check call params..."));
|
|
155 |
TESTL(iCall.GetCallParams(mobileCallParamsPckg)==KErrNone);
|
|
156 |
TESTL(mobileCallParams.iSpeakerControl==RCall::EMonitorSpeakerControlOnExceptDuringDialling);
|
|
157 |
TESTL(mobileCallParams.iSpeakerVolume==RCall::EMonitorSpeakerVolumeUnknown);
|
|
158 |
TESTL(mobileCallParams.iWaitForDialTone==RCall::EDialToneNoWait);
|
|
159 |
TESTL(mobileCallParams.iInterval==5678);
|
|
160 |
TESTL(mobileCallParams.iAutoRedial/*==ETrue*/);
|
|
161 |
TESTL(mobileCallParams.iCug.iCugIndex==99);
|
|
162 |
TESTL(mobileCallParams.iIdRestrict==RMobileCall::ESendMyId);
|
|
163 |
|
|
164 |
TESTL(iCall.HangUp()==KErrNone);
|
|
165 |
|
|
166 |
INFO_PRINTF1(_L("Check call state..."));
|
|
167 |
TESTL(iCall.GetMobileCallStatus(state)==KErrNone);
|
|
168 |
TESTL(state==RMobileCall::EStatusIdle);
|
|
169 |
CHECKPOINTL(state,RMobileCall::EStatusIdle,CHP_DATA_CASE("B.3"));
|
|
170 |
|
|
171 |
iCall.Close();
|
|
172 |
iLine.Close();
|
|
173 |
iPhone.Close();
|
|
174 |
ASSERT(RThread().RequestCount()==0);
|
|
175 |
|
|
176 |
return TestStepResult();
|
|
177 |
}
|
|
178 |
|