|
1 /* |
|
2 * Copyright (c) 2005 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 "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: |
|
15 * ?description_line |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 // INCLUDES |
|
21 |
|
22 #include "FT_CPosTp42.h" |
|
23 #include <EPos_CPosLandmarkDatabase.h> |
|
24 #include <bautils.h> |
|
25 |
|
26 // CONSTANTS |
|
27 _LIT(KTraceDir, "c:\\documents\\"); |
|
28 _LIT(KFileTrace, "c:\\documents\\TP42_File%d.xml"); |
|
29 _LIT(KFileTraceWild, "c:\\documents\\TP42_File*.xml"); |
|
30 |
|
31 _LIT( KDump, "%02d: '%S'" ); |
|
32 |
|
33 |
|
34 // ================= MEMBER FUNCTIONS ======================= |
|
35 |
|
36 |
|
37 // --------------------------------------------------------- |
|
38 // CPosTp42::CloseTest |
|
39 // |
|
40 // (other items were commented in a header). |
|
41 // --------------------------------------------------------- |
|
42 // |
|
43 void CPosTp42::CloseTest() |
|
44 { |
|
45 iDataToRecognize.ResetAndDestroy(); |
|
46 } |
|
47 |
|
48 // --------------------------------------------------------- |
|
49 // CPosTp42::StartL |
|
50 // |
|
51 // (other items were commented in a header). |
|
52 // --------------------------------------------------------- |
|
53 // |
|
54 void CPosTp42::StartL() |
|
55 { |
|
56 BaflUtils::EnsurePathExistsL( iFileSession, KFileTrace ); |
|
57 |
|
58 iErrorsFound = 0; |
|
59 // Test reading from buffer |
|
60 iLog->Log(_L("**************BUFFER***************")); |
|
61 TestWithBufferL(); |
|
62 |
|
63 iLog->Log(_L("**************FILE***************")); |
|
64 //Test reading from file and filehandle |
|
65 TestWithFileL(); |
|
66 |
|
67 iLog->Log(_L("**************EMPTY FILE***************")); |
|
68 //Test reading from empty file |
|
69 TestWithEmptyFileL(); |
|
70 |
|
71 iLog->Log(_L("**************LARGE FILE***************")); |
|
72 |
|
73 //Test reading from large file |
|
74 TestWithLargeFilesL(_L("<?xml *?><lala:lmx xmlns:n=\"http://www.nokia.com/schemas/location/landmarks\""), CApaDataRecognizerType::ECertain); |
|
75 TestWithLargeFilesL(_L("<?xml k?> < *:lmx*>"), CApaDataRecognizerType::EProbable); |
|
76 |
|
77 iDataToRecognize.ResetAndDestroy(); |
|
78 |
|
79 if (iErrorsFound != KErrNone) |
|
80 { |
|
81 TBuf<64> buf; |
|
82 buf.Format(_L("%d Errors were found in TP42"), iErrorsFound ); |
|
83 iLog->Log(buf); |
|
84 User::Leave(-1); |
|
85 } |
|
86 } |
|
87 |
|
88 |
|
89 // ---------++++++++++++++------------------------------------------------ |
|
90 // CPosTp42::TestWithBufferL |
|
91 // |
|
92 // (other items were commented in a header). |
|
93 // --------------------------------------------------------- |
|
94 // |
|
95 void CPosTp42::TestWithEmptyFileL() |
|
96 { |
|
97 // Create empty file |
|
98 RFile file; |
|
99 TBuf<100> buf; |
|
100 _LIT(KFileName, "c:\\documents\\DummyFile.txt"); |
|
101 |
|
102 TInt err = file.Open(iFileSession, KFileName , EFileWrite); |
|
103 if (err != KErrNone && err != KErrAlreadyExists) |
|
104 { |
|
105 if (err == KErrNotFound) |
|
106 { |
|
107 User::LeaveIfError(file.Create(iFileSession, KFileName, EFileWrite)); |
|
108 } |
|
109 else |
|
110 { |
|
111 buf.Format(_L("Error %d when creating empty file"), err); |
|
112 iLog->Log(buf); |
|
113 } |
|
114 } |
|
115 |
|
116 file.Close(); |
|
117 TBuf8<1> kalle; |
|
118 |
|
119 RApaLsSession lsSession; |
|
120 CleanupClosePushL(lsSession); |
|
121 User::LeaveIfError(lsSession.Connect()); |
|
122 TDataRecognitionResult recognizerResultFromFile; |
|
123 TDataRecognitionResult recognizerResultFromFileHandle; |
|
124 |
|
125 // Check file |
|
126 err = lsSession.RecognizeData(KFileName, kalle , recognizerResultFromFile); |
|
127 if (err != KErrNone) |
|
128 { |
|
129 iLog->Log(_L("Error from lsSession.RecognizeData")); |
|
130 User::Leave(err); |
|
131 } |
|
132 iLog->Log(recognizerResultFromFile.iDataType.Des()); |
|
133 TInt expCode = CApaDataRecognizerType::EProbable; |
|
134 |
|
135 if (recognizerResultFromFile.iDataType.Des() != _L("text/plain")) |
|
136 { |
|
137 |
|
138 iLog->Log(_L("datatype from recognizer")); |
|
139 } |
|
140 |
|
141 if (recognizerResultFromFile.iConfidence != expCode) |
|
142 { |
|
143 |
|
144 iLog->Log(_L(" confidence from recognizer")); |
|
145 } |
|
146 |
|
147 // Check filehandle |
|
148 User::LeaveIfError(iFileSession.ShareProtected()); |
|
149 |
|
150 RFile fileHandle; |
|
151 CleanupClosePushL(fileHandle); |
|
152 err = fileHandle.Open(iFileSession, KFileName, EFileRead | EFileShareAny); |
|
153 if (err != KErrNone) |
|
154 { |
|
155 iLog->Log(_L("Error from file.Open")); |
|
156 User::Leave(err); |
|
157 |
|
158 } |
|
159 err = lsSession.RecognizeData(fileHandle, recognizerResultFromFileHandle); |
|
160 if (err != KErrNone) |
|
161 { |
|
162 iLog->Log(_L("Error from lsSession.RecognizeData")); |
|
163 User::Leave(err); |
|
164 |
|
165 } |
|
166 CleanupStack::PopAndDestroy(&fileHandle); |
|
167 iLog->Log(recognizerResultFromFileHandle.iDataType.Des()); |
|
168 |
|
169 if (recognizerResultFromFileHandle.iDataType.Des() != _L("text/plain")) |
|
170 { |
|
171 iLog->Log(_L(" datatype from recognizer")); |
|
172 } |
|
173 |
|
174 if (recognizerResultFromFileHandle.iConfidence != expCode) |
|
175 { |
|
176 iLog->Log(_L("confidence from recognizer")); |
|
177 } |
|
178 |
|
179 CleanupStack::PopAndDestroy(&lsSession); |
|
180 |
|
181 } |
|
182 |
|
183 // --------------------------------------------------------- |
|
184 // CPosTp42::TestWithBufferL |
|
185 // |
|
186 // (other items were commented in a header). |
|
187 // --------------------------------------------------------- |
|
188 // |
|
189 void CPosTp42::TestWithBufferL() |
|
190 { |
|
191 //start reading the file line by line and create objects. |
|
192 _LIT(KFileTestValues, "c:\\system\\test\\testdata\\LmRecognizerData.txt"); |
|
193 |
|
194 RFile file; |
|
195 User::LeaveIfError(file.Open(iFileSession, KFileTestValues, EFileRead)); |
|
196 CleanupClosePushL(file); |
|
197 |
|
198 TBuf<500> line; //declarera som en konstant tack |
|
199 while (ReadLn(file, line) != KErrEof) |
|
200 { |
|
201 TLex lex(line); |
|
202 if ( lex.Peek() != '#' ) |
|
203 { |
|
204 CRecognizerData* recognizerData = CRecognizerData::NewL(line); |
|
205 CleanupStack::PushL(recognizerData); |
|
206 |
|
207 User::LeaveIfError(iDataToRecognize.Append(recognizerData)); |
|
208 CleanupStack::Pop(recognizerData); |
|
209 } |
|
210 } |
|
211 |
|
212 CleanupStack::PopAndDestroy(&file); |
|
213 |
|
214 RApaLsSession lsSession; |
|
215 CleanupClosePushL(lsSession); |
|
216 User::LeaveIfError(lsSession.Connect()); |
|
217 TDataRecognitionResult recognizerResult; |
|
218 TBuf<10> dummy; //dummy |
|
219 |
|
220 TInt numberOfResults = iDataToRecognize.Count(); |
|
221 for (TInt i = 0; i < numberOfResults; i++) |
|
222 { |
|
223 CRecognizerData* data = iDataToRecognize[i]; |
|
224 TBuf8<200> kalle; |
|
225 kalle.Copy((data -> RecognizerData())); |
|
226 |
|
227 // Check buffer |
|
228 User::LeaveIfError(lsSession.RecognizeData(dummy, kalle , recognizerResult)); |
|
229 |
|
230 const TDataRecognitionResult expected = data->ExpectedResult(); |
|
231 |
|
232 TBuf<512> buf; |
|
233 TPtrC content( data->RecognizerData() ); |
|
234 buf.Format( KDump, i+1, &content ); |
|
235 iLog->Log( buf ); |
|
236 |
|
237 CheckResultL(expected, recognizerResult); |
|
238 } |
|
239 |
|
240 CleanupStack::PopAndDestroy(&lsSession); |
|
241 iDataToRecognize.ResetAndDestroy(); |
|
242 } |
|
243 |
|
244 // --------------------------------------------------------- |
|
245 // CPosTp42::TestWithFileL |
|
246 // |
|
247 // (other items were commented in a header). |
|
248 // --------------------------------------------------------- |
|
249 // |
|
250 void CPosTp42::TestWithFileL() |
|
251 { |
|
252 //start reading the file line by line and create objects. |
|
253 _LIT(KFileTestValues, "c:\\system\\test\\testdata\\LmRecognizerDataFile.txt"); |
|
254 |
|
255 RFile file; |
|
256 |
|
257 CFileMan* fileMan = CFileMan::NewL(iFileSession); |
|
258 CleanupStack::PushL(fileMan); |
|
259 // Delete all old files |
|
260 TInt err = fileMan->Delete(KFileTraceWild); |
|
261 if (err != KErrNone && err != KErrNotFound) iLog->Log(_L("Error from CFileMan::Delete")); |
|
262 CleanupStack::PopAndDestroy(fileMan); |
|
263 |
|
264 CleanupClosePushL(file); |
|
265 User::LeaveIfError(file.Open(iFileSession, KFileTestValues, EFileRead)); |
|
266 |
|
267 TBuf<500> line; |
|
268 while (ReadLn(file, line) != KErrEof) |
|
269 { |
|
270 TLex lex(line); |
|
271 if (lex.Peek() != '#') |
|
272 { |
|
273 CRecognizerData* recognizerData = CRecognizerData::NewL(line); |
|
274 CleanupStack::PushL(recognizerData); |
|
275 |
|
276 User::LeaveIfError(iDataToRecognize.Append(recognizerData)); |
|
277 CleanupStack::Pop(recognizerData); |
|
278 } |
|
279 } |
|
280 |
|
281 CleanupStack::PopAndDestroy(&file); |
|
282 |
|
283 //start comparing |
|
284 RApaLsSession lsSession; |
|
285 CleanupClosePushL(lsSession); |
|
286 User::LeaveIfError(lsSession.Connect()); |
|
287 TDataRecognitionResult recognizerResultFromFile; |
|
288 TDataRecognitionResult recognizerResultFromFileHandle; |
|
289 TBuf<40> fileName; //dummy |
|
290 |
|
291 TInt numberOfResults = iDataToRecognize.Count(); |
|
292 for (TInt i = 0; i < numberOfResults; i++) |
|
293 { |
|
294 CRecognizerData* data = iDataToRecognize[i]; |
|
295 |
|
296 TBuf8<512> buf8; |
|
297 buf8.Copy( data->RecognizerData() ); |
|
298 |
|
299 RFile file; |
|
300 TFileName fileName; |
|
301 TInt err = file.Temp( iFileSession, KTraceDir, fileName, EFileWrite ); |
|
302 if ( err ) |
|
303 { |
|
304 iLog->Log(_L("Failed to create temp file, %d"), err); |
|
305 User::Leave( err ); |
|
306 } |
|
307 file.Write( buf8 ); |
|
308 _LIT8( KCrLf, "\n" ); |
|
309 file.Write( KCrLf ); |
|
310 file.Close(); |
|
311 |
|
312 const TDataRecognitionResult expected = data->ExpectedResult(); |
|
313 |
|
314 TBuf<512> buf; |
|
315 TPtrC content( data->RecognizerData() ); |
|
316 buf.Format( KDump, i+1, &content ); |
|
317 iLog->Log( buf ); |
|
318 |
|
319 // Check file |
|
320 recognizerResultFromFile.Reset(); |
|
321 buf8.Zero(); |
|
322 lsSession.RecognizeData( fileName, buf8, recognizerResultFromFile ); |
|
323 CheckResultL(expected, recognizerResultFromFile); |
|
324 |
|
325 // Check FileHandle |
|
326 |
|
327 RFs fileSessionNew; |
|
328 User::LeaveIfError(fileSessionNew.Connect()); |
|
329 CleanupClosePushL(fileSessionNew); |
|
330 |
|
331 //iLog->Log(_L("Check filehandle")); |
|
332 err = fileSessionNew.ShareProtected(); |
|
333 if (err != KErrNone) |
|
334 { |
|
335 iLog->Log(_L("Error from file.ShareProtected")); |
|
336 User::Leave(err); |
|
337 } |
|
338 |
|
339 RFile fileHandle; |
|
340 CleanupClosePushL(fileHandle); |
|
341 err = fileHandle.Open(fileSessionNew, fileName, EFileRead | EFileShareAny); |
|
342 if (err != KErrNone) |
|
343 { |
|
344 iLog->Log(_L("Error from file.open")); |
|
345 User::Leave(err); |
|
346 } |
|
347 err = lsSession.RecognizeData(fileHandle, recognizerResultFromFileHandle); |
|
348 if (err != KErrNone) |
|
349 { |
|
350 iLog->Log(_L("Error from lsSession.RecognizeData")); |
|
351 User::Leave(err); |
|
352 } |
|
353 |
|
354 CleanupStack::PopAndDestroy(&fileHandle); |
|
355 CleanupStack::PopAndDestroy(&fileSessionNew); |
|
356 CheckResultL(expected, recognizerResultFromFileHandle); |
|
357 |
|
358 iFileSession.Delete( fileName ); |
|
359 } |
|
360 |
|
361 CleanupStack::PopAndDestroy(&lsSession); |
|
362 |
|
363 iDataToRecognize.ResetAndDestroy(); |
|
364 } |
|
365 |
|
366 // --------------------------------------------------------- |
|
367 // CPosTp42::TestWithLargeFilesL |
|
368 // |
|
369 // (other items were commented in a header). |
|
370 // --------------------------------------------------------- |
|
371 // |
|
372 void CPosTp42::TestWithLargeFilesL(const TDesC& msg, TInt aExpCode) |
|
373 { |
|
374 RApaLsSession lsSession; |
|
375 CleanupClosePushL(lsSession); |
|
376 User::LeaveIfError(lsSession.Connect()); |
|
377 |
|
378 TDataRecognitionResult recognizerResultFromFile; |
|
379 TDataRecognitionResult recognizerResultFromFileHandle; |
|
380 |
|
381 const TInt KBufSize = 400; |
|
382 TBuf8<KBufSize> tmp1; |
|
383 TBuf8<KBufSize> tmp; |
|
384 TBuf8<1> kalle; |
|
385 |
|
386 _LIT(KEnd,"\n"); |
|
387 |
|
388 RFile file; |
|
389 TFileName fileName; |
|
390 file.Temp( iFileSession, KTraceDir, fileName, EFileWrite ); |
|
391 CleanupClosePushL(file); |
|
392 |
|
393 for (TInt i=0;i<10;i++) |
|
394 { |
|
395 tmp1.Append(_L(" \n\t ")); |
|
396 } |
|
397 |
|
398 tmp.Append(tmp1); |
|
399 tmp.Append(msg); |
|
400 tmp.Append(KEnd); |
|
401 tmp.Append(tmp1); |
|
402 tmp.Append(KEnd); |
|
403 file.Write(tmp); |
|
404 |
|
405 CleanupStack::PopAndDestroy(&file); |
|
406 |
|
407 lsSession.RecognizeData(fileName, kalle , recognizerResultFromFile); |
|
408 iLog->Log(recognizerResultFromFile.iDataType.Des()); |
|
409 |
|
410 if (recognizerResultFromFile.iDataType.Des() != _L("application/vnd.nokia.landmarkcollection+xml")) |
|
411 { |
|
412 iLog->Log(_L("datatype from recognizer")); |
|
413 } |
|
414 |
|
415 if (recognizerResultFromFile.iConfidence != aExpCode) |
|
416 { |
|
417 iLog->Log(_L(" confidence from recognizer")); |
|
418 } |
|
419 |
|
420 // Check FileHandle |
|
421 iLog->Log(_L("Check filehandle")); |
|
422 |
|
423 RFs fs; |
|
424 CleanupClosePushL(fs); |
|
425 User::LeaveIfError(fs.Connect()); |
|
426 User::LeaveIfError(fs.ShareProtected()); |
|
427 |
|
428 RFile fileHandle; |
|
429 CleanupClosePushL(fileHandle); |
|
430 TInt err = fileHandle.Open(fs, fileName, EFileRead | EFileShareAny); |
|
431 if (err != KErrNone) |
|
432 { |
|
433 iLog->Log(_L("Error from file.Open")); |
|
434 User::Leave(err); |
|
435 } |
|
436 err = lsSession.RecognizeData(fileHandle, recognizerResultFromFileHandle); |
|
437 if (err != KErrNone) |
|
438 { |
|
439 iLog->Log(_L("Error from lsSession.RecognizeData")); |
|
440 User::Leave(err); |
|
441 } |
|
442 CleanupStack::PopAndDestroy(&fileHandle); |
|
443 |
|
444 if (recognizerResultFromFileHandle.iDataType.Des() != _L("application/vnd.nokia.landmarkcollection+xml")) |
|
445 { |
|
446 iLog->Log(_L("datatype from recognizer")); |
|
447 } |
|
448 |
|
449 if (recognizerResultFromFileHandle.iConfidence != aExpCode) |
|
450 { |
|
451 iLog->Log(_L("confidence from recognizer")); |
|
452 } |
|
453 |
|
454 iFileSession.Delete( fileName ); |
|
455 CleanupStack::PopAndDestroy(&fs); |
|
456 CleanupStack::PopAndDestroy(&lsSession); |
|
457 } |
|
458 |
|
459 // --------------------------------------------------------- |
|
460 // --------------------------------------------------------- |
|
461 // |
|
462 void CPosTp42::CheckResultL(TDataRecognitionResult aExpectedResult, TDataRecognitionResult aResult) |
|
463 { |
|
464 _LIT(KExpected, "Expect: '%S' (%d)"); |
|
465 _LIT(KActual, "Actual: '%S' (%d)"); |
|
466 |
|
467 TBuf<256> exp, act; |
|
468 TPtrC expMime( aExpectedResult.iDataType.Des() ); |
|
469 TPtrC actMime( aResult.iDataType.Des() ); |
|
470 |
|
471 exp.Format(KExpected, &expMime, aExpectedResult.iConfidence ); |
|
472 act.Format(KActual, &actMime, aResult.iConfidence ); |
|
473 |
|
474 if ( aExpectedResult.iConfidence == NOLANDMARKNUMBER ) // Magic number for not any landmark |
|
475 { |
|
476 _LIT8(KLmxType, "application/vnd.nokia.landmarkcollection+xml"); |
|
477 _LIT8(KGpxType, "application/gps+xml"); |
|
478 |
|
479 if ( aResult.iDataType.Des8().Compare( KLmxType ) == 0 || |
|
480 aResult.iDataType.Des8().Compare( KGpxType ) == 0 ) |
|
481 { |
|
482 iLog->Log(_L( "ERR: landmark detected when it shouldn't be" )); |
|
483 iLog->Log(exp); |
|
484 iLog->Log(act); |
|
485 iErrorsFound++; |
|
486 } |
|
487 } |
|
488 else //if (aExpectedResult.iConfidence == CApaDataRecognizerType::ECertain) //a landmark buffer is expected |
|
489 { |
|
490 if ( aExpectedResult.iDataType != aResult.iDataType ) |
|
491 { |
|
492 iLog->Log(_L( "ERR: datatype mismatch" )); |
|
493 iLog->Log(exp); |
|
494 iLog->Log(act); |
|
495 iErrorsFound++; |
|
496 } |
|
497 if ( aExpectedResult.iConfidence != aResult.iConfidence ) |
|
498 { |
|
499 iLog->Log(_L("ERR: confidence mismatch")); |
|
500 iLog->Log(exp); |
|
501 iLog->Log(act); |
|
502 iErrorsFound++; |
|
503 } |
|
504 } |
|
505 } |
|
506 |
|
507 // --------------------------------------------------------- |
|
508 // --------------------------------------------------------- |
|
509 // |
|
510 // Implementation of the supporter class |
|
511 CRecognizerData* CRecognizerData::NewL(const TDesC& aDes) |
|
512 { |
|
513 CRecognizerData* self = new(ELeave) CRecognizerData; |
|
514 CleanupStack::PushL(self); |
|
515 self->ConstructL(aDes); |
|
516 CleanupStack::Pop(); |
|
517 return self; |
|
518 } |
|
519 |
|
520 // --------------------------------------------------------- |
|
521 // --------------------------------------------------------- |
|
522 CRecognizerData::CRecognizerData() |
|
523 { |
|
524 } |
|
525 |
|
526 // --------------------------------------------------------- |
|
527 // --------------------------------------------------------- |
|
528 CRecognizerData::~CRecognizerData() |
|
529 { |
|
530 delete iRecognizerData; |
|
531 iRecognizerData = NULL; |
|
532 } |
|
533 |
|
534 // --------------------------------------------------------- |
|
535 // --------------------------------------------------------- |
|
536 // |
|
537 TPtrC CRecognizerData::RecognizerData() const |
|
538 { |
|
539 return *iRecognizerData; |
|
540 } |
|
541 |
|
542 // --------------------------------------------------------- |
|
543 // --------------------------------------------------------- |
|
544 // |
|
545 const TDataRecognitionResult& CRecognizerData::ExpectedResult() const |
|
546 { |
|
547 return iExpectedResult; |
|
548 } |
|
549 |
|
550 // --------------------------------------------------------- |
|
551 // --------------------------------------------------------- |
|
552 // |
|
553 void CRecognizerData::ConstructL(const TDesC& aDes) |
|
554 { |
|
555 _LIT( KDelim, "#" ); |
|
556 TInt delim = aDes.Find( KDelim ); |
|
557 iRecognizerData = aDes.Left( delim ).AllocL(); |
|
558 iRecognizerData->Des().TrimRight(); |
|
559 |
|
560 TLex line( aDes.Mid( delim + 1 ) ); |
|
561 |
|
562 ParseResult( line.NextToken() ); |
|
563 ParseType( line.NextToken() ); |
|
564 } |
|
565 |
|
566 // --------------------------------------------------------- |
|
567 // --------------------------------------------------------- |
|
568 // |
|
569 void CRecognizerData::ParseResult(const TDesC& aDes) |
|
570 { |
|
571 _LIT(KECertain, "ECertain"); |
|
572 _LIT(KEProbable, "EProbable"); |
|
573 if (aDes.CompareF(KECertain) == 0) |
|
574 { |
|
575 iExpectedResult.iConfidence = CApaDataRecognizerType::ECertain; |
|
576 } |
|
577 else if (aDes.CompareF(KEProbable) == 0) |
|
578 { |
|
579 iExpectedResult.iConfidence = CApaDataRecognizerType::EProbable; |
|
580 } |
|
581 else |
|
582 { |
|
583 iExpectedResult.iConfidence = NOLANDMARKNUMBER; |
|
584 } |
|
585 } |
|
586 |
|
587 // --------------------------------------------------------- |
|
588 // --------------------------------------------------------- |
|
589 // |
|
590 void CRecognizerData::ParseType(const TDesC& aDes) |
|
591 { |
|
592 _LIT8(KLmxType, "application/vnd.nokia.landmarkcollection+xml"); |
|
593 _LIT8(KGpxType, "application/gps+xml"); |
|
594 _LIT(KGpx, "gpx"); |
|
595 _LIT(KLmx, "lmx"); |
|
596 |
|
597 TDataType dataLmx(KLmxType); |
|
598 TDataType dataGpx(KGpxType); |
|
599 |
|
600 if (aDes.CompareF(KGpx) == 0) |
|
601 { |
|
602 iExpectedResult.iDataType = dataGpx; |
|
603 } |
|
604 else if (aDes.CompareF(KLmx) == 0) |
|
605 { |
|
606 iExpectedResult.iDataType = dataLmx; |
|
607 } |
|
608 else |
|
609 { |
|
610 } |
|
611 } |
|
612 |
|
613 // End of File |