|
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 #ifndef CPOSTP48_H |
|
21 #define CPOSTP48_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "FT_CLandmarkTestProcedureBase.h" |
|
25 |
|
26 // CLASS DECLARATION |
|
27 class CPosLandmarkParser; |
|
28 |
|
29 /** |
|
30 * Test procedure 48 |
|
31 */ |
|
32 class CPosTp48 :public CLandmarkTestProcedureBase |
|
33 { |
|
34 public: // Constructors and destructor |
|
35 |
|
36 /** |
|
37 * C++ default constructor. |
|
38 */ |
|
39 |
|
40 CPosTp48(TInt tpno, CStifLogger* aLog) : CLandmarkTestProcedureBase(tpno, aLog) {iErrorsFound=KErrNone;}; |
|
41 /** |
|
42 * Destructor. |
|
43 */ |
|
44 ~CPosTp48() {}; |
|
45 |
|
46 public: // Functions from base classes |
|
47 |
|
48 |
|
49 |
|
50 void CloseTest(); |
|
51 |
|
52 /** |
|
53 * From CLandmarkTestProcedureBase |
|
54 * Runs the test in the module |
|
55 */ |
|
56 void StartL(); |
|
57 |
|
58 private: |
|
59 |
|
60 /** |
|
61 * Do the import of landmarks |
|
62 */ |
|
63 void ImportLandmarksL(TBool aSync, TBool aParseDone, TUint aTransferOption, const RArray<TUint>& aLandmarkSubSet, TBool aDoParse=EFalse, TBool aCancel=EFalse); |
|
64 |
|
65 /** |
|
66 * Prepare landmarkdb for test |
|
67 */ |
|
68 void ResetLandmarksDbL(); |
|
69 |
|
70 /** |
|
71 * Create data used for this test |
|
72 */ |
|
73 void CreateXMLDataL(); |
|
74 |
|
75 |
|
76 /** |
|
77 * List all landmarks in db |
|
78 */ |
|
79 void ListLandmarksDbL(); |
|
80 |
|
81 /** |
|
82 * Check that imported landmarks has been added to database |
|
83 */ |
|
84 void CheckLandmarksDatabaseL(TUint aTransferOption); |
|
85 |
|
86 void PrintLandmarkIdFieldsL(const CPosLandmark& aLandmark); |
|
87 |
|
88 /** |
|
89 * Helper method, removing all associated categories from a landmark that should be "saved" |
|
90 * in the iLandmarks array |
|
91 */ |
|
92 void RemoveCategoriesFromLandmarkL(CPosLandmark& aLandmark); |
|
93 |
|
94 /** |
|
95 * Try to set a long file name as input |
|
96 */ |
|
97 void ImportFromFileWithLongFileNameL(); |
|
98 |
|
99 /** |
|
100 * Helper method to check that a global category exists |
|
101 and another does not |
|
102 */ |
|
103 void CheckGlobalCategoryExistL(const TDesC& aShouldExistName, const TDesC& aShouldNotExistName); |
|
104 |
|
105 /** |
|
106 * Does the acutal test |
|
107 */ |
|
108 void DoTestL(TBool aFile, TBool aFullParse=EFalse, TBool aDoParse=EFalse, TBool aCancel=EFalse); |
|
109 |
|
110 /** |
|
111 * Change input method after parse |
|
112 */ |
|
113 void DoTestChangeInputMethodL(); |
|
114 |
|
115 private: |
|
116 CPosLandmarkParser* iLandmarkParser; |
|
117 CPosLandmarkEncoder* iLandmarkEncoder; |
|
118 RPointerArray<CPosLandmark> iLandmarks; |
|
119 TInt iErrorsFound; |
|
120 CBufBase* iEncoderBuffer; |
|
121 |
|
122 |
|
123 |
|
124 }; |
|
125 |
|
126 #endif // CPOSTp48_H |
|
127 |
|
128 // End of File |