|
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 // Implementattion for CSimSat Class |
|
15 // This file contains the implementation of the Similator TSY Sat functionality. |
|
16 // |
|
17 // |
|
18 |
|
19 /** |
|
20 @file |
|
21 */ |
|
22 |
|
23 #include "CSimSat.h" |
|
24 #include "Simlog.h" |
|
25 #include "CSimPhone.h" |
|
26 #include "utils.h" |
|
27 #include <satcs.h> |
|
28 #include <e32math.h> |
|
29 |
|
30 const TInt KSatGranularity=2; // < Granularity for sat list array |
|
31 |
|
32 CSimSat* CSimSat::NewL(CSimPhone* aPhone) |
|
33 /** |
|
34 * Standard two phase constructor |
|
35 * |
|
36 * @param aPhone Pointer to the phone object (CSimPhone) |
|
37 * @return CSimSat pointer to the Sat object created. |
|
38 * @leave Leaves if no memory or object is not created for any reason. |
|
39 */ |
|
40 { |
|
41 CSimSat* simSat=new(ELeave) CSimSat(aPhone); |
|
42 CleanupStack::PushL(simSat); |
|
43 simSat->ConstructL(); |
|
44 CleanupStack::Pop(); |
|
45 return simSat; |
|
46 } |
|
47 |
|
48 void CSimSat::Init() |
|
49 {} |
|
50 |
|
51 CSimSat::CSimSat(CSimPhone* aPhone) |
|
52 : iPhone(aPhone), iSatIndex(0), iRefreshRequiredPending(EFalse), |
|
53 iMmsDownloadDataHandle(NULL),iEventDnldHandle(NULL) |
|
54 |
|
55 /** |
|
56 * Trivial Constructor. Initialises all the data members |
|
57 * |
|
58 * @param aPhone pointer to the phone object that owns this class. |
|
59 */ |
|
60 { |
|
61 iNotifyRefresh.iNotifyPending= EFalse; |
|
62 } |
|
63 |
|
64 void CSimSat::ConstructL() |
|
65 /** |
|
66 * Second phase of the 2-phase constructor. |
|
67 * Constructs all the member data and retrieves all the data from the config file specific to this class. |
|
68 * |
|
69 * @leave Leaves no memory or any data member does not construct for any reason. |
|
70 */ |
|
71 { |
|
72 |
|
73 LOGMISC1("CSimSat: Entered ConstructL()"); |
|
74 |
|
75 iSatInfo =new(ELeave) CArrayFixFlat<TSatInfo>(KSatGranularity); |
|
76 |
|
77 iTimer = CSimTimer::NewL(iPhone); |
|
78 |
|
79 LOGMISC1("Starting to parse Sat config parameters..."); |
|
80 |
|
81 TInt count =CfgFile()->ItemCount(KSatRefresh); |
|
82 const CTestConfigItem* item=NULL; |
|
83 TInt ret=KErrNone; |
|
84 |
|
85 TInt i; |
|
86 for(i=0;i<count;i++) |
|
87 { |
|
88 item=CfgFile()->Item(KSatRefresh,i); |
|
89 if(!item) |
|
90 break; |
|
91 |
|
92 TInt duration,type; |
|
93 TPtrC8 fileList; |
|
94 |
|
95 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,duration); |
|
96 if(ret!=KErrNone) |
|
97 { |
|
98 LOGPARSERR("duration",ret,0,&KSatRefresh); |
|
99 continue; |
|
100 } |
|
101 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,type); |
|
102 if(ret!=KErrNone) |
|
103 { |
|
104 LOGPARSERR("type",ret,1,&KSatRefresh); |
|
105 continue; |
|
106 } |
|
107 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,fileList); |
|
108 if(ret!=KErrNone) |
|
109 { |
|
110 LOGPARSERR("fileList",ret,2,&KSatRefresh); |
|
111 continue; |
|
112 } |
|
113 |
|
114 TSatInfo satInfo; |
|
115 satInfo.iDuration = duration; |
|
116 satInfo.iType = type; |
|
117 TInt location = fileList.Locate('\n'); |
|
118 if(location > 0) |
|
119 satInfo.iFileList.Set(fileList.Left(location)); |
|
120 else |
|
121 satInfo.iFileList.Set(fileList); |
|
122 iSatInfo->AppendL(satInfo); |
|
123 } |
|
124 |
|
125 LOGMISC1("...Finished parsing Sat config parameters..."); |
|
126 |
|
127 if(iSatInfo->Count()!=0) |
|
128 { |
|
129 iSatIndex=0; |
|
130 iTimer->Start(iSatInfo->At(0).iDuration,this); |
|
131 } |
|
132 } |
|
133 |
|
134 CSimSat::~CSimSat() |
|
135 /** |
|
136 * Trivial Destructor |
|
137 * Closes all CObject type objects and destroys all other objects created in the ConstructL() |
|
138 * |
|
139 */ |
|
140 { |
|
141 LOGMISC1("CSimSat: Entered destructor"); |
|
142 delete iTimer; |
|
143 if(iSatInfo) |
|
144 { |
|
145 iSatInfo->Delete(0,iSatInfo->Count()); |
|
146 delete iSatInfo; |
|
147 } |
|
148 if(iMMRetrieve) |
|
149 { |
|
150 iMMRetrieve->Delete(0,iMMRetrieve->Count()); |
|
151 delete iMMRetrieve; |
|
152 } |
|
153 if(iMMSubmit) |
|
154 { |
|
155 iMMSubmit->Delete(0,iMMSubmit->Count()); |
|
156 delete iMMSubmit; |
|
157 } |
|
158 if(iMMDisplay) |
|
159 { |
|
160 iMMDisplay->Delete(0,iMMDisplay->Count()); |
|
161 delete iMMDisplay; |
|
162 } |
|
163 if(iSetFrms) |
|
164 { |
|
165 iSetFrms->Delete(0,iSetFrms->Count()); |
|
166 delete iSetFrms; |
|
167 } |
|
168 if(iGetFrmsSts) |
|
169 { |
|
170 iGetFrmsSts->Delete(0,iGetFrmsSts->Count()); |
|
171 delete iGetFrmsSts; |
|
172 } |
|
173 if(iMmsDownloadData) |
|
174 { |
|
175 iMmsDownloadData->Delete(0,iMmsDownloadData->Count()); |
|
176 delete iMmsDownloadData; |
|
177 } |
|
178 if(iUssdData) |
|
179 { |
|
180 iUssdData->Delete(0,iUssdData->Count()); |
|
181 delete iUssdData; |
|
182 } |
|
183 if(iLocalInfo) |
|
184 { |
|
185 iLocalInfo->Delete(0,iLocalInfo->Count()); |
|
186 delete iLocalInfo; |
|
187 } |
|
188 if(iOpenChn) |
|
189 { |
|
190 iOpenChn->Delete(0,iOpenChn->Count()); |
|
191 delete iOpenChn; |
|
192 } |
|
193 if(iMiscCmd) |
|
194 { |
|
195 iMiscCmd->Delete(0,iMiscCmd->Count()); |
|
196 delete iMiscCmd; |
|
197 } |
|
198 if(iEventList) |
|
199 { |
|
200 iEventList->Delete(0,iEventList->Count()); |
|
201 delete iEventList; |
|
202 } |
|
203 if(iSendUssd) |
|
204 { |
|
205 iSendUssd->Delete(0,iSendUssd->Count()); |
|
206 delete iSendUssd; |
|
207 } |
|
208 if(iRefresh) |
|
209 { |
|
210 iRefresh->Delete(0,iRefresh->Count()); |
|
211 delete iRefresh; |
|
212 } |
|
213 if(iElemFiles) |
|
214 { |
|
215 iElemFiles->Delete(0,iElemFiles->Count()); |
|
216 delete iElemFiles; |
|
217 } |
|
218 if(iLnchBrwsr) |
|
219 { |
|
220 iLnchBrwsr->Delete(0,iLnchBrwsr->Count()); |
|
221 delete iLnchBrwsr; |
|
222 } |
|
223 if(iSendSS) |
|
224 { |
|
225 iSendSS->Delete(0,iSendSS->Count()); |
|
226 delete iSendSS; |
|
227 } |
|
228 } |
|
229 |
|
230 TInt CSimSat::ConvertTextToFileList(const TPtrC8& aText, |
|
231 RSat::TRefreshFileList& aFileList) const |
|
232 /** |
|
233 * Converts a text based file list (e.g. "6F3A6F3B") to a binary file list (e.g |
|
234 * {0x6f3a, 0x6f3b}). |
|
235 * |
|
236 * @param aText Text string to convert. |
|
237 * @param aFileList Returned file list. |
|
238 * @return Error code KErrNone if request completes ok. Otherwise a relevant error |
|
239 * code. |
|
240 */ |
|
241 { |
|
242 aFileList.Zero(); |
|
243 |
|
244 // |
|
245 // Go through the string and take upto 4 characters at a time. Convert each set |
|
246 // from hexidecimal to an integer and then append them to the file list. |
|
247 // |
|
248 TInt position(0); |
|
249 |
|
250 while (position < aText.Length()) |
|
251 { |
|
252 TInt numberLength(4); |
|
253 |
|
254 if (aText.Length() - position < 4) |
|
255 { |
|
256 numberLength = aText.Length() - position; |
|
257 } |
|
258 |
|
259 TLex8 token(aText.Mid(position, numberLength)); |
|
260 TUint value; |
|
261 TInt ret; |
|
262 |
|
263 ret = token.Val(value, EHex); |
|
264 if (ret != KErrNone) |
|
265 { |
|
266 return(ret); |
|
267 } |
|
268 |
|
269 aFileList.Append(value); |
|
270 position +=4; |
|
271 } |
|
272 |
|
273 return(KErrNone); |
|
274 } |
|
275 |
|
276 CTelObject* CSimSat::OpenNewObjectByNameL(const TDesC& /*aName*/) |
|
277 /** |
|
278 * Returns a pointer to an existing object identified by name. |
|
279 * If the object is deleted then reopen it then return a handle to it. |
|
280 * |
|
281 * @param aName name of the Sat object to be opened |
|
282 * @return CTelObject pointer to the CSimSat object or null if not possible or not found |
|
283 * @leave Leaves if object cannot be opened or created. |
|
284 */ |
|
285 { |
|
286 User::Leave(KErrNotSupported); |
|
287 return NULL; |
|
288 } |
|
289 |
|
290 CTelObject* CSimSat::OpenNewObjectL(TDes& /*aNewName*/) |
|
291 /** |
|
292 * Creates a new CSimSat object and returns a pointer to it. |
|
293 * |
|
294 * @param aName new name of the object created |
|
295 * @return CTelObject pointer to the CSimSat object created |
|
296 * @leave Leaves |
|
297 */ |
|
298 { |
|
299 User::Leave(KErrNotSupported); |
|
300 return NULL; |
|
301 } |
|
302 |
|
303 CTelObject::TReqMode CSimSat::ReqModeL(const TInt aIpc) |
|
304 /** |
|
305 * ReqModeL is called from the server's CTelObject::ReqAnalyserL |
|
306 * in order to check the type of request it has. |
|
307 * |
|
308 * |
|
309 * @param aIpc the ipc number that identifies the client request |
|
310 * @return CTelObject::TReqMode The request mode to be used for this request |
|
311 * @leave Leaves if not supported by this tsy |
|
312 */ |
|
313 { |
|
314 CTelObject::TReqMode ret=0; |
|
315 switch (aIpc) |
|
316 { |
|
317 case ESatNotifyRefreshPCmd: |
|
318 case ESatNotifyRefreshRequired: |
|
319 case ESatNotifyRefreshRequiredParam: |
|
320 case ESatNotifyRetrieveMultimediaMsgPCmd: |
|
321 case ESatNotifySubmitMultimediaMsgPCmd: |
|
322 case ESatNotifyDisplayMultimediaMsgPCmd: |
|
323 case ESatNotifySetFramesPCmd: |
|
324 case ESatNotifyGetFramesStatusPCmd: |
|
325 case ESatNotifyLocalInfoPCmd: |
|
326 case ESatNotifyOpenChannelPCmd: |
|
327 case ESatNotifyPlayTonePCmd: |
|
328 case ESatNotifySetUpCallPCmd: |
|
329 case ESatNotifySendUssdPCmd: |
|
330 case ESatNotifyGetInkeyPCmd: |
|
331 case ESatNotifySendSsPCmd: |
|
332 case ESatNotifyLaunchBrowserPCmd: |
|
333 LOGMISC1("CSimSat: ReqModeL"); |
|
334 ret=KReqModeMultipleCompletionEnabled | KReqModeRePostImmediately; |
|
335 break; |
|
336 case ESatRefreshAllowed: |
|
337 case ESatTerminalRsp: |
|
338 case ESatGetMeSideSatProfile: |
|
339 case ESatEventDownload: |
|
340 case ESatClientSatProfileIndication: |
|
341 case ESatMmsTransferStatus: |
|
342 case ESatMmsNotificationDownload: |
|
343 case ESatUssdDataDownload: |
|
344 break; |
|
345 default: |
|
346 User::Leave(KErrNotSupported); |
|
347 break; |
|
348 } |
|
349 return ret; |
|
350 } |
|
351 |
|
352 TInt CSimSat::RegisterNotification(const TInt aIpc) |
|
353 /** |
|
354 * RegisterNotification is called when the server recognises that this notification |
|
355 * is being posted for the first time on this sub-session object. |
|
356 * |
|
357 * It enables the TSY to "turn on" any regular notification messages that it may receive |
|
358 * from the phone |
|
359 * |
|
360 * @param aIpc the ipc number that identifies the client request |
|
361 * @return err KErrNone if fine |
|
362 */ |
|
363 { |
|
364 switch (aIpc) |
|
365 { |
|
366 case ESatNotifyRefreshPCmd: |
|
367 case ESatNotifyRefreshRequired: |
|
368 case ESatNotifyRefreshRequiredParam: |
|
369 case ESatNotifyRetrieveMultimediaMsgPCmd: |
|
370 case ESatNotifySubmitMultimediaMsgPCmd: |
|
371 case ESatNotifyDisplayMultimediaMsgPCmd: |
|
372 case ESatNotifySetFramesPCmd: |
|
373 case ESatNotifyGetFramesStatusPCmd: |
|
374 case ESatGetMeSideSatProfile: |
|
375 case ESatClientSatProfileIndication: |
|
376 case ESatNotifyLocalInfoPCmd: |
|
377 case ESatNotifyOpenChannelPCmd: |
|
378 case ESatNotifyPlayTonePCmd: |
|
379 case ESatNotifySetUpCallPCmd: |
|
380 case ESatEventDownload: |
|
381 case ESatNotifySendUssdPCmd: |
|
382 case ESatNotifyGetInkeyPCmd: |
|
383 case ESatNotifySendSsPCmd: |
|
384 case ESatNotifyLaunchBrowserPCmd: |
|
385 LOGMISC1("CSimSat: RegisterNotification"); |
|
386 return KErrNone; |
|
387 default: |
|
388 // Unknown or invalid IPC |
|
389 LOGMISC1("CSimSat: Register error, unknown IPC"); |
|
390 return KErrNotSupported; |
|
391 } |
|
392 } |
|
393 |
|
394 TInt CSimSat::DeregisterNotification(const TInt aIpc) |
|
395 /** |
|
396 * DeregisterNotification is called when the server recognises that this notification |
|
397 * will not be posted again because the last client to have a handle on this sub-session |
|
398 * object has just closed the handle. |
|
399 * |
|
400 * It enables the TSY to "turn off" any regular notification messages that it may |
|
401 * receive from the phone |
|
402 * |
|
403 * @param aIpc the ipc number that identifies the client request |
|
404 * @return err KErrNone if fine |
|
405 */ |
|
406 { |
|
407 switch (aIpc) |
|
408 { |
|
409 case ESatNotifyRefreshPCmd: |
|
410 case ESatNotifyRefreshRequired: |
|
411 case ESatNotifyRefreshRequiredParam: |
|
412 case ESatNotifyRetrieveMultimediaMsgPCmd: |
|
413 case ESatNotifySubmitMultimediaMsgPCmd: |
|
414 case ESatNotifyDisplayMultimediaMsgPCmd: |
|
415 case ESatNotifySetFramesPCmd: |
|
416 case ESatNotifyGetFramesStatusPCmd: |
|
417 case ESatGetMeSideSatProfile: |
|
418 case ESatClientSatProfileIndication: |
|
419 case ESatNotifyLocalInfoPCmd: |
|
420 case ESatNotifyOpenChannelPCmd: |
|
421 case ESatNotifyPlayTonePCmd: |
|
422 case ESatNotifySetUpCallPCmd: |
|
423 case ESatEventDownload: |
|
424 case ESatNotifySendUssdPCmd: |
|
425 case ESatNotifyGetInkeyPCmd: |
|
426 case ESatNotifySendSsPCmd: |
|
427 case ESatNotifyLaunchBrowserPCmd: |
|
428 LOGMISC1("CSimSat: DeregisterNotification"); |
|
429 return KErrNone; |
|
430 default: |
|
431 // Unknown or invalid IPC |
|
432 LOGMISC1("CSimSat: Deregister error, unknown IPC"); |
|
433 return KErrNotSupported; |
|
434 } |
|
435 } |
|
436 |
|
437 TInt CSimSat::NumberOfSlotsL(const TInt aIpc) |
|
438 /** |
|
439 * NumberOfSlotsL is called by the server when it is registering a new notification |
|
440 * It enables the TSY to tell the server how many buffer slots to allocate for |
|
441 * "repost immediately" notifications that may trigger before clients collect them |
|
442 * |
|
443 * @param aIpc the ipc number that identifies the client request |
|
444 * @return err KErrNone if fine |
|
445 */ |
|
446 { |
|
447 TInt numberOfSlots=1; |
|
448 switch (aIpc) |
|
449 { |
|
450 case ESatNotifyRefreshPCmd: |
|
451 case ESatNotifyRefreshRequired: |
|
452 case ESatNotifyRefreshRequiredParam: |
|
453 case ESatNotifyRetrieveMultimediaMsgPCmd: |
|
454 case ESatNotifySubmitMultimediaMsgPCmd: |
|
455 case ESatNotifyDisplayMultimediaMsgPCmd: |
|
456 case ESatNotifySetFramesPCmd: |
|
457 case ESatNotifyGetFramesStatusPCmd: |
|
458 case ESatNotifyLocalInfoPCmd: |
|
459 case ESatNotifyOpenChannelPCmd: |
|
460 case ESatNotifyPlayTonePCmd: |
|
461 case ESatNotifySetUpCallPCmd: |
|
462 case ESatEventDownload: |
|
463 case ESatNotifySendUssdPCmd: |
|
464 case ESatNotifyGetInkeyPCmd: |
|
465 case ESatNotifySendSsPCmd: |
|
466 case ESatNotifyLaunchBrowserPCmd: |
|
467 LOGMISC1("CSimSat: Registered with 2 slot"); |
|
468 numberOfSlots=2; |
|
469 break; |
|
470 default: |
|
471 // Unknown or invalid IPC |
|
472 LOGMISC1("CSimSat: Number of Slots error, unknown IPC"); |
|
473 User::Leave(KErrNotSupported); |
|
474 break; |
|
475 } |
|
476 return numberOfSlots; |
|
477 } |
|
478 |
|
479 |
|
480 TInt CSimSat::ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc, |
|
481 const TDataPackage& aPackage) |
|
482 /** |
|
483 * ExtFunc is called by the server when it has a "extended", i.e. non-core ETel request |
|
484 * for the TSY to process. |
|
485 * A request handle, request type and request data are passed to the TSY |
|
486 * |
|
487 * @param aTsyReqHandle The request handle for completing the request |
|
488 * @param aIpc Ipc representing the request |
|
489 * @param aPackage any data associated with the request |
|
490 * @return err KErrNone if request completes ok |
|
491 */ |
|
492 { |
|
493 //TAny* dataPtr=NULL; |
|
494 |
|
495 switch (aIpc) |
|
496 { |
|
497 case ESatNotifyRefreshPCmd: |
|
498 return NotifyRefreshPCmd(aTsyReqHandle, aPackage.Des1n()); |
|
499 case ESatNotifyRefreshRequired: |
|
500 return NotifyRefreshRequired(aTsyReqHandle); |
|
501 case ESatNotifyRefreshRequiredParam: |
|
502 return NotifyRefreshRequired(aTsyReqHandle, aPackage.Des1n()); |
|
503 case ESatRefreshAllowed: |
|
504 return RefreshAllowed(aTsyReqHandle, aPackage.Des1n()); |
|
505 case ESatNotifyRetrieveMultimediaMsgPCmd: |
|
506 return NotifyRetrieveMultimediaMsgPCmd(aTsyReqHandle,aPackage.Des1n()); |
|
507 case ESatNotifySubmitMultimediaMsgPCmd: |
|
508 return NotifySubmitMultimediaMsgPCmd(aTsyReqHandle,aPackage.Des1n()); |
|
509 case ESatNotifyDisplayMultimediaMsgPCmd: |
|
510 return NotifyDisplayMultimediaMsgPCmd(aTsyReqHandle,aPackage.Des1n()); |
|
511 case ESatNotifySetFramesPCmd: |
|
512 return NotifySetFramesPCmd(aTsyReqHandle,aPackage.Des1n()); |
|
513 case ESatNotifyGetFramesStatusPCmd: |
|
514 return NotifyGetFramesStatusPCmd(aTsyReqHandle,aPackage.Des1n()); |
|
515 case ESatTerminalRsp: |
|
516 return TerminalRsp(aTsyReqHandle, |
|
517 REINTERPRET_CAST(RSat::TPCmd*,aPackage.Ptr1()),aPackage.Des2n()); |
|
518 case ESatGetMeSideSatProfile: |
|
519 return GetMeSideSatProfile(aTsyReqHandle, aPackage.Des1n()); |
|
520 case ESatClientSatProfileIndication: |
|
521 return ClientSatProfileIndication(aTsyReqHandle,aPackage.Des1n()); |
|
522 case ESatMmsTransferStatus: |
|
523 return MmsTransferStatus(aTsyReqHandle, aPackage.Des1n()); |
|
524 case ESatMmsNotificationDownload: |
|
525 return MmsNotificationDownload(aTsyReqHandle, aPackage.Des1n()); |
|
526 case ESatUssdDataDownload: |
|
527 return UssdDataDownload(aTsyReqHandle, aPackage.Des1n()); |
|
528 case ESatNotifyLocalInfoPCmd: |
|
529 return NotifyLocalInfoPCmd(aTsyReqHandle, aPackage.Des1n()); |
|
530 case ESatNotifyOpenChannelPCmd: |
|
531 return NotifyOpenChannelPCmd(aTsyReqHandle,aPackage.Des1n()); |
|
532 case ESatNotifyPlayTonePCmd: |
|
533 return NotifyPlayTonePCmd(aTsyReqHandle,aPackage.Des1n()); |
|
534 case ESatNotifySetUpCallPCmd: |
|
535 return NotifySetupCallPCmd(aTsyReqHandle,aPackage.Des1n()); |
|
536 case ESatEventDownload: |
|
537 return EventDownload(aTsyReqHandle, |
|
538 REINTERPRET_CAST(RSat::TEventList*, aPackage.Ptr1()),aPackage.Des2n()); |
|
539 case ESatNotifySendUssdPCmd: |
|
540 return NotifySendUssdPCmd(aTsyReqHandle,aPackage.Des1n()); |
|
541 case ESatNotifyGetInkeyPCmd: |
|
542 return NotifyGetInkeyPCmd(aTsyReqHandle,aPackage.Des1n()); |
|
543 case ESatNotifySendSsPCmd: |
|
544 return NotifySendSsPCmd(aTsyReqHandle,aPackage.Des1n()); |
|
545 case ESatNotifyLaunchBrowserPCmd: |
|
546 return NotifyLaunchBrowserPCmd(aTsyReqHandle,aPackage.Des1n()); |
|
547 default: |
|
548 return KErrNotSupported; |
|
549 } |
|
550 } |
|
551 |
|
552 TInt CSimSat::CancelService(const TInt aIpc,const TTsyReqHandle aTsyReqHandle) |
|
553 /** |
|
554 * CancelService is called by the server when it is "cleaning-up" any still outstanding |
|
555 * asynchronous requests before closing a client's sub-session. |
|
556 * This will happen if a client closes its R-class handle without cancelling outstanding asynchronous requests. |
|
557 * |
|
558 * This function will be called when a client explicitly cancels |
|
559 * |
|
560 * @param aTsyReqHandle The request handle for completing the request |
|
561 * @param aIpc Ipc representing the request |
|
562 * @return err KErrNone if request completes ok |
|
563 */ |
|
564 { |
|
565 LOGMISC1("CSimSat: - CancelService called"); |
|
566 switch (aIpc) |
|
567 { |
|
568 case ESatNotifyRefreshPCmd: |
|
569 return NotifyRefreshPCmdCancel(aTsyReqHandle); |
|
570 case ESatNotifyRefreshRequired: |
|
571 case ESatNotifyRefreshRequiredParam: |
|
572 return NotifyRefreshRequiredCancel(aTsyReqHandle); |
|
573 case ESatRefreshAllowed: |
|
574 return RefreshAllowedCancel(aTsyReqHandle); |
|
575 case ESatNotifyRetrieveMultimediaMsgPCmd: |
|
576 return NotifyRetrieveMultimediaMsgPCmdCancel(aTsyReqHandle); |
|
577 case ESatNotifySubmitMultimediaMsgPCmd: |
|
578 return NotifySubmitMultimediaMsgPCmdCancel(aTsyReqHandle); |
|
579 case ESatNotifyDisplayMultimediaMsgPCmd: |
|
580 return NotifyDisplayMultimediaMsgPCmdCancel(aTsyReqHandle); |
|
581 case ESatNotifySetFramesPCmd: |
|
582 return NotifySetFramesPCmdCancel(aTsyReqHandle); |
|
583 case ESatNotifyGetFramesStatusPCmd: |
|
584 return NotifyGetFramesStatusPCmdCancel(aTsyReqHandle); |
|
585 case ESatTerminalRsp: |
|
586 return TerminalRspCancel(aTsyReqHandle); |
|
587 case ESatGetMeSideSatProfile: |
|
588 return GetMeSideSatProfileCancel(aTsyReqHandle); |
|
589 case ESatMmsTransferStatus: |
|
590 return MmsTransferStatusCancel(aTsyReqHandle); |
|
591 case ESatMmsNotificationDownload: |
|
592 return MmsNotificationDownloadCancel(aTsyReqHandle); |
|
593 case ESatUssdDataDownload: |
|
594 return UssdDataDownloadCancel(aTsyReqHandle); |
|
595 case ESatNotifyLocalInfoPCmd: |
|
596 return NotifyLocalInfoPCmdCancel(aTsyReqHandle); |
|
597 case ESatNotifyOpenChannelPCmd: |
|
598 return NotifyOpenChannelPCmdCancel(aTsyReqHandle); |
|
599 case ESatNotifyPlayTonePCmd: |
|
600 return NotifyPlayTonePCmdCancel(aTsyReqHandle); |
|
601 case ESatNotifySetUpCallPCmd: |
|
602 return NotifySetupCallPCmdCancel(aTsyReqHandle); |
|
603 case ESatEventDownload: |
|
604 return EventDownloadCancel(aTsyReqHandle); |
|
605 case ESatNotifySendUssdPCmd: |
|
606 return NotifySendUssdPCmdCancel(aTsyReqHandle); |
|
607 case ESatNotifyGetInkeyPCmd: |
|
608 return NotifyGetInkeyPCmdCancel(aTsyReqHandle); |
|
609 case ESatNotifySendSsPCmd: |
|
610 return NotifySendSsPCmdCancel(aTsyReqHandle); |
|
611 case ESatNotifyLaunchBrowserPCmd: |
|
612 return NotifyLaunchBrowserPCmdCancel(aTsyReqHandle); |
|
613 default: |
|
614 return KErrGeneral; |
|
615 } |
|
616 } |
|
617 |
|
618 |
|
619 TInt CSimSat::NotifyRefreshPCmd(const TTsyReqHandle aTsyReqHandle, TDes8* aPCmd) |
|
620 { |
|
621 if(!iConfigDone) |
|
622 { |
|
623 TInt ret = KErrNone; |
|
624 TRAPD(err, ret = ConfigL(SIMTSY_REFRESH_PCMD_NUMBER)); |
|
625 if(err != KErrNone) |
|
626 { |
|
627 ret = err; |
|
628 } |
|
629 |
|
630 if(ret!= KErrNone) |
|
631 { |
|
632 return ret; |
|
633 } |
|
634 else |
|
635 { |
|
636 iConfigDone = ETrue; |
|
637 } |
|
638 } |
|
639 |
|
640 if(iSatInfo->Count()==0) |
|
641 { |
|
642 ReqCompleted(aTsyReqHandle,KErrNotSupported); |
|
643 return KErrNone; |
|
644 } |
|
645 |
|
646 __ASSERT_ALWAYS(!iNotifyRefresh.iNotifyPending,SimPanic(ENotificationReqAlreadyOutstanding)); |
|
647 RSat::TRefreshV1Pckg* refreshPckg = (RSat::TRefreshV1Pckg*)aPCmd; |
|
648 RSat::TRefreshV1& refresh = (*refreshPckg)(); |
|
649 |
|
650 |
|
651 iNotifyRefresh.iNotifyPending=ETrue; |
|
652 iNotifyRefresh.iNotifyHandle=aTsyReqHandle; |
|
653 iNotifyRefresh.iNotifyData = &refresh; |
|
654 |
|
655 if(refresh.iType == RSat::E3GSessionReset || refresh.iType == RSat::EFileChangeNotification) |
|
656 { |
|
657 RSat::TRefreshV2Pckg* refreshPckg = (RSat::TRefreshV2Pckg*)aPCmd; |
|
658 RSat::TRefreshV2& refresh2 = (*refreshPckg)(); |
|
659 |
|
660 iNotifyRefresh.iNotifyData = &refresh2; |
|
661 iRefreshV2 = ETrue; |
|
662 } |
|
663 |
|
664 return KErrNone; |
|
665 } |
|
666 |
|
667 |
|
668 TInt CSimSat::NotifyRefreshPCmdCancel(const TTsyReqHandle /*aTsyReqHandle*/) |
|
669 { |
|
670 if(iNotifyRefresh.iNotifyPending) |
|
671 { |
|
672 iNotifyRefresh.iNotifyPending=EFalse; |
|
673 // Clear this flag here since if not within refresh required will be false, and if inside refresh required can be sure results will not be processed |
|
674 iRefreshRequiredPending=EFalse; |
|
675 ReqCompleted(iNotifyRefresh.iNotifyHandle,KErrCancel); |
|
676 } |
|
677 return KErrNone; |
|
678 } |
|
679 |
|
680 TInt CSimSat::NotifyRefreshRequired(const TTsyReqHandle aTsyReqHandle) |
|
681 { |
|
682 if(iSatInfo->Count()==0) |
|
683 { |
|
684 ReqCompleted(aTsyReqHandle,KErrNotSupported); |
|
685 return KErrNone; |
|
686 } |
|
687 |
|
688 __ASSERT_ALWAYS(!iRefreshRequired.iNotifyPending,SimPanic(ENotificationReqAlreadyOutstanding)); |
|
689 iRefreshRequired.iNotifyPending=ETrue; |
|
690 iRefreshRequired.iNotifyHandle=aTsyReqHandle; |
|
691 iRefreshRequired.iNotifyData = NULL; |
|
692 return KErrNone; |
|
693 } |
|
694 |
|
695 TInt CSimSat::NotifyRefreshRequired(const TTsyReqHandle aTsyReqHandle, TDes8* aPCmd) |
|
696 { |
|
697 if(iSatInfo->Count()==0) |
|
698 { |
|
699 ReqCompleted(aTsyReqHandle,KErrNotSupported); |
|
700 return KErrNone; |
|
701 } |
|
702 |
|
703 __ASSERT_ALWAYS(!iRefreshRequired.iNotifyPending,SimPanic(ENotificationReqAlreadyOutstanding)); |
|
704 RSat::TRefreshV1Pckg* refreshPckg = (RSat::TRefreshV1Pckg*)aPCmd; |
|
705 RSat::TRefreshV1& refresh = (*refreshPckg)(); |
|
706 |
|
707 iRefreshRequired.iNotifyPending=ETrue; |
|
708 iRefreshRequired.iNotifyHandle=aTsyReqHandle; |
|
709 iRefreshRequired.iNotifyData = &refresh; |
|
710 return KErrNone; |
|
711 } |
|
712 |
|
713 TInt CSimSat::NotifyRefreshRequiredCancel(const TTsyReqHandle /*aTsyReqHandle*/) |
|
714 { |
|
715 if(iRefreshRequired.iNotifyPending) |
|
716 { |
|
717 iRefreshRequired.iNotifyPending=EFalse; |
|
718 iRefreshRequiredPending=EFalse; |
|
719 ReqCompleted(iRefreshRequired.iNotifyHandle,KErrCancel); |
|
720 } |
|
721 return KErrNone; |
|
722 } |
|
723 |
|
724 TInt CSimSat::RefreshAllowed(const TTsyReqHandle aTsyReqHandle, TDes8* aRefreshAllowedRsp) |
|
725 { |
|
726 if(iSatInfo->Count()==0) |
|
727 { |
|
728 ReqCompleted(aTsyReqHandle,KErrNotSupported); |
|
729 return KErrNone; |
|
730 } |
|
731 |
|
732 RSat::TRefreshRspV1Pckg* aRspPckg = (RSat::TRefreshRspV1Pckg*)aRefreshAllowedRsp; |
|
733 RSat::TRefreshRspV1& rspV1 = (*aRspPckg)(); |
|
734 |
|
735 LOGMISC2("RefreshAllowed: - aRefreshAllowedResult %d",rspV1.iGeneralResult); |
|
736 |
|
737 /* Set simtsy status to reflect clients status */ |
|
738 RSat::TPCmdResult refreshAllowedResult = rspV1.iGeneralResult; |
|
739 |
|
740 __ASSERT_ALWAYS(!iRefreshAllowed.iNotifyPending,SimPanic(ENotificationReqAlreadyOutstanding)); |
|
741 |
|
742 ReqCompleted(aTsyReqHandle, KErrNone); |
|
743 |
|
744 iRefreshAllowed.iNotifyPending=EFalse; |
|
745 |
|
746 if(iRefreshRequiredPending && iNotifyRefresh.iNotifyPending && refreshAllowedResult == RSat::KSuccess) |
|
747 { |
|
748 iNotifyRefresh.iNotifyPending=EFalse; |
|
749 iRefreshRequiredPending=EFalse; |
|
750 |
|
751 RSat::TRefreshV1& refreshData = *(RSat::TRefreshV1*)iNotifyRefresh.iNotifyData; |
|
752 |
|
753 refreshData.iType = iType; |
|
754 refreshData.iFileList = iFileList; |
|
755 |
|
756 ReqCompleted(iNotifyRefresh.iNotifyHandle, KErrNone); |
|
757 } |
|
758 |
|
759 return KErrNone; |
|
760 } |
|
761 |
|
762 TInt CSimSat::RefreshAllowedCancel(const TTsyReqHandle /*aTsyReqHandle*/) |
|
763 { |
|
764 if(iRefreshAllowed.iNotifyPending) |
|
765 { |
|
766 iRefreshAllowed.iNotifyPending=EFalse; |
|
767 ReqCompleted(iRefreshAllowed.iNotifyHandle,KErrCancel); |
|
768 } |
|
769 return KErrNone; |
|
770 } |
|
771 |
|
772 TInt CSimSat::NotifyRetrieveMultimediaMsgPCmd(const TTsyReqHandle aTsyReqHandle,TDes8* aPCmd) |
|
773 { |
|
774 |
|
775 if(!iConfigDone) |
|
776 { |
|
777 TInt ret = KErrNone; |
|
778 TRAPD(err, ret = ConfigL(SIMTSY_RET_MM_PCMD_NUMBER)); |
|
779 if(err != KErrNone) |
|
780 { |
|
781 ret = err; |
|
782 } |
|
783 |
|
784 if(ret!= KErrNone) |
|
785 { |
|
786 return ret; |
|
787 } |
|
788 else |
|
789 { |
|
790 TRAP(err, ret = ConfigL(SIMTSY_SUB_MM_PCMD_NUMBER)); |
|
791 if(err != KErrNone) |
|
792 { |
|
793 ret = err; |
|
794 } |
|
795 |
|
796 if(ret!=KErrNone) |
|
797 { |
|
798 return ret; |
|
799 } |
|
800 else |
|
801 { |
|
802 TRAP(err, ret = ConfigL(SIMTSY_ELEMFILES_CMD_NUMBER)); |
|
803 if(err != KErrNone) |
|
804 { |
|
805 ret = err; |
|
806 } |
|
807 if(ret!=KErrNone) |
|
808 { |
|
809 return ret; |
|
810 } |
|
811 else |
|
812 { |
|
813 iConfigDone = ETrue; |
|
814 } |
|
815 } |
|
816 } |
|
817 } |
|
818 |
|
819 if(iMMRetrieve->Count()==0) |
|
820 { |
|
821 ReqCompleted(aTsyReqHandle,KErrNotSupported); |
|
822 return KErrNone; |
|
823 } |
|
824 |
|
825 __ASSERT_ALWAYS(!iNotifyRetrieveMM.iNotifyPending,SimPanic(ENotificationReqAlreadyOutstanding)); |
|
826 |
|
827 |
|
828 RSat::TRetrieveMultimediaMessageV6Pckg *aRspPckg = (RSat::TRetrieveMultimediaMessageV6Pckg*)aPCmd; |
|
829 RSat::TRetrieveMultimediaMessageV6& rspRetMM = (*aRspPckg)(); |
|
830 |
|
831 iNotifyRetrieveMM.iNotifyPending=ETrue; |
|
832 iNotifyRetrieveMM.iNotifyHandle=aTsyReqHandle; |
|
833 iNotifyRetrieveMM.iNotifyData = &rspRetMM; |
|
834 |
|
835 iRefreshEf= ETrue; |
|
836 |
|
837 return KErrNone; |
|
838 |
|
839 } |
|
840 |
|
841 TInt CSimSat::NotifyRetrieveMultimediaMsgPCmdCancel(const TTsyReqHandle /*aTsyReqHandle*/) |
|
842 { |
|
843 |
|
844 if(iNotifyRetrieveMM.iNotifyPending) |
|
845 { |
|
846 iNotifyRetrieveMM.iNotifyPending=EFalse; |
|
847 ReqCompleted(iNotifyRetrieveMM.iNotifyHandle,KErrCancel); |
|
848 } |
|
849 else |
|
850 { |
|
851 ReqCompleted(iNotifyRetrieveMM.iNotifyHandle,KErrNone); |
|
852 } |
|
853 return KErrNone; |
|
854 |
|
855 } |
|
856 |
|
857 TInt CSimSat::NotifyLaunchBrowserPCmd(const TTsyReqHandle aTsyReqHandle,TDes8* aPCmd) |
|
858 { |
|
859 |
|
860 if(!iConfigDone) |
|
861 { |
|
862 TInt ret = KErrNone; |
|
863 TRAPD(err, ret = ConfigL(SIMTSY_LNCH_BRWSR_PCMD_NUMBER)); |
|
864 if(err != KErrNone) |
|
865 { |
|
866 ret = err; |
|
867 } |
|
868 |
|
869 if(ret!= KErrNone) |
|
870 { |
|
871 return ret; |
|
872 } |
|
873 else |
|
874 { |
|
875 TRAP(err, ret = ConfigL(SIMTSY_EVENT_LIST_CMD_NUMBER)); |
|
876 if(err != KErrNone) |
|
877 { |
|
878 ret = err; |
|
879 } |
|
880 |
|
881 if(ret != KErrNone) |
|
882 { |
|
883 return ret; |
|
884 } |
|
885 else |
|
886 { |
|
887 iConfigDone = ETrue; |
|
888 } |
|
889 } |
|
890 } |
|
891 |
|
892 if(iLnchBrwsr->Count()==0) |
|
893 { |
|
894 ReqCompleted(aTsyReqHandle,KErrNotSupported); |
|
895 return KErrNone; |
|
896 } |
|
897 |
|
898 __ASSERT_ALWAYS(!iNotifyLnchBrwsr.iNotifyPending,SimPanic(ENotificationReqAlreadyOutstanding)); |
|
899 |
|
900 RSat::TLaunchBrowserV6Pckg *aRspPckg = (RSat::TLaunchBrowserV6Pckg*)aPCmd; |
|
901 RSat::TLaunchBrowserV6& rspLncBrwsr = (*aRspPckg)(); |
|
902 |
|
903 iNotifyLnchBrwsr.iNotifyPending=ETrue; |
|
904 iNotifyLnchBrwsr.iNotifyHandle=aTsyReqHandle; |
|
905 iNotifyLnchBrwsr.iNotifyData = &rspLncBrwsr; |
|
906 |
|
907 if(!iRefreshEf) |
|
908 { |
|
909 iRefreshEf= ETrue; |
|
910 } |
|
911 |
|
912 return KErrNone; |
|
913 |
|
914 } |
|
915 |
|
916 |
|
917 TInt CSimSat::NotifyLaunchBrowserPCmdCancel(const TTsyReqHandle /*aTsyReqHandle*/) |
|
918 { |
|
919 |
|
920 if(iNotifyLnchBrwsr.iNotifyPending) |
|
921 { |
|
922 iNotifyLnchBrwsr.iNotifyPending=EFalse; |
|
923 ReqCompleted(iNotifyLnchBrwsr.iNotifyHandle,KErrCancel); |
|
924 } |
|
925 else |
|
926 { |
|
927 ReqCompleted(iNotifyLnchBrwsr.iNotifyHandle,KErrNone); |
|
928 } |
|
929 return KErrNone; |
|
930 |
|
931 } |
|
932 |
|
933 TInt CSimSat::NotifySubmitMultimediaMsgPCmd(const TTsyReqHandle aTsyReqHandle,TDes8* aPCmd) |
|
934 { |
|
935 |
|
936 if(!iConfigDone) |
|
937 { |
|
938 TInt ret = KErrNone; |
|
939 TRAPD(err, ret = ConfigL(SIMTSY_SUB_MM_PCMD_NUMBER)); |
|
940 if(err != KErrNone) |
|
941 { |
|
942 ret = err; |
|
943 } |
|
944 |
|
945 if(ret!= KErrNone) |
|
946 { |
|
947 return ret; |
|
948 } |
|
949 else |
|
950 { |
|
951 TRAP(err, ret = ConfigL(SIMTSY_ELEMFILES_CMD_NUMBER)); |
|
952 if(err != KErrNone) |
|
953 { |
|
954 ret = err; |
|
955 } |
|
956 |
|
957 if(ret!=KErrNone) |
|
958 { |
|
959 return ret; |
|
960 } |
|
961 else |
|
962 { |
|
963 iConfigDone = ETrue; |
|
964 } |
|
965 } |
|
966 } |
|
967 |
|
968 if(iMMSubmit->Count()==0) |
|
969 { |
|
970 ReqCompleted(aTsyReqHandle,KErrNotSupported); |
|
971 return KErrNone; |
|
972 } |
|
973 |
|
974 __ASSERT_ALWAYS(!iNotifySubmitMM.iNotifyPending,SimPanic(ENotificationReqAlreadyOutstanding)); |
|
975 |
|
976 RSat::TSubmitMultimediaMessageV6Pckg *aRspPckg = (RSat::TSubmitMultimediaMessageV6Pckg*)aPCmd; |
|
977 RSat::TSubmitMultimediaMessageV6& rspRetMM = (*aRspPckg)(); |
|
978 |
|
979 iNotifySubmitMM.iNotifyPending=ETrue; |
|
980 iNotifySubmitMM.iNotifyHandle=aTsyReqHandle; |
|
981 iNotifySubmitMM.iNotifyData = &rspRetMM; |
|
982 |
|
983 if(!iRefreshEf) |
|
984 { |
|
985 iRefreshEf= ETrue; |
|
986 } |
|
987 |
|
988 return KErrNone; |
|
989 |
|
990 } |
|
991 |
|
992 TInt CSimSat::NotifySubmitMultimediaMsgPCmdCancel(const TTsyReqHandle /*aTsyReqHandle*/) |
|
993 { |
|
994 |
|
995 if(iNotifySubmitMM.iNotifyPending) |
|
996 { |
|
997 iNotifySubmitMM.iNotifyPending=EFalse; |
|
998 ReqCompleted(iNotifySubmitMM.iNotifyHandle,KErrCancel); |
|
999 } |
|
1000 else |
|
1001 { |
|
1002 ReqCompleted(iNotifySubmitMM.iNotifyHandle,KErrNone); |
|
1003 } |
|
1004 return KErrNone; |
|
1005 |
|
1006 } |
|
1007 |
|
1008 TInt CSimSat::NotifyDisplayMultimediaMsgPCmd(const TTsyReqHandle aTsyReqHandle,TDes8* aPCmd) |
|
1009 { |
|
1010 |
|
1011 if(!iConfigDone) |
|
1012 { |
|
1013 TInt ret = KErrNone; |
|
1014 TRAPD(err, ret = ConfigL(SIMTSY_DISP_MM_PCMD_NUMBER)); |
|
1015 if(err != KErrNone) |
|
1016 { |
|
1017 ret = err; |
|
1018 } |
|
1019 |
|
1020 if(ret!= KErrNone) |
|
1021 { |
|
1022 return ret; |
|
1023 } |
|
1024 else |
|
1025 { |
|
1026 iConfigDone = ETrue; |
|
1027 } |
|
1028 } |
|
1029 |
|
1030 if(iMMDisplay->Count()==0) |
|
1031 { |
|
1032 ReqCompleted(aTsyReqHandle,KErrNotSupported); |
|
1033 return KErrNone; |
|
1034 } |
|
1035 |
|
1036 __ASSERT_ALWAYS(!iNotifyDisplayMM.iNotifyPending,SimPanic(ENotificationReqAlreadyOutstanding)); |
|
1037 |
|
1038 RSat::TDisplayMultimediaMessageV6Pckg *aRspPckg = (RSat::TDisplayMultimediaMessageV6Pckg*)aPCmd; |
|
1039 RSat::TDisplayMultimediaMessageV6& rspRetMM = (*aRspPckg)(); |
|
1040 |
|
1041 iNotifyDisplayMM.iNotifyPending=ETrue; |
|
1042 iNotifyDisplayMM.iNotifyHandle=aTsyReqHandle; |
|
1043 iNotifyDisplayMM.iNotifyData = &rspRetMM; |
|
1044 |
|
1045 return KErrNone; |
|
1046 |
|
1047 } |
|
1048 |
|
1049 TInt CSimSat::NotifyDisplayMultimediaMsgPCmdCancel(const TTsyReqHandle /*aTsyReqHandle*/) |
|
1050 { |
|
1051 |
|
1052 if(iNotifyDisplayMM.iNotifyPending) |
|
1053 { |
|
1054 iNotifyDisplayMM.iNotifyPending=EFalse; |
|
1055 ReqCompleted(iNotifyDisplayMM.iNotifyHandle,KErrCancel); |
|
1056 } |
|
1057 else |
|
1058 { |
|
1059 ReqCompleted(iNotifyDisplayMM.iNotifyHandle,KErrNone); |
|
1060 } |
|
1061 return KErrNone; |
|
1062 |
|
1063 } |
|
1064 |
|
1065 TInt CSimSat::NotifySetFramesPCmd(const TTsyReqHandle aTsyReqHandle,TDes8* aPCmd) |
|
1066 { |
|
1067 |
|
1068 if(!iConfigDone) |
|
1069 { |
|
1070 TInt ret = KErrNone; |
|
1071 TRAPD(err, ret = ConfigL(SIMTSY_SET_FRMS_PCMD_NUMBER)); |
|
1072 if(err != KErrNone) |
|
1073 { |
|
1074 ret = err; |
|
1075 } |
|
1076 |
|
1077 if(ret!= KErrNone) |
|
1078 { |
|
1079 return ret; |
|
1080 } |
|
1081 else |
|
1082 { |
|
1083 iConfigDone = ETrue; |
|
1084 } |
|
1085 } |
|
1086 |
|
1087 if(iSetFrms->Count() == 0) |
|
1088 { |
|
1089 ReqCompleted(aTsyReqHandle,KErrNotSupported); |
|
1090 return KErrNone; |
|
1091 } |
|
1092 |
|
1093 __ASSERT_ALWAYS(!iNotifySetFrms.iNotifyPending,SimPanic(ENotificationReqAlreadyOutstanding)); |
|
1094 |
|
1095 RSat::TSetFramesV6Pckg *aRspPckg = (RSat::TSetFramesV6Pckg*)aPCmd; |
|
1096 RSat::TSetFramesV6& rspSetFrmsV6 = (*aRspPckg)(); |
|
1097 |
|
1098 iNotifySetFrms.iNotifyPending=ETrue; |
|
1099 iNotifySetFrms.iNotifyHandle=aTsyReqHandle; |
|
1100 iNotifySetFrms.iNotifyData = &rspSetFrmsV6; |
|
1101 |
|
1102 return KErrNone; |
|
1103 } |
|
1104 |
|
1105 TInt CSimSat::NotifySetFramesPCmdCancel(const TTsyReqHandle /*aTsyReqHandle*/) |
|
1106 { |
|
1107 |
|
1108 if(iNotifySetFrms.iNotifyPending) |
|
1109 { |
|
1110 iNotifySetFrms.iNotifyPending=EFalse; |
|
1111 ReqCompleted(iNotifySetFrms.iNotifyHandle,KErrCancel); |
|
1112 } |
|
1113 else |
|
1114 { |
|
1115 ReqCompleted(iNotifySetFrms.iNotifyHandle,KErrNone); |
|
1116 } |
|
1117 return KErrNone; |
|
1118 |
|
1119 } |
|
1120 |
|
1121 TInt CSimSat::NotifyGetFramesStatusPCmd(const TTsyReqHandle aTsyReqHandle,TDes8* aPCmd) |
|
1122 { |
|
1123 |
|
1124 if(!iConfigDone) |
|
1125 { |
|
1126 TInt ret = KErrNone; |
|
1127 TRAPD(err, ret = ConfigL(SIMTSY_GET_FRMS_STS_PCMD_NUMBER)); |
|
1128 if(err != KErrNone) |
|
1129 { |
|
1130 ret = err; |
|
1131 } |
|
1132 |
|
1133 if(ret!= KErrNone) |
|
1134 { |
|
1135 return ret; |
|
1136 } |
|
1137 else |
|
1138 { |
|
1139 iConfigDone = ETrue; |
|
1140 } |
|
1141 } |
|
1142 |
|
1143 if(iGetFrmsSts->Count() == 0) |
|
1144 { |
|
1145 ReqCompleted(aTsyReqHandle,KErrNotSupported); |
|
1146 return KErrNone; |
|
1147 } |
|
1148 |
|
1149 __ASSERT_ALWAYS(!iNotifyGetFrmsSts.iNotifyPending,SimPanic(ENotificationReqAlreadyOutstanding)); |
|
1150 |
|
1151 RSat::TGetFramesStatusV6Pckg *aRspPckg = (RSat::TGetFramesStatusV6Pckg*)aPCmd; |
|
1152 RSat::TGetFramesStatusV6& rspGetFrmsV6 = (*aRspPckg)(); |
|
1153 |
|
1154 iNotifyGetFrmsSts.iNotifyPending = ETrue; |
|
1155 iNotifyGetFrmsSts.iNotifyHandle = aTsyReqHandle; |
|
1156 iNotifyGetFrmsSts.iNotifyData = &rspGetFrmsV6; |
|
1157 |
|
1158 return KErrNone; |
|
1159 |
|
1160 } |
|
1161 |
|
1162 TInt CSimSat::NotifyGetFramesStatusPCmdCancel(const TTsyReqHandle /*aTsyReqHandle*/) |
|
1163 { |
|
1164 |
|
1165 if(iNotifyGetFrmsSts.iNotifyPending) |
|
1166 { |
|
1167 iNotifyGetFrmsSts.iNotifyPending=EFalse; |
|
1168 ReqCompleted(iNotifyGetFrmsSts.iNotifyHandle,KErrCancel); |
|
1169 } |
|
1170 else |
|
1171 { |
|
1172 ReqCompleted(iNotifyGetFrmsSts.iNotifyHandle,KErrNone); |
|
1173 } |
|
1174 |
|
1175 return KErrNone; |
|
1176 |
|
1177 } |
|
1178 |
|
1179 TInt CSimSat::UssdDataDownload(const TTsyReqHandle aTsyReqHandle, TDes8* aDes) |
|
1180 { |
|
1181 // Has the config file been parsed for this functionality |
|
1182 if(!iConfigDone) |
|
1183 { |
|
1184 TInt ret = KErrNone; |
|
1185 TRAPD(err, ret = ConfigL(SIMTSY_USSD_CMD_NUMBER)); |
|
1186 if(err != KErrNone) |
|
1187 { |
|
1188 ret = err; |
|
1189 } |
|
1190 if(ret!= KErrNone) |
|
1191 { |
|
1192 return ret; |
|
1193 } |
|
1194 else |
|
1195 { |
|
1196 iConfigDone = ETrue; |
|
1197 } |
|
1198 } |
|
1199 |
|
1200 TInt err(KErrNone); |
|
1201 TBool found(EFalse); |
|
1202 TInt count(iUssdData->Count()); |
|
1203 |
|
1204 // If the config file does not contain any USSD Download related data |
|
1205 // then complete the request with KErrNotSupported |
|
1206 if(!count) |
|
1207 { |
|
1208 err = KErrNotSupported; |
|
1209 } |
|
1210 else |
|
1211 { |
|
1212 // otherwise extract the data supplied by the client |
|
1213 RSat::TUssdDataDownloadV6Pckg *ussdDataV6Pckg = (RSat::TUssdDataDownloadV6Pckg*)aDes; |
|
1214 RSat::TUssdDataDownloadV6& ussdDataV6 = (*ussdDataV6Pckg)(); |
|
1215 |
|
1216 for(TInt i=0; i<count; i++) |
|
1217 { |
|
1218 TUssdData tempUssdData = iUssdData->At(i); |
|
1219 |
|
1220 // Compare the supplied data to the data retrieved from the config file |
|
1221 // and proceed only if they match |
|
1222 if((ussdDataV6.iDeviceId == STATIC_CAST(RSat::TDeviceId, tempUssdData.iSrc)) && |
|
1223 (ussdDataV6.iUssdString.iDcs == tempUssdData.iDcs) && |
|
1224 (ussdDataV6.iUssdString.iUssdString.Compare(tempUssdData.iUssdStr) == 0)) |
|
1225 { |
|
1226 found = ETrue; |
|
1227 |
|
1228 if(tempUssdData.iUICCRsp == SIMTSY_UICC_SUCC_RSP) |
|
1229 { |
|
1230 err = KErrNone; |
|
1231 } |
|
1232 else if(tempUssdData.iUICCRsp == SIMTSY_UICC_RETRY_RSP) |
|
1233 { |
|
1234 err = KErrNotReady; |
|
1235 } |
|
1236 else if(tempUssdData.iUICCRsp == SIMTSY_UICC_FLR_RSP_1 || |
|
1237 tempUssdData.iUICCRsp == SIMTSY_UICC_FLR_RSP_2) |
|
1238 { |
|
1239 err = KErrNotSupported; |
|
1240 } |
|
1241 |
|
1242 iUSSDDataDownloadHandle = aTsyReqHandle; |
|
1243 break; |
|
1244 } |
|
1245 } // end for loop |
|
1246 } // end else |
|
1247 |
|
1248 // the supplied data does not match the one in the config file, so complete the request with an error |
|
1249 if(!found) |
|
1250 err = KErrCorrupt; |
|
1251 |
|
1252 ReqCompleted(aTsyReqHandle, err); |
|
1253 return KErrNone; |
|
1254 } |
|
1255 |
|
1256 |
|
1257 TInt CSimSat::UssdDataDownloadCancel(const TTsyReqHandle aTsyReqHandle) |
|
1258 { |
|
1259 if(iUSSDDataDownloadHandle == aTsyReqHandle) |
|
1260 { |
|
1261 ReqCompleted(aTsyReqHandle, KErrCancel); |
|
1262 } |
|
1263 else |
|
1264 { |
|
1265 ReqCompleted(aTsyReqHandle, KErrCorrupt); |
|
1266 } |
|
1267 return KErrNone; |
|
1268 } |
|
1269 |
|
1270 TInt CSimSat::NotifyLocalInfoPCmd(const TTsyReqHandle aTsyReqHandle,TDes8* aPCmd) |
|
1271 { |
|
1272 if(!iConfigDone) |
|
1273 { |
|
1274 TInt ret = KErrNone; |
|
1275 TRAPD(err, ret = ConfigL(SIMTSY_PRV_LCL_INFO_PCMD_NUMBER)); |
|
1276 if(err != KErrNone) |
|
1277 { |
|
1278 ret = err; |
|
1279 } |
|
1280 |
|
1281 if(ret!= KErrNone) |
|
1282 { |
|
1283 return ret; |
|
1284 } |
|
1285 else |
|
1286 { |
|
1287 iConfigDone = ETrue; |
|
1288 } |
|
1289 } |
|
1290 |
|
1291 if(iLocalInfo->Count() == 0) |
|
1292 { |
|
1293 ReqCompleted(aTsyReqHandle,KErrNotSupported); |
|
1294 return KErrNone; |
|
1295 } |
|
1296 |
|
1297 RSat::TLocalInfoV6Pckg *aRspPckg = (RSat::TLocalInfoV6Pckg*)aPCmd; |
|
1298 RSat::TLocalInfoV6& rspLocalInfo = (*aRspPckg)(); |
|
1299 |
|
1300 iNotifyLocalInfo.iNotifyPending = ETrue; |
|
1301 iNotifyLocalInfo.iNotifyHandle = aTsyReqHandle; |
|
1302 iNotifyLocalInfo.iNotifyData = &rspLocalInfo; |
|
1303 |
|
1304 return KErrNone; |
|
1305 } |
|
1306 |
|
1307 TInt CSimSat::NotifyLocalInfoPCmdCancel(const TTsyReqHandle /*aTsyReqHandle*/) |
|
1308 { |
|
1309 if(iNotifyLocalInfo.iNotifyPending) |
|
1310 { |
|
1311 iNotifyLocalInfo.iNotifyPending= EFalse; |
|
1312 ReqCompleted(iNotifyLocalInfo.iNotifyHandle,KErrCancel); |
|
1313 } |
|
1314 else |
|
1315 { |
|
1316 ReqCompleted(iNotifyLocalInfo.iNotifyHandle,KErrNone); |
|
1317 } |
|
1318 return KErrNone; |
|
1319 } |
|
1320 |
|
1321 |
|
1322 TInt CSimSat::NotifyOpenChannelPCmd(const TTsyReqHandle aTsyReqHandle, TDes8* aPCmd) |
|
1323 { |
|
1324 |
|
1325 if(!iConfigDone) |
|
1326 { |
|
1327 TInt ret = KErrNone; |
|
1328 TRAPD(err, ret = ConfigL(SIMTSY_OPEN_CHAN_PCMD_NUMBER)); |
|
1329 if(err != KErrNone) |
|
1330 { |
|
1331 ret = err; |
|
1332 } |
|
1333 |
|
1334 if(ret!= KErrNone) |
|
1335 { |
|
1336 return ret; |
|
1337 } |
|
1338 else |
|
1339 { |
|
1340 iConfigDone = ETrue; |
|
1341 } |
|
1342 } |
|
1343 |
|
1344 if(iOpenChn->Count()==0) |
|
1345 { |
|
1346 ReqCompleted(aTsyReqHandle,KErrNotSupported); |
|
1347 return KErrNone; |
|
1348 } |
|
1349 |
|
1350 __ASSERT_ALWAYS(!iNotifyOpenChn.iNotifyPending,SimPanic(ENotificationReqAlreadyOutstanding)); |
|
1351 RSat::TOpenLocalLinksChannelV5Pckg* opnChnPckg = (RSat::TOpenLocalLinksChannelV5Pckg*)aPCmd; |
|
1352 RSat::TOpenLocalLinksChannelV5 & opnChn = (*opnChnPckg)(); |
|
1353 |
|
1354 iNotifyOpenChn.iNotifyPending=ETrue; |
|
1355 iNotifyOpenChn.iNotifyHandle=aTsyReqHandle; |
|
1356 iNotifyOpenChn.iNotifyData = &opnChn; |
|
1357 return KErrNone; |
|
1358 } |
|
1359 |
|
1360 |
|
1361 TInt CSimSat::NotifyOpenChannelPCmdCancel(const TTsyReqHandle /*aTsyReqHandle*/) |
|
1362 { |
|
1363 if(iNotifyOpenChn.iNotifyPending) |
|
1364 { |
|
1365 iNotifyOpenChn.iNotifyPending= EFalse; |
|
1366 ReqCompleted(iNotifyOpenChn.iNotifyHandle,KErrCancel); |
|
1367 } |
|
1368 else |
|
1369 { |
|
1370 ReqCompleted(iNotifyOpenChn.iNotifyHandle,KErrNone); |
|
1371 } |
|
1372 return KErrNone; |
|
1373 } |
|
1374 |
|
1375 TInt CSimSat::NotifyPlayTonePCmd(const TTsyReqHandle aTsyReqHandle, TDes8* aPCmd) |
|
1376 { |
|
1377 |
|
1378 if(!iConfigDone) |
|
1379 { |
|
1380 TInt ret = KErrNone; |
|
1381 TRAPD(err, ret = ConfigL(SIMTSY_PLAY_TONE_PCMD_NUMBER)); |
|
1382 if(err != KErrNone) |
|
1383 { |
|
1384 ret = err; |
|
1385 } |
|
1386 |
|
1387 if(ret!= KErrNone) |
|
1388 { |
|
1389 return ret; |
|
1390 } |
|
1391 else |
|
1392 { |
|
1393 iConfigDone = ETrue; |
|
1394 } |
|
1395 } |
|
1396 |
|
1397 if(iMiscCmd->Count()==0) |
|
1398 { |
|
1399 ReqCompleted(aTsyReqHandle,KErrNotSupported); |
|
1400 return KErrNone; |
|
1401 } |
|
1402 if(!iPlayTone) |
|
1403 { |
|
1404 iPlayTone = ETrue; |
|
1405 } |
|
1406 |
|
1407 __ASSERT_ALWAYS(!iNotifyMiscCmd.iNotifyPending,SimPanic(ENotificationReqAlreadyOutstanding)); |
|
1408 |
|
1409 RSat::TPlayToneV6Pckg* playTonePckg = (RSat::TPlayToneV6Pckg*)aPCmd; |
|
1410 RSat::TPlayToneV6& playTone = (*playTonePckg)(); |
|
1411 |
|
1412 iNotifyMiscCmd.iNotifyPending=ETrue; |
|
1413 iNotifyMiscCmd.iNotifyHandle=aTsyReqHandle; |
|
1414 iNotifyMiscCmd.iNotifyData = &playTone; |
|
1415 return KErrNone; |
|
1416 } |
|
1417 |
|
1418 |
|
1419 TInt CSimSat::NotifyPlayTonePCmdCancel(const TTsyReqHandle /*aTsyReqHandle*/) |
|
1420 { |
|
1421 if(iNotifyMiscCmd.iNotifyPending) |
|
1422 { |
|
1423 iNotifyMiscCmd.iNotifyPending= EFalse; |
|
1424 iMiscCmdIndex ++; |
|
1425 ReqCompleted(iNotifyMiscCmd.iNotifyHandle,KErrCancel); |
|
1426 } |
|
1427 else |
|
1428 { |
|
1429 ReqCompleted(iNotifyMiscCmd.iNotifyHandle,KErrNone); |
|
1430 } |
|
1431 |
|
1432 return KErrNone; |
|
1433 } |
|
1434 |
|
1435 TInt CSimSat::NotifySetupCallPCmd(const TTsyReqHandle aTsyReqHandle, TDes8* aPCmd) |
|
1436 { |
|
1437 |
|
1438 if(!iConfigDone) |
|
1439 { |
|
1440 TInt ret = KErrNone; |
|
1441 TRAPD(err, ret = ConfigL(SIMTSY_SETUP_CALL_PCMD_NUMBER)); |
|
1442 if(err != KErrNone) |
|
1443 { |
|
1444 ret = err; |
|
1445 } |
|
1446 |
|
1447 if(ret!= KErrNone) |
|
1448 { |
|
1449 return ret; |
|
1450 } |
|
1451 else |
|
1452 { |
|
1453 iConfigDone = ETrue; |
|
1454 } |
|
1455 } |
|
1456 |
|
1457 if(iMiscCmd->Count()==0) |
|
1458 { |
|
1459 ReqCompleted(aTsyReqHandle,KErrNotSupported); |
|
1460 return KErrNone; |
|
1461 } |
|
1462 |
|
1463 if(!iPlayTone && !iSetupCall) |
|
1464 { |
|
1465 iMiscCmdIndex += SIMTSY_PLAYTONE_TESTCASES_NUMBER; |
|
1466 } |
|
1467 |
|
1468 if(!iSetupCall) |
|
1469 { |
|
1470 iSetupCall = ETrue; |
|
1471 } |
|
1472 |
|
1473 __ASSERT_ALWAYS(!iNotifyMiscCmd.iNotifyPending,SimPanic(ENotificationReqAlreadyOutstanding)); |
|
1474 |
|
1475 RSat::TSetUpCallV6Pckg* setupCallPckg = (RSat::TSetUpCallV6Pckg*)aPCmd; |
|
1476 RSat::TSetUpCallV6& setupCall = (*setupCallPckg)(); |
|
1477 |
|
1478 iNotifyMiscCmd.iNotifyPending=ETrue; |
|
1479 iNotifyMiscCmd.iNotifyHandle=aTsyReqHandle; |
|
1480 iNotifyMiscCmd.iNotifyData = &setupCall; |
|
1481 return KErrNone; |
|
1482 } |
|
1483 |
|
1484 TInt CSimSat::NotifySetupCallPCmdCancel(const TTsyReqHandle /*aTsyReqHandle*/) |
|
1485 { |
|
1486 if(iNotifyMiscCmd.iNotifyPending) |
|
1487 { |
|
1488 iNotifyMiscCmd.iNotifyPending= EFalse; |
|
1489 iMiscCmdIndex ++; |
|
1490 ReqCompleted(iNotifyMiscCmd.iNotifyHandle,KErrCancel); |
|
1491 } |
|
1492 else |
|
1493 { |
|
1494 ReqCompleted(iNotifyMiscCmd.iNotifyHandle,KErrNone); |
|
1495 } |
|
1496 |
|
1497 return KErrNone; |
|
1498 } |
|
1499 |
|
1500 |
|
1501 TInt CSimSat::NotifyGetInkeyPCmd(const TTsyReqHandle aTsyReqHandle, TDes8* aPCmd) |
|
1502 { |
|
1503 |
|
1504 if(!iConfigDone) |
|
1505 { |
|
1506 TInt ret = KErrNone; |
|
1507 TRAPD(err, ret = ConfigL(SIMTSY_GET_INKEY_PCMD_NUMBER)); |
|
1508 if(err != KErrNone) |
|
1509 { |
|
1510 ret = err; |
|
1511 } |
|
1512 |
|
1513 if(ret!= KErrNone) |
|
1514 { |
|
1515 return ret; |
|
1516 } |
|
1517 else |
|
1518 { |
|
1519 TRAP(err, ret = ConfigL(SIMTSY_SENDSS_CMD_NUMBER)); |
|
1520 if(err != KErrNone) |
|
1521 { |
|
1522 ret = err; |
|
1523 } |
|
1524 |
|
1525 if(ret != KErrNone) |
|
1526 { |
|
1527 return ret; |
|
1528 } |
|
1529 else |
|
1530 { |
|
1531 iConfigDone = ETrue; |
|
1532 } |
|
1533 } |
|
1534 } |
|
1535 |
|
1536 if(iMiscCmd->Count()==0) |
|
1537 { |
|
1538 ReqCompleted(aTsyReqHandle,KErrNotSupported); |
|
1539 return KErrNone; |
|
1540 } |
|
1541 |
|
1542 if(!iGetInkey) |
|
1543 { |
|
1544 iMiscCmdIndex += (SIMTSY_PLAYTONE_TESTCASES_NUMBER + SIMTSY_SETUPCALL_TESTCASES_NUMBER); |
|
1545 iGetInkey = ETrue; |
|
1546 } |
|
1547 |
|
1548 __ASSERT_ALWAYS(!iNotifyMiscCmd.iNotifyPending,SimPanic(ENotificationReqAlreadyOutstanding)); |
|
1549 |
|
1550 RSat::TGetInkeyV6Pckg* getInkeyPckg = (RSat::TGetInkeyV6Pckg*)aPCmd; |
|
1551 RSat::TGetInkeyV6& getInkey = (*getInkeyPckg)(); |
|
1552 |
|
1553 iNotifyMiscCmd.iNotifyPending=ETrue; |
|
1554 iNotifyMiscCmd.iNotifyHandle=aTsyReqHandle; |
|
1555 iNotifyMiscCmd.iNotifyData = &getInkey; |
|
1556 return KErrNone; |
|
1557 } |
|
1558 |
|
1559 TInt CSimSat::NotifyGetInkeyPCmdCancel(const TTsyReqHandle /*aTsyReqHandle*/) |
|
1560 { |
|
1561 if(iNotifyMiscCmd.iNotifyPending) |
|
1562 { |
|
1563 iNotifyMiscCmd.iNotifyPending= EFalse; |
|
1564 iMiscCmdIndex ++; |
|
1565 ReqCompleted(iNotifyMiscCmd.iNotifyHandle,KErrCancel); |
|
1566 } |
|
1567 else |
|
1568 { |
|
1569 ReqCompleted(iNotifyMiscCmd.iNotifyHandle,KErrNone); |
|
1570 } |
|
1571 |
|
1572 return KErrNone; |
|
1573 } |
|
1574 |
|
1575 TInt CSimSat::NotifySendSsPCmd(const TTsyReqHandle aTsyReqHandle, TDes8* aPCmd) |
|
1576 { |
|
1577 |
|
1578 if(iSendSS->Count()==0) |
|
1579 { |
|
1580 ReqCompleted(aTsyReqHandle,KErrNotSupported); |
|
1581 return KErrNone; |
|
1582 } |
|
1583 |
|
1584 __ASSERT_ALWAYS(!iNotifySendSs.iNotifyPending,SimPanic(ENotificationReqAlreadyOutstanding)); |
|
1585 |
|
1586 RSat::TSendSsV6Pckg *sendSsV6Pckg = (RSat::TSendSsV6Pckg*)aPCmd; |
|
1587 RSat::TSendSsV6 & sendSsV6 = (*sendSsV6Pckg)(); |
|
1588 |
|
1589 iNotifySendSs.iNotifyPending=ETrue; |
|
1590 iNotifySendSs.iNotifyHandle=aTsyReqHandle; |
|
1591 iNotifySendSs.iNotifyData = &sendSsV6; |
|
1592 return KErrNone; |
|
1593 } |
|
1594 |
|
1595 TInt CSimSat::NotifySendSsPCmdCancel(const TTsyReqHandle /*aTsyReqHandle*/) |
|
1596 { |
|
1597 if(iNotifySendSs.iNotifyPending) |
|
1598 { |
|
1599 iNotifySendSs.iNotifyPending= EFalse; |
|
1600 iSendSsIndex++; |
|
1601 ReqCompleted(iNotifySendSs.iNotifyHandle,KErrCancel); |
|
1602 } |
|
1603 else |
|
1604 { |
|
1605 ReqCompleted(iNotifySendSs.iNotifyHandle,KErrNone); |
|
1606 } |
|
1607 |
|
1608 return KErrNone; |
|
1609 } |
|
1610 |
|
1611 TInt CSimSat::NotifySendUssdPCmd(const TTsyReqHandle aTsyReqHandle, TDes8* aPCmd) |
|
1612 { |
|
1613 |
|
1614 if(!iConfigDone) |
|
1615 { |
|
1616 TInt ret = KErrNone; |
|
1617 TRAPD(err, ret = ConfigL(SIMTSY_SEND_USSD_PCMD_NUMBER)); |
|
1618 if(err != KErrNone) |
|
1619 { |
|
1620 ret = err; |
|
1621 } |
|
1622 |
|
1623 if(ret!= KErrNone) |
|
1624 { |
|
1625 return ret; |
|
1626 } |
|
1627 else |
|
1628 { |
|
1629 iConfigDone = ETrue; |
|
1630 } |
|
1631 } |
|
1632 |
|
1633 if(iSendUssd->Count()==0) |
|
1634 { |
|
1635 ReqCompleted(aTsyReqHandle,KErrNotSupported); |
|
1636 return KErrNone; |
|
1637 } |
|
1638 |
|
1639 __ASSERT_ALWAYS(!iNotifySendUssd.iNotifyPending,SimPanic(ENotificationReqAlreadyOutstanding)); |
|
1640 |
|
1641 RSat::TSendUssdV6Pckg* sendUSSDPckg = (RSat::TSendUssdV6Pckg*)aPCmd; |
|
1642 RSat::TSendUssdV6& sendUSSD = (*sendUSSDPckg)(); |
|
1643 |
|
1644 iNotifySendUssd.iNotifyPending=ETrue; |
|
1645 iNotifySendUssd.iNotifyHandle=aTsyReqHandle; |
|
1646 iNotifySendUssd.iNotifyData = &sendUSSD; |
|
1647 return KErrNone; |
|
1648 } |
|
1649 |
|
1650 TInt CSimSat::NotifySendUssdPCmdCancel(const TTsyReqHandle /*aTsyReqHandle*/) |
|
1651 { |
|
1652 if(iNotifySendUssd.iNotifyPending) |
|
1653 { |
|
1654 iNotifySendUssd.iNotifyPending= EFalse; |
|
1655 iSendUssdIndex ++; |
|
1656 ReqCompleted(iNotifySendUssd.iNotifyHandle,KErrCancel); |
|
1657 } |
|
1658 else |
|
1659 { |
|
1660 ReqCompleted(iNotifySendUssd.iNotifyHandle,KErrNone); |
|
1661 } |
|
1662 |
|
1663 return KErrNone; |
|
1664 } |
|
1665 |
|
1666 TInt CSimSat::TerminalRsp(const TTsyReqHandle aTsyReqHandle, RSat::TPCmd* aPCmd, TDes8* aRsp) |
|
1667 { |
|
1668 LOGMISC1(">>CSimSat::TerminalRsp"); |
|
1669 iPendingTerRsp = ETrue; |
|
1670 |
|
1671 switch (*aPCmd) |
|
1672 { |
|
1673 case RSat::ERetrieveMultimediaMsg: |
|
1674 return RetrieveMultimediaRsp(aTsyReqHandle, aRsp); |
|
1675 case RSat::ESubmitMultimediaMsg: |
|
1676 return SubmitMultimediaRsp(aTsyReqHandle, aRsp); |
|
1677 case RSat::EDisplayMultimediaMsg: |
|
1678 return DisplayMultimediaRsp(aTsyReqHandle, aRsp); |
|
1679 case RSat::ESetFrames: |
|
1680 return SetFramesRsp(aTsyReqHandle,aRsp); |
|
1681 case RSat::EGetFramesStatus: |
|
1682 return GetFramesStatusRsp(aTsyReqHandle,aRsp); |
|
1683 case RSat::ELocalInfo: |
|
1684 return ProvideLocalInfoRsp(aTsyReqHandle,aRsp); |
|
1685 case RSat::EOpenChannelGprs: |
|
1686 case RSat::EOpenChannelLocal: |
|
1687 case RSat::ECloseChannel: |
|
1688 return OpenChannelRsp(aTsyReqHandle,aRsp); |
|
1689 case RSat::EPlayTone: |
|
1690 return PlayToneRsp(aTsyReqHandle,aRsp); |
|
1691 case RSat::ESetUpCall: |
|
1692 return SetupCallRsp(aTsyReqHandle,aRsp); |
|
1693 case RSat::ERefresh: |
|
1694 return RefreshRsp(aTsyReqHandle,aRsp); |
|
1695 case RSat::ESendUssd: |
|
1696 return SendUssdRsp(aTsyReqHandle,aRsp); |
|
1697 case RSat::EGetInkey: |
|
1698 return GetInkeyRsp(aTsyReqHandle,aRsp); |
|
1699 case RSat::ELaunchBrowser: |
|
1700 return LaunchBrowserRsp(aTsyReqHandle,aRsp); |
|
1701 default: |
|
1702 iPendingTerRsp = EFalse; |
|
1703 return KErrGeneral; |
|
1704 } |
|
1705 } |
|
1706 |
|
1707 TInt CSimSat::TerminalRspCancel(const TTsyReqHandle aTsyReqHandle) |
|
1708 { |
|
1709 if(iPendingTerRsp) |
|
1710 { |
|
1711 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
1712 } |
|
1713 else |
|
1714 { |
|
1715 ReqCompleted(aTsyReqHandle,KErrNone); |
|
1716 } |
|
1717 return KErrNone; |
|
1718 } |
|
1719 |
|
1720 |
|
1721 void CSimSat::TimerCallBack(TInt /*aId*/) |
|
1722 /** |
|
1723 * Timer callback function. When the timer goes off, it will call back into this |
|
1724 * function for further processing. |
|
1725 * |
|
1726 * @param aId an id identifying which timer callback is being called |
|
1727 */ |
|
1728 { |
|
1729 LOGMISC1(">>CSimSat::TimerCallBack"); |
|
1730 |
|
1731 // |
|
1732 // Convert the SIM TSY text version into the RSat binary version... |
|
1733 // |
|
1734 /* Obtain type and file list if present and cache for completion by Refresh Allowed */ |
|
1735 if(iSatIndex < iSatInfo->Count() & !(iRefreshEf)) |
|
1736 { |
|
1737 iType = STATIC_CAST(RSat::TRefreshType,iSatInfo->At(iSatIndex).iType); |
|
1738 iConvertTextToFileReturnCode = ConvertTextToFileList(iSatInfo->At(iSatIndex).iFileList, |
|
1739 iFileList); |
|
1740 iSatIndex++; |
|
1741 } |
|
1742 |
|
1743 // Only process NotifyRefreshPCmd here if not enclosed in RefreshRequired cycle |
|
1744 if(iNotifyRefresh.iNotifyPending && !iRefreshRequired.iNotifyPending) |
|
1745 { |
|
1746 iNotifyRefresh.iNotifyPending=EFalse; |
|
1747 |
|
1748 RSat::TRefreshV1& refreshData = *(RSat::TRefreshV1*)iNotifyRefresh.iNotifyData; |
|
1749 |
|
1750 refreshData.iType = iType; |
|
1751 refreshData.iFileList = iFileList; |
|
1752 |
|
1753 if(iRefreshV2) |
|
1754 { |
|
1755 RSat::TRefreshV2& refresh2 = *(RSat::TRefreshV2*)iNotifyRefresh.iNotifyData; |
|
1756 refresh2.iType = STATIC_CAST(RSat::TRefreshType,iRefresh->At(iRefreshIndex).iType); |
|
1757 ConvertTextToTBuf16(iRefresh->At(iRefreshIndex).iFileList,refresh2.iAid); |
|
1758 iRefreshIndex++; |
|
1759 } |
|
1760 |
|
1761 if(iRefreshEf) |
|
1762 { |
|
1763 refreshData.iType = STATIC_CAST(RSat::TRefreshType,iElemFiles->At(iElemFilesIndex).iType); |
|
1764 ConvertTextToFileList(iElemFiles->At(iElemFilesIndex).iFileList,refreshData.iFileList); |
|
1765 iElemFilesIndex++; |
|
1766 } |
|
1767 |
|
1768 ReqCompleted(iNotifyRefresh.iNotifyHandle, iConvertTextToFileReturnCode); |
|
1769 } |
|
1770 |
|
1771 if(iRefreshRequired.iNotifyPending) |
|
1772 { |
|
1773 if (iConvertTextToFileReturnCode == KErrNone) |
|
1774 { |
|
1775 iRefreshRequired.iNotifyPending=EFalse; |
|
1776 iRefreshRequiredPending = ETrue; |
|
1777 |
|
1778 if (iRefreshRequired.iNotifyData != NULL) |
|
1779 { |
|
1780 RSat::TRefreshV1& refreshData = *(RSat::TRefreshV1*)iRefreshRequired.iNotifyData; |
|
1781 |
|
1782 refreshData.iType = iType; |
|
1783 refreshData.iFileList = iFileList; |
|
1784 } |
|
1785 } |
|
1786 |
|
1787 ReqCompleted(iRefreshRequired.iNotifyHandle, iConvertTextToFileReturnCode); |
|
1788 } |
|
1789 |
|
1790 if(iNotifyRetrieveMM.iNotifyPending) |
|
1791 { |
|
1792 |
|
1793 RSat::TRetrieveMultimediaMessageV6 *tMMMessageV6 = (RSat::TRetrieveMultimediaMessageV6*)iNotifyRetrieveMM.iNotifyData; |
|
1794 |
|
1795 tMMMessageV6->iDestination = STATIC_CAST(RSat::TDeviceId,iMMRetrieve->At(iRetIndex).iDestn); |
|
1796 tMMMessageV6->iAlphaId.iStatus = STATIC_CAST(RSat::TAlphaIdStatus,iMMRetrieve->At(iRetIndex).iAlphaStatus); |
|
1797 |
|
1798 ConvertTextToTBuf254(iMMRetrieve->At(iRetIndex).iAlphaIDBuf,tMMMessageV6->iAlphaId.iAlphaId); |
|
1799 |
|
1800 tMMMessageV6->iIconId.iQualifier = STATIC_CAST(RSat::TIconQualifier,iMMRetrieve->At(iRetIndex).iIconID); |
|
1801 tMMMessageV6->iIconId.iIdentifier = STATIC_CAST(TUint8,iMMRetrieve->At(iRetIndex).iIconIDBuf); |
|
1802 |
|
1803 ConvertTextToTBuf255(iMMRetrieve->At(iRetIndex).iMMMsgRef,tMMMessageV6->iMultimediaMessageRef); |
|
1804 ConvertTextToTBuf242(iMMRetrieve->At(iRetIndex).iRcptnFile,tMMMessageV6->iReceptionFile); |
|
1805 ConvertTextToTBuf255(iMMRetrieve->At(iRetIndex).iContentId,tMMMessageV6->iMultimediaContentId); |
|
1806 ConvertTextToTBuf255(iMMRetrieve->At(iRetIndex).iMsgId,tMMMessageV6->iMultimediaMessageId); |
|
1807 |
|
1808 tMMMessageV6->iTextAttribute.iStatus = STATIC_CAST(RSat::TTextAttributeStatus, iMMRetrieve->At(iRetIndex).iTextAttStatus); |
|
1809 |
|
1810 ConvertTextToTBuf4(iMMRetrieve->At(iRetIndex).iTextAttBuf,tMMMessageV6->iTextAttribute.iTextAttributeData); |
|
1811 |
|
1812 iNotifyRetrieveMM.iNotifyPending = EFalse; |
|
1813 if(iRetIndex < iMMRetrieve->Count()) |
|
1814 { |
|
1815 iRetTIndex = iRetIndex; |
|
1816 iRetIndex++; |
|
1817 } |
|
1818 |
|
1819 ReqCompleted(iNotifyRetrieveMM.iNotifyHandle, KErrNone); |
|
1820 |
|
1821 } |
|
1822 |
|
1823 if(iNotifySubmitMM.iNotifyPending) |
|
1824 { |
|
1825 |
|
1826 RSat::TSubmitMultimediaMessageV6 *tMMMessageV6 = (RSat::TSubmitMultimediaMessageV6*)iNotifySubmitMM.iNotifyData; |
|
1827 |
|
1828 |
|
1829 tMMMessageV6->iDestination = STATIC_CAST(RSat::TDeviceId,iMMSubmit->At(iSubIndex).iDestn); |
|
1830 tMMMessageV6->iAlphaId.iStatus = STATIC_CAST(RSat::TAlphaIdStatus,iMMSubmit->At(iSubIndex).iAlphaStatus); |
|
1831 |
|
1832 ConvertTextToTBuf254(iMMSubmit->At(iSubIndex).iAlphaIDBuf,tMMMessageV6->iAlphaId.iAlphaId); |
|
1833 |
|
1834 tMMMessageV6->iIconId.iQualifier = STATIC_CAST(RSat::TIconQualifier,iMMSubmit->At(iSubIndex).iIconID); |
|
1835 tMMMessageV6->iIconId.iIdentifier = STATIC_CAST(TUint8,iMMSubmit->At(iSubIndex).iIconIDBuf); |
|
1836 |
|
1837 ConvertTextToTBuf242(iMMSubmit->At(iSubIndex).iSbmsnFile,tMMMessageV6->iSubmissionFile); |
|
1838 ConvertTextToTBuf255(iMMSubmit->At(iSubIndex).iMsgId,tMMMessageV6->iMultimediaMessageId); |
|
1839 |
|
1840 tMMMessageV6->iTextAttribute.iStatus = STATIC_CAST(RSat::TTextAttributeStatus, iMMSubmit->At(iSubIndex).iTextAttStatus); |
|
1841 |
|
1842 ConvertTextToTBuf4(iMMSubmit->At(iSubIndex).iTextAttBuf,tMMMessageV6->iTextAttribute.iTextAttributeData); |
|
1843 |
|
1844 iNotifySubmitMM.iNotifyPending = EFalse; |
|
1845 |
|
1846 if(iSubIndex < iMMSubmit->Count()) |
|
1847 { |
|
1848 iSubTIndex = iSubIndex; |
|
1849 iSubIndex++; |
|
1850 } |
|
1851 |
|
1852 ReqCompleted(iNotifySubmitMM.iNotifyHandle, KErrNone); |
|
1853 |
|
1854 } |
|
1855 |
|
1856 if(iNotifyDisplayMM.iNotifyPending) |
|
1857 { |
|
1858 |
|
1859 RSat::TDisplayMultimediaMessageV6 *tMMMessageV6 = (RSat::TDisplayMultimediaMessageV6*)iNotifyDisplayMM.iNotifyData; |
|
1860 |
|
1861 |
|
1862 tMMMessageV6->iDestination = STATIC_CAST(RSat::TDeviceId,iMMDisplay->At(iDispIndex).iDestn); |
|
1863 tMMMessageV6->iDisplayPriority = STATIC_CAST(RSat::TDisplayPriority,iMMDisplay->At(iDispIndex).iDispPri); |
|
1864 tMMMessageV6->iClearScreenTrigger = STATIC_CAST(RSat::TClearScreenTrigger,iMMDisplay->At(iDispIndex).iClrScr); |
|
1865 |
|
1866 |
|
1867 ConvertTextToTBuf242(iMMDisplay->At(iDispIndex).iSbmsnFile,tMMMessageV6->iSubmissionFile); |
|
1868 ConvertTextToTBuf255(iMMDisplay->At(iDispIndex).iMsgId,tMMMessageV6->iMultimediaMessageId); |
|
1869 tMMMessageV6->iImmediateRsp = STATIC_CAST(RSat::TImmediateRsp,iMMDisplay->At(iDispIndex).iImmRsp); |
|
1870 |
|
1871 iNotifyDisplayMM.iNotifyPending = EFalse; |
|
1872 |
|
1873 if(iDispIndex < iMMDisplay->Count()) |
|
1874 { |
|
1875 iDispTIndex = iDispIndex; |
|
1876 iDispIndex++; |
|
1877 } |
|
1878 |
|
1879 ReqCompleted(iNotifyDisplayMM.iNotifyHandle, KErrNone); |
|
1880 |
|
1881 } |
|
1882 if(iNotifySetFrms.iNotifyPending) |
|
1883 { |
|
1884 RSat::TSetFramesV6 *tSetFramesV6 = (RSat::TSetFramesV6*)iNotifySetFrms.iNotifyData; |
|
1885 |
|
1886 tSetFramesV6->iDestination = STATIC_CAST(RSat::TDeviceId,iSetFrms->At(iSetFrmsIndex).iDestn); |
|
1887 tSetFramesV6->iFrameId = iSetFrms->At(iSetFrmsIndex).iFrmId; |
|
1888 tSetFramesV6->iFrameLayout.iFramesLayout = STATIC_CAST(RSat::TFramesLayout,iSetFrms->At(iSetFrmsIndex).iFrmLayout); |
|
1889 |
|
1890 ConvertTextToTBuf243(iSetFrms->At(iSetFrmsIndex).iFrmLayoutBuf,tSetFramesV6->iFrameLayout.iFrameLayoutBuf); |
|
1891 |
|
1892 tSetFramesV6->iDefaultFrameId = iSetFrms->At(iSetFrmsIndex).iDefFrmId; |
|
1893 tSetFramesV6->iFramesSeparator = STATIC_CAST(RSat::TFramesSeparator,iSetFrms->At(iSetFrmsIndex).iFrmSeparator); |
|
1894 |
|
1895 iNotifySetFrms.iNotifyPending = EFalse; |
|
1896 |
|
1897 if(iSetFrmsIndex < iSetFrms->Count()) |
|
1898 { |
|
1899 iSetFrmsIndex++; |
|
1900 } |
|
1901 |
|
1902 ReqCompleted(iNotifySetFrms.iNotifyHandle, KErrNone); |
|
1903 } |
|
1904 |
|
1905 if(iNotifyGetFrmsSts.iNotifyPending) |
|
1906 { |
|
1907 RSat::TGetFramesStatusV6 *tGetFramesV6 = (RSat::TGetFramesStatusV6*) iNotifyGetFrmsSts.iNotifyData; |
|
1908 |
|
1909 tGetFramesV6->iDestination = STATIC_CAST(RSat::TDeviceId,iGetFrmsSts->At(iGetFrmsStsIndex).iDestn); |
|
1910 |
|
1911 iNotifyGetFrmsSts.iNotifyPending = EFalse; |
|
1912 |
|
1913 if(iGetFrmsStsIndex < iGetFrmsSts->Count()) |
|
1914 { |
|
1915 iGetFrmsStsIndex++; |
|
1916 } |
|
1917 |
|
1918 ReqCompleted(iNotifyGetFrmsSts.iNotifyHandle,KErrNone); |
|
1919 } |
|
1920 |
|
1921 if(iNotifyLnchBrwsr.iNotifyPending) |
|
1922 { |
|
1923 RSat::TLaunchBrowserV6 *tLnchBrwsr = (RSat::TLaunchBrowserV6*)iNotifyLnchBrwsr.iNotifyData; |
|
1924 |
|
1925 tLnchBrwsr->iFrameId = iLnchBrwsr->At(iLnchBrwsrIndex).iFrameId; |
|
1926 |
|
1927 iNotifyLnchBrwsr.iNotifyPending = EFalse; |
|
1928 |
|
1929 if(iLnchBrwsrIndex < iLnchBrwsr->Count()) |
|
1930 { |
|
1931 iLnchBrwsrIndex++; |
|
1932 } |
|
1933 |
|
1934 ReqCompleted(iNotifyLnchBrwsr.iNotifyHandle,KErrNone); |
|
1935 } |
|
1936 |
|
1937 |
|
1938 if(iNotifyLocalInfo.iNotifyPending) |
|
1939 { |
|
1940 RSat::TLocalInfoV6 *tLocal = (RSat::TLocalInfoV6*)iNotifyLocalInfo.iNotifyData; |
|
1941 |
|
1942 if(iLocalInfoIndex == 2) |
|
1943 { |
|
1944 iLocalInfoIndex ++; |
|
1945 } |
|
1946 |
|
1947 tLocal->iDevideId = |
|
1948 STATIC_CAST(RSat::TDeviceId,iLocalInfo->At(iLocalInfoIndex).iDeviceId); |
|
1949 tLocal->iInfoType = |
|
1950 STATIC_CAST(RSat::TLocaInfomationType,iLocalInfo->At(iLocalInfoIndex).iLocalInfoType); |
|
1951 tLocal->iUtranMeasurementQualifier = |
|
1952 STATIC_CAST(RSat::TUtranMeasurementQualifier,iLocalInfo->At(iLocalInfoIndex).iUTRANQlfr); |
|
1953 |
|
1954 iNotifyLocalInfo.iNotifyPending = EFalse; |
|
1955 |
|
1956 if(iLocalInfoIndex< iLocalInfo->Count()) |
|
1957 { |
|
1958 iLocalInfoIndex++; |
|
1959 } |
|
1960 |
|
1961 if(iLocalInfoIndex == 1 || iLocalInfoIndex == 4 ) |
|
1962 { |
|
1963 ReqCompleted(iNotifyLocalInfo.iNotifyHandle,KErrNone); |
|
1964 } |
|
1965 if(iLocalInfoIndex == 2 || iLocalInfoIndex == 5 || iLocalInfoIndex == 6) |
|
1966 { |
|
1967 ReqCompleted(iNotifyLocalInfo.iNotifyHandle,KErrNotSupported); |
|
1968 } |
|
1969 else |
|
1970 { |
|
1971 ReqCompleted(iNotifyLocalInfo.iNotifyHandle,KErrCorrupt); |
|
1972 } |
|
1973 } |
|
1974 |
|
1975 if(iNotifyOpenChn.iNotifyPending) |
|
1976 { |
|
1977 RSat::TOpenLocalLinksChannelV5 *tOpenChannel = (RSat::TOpenLocalLinksChannelV5*) iNotifyOpenChn.iNotifyData; |
|
1978 |
|
1979 tOpenChannel->iBearer.iType = STATIC_CAST(RSat::TBearerType,iOpenChn->At(iOpenChnIndex).iBearerType); |
|
1980 |
|
1981 iNotifyOpenChn.iNotifyPending = EFalse; |
|
1982 |
|
1983 if(iOpenChnIndex < iOpenChn->Count()) |
|
1984 { |
|
1985 } |
|
1986 |
|
1987 ReqCompleted(iNotifyOpenChn.iNotifyHandle,KErrNone); |
|
1988 } |
|
1989 |
|
1990 if((iEventDnldHandle) && iEventDnldIndex <= iEventList->Count()) |
|
1991 { |
|
1992 if(iSendRspEventDnld ) |
|
1993 { |
|
1994 ReqCompleted(iEventDnldHandle,KErrNone); |
|
1995 } |
|
1996 else |
|
1997 { |
|
1998 ReqCompleted(iEventDnldHandle,KErrCorrupt); |
|
1999 } |
|
2000 } |
|
2001 |
|
2002 if(iNotifySendUssd.iNotifyPending) |
|
2003 { |
|
2004 |
|
2005 RSat::TSendUssdV6 *tSendUssd = (RSat::TSendUssdV6*)iNotifySendUssd.iNotifyData; |
|
2006 |
|
2007 tSendUssd->iTextAttribute.iStatus = STATIC_CAST(RSat::TTextAttributeStatus,iSendUssd->At(iSendUssdIndex).iTextAttStatus); |
|
2008 |
|
2009 ConvertTextToTBuf4(iSendUssd->At(iSendUssdIndex).iTextAttBuf,tSendUssd->iTextAttribute.iTextAttributeData); |
|
2010 |
|
2011 iNotifySendUssd.iNotifyPending = EFalse; |
|
2012 |
|
2013 if(iSendUssdIndex < iSendUssd->Count()) |
|
2014 { |
|
2015 iSendUssdIndex++; |
|
2016 } |
|
2017 |
|
2018 ReqCompleted(iNotifySendUssd.iNotifyHandle,KErrNone); |
|
2019 } |
|
2020 |
|
2021 if(iNotifyMiscCmd.iNotifyPending) |
|
2022 { |
|
2023 if((iPlayTone) && (iMiscCmdIndex < SIMTSY_PLAYTONE_TESTCASES_NUMBER)) |
|
2024 { |
|
2025 RSat::TPlayToneV6* tPlayTone = (RSat::TPlayToneV6*)iNotifyMiscCmd.iNotifyData; |
|
2026 |
|
2027 tPlayTone->iFrameId = iMiscCmd->At(iMiscCmdIndex).iFrameId; |
|
2028 } |
|
2029 else if((iSetupCall) && (iMiscCmdIndex < (SIMTSY_SETUPCALL_TESTCASES_NUMBER + SIMTSY_PLAYTONE_TESTCASES_NUMBER))) |
|
2030 { |
|
2031 RSat::TSetUpCallV6* tSetupCall = (RSat::TSetUpCallV6*)iNotifyMiscCmd.iNotifyData; |
|
2032 |
|
2033 tSetupCall->iFrameId = iMiscCmd->At(iMiscCmdIndex).iFrameId; |
|
2034 } |
|
2035 else if(iMiscCmdIndex < iMiscCmd->Count()) |
|
2036 { |
|
2037 RSat::TGetInkeyV6* tGetInkey = (RSat::TGetInkeyV6*)iNotifyMiscCmd.iNotifyData; |
|
2038 |
|
2039 tGetInkey->iFrameId = iMiscCmd->At(iMiscCmdIndex).iFrameId; |
|
2040 } |
|
2041 |
|
2042 iNotifyMiscCmd.iNotifyPending = EFalse; |
|
2043 |
|
2044 if(iMiscCmdIndex < iMiscCmd->Count()) |
|
2045 { |
|
2046 iMiscCmdIndex ++; |
|
2047 } |
|
2048 |
|
2049 ReqCompleted(iNotifyMiscCmd.iNotifyHandle,KErrNone); |
|
2050 } |
|
2051 |
|
2052 |
|
2053 if(iNotifySendSs.iNotifyPending) |
|
2054 { |
|
2055 RSat::TSendSsV6 *tSendSs = (RSat::TSendSsV6*)iNotifySendSs.iNotifyData; |
|
2056 tSendSs->iTextAttribute.iStatus= STATIC_CAST(RSat::TTextAttributeStatus,iSendSS->At(iSendSsIndex).iTextAttStatus); |
|
2057 |
|
2058 ConvertTextToTBuf4(iSendSS->At(iSendSsIndex).iTextAttBuf,tSendSs->iTextAttribute.iTextAttributeData); |
|
2059 |
|
2060 iNotifySendSs.iNotifyPending = EFalse; |
|
2061 |
|
2062 if(iSendSsIndex < iSendSS->Count()) |
|
2063 { |
|
2064 iSendSsIndex++; |
|
2065 } |
|
2066 |
|
2067 ReqCompleted(iNotifySendSs.iNotifyHandle,KErrNone); |
|
2068 } |
|
2069 |
|
2070 |
|
2071 if(iSatIndex < iSatInfo->Count()) |
|
2072 { |
|
2073 iTimer->Start(iSatInfo->At(iSatIndex).iDuration,this); |
|
2074 } |
|
2075 else |
|
2076 { |
|
2077 iTimer->Start(randTime(),this); |
|
2078 } |
|
2079 |
|
2080 LOGMISC1("<<CSimSat::TimerCallBack"); |
|
2081 } |
|
2082 |
|
2083 |
|
2084 const CTestConfigSection* CSimSat::CfgFile() |
|
2085 /** |
|
2086 * Returns a pointer to the current configuration file section. |
|
2087 * |
|
2088 * @return CTestConfigSection A pointer to the current configuration file section. |
|
2089 */ |
|
2090 { |
|
2091 return iPhone->CfgFile(); |
|
2092 } |
|
2093 |
|
2094 TInt CSimSat::ConvertTextToTBuf242(const TPtrC8& aText, |
|
2095 TBuf<242>& aFileList) const |
|
2096 /** |
|
2097 * Converts a text based file list (e.g. "6F3A6F3B") to a binary file list (e.g |
|
2098 * {0x6f3a, 0x6f3b}). |
|
2099 * |
|
2100 * @param aText Text string to convert. |
|
2101 * @param aFileList Returned file list. |
|
2102 * @return Error code KErrNone if request completes ok. Otherwise a relevant error |
|
2103 * code. |
|
2104 */ |
|
2105 { |
|
2106 aFileList.Zero(); |
|
2107 |
|
2108 // |
|
2109 // Go through the string and take upto 4 characters at a time. Convert each set |
|
2110 // from hexidecimal to an integer and then append them to the file list. |
|
2111 // |
|
2112 TInt position(0); |
|
2113 |
|
2114 while (position < aText.Length()) |
|
2115 { |
|
2116 TInt numberLength(4); |
|
2117 |
|
2118 if (aText.Length() - position < 4) |
|
2119 { |
|
2120 numberLength = aText.Length() - position; |
|
2121 } |
|
2122 |
|
2123 TLex8 token(aText.Mid(position, numberLength)); |
|
2124 TUint value; |
|
2125 TInt ret; |
|
2126 |
|
2127 ret = token.Val(value, EHex); |
|
2128 if (ret != KErrNone) |
|
2129 { |
|
2130 aFileList.Zero(); |
|
2131 return(ret); |
|
2132 } |
|
2133 |
|
2134 aFileList.Append(value); |
|
2135 position +=4; |
|
2136 } |
|
2137 |
|
2138 return(KErrNone); |
|
2139 } |
|
2140 |
|
2141 TInt CSimSat::ConvertTextToTBuf243(const TPtrC8& aText, |
|
2142 TBuf<243>& aFileList) const |
|
2143 /** |
|
2144 * Converts a text based file list (e.g. "6F3A6F3B") to a binary file list (e.g |
|
2145 * {0x6f3a, 0x6f3b}). |
|
2146 * |
|
2147 * @param aText Text string to convert. |
|
2148 * @param aFileList Returned file list. |
|
2149 * @return Error code KErrNone if request completes ok. Otherwise a relevant error |
|
2150 * code. |
|
2151 */ |
|
2152 { |
|
2153 aFileList.Zero(); |
|
2154 |
|
2155 // |
|
2156 // Go through the string and take upto 4 characters at a time. Convert each set |
|
2157 // from hexidecimal to an integer and then append them to the file list. |
|
2158 // |
|
2159 TInt position(0); |
|
2160 |
|
2161 while (position < aText.Length()) |
|
2162 { |
|
2163 TInt numberLength(4); |
|
2164 |
|
2165 if (aText.Length() - position < 4) |
|
2166 { |
|
2167 numberLength = aText.Length() - position; |
|
2168 } |
|
2169 |
|
2170 TLex8 token(aText.Mid(position, numberLength)); |
|
2171 TUint value; |
|
2172 TInt ret; |
|
2173 |
|
2174 ret = token.Val(value, EHex); |
|
2175 if (ret != KErrNone) |
|
2176 { |
|
2177 aFileList.Zero(); |
|
2178 return(ret); |
|
2179 } |
|
2180 |
|
2181 aFileList.Append(value); |
|
2182 position +=4; |
|
2183 } |
|
2184 |
|
2185 return(KErrNone); |
|
2186 } |
|
2187 |
|
2188 |
|
2189 TInt CSimSat::ConvertTextToTBuf254(const TPtrC8& aText, |
|
2190 TBuf<254>& aFileList) const |
|
2191 /** |
|
2192 * Converts a text based file list (e.g. "6F3A6F3B") to a binary file list (e.g |
|
2193 * {0x6f3a, 0x6f3b}). |
|
2194 * |
|
2195 * @param aText Text string to convert. |
|
2196 * @param aFileList Returned file list. |
|
2197 * @return Error code KErrNone if request completes ok. Otherwise a relevant error |
|
2198 * code. |
|
2199 */ |
|
2200 { |
|
2201 aFileList.Zero(); |
|
2202 |
|
2203 // |
|
2204 // Go through the string and take upto 4 characters at a time. Convert each set |
|
2205 // from hexidecimal to an integer and then append them to the file list. |
|
2206 // |
|
2207 TInt position(0); |
|
2208 |
|
2209 while (position < aText.Length()) |
|
2210 { |
|
2211 TInt numberLength(4); |
|
2212 |
|
2213 if (aText.Length() - position < 4) |
|
2214 { |
|
2215 numberLength = aText.Length() - position; |
|
2216 } |
|
2217 |
|
2218 TLex8 token(aText.Mid(position, numberLength)); |
|
2219 TUint value; |
|
2220 TInt ret; |
|
2221 |
|
2222 ret = token.Val(value, EHex); |
|
2223 if (ret != KErrNone) |
|
2224 { |
|
2225 aFileList.Zero(); |
|
2226 return(ret); |
|
2227 } |
|
2228 |
|
2229 aFileList.Append(value); |
|
2230 position +=4; |
|
2231 } |
|
2232 |
|
2233 return(KErrNone); |
|
2234 } |
|
2235 |
|
2236 |
|
2237 TInt CSimSat::ConvertTextToTBuf255(const TPtrC8& aText, |
|
2238 TBuf<255>& aFileList) const |
|
2239 /** |
|
2240 * Converts a text based file list (e.g. "6F3A6F3B") to a binary file list (e.g |
|
2241 * {0x6f3a, 0x6f3b}). |
|
2242 * |
|
2243 * @param aText Text string to convert. |
|
2244 * @param aFileList Returned file list. |
|
2245 * @return Error code KErrNone if request completes ok. Otherwise a relevant error |
|
2246 * code. |
|
2247 */ |
|
2248 { |
|
2249 aFileList.Zero(); |
|
2250 |
|
2251 // |
|
2252 // Go through the string and take upto 4 characters at a time. Convert each set |
|
2253 // from hexidecimal to an integer and then append them to the file list. |
|
2254 // |
|
2255 TInt position(0); |
|
2256 |
|
2257 while (position < aText.Length()) |
|
2258 { |
|
2259 TInt numberLength(4); |
|
2260 |
|
2261 if (aText.Length() - position < 4) |
|
2262 { |
|
2263 numberLength = aText.Length() - position; |
|
2264 } |
|
2265 |
|
2266 TLex8 token(aText.Mid(position, numberLength)); |
|
2267 TUint value; |
|
2268 TInt ret; |
|
2269 |
|
2270 ret = token.Val(value, EHex); |
|
2271 if (ret != KErrNone) |
|
2272 { |
|
2273 aFileList.Zero(); |
|
2274 return(ret); |
|
2275 } |
|
2276 |
|
2277 aFileList.Append(value); |
|
2278 position +=4; |
|
2279 } |
|
2280 |
|
2281 return(KErrNone); |
|
2282 } |
|
2283 |
|
2284 |
|
2285 |
|
2286 TInt CSimSat::ConvertTextToTBuf4(const TPtrC8& aText, |
|
2287 TBuf8<4>& aFileList) const |
|
2288 /** |
|
2289 * Converts a text based file list (e.g. "6F3A6F3B") to a binary file list (e.g |
|
2290 * {0x6f3a, 0x6f3b}). |
|
2291 * |
|
2292 * @param aText Text string to convert. |
|
2293 * @param aFileList Returned file list. |
|
2294 * @return Error code KErrNone if request completes ok. Otherwise a relevant error |
|
2295 * code. |
|
2296 */ |
|
2297 { |
|
2298 aFileList.Zero(); |
|
2299 |
|
2300 // |
|
2301 // Go through the string and take upto 4 characters at a time. Convert each set |
|
2302 // from hexidecimal to an integer and then append them to the file list. |
|
2303 // |
|
2304 TInt position(0); |
|
2305 |
|
2306 while (position < aText.Length()) |
|
2307 { |
|
2308 TInt numberLength(4); |
|
2309 |
|
2310 if (aText.Length() - position < 4) |
|
2311 { |
|
2312 numberLength = aText.Length() - position; |
|
2313 } |
|
2314 |
|
2315 TLex8 token(aText.Mid(position, numberLength)); |
|
2316 TUint value; |
|
2317 TInt ret; |
|
2318 |
|
2319 ret = token.Val(value, EHex); |
|
2320 if (ret != KErrNone) |
|
2321 { |
|
2322 aFileList.Zero(); |
|
2323 return(ret); |
|
2324 } |
|
2325 |
|
2326 aFileList.Append(value); |
|
2327 position +=4; |
|
2328 } |
|
2329 |
|
2330 return(KErrNone); |
|
2331 } |
|
2332 |
|
2333 TInt CSimSat::ConvertTextToTBuf16(const TPtrC8& aText, |
|
2334 TBuf8<16>& aFileList) const |
|
2335 /** |
|
2336 * |
|
2337 * @param aText Text string to convert. |
|
2338 * @param aFileList Returned file list. |
|
2339 * @return Error code KErrNone if request completes ok. Otherwise a relevant error |
|
2340 * code. |
|
2341 */ |
|
2342 { |
|
2343 aFileList.Zero(); |
|
2344 |
|
2345 // |
|
2346 // Go through the string and take upto 4 characters at a time. Convert each set |
|
2347 // from hexidecimal to an integer and then append them to the file list. |
|
2348 // |
|
2349 TInt position(0); |
|
2350 |
|
2351 while (position < aText.Length()) |
|
2352 { |
|
2353 TInt numberLength(4); |
|
2354 |
|
2355 if (aText.Length() - position < 4) |
|
2356 { |
|
2357 numberLength = aText.Length() - position; |
|
2358 } |
|
2359 |
|
2360 TLex8 token(aText.Mid(position, numberLength)); |
|
2361 TUint value; |
|
2362 TInt ret; |
|
2363 |
|
2364 ret = token.Val(value, EHex); |
|
2365 if (ret != KErrNone) |
|
2366 { |
|
2367 aFileList.Zero(); |
|
2368 return(ret); |
|
2369 } |
|
2370 |
|
2371 aFileList.Append(value); |
|
2372 position +=4; |
|
2373 } |
|
2374 |
|
2375 return(KErrNone); |
|
2376 } |
|
2377 |
|
2378 |
|
2379 /* Function that generates time(in seconds) at random for the SimTSY |
|
2380 * Maximum of ten seconds; zero seconds also included just to simulate the |
|
2381 * synchronous call scenario |
|
2382 */ |
|
2383 |
|
2384 TInt CSimSat::randTime() |
|
2385 { |
|
2386 TInt ranT= Math::Random()%10; |
|
2387 return(ranT); |
|
2388 } |
|
2389 |
|
2390 |
|
2391 TInt CSimSat::RetrieveMultimediaRsp(const TTsyReqHandle aTsyReqHandle, TDes8* aRsp) |
|
2392 { |
|
2393 |
|
2394 RSat::TRetrieveMultimediaMessageRspV6Pckg *tMMRetRspV6Pckg = (RSat::TRetrieveMultimediaMessageRspV6Pckg*)aRsp; |
|
2395 RSat::TRetrieveMultimediaMessageRspV6& tMMRetRspV6 = (*tMMRetRspV6Pckg)(); |
|
2396 |
|
2397 if(iRetTIndex == 0 || iRetTIndex ==3 || ((iRetTIndex >=5) && (iRetTIndex <=7))) |
|
2398 { |
|
2399 if((tMMRetRspV6.iGeneralResult != RSat::KSuccess) || |
|
2400 (tMMRetRspV6.iInfoType != RSat::KNoAdditionalInfo)) |
|
2401 { |
|
2402 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2403 } |
|
2404 else |
|
2405 { |
|
2406 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2407 } |
|
2408 } |
|
2409 else if(iRetTIndex ==1 || iRetTIndex == 2) |
|
2410 { |
|
2411 if((tMMRetRspV6.iGeneralResult != RSat::KMMSTemporaryProblem) || |
|
2412 (tMMRetRspV6.iInfoType != RSat::KMeProblem) || |
|
2413 (tMMRetRspV6.iAdditionalInfo.Compare(SIMTSY_MMMESSAGE_ADD_INFO_1) != 0)) |
|
2414 { |
|
2415 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2416 } |
|
2417 else |
|
2418 { |
|
2419 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2420 } |
|
2421 } |
|
2422 else if(iRetTIndex ==4) |
|
2423 { |
|
2424 if((tMMRetRspV6.iGeneralResult != RSat::KMMSError) || |
|
2425 (tMMRetRspV6.iInfoType != RSat::KMeProblem) || |
|
2426 (tMMRetRspV6.iAdditionalInfo.Compare(SIMTSY_MMMESSAGE_ADD_INFO_1) != 0)) |
|
2427 { |
|
2428 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2429 } |
|
2430 else |
|
2431 { |
|
2432 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2433 } |
|
2434 } |
|
2435 else |
|
2436 { |
|
2437 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2438 } |
|
2439 |
|
2440 |
|
2441 iPendingTerRsp = EFalse; |
|
2442 return KErrNone; |
|
2443 |
|
2444 } |
|
2445 |
|
2446 TInt CSimSat::SubmitMultimediaRsp(const TTsyReqHandle aTsyReqHandle, TDes8* aRsp) |
|
2447 { |
|
2448 |
|
2449 RSat::TSubmitMultimediaMessageRspV6Pckg *tMMSubRspV6Pckg= (RSat::TSubmitMultimediaMessageRspV6Pckg*)aRsp; |
|
2450 RSat::TSubmitMultimediaMessageRspV6& tMMSubRspV6 = (*tMMSubRspV6Pckg)(); |
|
2451 |
|
2452 if(iSubTIndex == 0 || iSubTIndex ==3 || iSubTIndex ==5 || iSubTIndex ==6) |
|
2453 { |
|
2454 if((tMMSubRspV6.iGeneralResult != RSat::KSuccess) || |
|
2455 (tMMSubRspV6.iInfoType != RSat::KNoAdditionalInfo)) |
|
2456 { |
|
2457 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2458 } |
|
2459 else |
|
2460 { |
|
2461 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2462 } |
|
2463 } |
|
2464 else if(iSubTIndex ==1 || iSubTIndex ==2) |
|
2465 { |
|
2466 if((tMMSubRspV6.iGeneralResult != RSat::KMMSTemporaryProblem) || |
|
2467 (tMMSubRspV6.iInfoType != RSat::KMeProblem) || |
|
2468 (tMMSubRspV6.iAdditionalInfo.Compare(SIMTSY_MMMESSAGE_ADD_INFO_1) != 0)) |
|
2469 { |
|
2470 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2471 } |
|
2472 else |
|
2473 { |
|
2474 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2475 } |
|
2476 } |
|
2477 else if(iSubTIndex ==4) |
|
2478 { |
|
2479 if((tMMSubRspV6.iGeneralResult != RSat::KMMSError) || |
|
2480 (tMMSubRspV6.iInfoType != RSat::KMeProblem) || |
|
2481 (tMMSubRspV6.iAdditionalInfo.Compare(SIMTSY_MMMESSAGE_ADD_INFO_1) != 0)) |
|
2482 { |
|
2483 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2484 } |
|
2485 else |
|
2486 { |
|
2487 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2488 } |
|
2489 } |
|
2490 else |
|
2491 { |
|
2492 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2493 } |
|
2494 |
|
2495 iPendingTerRsp = EFalse; |
|
2496 return KErrNone; |
|
2497 |
|
2498 } |
|
2499 |
|
2500 TInt CSimSat::DisplayMultimediaRsp(const TTsyReqHandle aTsyReqHandle, TDes8* aRsp) |
|
2501 { |
|
2502 |
|
2503 RSat::TDisplayMultimediaMessageRspV6Pckg *tMMDispRspV6Pckg= (RSat::TDisplayMultimediaMessageRspV6Pckg*)aRsp; |
|
2504 RSat::TDisplayMultimediaMessageRspV6& tMMDispRspV6 = (*tMMDispRspV6Pckg)(); |
|
2505 |
|
2506 if(iDispTIndex == 0 || iDispTIndex == 1 || iDispTIndex == 6 || |
|
2507 ((iDispTIndex >=8) && (iDispTIndex <=10)) || iDispTIndex == 12) |
|
2508 { |
|
2509 if((tMMDispRspV6.iGeneralResult != RSat::KSuccess) || |
|
2510 (tMMDispRspV6.iInfoType != RSat::KNoAdditionalInfo)) |
|
2511 { |
|
2512 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2513 } |
|
2514 else |
|
2515 { |
|
2516 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2517 } |
|
2518 } |
|
2519 else if (iDispTIndex ==2) |
|
2520 { |
|
2521 if((tMMDispRspV6.iGeneralResult != RSat::KPSessionTerminatedByUser) || |
|
2522 (tMMDispRspV6.iInfoType != RSat::KNoAdditionalInfo)) |
|
2523 { |
|
2524 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2525 } |
|
2526 else |
|
2527 { |
|
2528 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2529 } |
|
2530 } |
|
2531 else if (iDispTIndex ==3) |
|
2532 { |
|
2533 if((tMMDispRspV6.iGeneralResult != RSat::KBackwardModeRequestedByUser) || |
|
2534 (tMMDispRspV6.iInfoType != RSat::KNoAdditionalInfo)) |
|
2535 { |
|
2536 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2537 } |
|
2538 else |
|
2539 { |
|
2540 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2541 } |
|
2542 } |
|
2543 else if (iDispTIndex ==4) |
|
2544 { |
|
2545 if((tMMDispRspV6.iGeneralResult != RSat::KNoResponseFromUser) || |
|
2546 (tMMDispRspV6.iInfoType != RSat::KNoAdditionalInfo)) |
|
2547 { |
|
2548 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2549 } |
|
2550 else |
|
2551 { |
|
2552 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2553 } |
|
2554 } |
|
2555 else if (iDispTIndex ==5) |
|
2556 { |
|
2557 if((tMMDispRspV6.iGeneralResult != RSat::KMMSError) || |
|
2558 (tMMDispRspV6.iInfoType != RSat::KMeProblem) || |
|
2559 (tMMDispRspV6.iAdditionalInfo.Compare(SIMTSY_MMMESSAGE_ADD_INFO_1) != 0)) |
|
2560 { |
|
2561 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2562 } |
|
2563 else |
|
2564 { |
|
2565 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2566 } |
|
2567 } |
|
2568 else if (iDispTIndex == 7 || iDispTIndex == 11 || iDispTIndex ==13) |
|
2569 { |
|
2570 if((tMMDispRspV6.iGeneralResult != RSat::KMeUnableToProcessCmd) || |
|
2571 (tMMDispRspV6.iInfoType != RSat::KMeProblem) || |
|
2572 (tMMDispRspV6.iAdditionalInfo.Compare(SIMTSY_MMMESSAGE_ADD_INFO_2) != 0)) |
|
2573 { |
|
2574 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2575 } |
|
2576 else |
|
2577 { |
|
2578 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2579 } |
|
2580 } |
|
2581 else |
|
2582 { |
|
2583 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2584 } |
|
2585 |
|
2586 iPendingTerRsp = EFalse; |
|
2587 return KErrNone; |
|
2588 |
|
2589 } |
|
2590 |
|
2591 TInt CSimSat::SetFramesRsp(const TTsyReqHandle aTsyReqHandle, TDes8* aRsp) |
|
2592 { |
|
2593 |
|
2594 RSat::TSetFramesRspV6Pckg *tSetFramesV6Pckg= (RSat::TSetFramesRspV6Pckg*)aRsp; |
|
2595 RSat::TSetFramesRspV6& tSetFramesRspV6 = (*tSetFramesV6Pckg)(); |
|
2596 |
|
2597 if(iSetFrmsIndex == 1) |
|
2598 { |
|
2599 if((tSetFramesRspV6.iGeneralResult != RSat::KSuccess) || |
|
2600 (tSetFramesRspV6.iInfoType != RSat::KNoAdditionalInfo)) |
|
2601 { |
|
2602 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2603 } |
|
2604 else |
|
2605 { |
|
2606 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2607 } |
|
2608 } |
|
2609 else if (iSetFrmsIndex ==2) |
|
2610 { |
|
2611 if((tSetFramesRspV6.iGeneralResult != RSat::KFramesError) || |
|
2612 (tSetFramesRspV6.iInfoType != RSat::KMeProblem) || |
|
2613 (tSetFramesRspV6.iAdditionalInfo.Compare(SIMTSY_SET_FRMS_ADD_INFO_1) != 0)) |
|
2614 { |
|
2615 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2616 } |
|
2617 else |
|
2618 { |
|
2619 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2620 } |
|
2621 } |
|
2622 else if (iSetFrmsIndex ==3) |
|
2623 { |
|
2624 if((tSetFramesRspV6.iGeneralResult != RSat::KFramesError) || |
|
2625 (tSetFramesRspV6.iInfoType != RSat::KMeProblem) || |
|
2626 (tSetFramesRspV6.iAdditionalInfo.Compare(SIMTSY_SET_FRMS_ADD_INFO_2) != 0)) |
|
2627 { |
|
2628 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2629 } |
|
2630 else |
|
2631 { |
|
2632 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2633 } |
|
2634 } |
|
2635 else |
|
2636 { |
|
2637 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2638 } |
|
2639 |
|
2640 iPendingTerRsp = EFalse; |
|
2641 return KErrNone; |
|
2642 } |
|
2643 |
|
2644 TInt CSimSat::ProvideLocalInfoRsp(const TTsyReqHandle aTsyReqHandle, TDes8* aRsp) |
|
2645 { |
|
2646 |
|
2647 RSat::TLocalInfoRspV3Pckg *tLocalInfoV3Pckg = (RSat::TLocalInfoRspV3Pckg*)aRsp; |
|
2648 RSat::TLocalInfoRspV3& tLocalInfoV3 = (*tLocalInfoV3Pckg)(); |
|
2649 |
|
2650 if((iLocalInfoIndex==1 || iLocalInfoIndex ==4) && |
|
2651 ((tLocalInfoV3.iGeneralResult != RSat::KSuccess) || |
|
2652 (tLocalInfoV3.iInfoType != RSat::KNoAdditionalInfo))) |
|
2653 { |
|
2654 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2655 } |
|
2656 else if((iLocalInfoIndex==2) && ((tLocalInfoV3.iGeneralResult != RSat::KMeUnableToProcessCmd) || |
|
2657 (tLocalInfoV3.iInfoType != RSat::KMeProblem) || |
|
2658 (tLocalInfoV3.iAdditionalInfo.Compare(SIMTSY_PRV_LCLINFO_ADD_INFO_1) != 0))) |
|
2659 { |
|
2660 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2661 } |
|
2662 else if((iLocalInfoIndex ==5) && ((tLocalInfoV3.iGeneralResult !=RSat::KSuccessLimitedService) || |
|
2663 (tLocalInfoV3.iInfoType != RSat::KNoAdditionalInfo))) |
|
2664 { |
|
2665 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2666 } |
|
2667 else if((iLocalInfoIndex == 6) && ((tLocalInfoV3.iGeneralResult !=RSat::KMeUnableToProcessCmd) || |
|
2668 (tLocalInfoV3.iInfoType != RSat::KNoAdditionalInfo))) |
|
2669 { |
|
2670 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2671 } |
|
2672 else |
|
2673 { |
|
2674 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2675 } |
|
2676 |
|
2677 return KErrNone; |
|
2678 } |
|
2679 |
|
2680 TInt CSimSat::OpenChannelRsp(const TTsyReqHandle aTsyReqHandle, TDes8* aRsp) |
|
2681 { |
|
2682 |
|
2683 RSat::TOpenChannelRspV2Pckg *tOpenChnRspPckg = (RSat::TOpenChannelRspV2Pckg*)aRsp; |
|
2684 RSat::TOpenChannelRspV2 &tOpenChnRsp = (*tOpenChnRspPckg)(); |
|
2685 |
|
2686 if((iOpenChnIndex == 1) && ((tOpenChnRsp.iGeneralResult != RSat::KSuccess) || |
|
2687 (tOpenChnRsp.iInfoType != RSat::KNoAdditionalInfo))) |
|
2688 { |
|
2689 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2690 } |
|
2691 else if((iOpenChnIndex ==2) && ((tOpenChnRsp.iGeneralResult != RSat::KNetworkUnableToProcessCmd) || |
|
2692 (tOpenChnRsp.iInfoType != RSat::KMeProblem) || |
|
2693 (tOpenChnRsp.iAdditionalInfo.Compare(SIMTSY_MMMESSAGE_ADD_INFO_1) != 0))) |
|
2694 { |
|
2695 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2696 } |
|
2697 else if((iOpenChnIndex == 3) && ((tOpenChnRsp.iGeneralResult != RSat::KPerformedWithModifications) || |
|
2698 (tOpenChnRsp.iInfoType != RSat::KNoAdditionalInfo))) |
|
2699 { |
|
2700 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2701 } |
|
2702 else |
|
2703 { |
|
2704 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2705 } |
|
2706 |
|
2707 return KErrNone; |
|
2708 } |
|
2709 |
|
2710 TInt CSimSat::PlayToneRsp(const TTsyReqHandle aTsyReqHandle, TDes8* aRsp) |
|
2711 { |
|
2712 |
|
2713 RSat::TPlayToneRspV1Pckg *tPlayToneRspPckg = (RSat::TPlayToneRspV1Pckg *)aRsp; |
|
2714 RSat::TPlayToneRspV1& tPlayToneRsp = (*tPlayToneRspPckg)(); |
|
2715 |
|
2716 if((iMiscCmdIndex == 1) && ((tPlayToneRsp.iGeneralResult != RSat::KPlayTonePerformedSuccessfully) || |
|
2717 (tPlayToneRsp.iInfoType != RSat::KNoAdditionalInfo))) |
|
2718 { |
|
2719 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2720 } |
|
2721 else if((iMiscCmdIndex == 2) && ((tPlayToneRsp.iGeneralResult != RSat::KPSessionTerminatedByUser) || |
|
2722 (tPlayToneRsp.iInfoType != RSat::KNoAdditionalInfo))) |
|
2723 { |
|
2724 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2725 } |
|
2726 else if((iMiscCmdIndex == 3) && ((tPlayToneRsp.iGeneralResult != RSat::KCmdBeyondMeCapabilities) || |
|
2727 (tPlayToneRsp.iInfoType != RSat::KNoAdditionalInfo))) |
|
2728 { |
|
2729 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2730 } |
|
2731 else |
|
2732 { |
|
2733 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2734 } |
|
2735 return KErrNone; |
|
2736 } |
|
2737 |
|
2738 TInt CSimSat::SetupCallRsp(const TTsyReqHandle aTsyReqHandle, TDes8* aRsp) |
|
2739 { |
|
2740 |
|
2741 RSat::TSetUpCallRspV2Pckg *tSetupCallRspPckg = (RSat::TSetUpCallRspV2Pckg*)aRsp; |
|
2742 RSat::TSetUpCallRspV2& tSetupCallRsp = (*tSetupCallRspPckg)(); |
|
2743 |
|
2744 if((iMiscCmdIndex == 5) && ((tSetupCallRsp.iGeneralResult != RSat::KSuccess) || |
|
2745 (tSetupCallRsp.iInfoType != RSat::KNoAdditionalInfo))) |
|
2746 { |
|
2747 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2748 } |
|
2749 else if((iMiscCmdIndex == 6) && ((tSetupCallRsp.iGeneralResult != RSat::KCmdBeyondMeCapabilities) || |
|
2750 (tSetupCallRsp.iInfoType != RSat::KNoAdditionalInfo))) |
|
2751 { |
|
2752 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2753 } |
|
2754 else if((iMiscCmdIndex == 7) && ((tSetupCallRsp.iGeneralResult != RSat::KMeUnableToProcessCmd) || |
|
2755 (tSetupCallRsp.iInfoType != RSat::KMeProblem) || |
|
2756 (tSetupCallRsp.iAdditionalInfo.Compare(SIMTSY_SETUPCALL_ADD_INFO_1) != 0))) |
|
2757 { |
|
2758 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2759 } |
|
2760 else if((iMiscCmdIndex == 8) && ((tSetupCallRsp.iGeneralResult != RSat::KNetworkUnableToProcessCmd) || |
|
2761 (tSetupCallRsp.iInfoType != RSat::KMeProblem) || |
|
2762 (tSetupCallRsp.iAdditionalInfo.Compare(SIMTSY_SETUPCALL_ADD_INFO_1) != 0))) |
|
2763 { |
|
2764 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2765 } |
|
2766 else |
|
2767 { |
|
2768 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2769 } |
|
2770 |
|
2771 return KErrNone; |
|
2772 } |
|
2773 |
|
2774 TInt CSimSat::RefreshRsp(const TTsyReqHandle aTsyReqHandle, TDes8* aRsp) |
|
2775 { |
|
2776 RSat::TRefreshRspV1Pckg *tRefRspPckg = (RSat::TRefreshRspV1Pckg*)aRsp; |
|
2777 RSat::TRefreshRspV1& tRefRsp = (*tRefRspPckg)(); |
|
2778 |
|
2779 if((iRefreshIndex ==1) && ((tRefRsp.iGeneralResult != RSat::KSuccess) || |
|
2780 (tRefRsp.iInfoType != RSat::KNoAdditionalInfo))) |
|
2781 { |
|
2782 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2783 } |
|
2784 else if((iRefreshIndex ==2) && ((tRefRsp.iGeneralResult != RSat::KMeUnableToProcessCmd) || |
|
2785 (tRefRsp.iInfoType != RSat::KNoAdditionalInfo))) |
|
2786 { |
|
2787 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2788 } |
|
2789 else |
|
2790 { |
|
2791 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2792 } |
|
2793 |
|
2794 return KErrNone; |
|
2795 } |
|
2796 |
|
2797 TInt CSimSat::GetFramesStatusRsp(const TTsyReqHandle aTsyReqHandle, TDes8* aRsp) |
|
2798 { |
|
2799 |
|
2800 RSat::TGetFramesStatusRspV6Pckg *tGetFramesStsV6Pckg= (RSat::TGetFramesStatusRspV6Pckg*)aRsp; |
|
2801 RSat::TGetFramesStatusRspV6& tGetFramesStsV6 = (*tGetFramesStsV6Pckg)(); |
|
2802 |
|
2803 TInt iGetFrmsStsLocalIndex =0 ; |
|
2804 |
|
2805 if((iGetFrmsStsIndex == 1) && ((tGetFramesStsV6.iGeneralResult != RSat::KSuccess) || |
|
2806 (tGetFramesStsV6.iInfoType != RSat::KNoAdditionalInfo) || |
|
2807 (tGetFramesStsV6.iFramesInformation.iFrameId != iGetFrmsSts->At(iGetFrmsStsLocalIndex).iFrmId ) || |
|
2808 (tGetFramesStsV6.iFramesInformation.iFrameList.Compare(iGetFrmsSts->At(iGetFrmsStsLocalIndex).iFrmList)))) |
|
2809 { |
|
2810 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2811 } |
|
2812 else if((iGetFrmsStsIndex == 2) && ((tGetFramesStsV6.iGeneralResult != RSat::KFramesError) || |
|
2813 (tGetFramesStsV6.iInfoType != RSat::KNoFrameIdentified) || |
|
2814 (tGetFramesStsV6.iFramesInformation.iFrameId != iGetFrmsSts->At(iGetFrmsStsLocalIndex).iFrmId ) || |
|
2815 (tGetFramesStsV6.iFramesInformation.iFrameList.Compare(iGetFrmsSts->At(iGetFrmsStsLocalIndex).iFrmList)))) |
|
2816 { |
|
2817 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2818 } |
|
2819 else |
|
2820 { |
|
2821 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2822 } |
|
2823 |
|
2824 iGetFrmsStsLocalIndex++; |
|
2825 iSendRspEventDnld = ETrue; |
|
2826 return KErrNone; |
|
2827 } |
|
2828 |
|
2829 TInt CSimSat::SendUssdRsp(const TTsyReqHandle aTsyReqHandle, TDes8* aRsp) |
|
2830 { |
|
2831 |
|
2832 RSat::TSendUssdRspV1Pckg *tSendUssdRspPckg= (RSat::TSendUssdRspV1Pckg*)aRsp; |
|
2833 RSat::TSendUssdRspV1& tSendUssdRsp = (*tSendUssdRspPckg)(); |
|
2834 |
|
2835 if((iSendUssdIndex ==1) && ((tSendUssdRsp.iGeneralResult != RSat::KSuccess) || |
|
2836 (tSendUssdRsp.iInfoType != RSat::KNoAdditionalInfo))) |
|
2837 { |
|
2838 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2839 } |
|
2840 else if((iSendUssdIndex == 2) && ((tSendUssdRsp.iGeneralResult != RSat::KMeUnableToProcessCmd) || |
|
2841 (tSendUssdRsp.iInfoType != RSat::KMeProblem) || |
|
2842 (tSendUssdRsp.iAdditionalInfo.Compare(SIMTSY_SEND_USSD_ADD_INFO) != 0))) |
|
2843 { |
|
2844 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2845 } |
|
2846 else if((iSendUssdIndex == 3) && ((tSendUssdRsp.iGeneralResult != RSat::KMeUnableToProcessCmd) || |
|
2847 (tSendUssdRsp.iInfoType != RSat::KMeProblem) || |
|
2848 (tSendUssdRsp.iAdditionalInfo.Compare(SIMTSY_SEND_USSD_ADD_INFO_1) != 0))) |
|
2849 { |
|
2850 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2851 } |
|
2852 else |
|
2853 { |
|
2854 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2855 } |
|
2856 |
|
2857 return KErrNone; |
|
2858 } |
|
2859 |
|
2860 TInt CSimSat::LaunchBrowserRsp(const TTsyReqHandle aTsyReqHandle,TDes8* aRsp) |
|
2861 { |
|
2862 RSat::TLaunchBrowserRspV2Pckg* tLBRspPckg= (RSat::TLaunchBrowserRspV2Pckg*)aRsp; |
|
2863 RSat::TLaunchBrowserRspV2& tLBRsp =(*tLBRspPckg)(); |
|
2864 |
|
2865 if((iLnchBrwsrIndex == 1) && ((tLBRsp.iGeneralResult != (iLnchBrwsr->At(iLnchBrwsrIndex-1).iTerRsp)) || |
|
2866 (tLBRsp.iInfoType != RSat::KNoAdditionalInfo))) |
|
2867 { |
|
2868 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2869 } |
|
2870 else if((iLnchBrwsrIndex == 2) && ((tLBRsp.iGeneralResult != (iLnchBrwsr->At(iLnchBrwsrIndex-1).iTerRsp)) || |
|
2871 (tLBRsp.iInfoType != RSat::KMeProblem) || |
|
2872 (tLBRsp.iAdditionalInfo.Compare(SIMTSY_LNCH_BRWSR_ADD_INFO1) != 0))) |
|
2873 { |
|
2874 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2875 } |
|
2876 else if((iLnchBrwsrIndex == 3) && ((tLBRsp.iGeneralResult != (iLnchBrwsr->At(iLnchBrwsrIndex-1).iTerRsp)) || |
|
2877 (tLBRsp.iInfoType != RSat::KMeProblem) || |
|
2878 (tLBRsp.iAdditionalInfo.Compare(SIMTSY_LNCH_BRWSR_ADD_INFO2) != 0))) |
|
2879 { |
|
2880 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2881 } |
|
2882 else if((iLnchBrwsrIndex == 4) && ((tLBRsp.iGeneralResult != (iLnchBrwsr->At(iLnchBrwsrIndex-1).iTerRsp)) || |
|
2883 (tLBRsp.iInfoType != RSat::KMeProblem) || |
|
2884 (tLBRsp.iAdditionalInfo.Compare(SIMTSY_LNCH_BRWSR_ADD_INFO3) != 0))) |
|
2885 { |
|
2886 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2887 } |
|
2888 else if((iLnchBrwsrIndex == 5) && ((tLBRsp.iGeneralResult != (iLnchBrwsr->At(iLnchBrwsrIndex-1).iTerRsp)) || |
|
2889 (tLBRsp.iInfoType != RSat::KMeProblem) || |
|
2890 (tLBRsp.iAdditionalInfo.Compare(SIMTSY_LNCH_BRWSR_ADD_INFO4) != 0))) |
|
2891 { |
|
2892 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2893 } |
|
2894 else |
|
2895 { |
|
2896 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2897 } |
|
2898 return KErrNone; |
|
2899 } |
|
2900 |
|
2901 TInt CSimSat::GetInkeyRsp(const TTsyReqHandle aTsyReqHandle, TDes8* aRsp) |
|
2902 { |
|
2903 |
|
2904 RSat::TGetInkeyRspV2Pckg *tGetInkeyRspPckg= (RSat::TGetInkeyRspV2Pckg*)aRsp; |
|
2905 RSat::TGetInkeyRspV2& tGetInkeyRsp = (*tGetInkeyRspPckg)(); |
|
2906 |
|
2907 if((tGetInkeyRsp.iGeneralResult != RSat::KSuccess) || |
|
2908 (tGetInkeyRsp.iInfoType != RSat::KNoAdditionalInfo)) |
|
2909 { |
|
2910 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2911 } |
|
2912 else |
|
2913 { |
|
2914 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2915 } |
|
2916 |
|
2917 return KErrNone; |
|
2918 } |
|
2919 |
|
2920 TInt CSimSat::GetMeSideSatProfile(const TTsyReqHandle aTsyReqHandle, TDes8* aMeSimSatProfile) |
|
2921 { |
|
2922 RSat::TSatProfileV6Pckg* profileV6Pckg = (RSat::TSatProfileV6Pckg*)aMeSimSatProfile; |
|
2923 RSat::TSatProfileV6& profileV6 = (*profileV6Pckg)(); |
|
2924 |
|
2925 profileV6.iSatProfileByte22 = RSat::KCapsRetrieveMultimediaMessage | RSat::KCapsSubmitMultimediaMessage; |
|
2926 |
|
2927 profileV6.iSatProfileByte23 = RSat::KCapsMmsNotificationDownload; |
|
2928 |
|
2929 |
|
2930 if(iLocalInfoIndex !=1) |
|
2931 { |
|
2932 profileV6.iSatProfileByte18 = RSat::KCapsProvideLocalInfoIMEISV | |
|
2933 RSat::KCapsProvideLocalInfoSearchModeChange; |
|
2934 if(iLocalInfoIndex == 3 ) |
|
2935 { |
|
2936 profileV6.iSatProfileByte22 |= RSat::KCapsProvideLocalInfoUTRAN | |
|
2937 RSat::KCapsProvideLocalInfoBatteryState; |
|
2938 } |
|
2939 else |
|
2940 { |
|
2941 profileV6.iSatProfileByte22 |= RSat::KCapsProvideLocalInfoBatteryState; |
|
2942 } |
|
2943 profileV6.iSatProfileByte23 |= RSat::KCapsProvideLocalInfoMEID; |
|
2944 } |
|
2945 profileV6.iSatProfileByte25 = RSat::KCapsMmsTransferStatusEvent; |
|
2946 |
|
2947 if(iMiscCmdIndex == 0 || iMiscCmdIndex == 5 || iMiscCmdIndex == 10) |
|
2948 { |
|
2949 profileV6.iSatProfileByte22 |= (RSat::KCapsPlayThemedAndMelodyTone |
|
2950 | RSat::KCapsSetUpCallMultimediaCall | RSat::KCapsRefreshGBA ); |
|
2951 } |
|
2952 |
|
2953 profileV6.iSatProfileByte6 = RSat::KCapsNetworkSearchModeChangeEvent; |
|
2954 profileV6.iSatProfileByte25 |= (RSat::KCapsFrameParametersChangeEvent | |
|
2955 RSat::KCapsBrowsingStatusEvent); |
|
2956 |
|
2957 profileV6.iSatProfileByte4 = RSat::KCapsSendUSSD; |
|
2958 |
|
2959 // The UICC is set to support the USSD Data Download by default to remove any dependencies on the test code |
|
2960 // If clients find it useful to be able to set this capability on demand, this should be made updatable |
|
2961 // via the config file |
|
2962 profileV6.iSatProfileByte23 |= RSat::KCapsUssdDataDownload; |
|
2963 |
|
2964 if(iLnchBrwsrIndex != 1) |
|
2965 { |
|
2966 profileV6.iSatProfileByte21 = RSat::KCapsXHTML; |
|
2967 } |
|
2968 |
|
2969 iGetMeSideProfileHandle = aTsyReqHandle; |
|
2970 ReqCompleted(aTsyReqHandle,KErrNone); |
|
2971 |
|
2972 return KErrNone; |
|
2973 } |
|
2974 |
|
2975 TInt CSimSat::GetMeSideSatProfileCancel(const TTsyReqHandle aTsyReqHandle) |
|
2976 { |
|
2977 if(aTsyReqHandle == iGetMeSideProfileHandle) |
|
2978 { |
|
2979 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
2980 } |
|
2981 else |
|
2982 { |
|
2983 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2984 } |
|
2985 return KErrNone; |
|
2986 } |
|
2987 |
|
2988 TInt CSimSat::ClientSatProfileIndication(const TTsyReqHandle aTsyReqHandle, TDes8* aClientSatProfile) |
|
2989 { |
|
2990 RSat::TSatProfileV6Pckg* aClientSatProfilePckg = (RSat::TSatProfileV6Pckg*)aClientSatProfile; |
|
2991 RSat::TSatProfileV6& satProfV6 = (*aClientSatProfilePckg)(); |
|
2992 |
|
2993 if(iRetTIndex ==6 || iRetTIndex ==7) |
|
2994 { |
|
2995 if(!(satProfV6.iSatProfileByte22 & (RSat::KCapsRetrieveMultimediaMessage)) |
|
2996 || !(satProfV6.iSatProfileByte25 & (RSat::KCapsMmsTransferStatusEvent))) |
|
2997 { |
|
2998 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
2999 } |
|
3000 else |
|
3001 { |
|
3002 ReqCompleted(aTsyReqHandle,KErrNone); |
|
3003 } |
|
3004 } |
|
3005 |
|
3006 else if(iSubTIndex == 5 || iSubTIndex ==6) |
|
3007 { |
|
3008 if(!(satProfV6.iSatProfileByte22 & (RSat::KCapsSubmitMultimediaMessage)) |
|
3009 || !(satProfV6.iSatProfileByte25 & (RSat::KCapsMmsTransferStatusEvent))) |
|
3010 { |
|
3011 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
3012 } |
|
3013 else |
|
3014 { |
|
3015 ReqCompleted(aTsyReqHandle,KErrNone); |
|
3016 } |
|
3017 } |
|
3018 |
|
3019 else if(iLocalInfoIndex == 0) |
|
3020 { |
|
3021 if(!(((satProfV6.iSatProfileByte18&RSat::KCapsProvideLocalInfoIMEISV)&& |
|
3022 (satProfV6.iSatProfileByte18&RSat::KCapsProvideLocalInfoSearchModeChange)) || |
|
3023 (satProfV6.iSatProfileByte22&RSat::KCapsProvideLocalInfoBatteryState) || |
|
3024 (satProfV6.iSatProfileByte23&RSat::KCapsProvideLocalInfoMEID))) |
|
3025 { |
|
3026 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
3027 } |
|
3028 else |
|
3029 { |
|
3030 ReqCompleted(aTsyReqHandle,KErrNone); |
|
3031 } |
|
3032 } |
|
3033 else if(iLocalInfoIndex == 1) |
|
3034 { |
|
3035 if(((satProfV6.iSatProfileByte18&RSat::KCapsProvideLocalInfoIMEISV)&& |
|
3036 (satProfV6.iSatProfileByte18&RSat::KCapsProvideLocalInfoSearchModeChange)) || |
|
3037 (satProfV6.iSatProfileByte22&RSat::KCapsProvideLocalInfoBatteryState) || |
|
3038 (satProfV6.iSatProfileByte23&RSat::KCapsProvideLocalInfoMEID)) |
|
3039 { |
|
3040 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
3041 } |
|
3042 else |
|
3043 { |
|
3044 ReqCompleted(aTsyReqHandle,KErrNone); |
|
3045 } |
|
3046 } |
|
3047 else if(iLocalInfoIndex == 3) |
|
3048 { |
|
3049 if(!(((satProfV6.iSatProfileByte18&RSat::KCapsProvideLocalInfoIMEISV)&& |
|
3050 (satProfV6.iSatProfileByte18&RSat::KCapsProvideLocalInfoSearchModeChange)) || |
|
3051 ((satProfV6.iSatProfileByte22&RSat::KCapsProvideLocalInfoUTRAN)&& |
|
3052 (satProfV6.iSatProfileByte22&RSat::KCapsProvideLocalInfoBatteryState)) || |
|
3053 (satProfV6.iSatProfileByte23&RSat::KCapsProvideLocalInfoMEID))) |
|
3054 { |
|
3055 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
3056 } |
|
3057 else |
|
3058 { |
|
3059 ReqCompleted(aTsyReqHandle,KErrNone); |
|
3060 } |
|
3061 } |
|
3062 else if(iMiscCmdIndex == 0 || iMiscCmdIndex == 5 || iMiscCmdIndex == 10) |
|
3063 { |
|
3064 if(!(satProfV6.iSatProfileByte22 & RSat::KCapsPlayThemedAndMelodyTone) || |
|
3065 !(satProfV6.iSatProfileByte22 & RSat::KCapsSetUpCallMultimediaCall) || |
|
3066 !(satProfV6.iSatProfileByte22 & RSat::KCapsRefreshGBA) ) |
|
3067 { |
|
3068 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
3069 } |
|
3070 else |
|
3071 { |
|
3072 ReqCompleted(aTsyReqHandle,KErrNone); |
|
3073 } |
|
3074 } |
|
3075 else if(iEventDnldIndex == 0) |
|
3076 { |
|
3077 if(!(satProfV6.iSatProfileByte6 & (RSat::KCapsNetworkSearchModeChangeEvent))) |
|
3078 { |
|
3079 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
3080 } |
|
3081 else |
|
3082 { |
|
3083 ReqCompleted(aTsyReqHandle,KErrNone); |
|
3084 } |
|
3085 } |
|
3086 else if(iLnchBrwsrIndex == 1) |
|
3087 { |
|
3088 if(!(satProfV6.iSatProfileByte21 & (RSat::KCapsXHTML))) |
|
3089 { |
|
3090 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
3091 } |
|
3092 else |
|
3093 { |
|
3094 ReqCompleted(aTsyReqHandle,KErrNone); |
|
3095 } |
|
3096 } |
|
3097 else |
|
3098 { |
|
3099 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
3100 } |
|
3101 |
|
3102 return KErrNone; |
|
3103 } |
|
3104 |
|
3105 TInt CSimSat::MmsTransferStatus(const TTsyReqHandle aTsyReqHandle, TDes8* aPCmd) |
|
3106 { |
|
3107 RSat::TMmsTransferStatusV6Pckg* mMSTransferStatusV6PCmdPckg = (RSat::TMmsTransferStatusV6Pckg*)aPCmd; |
|
3108 RSat::TMmsTransferStatusV6& mMSTransferStatusV6 = (*mMSTransferStatusV6PCmdPckg)(); |
|
3109 |
|
3110 if(iRetTIndex ==6 || iRetTIndex ==7) |
|
3111 { |
|
3112 if((mMSTransferStatusV6.iDeviceId != RSat::KME) |
|
3113 ||(mMSTransferStatusV6.iMMSTransferFile.Compare(SIMTSY_MMS_TRF_FILE_PATH) !=0) |
|
3114 ||(mMSTransferStatusV6.iMultimediaMessageStatus.Compare(SIMTSY_MMS_MSG_BUF) !=0) |
|
3115 ||(mMSTransferStatusV6.iMultimediaMessageId.Compare(SIMTSY_MMS_MSG_ID) != 0)) |
|
3116 { |
|
3117 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
3118 } |
|
3119 else |
|
3120 { |
|
3121 ReqCompleted(aTsyReqHandle,KErrNone); |
|
3122 } |
|
3123 } |
|
3124 |
|
3125 else if(iSubTIndex == 5 || iSubTIndex ==6) |
|
3126 { |
|
3127 if((mMSTransferStatusV6.iDeviceId != RSat::KME) |
|
3128 ||(mMSTransferStatusV6.iMMSTransferFile.Compare(SIMTSY_MMS_TRF_FILE_PATH) !=0) |
|
3129 ||(mMSTransferStatusV6.iMultimediaMessageStatus.Compare(SIMTSY_MMS_MSG_BUF) !=0) |
|
3130 ||(mMSTransferStatusV6.iMultimediaMessageId.Compare(SIMTSY_MMS_MSG_ID) != 0)) |
|
3131 { |
|
3132 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
3133 } |
|
3134 else |
|
3135 { |
|
3136 ReqCompleted(aTsyReqHandle,KErrNone); |
|
3137 } |
|
3138 } |
|
3139 |
|
3140 else |
|
3141 { |
|
3142 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
3143 } |
|
3144 |
|
3145 iMMSTransferStatusHandle = aTsyReqHandle; |
|
3146 return KErrNone; |
|
3147 } |
|
3148 |
|
3149 TInt CSimSat::MmsTransferStatusCancel(const TTsyReqHandle aTsyReqHandle) |
|
3150 { |
|
3151 |
|
3152 if(aTsyReqHandle == iMMSTransferStatusHandle) |
|
3153 { |
|
3154 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
3155 } |
|
3156 else |
|
3157 { |
|
3158 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
3159 } |
|
3160 return KErrNone; |
|
3161 |
|
3162 } |
|
3163 |
|
3164 TInt CSimSat::MmsNotificationDownload(const TTsyReqHandle aTsyReqHandle, TDes8* aDes) |
|
3165 { |
|
3166 // Has the config file been parsed for this functionality |
|
3167 if(!iConfigDone) |
|
3168 { |
|
3169 TInt ret = KErrNone; |
|
3170 TRAPD(err, ret = ConfigL(SIMTSY_MMSNOTIFICATIONDOWNLOAD_CMD_NUMBER)); |
|
3171 if(err != KErrNone) |
|
3172 { |
|
3173 ret = err; |
|
3174 } |
|
3175 if(ret!= KErrNone) |
|
3176 { |
|
3177 return ret; |
|
3178 } |
|
3179 else |
|
3180 { |
|
3181 iConfigDone = ETrue; |
|
3182 } |
|
3183 } |
|
3184 |
|
3185 TInt err(KErrNone); |
|
3186 TInt count(iMmsDownloadData->Count()); |
|
3187 TBool found(EFalse); |
|
3188 |
|
3189 // If the config file does not contain any USSD Download related data |
|
3190 // then complete the request with KErrNotSupported |
|
3191 if(!count) |
|
3192 { |
|
3193 err = KErrNotSupported; |
|
3194 } |
|
3195 else |
|
3196 { |
|
3197 // otherwise extract the data supplied by the client |
|
3198 RSat::TMmsNotificationDownloadV6Pckg* mmsNotificationDownloadV6Pckg = (RSat::TMmsNotificationDownloadV6Pckg*)aDes; |
|
3199 RSat::TMmsNotificationDownloadV6& mmsNotificationDownloadV6 = (*mmsNotificationDownloadV6Pckg)(); |
|
3200 |
|
3201 for(TInt i=0; i<count; i++) |
|
3202 { |
|
3203 TMmsNotificationDownload tempMmsData = iMmsDownloadData->At(i); |
|
3204 |
|
3205 // Compare the supplied data to the data retrieved from the config file |
|
3206 if((mmsNotificationDownloadV6.iDeviceId == STATIC_CAST(RSat::TDeviceId, tempMmsData.iDestn)) && |
|
3207 (mmsNotificationDownloadV6.iMMSNotification.Compare(tempMmsData.iMMSNotfn) == 0) && |
|
3208 (mmsNotificationDownloadV6.iLastEnvelope == tempMmsData.iLastEnv)) |
|
3209 { |
|
3210 found = ETrue; |
|
3211 |
|
3212 if(tempMmsData.iUICCRsp == SIMTSY_UICC_SUCC_RSP) |
|
3213 { |
|
3214 err = KErrNone; |
|
3215 } |
|
3216 else if(tempMmsData.iUICCRsp == SIMTSY_UICC_RETRY_RSP) |
|
3217 { |
|
3218 err = KErrNotReady; |
|
3219 } |
|
3220 else if(tempMmsData.iUICCRsp == SIMTSY_UICC_FLR_RSP_1 || |
|
3221 tempMmsData.iUICCRsp == SIMTSY_UICC_FLR_RSP_2) |
|
3222 { |
|
3223 err = KErrNotSupported; |
|
3224 } |
|
3225 |
|
3226 iMmsDownloadDataHandle = aTsyReqHandle; |
|
3227 break; |
|
3228 } |
|
3229 } // end for loop |
|
3230 } // end else |
|
3231 |
|
3232 // the supplied data does not match the one in the config file, so complete the request with an error |
|
3233 if(!found) |
|
3234 err = KErrCorrupt; |
|
3235 |
|
3236 ReqCompleted(aTsyReqHandle, err); |
|
3237 return KErrNone; |
|
3238 } |
|
3239 |
|
3240 TInt CSimSat::MmsNotificationDownloadCancel(const TTsyReqHandle aTsyReqHandle) |
|
3241 { |
|
3242 if(aTsyReqHandle == iMmsDownloadDataHandle) |
|
3243 { |
|
3244 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
3245 } |
|
3246 else |
|
3247 { |
|
3248 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
3249 } |
|
3250 return KErrNone; |
|
3251 |
|
3252 } |
|
3253 |
|
3254 TInt CSimSat::EventDownload(const TTsyReqHandle aTsyReqHandle, RSat::TEventList* aPCmd, TDes8* aRsp) |
|
3255 { |
|
3256 |
|
3257 if(!iConfigDone) |
|
3258 { |
|
3259 TInt ret = KErrNone; |
|
3260 TRAPD(err, ret = ConfigL(SIMTSY_EVENT_LIST_CMD_NUMBER)); |
|
3261 if(err != KErrNone) |
|
3262 { |
|
3263 ret = err; |
|
3264 } |
|
3265 |
|
3266 if(ret!= KErrNone) |
|
3267 { |
|
3268 return ret; |
|
3269 } |
|
3270 else |
|
3271 { |
|
3272 iConfigDone = ETrue; |
|
3273 } |
|
3274 } |
|
3275 |
|
3276 switch(*aPCmd) |
|
3277 { |
|
3278 case RSat:: KNetworkSearchModeChange: |
|
3279 { |
|
3280 RSat::TNetworkSearchModeChangeEventV6Pckg* networkSrchPckg = (RSat::TNetworkSearchModeChangeEventV6Pckg*)aRsp; |
|
3281 RSat::TNetworkSearchModeChangeEventV6& networkSrch = (*networkSrchPckg)(); |
|
3282 |
|
3283 iEventDnldHandle = aTsyReqHandle; |
|
3284 |
|
3285 if(iEventDnldIndex == 0 || iEventDnldIndex == 1 ) |
|
3286 { |
|
3287 if(networkSrch.iNetworkSearchMode == (STATIC_CAST(RSat::TNetworkSearchMode,iEventList->At(iEventDnldIndex).iVar))) |
|
3288 { |
|
3289 iSendRspEventDnld = ETrue; |
|
3290 } |
|
3291 else |
|
3292 { |
|
3293 iSendRspEventDnld = EFalse; |
|
3294 } |
|
3295 } |
|
3296 } |
|
3297 break; |
|
3298 |
|
3299 case RSat::KFramesInformationChange: |
|
3300 { |
|
3301 RSat::TFramesInformationChangedEventV6Pckg* frmsChgPckg = (RSat::TFramesInformationChangedEventV6Pckg*)aRsp; |
|
3302 RSat::TFramesInformationChangedEventV6& frmsChg = (*frmsChgPckg)(); |
|
3303 |
|
3304 iEventDnldHandle = aTsyReqHandle; |
|
3305 |
|
3306 if(iEventDnldIndex == 4 || iEventDnldIndex == 5 ) |
|
3307 { |
|
3308 if((frmsChg.iFramesInformation.iFrameId == (iEventList->At(iEventDnldIndex).iVar)) || |
|
3309 (!(frmsChg.iFramesInformation.iFrameList.Compare(iEventList->At(iEventDnldIndex).iFrameList)))) |
|
3310 { |
|
3311 iSendRspEventDnld = ETrue; |
|
3312 } |
|
3313 else |
|
3314 { |
|
3315 iSendRspEventDnld = EFalse; |
|
3316 } |
|
3317 } |
|
3318 } |
|
3319 break; |
|
3320 |
|
3321 case RSat::KBrowsingStatusChange: |
|
3322 { |
|
3323 RSat::TBrowsingStatusEventV6Pckg *brwStsPckg = (RSat::TBrowsingStatusEventV6Pckg*)aRsp; |
|
3324 RSat::TBrowsingStatusEventV6& brwSts = (*brwStsPckg)(); |
|
3325 |
|
3326 iEventDnldHandle = aTsyReqHandle; |
|
3327 |
|
3328 if(iEventDnldIndex == 2 || iEventDnldIndex == 3 ) |
|
3329 { |
|
3330 if(brwSts.iBrowserStatus == (iEventList->At(iEventDnldIndex).iVar)) |
|
3331 { |
|
3332 iSendRspEventDnld = ETrue; |
|
3333 } |
|
3334 else |
|
3335 { |
|
3336 iSendRspEventDnld = EFalse; |
|
3337 } |
|
3338 } |
|
3339 else if(iEventDnldIndex == 0) |
|
3340 { |
|
3341 iSendRspEventDnld = ETrue; |
|
3342 } |
|
3343 } |
|
3344 break; |
|
3345 |
|
3346 default: |
|
3347 iSendRspEventDnld = EFalse; |
|
3348 break; |
|
3349 } |
|
3350 |
|
3351 |
|
3352 if(iEventDnldIndex < iEventList->Count()) |
|
3353 { |
|
3354 iEventDnldIndex++; |
|
3355 } |
|
3356 |
|
3357 return KErrNone; |
|
3358 |
|
3359 } |
|
3360 |
|
3361 TInt CSimSat::EventDownloadCancel(const TTsyReqHandle aTsyReqHandle) |
|
3362 { |
|
3363 |
|
3364 if(aTsyReqHandle == iEventDnldHandle) |
|
3365 { |
|
3366 ReqCompleted(aTsyReqHandle,KErrCancel); |
|
3367 } |
|
3368 else |
|
3369 { |
|
3370 ReqCompleted(aTsyReqHandle,KErrCorrupt); |
|
3371 } |
|
3372 return KErrNone; |
|
3373 } |
|
3374 |
|
3375 |
|
3376 TInt CSimSat::ConfigL(unsigned int aCmd) |
|
3377 { |
|
3378 LOGMISC1("CSimSat: Entered ConfigL()"); |
|
3379 |
|
3380 TInt dcs,terRsp,src,UICCRsp,lastEnv,duration,type,frameId,frmLayout,defFrmLayout,frameSeparator; |
|
3381 TInt immRsp,dispPrio,clrScr,utranQlfr,infoType,brType,location,destn,alphaIDSts; |
|
3382 TInt iconid,iconidqlfr,textStatus,ret=KErrNone; |
|
3383 TInt i; |
|
3384 |
|
3385 TPtrC8 ussdStr,mmsNotfn,subFile,framesList,FileList,frmLayoutBuf; |
|
3386 TPtrC8 dispFile,alphaIDBuf,msgRef,rcpFile,conId,msgId,txtAttr; |
|
3387 |
|
3388 const CTestConfigItem* item=NULL; |
|
3389 |
|
3390 |
|
3391 TMmsNotificationDownload tMmsNotificationDownload; |
|
3392 TSendUSSD tSendSS; |
|
3393 TEventDnld tEventDnld; |
|
3394 TUssdData tUssdData; |
|
3395 TSendUSSD tSendUssd; |
|
3396 TLnchBrwsr tLnchBrwsr; |
|
3397 TMMRetrieve tMMRetrieve; |
|
3398 TMiscPCmd tMiscCmd; |
|
3399 TMMSubmit tMMSubmit; |
|
3400 TSetFrms tSetFrms; |
|
3401 TMMDisplay tMMDisplay; |
|
3402 TGetFrmsSts tGetFrmsSts; |
|
3403 TLocalInfo tLocalInfo; |
|
3404 TOpenChannel tOpenChn; |
|
3405 |
|
3406 TInt lnchBCount =CfgFile()->ItemCount(KLaunchBrowser); |
|
3407 TInt ussdCount =CfgFile()->ItemCount(KSendUssd); |
|
3408 TInt refCount =CfgFile()->ItemCount(KRefresh2); |
|
3409 TInt miscCount =CfgFile()->ItemCount(KMiscCmd); |
|
3410 TInt openCount =CfgFile()->ItemCount(KOpenChnl); |
|
3411 TInt localCount =CfgFile()->ItemCount(KLocalInfo); |
|
3412 TInt getFSCount =CfgFile()->ItemCount(KGetFramesStatus); |
|
3413 TInt setFCount =CfgFile()->ItemCount(KSetFrames); |
|
3414 TInt dispCount =CfgFile()->ItemCount(KMMDisplay); |
|
3415 TInt subCount =CfgFile()->ItemCount(KMMSubmit); |
|
3416 TInt retrCount =CfgFile()->ItemCount(KMMRetrieve); |
|
3417 TInt notfnDCount=CfgFile()->ItemCount(KMmsNotificationDownload); |
|
3418 TInt ussdDnCount=CfgFile()->ItemCount(KUssdDataDownload); |
|
3419 TInt eventCount =CfgFile()->ItemCount(KEventDnld); |
|
3420 TInt ssCount =CfgFile()->ItemCount(KSendSs); |
|
3421 TInt efCount =CfgFile()->ItemCount(KElemFiles); |
|
3422 |
|
3423 switch(aCmd) |
|
3424 { |
|
3425 case SIMTSY_RET_MM_PCMD_NUMBER: |
|
3426 /* Retrieving the information related to the RETRIEVE MM command */ |
|
3427 |
|
3428 iMMRetrieve = new(ELeave) CArrayFixFlat<TMMRetrieve>(KSatGranularity); |
|
3429 for (i=0;i<retrCount;i++) |
|
3430 { |
|
3431 |
|
3432 item=CfgFile()->Item(KMMRetrieve,i); |
|
3433 if(!item) |
|
3434 { |
|
3435 break; |
|
3436 } |
|
3437 |
|
3438 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,destn); |
|
3439 if(ret!=KErrNone) |
|
3440 { |
|
3441 LOGPARSERR("destination",ret,0,&KMMRetrieve); |
|
3442 continue; |
|
3443 } |
|
3444 tMMRetrieve.iDestn = destn; |
|
3445 |
|
3446 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,alphaIDSts); |
|
3447 if(ret!=KErrNone) |
|
3448 { |
|
3449 LOGPARSERR("alphaIDStatus",ret,1,&KMMRetrieve); |
|
3450 continue; |
|
3451 } |
|
3452 tMMRetrieve.iAlphaStatus=alphaIDSts; |
|
3453 |
|
3454 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,alphaIDBuf); |
|
3455 if(ret!=KErrNone) |
|
3456 { |
|
3457 LOGPARSERR("alphaIDBuf",ret,2,&KMMRetrieve); |
|
3458 continue; |
|
3459 } |
|
3460 location = alphaIDBuf.Locate('\n'); |
|
3461 if(location > 0) |
|
3462 { |
|
3463 tMMRetrieve.iAlphaIDBuf.Set(alphaIDBuf.Left(location)); |
|
3464 } |
|
3465 else |
|
3466 { |
|
3467 tMMRetrieve.iAlphaIDBuf.Set(alphaIDBuf); |
|
3468 } |
|
3469 |
|
3470 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,iconid); |
|
3471 if(ret!=KErrNone) |
|
3472 { |
|
3473 LOGPARSERR("IconID Identifier",ret,3,&KMMRetrieve); |
|
3474 continue; |
|
3475 } |
|
3476 tMMRetrieve.iIconID = iconid; |
|
3477 |
|
3478 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,iconidqlfr); |
|
3479 if(ret!=KErrNone) |
|
3480 { |
|
3481 LOGPARSERR("IconID qualifier",ret,4,&KMMRetrieve); |
|
3482 continue; |
|
3483 } |
|
3484 tMMRetrieve.iIconIDBuf = iconidqlfr; |
|
3485 |
|
3486 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,5,msgRef); |
|
3487 if(ret!=KErrNone) |
|
3488 { |
|
3489 LOGPARSERR("Message Reference",ret,5,&KMMRetrieve); |
|
3490 continue; |
|
3491 } |
|
3492 location = msgRef.Locate('\n'); |
|
3493 if(location > 0) |
|
3494 { |
|
3495 tMMRetrieve.iMMMsgRef.Set(msgRef.Left(location)); |
|
3496 } |
|
3497 else |
|
3498 { |
|
3499 tMMRetrieve.iMMMsgRef.Set(msgRef); |
|
3500 } |
|
3501 |
|
3502 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,6,rcpFile); |
|
3503 if(ret!=KErrNone) |
|
3504 { |
|
3505 LOGPARSERR("Reception File",ret,6,&KMMRetrieve); |
|
3506 continue; |
|
3507 } |
|
3508 location = rcpFile.Locate('\n'); |
|
3509 if(location > 0) |
|
3510 { |
|
3511 tMMRetrieve.iRcptnFile.Set(rcpFile.Left(location)); |
|
3512 } |
|
3513 else |
|
3514 { |
|
3515 tMMRetrieve.iRcptnFile.Set(rcpFile); |
|
3516 } |
|
3517 |
|
3518 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,7,conId); |
|
3519 if(ret!=KErrNone) |
|
3520 { |
|
3521 LOGPARSERR("Content Identifier",ret,7,&KMMRetrieve); |
|
3522 continue; |
|
3523 } |
|
3524 location = conId.Locate('\n'); |
|
3525 if(location > 0) |
|
3526 { |
|
3527 tMMRetrieve.iContentId.Set(conId.Left(location)); |
|
3528 } |
|
3529 else |
|
3530 { |
|
3531 tMMRetrieve.iContentId.Set(conId); |
|
3532 } |
|
3533 |
|
3534 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,8,msgId); |
|
3535 if(ret!=KErrNone) |
|
3536 { |
|
3537 LOGPARSERR("Message Identifier",ret,8,&KMMRetrieve); |
|
3538 continue; |
|
3539 } |
|
3540 location = msgId.Locate('\n'); |
|
3541 if(location > 0) |
|
3542 { |
|
3543 tMMRetrieve.iMsgId.Set(msgId.Left(location)); |
|
3544 } |
|
3545 else |
|
3546 { |
|
3547 tMMRetrieve.iMsgId.Set(msgId); |
|
3548 } |
|
3549 |
|
3550 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,9,textStatus); |
|
3551 if(ret!=KErrNone) |
|
3552 { |
|
3553 LOGPARSERR("Text Attribute Status",ret,9,&KMMRetrieve); |
|
3554 continue; |
|
3555 } |
|
3556 tMMRetrieve.iTextAttStatus = textStatus; |
|
3557 |
|
3558 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,10,txtAttr); |
|
3559 if(ret!=KErrNone) |
|
3560 { |
|
3561 LOGPARSERR("Text Attribute",ret,10,&KMMRetrieve); |
|
3562 continue; |
|
3563 } |
|
3564 location = txtAttr.Locate('\n'); |
|
3565 if(location > 0) |
|
3566 { |
|
3567 tMMRetrieve.iTextAttBuf.Set(txtAttr.Left(location)); |
|
3568 } |
|
3569 else |
|
3570 { |
|
3571 tMMRetrieve.iTextAttBuf.Set(txtAttr); |
|
3572 } |
|
3573 |
|
3574 iMMRetrieve->AppendL(tMMRetrieve); |
|
3575 |
|
3576 } |
|
3577 break; |
|
3578 case SIMTSY_SUB_MM_PCMD_NUMBER: |
|
3579 /* Retrieving the information related to the SUBMIT MULTIMEDIA command */ |
|
3580 |
|
3581 iMMSubmit = new(ELeave) CArrayFixFlat<TMMSubmit>(KSatGranularity); |
|
3582 for(i=0;i<subCount;i++) |
|
3583 { |
|
3584 item=CfgFile()->Item(KMMSubmit,i); |
|
3585 if(!item) |
|
3586 { |
|
3587 break; |
|
3588 } |
|
3589 |
|
3590 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,destn); |
|
3591 if(ret!=KErrNone) |
|
3592 { |
|
3593 LOGPARSERR("destination",ret,0,&KMMSubmit); |
|
3594 continue; |
|
3595 } |
|
3596 tMMSubmit.iDestn = destn; |
|
3597 |
|
3598 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,alphaIDSts); |
|
3599 if(ret!=KErrNone) |
|
3600 { |
|
3601 LOGPARSERR("alphaIDStatus",ret,1,&KMMSubmit); |
|
3602 continue; |
|
3603 } |
|
3604 tMMSubmit.iAlphaStatus=alphaIDSts; |
|
3605 |
|
3606 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,alphaIDBuf); |
|
3607 if(ret!=KErrNone) |
|
3608 { |
|
3609 LOGPARSERR("alphaIDBuf",ret,2,&KMMSubmit); |
|
3610 continue; |
|
3611 } |
|
3612 location = alphaIDBuf.Locate('\n'); |
|
3613 if(location > 0) |
|
3614 tMMSubmit.iAlphaIDBuf.Set(alphaIDBuf.Left(location)); |
|
3615 else |
|
3616 tMMSubmit.iAlphaIDBuf.Set(alphaIDBuf); |
|
3617 |
|
3618 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,iconid); |
|
3619 if(ret!=KErrNone) |
|
3620 { |
|
3621 LOGPARSERR("IconID Identifier",ret,3,&KMMSubmit); |
|
3622 continue; |
|
3623 } |
|
3624 tMMSubmit.iIconID = iconid; |
|
3625 |
|
3626 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,iconidqlfr); |
|
3627 if(ret!=KErrNone) |
|
3628 { |
|
3629 LOGPARSERR("IconID qualifier",ret,4,&KMMSubmit); |
|
3630 continue; |
|
3631 } |
|
3632 tMMSubmit.iIconIDBuf = iconidqlfr; |
|
3633 |
|
3634 |
|
3635 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,5,subFile); |
|
3636 if(ret!=KErrNone) |
|
3637 { |
|
3638 LOGPARSERR("Submission File",ret,5,&KMMSubmit); |
|
3639 continue; |
|
3640 } |
|
3641 location = subFile.Locate('\n'); |
|
3642 if(location > 0) |
|
3643 tMMSubmit.iSbmsnFile.Set(subFile.Left(location)); |
|
3644 else |
|
3645 tMMSubmit.iSbmsnFile.Set(subFile); |
|
3646 |
|
3647 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,6,msgId); |
|
3648 if(ret!=KErrNone) |
|
3649 { |
|
3650 LOGPARSERR("Message Identifier",ret,6,&KMMSubmit); |
|
3651 continue; |
|
3652 } |
|
3653 location = msgId.Locate('\n'); |
|
3654 if(location > 0) |
|
3655 tMMSubmit.iMsgId.Set(msgId.Left(location)); |
|
3656 else |
|
3657 tMMSubmit.iMsgId.Set(msgId); |
|
3658 |
|
3659 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,7,textStatus); |
|
3660 if(ret!=KErrNone) |
|
3661 { |
|
3662 LOGPARSERR("Text Attribute Status",ret,7,&KMMSubmit); |
|
3663 continue; |
|
3664 } |
|
3665 tMMSubmit.iTextAttStatus = textStatus; |
|
3666 |
|
3667 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,8,txtAttr); |
|
3668 if(ret!=KErrNone) |
|
3669 { |
|
3670 LOGPARSERR("Text Attribute",ret,8,&KMMSubmit); |
|
3671 continue; |
|
3672 } |
|
3673 location = txtAttr.Locate('\n'); |
|
3674 if(location > 0) |
|
3675 tMMSubmit.iTextAttBuf.Set(txtAttr.Left(location)); |
|
3676 else |
|
3677 tMMSubmit.iTextAttBuf.Set(txtAttr); |
|
3678 |
|
3679 iMMSubmit->AppendL(tMMSubmit); |
|
3680 |
|
3681 } |
|
3682 |
|
3683 break; |
|
3684 case SIMTSY_DISP_MM_PCMD_NUMBER: |
|
3685 /* Retrieving the information related to the DISPLAY MULTIMEDIA command */ |
|
3686 |
|
3687 iMMDisplay = new(ELeave) CArrayFixFlat<TMMDisplay>(KSatGranularity); |
|
3688 for(i=0;i<dispCount;i++) |
|
3689 { |
|
3690 item=CfgFile()->Item(KMMDisplay,i); |
|
3691 if(!item) |
|
3692 { |
|
3693 break; |
|
3694 } |
|
3695 |
|
3696 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,destn); |
|
3697 if(ret!=KErrNone) |
|
3698 { |
|
3699 LOGPARSERR("destination",ret,0,&KMMDisplay); |
|
3700 continue; |
|
3701 } |
|
3702 tMMDisplay.iDestn = destn; |
|
3703 |
|
3704 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,dispPrio); |
|
3705 if(ret!=KErrNone) |
|
3706 { |
|
3707 LOGPARSERR("Display Priority",ret,1,&KMMDisplay); |
|
3708 continue; |
|
3709 } |
|
3710 tMMDisplay.iDispPri = dispPrio; |
|
3711 |
|
3712 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,clrScr); |
|
3713 if(ret!=KErrNone) |
|
3714 { |
|
3715 LOGPARSERR("ClearScreen",ret,2,&KMMDisplay); |
|
3716 continue; |
|
3717 } |
|
3718 tMMDisplay.iClrScr = clrScr; |
|
3719 |
|
3720 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,dispFile); |
|
3721 if(ret!=KErrNone) |
|
3722 { |
|
3723 LOGPARSERR("Submission File",ret,3,&KMMDisplay); |
|
3724 continue; |
|
3725 } |
|
3726 location = dispFile.Locate('\n'); |
|
3727 if(location > 0) |
|
3728 tMMDisplay.iSbmsnFile.Set(dispFile.Left(location)); |
|
3729 else |
|
3730 tMMDisplay.iSbmsnFile.Set(dispFile); |
|
3731 |
|
3732 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,msgId); |
|
3733 if(ret!=KErrNone) |
|
3734 { |
|
3735 LOGPARSERR("Message Identifier",ret,4,&KMMSubmit); |
|
3736 continue; |
|
3737 } |
|
3738 location = msgId.Locate('\n'); |
|
3739 if(location > 0) |
|
3740 tMMDisplay.iMsgId.Set(msgId.Left(location)); |
|
3741 else |
|
3742 tMMDisplay.iMsgId.Set(msgId); |
|
3743 |
|
3744 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,5,immRsp); |
|
3745 if(ret!=KErrNone) |
|
3746 { |
|
3747 LOGPARSERR("Immediate Response",ret,5,&KMMDisplay); |
|
3748 continue; |
|
3749 } |
|
3750 tMMDisplay.iImmRsp = immRsp; |
|
3751 |
|
3752 iMMDisplay->AppendL(tMMDisplay); |
|
3753 |
|
3754 } |
|
3755 |
|
3756 break; |
|
3757 case SIMTSY_SET_FRMS_PCMD_NUMBER: |
|
3758 /* Retrieving the information related to the SET FRAMES command */ |
|
3759 |
|
3760 iSetFrms = new(ELeave) CArrayFixFlat<TSetFrms>(KSatGranularity); |
|
3761 for(i=0;i<setFCount;i++) |
|
3762 { |
|
3763 item=CfgFile()->Item(KSetFrames,i); |
|
3764 if(!item) |
|
3765 { |
|
3766 break; |
|
3767 } |
|
3768 |
|
3769 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,destn); |
|
3770 if(ret!=KErrNone) |
|
3771 { |
|
3772 LOGPARSERR("destination",ret,0,&KSetFrames); |
|
3773 continue; |
|
3774 } |
|
3775 tSetFrms.iDestn = destn; |
|
3776 |
|
3777 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,frameId); |
|
3778 if(ret!=KErrNone) |
|
3779 { |
|
3780 LOGPARSERR("Frame Identifier",ret,1,&KSetFrames); |
|
3781 } |
|
3782 tSetFrms.iFrmId = frameId; |
|
3783 |
|
3784 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,frmLayout); |
|
3785 if(ret!=KErrNone) |
|
3786 { |
|
3787 LOGPARSERR("Frame Layout",ret,2,&KSetFrames); |
|
3788 } |
|
3789 tSetFrms.iFrmLayout = frmLayout; |
|
3790 |
|
3791 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,frmLayoutBuf); |
|
3792 if(ret!=KErrNone) |
|
3793 { |
|
3794 LOGPARSERR("Frame Layout buffer",ret,3,&KSetFrames); |
|
3795 } |
|
3796 location = frmLayoutBuf.Locate('\n'); |
|
3797 if(location > 0) |
|
3798 tSetFrms.iFrmLayoutBuf.Set(frmLayoutBuf.Left(location)); |
|
3799 else |
|
3800 tSetFrms.iFrmLayoutBuf.Set(frmLayoutBuf); |
|
3801 |
|
3802 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,defFrmLayout); |
|
3803 if(ret!=KErrNone) |
|
3804 { |
|
3805 LOGPARSERR("Default Frame Layout",ret,4,&KSetFrames); |
|
3806 } |
|
3807 tSetFrms.iDefFrmId = defFrmLayout; |
|
3808 |
|
3809 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,5,frameSeparator); |
|
3810 if(ret!=KErrNone) |
|
3811 { |
|
3812 LOGPARSERR("Frame Separator",ret,5,&KSetFrames); |
|
3813 } |
|
3814 tSetFrms.iFrmSeparator = frameSeparator; |
|
3815 |
|
3816 iSetFrms->AppendL(tSetFrms); |
|
3817 |
|
3818 } |
|
3819 break; |
|
3820 case SIMTSY_GET_FRMS_STS_PCMD_NUMBER: |
|
3821 /* Retrieving the information related to the GET FRAMES STATUS command */ |
|
3822 |
|
3823 iGetFrmsSts = new(ELeave) CArrayFixFlat<TGetFrmsSts>(KSatGranularity); |
|
3824 for(i=0;i<getFSCount;i++) |
|
3825 { |
|
3826 item=CfgFile()->Item(KGetFramesStatus,i); |
|
3827 if(!item) |
|
3828 { |
|
3829 break; |
|
3830 } |
|
3831 |
|
3832 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,destn); |
|
3833 if(ret!=KErrNone) |
|
3834 { |
|
3835 LOGPARSERR("destination",ret,0,&KGetFramesStatus); |
|
3836 continue; |
|
3837 } |
|
3838 tGetFrmsSts.iDestn = destn; |
|
3839 |
|
3840 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,frameId); |
|
3841 if(ret!=KErrNone) |
|
3842 { |
|
3843 LOGPARSERR("Frame Id",ret,1,&KGetFramesStatus); |
|
3844 continue; |
|
3845 } |
|
3846 tGetFrmsSts.iFrmId = frameId; |
|
3847 |
|
3848 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,frmLayoutBuf); |
|
3849 if(ret!=KErrNone) |
|
3850 { |
|
3851 LOGPARSERR("FrameLayout Buffer",ret,1,&KGetFramesStatus); |
|
3852 continue; |
|
3853 } |
|
3854 location = frmLayoutBuf.Locate('\n'); |
|
3855 if(location > 0) |
|
3856 tGetFrmsSts.iFrmList.Set(frmLayoutBuf.Left(location)); |
|
3857 else |
|
3858 tGetFrmsSts.iFrmList.Set(frmLayoutBuf); |
|
3859 |
|
3860 iGetFrmsSts->AppendL(tGetFrmsSts); |
|
3861 |
|
3862 } |
|
3863 break; |
|
3864 case SIMTSY_PRV_LCL_INFO_PCMD_NUMBER: |
|
3865 /* Retrieving the information regarding PROVIDE LOCAL INFORMATION */ |
|
3866 |
|
3867 iLocalInfo = new(ELeave) CArrayFixFlat<TLocalInfo>(KSatGranularity); |
|
3868 for(i=0;i<localCount;i++) |
|
3869 { |
|
3870 item=CfgFile()->Item(KLocalInfo,i); |
|
3871 if(!item) |
|
3872 { |
|
3873 break; |
|
3874 } |
|
3875 |
|
3876 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,destn); |
|
3877 if(ret!=KErrNone) |
|
3878 { |
|
3879 LOGPARSERR("Destination",ret,0,&KLocalInfo); |
|
3880 continue; |
|
3881 } |
|
3882 tLocalInfo.iDeviceId = destn; |
|
3883 |
|
3884 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,infoType); |
|
3885 if(ret!=KErrNone) |
|
3886 { |
|
3887 LOGPARSERR("Information Type",ret,1,&KLocalInfo); |
|
3888 continue; |
|
3889 } |
|
3890 tLocalInfo.iLocalInfoType = infoType; |
|
3891 |
|
3892 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,utranQlfr); |
|
3893 if(ret!=KErrNone) |
|
3894 { |
|
3895 LOGPARSERR("UTRAN Qlfr",ret,2,&KLocalInfo); |
|
3896 continue; |
|
3897 } |
|
3898 tLocalInfo.iUTRANQlfr = utranQlfr; |
|
3899 |
|
3900 iLocalInfo->AppendL(tLocalInfo); |
|
3901 |
|
3902 } |
|
3903 break; |
|
3904 case SIMTSY_OPEN_CHAN_PCMD_NUMBER: |
|
3905 /* Retrieving the information regarding OPEN CHANNEL command */ |
|
3906 |
|
3907 iOpenChn = new(ELeave) CArrayFixFlat<TOpenChannel>(KSatGranularity); |
|
3908 for(i=0;i<openCount;i++) |
|
3909 { |
|
3910 item=CfgFile()->Item(KOpenChnl,i); |
|
3911 if(!item) |
|
3912 { |
|
3913 break; |
|
3914 } |
|
3915 |
|
3916 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,brType); |
|
3917 if(ret!=KErrNone) |
|
3918 { |
|
3919 LOGPARSERR("Destination",ret,0,&KOpenChnl); |
|
3920 continue; |
|
3921 } |
|
3922 tOpenChn.iBearerType = brType; |
|
3923 |
|
3924 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,frameId); |
|
3925 if(ret!=KErrNone) |
|
3926 { |
|
3927 LOGPARSERR("Information Type",ret,1,&KOpenChnl); |
|
3928 continue; |
|
3929 } |
|
3930 tOpenChn.iFrameId = frameId; |
|
3931 |
|
3932 iOpenChn->AppendL(tOpenChn); |
|
3933 |
|
3934 } |
|
3935 break; |
|
3936 case SIMTSY_PLAY_TONE_PCMD_NUMBER: |
|
3937 case SIMTSY_SETUP_CALL_PCMD_NUMBER: |
|
3938 case SIMTSY_GET_INKEY_PCMD_NUMBER: |
|
3939 /* Retrieving the information about the miscellaneous commands */ |
|
3940 |
|
3941 iMiscCmd = new(ELeave) CArrayFixFlat<TMiscPCmd>(KSatGranularity); |
|
3942 for(i=0;i<miscCount;i++) |
|
3943 { |
|
3944 item=CfgFile()->Item(KMiscCmd,i); |
|
3945 if(!item) |
|
3946 { |
|
3947 break; |
|
3948 } |
|
3949 |
|
3950 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,frameId); |
|
3951 if(ret!=KErrNone) |
|
3952 { |
|
3953 LOGPARSERR("FrameId",ret,0,&KMiscCmd); |
|
3954 continue; |
|
3955 } |
|
3956 tMiscCmd.iFrameId = frameId; |
|
3957 |
|
3958 iMiscCmd->AppendL(tMiscCmd); |
|
3959 |
|
3960 } |
|
3961 break; |
|
3962 case SIMTSY_REFRESH_PCMD_NUMBER: |
|
3963 /* Retrieving the information about the REFRESH command */ |
|
3964 |
|
3965 iRefresh = new(ELeave) CArrayFixFlat<TSatInfo>(KSatGranularity); |
|
3966 for(i=0;i<refCount;i++) |
|
3967 { |
|
3968 item=CfgFile()->Item(KRefresh2,i); |
|
3969 if(!item) |
|
3970 { |
|
3971 break; |
|
3972 } |
|
3973 |
|
3974 TInt duration,type; |
|
3975 TPtrC8 applId; |
|
3976 |
|
3977 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,duration); |
|
3978 if(ret!=KErrNone) |
|
3979 { |
|
3980 LOGPARSERR("duration",ret,0,&KRefresh2); |
|
3981 continue; |
|
3982 } |
|
3983 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,type); |
|
3984 if(ret!=KErrNone) |
|
3985 { |
|
3986 LOGPARSERR("Refresh Type",ret,1,&KRefresh2); |
|
3987 continue; |
|
3988 } |
|
3989 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,applId); |
|
3990 if(ret!=KErrNone) |
|
3991 { |
|
3992 LOGPARSERR("Application Id",ret,2,&KRefresh2); |
|
3993 continue; |
|
3994 } |
|
3995 |
|
3996 TSatInfo satInfo; |
|
3997 satInfo.iDuration = duration; |
|
3998 satInfo.iType = type; |
|
3999 |
|
4000 TInt location = applId.Locate('\n'); |
|
4001 if(location > 0) |
|
4002 satInfo.iFileList.Set(applId.Left(location)); |
|
4003 else |
|
4004 satInfo.iFileList.Set(applId); |
|
4005 iRefresh->AppendL(satInfo); |
|
4006 |
|
4007 } |
|
4008 |
|
4009 break; |
|
4010 case SIMTSY_SEND_USSD_PCMD_NUMBER: |
|
4011 /* Retrieving the information about the SEND USSD command */ |
|
4012 |
|
4013 iSendUssd = new(ELeave) CArrayFixFlat<TSendUSSD>(KSatGranularity); |
|
4014 for(i=0;i<ussdCount;i++) |
|
4015 { |
|
4016 item=CfgFile()->Item(KSendUssd,i); |
|
4017 if(!item) |
|
4018 { |
|
4019 break; |
|
4020 } |
|
4021 |
|
4022 ret= CTestConfig::GetElement(item->Value(),KStdDelimiter,0,textStatus); |
|
4023 if(ret!=KErrNone) |
|
4024 { |
|
4025 LOGPARSERR("Text Attribute Status",ret,0,&KSendUssd); |
|
4026 continue; |
|
4027 } |
|
4028 tSendUssd.iTextAttStatus = textStatus; |
|
4029 |
|
4030 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,txtAttr); |
|
4031 if(ret!=KErrNone) |
|
4032 { |
|
4033 LOGPARSERR("Text Attribute Buffer",ret,1,&KSendUssd); |
|
4034 continue; |
|
4035 } |
|
4036 TInt location = txtAttr.Locate('\n'); |
|
4037 if(location > 0) |
|
4038 tSendUssd.iTextAttBuf.Set(txtAttr.Left(location)); |
|
4039 else |
|
4040 tSendUssd.iTextAttBuf.Set(txtAttr); |
|
4041 |
|
4042 iSendUssd->AppendL(tSendUssd); |
|
4043 |
|
4044 } |
|
4045 break; |
|
4046 case SIMTSY_LNCH_BRWSR_PCMD_NUMBER: |
|
4047 /* Retrieving the information related to the LAUNCH BROWSER command */ |
|
4048 |
|
4049 iLnchBrwsr = new(ELeave) CArrayFixFlat<TLnchBrwsr>(KSatGranularity); |
|
4050 for(i=0;i<lnchBCount;i++) |
|
4051 { |
|
4052 item=CfgFile()->Item(KLaunchBrowser,i); |
|
4053 if(!item) |
|
4054 { |
|
4055 break; |
|
4056 } |
|
4057 |
|
4058 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,frameId); |
|
4059 if(ret!=KErrNone) |
|
4060 { |
|
4061 LOGPARSERR("FrameId",ret,0,&KLaunchBrowser); |
|
4062 continue; |
|
4063 } |
|
4064 tLnchBrwsr.iFrameId = frameId; |
|
4065 |
|
4066 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,terRsp); |
|
4067 if(ret!=KErrNone) |
|
4068 { |
|
4069 LOGPARSERR("Terminal Response",ret,1,&KLaunchBrowser); |
|
4070 continue; |
|
4071 } |
|
4072 tLnchBrwsr.iTerRsp = terRsp; |
|
4073 |
|
4074 iLnchBrwsr->AppendL(tLnchBrwsr); |
|
4075 |
|
4076 } |
|
4077 break; |
|
4078 |
|
4079 case SIMTSY_USSD_CMD_NUMBER: |
|
4080 /* Retrieving the information related to the USSD DATA DOWNLOAD command */ |
|
4081 |
|
4082 iUssdData = new(ELeave) CArrayFixFlat<TUssdData>(KSatGranularity); |
|
4083 for(i=0;i<ussdDnCount;i++) |
|
4084 { |
|
4085 item=CfgFile()->Item(KUssdDataDownload,i); |
|
4086 if(!item) |
|
4087 { |
|
4088 break; |
|
4089 } |
|
4090 |
|
4091 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,src); |
|
4092 if(ret!=KErrNone) |
|
4093 { |
|
4094 LOGPARSERR("Source",ret,0,&KUssdDataDownload); |
|
4095 continue; |
|
4096 } |
|
4097 tUssdData.iSrc = src; |
|
4098 |
|
4099 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,destn); |
|
4100 if(ret!=KErrNone) |
|
4101 { |
|
4102 LOGPARSERR("Destination",ret,1,&KUssdDataDownload); |
|
4103 continue; |
|
4104 } |
|
4105 tUssdData.iDestn = destn; |
|
4106 |
|
4107 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,dcs); |
|
4108 if(ret!=KErrNone) |
|
4109 { |
|
4110 LOGPARSERR("Data Coding Scheme",ret,2,&KUssdDataDownload); |
|
4111 continue; |
|
4112 } |
|
4113 tUssdData.iDcs = dcs; |
|
4114 |
|
4115 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,ussdStr); |
|
4116 if(ret!=KErrNone) |
|
4117 { |
|
4118 LOGPARSERR("USSD String",ret,3,&KUssdDataDownload); |
|
4119 continue; |
|
4120 } |
|
4121 else |
|
4122 { |
|
4123 TUint16 value; |
|
4124 |
|
4125 if(AsciiToNum(ussdStr, value) == KErrNone) |
|
4126 { |
|
4127 tUssdData.iUssdStr.SetLength(1); |
|
4128 tUssdData.iUssdStr[0] = value; |
|
4129 } |
|
4130 else |
|
4131 { |
|
4132 LOGPARSERR("UssdDataDownload::USSD String",KErrArgument,0,&KUssdDataDownload); |
|
4133 continue; |
|
4134 } |
|
4135 } |
|
4136 |
|
4137 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,UICCRsp); |
|
4138 if(ret!=KErrNone) |
|
4139 { |
|
4140 LOGPARSERR("UICC Response",ret,4,&KUssdDataDownload); |
|
4141 continue; |
|
4142 } |
|
4143 tUssdData.iUICCRsp = UICCRsp; |
|
4144 |
|
4145 iUssdData->AppendL(tUssdData); |
|
4146 |
|
4147 } |
|
4148 |
|
4149 break; |
|
4150 case SIMTSY_EVENT_LIST_CMD_NUMBER: |
|
4151 /* Retrieving the information about the EVENT DOWNLOAD command */ |
|
4152 |
|
4153 iEventList = new(ELeave) CArrayFixFlat<TEventDnld>(KSatGranularity); |
|
4154 for(i=0;i<eventCount;i++) |
|
4155 { |
|
4156 item=CfgFile()->Item(KEventDnld,i); |
|
4157 if(!item) |
|
4158 { |
|
4159 break; |
|
4160 } |
|
4161 |
|
4162 ret= CTestConfig::GetElement(item->Value(),KStdDelimiter,0,infoType); |
|
4163 if(ret!=KErrNone) |
|
4164 { |
|
4165 LOGPARSERR("Information Type",ret,0,&KEventDnld); |
|
4166 continue; |
|
4167 } |
|
4168 tEventDnld.iVar = infoType; |
|
4169 |
|
4170 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,framesList); |
|
4171 if(ret!=KErrNone) |
|
4172 { |
|
4173 LOGPARSERR("Frames List",ret,1,&KEventDnld); |
|
4174 continue; |
|
4175 } |
|
4176 TInt location = framesList.Locate('\n'); |
|
4177 if(location > 0) |
|
4178 tEventDnld.iFrameList.Set(framesList.Left(location)); |
|
4179 else |
|
4180 tEventDnld.iFrameList.Set(framesList); |
|
4181 |
|
4182 iEventList->AppendL(tEventDnld); |
|
4183 |
|
4184 } |
|
4185 |
|
4186 break; |
|
4187 case SIMTSY_SENDSS_CMD_NUMBER: |
|
4188 /* Retrieving the information about the Send SS command */ |
|
4189 |
|
4190 iSendSS = new(ELeave) CArrayFixFlat<TSendUSSD>(KSatGranularity); |
|
4191 for(i=0;i<ssCount;i++) |
|
4192 { |
|
4193 item=CfgFile()->Item(KSendSs,i); |
|
4194 if(!item) |
|
4195 { |
|
4196 break; |
|
4197 } |
|
4198 |
|
4199 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,textStatus); |
|
4200 if(ret!=KErrNone) |
|
4201 { |
|
4202 LOGPARSERR("Text Attr Status",ret,0,&KSendSs); |
|
4203 continue; |
|
4204 } |
|
4205 |
|
4206 tSendSS.iTextAttStatus = textStatus; |
|
4207 |
|
4208 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,txtAttr); |
|
4209 if(ret!=KErrNone) |
|
4210 { |
|
4211 LOGPARSERR("Text Attribute",ret,1,&KSendSs); |
|
4212 continue; |
|
4213 } |
|
4214 |
|
4215 TInt location = txtAttr.Locate('\n'); |
|
4216 |
|
4217 if(location > 0) |
|
4218 tSendSS.iTextAttBuf.Set(txtAttr.Left(location)); |
|
4219 else |
|
4220 tSendSS.iTextAttBuf.Set(txtAttr); |
|
4221 |
|
4222 iSendSS->AppendL(tSendSS); |
|
4223 |
|
4224 } |
|
4225 |
|
4226 break; |
|
4227 case SIMTSY_ELEMFILES_CMD_NUMBER: |
|
4228 /* Retrieving the information about the elementary files change */ |
|
4229 |
|
4230 iElemFiles = new(ELeave) CArrayFixFlat<TSatInfo>(KSatGranularity); |
|
4231 for(i=0;i<efCount;i++) |
|
4232 { |
|
4233 item=CfgFile()->Item(KElemFiles,i); |
|
4234 if(!item) |
|
4235 { |
|
4236 break; |
|
4237 } |
|
4238 |
|
4239 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,duration); |
|
4240 if(ret!=KErrNone) |
|
4241 { |
|
4242 LOGPARSERR("duration",ret,0,&KElemFiles); |
|
4243 continue; |
|
4244 } |
|
4245 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,type); |
|
4246 if(ret!=KErrNone) |
|
4247 { |
|
4248 LOGPARSERR("Refresh Type",ret,1,&KElemFiles); |
|
4249 continue; |
|
4250 } |
|
4251 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,FileList); |
|
4252 if(ret!=KErrNone) |
|
4253 { |
|
4254 LOGPARSERR("Application Id",ret,2,&KElemFiles); |
|
4255 continue; |
|
4256 } |
|
4257 |
|
4258 TSatInfo satInfo; |
|
4259 satInfo.iDuration = duration; |
|
4260 satInfo.iType = type; |
|
4261 |
|
4262 TInt location = FileList.Locate('\n'); |
|
4263 if(location > 0) |
|
4264 satInfo.iFileList.Set(FileList.Left(location)); |
|
4265 else |
|
4266 satInfo.iFileList.Set(FileList); |
|
4267 iElemFiles->AppendL(satInfo); |
|
4268 |
|
4269 } |
|
4270 break; |
|
4271 |
|
4272 case SIMTSY_MMSNOTIFICATIONDOWNLOAD_CMD_NUMBER: |
|
4273 /* Retrieving the information related to the MMS NOTIFICATION DOWNLOAD command */ |
|
4274 iMmsDownloadData = new (ELeave) CArrayFixFlat<TMmsNotificationDownload>(KSatGranularity); |
|
4275 |
|
4276 for(i=0;i<notfnDCount;i++) |
|
4277 { |
|
4278 item=CfgFile()->Item(KMmsNotificationDownload,i); |
|
4279 if(!item) |
|
4280 { |
|
4281 break; |
|
4282 } |
|
4283 |
|
4284 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,0,src); |
|
4285 if(ret!=KErrNone) |
|
4286 { |
|
4287 LOGPARSERR("Source",ret,0,&KMmsNotificationDownload); |
|
4288 continue; |
|
4289 } |
|
4290 tMmsNotificationDownload.iSrc = src; |
|
4291 |
|
4292 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,1,destn); |
|
4293 if(ret!=KErrNone) |
|
4294 { |
|
4295 LOGPARSERR("Destination",ret,1,&KMmsNotificationDownload); |
|
4296 continue; |
|
4297 } |
|
4298 tMmsNotificationDownload.iDestn = destn; |
|
4299 |
|
4300 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,2,mmsNotfn); |
|
4301 if(ret!=KErrNone) |
|
4302 { |
|
4303 LOGPARSERR("MMS notification",ret,2,&KMmsNotificationDownload); |
|
4304 continue; |
|
4305 } |
|
4306 location = mmsNotfn.Locate('\n'); |
|
4307 |
|
4308 if(location > 0) |
|
4309 tMmsNotificationDownload.iMMSNotfn.Copy(mmsNotfn.Left(location)); |
|
4310 else |
|
4311 tMmsNotificationDownload.iMMSNotfn.Copy(mmsNotfn); |
|
4312 |
|
4313 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,3,lastEnv); |
|
4314 if(ret!=KErrNone) |
|
4315 { |
|
4316 LOGPARSERR("Last envelope",ret,3,&KMmsNotificationDownload); |
|
4317 continue; |
|
4318 } |
|
4319 tMmsNotificationDownload.iLastEnv = lastEnv; |
|
4320 |
|
4321 ret=CTestConfig::GetElement(item->Value(),KStdDelimiter,4,UICCRsp); |
|
4322 if(ret!=KErrNone) |
|
4323 { |
|
4324 LOGPARSERR("UICC Response",ret,4,&KMmsNotificationDownload); |
|
4325 continue; |
|
4326 } |
|
4327 tMmsNotificationDownload.iUICCRsp = UICCRsp; |
|
4328 |
|
4329 iMmsDownloadData->AppendL(tMmsNotificationDownload); |
|
4330 } |
|
4331 break; |
|
4332 default: |
|
4333 LOGMISC1("Unknown command to process"); |
|
4334 return KErrNotSupported; |
|
4335 |
|
4336 } |
|
4337 return KErrNone; |
|
4338 |
|
4339 |
|
4340 } |
|
4341 |