|
1 /* |
|
2 * Copyright (c) 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 "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 CPOSTP49_H |
|
21 #define CPOSTP49_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "FT_CLandmarkTestProcedureBase.h" |
|
25 #include <apgcli.h> |
|
26 |
|
27 |
|
28 // CLASS DECLARATION |
|
29 |
|
30 class CDatabaseClient; |
|
31 |
|
32 /** |
|
33 * Test procedure 49 |
|
34 */ |
|
35 class CPosTp49 : public CLandmarkTestProcedureBase, public MProgressObserver |
|
36 { |
|
37 public: // Constructors and destructor |
|
38 |
|
39 /** |
|
40 * C++ default constructor. |
|
41 */ |
|
42 CPosTp49() : CLandmarkTestProcedureBase(49) {}; |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 ~CPosTp49() {}; |
|
48 |
|
49 public: // Functions from base classes |
|
50 |
|
51 /** |
|
52 * From CUtfwTestBase |
|
53 * Retrieves the test module name |
|
54 * @param aName The name of the test module. |
|
55 */ |
|
56 void GetName( |
|
57 TDes& aName |
|
58 ) const; |
|
59 |
|
60 /** |
|
61 * From CLandmarkTestProcedureBase |
|
62 * Runs the test in the module |
|
63 */ |
|
64 void StartL(); |
|
65 |
|
66 /** |
|
67 * From CLandmarkTestProcedureBase |
|
68 * Initializes a test before StartL is called. |
|
69 */ |
|
70 void InitTestL(); |
|
71 |
|
72 /** |
|
73 * From CLandmarkTestProcedureBase |
|
74 * Cleans up after a test. |
|
75 * Always called, even if the test leaves. |
|
76 */ |
|
77 void CloseTest(); |
|
78 |
|
79 /** |
|
80 * From MProgressObserver |
|
81 */ |
|
82 void NotifyProgress(TReal aProgress); |
|
83 |
|
84 private: |
|
85 |
|
86 void ImportAllLandmarksL(); |
|
87 TInt ImportSomeLandmarksL(); |
|
88 void VerifyImportedLandmarksL(TInt aNrOfExpectedItems); |
|
89 void ParseLandmarksContentL(); |
|
90 void RemoveThreeLandmarksL(); |
|
91 void SetupPreConditionsL(); |
|
92 void ExecuteLmOpL(TInt aExpectedResult, TBool aObserveProgress = EFalse); |
|
93 void FetchIteratorL(); |
|
94 void RecreateParserL(const TDesC& aFileName); |
|
95 void StartImportLandmarksL(); |
|
96 void CreateNameArrayL(TInt aNrOfItems); |
|
97 |
|
98 private: |
|
99 |
|
100 // Contains the IDs of the improted landmarks |
|
101 RArray<TPosLmItemId> iImportedLandmarkIds; |
|
102 |
|
103 // Contains the IDs of imported landmarks that have been removed |
|
104 RArray<TPosLmItemId> iRemovedLandmarkIds; |
|
105 |
|
106 // The parser that parses the xml file to import |
|
107 CPosLandmarkParser* iLandmarkParser; |
|
108 |
|
109 // The iterator that is to be tested |
|
110 CPosLmItemIterator* iIterator; |
|
111 |
|
112 // An array containing the names of the imported landmarks |
|
113 CDesCArray* iLandmarkNames; |
|
114 |
|
115 // Indicates when it is time to fetch iterator of imported landmarks. |
|
116 TReal iProgressInterruptLevel; |
|
117 |
|
118 }; |
|
119 |
|
120 #endif // CPOSTP49_H |
|
121 |
|
122 |
|
123 // End of File |