24
+ − 1
// Copyright (c) 2001-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
// This file contains the implementation of the Simulator TSY Data Call functionality.
+ − 15
// The Call classes process the Call-based requests made by ETel clients
+ − 16
// and passed down to the TSY by the ETel Server.
+ − 17
//
+ − 18
//
+ − 19
+ − 20
/**
+ − 21
@file
+ − 22
*/
+ − 23
+ − 24
#include <testconfigfileparser.h>
+ − 25
#include "CSimDataCall.h"
+ − 26
#include "CSimPhone.h"
+ − 27
#include "Simlog.h"
+ − 28
+ − 29
CSimDataCall* CSimDataCall::NewL(CSimLine* aLine,const TDesC& aName, CSimPhone* aPhone)
+ − 30
/**
+ − 31
* Standard two phase constructor.
+ − 32
*
+ − 33
* @param aLine pointer to the Line object.
+ − 34
* @param aName name of the call to be constructed
+ − 35
* @return CSimDataCall pointer to the data call object created
+ − 36
* @leave Leaves if no memory or object is not created for any reason
+ − 37
*/
+ − 38
{
+ − 39
CSimDataCall* dataCall=new(ELeave) CSimDataCall(aLine,aName,aPhone);
+ − 40
TCleanupItem newCallDataClose(CloseCall,dataCall);
+ − 41
CleanupStack::PushL(newCallDataClose);
+ − 42
dataCall->ConstructL();
+ − 43
CleanupStack::Pop();
+ − 44
return dataCall;
+ − 45
}
+ − 46
+ − 47
CSimDataCall::CSimDataCall(CSimLine* aLine,const TName& aName, CSimPhone* aPhone)
+ − 48
: CSimCall(aLine,aName,aPhone), iCommPortLoaned(EFalse)
+ − 49
/**
+ − 50
* Trivial constructor. Calls CSimCall to initialise its members
+ − 51
*/
+ − 52
{
+ − 53
iCaps=Caps();
+ − 54
}
+ − 55
+ − 56
void CSimDataCall::ConstructL()
+ − 57
/**
+ − 58
* Second phase of 2-Phase Constructor
+ − 59
* Retrieves all the pausing duration tags from the config file
+ − 60
*
+ − 61
* @param aName name of the data call to be constructed
+ − 62
*/
+ − 63
{
+ − 64
LOGDATA1("Starting to parse Data Call config parameters...");
+ − 65
+ − 66
iDiallingPause=iLine->CfgFile()->ItemValue(KDiallingPauseDuration,KDefaultDiallingPauseDuration);
+ − 67
iConnectingPause=iLine->CfgFile()->ItemValue(KConnectingPauseDuration,KDefaultConnectingPauseDuration);
+ − 68
iDisconnectingPause=iLine->CfgFile()->ItemValue(KDisconnectingPauseDuration,KDefaultDisconnectingPauseDuration);
+ − 69
iAnswerIncomingPause=iLine->CfgFile()->ItemValue(KAnswerIncomingPauseDuration,KDefaultAnswerIncomingPauseDuration);
+ − 70
iRemoteHangupPause=iLine->CfgFile()->ItemValue(KRemoteHangupPauseDuration,KDefaultRemoteHangupPauseDuration);
+ − 71
+ − 72
// Read in the CommPort setup
+ − 73
+ − 74
const CTestConfigItem* item=iLine->CfgFile()->Item(KDataCallCaps);
+ − 75
if(item)
+ − 76
{
+ − 77
TPtrC8 speedCaps, protocolCaps, serviceCaps, qosCaps, codingCaps, asymmetryCaps;
+ − 78
TPtrC8 rlpVersionCaps, v42bisCaps;
+ − 79
TBool hscsdSupport, userInitUpgrade;
+ − 80
TInt mClass, MaxRxTimeslots, MaxTxTimeslots, totalRxTxTimeslots;
+ − 81
TUint8 digit = 0;
+ − 82
+ − 83
TInt ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,speedCaps);
+ − 84
if(ret!=KErrNone)
+ − 85
{
+ − 86
LOGPARSERR("speedCaps",ret,0,&KDataCallCaps);
+ − 87
}
+ − 88
else
+ − 89
if(AsciiToNum(speedCaps, digit)==KErrNone)
+ − 90
iMobileCallCaps.iSpeedCaps = digit;
+ − 91
+ − 92
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,protocolCaps);
+ − 93
if(ret!=KErrNone)
+ − 94
{
+ − 95
LOGPARSERR("protocolCaps",ret,1,&KDataCallCaps);
+ − 96
}
+ − 97
else
+ − 98
if(AsciiToNum(protocolCaps, digit)==KErrNone)
+ − 99
iMobileCallCaps.iProtocolCaps = digit;
+ − 100
+ − 101
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,serviceCaps);
+ − 102
if(ret!=KErrNone)
+ − 103
{
+ − 104
LOGPARSERR("serviceCaps",ret,2,&KDataCallCaps);
+ − 105
}
+ − 106
else
+ − 107
if(AsciiToNum(serviceCaps, digit)==KErrNone)
+ − 108
iMobileCallCaps.iServiceCaps = digit;
+ − 109
+ − 110
+ − 111
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,qosCaps);
+ − 112
if(ret!=KErrNone)
+ − 113
{
+ − 114
LOGPARSERR("qosCaps",ret,3,&KDataCallCaps);
+ − 115
}
+ − 116
else
+ − 117
if(AsciiToNum(qosCaps, digit)==KErrNone)
+ − 118
iMobileCallCaps.iQoSCaps = digit;
+ − 119
+ − 120
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,hscsdSupport);
+ − 121
if(ret!=KErrNone)
+ − 122
{
+ − 123
LOGPARSERR("hscsdSupport",ret,4,&KDataCallCaps);
+ − 124
}
+ − 125
else
+ − 126
iMobileCallCaps.iHscsdSupport = hscsdSupport;
+ − 127
+ − 128
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,5,mClass);
+ − 129
if(ret!=KErrNone)
+ − 130
{
+ − 131
LOGPARSERR("mClass",ret,5,&KDataCallCaps);
+ − 132
}
+ − 133
else
+ − 134
iMobileCallCaps.iMClass = mClass;
+ − 135
+ − 136
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,6,MaxRxTimeslots);
+ − 137
if(ret!=KErrNone)
+ − 138
{
+ − 139
LOGPARSERR("MaxRxTimeslots",ret,6,&KDataCallCaps);
+ − 140
}
+ − 141
else
+ − 142
iMobileCallCaps.iMaxRxTimeSlots = MaxRxTimeslots;
+ − 143
+ − 144
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,7,MaxTxTimeslots);
+ − 145
if(ret!=KErrNone)
+ − 146
{
+ − 147
LOGPARSERR("MaxTxTimeslots",ret,7,&KDataCallCaps);
+ − 148
}
+ − 149
else
+ − 150
iMobileCallCaps.iMaxTxTimeSlots = MaxTxTimeslots;
+ − 151
+ − 152
+ − 153
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,8,totalRxTxTimeslots);
+ − 154
if(ret!=KErrNone)
+ − 155
{
+ − 156
LOGPARSERR("totalRxTxTimeslots",ret,8,&KDataCallCaps);
+ − 157
}
+ − 158
else
+ − 159
iMobileCallCaps.iTotalRxTxTimeSlots = totalRxTxTimeslots;
+ − 160
+ − 161
+ − 162
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,9,codingCaps);
+ − 163
if(ret!=KErrNone)
+ − 164
{
+ − 165
LOGPARSERR("codingCaps",ret,9,&KDataCallCaps);
+ − 166
}
+ − 167
else
+ − 168
if(AsciiToNum(codingCaps, digit)==KErrNone)
+ − 169
iMobileCallCaps.iCodingCaps = digit;
+ − 170
+ − 171
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,10,asymmetryCaps);
+ − 172
if(ret!=KErrNone)
+ − 173
{
+ − 174
LOGPARSERR("asymmetryCaps",ret,10,&KDataCallCaps);
+ − 175
}
+ − 176
else
+ − 177
if(AsciiToNum(asymmetryCaps, digit)==KErrNone)
+ − 178
iMobileCallCaps.iAsymmetryCaps = digit;
+ − 179
+ − 180
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,11,userInitUpgrade);
+ − 181
if(ret!=KErrNone)
+ − 182
{
+ − 183
LOGPARSERR("userInitUpgrade",ret,11,&KDataCallCaps);
+ − 184
}
+ − 185
else
+ − 186
iMobileCallCaps.iUserInitUpgrade = userInitUpgrade;
+ − 187
+ − 188
+ − 189
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,10,rlpVersionCaps);
+ − 190
if(ret!=KErrNone)
+ − 191
{
+ − 192
LOGPARSERR("rlpVersionCaps",ret,10,&KDataCallCaps);
+ − 193
}
+ − 194
else
+ − 195
if(AsciiToNum(rlpVersionCaps, digit)==KErrNone)
+ − 196
iMobileCallCaps.iRLPVersionCaps = digit;
+ − 197
+ − 198
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,10,v42bisCaps);
+ − 199
if(ret!=KErrNone)
+ − 200
{
+ − 201
LOGPARSERR("v42bisCaps",ret,10,&KDataCallCaps);
+ − 202
}
+ − 203
else
+ − 204
if(AsciiToNum(v42bisCaps, digit)==KErrNone)
+ − 205
iMobileCallCaps.iV42bisCaps = digit;
+ − 206
}
+ − 207
else //Default Values for Caps
+ − 208
{
+ − 209
iMobileCallCaps.iSpeedCaps=RMobileCall::KCapsSpeedAutobauding;
+ − 210
iMobileCallCaps.iProtocolCaps=RMobileCall::KCapsProtocolV32;
+ − 211
iMobileCallCaps.iServiceCaps=(RMobileCall::KCapsDataCircuitAsynchronous | RMobileCall::KCapsPacketAccessSyncUDI);
+ − 212
iMobileCallCaps.iQoSCaps=RMobileCall::KCapsTransparentPreferred;
+ − 213
iMobileCallCaps.iHscsdSupport=(TBool)(ETrue);
+ − 214
iMobileCallCaps.iMClass=1;
+ − 215
iMobileCallCaps.iMaxRxTimeSlots=5;
+ − 216
iMobileCallCaps.iMaxTxTimeSlots=5;
+ − 217
iMobileCallCaps.iTotalRxTxTimeSlots=10;
+ − 218
iMobileCallCaps.iCodingCaps=(RMobileCall::KCapsAiurCoding48 | RMobileCall::KCapsAiurCoding96);
+ − 219
iMobileCallCaps.iAsymmetryCaps=(RMobileCall::EAsymmetryUplink);
+ − 220
iMobileCallCaps.iUserInitUpgrade=(TBool)(ETrue);
+ − 221
iMobileCallCaps.iRLPVersionCaps = 1;
+ − 222
iMobileCallCaps.iV42bisCaps = 1;
+ − 223
}
+ − 224
+ − 225
TInt count = iLine->CfgFile()->ItemCount(KDataRLPparams);
+ − 226
TMobileCallRLPItem iMobileCallRLPItem;
+ − 227
iMobileCallRLPList = new(ELeave) CArrayFixFlat<TMobileCallRLPItem>(5);
+ − 228
+ − 229
if(count!=0)
+ − 230
{
+ − 231
for(TInt i=0;i<count;i++)
+ − 232
{
+ − 233
+ − 234
item = iLine->CfgFile()->Item(KDataRLPparams,i);
+ − 235
if(!item)
+ − 236
break;
+ − 237
+ − 238
TInt iRlpVersion,iIWSMax,iIWSMin,iMWSMax,iMWSMin;
+ − 239
TInt iT1Max,iT1Min,iN2Max,iN2Min,iT4Max,iT4Min;
+ − 240
+ − 241
TInt ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,iRlpVersion);
+ − 242
if(ret!=KErrNone)
+ − 243
{
+ − 244
LOGPARSERR("iRlpVersion",ret,0,&KDataRLPparams);
+ − 245
}
+ − 246
else
+ − 247
iMobileCallRLPItem.iRlpVersion = iRlpVersion;
+ − 248
+ − 249
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,iIWSMax);
+ − 250
if(ret!=KErrNone)
+ − 251
{
+ − 252
LOGPARSERR("iIWSMax",ret,0,&KDataRLPparams);
+ − 253
}
+ − 254
else
+ − 255
iMobileCallRLPItem.iMobileCallRLP.iIWSMax = iIWSMax;
+ − 256
+ − 257
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,iIWSMin);
+ − 258
if(ret!=KErrNone)
+ − 259
{
+ − 260
LOGPARSERR("iIWSMin",ret,1,&KDataRLPparams);
+ − 261
}
+ − 262
else
+ − 263
iMobileCallRLPItem.iMobileCallRLP.iIWSMin = iIWSMin;
+ − 264
+ − 265
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,iMWSMax);
+ − 266
if(ret!=KErrNone)
+ − 267
{
+ − 268
LOGPARSERR("iMWSMax",ret,2,&KDataRLPparams);
+ − 269
}
+ − 270
else
+ − 271
iMobileCallRLPItem.iMobileCallRLP.iMWSMax = iMWSMax;
+ − 272
+ − 273
+ − 274
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,iMWSMin);
+ − 275
if(ret!=KErrNone)
+ − 276
{
+ − 277
LOGPARSERR("iMWSMin",ret,3,&KDataRLPparams);
+ − 278
}
+ − 279
else
+ − 280
iMobileCallRLPItem.iMobileCallRLP.iMWSMin = iMWSMin;
+ − 281
+ − 282
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,iT1Max);
+ − 283
if(ret!=KErrNone)
+ − 284
{
+ − 285
LOGPARSERR("iT1Max",ret,4,&KDataRLPparams);
+ − 286
}
+ − 287
else
+ − 288
iMobileCallRLPItem.iMobileCallRLP.iT1Max = iT1Max;
+ − 289
+ − 290
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,5,iT1Min);
+ − 291
if(ret!=KErrNone)
+ − 292
{
+ − 293
LOGPARSERR("iT1Min",ret,5,&KDataRLPparams);
+ − 294
}
+ − 295
else
+ − 296
iMobileCallRLPItem.iMobileCallRLP.iT1Min = iT1Min;
+ − 297
+ − 298
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,6,iN2Max);
+ − 299
if(ret!=KErrNone)
+ − 300
{
+ − 301
LOGPARSERR("iN2Max",ret,6,&KDataRLPparams);
+ − 302
}
+ − 303
else
+ − 304
iMobileCallRLPItem.iMobileCallRLP.iN2Max = iN2Max;
+ − 305
+ − 306
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,7,iN2Min);
+ − 307
if(ret!=KErrNone)
+ − 308
{
+ − 309
LOGPARSERR("iN2Min",ret,7,&KDataRLPparams);
+ − 310
}
+ − 311
else
+ − 312
iMobileCallRLPItem.iMobileCallRLP.iN2Min = iN2Min;
+ − 313
+ − 314
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,8,iT4Max);
+ − 315
if(ret!=KErrNone)
+ − 316
{
+ − 317
LOGPARSERR("iT4Max",ret,8,&KDataRLPparams);
+ − 318
}
+ − 319
else
+ − 320
iMobileCallRLPItem.iMobileCallRLP.iT4Max = iT4Max;
+ − 321
+ − 322
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,9,iT4Min);
+ − 323
if(ret!=KErrNone)
+ − 324
{
+ − 325
LOGPARSERR("iT4Min",ret,9,&KDataRLPparams);
+ − 326
}
+ − 327
else
+ − 328
iMobileCallRLPItem.iMobileCallRLP.iT4Min = iT4Min;
+ − 329
+ − 330
iMobileCallRLPList->AppendL(iMobileCallRLPItem);
+ − 331
}
+ − 332
}
+ − 333
else
+ − 334
{
+ − 335
iMobileCallRLPItem.iRlpVersion=1;
+ − 336
iMobileCallRLPItem.iMobileCallRLP.iIWSMax=10;
+ − 337
iMobileCallRLPItem.iMobileCallRLP.iIWSMin=5;
+ − 338
iMobileCallRLPItem.iMobileCallRLP.iMWSMax=8;
+ − 339
iMobileCallRLPItem.iMobileCallRLP.iMWSMin=4;
+ − 340
iMobileCallRLPItem.iMobileCallRLP.iT1Max=4;
+ − 341
iMobileCallRLPItem.iMobileCallRLP.iT1Min=2;
+ − 342
iMobileCallRLPItem.iMobileCallRLP.iN2Max=12;
+ − 343
iMobileCallRLPItem.iMobileCallRLP.iN2Min=1;
+ − 344
iMobileCallRLPItem.iMobileCallRLP.iT4Max=10;
+ − 345
iMobileCallRLPItem.iMobileCallRLP.iT4Min=2;
+ − 346
iMobileCallRLPList->AppendL(iMobileCallRLPItem);
+ − 347
}
+ − 348
+ − 349
item=iLine->CfgFile()->Item(KDynamicHSCSDInfo);
+ − 350
if(item)
+ − 351
{
+ − 352
TPtrC8 iAiur,iCodings;
+ − 353
TInt iRxTimeSlots,iTxTimeSlots;
+ − 354
+ − 355
TUint8 digit=0;
+ − 356
+ − 357
TInt ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,iAiur);
+ − 358
if(ret!=KErrNone)
+ − 359
{
+ − 360
LOGPARSERR("iAiur",ret,0,&KDynamicHSCSDInfo);
+ − 361
}
+ − 362
else
+ − 363
if(AsciiToNum(iAiur, digit)==KErrNone)
+ − 364
iHscsdInfo.iAiur = (RMobileCall::TMobileCallAiur) digit;
+ − 365
+ − 366
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,iRxTimeSlots);
+ − 367
if(ret!=KErrNone)
+ − 368
{
+ − 369
LOGPARSERR("iRxTimeSlots",ret,1,&KDynamicHSCSDInfo);
+ − 370
}
+ − 371
else
+ − 372
iHscsdInfo.iRxTimeSlots = iRxTimeSlots;
+ − 373
+ − 374
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,iTxTimeSlots);
+ − 375
if(ret!=KErrNone)
+ − 376
{
+ − 377
LOGPARSERR("iTxTimeSlots",ret,2,&KDynamicHSCSDInfo);
+ − 378
}
+ − 379
else
+ − 380
iHscsdInfo.iTxTimeSlots = iTxTimeSlots;
+ − 381
+ − 382
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,iCodings);
+ − 383
if(ret!=KErrNone)
+ − 384
{
+ − 385
LOGPARSERR("iCodings",ret,3,&KDynamicHSCSDInfo);
+ − 386
}
+ − 387
else
+ − 388
if(AsciiToNum(iCodings, digit)==KErrNone)
+ − 389
iHscsdInfo.iCodings = (RMobileCall::TMobileCallTchCoding) digit;
+ − 390
}
+ − 391
else
+ − 392
{
+ − 393
iHscsdInfo.iAiur=RMobileCall::EAiurBps9600;
+ − 394
iHscsdInfo.iRxTimeSlots=5;
+ − 395
iHscsdInfo.iTxTimeSlots=10;
+ − 396
iHscsdInfo.iCodings=RMobileCall::ETchCoding48;
+ − 397
}
+ − 398
+ − 399
item=iLine->CfgFile()->Item(KCommSetup);
+ − 400
if(item)
+ − 401
{
+ − 402
TPtrC8 portName,csyName;
+ − 403
TInt err=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,csyName); // The 3rd parameter (0) represents the index of the variable on the config file line
+ − 404
if (err!=KErrNone)
+ − 405
{
+ − 406
LOGPARSERR("csyName",err,0,&KCommSetup);
+ − 407
iCsyName.Copy(KDefaultCsyName);
+ − 408
}
+ − 409
else
+ − 410
iCsyName.Copy(csyName);
+ − 411
+ − 412
err=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,portName); // The 3rd parameter (1) represents the index of the variable on the config file line
+ − 413
if (err!=KErrNone)
+ − 414
{
+ − 415
LOGPARSERR("portName",err,1,&KCommSetup);
+ − 416
iPortName.Copy(KDefaultPortName);
+ − 417
}
+ − 418
else
+ − 419
iPortName.Copy(portName);
+ − 420
+ − 421
TInt dataRate,handshake;
+ − 422
err=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,dataRate); // The 3rd parameter (2) represents the index of the variable on the config file line
+ − 423
if (err!=KErrNone)
+ − 424
{
+ − 425
LOGPARSERR("dataRate",err,2,&KCommSetup);
+ − 426
iConfig.iRate=KDefaultCommPortRate;
+ − 427
}
+ − 428
else
+ − 429
iConfig.iRate=(TBps)dataRate;
+ − 430
+ − 431
err=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,handshake); // The 3rd parameter (3) represents the index of the variable on the config file line
+ − 432
if (err!=KErrNone)
+ − 433
{
+ − 434
LOGPARSERR("handshake",err,3,&KCommSetup);
+ − 435
iConfig.iHandshake=KDefaultHandshake;
+ − 436
}
+ − 437
else
+ − 438
iConfig.iHandshake=(TUint)handshake;
+ − 439
}
+ − 440
else
+ − 441
{
+ − 442
iCsyName.Copy(KDefaultCsyName);
+ − 443
iPortName.Copy(KDefaultPortName);
+ − 444
iConfig.iRate=KDefaultCommPortRate;
+ − 445
iConfig.iHandshake=KDefaultHandshake;
+ − 446
}
+ − 447
+ − 448
// Read in the Bearer Service information
+ − 449
item=iLine->CfgFile()->Item(KBearerService);
+ − 450
if(item)
+ − 451
{
+ − 452
TInt bearerCaps,bearerSpeed;
+ − 453
TInt err=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,bearerCaps); // The 3rd parameter (0) represents the index of the variable on the config file line
+ − 454
if (err!=KErrNone)
+ − 455
{
+ − 456
LOGPARSERR("bearerCaps",err,0,&KBearerService);
+ − 457
iBearerService.iBearerCaps=KDefaultBearerCaps;
+ − 458
}
+ − 459
else
+ − 460
iBearerService.iBearerCaps=bearerCaps;
+ − 461
+ − 462
err=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,bearerSpeed); // The 3rd parameter (1) represents the index of the variable on the config file line
+ − 463
if (err!=KErrNone)
+ − 464
{
+ − 465
LOGPARSERR("bearerSpeed",err,1,&KBearerService);
+ − 466
iBearerService.iBearerSpeed=KDefaultBearerSpeed;
+ − 467
}
+ − 468
else
+ − 469
iBearerService.iBearerSpeed=(RCall::TCallBearerSpeed)bearerSpeed;
+ − 470
+ − 471
}
+ − 472
else
+ − 473
{
+ − 474
iBearerService.iBearerCaps=KDefaultBearerCaps;
+ − 475
iBearerService.iBearerSpeed=KDefaultBearerSpeed;
+ − 476
}
+ − 477
+ − 478
iTimer=CSimTimer::NewL(iLine->iPhone);
+ − 479
iNtRas=CSimNtRas::NewL(iLine->iPhone);
+ − 480
CSimCall::ConstructL();
+ − 481
+ − 482
//If present read in remote party info tag
+ − 483
TPtrC8 callingname, remotenumber;
+ − 484
TInt delay=0;
+ − 485
+ − 486
item=iLine->CfgFile()->Item(KNotifyRemotePartyInfo);
+ − 487
+ − 488
TInt ret;
+ − 489
+ − 490
if (item)
+ − 491
{
+ − 492
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,delay);
+ − 493
if(ret!=KErrNone)
+ − 494
{
+ − 495
LOGPARSERR("delay",ret,0,&KNotifyRemotePartyInfo);
+ − 496
}
+ − 497
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,callingname);
+ − 498
if(ret!=KErrNone)
+ − 499
{
+ − 500
LOGPARSERR("callingname",ret,1,&KNotifyRemotePartyInfo);
+ − 501
}
+ − 502
ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,remotenumber);
+ − 503
if(ret!=KErrNone)
+ − 504
{
+ − 505
LOGPARSERR("remotenumber",ret,2,&KNotifyRemotePartyInfo);
+ − 506
}
+ − 507
+ − 508
iNotifyRemotePartyInfoTimer->iDelay = delay;
+ − 509
iNotifyRemotePartyInfoTimer->iRemotePartyInfoV1.iDirection = RMobileCall::EDirectionUnknown;
+ − 510
iNotifyRemotePartyInfoTimer->iRemotePartyInfoV1.iCallingName.Copy(callingname);
+ − 511
iNotifyRemotePartyInfoTimer->iRemotePartyInfoV1.iRemoteNumber.iTelNumber.Copy(remotenumber);
+ − 512
iNotifyRemotePartyInfoTimer->iRemotePartyInfoV1.iRemoteNumber.iTypeOfNumber = RMobilePhone::EInternationalNumber;
+ − 513
iNotifyRemotePartyInfoTimer->iRemotePartyInfoV1.iRemoteNumber.iNumberPlan = RMobilePhone::EIsdnNumberPlan;
+ − 514
iNotifyRemotePartyInfoTimer->iRemotePartyInfoV1.iRemoteIdStatus = RMobileCall::ERemoteIdentityAvailable;
+ − 515
}
+ − 516
else
+ − 517
{
+ − 518
iNotifyRemotePartyInfoTimer->iRemotePartyInfoV1.iRemoteIdStatus = RMobileCall::ERemoteIdentityUnknown;
+ − 519
}
+ − 520
+ − 521
LOGDATA1("...Finished parsing Data Call config parameters...");
+ − 522
}
+ − 523
+ − 524
CSimDataCall::~CSimDataCall()
+ − 525
/**
+ − 526
* Destroy all the objects constructed.
+ − 527
* CSimTimer and CSimSysAgent objects are destroyed here
+ − 528
*/
+ − 529
{
+ − 530
delete iNtRas;
+ − 531
delete iTimer;
+ − 532
if(iAnswerIncomingCall.iNotifyPending)
+ − 533
iLine->ResetAutoAnswerCallObject(this);
+ − 534
if(iMobileCallRLPList)
+ − 535
{
+ − 536
iMobileCallRLPList->Delete(0,iMobileCallRLPList->Count());
+ − 537
delete iMobileCallRLPList;
+ − 538
}
+ − 539
}
+ − 540
+ − 541
TInt CSimDataCall::ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage& aPackage)
+ − 542
/**
+ − 543
* ExtFunc is called by the server when it has a "extended", i.e. non-core ETel request
+ − 544
* for the TSY to process
+ − 545
* A request handle, request type and request data are passed to the TSY
+ − 546
*
+ − 547
* @param aTsyReqHandle
+ − 548
* @param aIpc IPc number representing the request
+ − 549
* @param aPackage data for the request
+ − 550
* @return KErrNone
+ − 551
*/
+ − 552
{
+ − 553
TAny* dataPtr=aPackage.Ptr1();
+ − 554
TAny* dataPtr2=aPackage.Ptr2();
+ − 555
+ − 556
LOGDATA2("CSimDataCall::ExtFunc: IPC Number is %d",aIpc);
+ − 557
// The request data has to extracted from TDataPackage and the TAny* pointers have to
+ − 558
// be "cast" to the expected request data type
+ − 559
+ − 560
switch (aIpc)
+ − 561
{
+ − 562
//
+ − 563
// No Flow Control NOR Multiple Completion
+ − 564
//
+ − 565
case EMobileCallGetMobileCallCaps:
+ − 566
return GetMobileCallCaps(aTsyReqHandle,aPackage.Des1n());
+ − 567
+ − 568
case EMobileCallGetMobileDataCallCaps:
+ − 569
return GetMobileDataCallCaps(aTsyReqHandle,aPackage.Des1n());
+ − 570
+ − 571
case EMobileCallGetMobileDataCallRLPRange:
+ − 572
return GetMobileDataCallRLPRange(aTsyReqHandle,
+ − 573
REINTERPRET_CAST(TInt*,dataPtr),
+ − 574
REINTERPRET_CAST(TDes8*,dataPtr2));
+ − 575
+ − 576
case EMobileCallSetDynamicHscsdParams:
+ − 577
return SetDynamicHSCSDParams(aTsyReqHandle,
+ − 578
REINTERPRET_CAST(RMobileCall::TMobileCallAiur*,dataPtr),
+ − 579
REINTERPRET_CAST(TInt*,dataPtr2));
+ − 580
+ − 581
case EMobileCallGetCurrentHscsdInfo:
+ − 582
return GetCurrentHSCSDInfo(aTsyReqHandle, aPackage.Des1n());
+ − 583
+ − 584
case EMobileCallGetMobileCallStatus:
+ − 585
return GetMobileCallStatus(aTsyReqHandle,
+ − 586
REINTERPRET_CAST(RMobileCall::TMobileCallStatus*,dataPtr));
+ − 587
+ − 588
case EMobileCallGetMobileCallInfo:
+ − 589
return GetMobileCallInfo(aTsyReqHandle,aPackage.Des1n());
+ − 590
+ − 591
//
+ − 592
// Multiple Completion Services with Immediate Server Repost
+ − 593
// (Usually Notifications)
+ − 594
//
+ − 595
case EMobileCallNotifyMobileCallStatusChange:
+ − 596
return NotifyMobileCallStatusChange(aTsyReqHandle,
+ − 597
REINTERPRET_CAST(RMobileCall::TMobileCallStatus*, dataPtr));
+ − 598
+ − 599
case EMobileCallNotifyMobileCallCapsChange:
+ − 600
return NotifyMobileCallCapsChange(aTsyReqHandle, aPackage.Des1n());
+ − 601
+ − 602
case EMobileCallNotifyMobileDataCallCapsChange:
+ − 603
return NotifyMobileDataCapsChange(aTsyReqHandle, aPackage.Des1n());
+ − 604
+ − 605
case EMobileCallNotifyHscsdInfoChange:
+ − 606
return NotifyHSCSDInfoChange(aTsyReqHandle, aPackage.Des1n());
+ − 607
+ − 608
case EMobileCallNotifyRemotePartyInfoChange:
+ − 609
return NotifyRemotePartyInfoChange(aTsyReqHandle, aPackage.Des1n());
+ − 610
+ − 611
default:
+ − 612
LOGDATA2("CSimDataCall::ExtFunc: Unsupported IPC detected - number %d",aIpc);
+ − 613
break;
+ − 614
}
+ − 615
+ − 616
return KErrNotSupported;
+ − 617
}
+ − 618
+ − 619
TInt CSimDataCall::CancelService(const TInt aIpc,const TTsyReqHandle aTsyReqHandle)
+ − 620
/**
+ − 621
* Cancel an outstanding request.
+ − 622
* @param aIpc The IPC number of the request that must be cancelled. Note: this is not the
+ − 623
* IPC number of the cancel request itself.
+ − 624
* @param aTsyReqHandle The TSY Request Handle of the request to be cancelled.
+ − 625
*/
+ − 626
{
+ − 627
switch(aIpc)
+ − 628
{
+ − 629
case EMobileCallNotifyMobileCallStatusChange:
+ − 630
return NotifyMobileCallStatusChangeCancel(aTsyReqHandle);
+ − 631
+ − 632
case EMobileCallNotifyMobileCallCapsChange:
+ − 633
return NotifyMobileCallCapsChangeCancel(aTsyReqHandle);
+ − 634
+ − 635
case EMobileCallNotifyMobileDataCallCapsChange:
+ − 636
return NotifyMobileDataCapsChangeCancel(aTsyReqHandle);
+ − 637
+ − 638
case EMobileCallSetDynamicHscsdParams:
+ − 639
return SetDynamicHSCSDParamsCancel(aTsyReqHandle);
+ − 640
+ − 641
case EMobileCallGetMobileDataCallCaps:
+ − 642
return GetMobileDataCallCapsCancel(aTsyReqHandle);
+ − 643
+ − 644
case EMobileCallGetMobileDataCallRLPRange:
+ − 645
return GetMobileDataCallRLPRangeCancel(aTsyReqHandle);
+ − 646
+ − 647
case EMobileCallNotifyHscsdInfoChange:
+ − 648
return NotifyHSCSDInfoChangeCancel(aTsyReqHandle);
+ − 649
+ − 650
case EMobileCallNotifyRemotePartyInfoChange:
+ − 651
return NotifyRemotePartyInfoChangeCancel();
+ − 652
+ − 653
default:
+ − 654
LOGDATA1("CSimDataCall::CancelService: No match for IPC, defering to base function");
+ − 655
break;
+ − 656
}
+ − 657
return CCallBase::CancelService(aIpc,aTsyReqHandle);
+ − 658
}
+ − 659
+ − 660
TInt CSimDataCall::Dial(const TTsyReqHandle aTsyReqHandle,const TDesC8* aCallParams,TDesC* /*aTelNumber*/)
+ − 661
/**
+ − 662
* Process a client's dial request.
+ − 663
*
+ − 664
* @param aTsyReqHandle
+ − 665
* @param aCallParams the call parameters
+ − 666
* @param aTelNumber The telephone number to dial
+ − 667
* @return KErrNone
+ − 668
*/
+ − 669
{
+ − 670
LOGDATA1(">>CSimDataCall::Dial");
+ − 671
iDialRequestHandle=aTsyReqHandle;
+ − 672
PopulateCallParams(aCallParams);
+ − 673
+ − 674
TInt err=ActionEvent(ECallEventDial,KErrNone);
+ − 675
if(err!=KErrNone)
+ − 676
ReqCompleted(aTsyReqHandle,err);
+ − 677
+ − 678
LOGDATA1("<<CSimDataCall::Dial");
+ − 679
return KErrNone;
+ − 680
}
+ − 681
+ − 682
TInt CSimDataCall::DialCancel(const TTsyReqHandle /*aTsyReqHandle*/)
+ − 683
/**
+ − 684
* Cancels a dial Request
+ − 685
*
+ − 686
* @param aTsyReqHandle
+ − 687
* @return KErrNone if successfully cancelled
+ − 688
*/
+ − 689
{
+ − 690
LOGDATA1(">>CSimDataCall::DialCancel");
+ − 691
switch(iState)
+ − 692
{
+ − 693
case RMobileCall::EStatusIdle:
+ − 694
case RMobileCall::EStatusConnected:
+ − 695
SimPanic(EIllegalCancelRequest); // A DialCancel should never reach the TSY in this state.
+ − 696
break;
+ − 697
+ − 698
case RMobileCall::EStatusDialling:
+ − 699
case RMobileCall::EStatusConnecting:
+ − 700
iTimer->Cancel();
+ − 701
+ − 702
TInt err;
+ − 703
err = KErrNone;
+ − 704
TRAP(err, ChangeStateL(RMobileCall::EStatusIdle,EFalse,EFalse));
+ − 705
if (err != KErrNone)
+ − 706
{
+ − 707
ReqCompleted(iDialRequestHandle, err);
+ − 708
}
+ − 709
else
+ − 710
{
+ − 711
ReqCompleted(iDialRequestHandle, KErrCancel);
+ − 712
}
+ − 713
break;
+ − 714
+ − 715
default:
+ − 716
LOGDATA2("CSimDataCall::DialCancel: No action taken - state: %d",iState);
+ − 717
break;
+ − 718
}
+ − 719
LOGDATA1("<<CSimDataCall::DialCancel");
+ − 720
return KErrNone;
+ − 721
}
+ − 722
+ − 723
TInt CSimDataCall::AnswerIncomingCall(const TTsyReqHandle aTsyReqHandle,const TDesC8* aCallParams)
+ − 724
/**
+ − 725
* Register a client's interest in answering the next incoming call.
+ − 726
* First register interest in incoming calls with the line, then, if a call
+ − 727
* is already ringing, start the answer procedure.
+ − 728
*
+ − 729
* @param aTsyReqHandle
+ − 730
* @param aCallParams the call parameters
+ − 731
* @return KErrNone
+ − 732
*/
+ − 733
{
+ − 734
LOGDATA1(">>CSimDataCall::AnswerIncomingCall");
+ − 735
TInt err=iLine->SetAutoAnswerCallObject(this);
+ − 736
if(err!=KErrNone)
+ − 737
{
+ − 738
ReqCompleted(aTsyReqHandle,err);
+ − 739
return KErrNone;
+ − 740
}
+ − 741
+ − 742
PopulateCallParams(aCallParams);
+ − 743
iAnswerIncomingCall.iNotifyPending=ETrue;
+ − 744
iAnswerIncomingCall.iNotifyHandle=aTsyReqHandle;
+ − 745
+ − 746
TInt ret=KErrNone;
+ − 747
if(iState==RMobileCall::EStatusRinging)
+ − 748
ActionEvent(ECallEventAnswerIncoming,KErrNone);
+ − 749
else if(iLine->iState==RMobileCall::EStatusRinging)
+ − 750
{
+ − 751
TRAP(ret,ret=ChangeStateL(RMobileCall::EStatusRinging,EFalse,EFalse));
+ − 752
if(ret == KErrNone)
+ − 753
{
+ − 754
ret = ActionEvent(ECallEventAnswerIncoming,KErrNone);
+ − 755
}
+ − 756
}
+ − 757
LOGDATA1("<<CSimDataCall::AnswerIncomingCall");
+ − 758
return ret;
+ − 759
}
+ − 760
+ − 761
TInt CSimDataCall::AnswerIncomingCallCancel(const TTsyReqHandle /*aTsyReqHandle*/)
+ − 762
/**
+ − 763
* Cancels a AnswerIncomingCall Request
+ − 764
*
+ − 765
* @param aTsyReqHandle
+ − 766
* @return KErrNone if successfully cancelled
+ − 767
*/
+ − 768
{
+ − 769
LOGDATA1(">>CSimDataCall::AnswerIncomingCallCancel");
+ − 770
if(iAnswerIncomingCall.iNotifyPending)
+ − 771
{
+ − 772
iAnswerIncomingCall.iNotifyPending=EFalse;
+ − 773
iLine->ResetAutoAnswerCallObject(this);
+ − 774
ReqCompleted(iAnswerIncomingCall.iNotifyHandle,KErrCancel);
+ − 775
}
+ − 776
LOGDATA1("<<CSimDataCall::AnswerIncomingCallCancel");
+ − 777
return KErrNone;
+ − 778
}
+ − 779
+ − 780
TInt CSimDataCall::Connect(const TTsyReqHandle aTsyReqHandle,const TDesC8* /*aCallParams*/)
+ − 781
{
+ − 782
ReqCompleted(aTsyReqHandle,KErrNotSupported);
+ − 783
return KErrNone;
+ − 784
}
+ − 785
+ − 786
TInt CSimDataCall::ConnectCancel(const TTsyReqHandle aTsyReqHandle)
+ − 787
{
+ − 788
ReqCompleted(aTsyReqHandle,KErrNotSupported);
+ − 789
return KErrNone;
+ − 790
}
+ − 791
+ − 792
TInt CSimDataCall::HangUp(const TTsyReqHandle aTsyReqHandle)
+ − 793
/**
+ − 794
* Process a client's HangUp request.
+ − 795
*
+ − 796
* @param aTsyReqHandle
+ − 797
* @return KErrNone
+ − 798
*/
+ − 799
{
+ − 800
LOGDATA1(">>CSimDataCall::HangUp");
+ − 801
iHangUpRequestHandle=aTsyReqHandle;
+ − 802
TInt err=ActionEvent(ECallEventHangUp,KErrNone);
+ − 803
if(err!=KErrNone)
+ − 804
ReqCompleted(aTsyReqHandle,err);
+ − 805
LOGDATA1("<<CSimDataCall::HangUp");
+ − 806
return KErrNone;
+ − 807
}
+ − 808
+ − 809
TInt CSimDataCall::HangUpCancel(const TTsyReqHandle /*aTsyReqHandle*/)
+ − 810
/**
+ − 811
* Cancels a HangUp Request
+ − 812
*
+ − 813
* @param aTsyReqHandle
+ − 814
* @return KErrNone if successfully cancelled
+ − 815
*/
+ − 816
{
+ − 817
LOGDATA1(">>CSimDataCall::HangUpCancel");
+ − 818
switch(iState)
+ − 819
{
+ − 820
case RMobileCall::EStatusIdle:
+ − 821
SimPanic(EIllegalCancelRequest); // A DialCancel should never reach the TSY in this state.
+ − 822
break;
+ − 823
+ − 824
case RMobileCall::EStatusDisconnecting:
+ − 825
iTimer->Cancel();
+ − 826
+ − 827
TInt err;
+ − 828
err = KErrNone;
+ − 829
TRAP(err, ChangeStateL(RMobileCall::EStatusIdle,EFalse,EFalse));
+ − 830
if (err != KErrNone)
+ − 831
{
+ − 832
ReqCompleted(iHangUpRequestHandle, err);
+ − 833
}
+ − 834
else
+ − 835
{
+ − 836
ReqCompleted(iHangUpRequestHandle, KErrCancel);
+ − 837
}
+ − 838
break;
+ − 839
+ − 840
default:
+ − 841
LOGDATA2("CSimDataCall::HangUpCancel: No action taken - state: %d",iState);
+ − 842
break;
+ − 843
}
+ − 844
LOGDATA1("<<CSimDataCall::HangUpCancel");
+ − 845
return KErrNone;
+ − 846
}
+ − 847
+ − 848
TInt CSimDataCall::RelinquishOwnership()
+ − 849
{
+ − 850
return KErrNotSupported;
+ − 851
}
+ − 852
+ − 853
TInt CSimDataCall::GetBearerServiceInfo(const TTsyReqHandle aTsyReqHandle,RCall::TBearerService* aBearerService)
+ − 854
/**
+ − 855
* Retrieves the bearer service info. Bearer service information is only valid
+ − 856
* when the call is active.
+ − 857
*/
+ − 858
{
+ − 859
if(iState!=RMobileCall::EStatusConnected)
+ − 860
{
+ − 861
ReqCompleted(aTsyReqHandle,KErrEtelCallNotActive);
+ − 862
return KErrNone;
+ − 863
}
+ − 864
+ − 865
*aBearerService=iBearerService;
+ − 866
ReqCompleted(aTsyReqHandle,KErrNone);
+ − 867
return KErrNone;
+ − 868
}
+ − 869
+ − 870
TInt CSimDataCall::GetCallParams(const TTsyReqHandle aTsyReqHandle, TDes8* aCallParams)
+ − 871
/**
+ − 872
* Retrives the call parameters. This function must handle both core and Multimode
+ − 873
* extension versions of the function. Call parameter information is only valid
+ − 874
* when the call is active.
+ − 875
*/
+ − 876
{
+ − 877
if(iState!=RMobileCall::EStatusConnected)
+ − 878
{
+ − 879
ReqCompleted(aTsyReqHandle,KErrEtelCallNotActive);
+ − 880
return KErrNone;
+ − 881
}
+ − 882
+ − 883
TPckg<RCall::TCallParams>* callParamPckg=(TPckg<RCall::TCallParams>*)aCallParams;
+ − 884
RCall::TCallParams& callParam=(*callParamPckg)();
+ − 885
+ − 886
if(callParam.ExtensionId()==RMobileCall::KETelMobileDataCallParamsV1)
+ − 887
{
+ − 888
// If the passed package is MobileParams, then we can just unpackage and copy.
+ − 889
RMobileCall::TMobileDataCallParamsV1Pckg* mobileCallParamPckg=(RMobileCall::TMobileDataCallParamsV1Pckg*)aCallParams;
+ − 890
RMobileCall::TMobileDataCallParamsV1& mobileCallParam=(*mobileCallParamPckg)();
+ − 891
+ − 892
// Check that the data structure is supported by the simulated TSY version
+ − 893
TInt err = iPhone->CheckSimTsyVersion(mobileCallParam);
+ − 894
if(err != KErrNone)
+ − 895
{
+ − 896
ReqCompleted(aTsyReqHandle, err);
+ − 897
return KErrNone;
+ − 898
}
+ − 899
+ − 900
mobileCallParam=iMobileCallParams;
+ − 901
}
+ − 902
+ − 903
else if(callParam.ExtensionId()==RMobileCall::KETelMobileHscsdCallParamsV1)
+ − 904
{
+ − 905
TPckg<RMobileCall::TMobileHscsdCallParamsV1>* mobileCallParamPckg=(TPckg<RMobileCall::TMobileHscsdCallParamsV1>*)aCallParams;
+ − 906
RMobileCall::TMobileHscsdCallParamsV1& mobileCallParam=(*mobileCallParamPckg)();
+ − 907
+ − 908
// Check that the data structure is supported by the simulated TSY version
+ − 909
TInt err = iPhone->CheckSimTsyVersion(mobileCallParam);
+ − 910
if(err != KErrNone)
+ − 911
{
+ − 912
ReqCompleted(aTsyReqHandle, err);
+ − 913
return KErrNone;
+ − 914
}
+ − 915
+ − 916
mobileCallParam=iHscsdSettings;
+ − 917
}
+ − 918
else
+ − 919
{
+ − 920
// If, however, its a core (or an unrecognised extension), we must only copy the
+ − 921
// core parameters.
+ − 922
callParam.iSpeakerControl=iMobileCallParams.iSpeakerControl;
+ − 923
callParam.iSpeakerVolume=iMobileCallParams.iSpeakerVolume;
+ − 924
callParam.iInterval=iMobileCallParams.iInterval;
+ − 925
callParam.iWaitForDialTone=iMobileCallParams.iWaitForDialTone;
+ − 926
}
+ − 927
+ − 928
ReqCompleted(aTsyReqHandle,KErrNone);
+ − 929
return KErrNone;
+ − 930
}
+ − 931
+ − 932
TInt CSimDataCall::LoanDataPort(const TTsyReqHandle aReqHandle,RCall::TCommPort* aCommPort)
+ − 933
/**
+ − 934
* Loans the comm port to a client for subsequent streaming of data.
+ − 935
* For the comm port to be loaned the call must be active and the port unloaned.
+ − 936
*/
+ − 937
{
+ − 938
if(iState!=RMobileCall::EStatusConnected)
+ − 939
{
+ − 940
ReqCompleted(aReqHandle,KErrEtelCallNotActive);
+ − 941
return KErrNone;
+ − 942
}
+ − 943
+ − 944
if(iCommPortLoaned)
+ − 945
{
+ − 946
ReqCompleted(aReqHandle,KErrEtelPortAlreadyLoaned);
+ − 947
return KErrNone;
+ − 948
}
+ − 949
+ − 950
aCommPort->iCsy.Copy(iCsyName);
+ − 951
aCommPort->iPort.Copy(iPortName);
+ − 952
iCommPortLoaned=ETrue;
+ − 953
ReqCompleted(aReqHandle,KErrNone);
+ − 954
return KErrNone;
+ − 955
}
+ − 956
+ − 957
TInt CSimDataCall::LoanDataPortCancel(const TTsyReqHandle)
+ − 958
/**
+ − 959
* Cancels the LoanDataPort request.
+ − 960
* The LoanDataPort function completes synchronously, so there is nothing to cancel.
+ − 961
*/
+ − 962
{
+ − 963
return KErrNone;
+ − 964
}
+ − 965
+ − 966
TInt CSimDataCall::RecoverDataPort(const TTsyReqHandle aReqHandle)
+ − 967
/**
+ − 968
* Recovers the comm port.
+ − 969
* The comm port must be loaned in order to recover it.
+ − 970
*/
+ − 971
{
+ − 972
if(!iCommPortLoaned)
+ − 973
{
+ − 974
ReqCompleted(aReqHandle,KErrEtelPortNotLoanedToClient);
+ − 975
return KErrNone;
+ − 976
}
+ − 977
+ − 978
iNtRas->Terminate();
+ − 979
iCommPortLoaned=EFalse;
+ − 980
ReqCompleted(aReqHandle,KErrNone);
+ − 981
return KErrNone;
+ − 982
}
+ − 983
+ − 984
TInt CSimDataCall::ActionEvent(TCallEvent aEvent,TInt aStatus)
+ − 985
/**
+ − 986
* Entry point when an event has occured that may advance the state machine.
+ − 987
* The aEvent parameter describes the event.
+ − 988
*
+ − 989
* This function contains the main state machine for the data call. The outer layer
+ − 990
* switches on the event type. Where appropriate, there are inner layer switches
+ − 991
* or conditional statements to handle the different responses that may be required to
+ − 992
* the same event occurring in different states.
+ − 993
*
+ − 994
* @param aEvent The Call event to handle
+ − 995
* @return value represents the error state caused by the attempted state machine jump.
+ − 996
*/
+ − 997
{
+ − 998
TInt ret=KErrNone;
+ − 999
__ASSERT_ALWAYS(iState!=RMobileCall::EStatusUnknown,SimPanic(ECallStatusUnknownIllegal));
+ − 1000
+ − 1001
switch(aEvent)
+ − 1002
{
+ − 1003
case ECallEventDial:
+ − 1004
LOGDATA1(">>CSimDataCall::ActionEvent = [ECallEventDial]");
+ − 1005
if(iState==RMobileCall::EStatusIdle)
+ − 1006
{
+ − 1007
TRAP(ret, ret=ChangeStateL(RMobileCall::EStatusDialling,EFalse,EFalse));
+ − 1008
if(ret==KErrNone)
+ − 1009
iTimer->Start(iDiallingPause,this);
+ − 1010
}
+ − 1011
else
+ − 1012
return KErrEtelCallAlreadyActive;
+ − 1013
break;
+ − 1014
+ − 1015
case ECallEventHangUp:
+ − 1016
{
+ − 1017
LOGDATA1(">>CSimDataCall::ActionEvent = [ECallEventHangUp]");
+ − 1018
switch(iState)
+ − 1019
{
+ − 1020
case RMobileCall::EStatusConnected:
+ − 1021
iCommPortLoaned=EFalse;
+ − 1022
iNtRas->Terminate();
+ − 1023
// Note: No "break;" - fall through to the rest of the discconnecting code...
+ − 1024
case RMobileCall::EStatusDialling:
+ − 1025
case RMobileCall::EStatusRinging:
+ − 1026
case RMobileCall::EStatusAnswering:
+ − 1027
case RMobileCall::EStatusConnecting:
+ − 1028
iTimer->Cancel();
+ − 1029
TRAP(ret, ret=ChangeStateL(RMobileCall::EStatusDisconnecting,EFalse,EFalse));
+ − 1030
if(ret==KErrNone)
+ − 1031
iTimer->Start(iDisconnectingPause,this);
+ − 1032
break;
+ − 1033
default:
+ − 1034
return KErrEtelCallNotActive;
+ − 1035
}
+ − 1036
}
+ − 1037
break;
+ − 1038
+ − 1039
case ECallEventIncomingCall:
+ − 1040
LOGDATA1(">>CSimDataCall::ActionEvent = [ECallEventIncomingCall]");
+ − 1041
if(iState==RMobileCall::EStatusIdle)
+ − 1042
{
+ − 1043
if(iAnswerIncomingCall.iNotifyPending)
+ − 1044
{
+ − 1045
TRAP(ret, ret=ProcessAnswerIncomingCallL());
+ − 1046
}
+ − 1047
else
+ − 1048
{
+ − 1049
TRAP(ret, ret=ChangeStateL(RMobileCall::EStatusRinging,EFalse,EFalse));
+ − 1050
if(ret!=KErrNone)
+ − 1051
return ret;
+ − 1052
}
+ − 1053
}
+ − 1054
else
+ − 1055
return KErrEtelCallAlreadyActive;
+ − 1056
break;
+ − 1057
+ − 1058
case ECallEventAnswerIncoming:
+ − 1059
LOGDATA1(">>CSimDataCall::ActionEvent = [ECallEventAnswerIncoming]");
+ − 1060
if(iState==RMobileCall::EStatusRinging)
+ − 1061
{
+ − 1062
TRAP(ret, ret=ProcessAnswerIncomingCallL());
+ − 1063
}
+ − 1064
else
+ − 1065
SimPanic(EIllegalStateInconsistancy); // The state is checked in AnswerIncomingCall, so there's been an inconsistancy if the state is out of line.
+ − 1066
break;
+ − 1067
+ − 1068
case ECallEventRemoteHangup:
+ − 1069
LOGDATA1(">>CSimDataCall::ActionEvent = [ECallEventRemoteHangup]");
+ − 1070
if(iState==RMobileCall::EStatusConnected)
+ − 1071
{
+ − 1072
TRAP(ret, ret=ProcessRemoteHangupL());
+ − 1073
}
+ − 1074
else
+ − 1075
SimPanic(EIllegalStateInconsistancy); // The state is checked in RemoteHangup, so there's been an inconsistancy if the state is out of line.
+ − 1076
break;
+ − 1077
+ − 1078
case ECallEventTimeOut:
+ − 1079
{
+ − 1080
LOGDATA1(">>CSimVoiceCall::ActionEvent = [ECallEventTimeOut]");
+ − 1081
switch(iState)
+ − 1082
{
+ − 1083
case RMobileCall::EStatusDialling:
+ − 1084
LOGDATA1(">>CSimDataCall::State = [EStatusDialling]");
+ − 1085
TRAP(ret, ret=ChangeStateL(RMobileCall::EStatusConnecting,EFalse,EFalse));
+ − 1086
if(ret==KErrNone)
+ − 1087
iTimer->Start(iConnectingPause,this);
+ − 1088
return ret;
+ − 1089
+ − 1090
case RMobileCall::EStatusConnecting:
+ − 1091
LOGDATA1(">>CSimDataCall::State = [EStatusConnecting]");
+ − 1092
// If the config file has not spec'ed a CSY, then fail the dial...
+ − 1093
if(iCsyName.Length()==0)
+ − 1094
{
+ − 1095
ReqCompleted(iDialRequestHandle,KErrEtelNoCarrier);
+ − 1096
TRAP(ret, ret=ChangeStateL(RMobileCall::EStatusIdle,EFalse,EFalse));
+ − 1097
+ − 1098
__ASSERT_ALWAYS(ret==KErrNone,SimPanic(EIllegalStateInconsistancy));
+ − 1099
return KErrNone;
+ − 1100
}
+ − 1101
ret=iNtRas->Connect(iCsyName,iPortName,iConfig,this);
+ − 1102
if(ret!=KErrNone)
+ − 1103
ReqCompleted(iDialRequestHandle,ret);
+ − 1104
return ret;
+ − 1105
+ − 1106
case RMobileCall::EStatusDisconnecting:
+ − 1107
LOGDATA1(">>CSimDataCall::State = [EStatusDisconnecting]");
+ − 1108
TRAP(ret, ret=ChangeStateL(RMobileCall::EStatusIdle,EFalse,EFalse));
+ − 1109
ReqCompleted(iHangUpRequestHandle,ret);
+ − 1110
return ret;
+ − 1111
+ − 1112
case RMobileCall::EStatusAnswering:
+ − 1113
LOGDATA1(">>CSimDataCall::State = [EStatusAnswering]");
+ − 1114
TRAP(ret, ret=ChangeStateL(RMobileCall::EStatusConnected,EFalse,EFalse));
+ − 1115
ReqCompleted(iAnswerIncomingCall.iNotifyHandle,ret);
+ − 1116
return ret;
+ − 1117
+ − 1118
default:
+ − 1119
LOGDATA2(">>CSimDataCall::State = [%d]",iState);
+ − 1120
break;
+ − 1121
}
+ − 1122
}
+ − 1123
break;
+ − 1124
+ − 1125
case ECallEventNtRasConnected:
+ − 1126
if(aStatus!=KErrNone)
+ − 1127
{
+ − 1128
ReqCompleted(iDialRequestHandle,aStatus);
+ − 1129
TRAP(ret, ret=ChangeStateL(RMobileCall::EStatusIdle,EFalse,EFalse));
+ − 1130
__ASSERT_ALWAYS(ret==KErrNone,SimPanic(EIllegalStateInconsistancy));
+ − 1131
return KErrNone;
+ − 1132
}
+ − 1133
else
+ − 1134
{
+ − 1135
TRAP(ret, ret=ChangeStateL(RMobileCall::EStatusConnected,EFalse,EFalse));
+ − 1136
ChangeDynamicInfo();
+ − 1137
ReqCompleted(iDialRequestHandle,ret);
+ − 1138
return KErrNone;
+ − 1139
}
+ − 1140
default:
+ − 1141
SimPanic(EIllegalStateInconsistancy);
+ − 1142
break;
+ − 1143
}
+ − 1144
+ − 1145
return ret;
+ − 1146
}
+ − 1147
+ − 1148
+ − 1149
void CSimDataCall::TimerCallBack(TInt /*aId*/)
+ − 1150
/**
+ − 1151
* Timer callback function. When the timer goes off, it will call back into this
+ − 1152
* function for further processing.
+ − 1153
*/
+ − 1154
{
+ − 1155
LOGDATA1(">>CSimDataCall::TimerCallBack");
+ − 1156
TInt err=ActionEvent(ECallEventTimeOut,KErrNone);
+ − 1157
__ASSERT_ALWAYS(err==KErrNone,SimPanic(ETimeOutEventActionFailed));
+ − 1158
LOGDATA1("<<CSimDataCall::TimerCallBack");
+ − 1159
}
+ − 1160
+ − 1161
TInt CSimDataCall::ProcessAnswerIncomingCallL()
+ − 1162
/**
+ − 1163
* Answers an Incoming Call.
+ − 1164
* First the call state must be changed to "answering", then the flag indicating
+ − 1165
* that an answer incoming call request is no longer pending. Finally, a new
+ − 1166
* call object must be assigned to receive the details of the next incoming call.
+ − 1167
*/
+ − 1168
{
+ − 1169
LOGDATA1(">>CSimDataCall::ProcessAnswerIncomingCall");
+ − 1170
TInt ret=ChangeStateL(RMobileCall::EStatusAnswering,EFalse,EFalse);
+ − 1171
if(ret!=KErrNone)
+ − 1172
return ret;
+ − 1173
iTimer->Start(iAnswerIncomingPause,this);
+ − 1174
iAnswerIncomingCall.iNotifyPending=EFalse;
+ − 1175
iLine->ResetAutoAnswerCallObject(this);
+ − 1176
LOGDATA1("<<CSimDataCall::ProcessAnswerIncomingCall");
+ − 1177
return ret;
+ − 1178
}
+ − 1179
+ − 1180
TInt CSimDataCall::ProcessRemoteHangupL()
+ − 1181
/**
+ − 1182
* Hangs up a call from the remote end.
+ − 1183
* First the call state must be changed to "disconnecting", then the flag indicating
+ − 1184
* that a remote hangup request is no longer pending. Finally, a new
+ − 1185
* call object must be assigned to be the next remotely hung up call.
+ − 1186
*/
+ − 1187
{
+ − 1188
LOGDATA1(">>CSimDataCall::ProcessRemoteHangupL");
+ − 1189
TInt ret=ChangeStateL(RMobileCall::EStatusDisconnecting,EFalse,EFalse);
+ − 1190
if(ret!=KErrNone)
+ − 1191
return ret;
+ − 1192
iTimer->Start(iRemoteHangupPause,this);
+ − 1193
iLine->ResetRemoteHangupCallObject(this);
+ − 1194
LOGDATA1("<<CSimDataCall::ProcessRemoteHangupL");
+ − 1195
return ret;
+ − 1196
}
+ − 1197
+ − 1198
+ − 1199
void CSimDataCall::PopulateCallParams(const TDesC8* aCallParams)
+ − 1200
/**
+ − 1201
* This function populates the call parameter member variable iMobileCallParams.
+ − 1202
* The function must handle core and multimode extension call parameters.
+ − 1203
* @param aCallParams A pointer to the call parameter variable.
+ − 1204
*/
+ − 1205
{
+ − 1206
TPckg<RCall::TCallParams>* callParamPckg=(TPckg<RCall::TCallParams>*)aCallParams;
+ − 1207
RCall::TCallParams& callParam=(*callParamPckg)();
+ − 1208
+ − 1209
if(callParam.ExtensionId()==RMobileCall::KETelMobileDataCallParamsV1)
+ − 1210
{
+ − 1211
// If the passed package is MobileParams, then we can just unpackage and copy.
+ − 1212
RMobileCall::TMobileDataCallParamsV1Pckg* mobileCallParamPckg=(RMobileCall::TMobileDataCallParamsV1Pckg*)aCallParams;
+ − 1213
RMobileCall::TMobileDataCallParamsV1& mobileCallParam=(*mobileCallParamPckg)();
+ − 1214
+ − 1215
iHscsdCall=EFalse;
+ − 1216
iMobileCallParams=mobileCallParam;
+ − 1217
}
+ − 1218
else if(callParam.ExtensionId()==RMobileCall::KETelMobileHscsdCallParamsV1)
+ − 1219
{
+ − 1220
TPckg<RMobileCall::TMobileHscsdCallParamsV1>* mobileCallParamPckg=(TPckg<RMobileCall::TMobileHscsdCallParamsV1>*)aCallParams;
+ − 1221
RMobileCall::TMobileHscsdCallParamsV1& mobileCallParam=(*mobileCallParamPckg)();
+ − 1222
+ − 1223
iHscsdCall=ETrue;
+ − 1224
iHscsdSettings=mobileCallParam;
+ − 1225
}
+ − 1226
else
+ − 1227
{
+ − 1228
// If, however, its core (or an unrecognised extension), we must first reset the member
+ − 1229
// member variable before copying just the core parameters.
+ − 1230
RMobileCall::TMobileDataCallParamsV1 mobileCallParam;
+ − 1231
+ − 1232
iMobileCallParams=mobileCallParam;
+ − 1233
iHscsdCall=EFalse;
+ − 1234
iMobileCallParams.iSpeakerControl=callParam.iSpeakerControl;
+ − 1235
iMobileCallParams.iSpeakerVolume=callParam.iSpeakerVolume;
+ − 1236
iMobileCallParams.iInterval=callParam.iInterval;
+ − 1237
iMobileCallParams.iWaitForDialTone=callParam.iWaitForDialTone;
+ − 1238
}
+ − 1239
}
+ − 1240
+ − 1241
void CSimDataCall::NTRasCallBack(TInt aStatus)
+ − 1242
/**
+ − 1243
* NTRas callback function. This function will be called when the NTRAS
+ − 1244
* Server has responded.
+ − 1245
* @param aStatus Standard error value, indicating the success or failure of the NTRAS
+ − 1246
* connection.
+ − 1247
*/
+ − 1248
{
+ − 1249
TInt err=ActionEvent(ECallEventNtRasConnected,aStatus);
+ − 1250
__ASSERT_ALWAYS(err==KErrNone,SimPanic(EIllegalStateInconsistancy));
+ − 1251
}
+ − 1252
+ − 1253
TUint CSimDataCall::Caps()
+ − 1254
/**
+ − 1255
* Return the current capabilities of this call.
+ − 1256
* @return TUint Current call capabilities.
+ − 1257
*/
+ − 1258
{
+ − 1259
TUint caps=RCall::KCapsData;
+ − 1260
GenerateCoreCallCaps(caps);
+ − 1261
if(iState==RMobileCall::EStatusConnected)
+ − 1262
{
+ − 1263
if(iCommPortLoaned)
+ − 1264
caps|=RCall::KCapsRecoverDataPort;
+ − 1265
else
+ − 1266
caps|=RCall::KCapsLoanDataPort;
+ − 1267
}
+ − 1268
return caps;
+ − 1269
}
+ − 1270
+ − 1271
TInt CSimDataCall::GetMobileDataCallCaps(const TTsyReqHandle aTsyReqHandle, TDes8* aCaps)
+ − 1272
/**
+ − 1273
*
+ − 1274
* @param aTsyReqHandle specifies the request handle.
+ − 1275
* @param aCaps is used to return the retrieved capabilities to the client.
+ − 1276
* @return value returns the result of this operation
+ − 1277
*/
+ − 1278
{
+ − 1279
TPckg<RMobileCall::TMobileCallDataCapsV1>* mobileCallCapsPckg=(TPckg<RMobileCall::TMobileCallDataCapsV1>*)aCaps;
+ − 1280
RMobileCall::TMobileCallDataCapsV1& mobileCallCaps=(*mobileCallCapsPckg)();
+ − 1281
+ − 1282
// Check that the data structure is supported by the simulated TSY version
+ − 1283
TInt err = iPhone->CheckSimTsyVersion(mobileCallCaps);
+ − 1284
if(err != KErrNone)
+ − 1285
{
+ − 1286
ReqCompleted(aTsyReqHandle, err);
+ − 1287
return KErrNone;
+ − 1288
}
+ − 1289
+ − 1290
if(mobileCallCaps.ExtensionId()==KETelExtMultimodeV1)
+ − 1291
{
+ − 1292
mobileCallCaps=iMobileCallCaps;
+ − 1293
ReqCompleted(aTsyReqHandle,KErrNone);
+ − 1294
return KErrNone;
+ − 1295
}
+ − 1296
else
+ − 1297
{
+ − 1298
ReqCompleted(aTsyReqHandle,KErrNotFound);
+ − 1299
return KErrNotFound;
+ − 1300
}
+ − 1301
}
+ − 1302
+ − 1303
TInt CSimDataCall::GetMobileDataCallCapsCancel(const TTsyReqHandle aTsyReqHandle)
+ − 1304
/**
+ − 1305
*
+ − 1306
* @param aTsyReqHandle specifies the request handle to be canceled
+ − 1307
* @return value returns the result of this operation
+ − 1308
*/
+ − 1309
{
+ − 1310
ReqCompleted(aTsyReqHandle,KErrNone);
+ − 1311
return KErrNone;
+ − 1312
}
+ − 1313
+ − 1314
TInt CSimDataCall::SetDynamicHSCSDParams(const TTsyReqHandle aTsyReqHandle, RMobileCall::TMobileCallAiur* aAiur, TInt* aRxTimeslots)
+ − 1315
/**
+ − 1316
*
+ − 1317
* @param aTsyReqHandle specifies the request handle.
+ − 1318
* @param aAiur is used to dynamically change Aiur for this call
+ − 1319
* @param aRxTimeslots is used to dynamically change RxTimeslots for this call
+ − 1320
* @return value returns the result of this operation
+ − 1321
*/
+ − 1322
{
+ − 1323
iHscsdInfo.iRxTimeSlots=*aRxTimeslots;
+ − 1324
iHscsdInfo.iAiur=*aAiur;
+ − 1325
iHscsdSettings.iWantedRxTimeSlots=*aRxTimeslots;
+ − 1326
iHscsdSettings.iWantedAiur=*aAiur;
+ − 1327
+ − 1328
if(iNotifyInfo.iNotifyPending)
+ − 1329
{
+ − 1330
*(RMobileCall::TMobileCallHscsdInfoV1*)iNotifyInfo.iNotifyData=iHscsdInfo;
+ − 1331
iNotifyInfo.iNotifyPending=EFalse;
+ − 1332
ReqCompleted(iNotifyInfo.iNotifyHandle,KErrNone);
+ − 1333
}
+ − 1334
ReqCompleted(aTsyReqHandle,KErrNone);
+ − 1335
return KErrNone;
+ − 1336
}
+ − 1337
+ − 1338
TInt CSimDataCall::SetDynamicHSCSDParamsCancel(const TTsyReqHandle aTsyReqHandle)
+ − 1339
/**
+ − 1340
*
+ − 1341
* @param aTsyReqHandle specifies the request handle to be canceled
+ − 1342
* @return value returns the result of this operation
+ − 1343
*/
+ − 1344
{
+ − 1345
ReqCompleted(aTsyReqHandle,KErrNone);
+ − 1346
return KErrNone;
+ − 1347
}
+ − 1348
+ − 1349
TInt CSimDataCall::GetCurrentHSCSDInfo(const TTsyReqHandle aTsyReqHandle, TDes8* aInfo)
+ − 1350
/**
+ − 1351
*
+ − 1352
* @param aTsyReqHandle specifies the request handle.
+ − 1353
* @param aInfo is used to return the current Hscsd information to the client
+ − 1354
* @return value returns the result of this operation
+ − 1355
*/
+ − 1356
{
+ − 1357
TPckg<RMobileCall::TMobileCallHscsdInfoV1>* hscsdInfoPckg=(TPckg<RMobileCall::TMobileCallHscsdInfoV1>*)aInfo;
+ − 1358
RMobileCall::TMobileCallHscsdInfoV1& hscsdInfo=(*hscsdInfoPckg)();
+ − 1359
+ − 1360
// Check that the data structure is supported by the simulated TSY version
+ − 1361
TInt err = iPhone->CheckSimTsyVersion(hscsdInfo);
+ − 1362
if(err != KErrNone)
+ − 1363
{
+ − 1364
ReqCompleted(aTsyReqHandle, err);
+ − 1365
return KErrNone;
+ − 1366
}
+ − 1367
+ − 1368
if(hscsdInfo.ExtensionId()==KETelExtMultimodeV1)
+ − 1369
{
+ − 1370
hscsdInfo=iHscsdInfo;
+ − 1371
ReqCompleted(aTsyReqHandle,KErrNone);
+ − 1372
return KErrNone;
+ − 1373
}
+ − 1374
else
+ − 1375
{
+ − 1376
ReqCompleted(aTsyReqHandle,KErrNotFound);
+ − 1377
return KErrNotFound;
+ − 1378
}
+ − 1379
}
+ − 1380
+ − 1381
TInt CSimDataCall::NotifyHSCSDInfoChange(const TTsyReqHandle aTsyReqHandle, TDes8* aHSCSDInfo)
+ − 1382
/**
+ − 1383
*
+ − 1384
* @param aTsyReqHandle specifies the request handle.
+ − 1385
* @param aInfo is used to return the current Hscsd information when the notification completes
+ − 1386
* @return value returns the result of this operation
+ − 1387
*/
+ − 1388
{
+ − 1389
__ASSERT_ALWAYS(!iNotifyInfo.iNotifyPending,SimPanic(ENotificationAlreadyPending));
+ − 1390
+ − 1391
iNotifyInfo.iNotifyPending = ETrue;
+ − 1392
iNotifyInfo.iNotifyHandle = aTsyReqHandle;
+ − 1393
+ − 1394
TPckg<RMobileCall::TMobileCallHscsdInfoV1>* hscsdInfo = (TPckg<RMobileCall::TMobileCallHscsdInfoV1>*)aHSCSDInfo;
+ − 1395
RMobileCall::TMobileCallHscsdInfoV1& hscsdInfoV1 = (*hscsdInfo)();
+ − 1396
+ − 1397
// Check that the data structure is supported by the simulated TSY version
+ − 1398
TInt err = iPhone->CheckSimTsyVersion(hscsdInfoV1);
+ − 1399
if(err != KErrNone)
+ − 1400
{
+ − 1401
ReqCompleted(aTsyReqHandle, err);
+ − 1402
return KErrNone;
+ − 1403
}
+ − 1404
+ − 1405
iNotifyInfo.iNotifyData = &hscsdInfoV1;
+ − 1406
return KErrNone;
+ − 1407
}
+ − 1408
+ − 1409
TInt CSimDataCall::NotifyHSCSDInfoChangeCancel(const TTsyReqHandle /*aTsyReqHandle*/)
+ − 1410
/**
+ − 1411
*
+ − 1412
* @param aTsyReqHandle specifies the request handle to be canceled
+ − 1413
* @return value returns the result of this operation
+ − 1414
*/
+ − 1415
{
+ − 1416
if(iNotifyInfo.iNotifyPending)
+ − 1417
{
+ − 1418
iNotifyInfo.iNotifyPending=EFalse;
+ − 1419
ReqCompleted(iNotifyInfo.iNotifyHandle,KErrCancel);
+ − 1420
}
+ − 1421
return KErrNone;
+ − 1422
}
+ − 1423
+ − 1424
TInt CSimDataCall::NotifyMobileDataCapsChange(const TTsyReqHandle aTsyReqHandle, TDes8* /*aCaps*/)
+ − 1425
{
+ − 1426
/**
+ − 1427
*
+ − 1428
* @param aTsyReqHandle specifies the request handle to be canceled
+ − 1429
* @return value returns the result of this operation
+ − 1430
*/
+ − 1431
ReqCompleted(aTsyReqHandle,KErrNotSupported);
+ − 1432
return KErrNotSupported;
+ − 1433
}
+ − 1434
+ − 1435
TInt CSimDataCall::NotifyMobileDataCapsChangeCancel(const TTsyReqHandle aTsyReqHandle)
+ − 1436
/**
+ − 1437
*
+ − 1438
* @param aTsyReqHandle specifies the request handle to be canceled
+ − 1439
* @return value returns the result of this operation
+ − 1440
*/
+ − 1441
{
+ − 1442
ReqCompleted(aTsyReqHandle,KErrNone);
+ − 1443
return KErrNone;
+ − 1444
}
+ − 1445
+ − 1446
TInt CSimDataCall::GetMobileDataCallRLPRange(const TTsyReqHandle aTsyReqHandle, TInt* aRLPVersion, TDes8* aRLPRange)
+ − 1447
{
+ − 1448
/**
+ − 1449
*
+ − 1450
* @param aTsyReqHandle specifies the request handle to be canceled
+ − 1451
* @param aRLPVersion specifies the version for RLP range retrieval
+ − 1452
* @param aRLPRange is used to return the requested RLP range to the client
+ − 1453
* @return value returns the result of this operation
+ − 1454
*/
+ − 1455
TInt ret=SearchRetrieveRlp(aRLPVersion,aRLPRange);
+ − 1456
+ − 1457
ReqCompleted(aTsyReqHandle,ret);
+ − 1458
return ret;
+ − 1459
}
+ − 1460
+ − 1461
TInt CSimDataCall::GetMobileDataCallRLPRangeCancel(const TTsyReqHandle aTsyReqHandle)
+ − 1462
/**
+ − 1463
*
+ − 1464
* @param aTsyReqHandle specifies the request handle to be canceled
+ − 1465
* @return value returns the result of this operation
+ − 1466
*/
+ − 1467
{
+ − 1468
ReqCompleted(aTsyReqHandle,KErrNone);
+ − 1469
return KErrNone;
+ − 1470
}
+ − 1471
+ − 1472
void CSimDataCall::ChangeDynamicInfo()
+ − 1473
/**
+ − 1474
*
+ − 1475
* Private function to alter the current Hscsd information
+ − 1476
*/
+ − 1477
{
+ − 1478
if(iHscsdCall)
+ − 1479
{
+ − 1480
// Change to the requested settings
+ − 1481
iHscsdInfo.iAiur=iHscsdSettings.iWantedAiur;
+ − 1482
iHscsdInfo.iRxTimeSlots=iHscsdSettings.iWantedRxTimeSlots;
+ − 1483
iHscsdInfo.iTxTimeSlots=iHscsdSettings.iMaxTimeSlots-iHscsdSettings.iWantedRxTimeSlots;
+ − 1484
iHscsdInfo.iCodings=(RMobileCall::TMobileCallTchCoding) iHscsdSettings.iCodings;
+ − 1485
// Complete a pending notification event for changes in dynamic info of HSCSD
+ − 1486
if(iNotifyInfo.iNotifyPending)
+ − 1487
{
+ − 1488
*(RMobileCall::TMobileCallHscsdInfoV1*)iNotifyInfo.iNotifyData=(RMobileCall::TMobileCallHscsdInfoV1)iHscsdInfo;
+ − 1489
ReqCompleted(iNotifyInfo.iNotifyHandle,KErrNone);
+ − 1490
}
+ − 1491
}
+ − 1492
}
+ − 1493
+ − 1494
TInt CSimDataCall::SearchRetrieveRlp(TInt* aRLPVersion,TDes8* aRLPRange)
+ − 1495
/**
+ − 1496
*
+ − 1497
* Private function to search the list of available RLP ranges per version
+ − 1498
* and return the appropriate range.
+ − 1499
*/
+ − 1500
{
+ − 1501
TInt count = iMobileCallRLPList->Count();
+ − 1502
TMobileCallRLPItem item;
+ − 1503
+ − 1504
for(TInt i=0; i<count; i++)
+ − 1505
{
+ − 1506
item=iMobileCallRLPList->At(i);
+ − 1507
if(item.iRlpVersion==*aRLPVersion)
+ − 1508
{
+ − 1509
*(RMobileCall::TMobileDataRLPRangesV1*)aRLPRange=item.iMobileCallRLP;
+ − 1510
return KErrNone;
+ − 1511
}
+ − 1512
}
+ − 1513
return KErrNotFound;
+ − 1514
}
+ − 1515