equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of the License "Symbian Foundation License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8 * |
8 * |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
26 |
26 |
27 #include <LbsPosition.h> |
27 #include <LbsPosition.h> |
28 #include <EPos_CPosLandmarkSearch.h> |
28 #include <EPos_CPosLandmarkSearch.h> |
29 #include <EPos_CPosLmTextCriteria.h> |
29 #include <EPos_CPosLmTextCriteria.h> |
30 #include <EPos_CPosLMItemIterator.h> |
30 #include <EPos_CPosLMItemIterator.h> |
|
31 |
|
32 _LIT(KTp162DbFile, "TP162Test.ldb"); |
|
33 |
31 |
34 |
32 // ================= CONSTANTS ======================= |
35 // ================= CONSTANTS ======================= |
33 |
36 |
34 |
37 |
35 _LIT(KKMLFile, "c:\\system\\test\\testdata\\Tp162KML.kml"); |
38 _LIT(KKMLFile, "c:\\system\\test\\testdata\\Tp162KML.kml"); |
87 void CPosTp162::TestImportEmptyDbL(const TDesC& aFile, const TDesC8& aMime) |
90 void CPosTp162::TestImportEmptyDbL(const TDesC& aFile, const TDesC8& aMime) |
88 { |
91 { |
89 iLog->Log(_L("----- TestImportEmptyDbL -----")); |
92 iLog->Log(_L("----- TestImportEmptyDbL -----")); |
90 iLog->Log(_L("FILE: %S"), &aFile); |
93 iLog->Log(_L("FILE: %S"), &aFile); |
91 RemoveAllLmDatabasesL(); |
94 RemoveAllLmDatabasesL(); |
92 |
95 CopyTestDbFileL(KTp162DbFile); |
93 iLandmarkParser = CPosLandmarkParser::NewL(aMime); |
96 iLandmarkParser = CPosLandmarkParser::NewL(aMime); |
94 iLandmarkParser->SetInputFileL(aFile); |
97 iLandmarkParser->SetInputFileL(aFile); |
95 |
98 |
96 iDatabase = CPosLandmarkDatabase::OpenL(); |
99 iDatabase = CPosLandmarkDatabase::OpenL(KTp162DbFile); |
97 if (iDatabase->IsInitializingNeeded()) |
100 if (iDatabase->IsInitializingNeeded()) |
98 { |
101 { |
99 ExecuteAndDeleteLD(iDatabase->InitializeL()); |
102 ExecuteAndDeleteLD(iDatabase->InitializeL()); |
100 } |
103 } |
101 |
104 |
142 void CPosTp162::TestImport1L(const TDesC& aFile, const TDesC8& aMime) |
145 void CPosTp162::TestImport1L(const TDesC& aFile, const TDesC8& aMime) |
143 { |
146 { |
144 iLog->Log(_L("----- TestImport1L ------")); |
147 iLog->Log(_L("----- TestImport1L ------")); |
145 iLog->Log(_L("FILE: %S"), &aFile); |
148 iLog->Log(_L("FILE: %S"), &aFile); |
146 RemoveAllLmDatabasesL(); |
149 RemoveAllLmDatabasesL(); |
147 |
150 CopyTestDbFileL(KTp162DbFile); |
148 iLandmarkParser = CPosLandmarkParser::NewL(aMime); |
151 iLandmarkParser = CPosLandmarkParser::NewL(aMime); |
149 iLandmarkParser->SetInputFileL(aFile); |
152 iLandmarkParser->SetInputFileL(aFile); |
150 |
153 |
151 iDatabase = CPosLandmarkDatabase::OpenL(); |
154 iDatabase = CPosLandmarkDatabase::OpenL(KTp162DbFile); |
152 |
155 |
153 if (iDatabase->IsInitializingNeeded()) |
156 if (iDatabase->IsInitializingNeeded()) |
154 { |
157 { |
155 ExecuteAndDeleteLD(iDatabase->InitializeL()); |
158 ExecuteAndDeleteLD(iDatabase->InitializeL()); |
156 } |
159 } |