|
1 /* |
|
2 * Copyright (c) 2009 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: This file contains the header file of the |
|
15 * TestCombinerUtils. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef TESTCOMBINERUTILS_H |
|
20 #define TESTCOMBINERUTILS_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32std.h> |
|
24 #include <e32base.h> |
|
25 |
|
26 #include <StifTestInterface.h> |
|
27 |
|
28 #include "TestCombinerEvent.h" |
|
29 |
|
30 // CONSTANTS |
|
31 // None |
|
32 |
|
33 // MACROS |
|
34 // None |
|
35 |
|
36 // DATA TYPES |
|
37 // None |
|
38 |
|
39 // FUNCTION PROTOTYPES |
|
40 // None |
|
41 |
|
42 // FORWARD DECLARATIONS |
|
43 // None |
|
44 |
|
45 // CLASS DECLARATION |
|
46 |
|
47 // DESCRIPTION |
|
48 // Testcase starting information |
|
49 NONSHARABLE_CLASS(CStartInfo) |
|
50 :public CBase |
|
51 { |
|
52 public: // Constructors and destructor |
|
53 /** |
|
54 * Two-phased constructor. |
|
55 */ |
|
56 static CStartInfo* NewL(); |
|
57 |
|
58 /** |
|
59 * Destructor. |
|
60 */ |
|
61 virtual ~CStartInfo(); |
|
62 |
|
63 public: // New functions |
|
64 /** |
|
65 * Set module name. |
|
66 */ |
|
67 void SetModuleNameL( TDesC& aModule, TInt aExtLength=0 ); |
|
68 |
|
69 /** |
|
70 * Set initialization file name. |
|
71 */ |
|
72 void SetIniFileL( TDesC& aIni ); |
|
73 |
|
74 /** |
|
75 * Set configuration file name. |
|
76 */ |
|
77 void SetConfigL( TDesC& aConfig ); |
|
78 |
|
79 /** |
|
80 * Set test identifier. |
|
81 */ |
|
82 void SetTestIdL( TDesC& aTestId ); |
|
83 |
|
84 /** |
|
85 * Delete module name buffer for creating new module name. |
|
86 */ |
|
87 void DeleteModuleName(); |
|
88 |
|
89 /** |
|
90 * Set test case title. |
|
91 */ |
|
92 void SetTitleL(TDesC& aTitle); |
|
93 |
|
94 private: |
|
95 /** |
|
96 * C++ default constructor. |
|
97 */ |
|
98 CStartInfo(); |
|
99 |
|
100 /** |
|
101 * By default Symbian OS constructor is private. |
|
102 */ |
|
103 void ConstructL(); |
|
104 |
|
105 public: |
|
106 TPtr iModule; |
|
107 TPtrC iIniFile; |
|
108 TPtrC iConfig; |
|
109 TPtrC iTestId; |
|
110 TInt iCaseNum; |
|
111 TInt iExpectedResult; |
|
112 TFullTestResult::TCaseExecutionResult iCategory; |
|
113 TInt iTimeout; |
|
114 TPtrC iTitle; |
|
115 |
|
116 private: |
|
117 HBufC* iModuleBuf; |
|
118 HBufC* iIniFileBuf; |
|
119 HBufC* iConfigBuf; |
|
120 HBufC* iTestIdBuf; |
|
121 HBufC* iTitleBuf; |
|
122 |
|
123 }; |
|
124 |
|
125 // CLASS DECLARATION |
|
126 |
|
127 // DESCRIPTION |
|
128 // Slave information structure |
|
129 NONSHARABLE_CLASS(CSlaveInfo) |
|
130 :public CBase |
|
131 { |
|
132 public: |
|
133 enum TSlaveState |
|
134 { |
|
135 ESlaveIdle, |
|
136 ESlaveReserveSent, |
|
137 ESlaveReserved, |
|
138 ESlaveReleaseSent, |
|
139 ESlaveReleased, |
|
140 }; |
|
141 |
|
142 public: // Constructors and destructor |
|
143 /** |
|
144 * Two-phased constructor. |
|
145 */ |
|
146 static CSlaveInfo* NewL( TDesC& aName, TUint32 aMaster ); |
|
147 |
|
148 /** |
|
149 * Destructor. |
|
150 */ |
|
151 virtual ~CSlaveInfo(); |
|
152 |
|
153 public: |
|
154 |
|
155 /** |
|
156 * Get event name requested from slave. |
|
157 */ |
|
158 TEventTc* GetEvent( TDesC& aEventName ); |
|
159 |
|
160 private: |
|
161 /** |
|
162 * C++ default constructor. |
|
163 */ |
|
164 CSlaveInfo( TUint32 aMaster ); |
|
165 |
|
166 /** |
|
167 * By default Symbian OS constructor is private. |
|
168 */ |
|
169 void ConstructL( TDesC& aName ); |
|
170 |
|
171 public: |
|
172 TInt iState; |
|
173 |
|
174 TPtrC iName; |
|
175 TUint32 iMasterId; |
|
176 TUint32 iSlaveDevId; |
|
177 |
|
178 RPointerArray<TEventTc> iEvents; |
|
179 |
|
180 private: |
|
181 HBufC* iNameBuf; |
|
182 |
|
183 }; |
|
184 |
|
185 // CLASS DECLARATION |
|
186 |
|
187 // DESCRIPTION |
|
188 // Predefined value entry |
|
189 NONSHARABLE_CLASS(CDefinedValue) |
|
190 :public CBase |
|
191 { |
|
192 public: // Constructors and destructor |
|
193 /** |
|
194 * Two-phased constructor. |
|
195 */ |
|
196 static CDefinedValue* NewL( TDesC& aName, TDesC& aValue ); |
|
197 |
|
198 /** |
|
199 * Destructor. |
|
200 */ |
|
201 virtual ~CDefinedValue(); |
|
202 |
|
203 public: // New functions |
|
204 /** |
|
205 * Returns define name. |
|
206 */ |
|
207 TDesC& Name(); |
|
208 |
|
209 /** |
|
210 * Returns define value. |
|
211 */ |
|
212 TDesC& Value(); |
|
213 |
|
214 /** |
|
215 * Returns new define value. |
|
216 */ |
|
217 void SetValueL( TDesC& aValue ); |
|
218 |
|
219 private: |
|
220 /** |
|
221 * C++ default constructor. |
|
222 */ |
|
223 CDefinedValue(); |
|
224 |
|
225 /** |
|
226 * By default Symbian OS constructor is private. |
|
227 */ |
|
228 void ConstructL( TDesC& aName, TDesC& aValue ); |
|
229 |
|
230 private: // Data |
|
231 // Define name |
|
232 HBufC* iNameBuf; |
|
233 TPtrC iName; |
|
234 |
|
235 // Define value |
|
236 HBufC* iValueBuf; |
|
237 TPtrC iValue; |
|
238 |
|
239 }; |
|
240 |
|
241 #endif // TESTCOMBINERUTILS_H |
|
242 |
|
243 // End of File |