|
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 CPosTp53_H |
|
21 #define CPosTp53_H |
|
22 |
|
23 // INCLUDES |
|
24 |
|
25 #include "FT_CLandmarkTestProcedureBase.h" |
|
26 |
|
27 class CActiveLmImportEvent; |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Test procedure 53 |
|
33 */ |
|
34 class CPosTp53 : public CLandmarkTestProcedureBase |
|
35 { |
|
36 public: // Constructors and destructor |
|
37 |
|
38 /** |
|
39 * C++ default constructor. |
|
40 */ |
|
41 CPosTp53() : CLandmarkTestProcedureBase(53) {}; |
|
42 |
|
43 /** |
|
44 * Destructor. |
|
45 */ |
|
46 ~CPosTp53() {}; |
|
47 |
|
48 public: // Functions from base classes |
|
49 |
|
50 /** |
|
51 * From CUtfwTestBase |
|
52 * Retrieves the test module name |
|
53 * @param aName The name of the test module. |
|
54 */ |
|
55 void GetName( |
|
56 TDes& aName |
|
57 ) const; |
|
58 |
|
59 /** |
|
60 * From CUtfwTestBase |
|
61 */ |
|
62 void CloseTest(); |
|
63 |
|
64 /** |
|
65 * From CPosTestProcedureBase |
|
66 * Runs the test in the module |
|
67 */ |
|
68 void StartL(); |
|
69 |
|
70 private: // New functions |
|
71 |
|
72 /** |
|
73 * Tests logging of landmark events |
|
74 */ |
|
75 void LandmarkImportEventTestL(); |
|
76 |
|
77 /** |
|
78 * Test Compact during import |
|
79 */ |
|
80 void LandmarkImportCompactTestL(); |
|
81 |
|
82 void ImportLandmarksL(const TDesC& aFileName, CPosLandmarkDatabase::TTransferOptions aTransferOptions); |
|
83 |
|
84 void AddCategoriesL(); |
|
85 |
|
86 private: // Data |
|
87 |
|
88 CActiveLmImportEvent* iActiveLmEvent; |
|
89 CPosLandmarkParser* iParser; |
|
90 }; |
|
91 |
|
92 class CActiveLmImportEvent : public CActive |
|
93 { |
|
94 public: |
|
95 |
|
96 static CActiveLmImportEvent* NewL(MUtfwLog* aLog); |
|
97 |
|
98 /** |
|
99 * Destructor. |
|
100 */ |
|
101 ~CActiveLmImportEvent(); |
|
102 |
|
103 public: |
|
104 |
|
105 void Start(); |
|
106 |
|
107 /** |
|
108 * From CActive |
|
109 * Handles request completion event. |
|
110 */ |
|
111 void DoCancel(); |
|
112 |
|
113 /** |
|
114 * From CActive. |
|
115 * |
|
116 * Handles request completion event. |
|
117 */ |
|
118 void RunL(); |
|
119 |
|
120 private: |
|
121 |
|
122 /** |
|
123 * C++ constructor. |
|
124 */ |
|
125 CActiveLmImportEvent(MUtfwLog* aLog); |
|
126 |
|
127 void ConstructL(); |
|
128 |
|
129 void VerifyEvent(); |
|
130 |
|
131 void AssertCorrectEvent(TPosLmEventType aExpectedEventType, |
|
132 TPosLmEventType aEventType, |
|
133 TPosLmItemId aExpectedLandMarkItemId, |
|
134 TPosLmItemId aLandMarkItemId); |
|
135 |
|
136 private: // data |
|
137 |
|
138 friend class CPosTp53; |
|
139 |
|
140 MUtfwLog* iLog; |
|
141 CPosLandmarkDatabase* iDatabase; |
|
142 |
|
143 TPosLmEvent iEvent; |
|
144 TInt iEventNumber; |
|
145 |
|
146 TInt iGlobalErr; |
|
147 |
|
148 }; |
|
149 |
|
150 #endif // CPosTp53_H |
|
151 |
|
152 // End of File |