24
|
1 |
// Copyright (c) 2002-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 |
*/
|
|
19 |
|
|
20 |
#include "Te_SimData.h"
|
|
21 |
|
|
22 |
#include <sacls.h>
|
|
23 |
|
|
24 |
const TInt KTenPartOfSec = 100000 ;
|
|
25 |
const TInt KOneSecond=1000000; // Used in a time out function, 1 second (in microSeconds)
|
|
26 |
const TInt KTenSeconds=10000000; // Used in a time out function, 10 seconds (in microSeconds)
|
|
27 |
|
|
28 |
|
|
29 |
_LIT(KGoodNumber,"1789");
|
|
30 |
|
|
31 |
|
|
32 |
static TInt NTRasThreadFunction(TAny* /*aThreadData*/)
|
|
33 |
/**
|
|
34 |
* Does 'durty' work to start NT RAS session
|
|
35 |
* @note It sets
|
|
36 |
* iRate = EBps38400;
|
|
37 |
* iDataBits = EData8;
|
|
38 |
* iStopBits = EStop1 ;
|
|
39 |
* iParity = EParityNone;
|
|
40 |
* be sure that your NT comport has the same settings.
|
|
41 |
*/
|
|
42 |
{
|
|
43 |
_LIT(KCsyName,"LOOPBACK.CSY");
|
|
44 |
_LIT(KPortName,"LOOPBACK::1");
|
|
45 |
|
|
46 |
_LIT8(KServerText,"SERVER");
|
|
47 |
|
|
48 |
CTrapCleanup* cleanup;
|
|
49 |
if ((cleanup=CTrapCleanup::New())==NULL)
|
|
50 |
return KErrGeneral;
|
|
51 |
|
|
52 |
RCommServ commServ;
|
|
53 |
TInt r=commServ.Connect();
|
|
54 |
r=commServ.LoadCommModule(KCsyName);
|
|
55 |
if( KErrNone == r)
|
|
56 |
{
|
|
57 |
RComm comm;
|
|
58 |
r=comm.Open(commServ,KPortName,ECommShared);
|
|
59 |
if( KErrNone == r)
|
|
60 |
{
|
|
61 |
TBuf8<6> readBuf;
|
|
62 |
TRequestStatus stat0;
|
|
63 |
comm.Read(stat0,readBuf);
|
|
64 |
User::WaitForRequest(stat0) ;
|
|
65 |
|
|
66 |
comm.Write(stat0,KServerText);
|
|
67 |
User::WaitForRequest(stat0) ;
|
|
68 |
}
|
|
69 |
comm.Close() ;
|
|
70 |
}
|
|
71 |
commServ.Close() ;
|
|
72 |
delete cleanup;
|
|
73 |
return r;
|
|
74 |
}
|
|
75 |
|
|
76 |
LOCAL_C TInt StartNTRasSimulation()
|
|
77 |
/**
|
|
78 |
* Starts virual, because of lookback serial driver,
|
|
79 |
* NT RAS session
|
|
80 |
*/
|
|
81 |
{
|
|
82 |
const TInt KStackSize=0x8000;
|
|
83 |
const TInt KHeapSize=0x8000;
|
|
84 |
const TInt KMaxHeapSize=0x80000;
|
|
85 |
TInt res = KErrNone ;
|
|
86 |
_LIT(KNtRasName,"NTRasEmulation");
|
|
87 |
|
|
88 |
RThread t;
|
|
89 |
res=t.Create(KNtRasName,NTRasThreadFunction,
|
|
90 |
KStackSize,KHeapSize,KMaxHeapSize,NULL);
|
|
91 |
t.Resume();
|
|
92 |
t.Close();
|
|
93 |
|
|
94 |
return res;
|
|
95 |
}
|
|
96 |
|
|
97 |
|
|
98 |
void CTestSimDataStep::WaitWithTimeout(TRequestStatus& aStatus, TInt aNumberOfMicroSeconds)
|
|
99 |
/**
|
|
100 |
* Timeout function
|
|
101 |
*/
|
|
102 |
{
|
|
103 |
TRequestStatus timerStatus;
|
|
104 |
RTimer timer ;
|
|
105 |
timer.CreateLocal() ;
|
|
106 |
timer.After(timerStatus,aNumberOfMicroSeconds);
|
|
107 |
|
|
108 |
User::WaitForRequest(aStatus, timerStatus);
|
|
109 |
if (timerStatus == KRequestPending)
|
|
110 |
{
|
|
111 |
timer.Cancel();
|
|
112 |
User::WaitForRequest(timerStatus);
|
|
113 |
}
|
|
114 |
else
|
|
115 |
{
|
|
116 |
INFO_PRINTF1(_L("Time is over!!!")) ;
|
|
117 |
}
|
|
118 |
timer.Close() ;
|
|
119 |
}
|
|
120 |
|
|
121 |
//
|
|
122 |
// CTestSimDataStep Implementation
|
|
123 |
//
|
|
124 |
|
|
125 |
void CTestSimDataStep::GetGoodNumber(TDes& aNum)
|
|
126 |
/**Returns string with number for outgoing call.
|
|
127 |
* For.ex Good number is 179 Vodaphone test line - recorded message.
|
|
128 |
* Function tries to read value of switch /modem, otherwise it use defualt value.
|
|
129 |
* @return phone number string
|
|
130 |
* @note have to be updated to read information from cmd line or config. file
|
|
131 |
*/
|
|
132 |
{
|
|
133 |
aNum.Copy(KGoodNumber) ;
|
|
134 |
}
|
|
135 |
|
|
136 |
void CTestSimDataStep::TestLineCapabilitiesL()
|
|
137 |
/**
|
|
138 |
* @test GT83-TDATA-002.01 Test retrieval of a data line's capabilities. Display the capabilities to screen
|
|
139 |
*/
|
|
140 |
{
|
|
141 |
INFO_PRINTF1(_L("Test Line Capabilities"));
|
|
142 |
|
|
143 |
// Line Capabilities
|
|
144 |
RLine::TCaps lineCaps;
|
|
145 |
TInt ret=iLine.GetCaps(lineCaps);
|
|
146 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-002.01")) ;
|
|
147 |
if (ret!=KErrNone)
|
|
148 |
{
|
|
149 |
INFO_PRINTF1(_L("Get Line Capabilities is NOT supported"));
|
|
150 |
}
|
|
151 |
else
|
|
152 |
{
|
|
153 |
if ((lineCaps.iFlags&RLine::KCapsData) !=0)
|
|
154 |
{
|
|
155 |
INFO_PRINTF1(_L("This line supports Data connections"));
|
|
156 |
}
|
|
157 |
if ((lineCaps.iFlags&RLine::KCapsFax) !=0)
|
|
158 |
{
|
|
159 |
INFO_PRINTF1(_L("This line supports Fax connections"));
|
|
160 |
}
|
|
161 |
if ((lineCaps.iFlags&RLine::KCapsVoice) !=0)
|
|
162 |
{
|
|
163 |
INFO_PRINTF1(_L("This line supports Voice connections"));
|
|
164 |
}
|
|
165 |
if ((lineCaps.iFlags&RLine::KCapsEventIncomingCall) !=0)
|
|
166 |
{
|
|
167 |
INFO_PRINTF1(_L("This line supports Incoming Call Notification requests"));
|
|
168 |
}
|
|
169 |
}
|
|
170 |
}
|
|
171 |
|
|
172 |
TInt CTestSimDataStep::CallMeDear()
|
|
173 |
/**
|
|
174 |
* Asks for incomming call
|
|
175 |
* @return KErrNone if could make it
|
|
176 |
*/
|
|
177 |
{
|
|
178 |
iState++;
|
|
179 |
TInt ret = RProperty::Set(KUidPSSimTsyCategory, KPSSimTsyIncomingDataCall, iState);
|
|
180 |
INFO_PRINTF2(_L("Set Incoming Call Publish & Subscribe property result: %d"),ret) ;
|
|
181 |
return ret;
|
|
182 |
}
|
|
183 |
|
|
184 |
TInt CTestSimDataStep::HangMeUpDear()
|
|
185 |
/**
|
|
186 |
* Asks for remote hangup
|
|
187 |
* @return KErrNone if could make it
|
|
188 |
*/
|
|
189 |
{
|
|
190 |
iState++;
|
|
191 |
TInt ret = RProperty::Set(KUidPSSimTsyCategory, KPSSimTsyRemoteHangup, iState);
|
|
192 |
INFO_PRINTF2(_L("Set Remote Hangup Publish & Subscribe property result: %d"),ret) ;
|
|
193 |
return ret;
|
|
194 |
}
|
|
195 |
|
|
196 |
void CTestSimDataStep::Print_RCall_TStatus(RCall::TStatus& aArg)
|
|
197 |
|
|
198 |
/** Display value of enum RCall::TStatus to screen.
|
|
199 |
* @param value to print
|
|
200 |
*/
|
|
201 |
{
|
|
202 |
switch(aArg)
|
|
203 |
{
|
|
204 |
case RCall::EStatusUnknown:
|
|
205 |
INFO_PRINTF1(_L("Value of enum is RCall::EStatusUnknown")) ;
|
|
206 |
break ;
|
|
207 |
case RCall::EStatusIdle:
|
|
208 |
INFO_PRINTF1(_L("Value of enum is RCall::EStatusIdle")) ;
|
|
209 |
break ;
|
|
210 |
case RCall::EStatusDialling:
|
|
211 |
INFO_PRINTF1(_L("Value of enum is RCall::EStatusDialling")) ;
|
|
212 |
break ;
|
|
213 |
case RCall::EStatusRinging:
|
|
214 |
INFO_PRINTF1(_L("Value of enum is RCall::EStatusRinging")) ;
|
|
215 |
break ;
|
|
216 |
case RCall::EStatusAnswering:
|
|
217 |
INFO_PRINTF1(_L("Value of enum is RCall::EStatusAnswering")) ;
|
|
218 |
break ;
|
|
219 |
case RCall::EStatusConnecting:
|
|
220 |
INFO_PRINTF1(_L("Value of enum is RCall::EStatusConnecting")) ;
|
|
221 |
break ;
|
|
222 |
case RCall::EStatusConnected:
|
|
223 |
INFO_PRINTF1(_L("Value of enum is RCall::EStatusConnected")) ;
|
|
224 |
break ;
|
|
225 |
case RCall::EStatusHangingUp:
|
|
226 |
INFO_PRINTF1(_L("Value of enum is RCall::EStatusHangingUp")) ;
|
|
227 |
break ;
|
|
228 |
}
|
|
229 |
}
|
|
230 |
|
|
231 |
void CTestSimDataStep::Print_TCapsEnum(RCall::TCaps& aArg)
|
|
232 |
/** Display value of enum RCall::TCapsEnum to screen.
|
|
233 |
* @param value to print
|
|
234 |
*/
|
|
235 |
{
|
|
236 |
if(aArg.iFlags & RCall::KCapsData)
|
|
237 |
{
|
|
238 |
INFO_PRINTF1(_L("Has a flag TCapsEnum::KCapsData")) ;
|
|
239 |
}
|
|
240 |
if(aArg.iFlags & RCall::KCapsFax)
|
|
241 |
{
|
|
242 |
INFO_PRINTF1(_L("Has a flag TCapsEnum::KCapsFax")) ;
|
|
243 |
}
|
|
244 |
if(aArg.iFlags & RCall::KCapsVoice)
|
|
245 |
{
|
|
246 |
INFO_PRINTF1(_L("Has a flag TCapsEnum::KCapsVoice")) ;
|
|
247 |
}
|
|
248 |
if(aArg.iFlags & RCall::KCapsDial)
|
|
249 |
{
|
|
250 |
INFO_PRINTF1(_L("Has a flag TCapsEnum::KCapsDial")) ;
|
|
251 |
}
|
|
252 |
if(aArg.iFlags & RCall::KCapsConnect)
|
|
253 |
{
|
|
254 |
INFO_PRINTF1(_L("Has a flag TCapsEnum::KCapsConnect")) ;
|
|
255 |
}
|
|
256 |
if(aArg.iFlags & RCall::KCapsHangUp)
|
|
257 |
{
|
|
258 |
INFO_PRINTF1(_L("Has a flag TCapsEnum::KCapsHangUp")) ;
|
|
259 |
}
|
|
260 |
if(aArg.iFlags & RCall::KCapsAnswer)
|
|
261 |
{
|
|
262 |
INFO_PRINTF1(_L("Has a flag TCapsEnum::KCapsAnswer")) ;
|
|
263 |
}
|
|
264 |
if(aArg.iFlags & RCall::KCapsLoanDataPort)
|
|
265 |
{
|
|
266 |
INFO_PRINTF1(_L("Has a flag TCapsEnum::KCapsLoanDataPort")) ;
|
|
267 |
}
|
|
268 |
if(aArg.iFlags & RCall::KCapsRecoverDataPort)
|
|
269 |
{
|
|
270 |
INFO_PRINTF1(_L("Has a flag TCapsEnum::KCapsRecoverDataPort")) ;
|
|
271 |
}
|
|
272 |
}
|
|
273 |
//------------------------------------------------------------------
|
|
274 |
|
|
275 |
CTestLineStatusIncommingCall::CTestLineStatusIncommingCall()
|
|
276 |
/** Each test step initialises it's own name
|
|
277 |
*/
|
|
278 |
{
|
|
279 |
// store the name of this test case
|
|
280 |
// this is the name that is used by the script file
|
|
281 |
SetTestStepName(_L("TestLineStatusIncommingCall"));
|
|
282 |
}
|
|
283 |
//------------------------------------------------------------------
|
|
284 |
|
|
285 |
TVerdict CTestLineStatusIncommingCall::doTestStepL()
|
|
286 |
/** Tests line status function
|
|
287 |
* @test GT83-TDATA-001.01 Test opening a data line from a phone that supports data functionality
|
|
288 |
* @test GT83-TDATA-004.00 Test retrieval of a data line's current status (Generic)
|
|
289 |
* @test GT83-TDATA-004.02 "Test retrieval of a data line's current status when the line's status is ""Idle"""
|
|
290 |
* @test GT83-TDATA-004.04 "Test retrieval of a data line's current status when the line's status is ""Ringing"""
|
|
291 |
* @test GT83-TDATA-004.07 "Test retrieval of a data line's current status when the line's status is ""Connected"""
|
|
292 |
* @test GT83-TDATA-004.08 "Test retrieval of a data line's current status when the line's status is ""Hanging up"""
|
|
293 |
* @test GT83-TDATA-014.05 Test opening an existing call from a data line by specifying the name of the line and the name of an existing call
|
|
294 |
* @test GT83-TDATA-025.00 Test answering a call on a data line (Generic)
|
|
295 |
* @test GT83-TDATA-031.00 Test retrieval of a mobile data line's current status (Generic)
|
|
296 |
* @test GT83-TDATA-031.01 "Test retrieval of a mobile data line's current status when there is only one call on the line and it's status is ""Idle"""
|
|
297 |
* @test GT83-TDATA-031.04 "Test retrieval of a mobile data line's current status when there is only one call on the line and it's status is ""Answering"""
|
|
298 |
* @test GT83-TDATA-031.07 "Test retrieval of a mobile data line's current status when there is only one call on the line and it's status is ""Waiting CCBS Recall"""
|
|
299 |
*/
|
|
300 |
{
|
|
301 |
INFO_PRINTF1(_L("Test Line Status"));
|
|
302 |
|
|
303 |
//to make sure that line and call will be closed in leave case
|
|
304 |
CleanupClosePushL(iLine);
|
|
305 |
CleanupClosePushL(iDataCall);
|
|
306 |
|
|
307 |
RMobileCall::TMobileDataCallParamsV1 callDataParams;
|
|
308 |
RMobileCall::TMobileDataCallParamsV1Pckg callDataParamsPckg(callDataParams);
|
|
309 |
|
|
310 |
RCall::TStatus lineStatus;
|
|
311 |
TBuf<16> GoodNumber ;
|
|
312 |
GetGoodNumber(GoodNumber) ;
|
|
313 |
// Open a Data line and Call
|
|
314 |
//GT83-AT-021 Test opening a data line from a phone that supports data functionality
|
|
315 |
INFO_PRINTF1(_L("Opening Data Line"));
|
|
316 |
CHECK_POINT(iLine.Open(iPhone,KDataLineName), KErrNone, _L("GT83-TDATA-001.01"));
|
|
317 |
|
|
318 |
/* @test GT83-AT-36 Test retrieval of the current call status when it is idle*/
|
|
319 |
TInt ret = iLine.GetStatus(lineStatus);
|
|
320 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-004.00")) ;
|
|
321 |
CHECK_POINT(lineStatus, RCall::EStatusIdle, _L("GT83-TDATA-004.02")) ;
|
|
322 |
|
|
323 |
RMobileCall::TMobileCallStatus mobileLineStatus;
|
|
324 |
ret = iLine.GetMobileLineStatus(mobileLineStatus);
|
|
325 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-031.00")) ;
|
|
326 |
CHECK_POINT(mobileLineStatus, RMobileCall::EStatusIdle, _L("GT83-TDATA-031.01")) ;
|
|
327 |
|
|
328 |
INFO_PRINTF1(_L("Please ring the phone"));
|
|
329 |
|
|
330 |
TName callName;
|
|
331 |
/* @test GT83-AT-024 Test setting notification of an incoming call on a data line */
|
|
332 |
iLine.NotifyIncomingCall(iStatus, callName); // wait for a call
|
|
333 |
|
|
334 |
CallMeDear() ;
|
|
335 |
|
|
336 |
WaitWithTimeout(iStatus,20*KOneSecond); // but timeout after 60 seconds
|
|
337 |
CHECK_POINT(iStatus.Int(), KErrNone, _L("GT83-TDATA-0")) ;
|
|
338 |
|
|
339 |
/* @test GT83-AT-36 Test retrieval of the current call status when it is ringing*/
|
|
340 |
ret = iLine.GetStatus(lineStatus);
|
|
341 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-0")) ;
|
|
342 |
CHECK_POINT(lineStatus, RCall::EStatusRinging, _L("GT83-TDATA-0")) ;
|
|
343 |
|
|
344 |
ret = iLine.GetMobileLineStatus(mobileLineStatus);
|
|
345 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-0")) ;
|
|
346 |
CHECK_POINT(mobileLineStatus, RMobileCall::EStatusRinging, _L("GT83-TDATA-008.001")) ;
|
|
347 |
|
|
348 |
INFO_PRINTF1(_L("Phone is ringing..."));
|
|
349 |
//Test for incomming data call
|
|
350 |
TestLineCapabilitiesL();
|
|
351 |
|
|
352 |
/* @test GT83-AT-028 Test opening a new call by specifying the name of a line
|
|
353 |
*/
|
|
354 |
ret = iDataCall.OpenExistingCall(iLine, callName);
|
|
355 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-014.05")) ;
|
|
356 |
|
|
357 |
callDataParams.iService = RMobileCall::EServiceDataCircuitAsync;
|
|
358 |
callDataParams.iSpeed = RMobileCall::ESpeed9600;
|
|
359 |
callDataParams.iProtocol = RMobileCall::EProtocolV32;
|
|
360 |
//callDataParams.iProtocol = RMobileCall::EProtocolIsdnMultimedia;
|
|
361 |
|
|
362 |
callDataParams.iQoS = RMobileCall::EQoSNonTransparent;
|
|
363 |
|
|
364 |
// Answer an incoming call initiated by t_echo.exe and obtain the call's current status
|
|
365 |
//GT83-AT-032 Test answering a call on a data line (Generic) RCall::AnswerIncomingCall
|
|
366 |
iDataCall.AnswerIncomingCall(iStatus, callDataParamsPckg);
|
|
367 |
WaitWithTimeout(iStatus,30*KOneSecond); // but timeout after 2 seconds
|
|
368 |
CHECK_POINT(iStatus.Int(), KErrNone, _L("GT83-TDATA-025.00")) ;
|
|
369 |
ret = iLine.GetStatus(lineStatus);
|
|
370 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-004.04")) ;
|
|
371 |
CHECK_POINT(lineStatus, RCall::EStatusConnected, _L("GT83-TDATA-004.04")) ;
|
|
372 |
|
|
373 |
ret = iLine.GetMobileLineStatus(mobileLineStatus);
|
|
374 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-031.04")) ;
|
|
375 |
CHECK_POINT(mobileLineStatus, RMobileCall::EStatusConnected, _L("GT83-TDATA-031.04")) ;
|
|
376 |
TestLineCapabilitiesL();
|
|
377 |
|
|
378 |
/* @test GT83-AT-36 Test retrieval of the current call status when it is connected*/
|
|
379 |
ret = iLine.GetStatus(lineStatus);
|
|
380 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-004.07")) ;
|
|
381 |
CHECK_POINT(lineStatus, RCall::EStatusConnected, _L("GT83-TDATA-004.07")) ;
|
|
382 |
|
|
383 |
ret = iLine.GetMobileLineStatus(mobileLineStatus);
|
|
384 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-031.07")) ;
|
|
385 |
CHECK_POINT(mobileLineStatus, RMobileCall::EStatusConnected, _L("GT83-TDATA-031.07")) ;
|
|
386 |
|
|
387 |
|
|
388 |
INFO_PRINTF1(_L("Please stay connected... the test will hang up shortly"));
|
|
389 |
User::After(10*KOneSecond);
|
|
390 |
|
|
391 |
INFO_PRINTF1(_L("Hanging Up"));
|
|
392 |
iDataCall.HangUp(iStatus);
|
|
393 |
|
|
394 |
/* @test GT83-AT-36 Test retrieval of the current call status when it is hang up*/
|
|
395 |
ret = iLine.GetStatus(lineStatus);
|
|
396 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-004.08")) ;
|
|
397 |
CHECK_POINT(lineStatus, RCall::EStatusHangingUp, _L("GT83-TDATA-0")) ;
|
|
398 |
|
|
399 |
ret = iLine.GetMobileLineStatus(mobileLineStatus);
|
|
400 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-004.09")) ;
|
|
401 |
CHECK_POINT(mobileLineStatus, RMobileCall::EStatusDisconnecting, _L("GT83-TDATA-004.09")) ;
|
|
402 |
|
|
403 |
User::WaitForRequest(iStatus);
|
|
404 |
//CHECK_POINT(iStatus.Int(), KErrNone, _L("GT83-TDATA-0")) ; //??? line 825
|
|
405 |
|
|
406 |
//This test has some trobles with Erikson phones
|
|
407 |
//R520m could return KErrGeneral
|
|
408 |
//SH888 could return KErrTimedOut
|
|
409 |
INFO_PRINTF2(_L("iDataCall.HangUp() returned status %d"), iStatus.Int()) ;
|
|
410 |
|
|
411 |
/* @test GT83-AT-36 Test retrieval of the current call status when it is idle*/
|
|
412 |
ret = iLine.GetStatus(lineStatus);
|
|
413 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-004.02")) ;
|
|
414 |
CHECK_POINT(lineStatus, RCall::EStatusIdle, _L("GT83-TDATA-004.02")) ;
|
|
415 |
|
|
416 |
ret = iLine.GetMobileLineStatus(mobileLineStatus);
|
|
417 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-004.02")) ;
|
|
418 |
CHECK_POINT(mobileLineStatus, RMobileCall::EStatusIdle, _L("GT83-TDATA-004.02")) ;
|
|
419 |
|
|
420 |
/* @test GT83-AT-36 Test retrieval of the current call status when it is idle*/
|
|
421 |
ret = iLine.GetStatus(lineStatus);
|
|
422 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-004.02")) ;
|
|
423 |
CHECK_POINT(lineStatus, RCall::EStatusIdle, _L("GT83-TDATA-004.02")) ;
|
|
424 |
|
|
425 |
// Close the line and call
|
|
426 |
CleanupStack::PopAndDestroy(&iDataCall) ;
|
|
427 |
CleanupStack::PopAndDestroy(&iLine) ;
|
|
428 |
|
|
429 |
return TestStepResult();
|
|
430 |
}
|
|
431 |
//------------------------------------------------------------------
|
|
432 |
|
|
433 |
CTestLineStatusOutgoingCall::CTestLineStatusOutgoingCall()
|
|
434 |
/** Each test step initialises it's own name
|
|
435 |
*/
|
|
436 |
{
|
|
437 |
// store the name of this test case
|
|
438 |
// this is the name that is used by the script file
|
|
439 |
SetTestStepName(_L("TestLineStatusOutgoingCall"));
|
|
440 |
}
|
|
441 |
//------------------------------------------------------------------
|
|
442 |
|
|
443 |
TVerdict CTestLineStatusOutgoingCall::doTestStepL()
|
|
444 |
/** Tests line status function
|
|
445 |
* @test GT83-TDATA-001.01 Test opening a data line from a phone that supports data functionality
|
|
446 |
* @test GT83-TDATA-004.00 Test retrieval of a data line's current status (Generic)
|
|
447 |
* @test GT83-TDATA-004.02 "Test retrieval of a data line's current status when the line's status is ""Idle"""
|
|
448 |
* @test GT83-TDATA-004.03 "Test retrieval of a data line's current status when the line's status is ""Dialling"""
|
|
449 |
* @test GT83-TDATA-004.07 "Test retrieval of a data line's current status when the line's status is ""Connected"""
|
|
450 |
* @test GT83-TDATA-004.08 "Test retrieval of a data line's current status when the line's status is ""Hanging up"""
|
|
451 |
* @test GT83-TDATA-014.05 Test opening an existing call from a data line by specifying the name of the line and the name of an existing call
|
|
452 |
* @test GT83-TDATA-031.00 Test retrieval of a mobile data line's current status (Generic)
|
|
453 |
* @test GT83-TDATA-031.01 "Test retrieval of a mobile data line's current status when there is only one call on the line and it's status is ""Idle"""
|
|
454 |
*/
|
|
455 |
{
|
|
456 |
INFO_PRINTF1(_L("Test Line Status"));
|
|
457 |
|
|
458 |
TInt ret = RProperty::Set(KUidSystemCategory, KUidPhonePwrValue, ESAPhoneOff);
|
|
459 |
if(ret!=KErrNone)
|
|
460 |
{
|
|
461 |
INFO_PRINTF2(_L("Failed to set property KUidSystemCategory/KUidPhonePwr to ESAPhoneOff. The error was %d. Continuing..."),ret);
|
|
462 |
}
|
|
463 |
|
|
464 |
User::After(5 * 1000000); // sleep 5 secs; make sure phone is off
|
|
465 |
|
|
466 |
//to make sure that line and call will be closed in leave case
|
|
467 |
CleanupClosePushL(iLine);
|
|
468 |
CleanupClosePushL(iDataCall);
|
|
469 |
StartNTRasSimulation();
|
|
470 |
|
|
471 |
RMobileCall::TMobileDataCallParamsV1 callDataParams;
|
|
472 |
RMobileCall::TMobileDataCallParamsV1Pckg callDataParamsPckg(callDataParams);
|
|
473 |
TName callName;
|
|
474 |
|
|
475 |
RCall::TStatus lineStatus;
|
|
476 |
TBuf<16> GoodNumber ;
|
|
477 |
GetGoodNumber(GoodNumber) ;
|
|
478 |
// Open a Data line and Call
|
|
479 |
//GT83-AT-021 Test opening a data line from a phone that supports data functionality
|
|
480 |
INFO_PRINTF1(_L("Opening Data Line"));
|
|
481 |
CHECK_POINT(iLine.Open(iPhone,KDataLineName), KErrNone, _L("GT83-TDATA-001.01"));
|
|
482 |
|
|
483 |
/* @test GT83-AT-36 Test retrieval of the current call status when it is idle*/
|
|
484 |
iLine.GetStatus(lineStatus);
|
|
485 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-004.00")) ;
|
|
486 |
CHECK_POINT(lineStatus, RCall::EStatusIdle, _L("GT83-TDATA-004.02")) ;
|
|
487 |
|
|
488 |
RMobileCall::TMobileCallStatus mobileLineStatus;
|
|
489 |
iLine.GetMobileLineStatus(mobileLineStatus);
|
|
490 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-031.00")) ;
|
|
491 |
CHECK_POINT(mobileLineStatus, RMobileCall::EStatusIdle, _L("GT83-TDATA-031.01")) ;
|
|
492 |
/* @test GT83-AT-028 Test opening a new call by specifying the name of a line
|
|
493 |
*/
|
|
494 |
iDataCall.OpenNewCall(iLine, callName);
|
|
495 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-014.05")) ;
|
|
496 |
|
|
497 |
callDataParams.iService = RMobileCall::EServiceDataCircuitAsync;
|
|
498 |
callDataParams.iSpeed = RMobileCall::ESpeed9600;
|
|
499 |
callDataParams.iProtocol = RMobileCall::EProtocolV32;
|
|
500 |
//callDataParams.iProtocol = RMobileCall::EProtocolIsdnMultimedia;
|
|
501 |
|
|
502 |
callDataParams.iQoS = RMobileCall::EQoSNonTransparent;
|
|
503 |
|
|
504 |
INFO_PRINTF2(_L("Dialling %S...."), &GoodNumber);
|
|
505 |
iDataCall.Dial(iStatus, callDataParamsPckg, GoodNumber);
|
|
506 |
iLine.GetStatus(lineStatus);
|
|
507 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-004.03")) ;
|
|
508 |
//CHECK_POINT(lineStatus, RCall::EStatusDialling, _L("GT83-TDATA-004.03")) ;
|
|
509 |
WaitWithTimeout(iStatus,20*KOneSecond); // but timeout after 60 seconds
|
|
510 |
CHECK_POINT(iStatus.Int(), KErrNone, _L("GT83-TDATA-0")) ;
|
|
511 |
//Test for outgoing data call
|
|
512 |
TestLineCapabilitiesL();
|
|
513 |
|
|
514 |
/* @test GT83-AT-36 Test retrieval of the current call status when it is connected*/
|
|
515 |
iLine.GetStatus(lineStatus);
|
|
516 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-004.07")) ;
|
|
517 |
CHECK_POINT(lineStatus, RCall::EStatusConnected, _L("GT83-TDATA-004.07")) ;
|
|
518 |
|
|
519 |
iLine.GetMobileLineStatus(mobileLineStatus);
|
|
520 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-0")) ;
|
|
521 |
CHECK_POINT(mobileLineStatus, RMobileCall::EStatusConnected, _L("GT83-TDATA-0")) ;
|
|
522 |
|
|
523 |
|
|
524 |
INFO_PRINTF1(_L("Please stay connected... the test will hang up shortly"));
|
|
525 |
User::After(10*KOneSecond);
|
|
526 |
|
|
527 |
INFO_PRINTF1(_L("Call connected - listen for 20 seconds..."));
|
|
528 |
|
|
529 |
User::After(20*KOneSecond); // hold call active for 20 seconds
|
|
530 |
|
|
531 |
INFO_PRINTF1(_L("Hanging up"));
|
|
532 |
iDataCall.HangUp(iStatus);
|
|
533 |
|
|
534 |
iLine.GetStatus(lineStatus);
|
|
535 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-004.08")) ;
|
|
536 |
CHECK_POINT(lineStatus, RCall::EStatusHangingUp, _L("GT83-TDATA-004.08")) ;
|
|
537 |
|
|
538 |
User::WaitForRequest(iStatus);
|
|
539 |
//CHECK_POINT(iStatus.Int(), KErrNone, _L("GT83-TDATA-0")) ;
|
|
540 |
|
|
541 |
//This test has some trobles with Erikson phones
|
|
542 |
//R520m could return KErrGeneral
|
|
543 |
//SH888 could return KErrTimedOut
|
|
544 |
INFO_PRINTF2(_L("iDataCall.HangUp() returned status %d"), iStatus.Int()) ;
|
|
545 |
|
|
546 |
//Test for outgoing data call after hang up
|
|
547 |
TestLineCapabilitiesL();
|
|
548 |
/* @test GT83-AT-36 Test retrieval of the current call status when it is connected*/
|
|
549 |
iLine.GetStatus(lineStatus);
|
|
550 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-004.09")) ;
|
|
551 |
CHECK_POINT(lineStatus, RCall::EStatusIdle, _L("GT83-TDATA-004.09")) ;
|
|
552 |
|
|
553 |
iLine.GetMobileLineStatus(mobileLineStatus);
|
|
554 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-004.09")) ;
|
|
555 |
CHECK_POINT(mobileLineStatus, RMobileCall::EStatusIdle, _L("GT83-TDATA-004.09")) ;
|
|
556 |
|
|
557 |
// Close the line and call
|
|
558 |
CleanupStack::PopAndDestroy(&iDataCall) ;
|
|
559 |
CleanupStack::PopAndDestroy(&iLine) ;
|
|
560 |
|
|
561 |
return TestStepResult();
|
|
562 |
}
|
|
563 |
//------------------------------------------------------------------
|
|
564 |
|
|
565 |
CTestLineInfo::CTestLineInfo()
|
|
566 |
/** Each test step initialises it's own name
|
|
567 |
*/
|
|
568 |
{
|
|
569 |
// store the name of this test case
|
|
570 |
// this is the name that is used by the script file
|
|
571 |
SetTestStepName(_L("TestLineInfo"));
|
|
572 |
}
|
|
573 |
//------------------------------------------------------------------
|
|
574 |
|
|
575 |
TVerdict CTestLineInfo::doTestStepL()
|
|
576 |
/**
|
|
577 |
* This function gets the Line capabilities, line information, Number of calls
|
|
578 |
* on the line and call information,
|
|
579 |
* @test NONE Test the ability to get the current line information of the data line (Generic)
|
|
580 |
* @test GT83-TDATA-001.01 Test opening a data line from a phone that supports data functionality
|
|
581 |
* @test GT83-TDATA-005.01 "Test retrieval of the current hook status, when the line is currently ""off hook"""
|
|
582 |
* @test GT83-TDATA-005.02 "Test retrieval of the current hook status, when the line is currently ""on hook"""
|
|
583 |
* @test GT83-TDATA-013.06 Test opening a new call by specifying the name of a line
|
|
584 |
* @test GT83-TDATA-025.00 Test answering a call on a data line (Generic)
|
|
585 |
* @test GT83-TDATA-026.02 Test the ability to place an asynchronous request to hang up a data call
|
|
586 |
*/
|
|
587 |
{
|
|
588 |
INFO_PRINTF1(_L("Test Line Information"));
|
|
589 |
//to make sure that line and call will be closed in leave case
|
|
590 |
CleanupClosePushL(iLine);
|
|
591 |
CleanupClosePushL(iDataCall);
|
|
592 |
|
|
593 |
// Open a Data line and Call
|
|
594 |
//GT83-AT-021 Test opening a data line from a phone that supports data functionality
|
|
595 |
INFO_PRINTF1(_L("Opening Data Line"));
|
|
596 |
CHECK_POINT(iLine.Open(iPhone,KDataLineName), KErrNone, _L("GT83-TDATA-001.01"));
|
|
597 |
INFO_PRINTF1(_L("Opening New Data Call"));
|
|
598 |
CHECK_POINT(iDataCall.OpenNewCall(iLine), KErrNone, _L("GT83-TDATA-013.06"));
|
|
599 |
|
|
600 |
// Line Information
|
|
601 |
RLine::TLineInfo lineInfo;
|
|
602 |
TRAPD(ret, ret=iLine.GetInfo(lineInfo));
|
|
603 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-013.06"));
|
|
604 |
if (ret!=KErrNone)
|
|
605 |
{
|
|
606 |
INFO_PRINTF1(_L("Get Line Info. is NOT supported"));
|
|
607 |
}
|
|
608 |
else
|
|
609 |
{
|
|
610 |
INFO_PRINTF1(_L("Get Line Info is successful"));
|
|
611 |
CHECK_POINT(lineInfo.iHookStatus, RCall::EHookStatusOn, _L("GT83-TDATA-0")) ;
|
|
612 |
TESTL(lineInfo.iStatus == RCall::EStatusIdle) ;
|
|
613 |
INFO_PRINTF2(TRefByValue<const TDesC>(_L("Name of last call added: %S")), &lineInfo.iNameOfLastCallAdded);
|
|
614 |
}
|
|
615 |
|
|
616 |
// Hook status information
|
|
617 |
INFO_PRINTF1(_L("Retrieving Hook Status..."));
|
|
618 |
RCall::THookStatus hookStatus;
|
|
619 |
ret=iLine.GetHookStatus(hookStatus);
|
|
620 |
if (ret!=KErrNone)
|
|
621 |
{
|
|
622 |
INFO_PRINTF1(_L("Get Hook status is NOT supported"));
|
|
623 |
}
|
|
624 |
else
|
|
625 |
{
|
|
626 |
CHECK_POINT(hookStatus, RCall::EHookStatusOn, _L("GT83-TDATA-005.02")) ;
|
|
627 |
INFO_PRINTF1(_L("The line is currently ON Hook"));
|
|
628 |
}
|
|
629 |
|
|
630 |
// Post 'Answer a Call' Notifications
|
|
631 |
RMobileCall::TMobileDataCallParamsV1 callDataParams;
|
|
632 |
RMobileCall::TMobileDataCallParamsV1Pckg callDataParamsPckg(callDataParams);
|
|
633 |
|
|
634 |
|
|
635 |
callDataParams.iService = RMobileCall::EServiceDataCircuitAsync;
|
|
636 |
callDataParams.iSpeed = RMobileCall::ESpeed9600;
|
|
637 |
callDataParams.iProtocol = RMobileCall::EProtocolV32;
|
|
638 |
//callDataParams.iProtocol = RMobileCall::EProtocolIsdnMultimedia;
|
|
639 |
|
|
640 |
callDataParams.iQoS = RMobileCall::EQoSNonTransparent;
|
|
641 |
INFO_PRINTF1(_L("Please ring the phone "));
|
|
642 |
CallMeDear() ;
|
|
643 |
|
|
644 |
// Answer an incoming call initiated by t_echo.exe and obtain the call's current status
|
|
645 |
//GT83-AT-032 Test answering a call on a data line (Generic) RCall::AnswerIncomingCall
|
|
646 |
iDataCall.AnswerIncomingCall(iStatus, callDataParamsPckg);
|
|
647 |
|
|
648 |
WaitWithTimeout(iStatus,2*KTenSeconds); // but timeout after 60 seconds
|
|
649 |
CHECK_POINT(iStatus.Int(), KErrNone, _L("GT83-TDATA-025.00")) ;
|
|
650 |
|
|
651 |
// Count the no. of calls on the line & Get call info.
|
|
652 |
INFO_PRINTF1(_L("Retrieving no. of calls opened from the line.."));
|
|
653 |
TInt lineCount=0;
|
|
654 |
iLine.EnumerateCall(lineCount);
|
|
655 |
INFO_PRINTF2(TRefByValue<const TDesC>(_L("No of calls opened = %d")), lineCount);
|
|
656 |
|
|
657 |
INFO_PRINTF1(_L("Getting Call info.."));
|
|
658 |
RLine::TCallInfo callInfo;
|
|
659 |
ret=iLine.GetCallInfo(0,callInfo);
|
|
660 |
if (ret==KErrNotSupported)
|
|
661 |
{
|
|
662 |
INFO_PRINTF1(_L("Get Call information is NOT supported"));
|
|
663 |
}
|
|
664 |
if (ret==KErrNone)
|
|
665 |
{
|
|
666 |
INFO_PRINTF1(_L("Get Call information is successful"));
|
|
667 |
}
|
|
668 |
|
|
669 |
// Get the line's current hook status
|
|
670 |
ret=iLine.GetHookStatus(hookStatus);
|
|
671 |
if (ret!=KErrNone)
|
|
672 |
{
|
|
673 |
INFO_PRINTF1(_L("Get Hook status is NOT supported"));
|
|
674 |
}
|
|
675 |
else
|
|
676 |
{
|
|
677 |
CHECK_POINT(hookStatus, RCall::EHookStatusOff, _L("GT83-TDATA-005.01")) ;
|
|
678 |
INFO_PRINTF1(_L("The line is currently OFF Hook"));
|
|
679 |
}
|
|
680 |
|
|
681 |
INFO_PRINTF1(_L("Please stay connected... the test will hang up shortly"));
|
|
682 |
User::After(KTenSeconds);
|
|
683 |
|
|
684 |
INFO_PRINTF1(_L("Hanging up"));
|
|
685 |
iDataCall.HangUp(iStatus);
|
|
686 |
User::WaitForRequest(iStatus);
|
|
687 |
//CHECK_POINT(iStatus.Int(), KErrNone, _L("GT83-TDATA-026.02")) ;
|
|
688 |
|
|
689 |
//This test has some trobles with Erikson phones
|
|
690 |
//R520m could return KErrGeneral
|
|
691 |
//SH888 could return KErrTimedOut
|
|
692 |
INFO_PRINTF2(_L("iDataCall.HangUp() returned status %d"), iStatus.Int()) ;
|
|
693 |
|
|
694 |
// Close the line and call
|
|
695 |
//GT83-AT-022 Test closing a data line (Generic) RLine::Close
|
|
696 |
|
|
697 |
// Close the line and call
|
|
698 |
CleanupStack::PopAndDestroy(&iDataCall) ;
|
|
699 |
CleanupStack::PopAndDestroy(&iLine) ;
|
|
700 |
|
|
701 |
return TestStepResult();
|
|
702 |
}
|
|
703 |
//------------------------------------------------------------------
|
|
704 |
|
|
705 |
CTestLineNotificationsIncommingCall::CTestLineNotificationsIncommingCall()
|
|
706 |
/** Each test step initialises it's own name
|
|
707 |
*/
|
|
708 |
{
|
|
709 |
// store the name of this test case
|
|
710 |
// this is the name that is used by the script file
|
|
711 |
SetTestStepName(_L("TestLineNotificationsIncommingCall"));
|
|
712 |
}
|
|
713 |
//------------------------------------------------------------------
|
|
714 |
|
|
715 |
TVerdict CTestLineNotificationsIncommingCall::doTestStepL()
|
|
716 |
/** Tests line notifications
|
|
717 |
* @test GT83-TDATA-001.01 Test opening a data line from a phone that supports data functionality
|
|
718 |
* @test GT83-TDATA-008.01 Test setting notification of an incoming call on a data line
|
|
719 |
* @test GT83-TDATA-008.02 Test for a notification when there is an incoming call on a data line
|
|
720 |
* @test GT83-TDATA-009.01 Test setting notification of a change in hook status of a data line
|
|
721 |
* @test GT83-TDATA-009.02 "Test notification of a change in hook status of a data line from ""off"" to ""on"""
|
|
722 |
* @test GT83-TDATA-009.03 "Test notification of a change in hook status of a data line from ""on"" to off"""
|
|
723 |
* @test GT83-TDATA-010.01 Test setting notification of a change in the status of the data line
|
|
724 |
* @test GT83-TDATA-010.02 "Test notification of a change in the status of the data line from ""idle"" to ""ringing"" to ""answering"" to ""connected"" to ""hanging up"" to ""idle"""
|
|
725 |
* @test GT83-TDATA-011.01 Test setting notification of a call being added to a data line
|
|
726 |
* @test GT83-TDATA-014.05 Test opening an existing call from a data line by specifying the name of the line and the name of an existing call
|
|
727 |
* @test GT83-TDATA-025.00 Test answering a call on a data line (Generic)
|
|
728 |
* @test GT83-TDATA-032.01 Test setting a request for a notification of a change in the status of the mobile data line
|
|
729 |
* @test GT83-TDATA-032.07 "Test for a notification of a change in status of the mobile data line from ""connected"" to ""disconnecting"""
|
|
730 |
* @test GT83-TDATA-032.08 "Test for a notification of a change in status of the mobile data line from ""disconnecting"" to ""idle"""
|
|
731 |
* @test GT83-TDATA-032.09 "Test for a notification of a change in status of the mobile data line from ""idle"" to ""ringing"""
|
|
732 |
* @test GT83-TDATA-032.10 "Test for a notification of a change in status of the mobile data line from ""ringing"" to ""answering"""
|
|
733 |
* @test GT83-TDATA-032.11 "Test for a notification of a change in status of the mobile data line from ""answering"" to ""connected"""
|
|
734 |
*/
|
|
735 |
{
|
|
736 |
INFO_PRINTF1(_L("Test Line Notifications"));
|
|
737 |
|
|
738 |
//to make sure that line and call will be closed in leave case
|
|
739 |
CleanupClosePushL(iLine);
|
|
740 |
CleanupClosePushL(iDataCall);
|
|
741 |
|
|
742 |
TBuf<16> GoodNumber ;
|
|
743 |
GetGoodNumber(GoodNumber) ;
|
|
744 |
|
|
745 |
// NotifyIncomingCall and NotifyStatusChange
|
|
746 |
TName callName1;
|
|
747 |
TName callName2;
|
|
748 |
RCall::TStatus lineStatus;
|
|
749 |
RMobileCall::TMobileCallStatus mobileLineStatus;
|
|
750 |
RCall::THookStatus hookStatus;
|
|
751 |
RMobileCall::TMobileDataCallParamsV1 callDataParams;
|
|
752 |
RMobileCall::TMobileDataCallParamsV1Pckg callDataParamsPckg(callDataParams);
|
|
753 |
|
|
754 |
|
|
755 |
//GT83-AT-021 Test opening a data line from a phone that supports data functionality
|
|
756 |
INFO_PRINTF1(_L("Opening Data Line"));
|
|
757 |
CHECK_POINT(iLine.Open(iPhone,KDataLineName), KErrNone, _L("GT83-TDATA-001.01"));
|
|
758 |
|
|
759 |
INFO_PRINTF1(_L("Please ring the phone"));
|
|
760 |
|
|
761 |
iLine.NotifyIncomingCall(iStatus, callName1); // wait for a call
|
|
762 |
|
|
763 |
// @test GT83-AT-026 Test setting notification of a change in the status of the data line
|
|
764 |
iLine.NotifyStatusChange(iStatus2, lineStatus);
|
|
765 |
|
|
766 |
iLine.NotifyMobileLineStatusChange(iStatus3, mobileLineStatus);
|
|
767 |
|
|
768 |
// @test GT83-AT-037 Test setting notification of a change in hook status of a data line void RLine::NotifyHookChange(TRequestStatus& aStatus, THookStatus& aHookStatus) Function does not produce any unexpected errors. aStatus = KErrPending
|
|
769 |
iLine.NotifyHookChange(iStatus4, hookStatus);
|
|
770 |
|
|
771 |
/* @test GT83-AT-025 Test notification of a call being added to a data line */
|
|
772 |
iLine.NotifyCallAdded(iStatus5, callName2);
|
|
773 |
|
|
774 |
CHECK_POINT(iStatus.Int(), KRequestPending, _L("GT83-TDATA-008.01")) ;
|
|
775 |
CHECK_POINT(iStatus2.Int(), KRequestPending, _L("GT83-TDATA-010.02")) ;
|
|
776 |
CHECK_POINT(iStatus3.Int(), KRequestPending, _L("GT83-TDATA-032.01")) ;
|
|
777 |
CHECK_POINT(iStatus4.Int(), KRequestPending, _L("GT83-TDATA-011.01")) ;
|
|
778 |
CHECK_POINT(iStatus5.Int(), KRequestPending, _L("GT83-TDATA-009.01")) ;
|
|
779 |
|
|
780 |
CallMeDear() ;
|
|
781 |
|
|
782 |
WaitWithTimeout(iStatus,20*KOneSecond); // but timeout after 60 seconds
|
|
783 |
CHECK_POINT(iStatus.Int(), KErrNone, _L("GT83-TDATA-008.02")) ;
|
|
784 |
|
|
785 |
// @test GT83-AT-026 Test notification of a change in the status of the data line
|
|
786 |
// from "idle" to "ringing"
|
|
787 |
User::WaitForRequest(iStatus2);
|
|
788 |
CHECK_POINT(iStatus2.Int(), KErrNone, _L("GT83-TDATA-010.02")) ;
|
|
789 |
CHECK_POINT(lineStatus, RCall::EStatusRinging, _L("GT83-TDATA-010.02")) ;
|
|
790 |
|
|
791 |
User::WaitForRequest(iStatus3);
|
|
792 |
CHECK_POINT(iStatus3.Int(), KErrNone, _L("GT83-TDATA-032.09")) ;
|
|
793 |
CHECK_POINT(mobileLineStatus, RMobileCall::EStatusRinging, _L("GT83-TDATA-032.09")) ;
|
|
794 |
|
|
795 |
/* @test GT83-AT-025 Test notification of a call being added to a data line
|
|
796 |
that currently has no calls*/
|
|
797 |
User::WaitForRequest(iStatus5);
|
|
798 |
CHECK_POINT(iStatus5.Int(), KErrNone, _L("GT83-TDATA-009.011.01")) ;
|
|
799 |
CHECK_POINT(callName2 == callName1, 1, _L("GT83-TDATA-011")) ;
|
|
800 |
|
|
801 |
INFO_PRINTF1(_L("Phone is ringing... Now answering..."));
|
|
802 |
|
|
803 |
/* @test GT83-AT-026 Test notification of a change in the status of the data line from
|
|
804 |
"idle" to "ringing" to "answering" to "connected" to "hanging up" to "idle"
|
|
805 |
*/
|
|
806 |
iLine.NotifyStatusChange(iStatus2, lineStatus);
|
|
807 |
iLine.NotifyMobileLineStatusChange(iStatus3, mobileLineStatus);
|
|
808 |
|
|
809 |
iDataCall.OpenExistingCall(iLine, callName1);
|
|
810 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-014.05")) ;
|
|
811 |
|
|
812 |
callDataParams.iService = RMobileCall::EServiceDataCircuitAsync;
|
|
813 |
callDataParams.iSpeed = RMobileCall::ESpeed9600;
|
|
814 |
callDataParams.iProtocol = RMobileCall::EProtocolV32;
|
|
815 |
//callDataParams.iProtocol = RMobileCall::EProtocolIsdnMultimedia;
|
|
816 |
|
|
817 |
callDataParams.iQoS = RMobileCall::EQoSNonTransparent;
|
|
818 |
|
|
819 |
|
|
820 |
// Answer an incoming call initiated by t_echo.exe and obtain the call's current status
|
|
821 |
//GT83-AT-032 Test answering a call on a data line (Generic) RCall::AnswerIncomingCall
|
|
822 |
iDataCall.AnswerIncomingCall(iStatus, callDataParamsPckg);
|
|
823 |
// @test GT83-AT-026 Test notification of a change in the status of the data line
|
|
824 |
// from "ringing" to "answering"
|
|
825 |
User::WaitForRequest(iStatus2);
|
|
826 |
CHECK_POINT(iStatus2.Int(), KErrNone, _L("GT83-TDATA-010.01")) ;
|
|
827 |
CHECK_POINT(lineStatus, RCall::EStatusAnswering, _L("GT83-TDATA-010.01")) ;
|
|
828 |
|
|
829 |
User::WaitForRequest(iStatus3);
|
|
830 |
CHECK_POINT(iStatus3.Int(), KErrNone, _L("GT83-TDATA-032.10")) ;
|
|
831 |
CHECK_POINT(mobileLineStatus, RMobileCall::EStatusAnswering, _L("GT83-TDATA-032.10")) ;
|
|
832 |
|
|
833 |
WaitWithTimeout(iStatus,30*KOneSecond); // but timeout after 2 seconds
|
|
834 |
CHECK_POINT(iStatus.Int(), KErrNone, _L("GT83-TDATA-025.00")) ; //wrong code -2147483647
|
|
835 |
|
|
836 |
|
|
837 |
// @test GT83-AT-026 Test notification of a change in the status of the data line
|
|
838 |
// from "answering" to "connecting"
|
|
839 |
iLine.NotifyStatusChange(iStatus2, lineStatus);
|
|
840 |
User::WaitForRequest(iStatus2);
|
|
841 |
CHECK_POINT(iStatus2.Int(), KErrNone, _L("GT83-TDATA-010.01")) ;
|
|
842 |
CHECK_POINT(lineStatus, RCall::EStatusConnected, _L("GT83-TDATA-010.01")) ;
|
|
843 |
|
|
844 |
|
|
845 |
iLine.NotifyMobileLineStatusChange(iStatus3, mobileLineStatus);
|
|
846 |
User::WaitForRequest(iStatus3);
|
|
847 |
CHECK_POINT(iStatus3.Int(), KErrNone, _L("GT83-TDATA-032.11")) ;
|
|
848 |
CHECK_POINT(mobileLineStatus, RMobileCall::EStatusConnected, _L("GT83-TDATA-032.11")) ;
|
|
849 |
|
|
850 |
User::WaitForRequest(iStatus4);
|
|
851 |
CHECK_POINT(iStatus4.Int(), KErrNone, _L("GT83-TDATA-009.02")) ;
|
|
852 |
CHECK_POINT(hookStatus, RCall::EHookStatusOff, _L("GT83-TDATA-009.02")) ;
|
|
853 |
|
|
854 |
// now hangup call
|
|
855 |
iLine.NotifyStatusChange(iStatus2, lineStatus);
|
|
856 |
iLine.NotifyMobileLineStatusChange(iStatus3, mobileLineStatus);
|
|
857 |
iLine.NotifyHookChange(iStatus4, hookStatus);
|
|
858 |
|
|
859 |
INFO_PRINTF1(_L("Call connected - now hanging up..."));
|
|
860 |
iDataCall.HangUp(iStatus);
|
|
861 |
User::WaitForRequest(iStatus);
|
|
862 |
|
|
863 |
//This test has some trobles with Erikson phones
|
|
864 |
//R520m could return KErrGeneral
|
|
865 |
//SH888 could return KErrTimedOut
|
|
866 |
INFO_PRINTF2(_L("iDataCall.HangUp() returned status %d"), iStatus.Int()) ;
|
|
867 |
|
|
868 |
// @test GT83-AT-026 Test notification of a change in the status of the data line
|
|
869 |
// from "connecting" to "hanging up"
|
|
870 |
User::WaitForRequest(iStatus2);
|
|
871 |
CHECK_POINT(iStatus2.Int(), KErrNone, _L("GT83-TDATA-010.02")) ;
|
|
872 |
CHECK_POINT(lineStatus, RCall::EStatusHangingUp, _L("GT83-TDATA-010.02")) ;
|
|
873 |
|
|
874 |
User::WaitForRequest(iStatus3);
|
|
875 |
CHECK_POINT(iStatus3.Int(), KErrNone, _L("GT83-TDATA-032.07")) ;
|
|
876 |
CHECK_POINT(mobileLineStatus, RMobileCall::EStatusDisconnecting, _L("GT83-TDATA-032.07")) ;
|
|
877 |
|
|
878 |
// @test GT83-AT-026 Test notification of a change in the status of the data
|
|
879 |
// line from "hanging up" to "idle"
|
|
880 |
iLine.NotifyStatusChange(iStatus2, lineStatus);
|
|
881 |
User::WaitForRequest(iStatus2);
|
|
882 |
CHECK_POINT(iStatus2.Int(), KErrNone, _L("GT83-TDATA-010.02")) ;
|
|
883 |
CHECK_POINT(lineStatus, RCall::EStatusIdle, _L("GT83-TDATA-010.02")) ;
|
|
884 |
|
|
885 |
iLine.NotifyMobileLineStatusChange(iStatus3, mobileLineStatus);
|
|
886 |
User::WaitForRequest(iStatus3);
|
|
887 |
CHECK_POINT(iStatus3.Int(), KErrNone, _L("GT83-TDATA-032.08")) ;
|
|
888 |
CHECK_POINT(mobileLineStatus, RMobileCall::EStatusIdle, _L("GT83-TDATA-032.08")) ;
|
|
889 |
|
|
890 |
//!< @test GT83-AT-037 Test notification of a change in hook status of a data line
|
|
891 |
//!< from "off" to "on" aHookStatus = EHookStatusOff before the hook status changes,
|
|
892 |
//!< and EHookStatusOn after the hook status changes
|
|
893 |
User::WaitForRequest(iStatus4);
|
|
894 |
CHECK_POINT(iStatus4.Int(), KErrNone, _L("GT83-TDATA-009.03")) ;
|
|
895 |
CHECK_POINT(hookStatus, RCall::EHookStatusOn, _L("GT83-TDATA-009.03")) ;
|
|
896 |
//check that all request has been finished
|
|
897 |
TESTL(iStatus.Int()!= KRequestPending) ;
|
|
898 |
TESTL(iStatus2.Int() != KRequestPending) ;
|
|
899 |
TESTL(iStatus3.Int() != KRequestPending) ;
|
|
900 |
TESTL(iStatus4.Int() != KRequestPending) ;
|
|
901 |
TESTL(iStatus5.Int() != KRequestPending) ;
|
|
902 |
|
|
903 |
// Close the line and call
|
|
904 |
CleanupStack::PopAndDestroy(&iDataCall) ;
|
|
905 |
CleanupStack::PopAndDestroy(&iLine) ;
|
|
906 |
|
|
907 |
return TestStepResult();
|
|
908 |
}
|
|
909 |
//------------------------------------------------------------------
|
|
910 |
|
|
911 |
CTestLineNotificationsOutgoingCall::CTestLineNotificationsOutgoingCall()
|
|
912 |
/** Each test step initialises it's own name
|
|
913 |
*/
|
|
914 |
{
|
|
915 |
// store the name of this test case
|
|
916 |
// this is the name that is used by the script file
|
|
917 |
SetTestStepName(_L("TestLineNotificationsOutgoingCall"));
|
|
918 |
}
|
|
919 |
//------------------------------------------------------------------
|
|
920 |
|
|
921 |
TVerdict CTestLineNotificationsOutgoingCall::doTestStepL()
|
|
922 |
/** Tests line notifications
|
|
923 |
* @test GT83-TDATA-001.01 Test opening a data line from a phone that supports data functionality
|
|
924 |
* @test GT83-TDATA-009.02 "Test notification of a change in hook status of a data line from ""off"" to ""on"""
|
|
925 |
* @test GT83-TDATA-009.03 "Test notification of a change in hook status of a data line from ""on"" to off"""
|
|
926 |
* @test GT83-TDATA-010.03 "Test notification of a change in the status of the data line from ""idle"" to ""dialling"" to ""connecting"" to ""connected"" to ""hanging up"" to ""idle"""
|
|
927 |
* @test GT83-TDATA-014.05 Test opening an existing call from a data line by specifying the name of the line and the name of an existing call
|
|
928 |
* @test GT83-TDATA-032.02 "Test for a notification of a change in status of the mobile data line from ""idle"" to ""dialling"""
|
|
929 |
* @test GT83-TDATA-032.04 "Test for a notification of a change in status of the mobile data line from ""connecting"" to ""connected"""
|
|
930 |
* @test GT83-TDATA-032.07 "Test for a notification of a change in status of the mobile data line from ""connected"" to ""disconnecting"""
|
|
931 |
* @test GT83-TDATA-032.08 "Test for a notification of a change in status of the mobile data line from ""disconnecting"" to ""idle"""
|
|
932 |
*/
|
|
933 |
{
|
|
934 |
INFO_PRINTF1(_L("Test Line Notifications"));
|
|
935 |
|
|
936 |
//to make sure that line and call will be closed in leave case
|
|
937 |
CleanupClosePushL(iLine);
|
|
938 |
CleanupClosePushL(iDataCall);
|
|
939 |
StartNTRasSimulation();
|
|
940 |
|
|
941 |
TBuf<16> GoodNumber ;
|
|
942 |
GetGoodNumber(GoodNumber) ;
|
|
943 |
|
|
944 |
// NotifyIncomingCall and NotifyStatusChange
|
|
945 |
//TName callName1;
|
|
946 |
//TName callName2;
|
|
947 |
RCall::TStatus lineStatus;
|
|
948 |
RMobileCall::TMobileCallStatus mobileLineStatus;
|
|
949 |
RCall::THookStatus hookStatus;
|
|
950 |
RMobileCall::TMobileDataCallParamsV1 callDataParams;
|
|
951 |
RMobileCall::TMobileDataCallParamsV1Pckg callDataParamsPckg(callDataParams);
|
|
952 |
|
|
953 |
|
|
954 |
//GT83-AT-021 Test opening a data line from a phone that supports data functionality
|
|
955 |
INFO_PRINTF1(_L("Opening Data Line"));
|
|
956 |
CHECK_POINT(iLine.Open(iPhone,KDataLineName), KErrNone, _L("GT83-TDATA-001.01"));
|
|
957 |
|
|
958 |
CHECK_POINT(iDataCall.OpenNewCall(iLine), KErrNone, _L("GT83-TDATA-014.05")) ;
|
|
959 |
// Now test call status during an outgoing call
|
|
960 |
callDataParams.iService = RMobileCall::EServiceDataCircuitAsync;
|
|
961 |
callDataParams.iSpeed = RMobileCall::ESpeed9600;
|
|
962 |
callDataParams.iProtocol = RMobileCall::EProtocolV32;
|
|
963 |
callDataParams.iQoS = RMobileCall::EQoSNonTransparent;
|
|
964 |
|
|
965 |
iLine.NotifyStatusChange(iStatus2, lineStatus);
|
|
966 |
iLine.NotifyMobileLineStatusChange(iStatus3, mobileLineStatus);
|
|
967 |
iLine.NotifyHookChange(iStatus4, hookStatus);
|
|
968 |
|
|
969 |
INFO_PRINTF2(_L("Dialling %S...."), &GoodNumber);
|
|
970 |
iDataCall.Dial(iStatus, callDataParamsPckg, GoodNumber);
|
|
971 |
|
|
972 |
User::WaitForRequest(iStatus2);
|
|
973 |
CHECK_POINT(iStatus2.Int(), KErrNone, _L("GT83-TDATA-010.03")) ;
|
|
974 |
CHECK_POINT(lineStatus, RCall::EStatusDialling, _L("GT83-TDATA-010.03")) ;
|
|
975 |
|
|
976 |
User::WaitForRequest(iStatus3);
|
|
977 |
CHECK_POINT(iStatus3.Int(), KErrNone, _L("GT83-TDATA-032.02")) ;
|
|
978 |
CHECK_POINT(mobileLineStatus, RMobileCall::EStatusDialling, _L("GT83-TDATA-032.02")) ;
|
|
979 |
|
|
980 |
User::WaitForRequest(iStatus); //waiting for dial
|
|
981 |
CHECK_POINT(iStatus.Int(), KErrNone, _L("GT83-TDATA-0")) ;
|
|
982 |
|
|
983 |
User::WaitForRequest(iStatus4);
|
|
984 |
CHECK_POINT(iStatus4.Int(), KErrNone, _L("GT83-TDATA-009.03")) ;
|
|
985 |
CHECK_POINT(hookStatus, RCall::EHookStatusOff, _L("GT83-TDATA-009.03")) ;
|
|
986 |
|
|
987 |
iLine.NotifyStatusChange(iStatus2, lineStatus);
|
|
988 |
iLine.NotifyMobileLineStatusChange(iStatus3, mobileLineStatus);
|
|
989 |
|
|
990 |
#ifdef SIM_TSY
|
|
991 |
User::WaitForRequest(iStatus2);
|
|
992 |
CHECK_POINT(iStatus2.Int(), KErrNone, _L("GT83-TDATA-010.03")) ;
|
|
993 |
CHECK_POINT(lineStatus, RCall::EStatusConnecting, _L("GT83-TDATA-010.03")) ;
|
|
994 |
|
|
995 |
User::WaitForRequest(iStatus3);
|
|
996 |
CHECK_POINT(iStatus3.Int(), KErrNone, _L("GT83-TDATA-032.04")) ;
|
|
997 |
CHECK_POINT(mobileLineStatus, RMobileCall::EStatusConnecting, _L("GT83-TDATA-032.04")) ;
|
|
998 |
|
|
999 |
iLine.NotifyStatusChange(iStatus2, lineStatus);
|
|
1000 |
iLine.NotifyMobileLineStatusChange(iStatus3, mobileLineStatus);
|
|
1001 |
|
|
1002 |
#endif
|
|
1003 |
|
|
1004 |
User::WaitForRequest(iStatus2);
|
|
1005 |
CHECK_POINT(iStatus2.Int(), KErrNone, _L("GT83-TDATA-010.03")) ;
|
|
1006 |
CHECK_POINT(lineStatus, RCall::EStatusConnected, _L("GT83-TDATA-010.03")) ;
|
|
1007 |
|
|
1008 |
User::WaitForRequest(iStatus3);
|
|
1009 |
CHECK_POINT(iStatus3.Int(), KErrNone, _L("GT83-TDATA-032.04")) ;
|
|
1010 |
CHECK_POINT(mobileLineStatus, RMobileCall::EStatusConnected, _L("GT83-TDATA-032.04")) ;
|
|
1011 |
|
|
1012 |
|
|
1013 |
INFO_PRINTF1(_L("Call connected - hanging up..."));
|
|
1014 |
|
|
1015 |
iLine.NotifyStatusChange(iStatus2, lineStatus);
|
|
1016 |
iLine.NotifyMobileLineStatusChange(iStatus3, mobileLineStatus);
|
|
1017 |
iLine.NotifyHookChange(iStatus4, hookStatus);
|
|
1018 |
|
|
1019 |
//HANG UP
|
|
1020 |
User::After(10*KOneSecond);
|
|
1021 |
iDataCall.HangUp(iStatus);
|
|
1022 |
User::WaitForRequest(iStatus);
|
|
1023 |
//CHECK_POINT(iStatus.Int(), KErrNone, _L("GT83-TDATA-0")) ;
|
|
1024 |
|
|
1025 |
//This test has some trobles with Erikson phones
|
|
1026 |
//R520m could return KErrGeneral
|
|
1027 |
//SH888 could return KErrTimedOut
|
|
1028 |
INFO_PRINTF2(_L("iDataCall.HangUp() returned status %d"), iStatus.Int()) ;
|
|
1029 |
|
|
1030 |
User::WaitForRequest(iStatus2);
|
|
1031 |
CHECK_POINT(iStatus2.Int(), KErrNone, _L("GT83-TDATA-010.03")) ;
|
|
1032 |
CHECK_POINT(lineStatus, RCall::EStatusHangingUp, _L("GT83-TDATA-010.03")) ;
|
|
1033 |
|
|
1034 |
User::WaitForRequest(iStatus3);
|
|
1035 |
CHECK_POINT(iStatus3.Int(), KErrNone, _L("GT83-TDATA-032.07")) ;
|
|
1036 |
CHECK_POINT(mobileLineStatus, RMobileCall::EStatusDisconnecting, _L("GT83-TDATA-032.07")) ;
|
|
1037 |
|
|
1038 |
/* @test GT83-AT-037 Test notification of a change in hook status of a data
|
|
1039 |
line from "on" to off" aHookStatus = EHookStatusOn before the hook status changes,
|
|
1040 |
*/
|
|
1041 |
User::WaitForRequest(iStatus4);
|
|
1042 |
CHECK_POINT(iStatus4.Int(), KErrNone, _L("GT83-TDATA-009.02")) ;
|
|
1043 |
CHECK_POINT(hookStatus, RCall::EHookStatusOn, _L("GT83-TDATA-009.02")) ;
|
|
1044 |
|
|
1045 |
iLine.NotifyStatusChange(iStatus2, lineStatus);
|
|
1046 |
iLine.NotifyMobileLineStatusChange(iStatus3, mobileLineStatus);
|
|
1047 |
|
|
1048 |
User::WaitForRequest(iStatus2);
|
|
1049 |
CHECK_POINT(iStatus2.Int(), KErrNone, _L("GT83-TDATA-010.03")) ;
|
|
1050 |
CHECK_POINT(lineStatus, RCall::EStatusIdle, _L("GT83-TDATA-010.03")) ;
|
|
1051 |
|
|
1052 |
User::WaitForRequest(iStatus3);
|
|
1053 |
CHECK_POINT(iStatus3.Int(), KErrNone, _L("GT83-TDATA-032.08")) ;
|
|
1054 |
CHECK_POINT(mobileLineStatus, RMobileCall::EStatusIdle, _L("GT83-TDATA-032.08")) ;
|
|
1055 |
|
|
1056 |
TESTL(iStatus != KRequestPending) ;
|
|
1057 |
TESTL(iStatus2 != KRequestPending) ;
|
|
1058 |
TESTL(iStatus3 != KRequestPending) ;
|
|
1059 |
TESTL(iStatus4 != KRequestPending) ;
|
|
1060 |
|
|
1061 |
// Close the line and call
|
|
1062 |
CleanupStack::PopAndDestroy(&iDataCall) ;
|
|
1063 |
CleanupStack::PopAndDestroy(&iLine) ;
|
|
1064 |
|
|
1065 |
return TestStepResult();
|
|
1066 |
}
|
|
1067 |
//------------------------------------------------------------------
|
|
1068 |
|
|
1069 |
CTestLineCancels::CTestLineCancels()
|
|
1070 |
/** Each test step initialises it's own name
|
|
1071 |
*/
|
|
1072 |
{
|
|
1073 |
// store the name of this test case
|
|
1074 |
// this is the name that is used by the script file
|
|
1075 |
SetTestStepName(_L("TestLineCancels"));
|
|
1076 |
}
|
|
1077 |
//------------------------------------------------------------------
|
|
1078 |
|
|
1079 |
TVerdict CTestLineCancels::doTestStepL()
|
|
1080 |
/**
|
|
1081 |
* @test GT83-TDATA-001.01 Test opening a data line from a phone that supports data functionality
|
|
1082 |
* @test GT83-TDATA-008.02 Test for a notification when there is an incoming call on a data line
|
|
1083 |
* @test GT83-TDATA-008.03 Test the ability to cancel the notification of an incoming call on a data line
|
|
1084 |
* @test GT83-TDATA-009.01 Test setting notification of a change in hook status of a data line
|
|
1085 |
* @test GT83-TDATA-009.04 Test the ability to cancel a notification of a change in hook status of a data line
|
|
1086 |
* @test GT83-TDATA-010.02 "Test notification of a change in the status of the data line from ""idle"" to ""ringing"" to ""answering"" to ""connected"" to ""hanging up"" to ""idle"""
|
|
1087 |
* @test GT83-TDATA-010.04 Test the ability to cancel the notification of a change in the status of the data line
|
|
1088 |
* @test GT83-TDATA-011.01 Test setting notification of a call being added to a data line
|
|
1089 |
* @test GT83-TDATA-011.03 Test the ability to cancel a notification of a call being added to a data line
|
|
1090 |
*/
|
|
1091 |
{
|
|
1092 |
INFO_PRINTF1(_L("Test Line Cancels"));
|
|
1093 |
|
|
1094 |
//to make sure that line and call will be closed in leave case
|
|
1095 |
CleanupClosePushL(iLine);
|
|
1096 |
CleanupClosePushL(iDataCall);
|
|
1097 |
|
|
1098 |
// Notify Incoming Call
|
|
1099 |
TName callName;
|
|
1100 |
//GT83-AT-021 Test opening a data line from a phone that supports data functionality
|
|
1101 |
INFO_PRINTF1(_L("Opening Data Line"));
|
|
1102 |
CHECK_POINT(iLine.Open(iPhone,KDataLineName), KErrNone, _L("GT83-TDATA-001.01"));
|
|
1103 |
|
|
1104 |
iLine.NotifyIncomingCall(iStatus, callName);
|
|
1105 |
CHECK_POINT(iStatus.Int(), KRequestPending, _L("GT83-TDATA-008.02")) ;
|
|
1106 |
iLine.NotifyIncomingCallCancel();
|
|
1107 |
User::WaitForRequest(iStatus);
|
|
1108 |
CHECK_POINT(iStatus.Int(), KErrCancel, _L("GT83-TDATA-008.03")) ;
|
|
1109 |
|
|
1110 |
// Notify Status Change
|
|
1111 |
RCall::TStatus lineStatus;
|
|
1112 |
iLine.NotifyStatusChange(iStatus, lineStatus);
|
|
1113 |
CHECK_POINT(iStatus.Int(), KRequestPending, _L("GT83-TDATA-010.02")) ;
|
|
1114 |
User::After(KTenPartOfSec); //snack some sleep
|
|
1115 |
/** @test GT83-AT-026 Test the ability to cancel the notification of a change in the
|
|
1116 |
status of the data line aStatus = KErrCancel provided that the function
|
|
1117 |
being cancelled has not already completed */
|
|
1118 |
iLine.NotifyStatusChangeCancel();
|
|
1119 |
User::WaitForRequest(iStatus);
|
|
1120 |
CHECK_POINT(iStatus.Int(), KErrCancel, _L("GT83-TDATA-010.04")) ;
|
|
1121 |
#if 0 //cancel functions don't work yet (?)
|
|
1122 |
//any way they are not declared 27.09.2001
|
|
1123 |
// Notify Mobile Status Change
|
|
1124 |
RMobileCall::TMobileCallStatus lineStatus2;
|
|
1125 |
iLine.NotifyMobileLineStatusChange(iStatus, lineStatus2);
|
|
1126 |
CHECK_POINT(iStatus.Int(), KRequestPending, _L("GT83-TDATA-0")) ;
|
|
1127 |
iLine.NotifyMobileLineStatusChangeCancel();
|
|
1128 |
User::WaitForRequest(iStatus);
|
|
1129 |
CHECK_POINT(iStatus.Int(), KErrCancel, _L("GT83-TDATA-0")) ;
|
|
1130 |
#endif
|
|
1131 |
// Notify Hook Change
|
|
1132 |
RCall::THookStatus hookStatus;
|
|
1133 |
iLine.NotifyHookChange(iStatus, hookStatus);
|
|
1134 |
CHECK_POINT(iStatus.Int(), KRequestPending, _L("GT83-TDATA-009.01")) ;
|
|
1135 |
User::After(KTenPartOfSec); //snack some sleep
|
|
1136 |
// @test GT83-AT-037 Test the ability to cancel a notification of a
|
|
1137 |
// change in hook status of a data line
|
|
1138 |
// aStatus = KErrCancel provided that the function being cancelled has not already completed
|
|
1139 |
iLine.NotifyHookChangeCancel();
|
|
1140 |
User::WaitForRequest(iStatus);
|
|
1141 |
CHECK_POINT(iStatus.Int(), KErrCancel, _L("GT83-TDATA-009.04")) ;
|
|
1142 |
|
|
1143 |
// Notify Call Added
|
|
1144 |
iLine.NotifyCallAdded(iStatus, callName);
|
|
1145 |
CHECK_POINT(iStatus.Int(), KRequestPending, _L("GT83-TDATA-011.01")) ;
|
|
1146 |
User::After(KTenPartOfSec); //snack some sleep
|
|
1147 |
/** GT83-AT-025 Test the ability to cancel a notification of a call being added
|
|
1148 |
to a data line*/
|
|
1149 |
iLine.NotifyCallAddedCancel();
|
|
1150 |
User::WaitForRequest(iStatus);
|
|
1151 |
CHECK_POINT(iStatus.Int(), KErrCancel, _L("GT83-TDATA-011.03")) ;
|
|
1152 |
|
|
1153 |
// Close the line and call
|
|
1154 |
CleanupStack::PopAndDestroy(&iDataCall) ;
|
|
1155 |
CleanupStack::PopAndDestroy(&iLine) ;
|
|
1156 |
|
|
1157 |
return TestStepResult();
|
|
1158 |
}
|
|
1159 |
//------------------------------------------------------------------
|
|
1160 |
|
|
1161 |
CTestCallInfo::CTestCallInfo()
|
|
1162 |
/** Each test step initialises it's own name
|
|
1163 |
*/
|
|
1164 |
{
|
|
1165 |
// store the name of this test case
|
|
1166 |
// this is the name that is used by the script file
|
|
1167 |
SetTestStepName(_L("TestCallInfo"));
|
|
1168 |
}
|
|
1169 |
//------------------------------------------------------------------
|
|
1170 |
|
|
1171 |
TVerdict CTestCallInfo::doTestStepL()
|
|
1172 |
/**
|
|
1173 |
* This function gets information pertaining to a call:
|
|
1174 |
* Bearer Service Information, Call duration, Remote Party Information (if available)
|
|
1175 |
* @test GT83-TDATA-001.01 Test opening a data line from a phone that supports data functionality
|
|
1176 |
* @test GT83-TDATA-009.02 "Test notification of a change in hook status of a data line from ""off"" to ""on"""
|
|
1177 |
* @test GT83-TDATA-013.06 Test opening a new call by specifying the name of a line
|
|
1178 |
* @test GT83-TDATA-018.01 "Test retrieval of the bearer service info of a call. Display to screen, all the bearer service information associated with the call."
|
|
1179 |
* @test GT83-TDATA-022.01 Test retrieval of the duration of a data call. Display the call duration to screen
|
|
1180 |
* @test GT83-TDATA-023.01 Test the ability to get the current call information of the data call. Display the call information to screen.
|
|
1181 |
* @test GT83-TDATA-025.00 Test answering a call on a data line (Generic)
|
|
1182 |
*/
|
|
1183 |
{
|
|
1184 |
INFO_PRINTF1(_L("Test Call Information"));
|
|
1185 |
|
|
1186 |
//to make sure that line and call will be closed in leave case
|
|
1187 |
CleanupClosePushL(iLine);
|
|
1188 |
CleanupClosePushL(iDataCall);
|
|
1189 |
|
|
1190 |
// Open a Data line and Call
|
|
1191 |
//GT83-AT-021 Test opening a data line from a phone that supports data functionality
|
|
1192 |
|
|
1193 |
RMobileCall::TMobileDataCallParamsV1 callDataParams;
|
|
1194 |
RMobileCall::TMobileDataCallParamsV1Pckg callDataParamsPckg(callDataParams);
|
|
1195 |
|
|
1196 |
INFO_PRINTF1(_L("Opening Data Line"));
|
|
1197 |
CHECK_POINT(iLine.Open(iPhone,KDataLineName), KErrNone, _L("GT83-TDATA-001.01"));
|
|
1198 |
INFO_PRINTF1(_L("Opening New Data Call"));
|
|
1199 |
CHECK_POINT(iDataCall.OpenNewCall(iLine), KErrNone, _L("GT83-TDATA-013.06"));
|
|
1200 |
//get status
|
|
1201 |
//GT83-AT-026 Test retrieval of a data line's current status.
|
|
1202 |
RCall::TStatus callStatus;
|
|
1203 |
CHECK_POINT(iDataCall.GetStatus(callStatus), KErrNone, _L("GT83-TD-015.02")) ;
|
|
1204 |
CHECK_POINT(callStatus, RCall::EStatusIdle, _L("GT83-TD-015.02")) ;
|
|
1205 |
|
|
1206 |
INFO_PRINTF2(_L("Call Status = %d"), callStatus);
|
|
1207 |
Print_RCall_TStatus(callStatus) ;
|
|
1208 |
|
|
1209 |
|
|
1210 |
callDataParams.iService = RMobileCall::EServiceDataCircuitAsync;
|
|
1211 |
callDataParams.iSpeed = RMobileCall::ESpeed9600;
|
|
1212 |
callDataParams.iProtocol = RMobileCall::EProtocolV32;
|
|
1213 |
callDataParams.iQoS = RMobileCall::EQoSNonTransparent;
|
|
1214 |
|
|
1215 |
|
|
1216 |
// Wait for an incoming call, then get the Call BearerServiceInfo. The
|
|
1217 |
// Bearer Service Info is only available if the call is currently active
|
|
1218 |
INFO_PRINTF1(_L("Please ring the phone"));
|
|
1219 |
|
|
1220 |
CallMeDear() ;
|
|
1221 |
|
|
1222 |
// Answer an incoming call initiated by t_echo.exe and obtain the call's current status
|
|
1223 |
//GT83-AT-032 Test answering a call on a data line (Generic) RCall::AnswerIncomingCall
|
|
1224 |
iDataCall.AnswerIncomingCall(iStatus, callDataParamsPckg);
|
|
1225 |
|
|
1226 |
WaitWithTimeout(iStatus,20*KOneSecond); // but timeout after 60 seconds
|
|
1227 |
CHECK_POINT(iStatus.Int(), KErrNone, _L("GT83-TDATA-025.00")) ;
|
|
1228 |
|
|
1229 |
// User Information
|
|
1230 |
INFO_PRINTF1(_L("The call is now connected. Retrieving Call Information."));
|
|
1231 |
|
|
1232 |
// Bearer Service Information
|
|
1233 |
INFO_PRINTF1(_L("Get Bearer Service Info..."));
|
|
1234 |
RCall::TBearerService bearerServiceInfo;
|
|
1235 |
TInt ret=iDataCall.GetBearerServiceInfo(bearerServiceInfo);
|
|
1236 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-018.01")) ;
|
|
1237 |
if (ret==KErrNotSupported)
|
|
1238 |
INFO_PRINTF1(_L("Get BearerService Information is NOT Supported"));
|
|
1239 |
if (ret==KErrNone)
|
|
1240 |
INFO_PRINTF1(_L("Get BearerService Information is successful"));
|
|
1241 |
|
|
1242 |
// Get Call Information
|
|
1243 |
INFO_PRINTF1(_L("Get Current Call Info..."));
|
|
1244 |
ret=iDataCall.GetInfo(iCallInfo);
|
|
1245 |
#ifndef SIM_TSY
|
|
1246 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-023.01")) ;
|
|
1247 |
#endif
|
|
1248 |
if (ret==KErrNotSupported)
|
|
1249 |
{
|
|
1250 |
INFO_PRINTF1(_L("Get Current Call info is NOT Supported"));
|
|
1251 |
}
|
|
1252 |
if (ret==KErrNone)
|
|
1253 |
{
|
|
1254 |
INFO_PRINTF1(_L("Displaying Information about the Current Call"));
|
|
1255 |
INFO_PRINTF2(TRefByValue<const TDesC>(_L("Call name: %S")), &iCallInfo.iCallName);
|
|
1256 |
INFO_PRINTF2(TRefByValue<const TDesC>(_L("Line name: %S")), &iCallInfo.iLineName);
|
|
1257 |
if (iCallInfo.iHookStatus==RCall::EHookStatusOff)
|
|
1258 |
{
|
|
1259 |
INFO_PRINTF1(_L("Current Hook Status: Off"));
|
|
1260 |
}
|
|
1261 |
if (iCallInfo.iStatus==RCall::EStatusConnected)
|
|
1262 |
{
|
|
1263 |
INFO_PRINTF1(_L("Current Call Status: Connected"));
|
|
1264 |
}
|
|
1265 |
INFO_PRINTF2(TRefByValue<const TDesC>(_L("Call Duration: %d seconds")), iCallInfo.iDuration.Int());
|
|
1266 |
}
|
|
1267 |
|
|
1268 |
//Get Remote Party Info (PDEF108459)
|
|
1269 |
RMobileCall::TMobileCallRemotePartyInfoV1 remoteParty;
|
|
1270 |
RMobileCall::TMobileCallRemotePartyInfoV1Pckg remotePartyPckg(remoteParty);
|
|
1271 |
|
|
1272 |
TRequestStatus reqStatus;
|
|
1273 |
iDataCall.NotifyRemotePartyInfoChange(reqStatus, remotePartyPckg);
|
|
1274 |
User::WaitForRequest(reqStatus);
|
|
1275 |
|
|
1276 |
TESTL(reqStatus == KErrNone);
|
|
1277 |
|
|
1278 |
if (remoteParty.iRemoteIdStatus == RMobileCall::ERemoteIdentityAvailable)
|
|
1279 |
{
|
|
1280 |
INFO_PRINTF1(_L("Displaying Remote Party Information about the Current Call"));
|
|
1281 |
_LIT(KCallingName, "Calling Name : %S");
|
|
1282 |
INFO_PRINTF2(KCallingName, &remoteParty.iCallingName);
|
|
1283 |
_LIT(KRemoteNumber, "Remote Number : %S");
|
|
1284 |
INFO_PRINTF2(KRemoteNumber, &remoteParty.iRemoteNumber.iTelNumber);
|
|
1285 |
}
|
|
1286 |
else
|
|
1287 |
{
|
|
1288 |
_LIT(KRemoteIdentityNotAvilable,"Remote Identity is not available.");
|
|
1289 |
INFO_PRINTF1(KRemoteIdentityNotAvilable);
|
|
1290 |
}
|
|
1291 |
|
|
1292 |
// Hang up the Call
|
|
1293 |
INFO_PRINTF1(_L("Please stay connected... the test will hang up shortly"));
|
|
1294 |
User::After(5*KOneSecond);
|
|
1295 |
|
|
1296 |
// Call Duration
|
|
1297 |
INFO_PRINTF1(_L("Get Call Duration..."));
|
|
1298 |
TTimeIntervalSeconds callDuration2;
|
|
1299 |
ret=iDataCall.GetCallDuration(callDuration2);
|
|
1300 |
#ifndef SIM_TSY
|
|
1301 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-022.01")) ;
|
|
1302 |
#endif
|
|
1303 |
if (ret==KErrNotSupported)
|
|
1304 |
{
|
|
1305 |
INFO_PRINTF1(_L("Get Current Call Duration is NOT Supported"));
|
|
1306 |
}
|
|
1307 |
if (ret==KErrNone)
|
|
1308 |
{
|
|
1309 |
INFO_PRINTF2(TRefByValue<const TDesC>(_L("Call duration = %d")), callDuration2.Int());
|
|
1310 |
}
|
|
1311 |
|
|
1312 |
iDataCall.HangUp(iStatus);
|
|
1313 |
User::WaitForRequest(iStatus);
|
|
1314 |
//CHECK_POINT(iStatus.Int(), KErrNone, _L("GT83-TDATA-009.02")) ;
|
|
1315 |
|
|
1316 |
//This test has some trobles with Erikson phones
|
|
1317 |
//R520m could return KErrGeneral
|
|
1318 |
//SH888 could return KErrTimedOut
|
|
1319 |
INFO_PRINTF2(_L("iDataCall.HangUp() returned status %d"), iStatus.Int()) ;
|
|
1320 |
|
|
1321 |
// Close the line and call
|
|
1322 |
CleanupStack::PopAndDestroy(&iDataCall) ;
|
|
1323 |
CleanupStack::PopAndDestroy(&iLine) ;
|
|
1324 |
|
|
1325 |
return TestStepResult();
|
|
1326 |
}
|
|
1327 |
//------------------------------------------------------------------
|
|
1328 |
|
|
1329 |
CTestCallNotifications::CTestCallNotifications()
|
|
1330 |
/** Each test step initialises it's own name
|
|
1331 |
*/
|
|
1332 |
{
|
|
1333 |
// store the name of this test case
|
|
1334 |
// this is the name that is used by the script file
|
|
1335 |
SetTestStepName(_L("TestCallNotifications"));
|
|
1336 |
}
|
|
1337 |
//------------------------------------------------------------------
|
|
1338 |
|
|
1339 |
TVerdict CTestCallNotifications::doTestStepL()
|
|
1340 |
/**
|
|
1341 |
* @test GT83-TDATA-001.01 Test opening a data line from a phone that supports data functionality
|
|
1342 |
* @test GT83-TDATA-002.01 Test retrieval of a data line's capabilities. Display the capabilities to screen
|
|
1343 |
* @test GT83-TDATA-008.01 Test setting notification of an incoming call on a data line
|
|
1344 |
* @test GT83-TDATA-009.02 "Test notification of a change in hook status of a data line from ""off"" to ""on"""
|
|
1345 |
* @test GT83-TDATA-009.03 "Test notification of a change in hook status of a data line from ""on"" to off"""
|
|
1346 |
* @test GT83-TDATA-013.06 Test opening a new call by specifying the name of a line
|
|
1347 |
* @test GT83-TDATA-014.05 Test opening an existing call from a data line by specifying the name of the line and the name of an existing call
|
|
1348 |
* @test GT83-TDATA-015.04 "Test retrieval of the current call status when the call's status is ""ringing"""
|
|
1349 |
* @test GT83-TDATA-015.05 "Test retrieval of the current call status when the call's status is ""answering"""
|
|
1350 |
* @test GT83-TDATA-017.02 Test notification of a change in the call's capabilities. Print the call's capabilities to screen
|
|
1351 |
* @test GT83-TDATA-020.02 "Test notification of a change in the status of the data call from ""idle"" to ""ringing"" to ""answering"" to ""connected"" to ""hanging up"" to ""idle"""
|
|
1352 |
* @test GT83-TDATA-021.01 Test setting notification of a change in the data call's duration
|
|
1353 |
* @test GT83-TDATA-025.00 Test answering a call on a data line (Generic)
|
|
1354 |
* @test GT83-TDATA-034.01 Test setting notification of a change in the call's dynamic call control and call event capabilities
|
|
1355 |
* @test GT83-TDATA-034.02 Test notification of a change in the call's dynamic call control and call event capabilities. Print the call's capabilities to screen
|
|
1356 |
* @test GT83-TDATA-035.04 "Test retrieval of the current status of the data call when the call's status is ""ringing"""
|
|
1357 |
* @test GT83-TDATA-036.07 "Test for a notification of a change in status of the mobile data call from ""connected"" to ""disconnecting"""
|
|
1358 |
* @test GT83-TDATA-036.08 "Test for a notification of a change in status of the mobile data call from ""disconnecting"" to ""idle"""
|
|
1359 |
* @test GT83-TDATA-036.10 "Test for a notification of a change in status of the mobile data call from ""ringing"" to ""answering"""
|
|
1360 |
* @test GT83-TDATA-036.11 "Test for a notification of a change in status of the mobile data call from ""answering"" to ""connected"""
|
|
1361 |
*/
|
|
1362 |
|
|
1363 |
{
|
|
1364 |
// Post call status change notifications
|
|
1365 |
INFO_PRINTF1(_L("Test Call Notifications"));
|
|
1366 |
|
|
1367 |
//to make sure that line and call will be closed in leave case
|
|
1368 |
CleanupClosePushL(iLine);
|
|
1369 |
CleanupClosePushL(iDataCall);
|
|
1370 |
|
|
1371 |
TName callName1;
|
|
1372 |
RMobileCall::TMobileDataCallParamsV1 callDataParams;
|
|
1373 |
RMobileCall::TMobileDataCallParamsV1Pckg callDataParamsPckg(callDataParams);
|
|
1374 |
|
|
1375 |
RCall::TStatus callStatus;
|
|
1376 |
RMobileCall::TMobileCallStatus mobileCallStatus;
|
|
1377 |
|
|
1378 |
RCall::TCaps caps;
|
|
1379 |
RCall::THookStatus hookStatus;
|
|
1380 |
TTimeIntervalSeconds time;
|
|
1381 |
|
|
1382 |
RMobileCall::TMobileCallCapsV1 mobileCallCaps;
|
|
1383 |
RMobileCall::TMobileCallCapsV1Pckg mobileCallCapsPckg(mobileCallCaps);
|
|
1384 |
|
|
1385 |
// Open a Data line and Call
|
|
1386 |
//GT83-AT-021 Test opening a data line from a phone that supports data functionality
|
|
1387 |
INFO_PRINTF1(_L("Opening Data Line"));
|
|
1388 |
CHECK_POINT(iLine.Open(iPhone,KDataLineName), KErrNone, _L("GT83-TDATA-001.01"));
|
|
1389 |
|
|
1390 |
INFO_PRINTF1(_L("Please ring the phone"));
|
|
1391 |
|
|
1392 |
iLine.NotifyIncomingCall(iStatus, callName1); // wait for a call
|
|
1393 |
CHECK_POINT(iStatus.Int(), KRequestPending, _L("GT83-TDATA-008.01")) ;
|
|
1394 |
|
|
1395 |
CallMeDear() ;
|
|
1396 |
|
|
1397 |
WaitWithTimeout(iStatus,20*KOneSecond); // but timeout after 60 seconds
|
|
1398 |
CHECK_POINT(iStatus.Int(), KErrNone, _L("GT83-TDATA-008.01")) ;
|
|
1399 |
|
|
1400 |
TInt ret = iDataCall.OpenExistingCall(iLine, callName1);
|
|
1401 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-014.05")) ;
|
|
1402 |
|
|
1403 |
iDataCall.GetStatus(callStatus);
|
|
1404 |
CHECK_POINT(callStatus, RCall::EStatusRinging, _L("GT83-TDATA-015.04")) ;
|
|
1405 |
iDataCall.GetMobileCallStatus(mobileCallStatus);
|
|
1406 |
CHECK_POINT(mobileCallStatus, RMobileCall::EStatusRinging, _L("GT83-TDATA-035.04")) ;
|
|
1407 |
|
|
1408 |
ret=iDataCall.GetCaps(caps);
|
|
1409 |
Print_TCapsEnum(caps) ;
|
|
1410 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-002.01")) ;
|
|
1411 |
TESTL(caps.iFlags & (RCall::KCapsData | RCall::KCapsAnswer));
|
|
1412 |
|
|
1413 |
// INFO_PRINTF1(_L("Opening New Data Call"));
|
|
1414 |
// CHECK_POINT(iiDataCall.OpenExistingCall(iLine, callName2), KErrNone, _L("GT83-TDATA-013.06")) ;
|
|
1415 |
|
|
1416 |
iDataCall.NotifyStatusChange(iStatus2, callStatus);
|
|
1417 |
iDataCall.NotifyMobileCallStatusChange(iStatus3, mobileCallStatus);
|
|
1418 |
iDataCall.NotifyCapsChange(iStatus4, caps);
|
|
1419 |
iDataCall.NotifyHookChange(iStatus5, hookStatus);
|
|
1420 |
iDataCall.NotifyCallDurationChange(iStatus6, time) ;
|
|
1421 |
iDataCall.NotifyMobileCallCapsChange(iStatus7, mobileCallCapsPckg);
|
|
1422 |
|
|
1423 |
INFO_PRINTF1(_L("Phone is ringing... Now answering..."));
|
|
1424 |
|
|
1425 |
callDataParams.iService = RMobileCall::EServiceDataCircuitAsync;
|
|
1426 |
callDataParams.iSpeed = RMobileCall::ESpeed9600;
|
|
1427 |
callDataParams.iProtocol = RMobileCall::EProtocolV32;
|
|
1428 |
//callDataParams.iProtocol = RMobileCall::EProtocolIsdnMultimedia;
|
|
1429 |
callDataParams.iQoS = RMobileCall::EQoSNonTransparent;
|
|
1430 |
//GT83-AT-032 Test answering a call on a data line (Generic) RCall::AnswerIncomingCall
|
|
1431 |
iDataCall.AnswerIncomingCall(iStatus, callDataParamsPckg);
|
|
1432 |
|
|
1433 |
iDataCall.GetStatus(callStatus);
|
|
1434 |
#ifndef SIM_TSY
|
|
1435 |
CHECK_POINT(callStatus, RCall::EStatusRinging, _L("GT83-TDATA-015.05")) ;
|
|
1436 |
#else
|
|
1437 |
CHECK_POINT(callStatus, RCall::EStatusAnswering, _L("GT83-TDATA-015.05")) ;
|
|
1438 |
#endif
|
|
1439 |
WaitWithTimeout(iStatus,20*KOneSecond); // but timeout after 2 seconds
|
|
1440 |
CHECK_POINT(iStatus.Int(), KErrNone, _L("GT83-TDATA-025.00")) ;
|
|
1441 |
|
|
1442 |
|
|
1443 |
//iDataCall.NotifyStatusChange(iStatus2, callStatus);
|
|
1444 |
User::WaitForRequest(iStatus2);
|
|
1445 |
CHECK_POINT(iStatus2.Int(), KErrNone, _L("GT83-TDATA-020.02")) ;
|
|
1446 |
CHECK_POINT(callStatus, RCall::EStatusAnswering, _L("GT83-TDATA-020.10")) ;
|
|
1447 |
|
|
1448 |
User::WaitForRequest(iStatus3);
|
|
1449 |
CHECK_POINT(iStatus3.Int(), KErrNone, _L("GT83-TDATA-036.10")) ;
|
|
1450 |
CHECK_POINT(mobileCallStatus, RMobileCall::EStatusAnswering, _L("GT83-TDATA-036.10")) ;
|
|
1451 |
|
|
1452 |
iDataCall.NotifyStatusChange(iStatus2, callStatus);
|
|
1453 |
User::WaitForRequest(iStatus2);
|
|
1454 |
CHECK_POINT(iStatus2.Int(), KErrNone, _L("GT83-TDATA-020.02")) ;
|
|
1455 |
CHECK_POINT(callStatus, RCall::EStatusConnected, _L("GT83-TDATA-020.02")) ;
|
|
1456 |
|
|
1457 |
iDataCall.NotifyMobileCallStatusChange(iStatus3, mobileCallStatus);
|
|
1458 |
User::WaitForRequest(iStatus3);
|
|
1459 |
CHECK_POINT(iStatus3.Int(), KErrNone, _L("GT83-TDATA-036.11")) ;
|
|
1460 |
CHECK_POINT(mobileCallStatus, RMobileCall::EStatusConnected, _L("GT83-TDATA-036.11")) ;
|
|
1461 |
|
|
1462 |
User::WaitForRequest(iStatus4);
|
|
1463 |
CHECK_POINT(iStatus4.Int(), KErrNone, _L("GT83-TDATA-017.02")) ;
|
|
1464 |
Print_TCapsEnum(caps) ;
|
|
1465 |
TEST_CHECKL(((caps.iFlags & RCall::KCapsData) !=0 ), ETrue, _L("GT83-TDATA-017.02")) ;
|
|
1466 |
|
|
1467 |
#ifndef SIM_TSY
|
|
1468 |
iDataCall.NotifyCapsChange(iStatus4, caps);
|
|
1469 |
User::WaitForRequest(iStatus4);
|
|
1470 |
CHECK_POINT(iStatus4.Int(), KErrNone, _L("GT83-TDATA-017.02")) ;
|
|
1471 |
CHECK_POINT((caps.iFlags & (RCall::KCapsData | RCall::KCapsHangUp)!=0), ETrue, _L("GT83-TDATA-017.02")) ;
|
|
1472 |
#endif
|
|
1473 |
|
|
1474 |
User::WaitForRequest(iStatus5);
|
|
1475 |
CHECK_POINT(iStatus5.Int(), KErrNone, _L("GT83-TDATA-009.03")) ;
|
|
1476 |
CHECK_POINT(hookStatus, RCall::EHookStatusOff, _L("GT83-TDATA-009.03")) ;
|
|
1477 |
|
|
1478 |
User::WaitForRequest(iStatus6);
|
|
1479 |
#ifndef SIM_TSY
|
|
1480 |
CHECK_POINT(iStatus6.Int(), KErrNone, _L("GT83-TDATA-021.01")) ;
|
|
1481 |
#endif
|
|
1482 |
if (iStatus6==KErrNotSupported)
|
|
1483 |
{
|
|
1484 |
INFO_PRINTF1(_L("Notify Call Duration Change is NOT Supported"));
|
|
1485 |
}
|
|
1486 |
if (iStatus6==KErrNone)
|
|
1487 |
{
|
|
1488 |
INFO_PRINTF2(TRefByValue<const TDesC>(_L("Call duration = %d")), time.Int());
|
|
1489 |
}
|
|
1490 |
|
|
1491 |
User::WaitForRequest(iStatus7);
|
|
1492 |
CHECK_POINT(iStatus7.Int(), KErrNone, _L("GT83-TDATA-034.01")) ;
|
|
1493 |
TEST_CHECKL(((mobileCallCaps.iCallControlCaps & RCall::KCapsData) !=0), ETrue, _L("GT83-TDATA-034.01")) ;
|
|
1494 |
#ifndef SIM_TSY
|
|
1495 |
iDataCall.NotifyMobileCallCapsChange(iStatus7, mobileCallCapsPckg);
|
|
1496 |
User::WaitForRequest(iStatus7);
|
|
1497 |
CHECK_POINT(iStatus7.Int(), KErrNone, _L("GT83-TDATA-034.02")) ;
|
|
1498 |
//CHECK_POINT(mobileCallCaps.iCallControlCaps, (RCall::KCapsData | RCall::KCapsHangUp), _L("GT83-TDATA-034.02")) ;
|
|
1499 |
//MKV error
|
|
1500 |
#endif
|
|
1501 |
// now hangup call
|
|
1502 |
iDataCall.NotifyStatusChange(iStatus2, callStatus);
|
|
1503 |
iDataCall.NotifyMobileCallStatusChange(iStatus3, mobileCallStatus);
|
|
1504 |
|
|
1505 |
INFO_PRINTF1(_L("Call connected - now hanging up..."));
|
|
1506 |
iDataCall.HangUp(iStatus);
|
|
1507 |
User::WaitForRequest(iStatus);
|
|
1508 |
//CHECK_POINT(iStatus.Int(), KErrNone, _L("GT83-TDATA-009.02")) ; //sometimes timed out -33
|
|
1509 |
|
|
1510 |
//This test has some trobles with Erikson phones
|
|
1511 |
//R520m could return KErrGeneral
|
|
1512 |
//SH888 could return KErrTimedOut
|
|
1513 |
INFO_PRINTF2(_L("iDataCall.HangUp() returned status %d"), iStatus.Int()) ;
|
|
1514 |
|
|
1515 |
User::WaitForRequest(iStatus2);
|
|
1516 |
CHECK_POINT(iStatus2.Int(), KErrNone, _L("GT83-TDATA-020.02")) ;
|
|
1517 |
CHECK_POINT(callStatus, RCall::EStatusHangingUp, _L("GT83-TDATA-020.02")) ;
|
|
1518 |
|
|
1519 |
User::WaitForRequest(iStatus3);
|
|
1520 |
CHECK_POINT(iStatus3.Int(), KErrNone, _L("GT83-TDATA-036.07")) ;
|
|
1521 |
CHECK_POINT(mobileCallStatus, RMobileCall::EStatusDisconnecting, _L("GT83-TDATA-036.07")) ;
|
|
1522 |
|
|
1523 |
iDataCall.NotifyStatusChange(iStatus2, callStatus);
|
|
1524 |
User::WaitForRequest(iStatus2);
|
|
1525 |
CHECK_POINT(iStatus2.Int(), KErrNone, _L("GT83-TDATA-020.02")) ;
|
|
1526 |
CHECK_POINT(callStatus, RCall::EStatusIdle, _L("GT83-TDATA-020.02")) ;
|
|
1527 |
|
|
1528 |
iDataCall.NotifyMobileCallStatusChange(iStatus3, mobileCallStatus);
|
|
1529 |
User::WaitForRequest(iStatus3);
|
|
1530 |
CHECK_POINT(iStatus3.Int(), KErrNone, _L("GT83-TDATA-036.08")) ;
|
|
1531 |
CHECK_POINT(mobileCallStatus, RMobileCall::EStatusIdle, _L("GT83-TDATA-036.08")) ;
|
|
1532 |
|
|
1533 |
TESTL(iStatus != KRequestPending) ;
|
|
1534 |
TESTL(iStatus2 != KRequestPending) ;
|
|
1535 |
TESTL(iStatus3 != KRequestPending) ;
|
|
1536 |
TESTL(iStatus4 != KRequestPending) ;
|
|
1537 |
TESTL(iStatus5 != KRequestPending) ;
|
|
1538 |
TESTL(iStatus6 != KRequestPending) ;
|
|
1539 |
|
|
1540 |
// Close the line and call
|
|
1541 |
CleanupStack::PopAndDestroy(&iDataCall) ;
|
|
1542 |
CleanupStack::PopAndDestroy(&iLine) ;
|
|
1543 |
|
|
1544 |
return TestStepResult();
|
|
1545 |
}
|
|
1546 |
//------------------------------------------------------------------
|
|
1547 |
|
|
1548 |
CTestCallStatusIncommingCall::CTestCallStatusIncommingCall()
|
|
1549 |
/** Each test step initialises it's own name
|
|
1550 |
*/
|
|
1551 |
{
|
|
1552 |
// store the name of this test case
|
|
1553 |
// this is the name that is used by the script file
|
|
1554 |
SetTestStepName(_L("TestCallStatusIncommingCall"));
|
|
1555 |
}
|
|
1556 |
//------------------------------------------------------------------
|
|
1557 |
|
|
1558 |
TVerdict CTestCallStatusIncommingCall::doTestStepL()
|
|
1559 |
/**
|
|
1560 |
* This function tests call status at various times during calls
|
|
1561 |
* @test GT83-TDATA-001.01 Test opening a data line from a phone that supports data functionality
|
|
1562 |
* @test GT83-TDATA-009.01 Test setting notification of a change in hook status of a data line
|
|
1563 |
* @test GT83-TDATA-013.06 Test opening a new call by specifying the name of a line
|
|
1564 |
* @test GT83-TDATA-023.01 Test the ability to get the current call information of the data call. Display the call information to screen.
|
|
1565 |
* @test GT83-TDATA-035.02 "Test retrieval of the current status of the data call when the call's status is ""idle"""
|
|
1566 |
* @test GT83-TDATA-035.04 "Test retrieval of the current status of the data call when the call's status is ""ringing"""
|
|
1567 |
* @test GT83-TDATA-035.05 "Test retrieval of the current status of the data call when the call's status is ""answering"""
|
|
1568 |
* @test GT83-TDATA-035.07 "Test retrieval of the current status of the data call when the call's status is ""connected"""
|
|
1569 |
*/
|
|
1570 |
{
|
|
1571 |
// Get the Call Status
|
|
1572 |
INFO_PRINTF1(_L("Get Call Status..."));
|
|
1573 |
|
|
1574 |
//to make sure that line and call will be closed in leave case
|
|
1575 |
CleanupClosePushL(iLine);
|
|
1576 |
CleanupClosePushL(iDataCall);
|
|
1577 |
|
|
1578 |
// Open a Data line and Call
|
|
1579 |
RCall::TStatus callStatus;
|
|
1580 |
RMobileCall::TMobileCallStatus mobileCallStatus;
|
|
1581 |
RMobileCall::TMobileDataCallParamsV1 callDataParams;
|
|
1582 |
RMobileCall::TMobileDataCallParamsV1Pckg callDataParamsPckg(callDataParams);
|
|
1583 |
|
|
1584 |
TBuf<16> GoodNumber ;
|
|
1585 |
GetGoodNumber(GoodNumber) ;
|
|
1586 |
INFO_PRINTF1(_L("Opening Data Line"));
|
|
1587 |
CHECK_POINT(iLine.Open(iPhone,KDataLineName), KErrNone, _L("GT83-TDATA-001.01"));
|
|
1588 |
INFO_PRINTF1(_L("Opening New Data Call"));
|
|
1589 |
CHECK_POINT(iDataCall.OpenNewCall(iLine), KErrNone, _L("GT83-TDATA-013.06"));
|
|
1590 |
|
|
1591 |
|
|
1592 |
TInt ret=iDataCall.GetStatus(callStatus);
|
|
1593 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-023.01")) ;
|
|
1594 |
TInt ret2=iDataCall.GetMobileCallStatus(mobileCallStatus);
|
|
1595 |
CHECK_POINT(ret2, KErrNone, _L("GT83-TDATA-035.02")) ;
|
|
1596 |
|
|
1597 |
if (ret==KErrNotSupported)
|
|
1598 |
{
|
|
1599 |
INFO_PRINTF1(_L("Get Call Status is NOT Supported"));
|
|
1600 |
}
|
|
1601 |
|
|
1602 |
if (ret2==KErrNotSupported)
|
|
1603 |
{
|
|
1604 |
INFO_PRINTF1(_L("Get Mobile Call Status is NOT Supported"));
|
|
1605 |
}
|
|
1606 |
|
|
1607 |
if ((ret==KErrNone) && (ret2==KErrNone))
|
|
1608 |
{
|
|
1609 |
CHECK_POINT(callStatus, RCall::EStatusIdle, _L("GT83-TDATA-023.01")) ;
|
|
1610 |
CHECK_POINT(mobileCallStatus, RMobileCall::EStatusIdle, _L("GT83-TDATA-035.02")) ;
|
|
1611 |
INFO_PRINTF1(_L("The call is Idle"));
|
|
1612 |
}
|
|
1613 |
|
|
1614 |
// Now test call status during an incomming call
|
|
1615 |
|
|
1616 |
// Wait for an incoming call, then get the Call BearerServiceInfo. The
|
|
1617 |
// Bearer Service Info is only available if the call is currently active
|
|
1618 |
INFO_PRINTF1(_L("Please ring the phone"));
|
|
1619 |
CallMeDear() ;
|
|
1620 |
|
|
1621 |
/* @test GT83-AT-024 Test setting notification of an incoming call on a data line */
|
|
1622 |
//commented out because connecting process too long and modem breaks connection
|
|
1623 |
// by temeout
|
|
1624 |
// iLine.NotifyIncomingCall(iStatus, callName); // wait for a call
|
|
1625 |
// WaitWithTimeout(iStatus,60*KOneSecond); // but timeout after 60 seconds
|
|
1626 |
|
|
1627 |
ret=iDataCall.GetStatus(callStatus);
|
|
1628 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-023.01")) ;
|
|
1629 |
// CHECK_POINT(callStatus, RCall::EStatusRinging, _L("GT83-TDATA-023.01")) ;
|
|
1630 |
ret2=iDataCall.GetMobileCallStatus(mobileCallStatus);
|
|
1631 |
CHECK_POINT(ret2, KErrNone, _L("GT83-TDATA-035.07")) ;
|
|
1632 |
// CHECK_POINT(mobileCallStatus, RMobileCall::EStatusRinging, _L("GT83-TDATA-035.04")) ;
|
|
1633 |
|
|
1634 |
// INFO_PRINTF1(_L("Phone is ringing..."));
|
|
1635 |
|
|
1636 |
callDataParams.iService = RMobileCall::EServiceDataCircuitAsync;
|
|
1637 |
callDataParams.iSpeed = RMobileCall::ESpeed9600;
|
|
1638 |
callDataParams.iProtocol = RMobileCall::EProtocolV32;
|
|
1639 |
callDataParams.iQoS = RMobileCall::EQoSNonTransparent;
|
|
1640 |
// Answer an incoming call initiated by t_echo.exe and obtain the call's current status
|
|
1641 |
//GT83-AT-032 Test answering a call on a data line (Generic) RCall::AnswerIncomingCall
|
|
1642 |
iDataCall.AnswerIncomingCall(iStatus, callDataParamsPckg);
|
|
1643 |
ret=iDataCall.GetStatus(callStatus);
|
|
1644 |
//CHECK_POINT(callStatus, RCall::EStatusAnswering, _L("GT83-TDATA-023.01")) ;
|
|
1645 |
ret2=iDataCall.GetMobileCallStatus(mobileCallStatus);
|
|
1646 |
//CHECK_POINT(mobileCallStatus, RMobileCall::EStatusAnswering, _L("GT83-TDATA-035.05")) ;
|
|
1647 |
WaitWithTimeout(iStatus,20*KOneSecond); // but timeout after 60 seconds
|
|
1648 |
|
|
1649 |
ret=iDataCall.GetStatus(callStatus);
|
|
1650 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-023.01")) ;
|
|
1651 |
ret2=iDataCall.GetMobileCallStatus(mobileCallStatus);
|
|
1652 |
CHECK_POINT(ret2, KErrNone, _L("GT83-TDATA-035.07")) ;
|
|
1653 |
|
|
1654 |
if ((ret==KErrNone) && (ret2==KErrNone))
|
|
1655 |
{
|
|
1656 |
|
|
1657 |
Print_RCall_TStatus(callStatus) ;
|
|
1658 |
CHECK_POINT(callStatus, RCall::EStatusConnected, _L("GT83-TDATA-023.01")) ;
|
|
1659 |
CHECK_POINT(mobileCallStatus, RMobileCall::EStatusConnected, _L("GT83-TDATA-035.07")) ;
|
|
1660 |
INFO_PRINTF1(_L("The call is Connected"));
|
|
1661 |
}
|
|
1662 |
INFO_PRINTF1(_L("Hanging up..."));
|
|
1663 |
|
|
1664 |
User::After(10*KOneSecond);
|
|
1665 |
iDataCall.HangUp(iStatus);
|
|
1666 |
User::WaitForRequest(iStatus);
|
|
1667 |
//CHECK_POINT(iStatus.Int(), KErrNone, _L("GT83-TDATA-009.01")) ;
|
|
1668 |
|
|
1669 |
//This test has some trobles with Erikson phones
|
|
1670 |
//R520m could return KErrGeneral
|
|
1671 |
//SH888 could return KErrTimedOut
|
|
1672 |
INFO_PRINTF2(_L("iDataCall.HangUp() returned status %d"), iStatus.Int()) ;
|
|
1673 |
|
|
1674 |
ret=iDataCall.GetStatus(callStatus);
|
|
1675 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-023.01")) ;
|
|
1676 |
ret2=iDataCall.GetMobileCallStatus(mobileCallStatus);
|
|
1677 |
CHECK_POINT(ret2, KErrNone, _L("GT83-TDATA-035.02")) ;
|
|
1678 |
|
|
1679 |
if ((ret==KErrNone) && (ret2==KErrNone))
|
|
1680 |
{
|
|
1681 |
CHECK_POINT(callStatus, RCall::EStatusIdle, _L("GT83-TDATA-023.01")) ;
|
|
1682 |
CHECK_POINT(mobileCallStatus, RMobileCall::EStatusIdle, _L("GT83-TDATA-035.02")) ;
|
|
1683 |
INFO_PRINTF1(_L("The call is Idle again"));
|
|
1684 |
}
|
|
1685 |
|
|
1686 |
// Close the line and call
|
|
1687 |
CleanupStack::PopAndDestroy(&iDataCall) ;
|
|
1688 |
CleanupStack::PopAndDestroy(&iLine) ;
|
|
1689 |
|
|
1690 |
return TestStepResult();
|
|
1691 |
}
|
|
1692 |
//------------------------------------------------------------------
|
|
1693 |
|
|
1694 |
CTestCallStatusOutgoingCall::CTestCallStatusOutgoingCall()
|
|
1695 |
/** Each test step initialises it's own name
|
|
1696 |
*/
|
|
1697 |
{
|
|
1698 |
// store the name of this test case
|
|
1699 |
// this is the name that is used by the script file
|
|
1700 |
SetTestStepName(_L("TestCallStatusOutgoingCall"));
|
|
1701 |
}
|
|
1702 |
//------------------------------------------------------------------
|
|
1703 |
|
|
1704 |
TVerdict CTestCallStatusOutgoingCall::doTestStepL()
|
|
1705 |
/**
|
|
1706 |
* This function tests call status at various times during calls
|
|
1707 |
* @test GT83-TDATA-001.01 Test opening a data line from a phone that supports data functionality
|
|
1708 |
* @test GT83-TDATA-009.01 Test setting notification of a change in hook status of a data line
|
|
1709 |
* @test GT83-TDATA-013.06 Test opening a new call by specifying the name of a line
|
|
1710 |
* @test GT83-TDATA-023.01 Test the ability to get the current call information of the data call. Display the call information to screen.
|
|
1711 |
* @test GT83-TDATA-024.00 Test dialling a data call (Generic)
|
|
1712 |
* @test GT83-TDATA-035.02 "Test retrieval of the current status of the data call when the call's status is ""idle"""
|
|
1713 |
* @test GT83-TDATA-035.07 "Test retrieval of the current status of the data call when the call's status is ""connected"""
|
|
1714 |
*/
|
|
1715 |
{
|
|
1716 |
// Get the Call Status
|
|
1717 |
INFO_PRINTF1(_L("Get Call Status..."));
|
|
1718 |
|
|
1719 |
//to make sure that line and call will be closed in leave case
|
|
1720 |
CleanupClosePushL(iLine);
|
|
1721 |
CleanupClosePushL(iDataCall);
|
|
1722 |
StartNTRasSimulation();
|
|
1723 |
|
|
1724 |
// Open a Data line and Call
|
|
1725 |
//GT83-AT-021 Test opening a data line from a phone that supports data functionality
|
|
1726 |
INFO_PRINTF1(_L("Opening Data Line"));
|
|
1727 |
|
|
1728 |
RCall::TStatus callStatus;
|
|
1729 |
RMobileCall::TMobileCallStatus mobileCallStatus;
|
|
1730 |
|
|
1731 |
//TName callName;
|
|
1732 |
|
|
1733 |
RMobileCall::TMobileDataCallParamsV1 callDataParams;
|
|
1734 |
RMobileCall::TMobileDataCallParamsV1Pckg callDataParamsPckg(callDataParams);
|
|
1735 |
|
|
1736 |
TBuf<16> GoodNumber ;
|
|
1737 |
GetGoodNumber(GoodNumber) ;
|
|
1738 |
INFO_PRINTF1(_L("Opening Data Line"));
|
|
1739 |
CHECK_POINT(iLine.Open(iPhone,KDataLineName), KErrNone, _L("GT83-TDATA-001.01"));
|
|
1740 |
INFO_PRINTF1(_L("Opening New Data Call"));
|
|
1741 |
CHECK_POINT(iDataCall.OpenNewCall(iLine), KErrNone, _L("GT83-TDATA-013.06"));
|
|
1742 |
|
|
1743 |
|
|
1744 |
TInt ret=iDataCall.GetStatus(callStatus);
|
|
1745 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-023.01")) ;
|
|
1746 |
TInt ret2=iDataCall.GetMobileCallStatus(mobileCallStatus);
|
|
1747 |
CHECK_POINT(ret2, KErrNone, _L("GT83-TDATA-035.02")) ;
|
|
1748 |
|
|
1749 |
if (ret==KErrNotSupported)
|
|
1750 |
{
|
|
1751 |
INFO_PRINTF1(_L("Get Call Status is NOT Supported"));
|
|
1752 |
}
|
|
1753 |
|
|
1754 |
if (ret2==KErrNotSupported)
|
|
1755 |
{
|
|
1756 |
INFO_PRINTF1(_L("Get Mobile Call Status is NOT Supported"));
|
|
1757 |
}
|
|
1758 |
|
|
1759 |
if ((ret==KErrNone) && (ret2==KErrNone))
|
|
1760 |
{
|
|
1761 |
CHECK_POINT(callStatus, RCall::EStatusIdle, _L("GT83-TDATA-023.01")) ;
|
|
1762 |
CHECK_POINT(mobileCallStatus, RMobileCall::EStatusIdle, _L("GT83-TDATA-035.02")) ;
|
|
1763 |
INFO_PRINTF1(_L("The call is Idle"));
|
|
1764 |
}
|
|
1765 |
|
|
1766 |
// Now test call status during an outgoing call
|
|
1767 |
callDataParams.iService = RMobileCall::EServiceDataCircuitAsync;
|
|
1768 |
callDataParams.iSpeed = RMobileCall::ESpeed9600;
|
|
1769 |
callDataParams.iProtocol = RMobileCall::EProtocolV32;
|
|
1770 |
callDataParams.iQoS = RMobileCall::EQoSNonTransparent;
|
|
1771 |
|
|
1772 |
|
|
1773 |
INFO_PRINTF2(_L("Dialling %S...."), &GoodNumber);
|
|
1774 |
iDataCall.Dial(iStatus, callDataParamsPckg, GoodNumber);
|
|
1775 |
User::WaitForRequest(iStatus);
|
|
1776 |
CHECK_POINT(iStatus.Int(), KErrNone, _L("GT83-TDATA-024.00")) ;
|
|
1777 |
|
|
1778 |
ret=iDataCall.GetStatus(callStatus);
|
|
1779 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-023.01")) ;
|
|
1780 |
ret2=iDataCall.GetMobileCallStatus(mobileCallStatus);
|
|
1781 |
CHECK_POINT(ret2, KErrNone, _L("GT83-TDATA-035.07")) ;
|
|
1782 |
|
|
1783 |
if ((ret==KErrNone) && (ret2==KErrNone))
|
|
1784 |
{
|
|
1785 |
|
|
1786 |
Print_RCall_TStatus(callStatus) ;
|
|
1787 |
CHECK_POINT(callStatus, RCall::EStatusConnected, _L("GT83-TDATA-023.01")) ;
|
|
1788 |
CHECK_POINT(mobileCallStatus, RMobileCall::EStatusConnected, _L("GT83-TDATA-035.07")) ;
|
|
1789 |
INFO_PRINTF1(_L("The call is Connected"));
|
|
1790 |
}
|
|
1791 |
|
|
1792 |
INFO_PRINTF1(_L("Hanging up..."));
|
|
1793 |
|
|
1794 |
User::After(10*KOneSecond);
|
|
1795 |
iDataCall.HangUp(iStatus);
|
|
1796 |
User::WaitForRequest(iStatus);
|
|
1797 |
//CHECK_POINT(iStatus.Int(), KErrNone, _L("GT83-TDATA-009.01")) ;
|
|
1798 |
|
|
1799 |
//This test has some trobles with Erikson phones
|
|
1800 |
//R520m could return KErrGeneral
|
|
1801 |
//SH888 could return KErrTimedOut
|
|
1802 |
INFO_PRINTF2(_L("iDataCall.HangUp() returned status %d"), iStatus.Int()) ;
|
|
1803 |
|
|
1804 |
ret=iDataCall.GetStatus(callStatus);
|
|
1805 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-023.01")) ;
|
|
1806 |
ret2=iDataCall.GetMobileCallStatus(mobileCallStatus);
|
|
1807 |
CHECK_POINT(ret2, KErrNone, _L("GT83-TDATA-035.02")) ;
|
|
1808 |
|
|
1809 |
if ((ret==KErrNone) && (ret2==KErrNone))
|
|
1810 |
{
|
|
1811 |
CHECK_POINT(callStatus, RCall::EStatusIdle, _L("GT83-TDATA-023.01")) ;
|
|
1812 |
CHECK_POINT(mobileCallStatus, RMobileCall::EStatusIdle, _L("GT83-TDATA-035.02")) ;
|
|
1813 |
INFO_PRINTF1(_L("The call is Idle again"));
|
|
1814 |
}
|
|
1815 |
|
|
1816 |
// Close the line and call
|
|
1817 |
CleanupStack::PopAndDestroy(&iDataCall) ;
|
|
1818 |
CleanupStack::PopAndDestroy(&iLine) ;
|
|
1819 |
|
|
1820 |
return TestStepResult();
|
|
1821 |
}
|
|
1822 |
//------------------------------------------------------------------
|
|
1823 |
|
|
1824 |
CTestCallCancels::CTestCallCancels()
|
|
1825 |
/** Each test step initialises it's own name
|
|
1826 |
*/
|
|
1827 |
{
|
|
1828 |
// store the name of this test case
|
|
1829 |
// this is the name that is used by the script file
|
|
1830 |
SetTestStepName(_L("TestCallCancels"));
|
|
1831 |
}
|
|
1832 |
//------------------------------------------------------------------
|
|
1833 |
|
|
1834 |
TVerdict CTestCallCancels::doTestStepL()
|
|
1835 |
/**
|
|
1836 |
* This function posts and then cancels Call Notifications.
|
|
1837 |
* @test GT83-TDATA-001.01 Test opening a data line from a phone that supports data functionality
|
|
1838 |
* @test GT83-TDATA-013.06 Test opening a new call by specifying the name of a line
|
|
1839 |
* @test GT83-TDATA-017.01 Test setting notification of a change in the call's capabilities
|
|
1840 |
* @test GT83-TDATA-017.03 Test the ability to cancel a notification of a change in the call's capabilities
|
|
1841 |
* @test GT83-TDATA-019.01 Test setting notification of a change in hook status of a data call
|
|
1842 |
* @test GT83-TDATA-019.04 Test the ability to cancel a notification of a change in hook status of a data call
|
|
1843 |
* @test GT83-TDATA-020.02 "Test notification of a change in the status of the data call from ""idle"" to ""ringing"" to ""answering"" to ""connected"" to ""hanging up"" to ""idle"""
|
|
1844 |
* @test GT83-TDATA-021.01 Test setting notification of a change in the data call's duration
|
|
1845 |
* @test GT83-TDATA-021.03 Test cancelling notification of a change in the data call's duration
|
|
1846 |
*/
|
|
1847 |
{
|
|
1848 |
INFO_PRINTF1(_L("Test Call Cancels"));
|
|
1849 |
|
|
1850 |
//to make sure that line and call will be closed in leave case
|
|
1851 |
CleanupClosePushL(iLine);
|
|
1852 |
CleanupClosePushL(iDataCall);
|
|
1853 |
|
|
1854 |
// Open a Data line and Call
|
|
1855 |
//GT83-AT-021 Test opening a data line from a phone that supports data functionality
|
|
1856 |
INFO_PRINTF1(_L("Opening Data Line"));
|
|
1857 |
CHECK_POINT(iLine.Open(iPhone,KDataLineName), KErrNone, _L("GT83-TDATA-001.01"));
|
|
1858 |
INFO_PRINTF1(_L("Opening New Data Call"));
|
|
1859 |
CHECK_POINT(iDataCall.OpenNewCall(iLine), KErrNone, _L("GT83-TDATA-013.06"));
|
|
1860 |
|
|
1861 |
// Call Status Change Cancel Request
|
|
1862 |
RCall::TStatus callStatus;
|
|
1863 |
iDataCall.NotifyStatusChange(iStatus, callStatus);
|
|
1864 |
CHECK_POINT(iStatus.Int(), KRequestPending, _L("GT83-TDATA-020.02")) ;
|
|
1865 |
User::After(KTenPartOfSec); //snack some sleep
|
|
1866 |
iDataCall.NotifyStatusChangeCancel();
|
|
1867 |
User::WaitForRequest(iStatus);
|
|
1868 |
CHECK_POINT(iStatus.Int(), KErrCancel, _L("GT83-TDATA-020.4")) ;
|
|
1869 |
|
|
1870 |
#if 0 //cancel functions don't work yet (?)
|
|
1871 |
//any way they are not declared 27.09.2001
|
|
1872 |
RMobileCall::TMobileCallStatus mobileCallStatus;
|
|
1873 |
iiDataCall.NotifyMobileCallStatusChange(iStatus, mobileCallStatus);
|
|
1874 |
CHECK_POINT(iStatus.Int(), KRequestPending, _L("GT83-TDATA-0")) ;
|
|
1875 |
iiDataCall.NotifyMobileCallStatusChangeCancel();
|
|
1876 |
User::WaitForRequest(iStatus);
|
|
1877 |
CHECK_POINT(iStatus.Int(), KErrCancel, _L("GT83-TDATA-0")) ;
|
|
1878 |
#endif
|
|
1879 |
// Hook Change Cancel Request
|
|
1880 |
RCall::THookStatus hookStatus;
|
|
1881 |
iDataCall.NotifyHookChange(iStatus, hookStatus);
|
|
1882 |
CHECK_POINT(iStatus.Int(), KRequestPending, _L("GT83-TDATA-019.01")) ;
|
|
1883 |
User::After(KTenPartOfSec); //snack some sleep
|
|
1884 |
iDataCall.NotifyHookChangeCancel();
|
|
1885 |
User::WaitForRequest(iStatus);
|
|
1886 |
CHECK_POINT(iStatus.Int(), KErrCancel, _L("GT83-TDATA-019.04")) ;
|
|
1887 |
|
|
1888 |
// Test Cancelling Notifications
|
|
1889 |
RCall::TCaps callCaps;
|
|
1890 |
iDataCall.NotifyCapsChange(iStatus, callCaps);
|
|
1891 |
CHECK_POINT(iStatus.Int(), KRequestPending, _L("GT83-TDATA-017.01")) ;
|
|
1892 |
User::After(KTenPartOfSec); //snack some sleep
|
|
1893 |
iDataCall.NotifyCapsChangeCancel();
|
|
1894 |
User::WaitForRequest(iStatus);
|
|
1895 |
CHECK_POINT(iStatus.Int(), KErrCancel, _L("GT83-TDATA-017.03")) ;
|
|
1896 |
|
|
1897 |
#if 0 //cancel functions don't work yet (?)
|
|
1898 |
//any way they are not declared 27.09.2001
|
|
1899 |
RMobileCall::TMobileCallCapsV1 mobileCallCaps;
|
|
1900 |
RMobileCall::TMobileCallCapsV1Pckg mobileCallCapsPckg(mobileCallCaps);
|
|
1901 |
iDataCall.NotifyMobileCallCapsChange(iStatus, mobileCallCapsPckg);
|
|
1902 |
CHECK_POINT(iStatus.Int(), KRequestPending, _L("GT83-TDATA-0")) ;
|
|
1903 |
iDataCall.NotifyMobileCallCapsChangeCancel();
|
|
1904 |
User::WaitForRequest(iStatus);
|
|
1905 |
CHECK_POINT(iStatus.Int(), KErrCancel, _L("GT83-TDATA-0")) ;
|
|
1906 |
#endif
|
|
1907 |
|
|
1908 |
TTimeIntervalSeconds callDuration;
|
|
1909 |
iDataCall.NotifyCallDurationChange(iStatus, callDuration);
|
|
1910 |
CHECK_POINT((iStatus==KRequestPending || iStatus==KErrNotSupported), 1, _L("GT83-TDATA-021.01")) ;
|
|
1911 |
User::After(KTenPartOfSec); //snack some sleep
|
|
1912 |
iDataCall.NotifyCallDurationChangeCancel();
|
|
1913 |
User::WaitForRequest(iStatus);
|
|
1914 |
#ifndef SIM_TSY
|
|
1915 |
CHECK_POINT(iStatus.Int(), KErrCancel, _L("GT83-TDATA-021.03")) ;
|
|
1916 |
#endif
|
|
1917 |
// Close the line and call
|
|
1918 |
CleanupStack::PopAndDestroy(&iDataCall) ;
|
|
1919 |
CleanupStack::PopAndDestroy(&iLine) ;
|
|
1920 |
|
|
1921 |
return TestStepResult();
|
|
1922 |
}
|
|
1923 |
|
|
1924 |
CTestCallDuration::CTestCallDuration()
|
|
1925 |
{
|
|
1926 |
|
|
1927 |
SetTestStepName(_L("TestCallDuration"));
|
|
1928 |
}
|
|
1929 |
|
|
1930 |
CTestCallDuration::~CTestCallDuration()
|
|
1931 |
{
|
|
1932 |
}
|
|
1933 |
|
|
1934 |
TVerdict CTestCallDuration::doTestStepL()
|
|
1935 |
{
|
|
1936 |
TVerdict Ret,Ret1;
|
|
1937 |
INFO_PRINTF1(_L("Call Duration Test"));
|
|
1938 |
|
|
1939 |
/* Log(_L("Change simtsy config number"));
|
|
1940 |
iPhone->Close();
|
|
1941 |
SetTestNumber(1);
|
|
1942 |
|
|
1943 |
User::LeaveIfError(iPhone->Open(*iTelServer,KPhoneName)) ;
|
|
1944 |
// Initialize the Phone
|
|
1945 |
TInt ret=iPhone->Initialise();
|
|
1946 |
if (ret!=KErrNone)
|
|
1947 |
{
|
|
1948 |
ERR_PRINTF2(_L("Failed to initialise the phone (%d)"), ret);
|
|
1949 |
iPhone->Close();
|
|
1950 |
iTelServer->Close(); // disconnect from etel
|
|
1951 |
return EFail;
|
|
1952 |
}
|
|
1953 |
*/
|
|
1954 |
|
|
1955 |
Ret = RunTestL(TRUE);
|
|
1956 |
Ret1 = RunTestL(FALSE);
|
|
1957 |
if(Ret1 == EPass && Ret == EPass)
|
|
1958 |
Ret = EPass;
|
|
1959 |
else
|
|
1960 |
Ret = EFail;
|
|
1961 |
return Ret;
|
|
1962 |
}
|
|
1963 |
|
|
1964 |
TVerdict CTestCallDuration::RunTestL(TBool aBRingOut)
|
|
1965 |
{
|
|
1966 |
//RPhone::TLineInfo lineInfo;
|
|
1967 |
TRequestStatus statDuration;
|
|
1968 |
TTimeIntervalSeconds CallLengthDuration,CallLength;
|
|
1969 |
TName CallName ;
|
|
1970 |
|
|
1971 |
CleanupClosePushL(iLine);
|
|
1972 |
CleanupClosePushL(iDataCall);
|
|
1973 |
|
|
1974 |
INFO_PRINTF1(_L("Opening data Line"));
|
|
1975 |
CHECK_POINT(iLine.Open(iPhone,KDataLineName), KErrNone, _L("Call Duration Test 1"));
|
|
1976 |
INFO_PRINTF1(_L("Opening New data Call"));
|
|
1977 |
CHECK_POINT(iDataCall.OpenNewCall(iLine, CallName), KErrNone, _L("Call Duration Test 2"));
|
|
1978 |
INFO_PRINTF2(_L("data Call name is %S"), &CallName);
|
|
1979 |
// start notification of call duration.
|
|
1980 |
INFO_PRINTF1(_L("Testing Call Duration"));
|
|
1981 |
iDataCall.NotifyCallDurationChange(statDuration,CallLengthDuration);
|
|
1982 |
RingOrDialL(aBRingOut);
|
|
1983 |
|
|
1984 |
User::WaitForRequest(statDuration);
|
|
1985 |
CHECK_POINT(CallLengthDuration.Int() == 1,TRUE,_L(""));
|
|
1986 |
INFO_PRINTF2(TRefByValue<const TDesC>(_L("Call duration = %d")), CallLengthDuration.Int());
|
|
1987 |
User::After(5200000);
|
|
1988 |
iDataCall.GetCallDuration(CallLength);
|
|
1989 |
INFO_PRINTF2(TRefByValue<const TDesC>(_L("Call duration = %d")), CallLength.Int());
|
|
1990 |
CHECK_POINT(CallLength.Int() >= 5 ,TRUE,_L("Call Duration Test 3"));
|
|
1991 |
|
|
1992 |
|
|
1993 |
// Hang up the Call
|
|
1994 |
INFO_PRINTF1(_L("Hanging up the call"));
|
|
1995 |
iDataCall.HangUp(iStatus);
|
|
1996 |
User::WaitForRequest(iStatus);
|
|
1997 |
INFO_PRINTF1(_L("HangUp successful"));
|
|
1998 |
|
|
1999 |
iDataCall.GetCallDuration(CallLength);
|
|
2000 |
INFO_PRINTF2(TRefByValue<const TDesC>(_L("Call duration = %d")), CallLength.Int());
|
|
2001 |
|
|
2002 |
TInt numberOfNotifs=0 ;
|
|
2003 |
for (; statDuration==KErrNone ;numberOfNotifs++)
|
|
2004 |
{
|
|
2005 |
iDataCall.NotifyCallDurationChange(statDuration,CallLengthDuration);
|
|
2006 |
WaitWithTimeout(statDuration,5*KOneSecond);
|
|
2007 |
}
|
|
2008 |
|
|
2009 |
User::After(6000000);
|
|
2010 |
|
|
2011 |
|
|
2012 |
INFO_PRINTF1(_L("Testing Call Duration Notification"));
|
|
2013 |
RingOrDialL(aBRingOut);
|
|
2014 |
User::After(2500000);
|
|
2015 |
|
|
2016 |
iDataCall.GetCallDuration(CallLength);
|
|
2017 |
INFO_PRINTF2(TRefByValue<const TDesC>(_L("Call duration = %d")), CallLength.Int());
|
|
2018 |
CHECK_POINT(CallLength.Int() == 2,TRUE,_L("Call Duration Test 4"));
|
|
2019 |
|
|
2020 |
User::WaitForRequest(statDuration);
|
|
2021 |
iDataCall.NotifyCallDurationChange(statDuration,CallLengthDuration);
|
|
2022 |
User::WaitForRequest(statDuration);
|
|
2023 |
INFO_PRINTF2(TRefByValue<const TDesC>(_L("Call duration = %d")), CallLengthDuration.Int());
|
|
2024 |
|
|
2025 |
CHECK_POINT(CallLengthDuration.Int() >= 2,TRUE,_L("Call Duration Test 5"));
|
|
2026 |
|
|
2027 |
iDataCall.NotifyCallDurationChange(statDuration,CallLengthDuration);
|
|
2028 |
iDataCall.NotifyCallDurationChangeCancel();
|
|
2029 |
WaitWithTimeout(statDuration,10*KOneSecond);
|
|
2030 |
CHECK_POINT((statDuration.Int()==KErrNone)||(statDuration.Int()==KErrCancel), TRUE, _L("Call Duration Test 6"));
|
|
2031 |
|
|
2032 |
INFO_PRINTF1(_L("Hanging up the call"));
|
|
2033 |
iDataCall.HangUp(iStatus);
|
|
2034 |
User::WaitForRequest(iStatus);
|
|
2035 |
INFO_PRINTF1(_L("HangUp successful"));
|
|
2036 |
|
|
2037 |
|
|
2038 |
User::After(6000000);
|
|
2039 |
|
|
2040 |
|
|
2041 |
INFO_PRINTF1(_L("Testing Call Duration Notification Cancel"));
|
|
2042 |
iDataCall.NotifyCallDurationChange(statDuration,CallLengthDuration);
|
|
2043 |
RingOrDialL(aBRingOut);
|
|
2044 |
iDataCall.NotifyCallDurationChangeCancel();
|
|
2045 |
WaitWithTimeout(statDuration,10*KOneSecond);
|
|
2046 |
CHECK_POINT(iStatus.Int(), KErrNone, _L("Call Duration Test 7"));
|
|
2047 |
|
|
2048 |
// Hang up the Call
|
|
2049 |
INFO_PRINTF1(_L("Hanging up the call"));
|
|
2050 |
iDataCall.HangUp(iStatus);
|
|
2051 |
User::WaitForRequest(iStatus);
|
|
2052 |
INFO_PRINTF1(_L("HangUp successful"));
|
|
2053 |
|
|
2054 |
|
|
2055 |
// Close the line and call
|
|
2056 |
CleanupStack::PopAndDestroy(&iDataCall) ;
|
|
2057 |
CleanupStack::PopAndDestroy(&iLine) ;
|
|
2058 |
return TestStepResult();
|
|
2059 |
|
|
2060 |
}
|
|
2061 |
|
|
2062 |
TBool CTestCallDuration::RingOrDialL(TBool aBRingOut)
|
|
2063 |
{
|
|
2064 |
if(!aBRingOut)
|
|
2065 |
{
|
|
2066 |
INFO_PRINTF1(_L("Please ring the phone"));
|
|
2067 |
TESTL(CallMeDear() == KErrNone) ; //init sim incoming call
|
|
2068 |
iDataCall.AnswerIncomingCall(iStatus); // wait for a call
|
|
2069 |
WaitWithTimeout(iStatus,15*KOneSecond); // but timeout after 60 seconds
|
|
2070 |
CHECK_POINT(iStatus.Int(), KErrNone, _L("Call Duration Test 8"));
|
|
2071 |
}
|
|
2072 |
else
|
|
2073 |
{
|
|
2074 |
StartNTRasSimulation();
|
|
2075 |
INFO_PRINTF2(_L("Dialling %S"),&KGoodNumber);
|
|
2076 |
iDataCall.Dial(iStatus,KGoodNumber);
|
|
2077 |
User::WaitForRequest(iStatus);
|
|
2078 |
// Wait for the Call Status Change notification
|
|
2079 |
TESTL(iStatus==KErrNone);
|
|
2080 |
INFO_PRINTF1(_L("...Call is Connected"));
|
|
2081 |
}
|
|
2082 |
return TRUE;
|
|
2083 |
}
|
|
2084 |
|
|
2085 |
|
|
2086 |
//------------------------------------------------------------------
|
|
2087 |
|
|
2088 |
CTestRemoteHangup::CTestRemoteHangup()
|
|
2089 |
/** Each test step initialises it's own name
|
|
2090 |
*/
|
|
2091 |
{
|
|
2092 |
// store the name of this test case
|
|
2093 |
// this is the name that is used by the script file
|
|
2094 |
SetTestStepName(_L("TestRemoteHangup"));
|
|
2095 |
}
|
|
2096 |
//------------------------------------------------------------------
|
|
2097 |
|
|
2098 |
TVerdict CTestRemoteHangup::doTestStepL()
|
|
2099 |
/**
|
|
2100 |
* This function tests call status at various times during calls
|
|
2101 |
* @test GT83-TDATA-XXX.XX Test hanging up a data call from the remote end
|
|
2102 |
*/
|
|
2103 |
{
|
|
2104 |
INFO_PRINTF1(_L("Test Remote Hangup"));
|
|
2105 |
|
|
2106 |
StartNTRasSimulation();
|
|
2107 |
|
|
2108 |
RCall::TStatus lineStatus;
|
|
2109 |
TName callName;
|
|
2110 |
TBuf<16> goodNumber ;
|
|
2111 |
GetGoodNumber(goodNumber) ;
|
|
2112 |
|
|
2113 |
// Open a Data Line and Call
|
|
2114 |
INFO_PRINTF1(_L("Opening Data Line"));
|
|
2115 |
CHECK_POINT(iLine.Open(iPhone,KDataLineName), KErrNone, _L("GT83-TDATA-XXX.XX"));
|
|
2116 |
|
|
2117 |
INFO_PRINTF1(_L("Opening New Data Call"));
|
|
2118 |
CHECK_POINT(iDataCall.OpenNewCall(iLine, callName), KErrNone, _L("GT83-TDATA-XXX.XX"));
|
|
2119 |
INFO_PRINTF2(_L("Data Call name is %S"), &callName);
|
|
2120 |
|
|
2121 |
INFO_PRINTF2(_L("Dialling %S...."), &goodNumber);
|
|
2122 |
iDataCall.Dial(iStatus, goodNumber);
|
|
2123 |
User::WaitForRequest(iStatus);
|
|
2124 |
CHECK_POINT(iStatus, KErrNone, _L("GT83-TDATA-XXX.XX"));
|
|
2125 |
|
|
2126 |
// Trigger remote hangup
|
|
2127 |
RCall::TStatus notifyLineStatus;
|
|
2128 |
TRequestStatus notifyStatus;
|
|
2129 |
iLine.NotifyStatusChange(notifyStatus, notifyLineStatus);
|
|
2130 |
TESTL(HangMeUpDear() == KErrNone);
|
|
2131 |
User::WaitForRequest(notifyStatus);
|
|
2132 |
TESTL(notifyStatus.Int() == KErrNone);
|
|
2133 |
CHECK_POINT(notifyLineStatus, RCall::EStatusHangingUp, _L("GT83-TVOICE-XXX.XX")) ;
|
|
2134 |
TInt ret = iLine.GetStatus(lineStatus);
|
|
2135 |
CHECK_POINT(ret, KErrNone, _L("GT83-TDATA-XXX.XX")) ;
|
|
2136 |
CHECK_POINT(lineStatus, RCall::EStatusHangingUp, _L("GT83-TDATA-XXX.XX")) ;
|
|
2137 |
|
|
2138 |
// Close the line and call
|
|
2139 |
iDataCall.Close();
|
|
2140 |
iLine.Close();
|
|
2141 |
|
|
2142 |
return TestStepResult();
|
|
2143 |
}
|
|
2144 |
|