|
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 CPOSTP78_H |
|
21 #define CPOSTP78_H |
|
22 |
|
23 // INCLUDES |
|
24 #include "FT_CLandmarkTestProcedureBase.h" |
|
25 #include <ss_std.h> |
|
26 #include <e32std.h> |
|
27 |
|
28 // CLASS DECLARATION |
|
29 class CPosLandmarkParser; |
|
30 class CPosTp78; |
|
31 |
|
32 // Data types |
|
33 struct TThreadParam |
|
34 { |
|
35 void (*iTestFunction)(TDes*); |
|
36 TDes* iMessage; |
|
37 }; |
|
38 |
|
39 class CThreadMonitor : public CActive |
|
40 { |
|
41 public: |
|
42 |
|
43 static CThreadMonitor* NewL(RThread* aThread); |
|
44 |
|
45 ~CThreadMonitor(); |
|
46 |
|
47 protected: |
|
48 |
|
49 void DoCancel(); |
|
50 |
|
51 void RunL(); |
|
52 |
|
53 private: |
|
54 |
|
55 CThreadMonitor(RThread* aThread); |
|
56 |
|
57 void ConstructL(); |
|
58 |
|
59 private: |
|
60 |
|
61 RThread* iThread; |
|
62 |
|
63 }; |
|
64 |
|
65 /** |
|
66 * Test procedure 78 |
|
67 */ |
|
68 class CPosTp78 :public CLandmarkTestProcedureBase |
|
69 { |
|
70 public: // Constructors and destructor |
|
71 |
|
72 /** |
|
73 * C++ default constructor. |
|
74 */ |
|
75 CPosTp78() : CLandmarkTestProcedureBase(78) {}; |
|
76 |
|
77 /** |
|
78 * Destructor. |
|
79 */ |
|
80 ~CPosTp78() {}; |
|
81 |
|
82 public: // Functions from base classes |
|
83 |
|
84 /** |
|
85 * From CUtfwTestBase |
|
86 * Retrieves the test module name |
|
87 * @param aName The name of the test module. |
|
88 */ |
|
89 void GetName( |
|
90 TDes& aName |
|
91 ) const; |
|
92 |
|
93 /** |
|
94 * From CUtfwTestBase |
|
95 * Always called before StartL() |
|
96 */ |
|
97 void InitTestL(); |
|
98 |
|
99 /** |
|
100 * From CUtfwTestBase |
|
101 * Always called, even if test leaves |
|
102 */ |
|
103 void CloseTest(); |
|
104 |
|
105 /** |
|
106 * From CLandmarkTestProcedureBase |
|
107 * Runs the test in the module |
|
108 */ |
|
109 void StartL(); |
|
110 |
|
111 public: // New functions |
|
112 |
|
113 /** |
|
114 * Creates and initializes the default landmark database |
|
115 */ |
|
116 void InitDbL(); |
|
117 |
|
118 /** |
|
119 * Executes the open database test thread |
|
120 */ |
|
121 static void RunOpenDbTestL(TDes* aMessage); |
|
122 |
|
123 /** |
|
124 * Executes the add remove LM test thread |
|
125 */ |
|
126 static void RunAddRemoveLmTestL(TDes* aMessage); |
|
127 |
|
128 /** |
|
129 * Executes the import export LM test thread |
|
130 */ |
|
131 static void RunImportExportLmTestL(TDes* aMessage); |
|
132 |
|
133 /** |
|
134 * Executes the database event test thread |
|
135 */ |
|
136 static void RunDbEventTestL(TDes* aMessage); |
|
137 |
|
138 /** |
|
139 * Executes the read and update test thread |
|
140 */ |
|
141 static void RunReadAndUpdateTestL(TDes* aMessage); |
|
142 |
|
143 /** |
|
144 * Function called from RunReadAndUpdateTestL |
|
145 */ |
|
146 static void UpdateLandmarksL(CPosLandmarkDatabase* aDb, TPosLmItemId aId, TDes* aMessage); |
|
147 |
|
148 private: |
|
149 |
|
150 void ResumeThreadsAndVerifyExitL(); |
|
151 |
|
152 private: |
|
153 |
|
154 TBuf<100> iBuf; |
|
155 |
|
156 }; |
|
157 |
|
158 #endif // CPOSTP78_H |
|
159 |
|
160 // End of File |