1 /* |
|
2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the License "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Specific class for WIM tests |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 #include <e32svr.h> |
|
23 #include <stifparser.h> |
|
24 #include <stiftestinterface.h> |
|
25 #include "wim.h" |
|
26 |
|
27 |
|
28 // CONSTANTS |
|
29 _LIT8( KLine, "---------------------------------" ); |
|
30 |
|
31 |
|
32 |
|
33 // ============================ MEMBER FUNCTIONS =============================== |
|
34 |
|
35 // ----------------------------------------------------------------------------- |
|
36 // CWIM::Delete |
|
37 // Delete here all resources allocated and opened from test methods. |
|
38 // Called from destructor. |
|
39 // ----------------------------------------------------------------------------- |
|
40 // |
|
41 void CWIM::Delete() |
|
42 { |
|
43 |
|
44 } |
|
45 |
|
46 // ----------------------------------------------------------------------------- |
|
47 // CWIM::RunMethodL |
|
48 // Run specified method. Contains also table of test methods and their names. |
|
49 // ----------------------------------------------------------------------------- |
|
50 // |
|
51 TInt CWIM::RunMethodL( |
|
52 CStifItemParser& aItem ) |
|
53 { |
|
54 _LIT8 (KLog, "WIM: RunMethodL" ); |
|
55 iWIMLog->Log((TDesC8)KLog); |
|
56 |
|
57 static TStifFunctionInfo const KFunctions[] = |
|
58 { |
|
59 // Copy this line for every implemented function. |
|
60 // First string is the function name used in TestScripter script file. |
|
61 // Second is the actual implementation member function. |
|
62 ENTRY( "PoweringSimOn", CWIM::PoweringSimOn ), |
|
63 ENTRY( "PoweringSimOff", CWIM::PoweringSimOff ), |
|
64 ENTRY( "SIMWarmReset", CWIM::SIMWarmReset ), |
|
65 ENTRY( "GetAnswerToResetStatus", CWIM::GetAnswerToResetStatus ), |
|
66 ENTRY( "GetSIMCardReaderStatus", CWIM::GetSIMCardReaderStatus ), |
|
67 ENTRY( "SendAPDU", CWIM::SendAPDU ), |
|
68 ENTRY( "SendAPDURequest", CWIM::SendAPDURequest ), |
|
69 ENTRY( "RunIscTestCase", CCore::RunIscTestCase), |
|
70 ENTRY( "SyncIscTestCase", CCore::SyncIscTestCase), |
|
71 ENTRY( "HandleSpecifiedRequests", CCore::HandleSpecifiedRequests), |
|
72 ENTRY( "InitializeIPCRequestTable", CCore::InitializeIPCRequestTable), |
|
73 ENTRY( "SetExpectedCompleteIPC", CCore::SetExpectedCompleteIPC), |
|
74 |
|
75 }; |
|
76 |
|
77 |
|
78 const TInt count = sizeof( KFunctions ) / |
|
79 sizeof( TStifFunctionInfo ); |
|
80 |
|
81 return RunInternalL( KFunctions, count, aItem ); |
|
82 |
|
83 } |
|
84 |
|
85 |
|
86 |
|
87 // ----------------------------------------------------------------------------- |
|
88 // CWIM::RunIscTestCase |
|
89 // Start ISC Test Control test case |
|
90 // (other items were commented in a header). |
|
91 // ----------------------------------------------------------------------------- |
|
92 // |
|
93 TInt CWIM::RunIscTestCase( CStifItemParser& aItem ) |
|
94 { |
|
95 TInt testCaseId(0); |
|
96 TInt ret = aItem.GetNextInt(testCaseId); |
|
97 if (KErrNone == ret) |
|
98 { |
|
99 RunIscControlTestCase(1, testCaseId); |
|
100 } |
|
101 return ret; |
|
102 } |
|
103 |
|
104 |
|
105 // ----------------------------------------------------------------------------- |
|
106 // CWIM::SyncIscTestCase |
|
107 // Syncronize with ISC Test Control |
|
108 // (other items were commented in a header). |
|
109 // ----------------------------------------------------------------------------- |
|
110 // |
|
111 TInt CWIM::SyncIscTestCase( CStifItemParser& /*aItem*/ ) |
|
112 { |
|
113 SyncIscControl(); |
|
114 return KErrNone; |
|
115 } |
|
116 |
|
117 |
|
118 // ----------------------------------------------------------------------------- |
|
119 // CWIM::PoweringSIMOn |
|
120 // Powering SIM on |
|
121 // ----------------------------------------------------------------------------- |
|
122 // |
|
123 TInt CWIM::PoweringSimOn( CStifItemParser& /*aItem*/ ) |
|
124 { |
|
125 _LIT8(KPbInit, "CWIM::PoweringSimOn"); |
|
126 iWIMLog->Log((TDesC8)KPbInit); |
|
127 |
|
128 TInt ret( KErrNotFound ); |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 ret = HandleRequestL( ECustomPowerSimOnIPC ); |
|
134 |
|
135 if ( KErrNone == ret ) |
|
136 { |
|
137 _LIT8( KSendOk, "PoweringSimOn request send ok" ); |
|
138 iWIMLog->Log((TDesC8)KSendOk ); |
|
139 } |
|
140 else |
|
141 { |
|
142 _LIT8( KSendFailed, "PoweringSimOn request send failed: %d" ); |
|
143 iWIMLog->Log((TDesC8)KSendFailed, ret ); |
|
144 } |
|
145 |
|
146 |
|
147 |
|
148 return ret; |
|
149 |
|
150 } |
|
151 |
|
152 |
|
153 // ----------------------------------------------------------------------------- |
|
154 // CWIM::CompletePoweringSIMOn |
|
155 // Complete PoweringSIMOn method function. |
|
156 // ----------------------------------------------------------------------------- |
|
157 // |
|
158 void CWIM::CompletePoweringSimOn |
|
159 ( |
|
160 TInt aResult |
|
161 ) |
|
162 { |
|
163 _LIT8( KResult, "CompletePoweringSimOn result: %d" ); |
|
164 iWIMLog->Log((TDesC8)KResult, aResult ); |
|
165 |
|
166 if( KErrNone != aResult ) |
|
167 { |
|
168 _LIT8( KFail, "CompletePoweringSimOn Failed: %d" ); |
|
169 iWIMLog->Log((TDesC8)KFail, aResult ); |
|
170 } |
|
171 |
|
172 |
|
173 Signal( aResult ); |
|
174 |
|
175 } |
|
176 |
|
177 // ----------------------------------------------------------------------------- |
|
178 // CWIM::PoweringSIMOff |
|
179 // Powering SIM off |
|
180 // ----------------------------------------------------------------------------- |
|
181 // |
|
182 TInt CWIM::PoweringSimOff( CStifItemParser& /*aItem*/ ) |
|
183 { |
|
184 _LIT8(KPbInit, "CWIM::PoweringSimOff"); |
|
185 iWIMLog->Log((TDesC8)KPbInit); |
|
186 |
|
187 TInt ret( KErrNotFound ); |
|
188 |
|
189 |
|
190 ret = HandleRequestL( ECustomPowerSimOffIPC ); |
|
191 |
|
192 if ( KErrNone == ret ) |
|
193 { |
|
194 _LIT8( KSendOk, "PoweringSimOff request send ok" ); |
|
195 iWIMLog->Log((TDesC8)KSendOk ); |
|
196 } |
|
197 else |
|
198 { |
|
199 _LIT8( KSendFailed, "PoweringSimOff request send failed: %d" ); |
|
200 iWIMLog->Log((TDesC8)KSendFailed, ret ); |
|
201 } |
|
202 |
|
203 |
|
204 |
|
205 return ret; |
|
206 |
|
207 } |
|
208 |
|
209 |
|
210 // ----------------------------------------------------------------------------- |
|
211 // CWIM::PoweringSIMOff |
|
212 // Complete PoweringSIMOff method function. |
|
213 // ----------------------------------------------------------------------------- |
|
214 // |
|
215 void CWIM::CompletePoweringSimOff |
|
216 ( |
|
217 TInt aResult |
|
218 ) |
|
219 { |
|
220 _LIT8( KResult, "CompletePoweringSimOff result: %d" ); |
|
221 iWIMLog->Log((TDesC8)KResult, aResult ); |
|
222 |
|
223 if( KErrNone != aResult ) |
|
224 { |
|
225 _LIT8( KFail, "CompletePoweringSimOff Failed: %d" ); |
|
226 iWIMLog->Log((TDesC8)KFail, aResult ); |
|
227 } |
|
228 |
|
229 |
|
230 Signal( aResult ); |
|
231 |
|
232 } |
|
233 |
|
234 // ----------------------------------------------------------------------------- |
|
235 // CWIM::SIMWarmReset |
|
236 // SIM Warm Reset |
|
237 // ----------------------------------------------------------------------------- |
|
238 // |
|
239 TInt CWIM::SIMWarmReset( CStifItemParser& /*aItem*/ ) |
|
240 { |
|
241 _LIT8(KPbInit, "CWIM::SIMWarmReset"); |
|
242 iWIMLog->Log((TDesC8)KPbInit); |
|
243 |
|
244 TInt ret( KErrNotFound ); |
|
245 |
|
246 |
|
247 ret = HandleRequestL( ECustomSimWarmResetIPC ); |
|
248 |
|
249 if ( KErrNone == ret ) |
|
250 { |
|
251 _LIT8( KSendOk, "SIMWarmReset request send ok" ); |
|
252 iWIMLog->Log((TDesC8)KSendOk ); |
|
253 } |
|
254 else |
|
255 { |
|
256 _LIT8( KSendFailed, "SIMWarmReset request send failed: %d" ); |
|
257 iWIMLog->Log((TDesC8)KSendFailed, ret ); |
|
258 } |
|
259 |
|
260 |
|
261 return ret; |
|
262 |
|
263 } |
|
264 |
|
265 |
|
266 // ----------------------------------------------------------------------------- |
|
267 // CWIM::CompleteSIMWarmReset |
|
268 // Complete SIMWarmReset method function. |
|
269 // ----------------------------------------------------------------------------- |
|
270 // |
|
271 void CWIM::CompleteSIMWarmReset |
|
272 ( |
|
273 TInt aResult |
|
274 ) |
|
275 { |
|
276 _LIT8( KResult, "CompleteSIMWarmReset result: %d" ); |
|
277 iWIMLog->Log((TDesC8)KResult, aResult ); |
|
278 |
|
279 if( KErrNone != aResult ) |
|
280 { |
|
281 _LIT8( KFail, "CompleteSIMWarmReset Failed: %d" ); |
|
282 iWIMLog->Log((TDesC8)KFail, aResult ); |
|
283 } |
|
284 |
|
285 |
|
286 Signal( aResult ); |
|
287 |
|
288 } |
|
289 |
|
290 // ----------------------------------------------------------------------------- |
|
291 // CWIM::GetAnswerToResetStatus |
|
292 // SIM Warm Reset |
|
293 // ----------------------------------------------------------------------------- |
|
294 // |
|
295 TInt CWIM::GetAnswerToResetStatus( CStifItemParser& aItem ) |
|
296 { |
|
297 _LIT8(KPbInit, "CWIM::GetAnswerToResetStatus"); |
|
298 iWIMLog->Log((TDesC8)KPbInit); |
|
299 |
|
300 TInt ret( KErrNotFound ); |
|
301 |
|
302 TPtrC string; |
|
303 aItem.GetNextString ( string ); |
|
304 iAnswerToResetStatus.Zero(); |
|
305 iAnswerToResetStatus.Append( string ); |
|
306 |
|
307 ret = HandleRequestL( ECustomGetATRIPC ); |
|
308 |
|
309 if ( KErrNone == ret ) |
|
310 { |
|
311 _LIT8( KSendOk, "GetAnswerToResetStatus request send ok" ); |
|
312 iWIMLog->Log((TDesC8)KSendOk ); |
|
313 } |
|
314 else |
|
315 { |
|
316 _LIT8( KSendFailed, "GetAnswerToResetStatus request send failed: %d" ); |
|
317 iWIMLog->Log((TDesC8)KSendFailed, ret ); |
|
318 } |
|
319 |
|
320 |
|
321 |
|
322 return ret; |
|
323 |
|
324 } |
|
325 |
|
326 |
|
327 // ----------------------------------------------------------------------------- |
|
328 // CWIM::CompleteGetAnswerToResetStatus |
|
329 // Complete GetAnswerToResetStatus method function. |
|
330 // ----------------------------------------------------------------------------- |
|
331 // |
|
332 void CWIM::CompleteGetAnswerToResetStatus |
|
333 ( |
|
334 TInt aResult, |
|
335 CMmDataPackage* aDataPackage |
|
336 ) |
|
337 { |
|
338 TBuf8<255> answerStatus; |
|
339 |
|
340 aDataPackage->UnPackData( answerStatus ); |
|
341 |
|
342 if ( iAnswerToResetStatus != answerStatus ) |
|
343 { |
|
344 aResult = KErrGeneral; |
|
345 } |
|
346 |
|
347 _LIT8( KResult, "CompleteGetAnswerToResetStatus result: %d" ); |
|
348 iWIMLog->Log((TDesC8)KResult, aResult ); |
|
349 |
|
350 if( KErrNone != aResult ) |
|
351 { |
|
352 _LIT8( KFail, "CompleteGetAnswerToResetStatus Failed: %d" ); |
|
353 iWIMLog->Log((TDesC8)KFail, aResult ); |
|
354 } |
|
355 |
|
356 |
|
357 Signal( aResult ); |
|
358 |
|
359 } |
|
360 |
|
361 // ----------------------------------------------------------------------------- |
|
362 // CWIM::GetSIMCardReaderStatus |
|
363 // Get SIM card reader status |
|
364 // ----------------------------------------------------------------------------- |
|
365 // |
|
366 TInt CWIM::GetSIMCardReaderStatus( CStifItemParser& aItem ) |
|
367 { |
|
368 _LIT8(KPbInit, "CWIM::GetSIMCardReaderStatus"); |
|
369 iWIMLog->Log((TDesC8)KPbInit); |
|
370 |
|
371 TInt ret( KErrNotFound ); |
|
372 TInt value; |
|
373 TInt i; |
|
374 TInt byteCount; |
|
375 |
|
376 iSIMCardReaderStatus.Zero(); |
|
377 |
|
378 aItem.GetNextInt ( byteCount ); |
|
379 |
|
380 for( i = 0; i < byteCount; i++ ) |
|
381 { |
|
382 aItem.GetNextInt ( value ); |
|
383 iSIMCardReaderStatus.Append( value ); |
|
384 } |
|
385 |
|
386 ret = HandleRequestL( ECustomGetSimCardReaderStatusIPC ); |
|
387 |
|
388 if ( KErrNone == ret ) |
|
389 { |
|
390 _LIT8( KSendOk, "GetSIMCardReaderStatus request send ok" ); |
|
391 iWIMLog->Log((TDesC8)KSendOk ); |
|
392 } |
|
393 else |
|
394 { |
|
395 _LIT8( KSendFailed, "GetSIMCardReaderStatus request send failed: %d" ); |
|
396 iWIMLog->Log((TDesC8)KSendFailed, ret ); |
|
397 } |
|
398 |
|
399 |
|
400 |
|
401 return ret; |
|
402 |
|
403 } |
|
404 |
|
405 |
|
406 // ----------------------------------------------------------------------------- |
|
407 // CWIM::CompleteGetSIMCardReaderStatus |
|
408 // Complete GetSIMCardReaderStatus method function. |
|
409 // ----------------------------------------------------------------------------- |
|
410 // |
|
411 void CWIM::CompleteGetSIMCardReaderStatus |
|
412 ( |
|
413 TInt aResult, |
|
414 CMmDataPackage* aDataPackage |
|
415 ) |
|
416 { |
|
417 |
|
418 TBuf8<255> SIMCardReaderStatus; |
|
419 |
|
420 aDataPackage->UnPackData( SIMCardReaderStatus ); |
|
421 |
|
422 if( iSIMCardReaderStatus != SIMCardReaderStatus ) |
|
423 { |
|
424 aResult = KErrGeneral; |
|
425 } |
|
426 |
|
427 _LIT8( KResult, "CompleteGetSIMCardReaderStatus result: %d" ); |
|
428 iWIMLog->Log((TDesC8)KResult, aResult ); |
|
429 |
|
430 |
|
431 if( KErrNone != aResult ) |
|
432 { |
|
433 _LIT8( KFail, "CompleteGetSIMCardReaderStatus Failed: %d" ); |
|
434 iWIMLog->Log((TDesC8)KFail, aResult ); |
|
435 } |
|
436 |
|
437 |
|
438 Signal( aResult ); |
|
439 |
|
440 } |
|
441 |
|
442 |
|
443 |
|
444 // ----------------------------------------------------------------------------- |
|
445 // CWIM::SendAPDU |
|
446 // Send Application Data Unit (APDU) |
|
447 // ----------------------------------------------------------------------------- |
|
448 // |
|
449 TInt CWIM::SendAPDU( CStifItemParser& aItem ) |
|
450 { |
|
451 _LIT8(KPbInit, "CWIM::SendAPDU"); |
|
452 iWIMLog->Log((TDesC8)KPbInit); |
|
453 |
|
454 TInt ret( KErrNotFound ); |
|
455 |
|
456 TInt CLA; |
|
457 TInt INS; |
|
458 TInt P1; |
|
459 TInt P2; |
|
460 TInt Lc; |
|
461 |
|
462 TInt cardreaderid; |
|
463 |
|
464 aItem.GetNextInt( cardreaderid ); |
|
465 |
|
466 aItem.GetNextInt ( CLA ); |
|
467 aItem.GetNextInt( INS ); |
|
468 aItem.GetNextInt( P1 ); |
|
469 aItem.GetNextInt( P2 ); |
|
470 aItem.GetNextInt( Lc ); |
|
471 |
|
472 iParams.iCmdData.Append(CLA); |
|
473 iParams.iCmdData.Append(INS); |
|
474 iParams.iCmdData.Append(P1); |
|
475 iParams.iCmdData.Append(P2); |
|
476 iParams.iCmdData.Append(Lc); |
|
477 |
|
478 |
|
479 |
|
480 TInt tmp; |
|
481 |
|
482 //append data + Le (if present) |
|
483 while( aItem.GetNextInt(tmp) == KErrNone ) |
|
484 iParams.iCmdData.Append(tmp); |
|
485 |
|
486 |
|
487 //iParams.iCardReaderId = 1; |
|
488 iParams.iCardReaderId = cardreaderid; |
|
489 |
|
490 iParams.iRspData = _L8(""); |
|
491 |
|
492 |
|
493 RMmCustomAPI::TApduParameters* paramsPtr = &iParams; |
|
494 |
|
495 |
|
496 CMmDataPackage package; |
|
497 |
|
498 // Set package data |
|
499 package.PackData( ¶msPtr ); |
|
500 |
|
501 ret = HandleRequestL( ECustomSendAPDUReqV2IPC, &package ); |
|
502 |
|
503 if ( KErrNone == ret ) |
|
504 { |
|
505 _LIT8( KSendOk, "SendAPDU request send ok" ); |
|
506 iWIMLog->Log((TDesC8)KSendOk ); |
|
507 } |
|
508 else |
|
509 { |
|
510 _LIT8( KSendFailed, "SendAPDU request send failed: %d" ); |
|
511 iWIMLog->Log((TDesC8)KSendFailed, ret ); |
|
512 } |
|
513 |
|
514 |
|
515 |
|
516 return ret; |
|
517 |
|
518 } |
|
519 |
|
520 |
|
521 // ----------------------------------------------------------------------------- |
|
522 // CWIM::CompleteSendAPDU |
|
523 // Complete SendAPDU method function. |
|
524 // ----------------------------------------------------------------------------- |
|
525 // |
|
526 void CWIM::CompleteSendAPDU |
|
527 ( |
|
528 TInt aResult, |
|
529 CMmDataPackage* aDataPackage |
|
530 ) |
|
531 { |
|
532 _LIT8( KResult, "CompleteSendAPDU result: %d" ); |
|
533 iWIMLog->Log((TDesC8)KResult, aResult ); |
|
534 |
|
535 TBuf8<255> params; |
|
536 |
|
537 aDataPackage->UnPackData( params ); |
|
538 |
|
539 if( params != iParams.iCmdData ) |
|
540 { |
|
541 aResult = KErrGeneral; |
|
542 } |
|
543 |
|
544 if( KErrNone != aResult ) |
|
545 { |
|
546 _LIT8( KFail, "CompleteSendAPDU Failed: %d" ); |
|
547 iWIMLog->Log((TDesC8)KFail, aResult ); |
|
548 } |
|
549 |
|
550 |
|
551 Signal( aResult ); |
|
552 |
|
553 } |
|
554 |
|
555 // ----------------------------------------------------------------------------- |
|
556 // CWIM::SendAPDURequest |
|
557 // Send Application Data Unit (APDU) Request |
|
558 // ----------------------------------------------------------------------------- |
|
559 // |
|
560 TInt CWIM::SendAPDURequest( CStifItemParser& aItem ) |
|
561 { |
|
562 _LIT8(KPbInit, "CWIM::SendAPDURequest"); |
|
563 iWIMLog->Log((TDesC8)KPbInit); |
|
564 |
|
565 TInt ret( KErrNotFound ); |
|
566 TBool supported( ETrue ); |
|
567 |
|
568 TInt servicetype; |
|
569 TInt crIdentity; |
|
570 TInt type; |
|
571 TInt sPAC; |
|
572 TInt length; |
|
573 |
|
574 TInt CLA; |
|
575 TInt INS; |
|
576 TInt P1; |
|
577 TInt P2; |
|
578 TInt Lc; |
|
579 |
|
580 |
|
581 aItem.GetNextInt ( servicetype ); |
|
582 aItem.GetNextInt( crIdentity ); |
|
583 aItem.GetNextInt( type ); |
|
584 |
|
585 |
|
586 iInfo.Append(servicetype); |
|
587 iInfo.Append(crIdentity); |
|
588 iInfo.Append(type); |
|
589 |
|
590 if ( 0x4F == servicetype ) |
|
591 { |
|
592 |
|
593 aItem.GetNextInt( sPAC ); |
|
594 aItem.GetNextInt( length ); |
|
595 |
|
596 aItem.GetNextInt( CLA ); |
|
597 aItem.GetNextInt( INS ); |
|
598 aItem.GetNextInt( P1 ); |
|
599 aItem.GetNextInt( P2 ); |
|
600 aItem.GetNextInt( Lc ); |
|
601 |
|
602 iInfo.Append(sPAC); |
|
603 iInfo.Append(length); |
|
604 |
|
605 |
|
606 iData.Append(CLA); |
|
607 iData.Append(INS); |
|
608 iData.Append(P1); |
|
609 iData.Append(P2); |
|
610 iData.Append(Lc); |
|
611 |
|
612 TInt tmp; |
|
613 |
|
614 //append data + Le (if present) |
|
615 while( aItem.GetNextInt(tmp) == KErrNone ) |
|
616 iData.Append(tmp); |
|
617 |
|
618 |
|
619 } |
|
620 |
|
621 RMmCustomAPI::TApdu apduReg; |
|
622 apduReg.iInfo = &iInfo; |
|
623 apduReg.iData = &iData; |
|
624 |
|
625 |
|
626 if( supported ) |
|
627 { |
|
628 |
|
629 |
|
630 CMmDataPackage package; |
|
631 |
|
632 // Set package data |
|
633 package.PackData( &apduReg ); |
|
634 |
|
635 ret = HandleRequestL( ECustomSendAPDUReqIPC, &package ); |
|
636 |
|
637 if ( KErrNone == ret ) |
|
638 { |
|
639 _LIT8( KSendOk, "SendAPDURequest request send ok" ); |
|
640 iWIMLog->Log((TDesC8)KSendOk ); |
|
641 } |
|
642 else |
|
643 { |
|
644 _LIT8( KSendFailed, "SendAPDURequest request send failed: %d" ); |
|
645 iWIMLog->Log((TDesC8)KSendFailed, ret ); |
|
646 } |
|
647 |
|
648 } |
|
649 |
|
650 return ret; |
|
651 |
|
652 } |
|
653 |
|
654 |
|
655 // ----------------------------------------------------------------------------- |
|
656 // CWIM::CompleteSendAPDURequest |
|
657 // Complete SendAPDURequest method function. |
|
658 // ----------------------------------------------------------------------------- |
|
659 // |
|
660 void CWIM::CompleteSendAPDURequest |
|
661 ( |
|
662 TInt aResult, |
|
663 CMmDataPackage* aDataPackage |
|
664 ) |
|
665 { |
|
666 _LIT8( KResult, "CompleteSendAPDURequest result: %d" ); |
|
667 iWIMLog->Log((TDesC8)KResult, aResult ); |
|
668 |
|
669 TBuf8<255> info; |
|
670 TBuf8<255> data; |
|
671 |
|
672 aDataPackage->UnPackData( info, data ); |
|
673 |
|
674 if( iData != data ) |
|
675 { |
|
676 aResult = KErrGeneral; |
|
677 } |
|
678 |
|
679 if( KErrNone != aResult ) |
|
680 { |
|
681 _LIT8( KFail, "CompleteSendAPDURequest Failed: %d" ); |
|
682 iWIMLog->Log((TDesC8)KFail, aResult ); |
|
683 } |
|
684 |
|
685 |
|
686 Signal( aResult ); |
|
687 |
|
688 } |
|
689 |
|
690 |
|
691 |
|
692 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
693 // None |
|
694 |
|
695 |
|
696 // End of File |
|
697 |
|