|
1 /* |
|
2 * Copyright (c) 2002 - 2007 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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 #include <e32svr.h> |
|
23 #include <StifParser.h> |
|
24 #include <Stiftestinterface.h> |
|
25 #include "tprovidertest.h" |
|
26 #include "teventdetails.h" |
|
27 #include "tfilterdetails.h" |
|
28 |
|
29 |
|
30 |
|
31 // ============================ MEMBER FUNCTIONS =============================== |
|
32 |
|
33 // ----------------------------------------------------------------------------- |
|
34 // Ctprovidertest::Delete |
|
35 // Delete here all resources allocated and opened from test methods. |
|
36 // Called from destructor. |
|
37 // ----------------------------------------------------------------------------- |
|
38 // |
|
39 void Ctprovidertest::Delete() |
|
40 { |
|
41 |
|
42 } |
|
43 |
|
44 // ----------------------------------------------------------------------------- |
|
45 // Ctprovidertest::RunMethodL |
|
46 // Run specified method. Contains also table of test mothods and their names. |
|
47 // ----------------------------------------------------------------------------- |
|
48 // |
|
49 TInt Ctprovidertest::RunMethodL( |
|
50 CStifItemParser& aItem ) |
|
51 { |
|
52 |
|
53 static TStifFunctionInfo const KFunctions[] = |
|
54 { |
|
55 // Copy this line for every implemented function. |
|
56 // First string is the function name used in TestScripter script file. |
|
57 // Second is the actual implementation member function. |
|
58 ENTRY( "Example", Ctprovidertest::ExampleL ), |
|
59 ENTRY( "AddTest1", Ctprovidertest :: AddTest1L ), |
|
60 ENTRY( "AddTest2", Ctprovidertest :: AddTest2L ), |
|
61 ENTRY( "AddGeneric", Ctprovidertest :: AddGenericL ), |
|
62 ENTRY( "DeleteTest" , Ctprovidertest :: DeletetestL), |
|
63 ENTRY( "GetListGeneric",Ctprovidertest :: GetListGenericL ), |
|
64 ENTRY("AddGenericPos" , Ctprovidertest :: AddGenericPosL), |
|
65 ENTRY("DeleteTestPos" , Ctprovidertest :: DeleteGenericPosL), |
|
66 ENTRY( "GetListGenericPos",Ctprovidertest :: GetListGenericPosL ), |
|
67 |
|
68 }; |
|
69 |
|
70 const TInt count = sizeof( KFunctions ) / |
|
71 sizeof( TStifFunctionInfo ); |
|
72 |
|
73 return RunInternalL( KFunctions, count, aItem ); |
|
74 |
|
75 } |
|
76 |
|
77 // ----------------------------------------------------------------------------- |
|
78 // Ctprovidertest::ExampleL |
|
79 // Example test method function. |
|
80 // (other items were commented in a header). |
|
81 // ----------------------------------------------------------------------------- |
|
82 // |
|
83 TInt Ctprovidertest::ExampleL( CStifItemParser& aItem ) |
|
84 { |
|
85 |
|
86 // Print to UI |
|
87 _LIT( Ktprovidertest, "tprovidertest" ); |
|
88 _LIT( KExample, "In Example" ); |
|
89 TestModuleIf().Printf( 0, Ktprovidertest, KExample ); |
|
90 // Print to log file |
|
91 iLog->Log( KExample ); |
|
92 |
|
93 TInt i = 0; |
|
94 TPtrC string; |
|
95 _LIT( KParam, "Param[%i]: %S" ); |
|
96 while ( aItem.GetNextString ( string ) == KErrNone ) |
|
97 { |
|
98 TestModuleIf().Printf( i, Ktprovidertest, |
|
99 KParam, i, &string ); |
|
100 i++; |
|
101 } |
|
102 |
|
103 return KErrNone; |
|
104 |
|
105 } |
|
106 |
|
107 |
|
108 // ----------------------------------------------------------------------------- |
|
109 // Ctprovidertest::ExampleL |
|
110 // Example test method function. |
|
111 // (other items were commented in a header). |
|
112 // ----------------------------------------------------------------------------- |
|
113 // |
|
114 TInt Ctprovidertest::AddTest1L( CStifItemParser& /*aItem*/ ) |
|
115 { |
|
116 |
|
117 |
|
118 _LIT(KTProvidertest , "tprovidertest") ; |
|
119 iLog->Log(KTProvidertest) ; |
|
120 |
|
121 __UHEAP_MARK ; |
|
122 |
|
123 TRAPD(error , taddtest1L() ) ; |
|
124 |
|
125 __UHEAP_MARKEND ; |
|
126 return KErrNone; |
|
127 |
|
128 } |
|
129 |
|
130 TInt Ctprovidertest::AddTest2L( CStifItemParser& /*aItem*/ ) |
|
131 { |
|
132 |
|
133 |
|
134 _LIT(KTProvidertest , "tprovidertest") ; |
|
135 iLog->Log(KTProvidertest) ; |
|
136 |
|
137 __UHEAP_MARK ; |
|
138 |
|
139 TRAPD(error , taddtest2L() ) ; |
|
140 |
|
141 __UHEAP_MARKEND ; |
|
142 return KErrNone; |
|
143 |
|
144 } |
|
145 |
|
146 |
|
147 // ----------------------------------------------------------------------------- |
|
148 // Ctprovidertest::AddGenericL |
|
149 // Example test method function. |
|
150 // (other items were commented in a header). |
|
151 // ----------------------------------------------------------------------------- |
|
152 // |
|
153 TInt Ctprovidertest::AddGenericL( CStifItemParser& aItem ) |
|
154 { |
|
155 |
|
156 TInt ret = 0 ; |
|
157 |
|
158 _LIT(KTProvidertest , "tprovidertest") ; |
|
159 iLog->Log(KTProvidertest) ; |
|
160 |
|
161 __UHEAP_MARK ; |
|
162 |
|
163 CEventDetails *eventDetails = CEventDetails :: NewL() ; |
|
164 |
|
165 |
|
166 TInt ParsedValue ; |
|
167 |
|
168 TBufC<100> String; |
|
169 TPtrC sptr; |
|
170 sptr.Set(String); |
|
171 TInt ParsedValue1 ; |
|
172 |
|
173 |
|
174 |
|
175 if(aItem.GetNextInt( ParsedValue) != KErrNone ) |
|
176 { |
|
177 _LIT(KLog , "Eventid not found") ; |
|
178 iLog->Log(KLog) ; |
|
179 User :: Leave(KErrArgument) ; |
|
180 } |
|
181 |
|
182 |
|
183 |
|
184 |
|
185 if((ParsedValue >= KCallEvent ) && (ParsedValue <=KLogLbsAssistanceDataEvent)) |
|
186 { |
|
187 eventDetails->SetEventType(ParsedValue) ; |
|
188 } |
|
189 |
|
190 else |
|
191 { |
|
192 _LIT(KLog , "Wrong input EventID") ; |
|
193 iLog->Log(KLog) ; |
|
194 // User :: Leave(KErrGeneral) ; |
|
195 } |
|
196 |
|
197 |
|
198 |
|
199 |
|
200 |
|
201 if(aItem.GetNextInt(ParsedValue) != KErrNone) |
|
202 { |
|
203 _LIT(KLog , "duration not found") ; |
|
204 iLog->Log(KLog) ; |
|
205 User :: Leave(KErrArgument) ; |
|
206 } |
|
207 |
|
208 if(ParsedValue > 0 ) |
|
209 { |
|
210 eventDetails->SetDurationType(ParsedValue) ; |
|
211 } |
|
212 |
|
213 |
|
214 if(aItem.GetNextInt(ParsedValue) != KErrNone) |
|
215 { |
|
216 _LIT(KLog , "contact id not found") ; |
|
217 iLog->Log(KLog) ; |
|
218 User :: Leave(KErrArgument) ; |
|
219 } |
|
220 |
|
221 if(ParsedValue > 0 ) |
|
222 { |
|
223 eventDetails->SetContactType(ParsedValue) ; |
|
224 } |
|
225 |
|
226 |
|
227 |
|
228 if(aItem.GetNextInt(ParsedValue) != KErrNone) |
|
229 { |
|
230 _LIT(KLog , "link value not found") ; |
|
231 iLog->Log(KLog) ; |
|
232 User :: Leave(KErrArgument) ; |
|
233 } |
|
234 |
|
235 if(ParsedValue > 0 ) |
|
236 { |
|
237 eventDetails->SetLinkType(ParsedValue) ; |
|
238 } |
|
239 |
|
240 if(aItem.GetNextInt(ParsedValue) != KErrNone) |
|
241 { |
|
242 _LIT(KLog , "time value not found") ; |
|
243 iLog->Log(KLog) ; |
|
244 User :: Leave(KErrArgument) ; |
|
245 } |
|
246 |
|
247 if(ParsedValue> 0 ) |
|
248 { |
|
249 |
|
250 TTime time(ParsedValue); |
|
251 eventDetails->SetTimer(time) ; |
|
252 } |
|
253 |
|
254 _LIT(KNull,"NULL"); |
|
255 |
|
256 if(aItem.GetNextString(sptr) !=KErrNone) |
|
257 { |
|
258 _LIT(KLog , "subject not found") ; |
|
259 iLog->Log(KLog) ; |
|
260 User :: Leave(KErrArgument) ; |
|
261 } |
|
262 |
|
263 if((sptr.Compare(KNull))) |
|
264 { |
|
265 eventDetails->SetSubjectType(sptr) ; |
|
266 } |
|
267 |
|
268 if(aItem.GetNextString(sptr) !=KErrNone) |
|
269 { |
|
270 _LIT(KLog , "phone number not found") ; |
|
271 iLog->Log(KLog) ; |
|
272 User :: Leave(KErrArgument) ; |
|
273 } |
|
274 |
|
275 if((sptr.Compare(KNull))) |
|
276 { |
|
277 eventDetails->SetNumberType(sptr) ; |
|
278 } |
|
279 |
|
280 if(aItem.GetNextString(sptr) !=KErrNone) |
|
281 { |
|
282 _LIT(KLog , "remote party number not found") ; |
|
283 iLog->Log(KLog) ; |
|
284 User :: Leave(KErrArgument) ; |
|
285 } |
|
286 |
|
287 if((sptr.Compare(KNull))) |
|
288 { |
|
289 eventDetails->SetRemotePartyType(sptr) ; |
|
290 } |
|
291 |
|
292 if(aItem.GetNextInt(ParsedValue) != KErrNone) |
|
293 { |
|
294 _LIT(KLog , "direction not found") ; |
|
295 iLog->Log(KLog) ; |
|
296 User :: Leave(KErrArgument) ; |
|
297 } |
|
298 |
|
299 if(ParsedValue >= 0) |
|
300 { |
|
301 eventDetails->SetDirectionType(ParsedValue) ; |
|
302 } |
|
303 |
|
304 |
|
305 |
|
306 if(aItem.GetNextString(sptr) !=KErrNone) |
|
307 { |
|
308 _LIT(KLog , "description not found") ; |
|
309 iLog->Log(KLog) ; |
|
310 |
|
311 User :: Leave(KErrArgument) ; |
|
312 } |
|
313 |
|
314 if((sptr.Compare(KNull))) |
|
315 { |
|
316 eventDetails->SetDescriptionType(sptr) ; |
|
317 } |
|
318 |
|
319 if(aItem.GetNextInt(ParsedValue) !=KErrNone) |
|
320 { |
|
321 _LIT(KLog , "status value not found") ; |
|
322 iLog->Log(KLog) ; |
|
323 User :: Leave(KErrArgument) ; |
|
324 } |
|
325 |
|
326 if(ParsedValue >= 0) |
|
327 { |
|
328 eventDetails->SetStatusType(ParsedValue) ; |
|
329 } |
|
330 |
|
331 |
|
332 |
|
333 if(aItem.GetNextInt(ParsedValue1) != KErrNone) |
|
334 { |
|
335 _LIT(KLog , "Sync/Async version not found") ; |
|
336 iLog->Log(KLog) ; |
|
337 User :: Leave(KErrArgument) ; |
|
338 } |
|
339 |
|
340 |
|
341 if(aItem.GetNextString(sptr) !=KErrNone) |
|
342 { |
|
343 _LIT(KLog , "data not found") ; |
|
344 iLog->Log(KLog) ; |
|
345 |
|
346 User :: Leave(KErrArgument) ; |
|
347 } |
|
348 if((sptr.Compare(KNull))) |
|
349 { |
|
350 eventDetails->SetDataType(sptr) ; |
|
351 } |
|
352 |
|
353 |
|
354 |
|
355 |
|
356 |
|
357 |
|
358 if(aItem.GetNextInt(ParsedValue) != KErrNone ) |
|
359 { |
|
360 _LIT(KLog , "Expected value not found") ; |
|
361 iLog->Log(KLog) ; |
|
362 ret = KErrNone ; |
|
363 } |
|
364 else |
|
365 { |
|
366 ret = ParsedValue ; |
|
367 } |
|
368 |
|
369 |
|
370 |
|
371 |
|
372 |
|
373 |
|
374 TRAPD(error , taddgenericL(eventDetails,ParsedValue1)) ; |
|
375 delete eventDetails; |
|
376 |
|
377 |
|
378 |
|
379 __UHEAP_MARKEND; |
|
380 |
|
381 if(error == ret) |
|
382 { |
|
383 return KErrNone; |
|
384 } |
|
385 return error ; |
|
386 |
|
387 } |
|
388 //------------------------------------------------------------------------- |
|
389 // Ctprovidertest :: Deletetest |
|
390 // Tests the delete use case ofthe provider |
|
391 //------------------------------------------------------------------------- |
|
392 |
|
393 TInt Ctprovidertest::DeletetestL( CStifItemParser& aItem ) |
|
394 { |
|
395 TInt parseval = 0 ; |
|
396 TInt async = 0 ; |
|
397 TInt allEvents = 0 ; |
|
398 |
|
399 __UHEAP_MARK ; |
|
400 |
|
401 if(aItem.GetNextInt(async) != KErrNone) |
|
402 { |
|
403 _LIT(KLog , "Sync/Async version not found") ; |
|
404 iLog->Log(KLog) ; |
|
405 User :: Leave(KErrNotFound) ; |
|
406 } |
|
407 |
|
408 TInt ret = 0 ; |
|
409 |
|
410 if(aItem.GetNextInt(allEvents )) |
|
411 { |
|
412 _LIT8(KLog , "All events field not found") ; |
|
413 iLog->Log(KLog) ; |
|
414 } |
|
415 //Get the expected return value |
|
416 |
|
417 if(aItem.GetNextInt(parseval) != KErrNone) |
|
418 { |
|
419 _LIT(KLog , "Expected output not found") ; |
|
420 iLog->Log(KLog) ; |
|
421 User :: Leave(KErrNotFound) ; |
|
422 } |
|
423 |
|
424 TInt retval = 0 ; |
|
425 |
|
426 if(allEvents) |
|
427 { |
|
428 _LIT(KLog , "Delete all events called \n") ; |
|
429 iLog->Log(KLog) ; |
|
430 TRAPD(err , tdeleteAllEventsL(async)) ; |
|
431 |
|
432 if(err != parseval) |
|
433 { |
|
434 _LIT(KLog , "Expected and the return values doesn't match") ; |
|
435 iLog->Log(KLog) ; |
|
436 } |
|
437 } |
|
438 |
|
439 if(async) |
|
440 { |
|
441 _LIT(KLog , "Functionality test of delete async api") ; |
|
442 iLog->Log(KLog) ; |
|
443 |
|
444 TRAPD(aerr , tdeleteTestasyncL(parseval)) ; |
|
445 |
|
446 if(aerr != parseval) |
|
447 { |
|
448 _LIT(KLog , "Expected and the return value dont match") ; |
|
449 iLog->Log(KLog) ; |
|
450 retval = KErrArgument ; |
|
451 } |
|
452 else |
|
453 { |
|
454 retval = KErrNone ; |
|
455 } |
|
456 |
|
457 } |
|
458 else |
|
459 { |
|
460 TRAPD(error , tdeleteTestL(parseval)) ; |
|
461 |
|
462 if(error != parseval) |
|
463 { |
|
464 _LIT(KLog , "Expected and the return value dont match") ; |
|
465 iLog->Log(KLog) ; |
|
466 retval = KErrArgument ; |
|
467 } |
|
468 else |
|
469 { |
|
470 retval = KErrNone ; |
|
471 } |
|
472 } |
|
473 |
|
474 |
|
475 __UHEAP_MARKEND ; |
|
476 |
|
477 |
|
478 return KErrNone ; |
|
479 } |
|
480 |
|
481 // ----------------------------------------------------------------------------- |
|
482 // Ctprovidertest::GetListGenericL |
|
483 // Example test method function. |
|
484 // (other items were commented in a header). |
|
485 // ----------------------------------------------------------------------------- |
|
486 // |
|
487 TInt Ctprovidertest::GetListGenericL( CStifItemParser& aItem ) |
|
488 |
|
489 { |
|
490 TInt ret = 0 ; |
|
491 |
|
492 _LIT(KTProvidertest , "tprovidertest") ; |
|
493 iLog->Log(KTProvidertest) ; |
|
494 |
|
495 __UHEAP_MARK ; |
|
496 |
|
497 CFilterDetails *filterDetails = CFilterDetails::NewL() ; |
|
498 |
|
499 TInt ParsedValue ; |
|
500 |
|
501 TBufC<100> String; |
|
502 TPtrC sptr; |
|
503 sptr.Set(String); |
|
504 TInt ParsedValue1 ; |
|
505 |
|
506 _LIT(KNull,"NULL"); |
|
507 |
|
508 |
|
509 if(aItem.GetNextString(sptr) !=KErrNone) |
|
510 { |
|
511 _LIT(KLog , "id not found") ; |
|
512 iLog->Log(KLog) ; |
|
513 User :: Leave(KErrArgument) ; |
|
514 } |
|
515 |
|
516 if((sptr.Compare(KNull))) |
|
517 { |
|
518 filterDetails->SetEventId(sptr) ; |
|
519 } |
|
520 |
|
521 |
|
522 /* if(aItem.GetNextInt(ParsedValue) != KErrNone) |
|
523 { |
|
524 _LIT(KLog , "Event id not found") ; |
|
525 iLog->Log(KLog) ; |
|
526 User :: Leave(KErrArgument) ; |
|
527 } |
|
528 |
|
529 if(ParsedValue > 0 ) |
|
530 { |
|
531 filterDetails->SetEventId(ParsedValue) ; |
|
532 }*/ |
|
533 |
|
534 |
|
535 |
|
536 if(aItem.GetNextInt( ParsedValue) != KErrNone ) |
|
537 { |
|
538 _LIT(KLog , "Eventtype not found") ; |
|
539 iLog->Log(KLog) ; |
|
540 User :: Leave(KErrArgument) ; |
|
541 } |
|
542 |
|
543 if((ParsedValue >= KCallEvent ) && (ParsedValue <=KLogLbsAssistanceDataEvent)) |
|
544 { |
|
545 filterDetails->SetEventType(ParsedValue) ; |
|
546 } |
|
547 /* switch(ParsedValue) |
|
548 { |
|
549 |
|
550 |
|
551 case KCallEvent : |
|
552 { |
|
553 filterDetails->SetEventType(KLogCallEventType) ; |
|
554 break ; |
|
555 |
|
556 } |
|
557 |
|
558 case KLogDataEvent : |
|
559 |
|
560 |
|
561 filterDetails->SetEventType(KLogDataEventType) ; |
|
562 break; |
|
563 |
|
564 |
|
565 case KLogFaxEvent : |
|
566 filterDetails->SetEventType(KLogFaxEventType) ; |
|
567 break ; |
|
568 |
|
569 case KLogShortMessageEvent : |
|
570 filterDetails->SetEventType(KLogShortMessageEventType) ; |
|
571 break ; |
|
572 |
|
573 case KLogMailEvent : |
|
574 filterDetails->SetEventType(KLogMailEventType) ; |
|
575 break ; |
|
576 |
|
577 case KLogTaskSchedulerEvent : |
|
578 filterDetails->SetEventType(KLogTaskSchedulerEventType) ; |
|
579 break ; |
|
580 |
|
581 case KLogPacketDataEvent : |
|
582 filterDetails->SetEventType(KLogPacketDataEventType) ; |
|
583 break ; |
|
584 |
|
585 case KLogLbsSelfLocateEvent : |
|
586 filterDetails->SetEventType(KLogLbsSelfLocateEventType) ; |
|
587 break ; |
|
588 |
|
589 case KLogLbsExternalLocateEvent : |
|
590 filterDetails->SetEventType(KLogLbsExternalLocateEventType) ; |
|
591 break ; |
|
592 |
|
593 case KLogLbsTransmitLocationEvent : |
|
594 filterDetails->SetEventType(KLogLbsTransmitLocationEventType) ; |
|
595 break ; |
|
596 |
|
597 case KLogLbsNetworkLocateEvent : |
|
598 filterDetails->SetEventType(KLogLbsNetworkLocateEventType) ; |
|
599 break ; |
|
600 |
|
601 case KLogLbsAssistanceDataEvent : |
|
602 filterDetails->SetEventType(KLogLbsAssistanceDataEventType) ; |
|
603 break ; |
|
604 |
|
605 default: |
|
606 |
|
607 break; |
|
608 |
|
609 } |
|
610 */ |
|
611 |
|
612 if(aItem.GetNextInt(ParsedValue) != KErrNone) |
|
613 { |
|
614 _LIT(KLog , "contact id not found") ; |
|
615 iLog->Log(KLog) ; |
|
616 User :: Leave(KErrArgument) ; |
|
617 } |
|
618 |
|
619 if(ParsedValue > 0 ) |
|
620 { |
|
621 filterDetails->SetContactType(ParsedValue) ; |
|
622 } |
|
623 |
|
624 if(aItem.GetNextInt(ParsedValue) != KErrNone) |
|
625 { |
|
626 _LIT(KLog , "time value not found") ; |
|
627 iLog->Log(KLog) ; |
|
628 User :: Leave(KErrArgument) ; |
|
629 } |
|
630 |
|
631 if(ParsedValue> 0 ) |
|
632 { |
|
633 |
|
634 TTime time(ParsedValue); |
|
635 filterDetails->SetTimer(time) ; |
|
636 } |
|
637 |
|
638 // _LIT(KNull,"NULL"); |
|
639 |
|
640 |
|
641 if(aItem.GetNextString(sptr) !=KErrNone) |
|
642 { |
|
643 _LIT(KLog , "phone number not found") ; |
|
644 iLog->Log(KLog) ; |
|
645 User :: Leave(KErrArgument) ; |
|
646 } |
|
647 |
|
648 if((sptr.Compare(KNull))) |
|
649 { |
|
650 filterDetails->SetNumberType(sptr) ; |
|
651 } |
|
652 |
|
653 if(aItem.GetNextString(sptr) !=KErrNone) |
|
654 { |
|
655 _LIT(KLog , "remote party number not found") ; |
|
656 iLog->Log(KLog) ; |
|
657 User :: Leave(KErrArgument) ; |
|
658 } |
|
659 |
|
660 if((sptr.Compare(KNull))) |
|
661 { |
|
662 filterDetails->SetRemotePartyType(sptr) ; |
|
663 } |
|
664 |
|
665 if(aItem.GetNextInt(ParsedValue) != KErrNone) |
|
666 { |
|
667 _LIT(KLog , "direction not found") ; |
|
668 iLog->Log(KLog) ; |
|
669 User :: Leave(KErrArgument) ; |
|
670 } |
|
671 |
|
672 if(ParsedValue >= 0 ) |
|
673 { |
|
674 filterDetails->SetDirectionType(ParsedValue) ; |
|
675 } |
|
676 |
|
677 if(aItem.GetNextInt(ParsedValue) !=KErrNone) |
|
678 { |
|
679 _LIT(KLog , "status value not found") ; |
|
680 iLog->Log(KLog) ; |
|
681 User :: Leave(KErrArgument) ; |
|
682 } |
|
683 |
|
684 if(ParsedValue >= 0 ) |
|
685 { |
|
686 filterDetails->SetStatusType(ParsedValue) ; |
|
687 } |
|
688 |
|
689 |
|
690 |
|
691 if(aItem.GetNextInt(ParsedValue) != KErrNone) |
|
692 { |
|
693 _LIT(KLog , "Recent list not found") ; |
|
694 iLog->Log(KLog) ; |
|
695 User :: Leave(KErrArgument) ; |
|
696 } |
|
697 |
|
698 /* switch(ParsedValue) |
|
699 { |
|
700 case -1 : |
|
701 filterDetails->SetRecentList(KLogNullRecentList) ; |
|
702 break; |
|
703 case 1 : |
|
704 filterDetails->SetRecentList(KLogRecentIncomingCalls); |
|
705 break; |
|
706 case 2 : |
|
707 filterDetails->SetRecentList(KLogRecentOutgoingCalls); |
|
708 break; |
|
709 case 3 : |
|
710 filterDetails->SetRecentList(KLogRecentMissedCalls); |
|
711 break; |
|
712 default : |
|
713 break; |
|
714 }*/ |
|
715 |
|
716 if(ParsedValue == 0 || ParsedValue < -1 ) |
|
717 { |
|
718 ; |
|
719 } |
|
720 else |
|
721 { |
|
722 filterDetails->SetRecentList(ParsedValue) ; |
|
723 } |
|
724 |
|
725 |
|
726 |
|
727 |
|
728 if(aItem.GetNextInt( ParsedValue) != KErrNone ) |
|
729 { |
|
730 _LIT(KLog , "all events not found") ; |
|
731 iLog->Log(KLog) ; |
|
732 User :: Leave(KErrArgument) ; |
|
733 } |
|
734 |
|
735 |
|
736 if(ParsedValue == 0 ) |
|
737 { |
|
738 filterDetails->SetAllEvent(FALSE) ; |
|
739 } |
|
740 else if(ParsedValue == 1) |
|
741 |
|
742 { |
|
743 filterDetails->SetAllEvent(TRUE); |
|
744 } |
|
745 |
|
746 |
|
747 |
|
748 |
|
749 if(aItem.GetNextInt(ParsedValue1) != KErrNone) |
|
750 { |
|
751 _LIT(KLog , "Sync/Async version not found") ; |
|
752 iLog->Log(KLog) ; |
|
753 User :: Leave(KErrArgument) ; |
|
754 } |
|
755 |
|
756 |
|
757 if(aItem.GetNextInt(ParsedValue) != KErrNone ) |
|
758 { |
|
759 _LIT(KLog , "Expected value not found") ; |
|
760 iLog->Log(KLog) ; |
|
761 ret = KErrNone ; |
|
762 } |
|
763 else |
|
764 { |
|
765 ret = ParsedValue ; |
|
766 } |
|
767 |
|
768 |
|
769 TRAPD(error , tgetlistgenericL(filterDetails,ParsedValue1)) ; |
|
770 delete filterDetails; |
|
771 |
|
772 __UHEAP_MARKEND; |
|
773 |
|
774 if(error == ret) |
|
775 { |
|
776 return KErrNone; |
|
777 } |
|
778 return error; |
|
779 |
|
780 |
|
781 } |
|
782 |
|
783 //======================================================================================================= |
|
784 // Position based parsing testcases |
|
785 //======================================================================================================= |
|
786 |
|
787 |
|
788 // Ctprovidertest::AddGenericL |
|
789 // Example test method function. |
|
790 // (other items were commented in a header). |
|
791 // ----------------------------------------------------------------------------- |
|
792 // |
|
793 TInt Ctprovidertest::AddGenericPosL( CStifItemParser& aItem ) |
|
794 { |
|
795 |
|
796 TInt ret = 0 ; |
|
797 |
|
798 _LIT(KTProvidertest , "tprovidertest") ; |
|
799 iLog->Log(KTProvidertest) ; |
|
800 |
|
801 __UHEAP_MARK ; |
|
802 |
|
803 CEventDetails *eventDetails = CEventDetails :: NewL() ; |
|
804 |
|
805 |
|
806 TInt ParsedValue ; |
|
807 |
|
808 TBufC<100> String; |
|
809 TPtrC sptr; |
|
810 sptr.Set(String); |
|
811 TInt ParsedValue1 ; |
|
812 |
|
813 |
|
814 |
|
815 if(aItem.GetNextInt( ParsedValue) != KErrNone ) |
|
816 { |
|
817 _LIT(KLog , "Eventid not found") ; |
|
818 iLog->Log(KLog) ; |
|
819 User :: Leave(KErrArgument) ; |
|
820 } |
|
821 |
|
822 if((ParsedValue >= KCallEvent ) && (ParsedValue <=KLogLbsAssistanceDataEvent)) |
|
823 { |
|
824 eventDetails->SetEventType(ParsedValue) ; |
|
825 } |
|
826 |
|
827 else |
|
828 { |
|
829 _LIT(KLog , "Wrong input EventID") ; |
|
830 iLog->Log(KLog) ; |
|
831 // User :: Leave(KErrGeneral) ; |
|
832 } |
|
833 |
|
834 |
|
835 |
|
836 |
|
837 |
|
838 if(aItem.GetNextInt(ParsedValue) != KErrNone) |
|
839 { |
|
840 _LIT(KLog , "duration not found") ; |
|
841 iLog->Log(KLog) ; |
|
842 User :: Leave(KErrArgument) ; |
|
843 } |
|
844 |
|
845 if(ParsedValue > 0 ) |
|
846 { |
|
847 eventDetails->SetDurationType(ParsedValue) ; |
|
848 } |
|
849 |
|
850 |
|
851 if(aItem.GetNextInt(ParsedValue) != KErrNone) |
|
852 { |
|
853 _LIT(KLog , "contact id not found") ; |
|
854 iLog->Log(KLog) ; |
|
855 User :: Leave(KErrArgument) ; |
|
856 } |
|
857 |
|
858 if(ParsedValue > 0 ) |
|
859 { |
|
860 eventDetails->SetContactType(ParsedValue) ; |
|
861 } |
|
862 |
|
863 |
|
864 |
|
865 if(aItem.GetNextInt(ParsedValue) != KErrNone) |
|
866 { |
|
867 _LIT(KLog , "link value not found") ; |
|
868 iLog->Log(KLog) ; |
|
869 User :: Leave(KErrArgument) ; |
|
870 } |
|
871 |
|
872 if(ParsedValue > 0 ) |
|
873 { |
|
874 eventDetails->SetLinkType(ParsedValue) ; |
|
875 } |
|
876 |
|
877 if(aItem.GetNextInt(ParsedValue) != KErrNone) |
|
878 { |
|
879 _LIT(KLog , "time value not found") ; |
|
880 iLog->Log(KLog) ; |
|
881 User :: Leave(KErrArgument) ; |
|
882 } |
|
883 |
|
884 if(ParsedValue> 0 ) |
|
885 { |
|
886 |
|
887 TTime time(ParsedValue); |
|
888 eventDetails->SetTimer(time) ; |
|
889 } |
|
890 |
|
891 _LIT(KNull,"NULL"); |
|
892 |
|
893 if(aItem.GetNextString(sptr) !=KErrNone) |
|
894 { |
|
895 _LIT(KLog , "subject not found") ; |
|
896 iLog->Log(KLog) ; |
|
897 User :: Leave(KErrArgument) ; |
|
898 } |
|
899 |
|
900 if((sptr.Compare(KNull))) |
|
901 { |
|
902 eventDetails->SetSubjectType(sptr) ; |
|
903 } |
|
904 |
|
905 if(aItem.GetNextString(sptr) !=KErrNone) |
|
906 { |
|
907 _LIT(KLog , "phone number not found") ; |
|
908 iLog->Log(KLog) ; |
|
909 User :: Leave(KErrArgument) ; |
|
910 } |
|
911 |
|
912 if((sptr.Compare(KNull))) |
|
913 { |
|
914 eventDetails->SetNumberType(sptr) ; |
|
915 } |
|
916 |
|
917 if(aItem.GetNextString(sptr) !=KErrNone) |
|
918 { |
|
919 _LIT(KLog , "remote party number not found") ; |
|
920 iLog->Log(KLog) ; |
|
921 User :: Leave(KErrArgument) ; |
|
922 } |
|
923 |
|
924 if((sptr.Compare(KNull))) |
|
925 { |
|
926 eventDetails->SetRemotePartyType(sptr) ; |
|
927 } |
|
928 |
|
929 if(aItem.GetNextInt(ParsedValue) !=KErrNone) |
|
930 { |
|
931 _LIT(KLog , "direction not found") ; |
|
932 iLog->Log(KLog) ; |
|
933 User :: Leave(KErrArgument) ; |
|
934 } |
|
935 |
|
936 if(ParsedValue >= 0) |
|
937 { |
|
938 eventDetails->SetDirectionType(ParsedValue) ; |
|
939 } |
|
940 |
|
941 if(aItem.GetNextString(sptr) !=KErrNone) |
|
942 { |
|
943 _LIT(KLog , "description not found") ; |
|
944 iLog->Log(KLog) ; |
|
945 |
|
946 User :: Leave(KErrArgument) ; |
|
947 } |
|
948 |
|
949 if((sptr.Compare(KNull))) |
|
950 { |
|
951 eventDetails->SetDescriptionType(sptr) ; |
|
952 } |
|
953 |
|
954 if(aItem.GetNextInt(ParsedValue) != KErrNone) |
|
955 { |
|
956 _LIT(KLog , "status value not found") ; |
|
957 iLog->Log(KLog) ; |
|
958 User :: Leave(KErrArgument) ; |
|
959 } |
|
960 |
|
961 if(ParsedValue >= 0) |
|
962 { |
|
963 eventDetails->SetStatusType(ParsedValue) ; |
|
964 } |
|
965 |
|
966 |
|
967 |
|
968 if(aItem.GetNextInt(ParsedValue1) != KErrNone) |
|
969 { |
|
970 _LIT(KLog , "Sync/Async version not found") ; |
|
971 iLog->Log(KLog) ; |
|
972 User :: Leave(KErrArgument) ; |
|
973 } |
|
974 |
|
975 |
|
976 |
|
977 |
|
978 |
|
979 |
|
980 |
|
981 |
|
982 if(aItem.GetNextInt(ParsedValue) != KErrNone ) |
|
983 { |
|
984 _LIT(KLog , "Expected value not found") ; |
|
985 iLog->Log(KLog) ; |
|
986 ret = KErrNone ; |
|
987 } |
|
988 else |
|
989 { |
|
990 ret = ParsedValue ; |
|
991 } |
|
992 |
|
993 |
|
994 |
|
995 |
|
996 |
|
997 |
|
998 TRAPD(error , taddgenericPosL(eventDetails,ParsedValue1)) ; |
|
999 delete eventDetails; |
|
1000 |
|
1001 |
|
1002 |
|
1003 __UHEAP_MARKEND; |
|
1004 |
|
1005 if(error == ret) |
|
1006 { |
|
1007 return KErrNone; |
|
1008 } |
|
1009 return error ; |
|
1010 |
|
1011 } |
|
1012 |
|
1013 |
|
1014 //------------------------------------------------------------------------- |
|
1015 // Ctprovidertest :: Deletetest Position Based |
|
1016 // Tests the delete use case ofthe provider |
|
1017 //------------------------------------------------------------------------- |
|
1018 |
|
1019 TInt Ctprovidertest::DeleteGenericPosL( CStifItemParser& aItem ) |
|
1020 { |
|
1021 TInt parseval = 0 ; |
|
1022 TInt async = 0 ; |
|
1023 |
|
1024 __UHEAP_MARK ; |
|
1025 |
|
1026 if(aItem.GetNextInt(async) != KErrNone) |
|
1027 { |
|
1028 _LIT(KLog , "Sync/Async version not found") ; |
|
1029 iLog->Log(KLog) ; |
|
1030 User :: Leave(KErrNotFound) ; |
|
1031 } |
|
1032 TInt ret = 0 ; |
|
1033 |
|
1034 //Get the expected return value |
|
1035 |
|
1036 if(aItem.GetNextInt(parseval) != KErrNone) |
|
1037 { |
|
1038 _LIT(KLog , "Expected output not found") ; |
|
1039 iLog->Log(KLog) ; |
|
1040 User :: Leave(KErrNotFound) ; |
|
1041 } |
|
1042 |
|
1043 TInt retval = 0 ; |
|
1044 |
|
1045 if(async) |
|
1046 { |
|
1047 _LIT(KLog , "Functionality test of delete async api") ; |
|
1048 iLog->Log(KLog) ; |
|
1049 |
|
1050 TRAPD(aerr , tdeleteTestasyncL(parseval)) ; |
|
1051 |
|
1052 if(aerr != parseval) |
|
1053 { |
|
1054 _LIT(KLog , "Expected and the return value dont match") ; |
|
1055 iLog->Log(KLog) ; |
|
1056 retval = KErrArgument ; |
|
1057 } |
|
1058 else |
|
1059 { |
|
1060 retval = KErrNone ; |
|
1061 } |
|
1062 |
|
1063 } |
|
1064 else |
|
1065 { |
|
1066 TRAPD(error , tdeleteTestPosL(parseval)) ; |
|
1067 |
|
1068 if(error != parseval) |
|
1069 { |
|
1070 _LIT(KLog , "Expected and the return value dont match") ; |
|
1071 iLog->Log(KLog) ; |
|
1072 retval = KErrArgument ; |
|
1073 } |
|
1074 else |
|
1075 { |
|
1076 retval = KErrNone ; |
|
1077 } |
|
1078 } |
|
1079 |
|
1080 |
|
1081 __UHEAP_MARKEND ; |
|
1082 |
|
1083 |
|
1084 return KErrNone ; |
|
1085 } |
|
1086 |
|
1087 // ----------------------------------------------------------------------------- |
|
1088 // Ctprovidertest::GetListGenericL |
|
1089 // Example test method function. |
|
1090 // (other items were commented in a header). |
|
1091 // ----------------------------------------------------------------------------- |
|
1092 // |
|
1093 TInt Ctprovidertest::GetListGenericPosL( CStifItemParser& aItem ) |
|
1094 |
|
1095 { |
|
1096 TInt ret = 0 ; |
|
1097 |
|
1098 _LIT(KTProvidertest , "tprovidertest") ; |
|
1099 iLog->Log(KTProvidertest) ; |
|
1100 |
|
1101 __UHEAP_MARK ; |
|
1102 |
|
1103 CFilterDetails *filterDetails = CFilterDetails::NewL() ; |
|
1104 |
|
1105 TInt ParsedValue ; |
|
1106 |
|
1107 TBufC<100> String; |
|
1108 TPtrC sptr; |
|
1109 sptr.Set(String); |
|
1110 TInt ParsedValue1 ; |
|
1111 |
|
1112 _LIT(KNull,"NULL"); |
|
1113 |
|
1114 if(aItem.GetNextString(sptr) !=KErrNone) |
|
1115 { |
|
1116 _LIT(KLog , "id not found") ; |
|
1117 iLog->Log(KLog) ; |
|
1118 User :: Leave(KErrArgument) ; |
|
1119 } |
|
1120 |
|
1121 if((sptr.Compare(KNull))) |
|
1122 { |
|
1123 filterDetails->SetEventId(sptr) ; |
|
1124 } |
|
1125 |
|
1126 |
|
1127 /*if(aItem.GetNextInt(ParsedValue) != KErrNone) |
|
1128 { |
|
1129 _LIT(KLog , "Event id not found") ; |
|
1130 iLog->Log(KLog) ; |
|
1131 User :: Leave(KErrArgument) ; |
|
1132 } |
|
1133 |
|
1134 if(ParsedValue > 0 ) |
|
1135 { |
|
1136 filterDetails->SetEventId(ParsedValue) ; |
|
1137 }*/ |
|
1138 |
|
1139 |
|
1140 |
|
1141 if(aItem.GetNextInt( ParsedValue) != KErrNone ) |
|
1142 { |
|
1143 _LIT(KLog , "Eventtype not found") ; |
|
1144 iLog->Log(KLog) ; |
|
1145 User :: Leave(KErrArgument) ; |
|
1146 } |
|
1147 |
|
1148 if((ParsedValue >= KCallEvent ) && (ParsedValue <=KLogLbsAssistanceDataEvent)) |
|
1149 { |
|
1150 filterDetails->SetEventType(ParsedValue) ; |
|
1151 } |
|
1152 |
|
1153 else |
|
1154 { |
|
1155 _LIT(KLog , "Wrong input EventID") ; |
|
1156 iLog->Log(KLog) ; |
|
1157 // User :: Leave(KErrGeneral) ; |
|
1158 } |
|
1159 /* switch(ParsedValue) |
|
1160 { |
|
1161 |
|
1162 |
|
1163 case KCallEvent : |
|
1164 { |
|
1165 filterDetails->SetEventType(KLogCallEventType) ; |
|
1166 break ; |
|
1167 |
|
1168 } |
|
1169 |
|
1170 case KLogDataEvent : |
|
1171 |
|
1172 |
|
1173 filterDetails->SetEventType(KLogDataEventType) ; |
|
1174 break; |
|
1175 |
|
1176 |
|
1177 case KLogFaxEvent : |
|
1178 filterDetails->SetEventType(KLogFaxEventType) ; |
|
1179 break ; |
|
1180 |
|
1181 case KLogShortMessageEvent : |
|
1182 filterDetails->SetEventType(KLogShortMessageEventType) ; |
|
1183 break ; |
|
1184 |
|
1185 case KLogMailEvent : |
|
1186 filterDetails->SetEventType(KLogMailEventType) ; |
|
1187 break ; |
|
1188 |
|
1189 case KLogTaskSchedulerEvent : |
|
1190 filterDetails->SetEventType(KLogTaskSchedulerEventType) ; |
|
1191 break ; |
|
1192 |
|
1193 case KLogPacketDataEvent : |
|
1194 filterDetails->SetEventType(KLogPacketDataEventType) ; |
|
1195 break ; |
|
1196 |
|
1197 case KLogLbsSelfLocateEvent : |
|
1198 filterDetails->SetEventType(KLogLbsSelfLocateEventType) ; |
|
1199 break ; |
|
1200 |
|
1201 case KLogLbsExternalLocateEvent : |
|
1202 filterDetails->SetEventType(KLogLbsExternalLocateEventType) ; |
|
1203 break ; |
|
1204 |
|
1205 case KLogLbsTransmitLocationEvent : |
|
1206 filterDetails->SetEventType(KLogLbsTransmitLocationEventType) ; |
|
1207 break ; |
|
1208 |
|
1209 case KLogLbsNetworkLocateEvent : |
|
1210 filterDetails->SetEventType(KLogLbsNetworkLocateEventType) ; |
|
1211 break ; |
|
1212 |
|
1213 case KLogLbsAssistanceDataEvent : |
|
1214 filterDetails->SetEventType(KLogLbsAssistanceDataEventType) ; |
|
1215 break ; |
|
1216 |
|
1217 default: |
|
1218 |
|
1219 break; |
|
1220 |
|
1221 }*/ |
|
1222 |
|
1223 |
|
1224 if(aItem.GetNextInt(ParsedValue) != KErrNone) |
|
1225 { |
|
1226 _LIT(KLog , "contact id not found") ; |
|
1227 iLog->Log(KLog) ; |
|
1228 User :: Leave(KErrArgument) ; |
|
1229 } |
|
1230 |
|
1231 if(ParsedValue > 0 ) |
|
1232 { |
|
1233 filterDetails->SetContactType(ParsedValue) ; |
|
1234 } |
|
1235 |
|
1236 if(aItem.GetNextInt(ParsedValue) != KErrNone) |
|
1237 { |
|
1238 _LIT(KLog , "time value not found") ; |
|
1239 iLog->Log(KLog) ; |
|
1240 User :: Leave(KErrArgument) ; |
|
1241 } |
|
1242 |
|
1243 if(ParsedValue> 0 ) |
|
1244 { |
|
1245 |
|
1246 TTime time(ParsedValue); |
|
1247 filterDetails->SetTimer(time) ; |
|
1248 } |
|
1249 |
|
1250 |
|
1251 |
|
1252 |
|
1253 if(aItem.GetNextString(sptr) !=KErrNone) |
|
1254 { |
|
1255 _LIT(KLog , "phone number not found") ; |
|
1256 iLog->Log(KLog) ; |
|
1257 User :: Leave(KErrArgument) ; |
|
1258 } |
|
1259 |
|
1260 if((sptr.Compare(KNull))) |
|
1261 { |
|
1262 filterDetails->SetNumberType(sptr) ; |
|
1263 } |
|
1264 |
|
1265 if(aItem.GetNextString(sptr) !=KErrNone) |
|
1266 { |
|
1267 _LIT(KLog , "remote party number not found") ; |
|
1268 iLog->Log(KLog) ; |
|
1269 User :: Leave(KErrArgument) ; |
|
1270 } |
|
1271 |
|
1272 if((sptr.Compare(KNull))) |
|
1273 { |
|
1274 filterDetails->SetRemotePartyType(sptr) ; |
|
1275 } |
|
1276 |
|
1277 if(aItem.GetNextInt(ParsedValue) != KErrNone) |
|
1278 { |
|
1279 _LIT(KLog , "direction not found") ; |
|
1280 iLog->Log(KLog) ; |
|
1281 User :: Leave(KErrArgument) ; |
|
1282 } |
|
1283 |
|
1284 if( ParsedValue >= 0 ) |
|
1285 { |
|
1286 filterDetails->SetDirectionType(ParsedValue) ; |
|
1287 } |
|
1288 |
|
1289 if(aItem.GetNextInt(ParsedValue) !=KErrNone) |
|
1290 { |
|
1291 _LIT(KLog , "status value not found") ; |
|
1292 iLog->Log(KLog) ; |
|
1293 User :: Leave(KErrArgument) ; |
|
1294 } |
|
1295 |
|
1296 if(ParsedValue >= 0) |
|
1297 { |
|
1298 filterDetails->SetStatusType(ParsedValue) ; |
|
1299 } |
|
1300 |
|
1301 /* if(aItem.GetNextInt( ParsedValue) != KErrNone ) |
|
1302 { |
|
1303 _LIT(KLog , "recentlist not found") ; |
|
1304 iLog->Log(KLog) ; |
|
1305 User :: Leave(KErrArgument) ; |
|
1306 } |
|
1307 |
|
1308 |
|
1309 if(ParsedValue == 0 ) |
|
1310 { |
|
1311 filterDetails->SetRecentList(FALSE) ; |
|
1312 } |
|
1313 else if(ParsedValue == 1) |
|
1314 |
|
1315 { |
|
1316 filterDetails->SetRecentList(TRUE); |
|
1317 }*/ |
|
1318 |
|
1319 if(aItem.GetNextInt(ParsedValue) != KErrNone) |
|
1320 { |
|
1321 _LIT(KLog , "Recent list not found") ; |
|
1322 iLog->Log(KLog) ; |
|
1323 User :: Leave(KErrArgument) ; |
|
1324 } |
|
1325 |
|
1326 /* switch(ParsedValue) |
|
1327 { |
|
1328 case -1 : |
|
1329 filterDetails->SetRecentList(KLogNullRecentList) ; |
|
1330 break; |
|
1331 case 1 : |
|
1332 filterDetails->SetRecentList(KLogRecentIncomingCalls); |
|
1333 break; |
|
1334 case 2 : |
|
1335 filterDetails->SetRecentList(KLogRecentOutgoingCalls); |
|
1336 break; |
|
1337 case 3 : |
|
1338 filterDetails->SetRecentList(KLogRecentMissedCalls); |
|
1339 break; |
|
1340 default : |
|
1341 break; |
|
1342 }*/ |
|
1343 |
|
1344 if(ParsedValue == 0 || ParsedValue < -1 ) |
|
1345 { |
|
1346 ; |
|
1347 } |
|
1348 else |
|
1349 { |
|
1350 filterDetails->SetRecentList(ParsedValue) ; |
|
1351 } |
|
1352 |
|
1353 |
|
1354 |
|
1355 |
|
1356 if(aItem.GetNextInt( ParsedValue) != KErrNone ) |
|
1357 { |
|
1358 _LIT(KLog , "all events not found") ; |
|
1359 iLog->Log(KLog) ; |
|
1360 User :: Leave(KErrArgument) ; |
|
1361 } |
|
1362 |
|
1363 |
|
1364 if(ParsedValue == 0 ) |
|
1365 { |
|
1366 filterDetails->SetAllEvent(FALSE) ; |
|
1367 } |
|
1368 else if(ParsedValue == 1) |
|
1369 |
|
1370 { |
|
1371 filterDetails->SetAllEvent(TRUE); |
|
1372 } |
|
1373 |
|
1374 |
|
1375 |
|
1376 |
|
1377 if(aItem.GetNextInt(ParsedValue1) != KErrNone) |
|
1378 { |
|
1379 _LIT(KLog , "Sync/Async version not found") ; |
|
1380 iLog->Log(KLog) ; |
|
1381 User :: Leave(KErrArgument) ; |
|
1382 } |
|
1383 |
|
1384 |
|
1385 |
|
1386 if(aItem.GetNextInt(ParsedValue) != KErrNone ) |
|
1387 { |
|
1388 _LIT(KLog , "Expected value not found") ; |
|
1389 iLog->Log(KLog) ; |
|
1390 ret = KErrNone ; |
|
1391 } |
|
1392 else |
|
1393 { |
|
1394 ret = ParsedValue ; |
|
1395 } |
|
1396 |
|
1397 |
|
1398 TRAPD(error , tgetlistgenericPosL(filterDetails,ParsedValue1)) ; |
|
1399 delete filterDetails; |
|
1400 |
|
1401 __UHEAP_MARKEND; |
|
1402 |
|
1403 if(error == ret) |
|
1404 { |
|
1405 return KErrNone; |
|
1406 } |
|
1407 return error; |
|
1408 |
|
1409 |
|
1410 } |
|
1411 |
|
1412 |
|
1413 // ----------------------------------------------------------------------------- |
|
1414 // Ctprovidertest::?member_function |
|
1415 // ?implementation_description |
|
1416 // (other items were commented in a header). |
|
1417 // ----------------------------------------------------------------------------- |
|
1418 // |
|
1419 /* |
|
1420 TInt Ctprovidertest::?member_function( |
|
1421 CItemParser& aItem ) |
|
1422 { |
|
1423 |
|
1424 ?code |
|
1425 |
|
1426 } |
|
1427 */ |
|
1428 |
|
1429 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
1430 // None |
|
1431 |
|
1432 // End of File |