24
|
1 |
// Copyright (c) 1997-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 |
// Te_LoopbackCDataCallRemoteHangupDial.CPP
|
|
15 |
// This file initiates the "Data Calls with diff params(speed)
|
|
16 |
// The client (application) side must start the emulator and drive the ETel API.
|
|
17 |
// The emulator side runs the designated script.
|
|
18 |
//
|
|
19 |
//
|
|
20 |
|
|
21 |
/**
|
|
22 |
@file
|
|
23 |
@note There are mulitple classes implemented in this file.
|
|
24 |
@note These classes are CTestDriveDataCallDiffParam and CTestDataCallDiffParam.
|
|
25 |
*/
|
|
26 |
|
|
27 |
|
|
28 |
#include <e32test.h>
|
|
29 |
#include "Te_LoopBackSLOGGER.H"
|
|
30 |
#include "Te_LoopBackCDataCallDiffParam.h"
|
|
31 |
#include "../../hayes/TSYCONFG.H" // for KInternetAccessPoint
|
|
32 |
|
|
33 |
_LIT(KMmPhoneName,"GsmPhone1");
|
|
34 |
_LIT(KDataLineName,"Data");
|
|
35 |
_LIT(KDialString,"+1234");
|
|
36 |
|
|
37 |
//
|
|
38 |
// Test-side class
|
|
39 |
// With the assistance of the base class, this class must start the emulator
|
|
40 |
// and drive the ETel API.
|
|
41 |
//
|
|
42 |
CTestDriveDataCallDiffParam* CTestDriveDataCallDiffParam::NewL(const TScriptList aScriptListEntry,
|
|
43 |
TInt aVarDelay)
|
|
44 |
/**
|
|
45 |
* 2 Phase Constructor
|
|
46 |
*
|
|
47 |
* This method creates an instance of CTestDriveDataCallDiffParam. The ConstructL for
|
|
48 |
* for CTestDriveDataCallDiffParam is inherited from and implemented in CTestBase. The
|
|
49 |
* ConstructL uses the CTestDriveDataCallDiffParam object to load ond open the two iPhone
|
|
50 |
* objects, one from each server.
|
|
51 |
*
|
|
52 |
* @param aScriptListEntry: enum indicating which script to use for this test.
|
|
53 |
* @param aVarDelay: integer indicating variable delay value, in seconds, to be used with an EWait script
|
|
54 |
* @leave Leaves if a failure occurs during connect or open of the iPhone by ConstructL.
|
|
55 |
* @return pointer to the instance of CTestDriveDataCallDiffParam.
|
|
56 |
*/
|
|
57 |
{
|
|
58 |
CTestDriveDataCallDiffParam* aA=new(ELeave) CTestDriveDataCallDiffParam(aScriptListEntry, aVarDelay);
|
|
59 |
CleanupStack::PushL(aA);
|
|
60 |
aA->ConstructL();
|
|
61 |
CleanupStack::Pop();
|
|
62 |
return aA;
|
|
63 |
}
|
|
64 |
|
|
65 |
|
|
66 |
CTestDriveDataCallDiffParam::CTestDriveDataCallDiffParam(const TScriptList aScriptListEntry,
|
|
67 |
TInt aVarDelay
|
|
68 |
) : iScriptListEntry(aScriptListEntry),
|
|
69 |
iVarDelay(aVarDelay)
|
|
70 |
/**
|
|
71 |
* This method is the constructor for CTestDriveDataCallDiffParam.
|
|
72 |
*
|
|
73 |
* @param aScriptListEntry: enum indicating which script to use for this test.
|
|
74 |
* @param aVarDelay: integer indicating variable delay value, in seconds, to be used with an EWait script
|
|
75 |
* @note Initializes private data "aScriptListEntry" to received parameter.
|
|
76 |
* @note Initializes private data "aVarDelay" to received parameter.
|
|
77 |
*/
|
|
78 |
{}
|
|
79 |
|
|
80 |
TInt CTestDriveDataCallDiffParam::RunTestL()
|
|
81 |
/**
|
|
82 |
* This method is invoked to start a "Data Call answer and remote hang-up closely followed by
|
|
83 |
* a dial" test. This method sets the CTestBase current script to run and the CTestBase variable
|
|
84 |
* delay value to use for an EWait
|
|
85 |
* script and then starts the modem emulator side of the test.
|
|
86 |
*
|
|
87 |
* @return KErrNone when no error exists.
|
|
88 |
* @return KErrAlreadyExists is returned if modem emulator exists and retry limit expires.
|
|
89 |
* @return Variable depending on return value from test's DriveETelApiL method and thread monitoring.
|
|
90 |
*/
|
|
91 |
{
|
|
92 |
iCurrentScript=iScriptListEntry;
|
|
93 |
iVariableDelay=iVarDelay;
|
|
94 |
return StartEmulatorL();
|
|
95 |
}
|
|
96 |
|
|
97 |
TInt CTestDriveDataCallDiffParam::DriveETelApiL()
|
|
98 |
/**
|
|
99 |
* This method contains the real meat of the Client-side "Data Call answer and remote
|
|
100 |
* hang-up closely followed by a dial" test code. This method sets up to answer a
|
|
101 |
* call and receive a data transfer. The call is then terminated from the remote end,
|
|
102 |
* and then must quickly respond by dialing the remote end back. Data is then
|
|
103 |
* transfered and the call is terminated again from the remote end.
|
|
104 |
*
|
|
105 |
* @return KErrNone.
|
|
106 |
*/
|
|
107 |
{
|
|
108 |
RMobilePhone iPhone3;
|
|
109 |
INFO_PRINTF1(_L("Opening Mobile Phone\n"));
|
|
110 |
TESTL(iPhone3.Open(iServer,KMmPhoneName)==KErrNone);
|
|
111 |
INFO_PRINTF1(_L("Initialising Mobile Phone\n"));
|
|
112 |
|
|
113 |
TRequestStatus reqStatus;
|
|
114 |
RMobilePhone::TMMTableSettings tableSettings;
|
|
115 |
tableSettings.iLocId=KInternetAccessPoint;
|
|
116 |
RMobilePhone::TMMTableSettingsPckg tableSettingsPckg(tableSettings);
|
|
117 |
iPhone3.InitialiseMM(reqStatus, tableSettingsPckg);
|
|
118 |
User::WaitForRequest(reqStatus);
|
|
119 |
TESTL(reqStatus == KErrNone);
|
|
120 |
|
|
121 |
DialDiffDataServiceL(RMobileCall::EServiceUnspecified) ; //44
|
|
122 |
DialDiffDataServiceL(RMobileCall::EServiceDataCircuitAsync) ; //45
|
|
123 |
DialDiffDataServiceL(RMobileCall::EServiceDataCircuitAsyncRdi) ; //46
|
|
124 |
DialDiffDataServiceL(RMobileCall::EServicePADAsyncUDI) ; //48
|
|
125 |
DialDiffDataServiceL(RMobileCall::EServicePADAsyncRDI) ; //49
|
|
126 |
DialDiffDataServiceL(RMobileCall::EServicePacketAccessSyncUDI) ; //50
|
|
127 |
DialDiffDataServiceL(RMobileCall::EServicePacketAccessSyncRDI) ; //51
|
|
128 |
DialDiffDataServiceL(RMobileCall::EServiceDataCircuitSyncRdi) ; //47
|
|
129 |
|
|
130 |
DialDiffSpeedL(RMobileCall::ESpeedUnspecified) ; //1
|
|
131 |
DialDiffSpeedL(RMobileCall::ESpeedAutobauding) ; //2
|
|
132 |
|
|
133 |
DialDiffSpeedL(RMobileCall::ESpeed2400, RMobileCall::EProtocolV22bis) ; //3
|
|
134 |
DialDiffSpeedL(RMobileCall::ESpeed2400, RMobileCall::EProtocolV110) ; //4
|
|
135 |
DialDiffSpeedL(RMobileCall::ESpeed2400, RMobileCall::EProtocolV120) ; //5
|
|
136 |
DialDiffSpeedL(RMobileCall::ESpeed2400, RMobileCall::EProtocolX31FlagStuffing) ; //6
|
|
137 |
|
|
138 |
DialDiffSpeedL(RMobileCall::ESpeed4800, RMobileCall::EProtocolV32) ; //7
|
|
139 |
DialDiffSpeedL(RMobileCall::ESpeed4800, RMobileCall::EProtocolV110) ;//8
|
|
140 |
DialDiffSpeedL(RMobileCall::ESpeed4800, RMobileCall::EProtocolV120) ;//9
|
|
141 |
DialDiffSpeedL(RMobileCall::ESpeed4800, RMobileCall::EProtocolX31FlagStuffing) ; //10
|
|
142 |
|
|
143 |
DialDiffSpeedL(RMobileCall::ESpeed9600, RMobileCall::EProtocolV32) ; //11
|
|
144 |
DialDiffSpeedL(RMobileCall::ESpeed9600, RMobileCall::EProtocolV34) ; //12
|
|
145 |
DialDiffSpeedL(RMobileCall::ESpeed9600, RMobileCall::EProtocolV110) ;//13
|
|
146 |
DialDiffSpeedL(RMobileCall::ESpeed9600, RMobileCall::EProtocolV120) ;//14
|
|
147 |
DialDiffSpeedL(RMobileCall::ESpeed9600, RMobileCall::EProtocolX31FlagStuffing) ; //15
|
|
148 |
|
|
149 |
DialDiffSpeedL(RMobileCall::ESpeed14400, RMobileCall::EProtocolV34) ; //16
|
|
150 |
DialDiffSpeedL(RMobileCall::ESpeed14400, RMobileCall::EProtocolV110) ; //17
|
|
151 |
DialDiffSpeedL(RMobileCall::ESpeed14400, RMobileCall::EProtocolV120) ; //18
|
|
152 |
DialDiffSpeedL(RMobileCall::ESpeed14400, RMobileCall::EProtocolX31FlagStuffing) ; //19
|
|
153 |
|
|
154 |
DialDiffSpeedL(RMobileCall::ESpeed19200, RMobileCall::EProtocolV34) ; //20
|
|
155 |
DialDiffSpeedL(RMobileCall::ESpeed19200, RMobileCall::EProtocolV110) ;//21
|
|
156 |
DialDiffSpeedL(RMobileCall::ESpeed19200, RMobileCall::EProtocolV120) ;//22
|
|
157 |
DialDiffSpeedL(RMobileCall::ESpeed19200, RMobileCall::EProtocolX31FlagStuffing) ; //23
|
|
158 |
|
|
159 |
DialDiffSpeedL(RMobileCall::ESpeed28800, RMobileCall::EProtocolV34) ; //24
|
|
160 |
DialDiffSpeedL(RMobileCall::ESpeed28800, RMobileCall::EProtocolV110) ; //25
|
|
161 |
DialDiffSpeedL(RMobileCall::ESpeed28800, RMobileCall::EProtocolV120) ; //26
|
|
162 |
DialDiffSpeedL(RMobileCall::ESpeed28800, RMobileCall::EProtocolX31FlagStuffing) ; //27
|
|
163 |
|
|
164 |
DialDiffSpeedL(RMobileCall::ESpeed38400, RMobileCall::EProtocolV110) ;//28
|
|
165 |
DialDiffSpeedL(RMobileCall::ESpeed38400, RMobileCall::EProtocolV120) ;//29
|
|
166 |
DialDiffSpeedL(RMobileCall::ESpeed38400, RMobileCall::EProtocolX31FlagStuffing) ; //30
|
|
167 |
|
|
168 |
DialDiffSpeedL(RMobileCall::ESpeed48000, RMobileCall::EProtocolV110) ;//31
|
|
169 |
DialDiffSpeedL(RMobileCall::ESpeed48000, RMobileCall::EProtocolV120) ;//32
|
|
170 |
DialDiffSpeedL(RMobileCall::ESpeed48000, RMobileCall::EProtocolX31FlagStuffing) ; //33
|
|
171 |
|
|
172 |
DialDiffSpeedL(RMobileCall::ESpeed56000, RMobileCall::EProtocolV110) ;//34
|
|
173 |
DialDiffSpeedL(RMobileCall::ESpeed56000, RMobileCall::EProtocolV120) ;//35
|
|
174 |
DialDiffSpeedL(RMobileCall::ESpeed56000, RMobileCall::EProtocolX31FlagStuffing) ; //36
|
|
175 |
DialDiffSpeedL(RMobileCall::ESpeed56000, RMobileCall::EProtocolBitTransparent) ;//37
|
|
176 |
|
|
177 |
DialDiffSpeedL(RMobileCall::ESpeed64000, RMobileCall::EProtocolBitTransparent) ;//38
|
|
178 |
|
|
179 |
DialDiffQoSL(RMobileCall::EQoSUnspecified) ; //39
|
|
180 |
DialDiffQoSL(RMobileCall::EQoSTransparent) ; //40
|
|
181 |
DialDiffQoSL(RMobileCall::EQoSNonTransparent) ; //41
|
|
182 |
DialDiffQoSL(RMobileCall::EQosTransparentPreferred) ; //42
|
|
183 |
DialDiffQoSL(RMobileCall::EQosNonTransparentPreferred) ; //43
|
|
184 |
|
|
185 |
iPhone3.Close();
|
|
186 |
return KErrNone;
|
|
187 |
}
|
|
188 |
|
|
189 |
//
|
|
190 |
// Emulator-side class
|
|
191 |
// With the assistance of the base class, this class must run the designated script
|
|
192 |
//
|
|
193 |
CTestDataCallDiffParam* CTestDataCallDiffParam::NewL(const TScript* aScript)
|
|
194 |
/**
|
|
195 |
* 2 Phase Constructor
|
|
196 |
*
|
|
197 |
* This method creates an instance of CTestDataCallDiffParam.
|
|
198 |
*
|
|
199 |
* @param aScript: pointer to the specifics of the script to run.
|
|
200 |
* @leave Leaves if out of memory when attempting to create.
|
|
201 |
* @return pointer to the instance of CTestDataCallDiffParam.
|
|
202 |
*/
|
|
203 |
{
|
|
204 |
CTestDataCallDiffParam* aA=new(ELeave) CTestDataCallDiffParam(aScript);
|
|
205 |
CleanupStack::PushL(aA);
|
|
206 |
aA->ConstructL();
|
|
207 |
CleanupStack::Pop();
|
|
208 |
return aA;
|
|
209 |
}
|
|
210 |
|
|
211 |
CTestDataCallDiffParam* CTestDataCallDiffParam::NewL(const TScript* aScript, const TInt aVarDelay)
|
|
212 |
/**
|
|
213 |
* 2 Phase Constructor
|
|
214 |
*
|
|
215 |
* This method creates an instance of CTestDataCallDiffParam.
|
|
216 |
*
|
|
217 |
* @param aScript: pointer to the specifics of the script to run.
|
|
218 |
* @param aVarDelay: time delay
|
|
219 |
* @leave Leaves if out of memory when attempting to create.
|
|
220 |
* @return pointer to the instance of CTestDataCallDiffParam.
|
|
221 |
*/
|
|
222 |
{
|
|
223 |
CTestDataCallDiffParam* aA=new(ELeave) CTestDataCallDiffParam(aScript, aVarDelay);
|
|
224 |
CleanupStack::PushL(aA);
|
|
225 |
aA->ConstructL();
|
|
226 |
CleanupStack::Pop();
|
|
227 |
return aA;
|
|
228 |
}
|
|
229 |
|
|
230 |
CTestDataCallDiffParam::CTestDataCallDiffParam(const TScript* aScript) : iScript(aScript)
|
|
231 |
/**
|
|
232 |
* This method is the constructor for CTestDataCallDiffParam.
|
|
233 |
*
|
|
234 |
* @param aScript: pointer to the specifics of the script to run.
|
|
235 |
* @note Initializes private data "aScript" to received parameter.
|
|
236 |
*/
|
|
237 |
{}
|
|
238 |
|
|
239 |
CTestDataCallDiffParam::CTestDataCallDiffParam(const TScript* aScript, const TInt aVarDelay) : CATScriptEng(aVarDelay), iScript(aScript)
|
|
240 |
/**
|
|
241 |
* This method is the constructor for CTestDataCallDiffParam.
|
|
242 |
*
|
|
243 |
* @param aScript: pointer to the specifics of the script to run.
|
|
244 |
* @param aVarDelay: user specified time delay
|
|
245 |
* @note Initializes private data "aScript" to received parameter.
|
|
246 |
*/
|
|
247 |
{}
|
|
248 |
|
|
249 |
void CTestDataCallDiffParam::ConstructL()
|
|
250 |
/**
|
|
251 |
* This method is used to implement the 2 Phase Constructor for CTestDataCallDiffParam.
|
|
252 |
* This method uses the CATBase ConstructL to configure the port to be used.
|
|
253 |
*
|
|
254 |
* @leave Leaves if CATBase leaves.
|
|
255 |
*/
|
|
256 |
{
|
|
257 |
CATScriptEng::ConstructL();
|
|
258 |
}
|
|
259 |
|
|
260 |
TInt CTestDataCallDiffParam::Start()
|
|
261 |
/**
|
|
262 |
* This method is defined as a pure virtual function that must be implemented.
|
|
263 |
* This method is currently not used by the Etel regression test harness.
|
|
264 |
* Instead of using this method to start the scripts, the CTestTxMess::Start()
|
|
265 |
* method is used to start the scripts. The CTestTxMess::Start() is called by
|
|
266 |
* the responder thread of the scripting engine to start the execution of the script.
|
|
267 |
*
|
|
268 |
* @return KErrNone.
|
|
269 |
*/
|
|
270 |
{
|
|
271 |
StartScript(iScript);
|
|
272 |
return KErrNone;
|
|
273 |
}
|
|
274 |
|
|
275 |
void CTestDataCallDiffParam::SpecificAlgorithmL(TInt /* aParam */)
|
|
276 |
/**
|
|
277 |
* This method is defined as a pure virtual function that must be implemented.
|
|
278 |
* This method is currently not used by the Etel regression test harness.
|
|
279 |
* Instead of using this method to perform an algorithm specific to this test,
|
|
280 |
* the CTestTxMess::SpecificAlgorithm() method is used. The CTestTxMess::SpecificAlgorithm()
|
|
281 |
* is called by the scripting engine to perform the test specific algorithm.
|
|
282 |
*/
|
|
283 |
{
|
|
284 |
}
|
|
285 |
|
|
286 |
void CTestDataCallDiffParam::Complete(TInt aError)
|
|
287 |
/**
|
|
288 |
* This method is defined as a pure virtual function that must be implemented.
|
|
289 |
* This method is currently not used by the Etel regression test harness.
|
|
290 |
* Instead of using this method to end the scripts, the CTestTxMess::Complete()
|
|
291 |
* method is used to end the scripts. The CTestTxMess::Complete() is called by
|
|
292 |
* the scripting engine to end the execution of the script.
|
|
293 |
*/
|
|
294 |
{
|
|
295 |
iReturnValue=aError;
|
|
296 |
CActiveScheduler::Stop();
|
|
297 |
}
|
|
298 |
|
|
299 |
void CTestDriveDataCallDiffParam::Print_RMobileCall_TMobileCallDataSpeed(RMobileCall::TMobileCallDataSpeed& aArg)
|
|
300 |
/** Display value of enum RMobileCall::TMobileCallDataSpeed to screen.
|
|
301 |
* @param value to print
|
|
302 |
*/
|
|
303 |
{
|
|
304 |
switch(aArg)
|
|
305 |
{
|
|
306 |
case RMobileCall::ESpeedUnspecified:
|
|
307 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::ESpeedUnspecified\n")) ;
|
|
308 |
break ;
|
|
309 |
case RMobileCall::ESpeedAutobauding:
|
|
310 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::ESpeedAutobauding\n")) ;
|
|
311 |
break ;
|
|
312 |
case RMobileCall::ESpeed2400:
|
|
313 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::ESpeed2400\n")) ;
|
|
314 |
break ;
|
|
315 |
case RMobileCall::ESpeed4800:
|
|
316 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::ESpeed4800\n")) ;
|
|
317 |
break ;
|
|
318 |
case RMobileCall::ESpeed9600:
|
|
319 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::ESpeed9600\n")) ;
|
|
320 |
break ;
|
|
321 |
case RMobileCall::ESpeed14400:
|
|
322 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::ESpeed14400\n")) ;
|
|
323 |
break ;
|
|
324 |
case RMobileCall::ESpeed19200:
|
|
325 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::ESpeed19200\n")) ;
|
|
326 |
break ;
|
|
327 |
case RMobileCall::ESpeed28800:
|
|
328 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::ESpeed28800\n")) ;
|
|
329 |
break ;
|
|
330 |
case RMobileCall::ESpeed32000:
|
|
331 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::ESpeed32000\n")) ;
|
|
332 |
break ;
|
|
333 |
case RMobileCall::ESpeed33600:
|
|
334 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::ESpeed33600\n")) ;
|
|
335 |
break ;
|
|
336 |
case RMobileCall::ESpeed38400:
|
|
337 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::ESpeed38400\n")) ;
|
|
338 |
break ;
|
|
339 |
case RMobileCall::ESpeed43200:
|
|
340 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::ESpeed43200\n")) ;
|
|
341 |
break ;
|
|
342 |
case RMobileCall::ESpeed48000:
|
|
343 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::ESpeed48000\n")) ;
|
|
344 |
break ;
|
|
345 |
case RMobileCall::ESpeed56000:
|
|
346 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::ESpeed56000\n")) ;
|
|
347 |
break ;
|
|
348 |
case RMobileCall::ESpeed57600:
|
|
349 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::ESpeed57600\n")) ;
|
|
350 |
break ;
|
|
351 |
case RMobileCall::ESpeed64000:
|
|
352 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::ESpeed64000\n")) ;
|
|
353 |
break ;
|
|
354 |
}
|
|
355 |
}
|
|
356 |
|
|
357 |
void CTestDriveDataCallDiffParam::Print_RMobileCall_TMobileCallDataProtocol(RMobileCall::TMobileCallDataProtocol& aArg)
|
|
358 |
/** Display value of enum RMobileCall::TMobileCallDataProtocol to screen.
|
|
359 |
* @param value to print
|
|
360 |
*/
|
|
361 |
{
|
|
362 |
switch(aArg)
|
|
363 |
{
|
|
364 |
case RMobileCall::EProtocolUnspecified:
|
|
365 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EProtocolUnspecified\n")) ;
|
|
366 |
break ;
|
|
367 |
case RMobileCall::EProtocolV22bis:
|
|
368 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EProtocolV22bis\n")) ;
|
|
369 |
break ;
|
|
370 |
case RMobileCall::EProtocolV32:
|
|
371 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EProtocolV32\n")) ;
|
|
372 |
break ;
|
|
373 |
case RMobileCall::EProtocolV34:
|
|
374 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EProtocolV34\n")) ;
|
|
375 |
break ;
|
|
376 |
case RMobileCall::EProtocolV110:
|
|
377 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EProtocolV110\n")) ;
|
|
378 |
break ;
|
|
379 |
case RMobileCall::EProtocolV120:
|
|
380 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EProtocolV120\n")) ;
|
|
381 |
break ;
|
|
382 |
case RMobileCall::EProtocolX31FlagStuffing:
|
|
383 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EProtocolX31FlagStuffing\n")) ;
|
|
384 |
break ;
|
|
385 |
case RMobileCall::EProtocolPIAFS:
|
|
386 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EProtocolPIAFS\n")) ;
|
|
387 |
break ;
|
|
388 |
case RMobileCall::EProtocolBitTransparent:
|
|
389 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EProtocolBitTransparent\n")) ;
|
|
390 |
break ;
|
|
391 |
case RMobileCall::EProtocolPstnMultimediaVoiceFallback:
|
|
392 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EProtocolPstnMultimediaVoiceFallback\n")) ;
|
|
393 |
break ;
|
|
394 |
case RMobileCall::EProtocolPstnMultimedia:
|
|
395 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EProtocolPstnMultimedia\n")) ;
|
|
396 |
break ;
|
|
397 |
case RMobileCall::EProtocolIsdnMultimedia:
|
|
398 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EProtocolIsdnMultimedia\n")) ;
|
|
399 |
break ;
|
|
400 |
}
|
|
401 |
}
|
|
402 |
|
|
403 |
void CTestDriveDataCallDiffParam::DialDiffSpeedL(RMobileCall::TMobileCallDataSpeed aSpeed,
|
|
404 |
RMobileCall::TMobileCallDataProtocol aArg)
|
|
405 |
{
|
|
406 |
TRequestStatus reqStatus;
|
|
407 |
|
|
408 |
RLine line;
|
|
409 |
RCall call;
|
|
410 |
INFO_PRINTF1(_L("Opening Data Line\n"));
|
|
411 |
TESTL(line.Open(iPhone,KDataLineName)==KErrNone);
|
|
412 |
INFO_PRINTF1(_L("Opening New Data Call\n"));
|
|
413 |
TESTL(call.OpenNewCall(line)==KErrNone);
|
|
414 |
|
|
415 |
//
|
|
416 |
// Initialization complete
|
|
417 |
// Now perform the outgoing call...
|
|
418 |
RMobileCall::TMobileDataCallParamsV1 callDataParams;
|
|
419 |
RMobileCall::TMobileDataCallParamsV1Pckg callDataParamsPckg(callDataParams);
|
|
420 |
callDataParams.iService = RMobileCall::EServiceDataCircuitAsync;
|
|
421 |
callDataParams.iProtocol = aArg ;
|
|
422 |
callDataParams.iQoS = RMobileCall::EQoSNonTransparent;
|
|
423 |
callDataParams.iSpeed = aSpeed;
|
|
424 |
Print_RMobileCall_TMobileCallDataSpeed(aSpeed) ;
|
|
425 |
Print_RMobileCall_TMobileCallDataProtocol(aArg) ;
|
|
426 |
|
|
427 |
INFO_PRINTF2(_L("Dialling %S....\n"), &KDialString);
|
|
428 |
call.Dial(reqStatus, callDataParamsPckg, KDialString);
|
|
429 |
User::WaitForRequest(reqStatus);
|
|
430 |
INFO_PRINTF2(_L("Dial returned %d\n"), reqStatus.Int());
|
|
431 |
if(KErrNone != reqStatus.Int())
|
|
432 |
TESTL(reqStatus.Int()) ;
|
|
433 |
call.HangUp();
|
|
434 |
|
|
435 |
// close iPhone, line and call
|
|
436 |
line.Close();
|
|
437 |
call.Close();
|
|
438 |
}
|
|
439 |
|
|
440 |
|
|
441 |
void CTestDriveDataCallDiffParam::Print_RMobileCall_TMobileCallDataQoS(RMobileCall::TMobileCallDataQoS& aArg)
|
|
442 |
/** Display value of enum RMobileCall::TMobileCallDataQoS to screen.
|
|
443 |
* @param value to print
|
|
444 |
*/
|
|
445 |
{
|
|
446 |
switch(aArg)
|
|
447 |
{
|
|
448 |
case RMobileCall::EQoSUnspecified:
|
|
449 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EQoSUnspecified\n")) ;
|
|
450 |
break ;
|
|
451 |
case RMobileCall::EQoSTransparent:
|
|
452 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EQoSTransparent\n")) ;
|
|
453 |
break ;
|
|
454 |
case RMobileCall::EQoSNonTransparent:
|
|
455 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EQoSNonTransparent\n")) ;
|
|
456 |
break ;
|
|
457 |
case RMobileCall::EQosTransparentPreferred:
|
|
458 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EQosTransparentPreferred\n")) ;
|
|
459 |
break ;
|
|
460 |
case RMobileCall::EQosNonTransparentPreferred:
|
|
461 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EQosNonTransparentPreferred\n")) ;
|
|
462 |
break ;
|
|
463 |
}
|
|
464 |
}
|
|
465 |
|
|
466 |
void CTestDriveDataCallDiffParam::DialDiffQoSL(RMobileCall::TMobileCallDataQoS aQoS)
|
|
467 |
{
|
|
468 |
TRequestStatus reqStatus;
|
|
469 |
|
|
470 |
RLine line;
|
|
471 |
RCall call;
|
|
472 |
INFO_PRINTF1(_L("Opening Data Line\n"));
|
|
473 |
TESTL(line.Open(iPhone,KDataLineName)==KErrNone);
|
|
474 |
INFO_PRINTF1(_L("Opening New Data Call\n"));
|
|
475 |
TESTL(call.OpenNewCall(line)==KErrNone);
|
|
476 |
//
|
|
477 |
// Initialization complete
|
|
478 |
// Now perform the outgoing call...
|
|
479 |
RMobileCall::TMobileDataCallParamsV1 callDataParams;
|
|
480 |
RMobileCall::TMobileDataCallParamsV1Pckg callDataParamsPckg(callDataParams);
|
|
481 |
|
|
482 |
callDataParams.iService = RMobileCall::EServiceDataCircuitAsync;
|
|
483 |
callDataParams.iProtocol = RMobileCall::EProtocolV32;
|
|
484 |
callDataParams.iSpeed = RMobileCall::ESpeed9600;
|
|
485 |
callDataParams.iQoS = aQoS;
|
|
486 |
|
|
487 |
|
|
488 |
Print_RMobileCall_TMobileCallDataQoS(aQoS) ;
|
|
489 |
INFO_PRINTF2(_L("Dialling %S....\n"), &KDialString);
|
|
490 |
call.Dial(reqStatus, callDataParamsPckg, KDialString);
|
|
491 |
User::WaitForRequest(reqStatus);
|
|
492 |
INFO_PRINTF2(_L("Dial returned %d\n"), reqStatus.Int());
|
|
493 |
if(KErrNone != reqStatus.Int())
|
|
494 |
TESTL(reqStatus.Int()) ;
|
|
495 |
call.HangUp();
|
|
496 |
|
|
497 |
// close iPhone, line and call
|
|
498 |
line.Close();
|
|
499 |
call.Close();
|
|
500 |
}
|
|
501 |
|
|
502 |
|
|
503 |
void CTestDriveDataCallDiffParam::DialDiffProtocolL(RMobileCall::TMobileCallDataProtocol aArg)
|
|
504 |
{
|
|
505 |
TRequestStatus reqStatus;
|
|
506 |
|
|
507 |
RLine line;
|
|
508 |
RCall call;
|
|
509 |
INFO_PRINTF1(_L("Opening Data Line\n"));
|
|
510 |
TESTL(line.Open(iPhone,KDataLineName)==KErrNone);
|
|
511 |
INFO_PRINTF1(_L("Opening New Data Call\n"));
|
|
512 |
TESTL(call.OpenNewCall(line)==KErrNone);
|
|
513 |
//
|
|
514 |
// Initialization complete
|
|
515 |
// Now perform the outgoing call...
|
|
516 |
RMobileCall::TMobileDataCallParamsV1 callDataParams;
|
|
517 |
RMobileCall::TMobileDataCallParamsV1Pckg callDataParamsPckg(callDataParams);
|
|
518 |
|
|
519 |
callDataParams.iSpeed = RMobileCall::ESpeed9600;
|
|
520 |
callDataParams.iQoS = RMobileCall::EQoSNonTransparent;
|
|
521 |
callDataParams.iService = RMobileCall::EServiceDataCircuitAsync;
|
|
522 |
callDataParams.iProtocol = aArg;
|
|
523 |
|
|
524 |
Print_RMobileCall_TMobileCallDataProtocol(aArg) ;
|
|
525 |
|
|
526 |
INFO_PRINTF2(_L("Dialling %S....\n"), &KDialString);
|
|
527 |
call.Dial(reqStatus, callDataParamsPckg, KDialString);
|
|
528 |
User::WaitForRequest(reqStatus);
|
|
529 |
INFO_PRINTF2(_L("Dial returned %d\n"), reqStatus.Int());
|
|
530 |
TESTL(reqStatus.Int()==KErrNone);
|
|
531 |
call.HangUp();
|
|
532 |
|
|
533 |
// close iPhone, line and call
|
|
534 |
line.Close();
|
|
535 |
call.Close();
|
|
536 |
}
|
|
537 |
|
|
538 |
void CTestDriveDataCallDiffParam::Print_RMobileCall_TMobileCallDataService(RMobileCall::TMobileCallDataService aArg)
|
|
539 |
/** Display value of enum RMobileCall::TMobileCallDataService to screen.
|
|
540 |
* @param value to print
|
|
541 |
*/
|
|
542 |
{
|
|
543 |
switch(aArg)
|
|
544 |
{
|
|
545 |
case RMobileCall::EServiceUnspecified:
|
|
546 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EServiceUnspecified\n")) ;
|
|
547 |
break ;
|
|
548 |
case RMobileCall::EServiceDataCircuitAsync:
|
|
549 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EServiceDataCircuitAsync\n")) ;
|
|
550 |
break ;
|
|
551 |
case RMobileCall::EServiceDataCircuitAsyncRdi:
|
|
552 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EServiceDataCircuitAsyncRdi\n")) ;
|
|
553 |
break ;
|
|
554 |
case RMobileCall::EServiceDataCircuitSync:
|
|
555 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EServiceDataCircuitSync\n")) ;
|
|
556 |
break ;
|
|
557 |
case RMobileCall::EServiceDataCircuitSyncRdi:
|
|
558 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EServiceDataCircuitSyncRdi\n")) ;
|
|
559 |
break ;
|
|
560 |
case RMobileCall::EServicePADAsyncUDI:
|
|
561 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EServicePADAsyncUDI\n")) ;
|
|
562 |
break ;
|
|
563 |
case RMobileCall::EServicePADAsyncRDI:
|
|
564 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EServicePADAsyncRDI\n")) ;
|
|
565 |
break ;
|
|
566 |
case RMobileCall::EServicePacketAccessSyncUDI:
|
|
567 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EServicePacketAccessSyncUDI\n")) ;
|
|
568 |
break ;
|
|
569 |
case RMobileCall::EServicePacketAccessSyncRDI:
|
|
570 |
INFO_PRINTF1(_L("Value of enum is RMobileCall::EServicePacketAccessSyncRDI\n")) ;
|
|
571 |
break ;
|
|
572 |
}
|
|
573 |
}
|
|
574 |
|
|
575 |
void CTestDriveDataCallDiffParam::DialDiffDataServiceL(RMobileCall::TMobileCallDataService aArg)
|
|
576 |
{
|
|
577 |
TRequestStatus reqStatus;
|
|
578 |
|
|
579 |
RLine line;
|
|
580 |
RCall call;
|
|
581 |
INFO_PRINTF1(_L("Opening Data Line\n"));
|
|
582 |
TESTL(line.Open(iPhone,KDataLineName)==KErrNone);
|
|
583 |
INFO_PRINTF1(_L("Opening New Data Call\n"));
|
|
584 |
TESTL(call.OpenNewCall(line)==KErrNone);
|
|
585 |
//
|
|
586 |
// Initialization complete
|
|
587 |
// Now perform the outgoing call...
|
|
588 |
RMobileCall::TMobileDataCallParamsV1 callDataParams;
|
|
589 |
RMobileCall::TMobileDataCallParamsV1Pckg callDataParamsPckg(callDataParams);
|
|
590 |
|
|
591 |
callDataParams.iSpeed = RMobileCall::ESpeed9600;
|
|
592 |
callDataParams.iQoS = RMobileCall::EQoSNonTransparent;
|
|
593 |
callDataParams.iProtocol = RMobileCall::EProtocolV32;
|
|
594 |
|
|
595 |
callDataParams.iService = aArg;
|
|
596 |
|
|
597 |
Print_RMobileCall_TMobileCallDataService(aArg) ;
|
|
598 |
|
|
599 |
INFO_PRINTF2(_L("Dialling %S....\n"), &KDialString);
|
|
600 |
call.Dial(reqStatus, callDataParamsPckg, KDialString);
|
|
601 |
User::WaitForRequest(reqStatus);
|
|
602 |
INFO_PRINTF2(_L("Dial returned %d\n"), reqStatus.Int());
|
|
603 |
if(KErrNone != reqStatus.Int())
|
|
604 |
TESTL(reqStatus.Int()) ;
|
|
605 |
call.HangUp();
|
|
606 |
|
|
607 |
// close iPhone, line and call
|
|
608 |
line.Close();
|
|
609 |
call.Close();
|
|
610 |
}
|
|
611 |
|