1 /* |
|
2 * Copyright (c) 2002 - 2007 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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef USBOBEXCLASSCONTROLLERTEST_H |
|
22 #define USBOBEXCLASSCONTROLLERTEST_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <StifLogger.h> |
|
26 #include <TestScripterInternal.h> |
|
27 #include <StifTestModule.h> |
|
28 #include <TestclassAssert.h> |
|
29 |
|
30 #include "USBObexApiTestActiveObject.h" |
|
31 #include <musbclasscontrollernotify.h> |
|
32 #include <cusbclasscontrollerplugin.h> |
|
33 #include <usbobex.h> |
|
34 #include <usb_std.h> |
|
35 #include <ecom/ecom.h> |
|
36 |
|
37 // CONSTANTS |
|
38 //const ?type ?constant_var = ?constant; |
|
39 |
|
40 // MACROS |
|
41 //#define ?macro ?macro_def |
|
42 #define TEST_CLASS_VERSION_MAJOR 0 |
|
43 #define TEST_CLASS_VERSION_MINOR 0 |
|
44 #define TEST_CLASS_VERSION_BUILD 0 |
|
45 |
|
46 // Logging path |
|
47 _LIT( KUsbObexClassControllerTestLogPath, "\\logs\\testframework\\UsbObexClassControllerTest\\" ); |
|
48 |
|
49 // Logging path for ATS - for phone builds comment this line |
|
50 //_LIT( KUsbObexClassControllerTestLogPath, "e:\\testing\\stiflogs\\" ); |
|
51 |
|
52 // Log file |
|
53 _LIT( KUsbObexClassControllerTestLogFile, "UsbObexClassControllerTest.txt" ); |
|
54 _LIT( KUsbObexClassControllerTestLogFileWithTitle, "UsbObexClassControllerTest_[%S].txt" ); |
|
55 |
|
56 // FUNCTION PROTOTYPES |
|
57 //?type ?function_name(?arg_list); |
|
58 |
|
59 // FORWARD DECLARATIONS |
|
60 //class ?FORWARD_CLASSNAME; |
|
61 class CUsbObexClassControllerTest; |
|
62 class CUsbClassControllerIterator; |
|
63 |
|
64 // DATA TYPES |
|
65 //enum ?declaration |
|
66 |
|
67 enum TUsbObexClassControllerTestResult |
|
68 { |
|
69 ETestCasePassed, |
|
70 ETestCaseFailed |
|
71 }; |
|
72 |
|
73 //typedef ?declaration |
|
74 //extern ?data_type; |
|
75 |
|
76 // CLASS DECLARATION |
|
77 |
|
78 /** |
|
79 * CUsbObexClassControllerTest test class for STIF Test Framework TestScripter. |
|
80 * ?other_description_lines |
|
81 * |
|
82 * @lib ?library |
|
83 * @since ?Series60_version |
|
84 */ |
|
85 NONSHARABLE_CLASS(CUsbObexClassControllerTest) : |
|
86 public CScriptBase, |
|
87 public MUsbClassControllerNotify |
|
88 { |
|
89 public: // Constructors and destructor |
|
90 |
|
91 /** |
|
92 * Two-phased constructor. |
|
93 */ |
|
94 static CUsbObexClassControllerTest* NewL( CTestModuleIf& aTestModuleIf ); |
|
95 |
|
96 /** |
|
97 * Destructor. |
|
98 */ |
|
99 virtual ~CUsbObexClassControllerTest(); |
|
100 |
|
101 public: // New functions |
|
102 |
|
103 /** |
|
104 * ?member_description. |
|
105 * @since ?Series60_version |
|
106 * @param ?arg1 ?description |
|
107 * @return ?description |
|
108 */ |
|
109 //?type ?member_function( ?type ?arg1 ); |
|
110 |
|
111 public: // Functions from base classes |
|
112 |
|
113 /** |
|
114 * From CScriptBase Runs a script line. |
|
115 * @since ?Series60_version |
|
116 * @param aItem Script line containing method name and parameters |
|
117 * @return Symbian OS error code |
|
118 */ |
|
119 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
120 |
|
121 /** |
|
122 * overrider of pure virtual functions from MUsbClassControllerNotify class |
|
123 */ |
|
124 CUsbClassControllerIterator* UccnGetClassControllerIteratorL(); |
|
125 void UccnError(TInt aError); |
|
126 |
|
127 protected: // New functions |
|
128 |
|
129 /** |
|
130 * ?member_description. |
|
131 * @since ?Series60_version |
|
132 * @param ?arg1 ?description |
|
133 * @return ?description |
|
134 */ |
|
135 //?type ?member_function( ?type ?arg1 ); |
|
136 |
|
137 protected: // Functions from base classes |
|
138 |
|
139 /** |
|
140 * From ?base_class ?member_description |
|
141 */ |
|
142 //?type ?member_function(); |
|
143 |
|
144 private: |
|
145 |
|
146 /** |
|
147 * C++ default constructor. |
|
148 */ |
|
149 CUsbObexClassControllerTest( CTestModuleIf& aTestModuleIf ); |
|
150 |
|
151 /** |
|
152 * By default Symbian 2nd phase constructor is private. |
|
153 */ |
|
154 void ConstructL(); |
|
155 |
|
156 // Prohibit copy constructor if not deriving from CBase. |
|
157 // ?classname( const ?classname& ); |
|
158 // Prohibit assigment operator if not deriving from CBase. |
|
159 // ?classname& operator=( const ?classname& ); |
|
160 |
|
161 /** |
|
162 * Frees all resources allocated from test methods. |
|
163 * @since ?Series60_version |
|
164 */ |
|
165 void Delete(); |
|
166 |
|
167 /** |
|
168 * Test methods are listed below. |
|
169 */ |
|
170 |
|
171 virtual TInt ExecuteApiTest( CStifItemParser& aItem ); |
|
172 virtual TInt ExecuteModuleTest( CStifItemParser& aItem ); |
|
173 virtual TInt ExecuteBranchTest( CStifItemParser& aItem ); |
|
174 |
|
175 /** |
|
176 * Method used to log version of test class |
|
177 */ |
|
178 void SendTestClassVersion(); |
|
179 |
|
180 //ADD NEW METHOD DEC HERE |
|
181 //[TestMethods] - Do not remove |
|
182 |
|
183 void DoExecuteApiTestL( TPtrC aApiTestName, TUsbObexClassControllerTestResult& aTestResult ); |
|
184 |
|
185 void ExampleApiTestL( TUsbObexClassControllerTestResult& aTestResult ); |
|
186 |
|
187 void DoExecuteModuleTestL( TPtrC aModuleTestName, TUsbObexClassControllerTestResult& aTestResult ); |
|
188 |
|
189 void ExampleModuleTestL( TUsbObexClassControllerTestResult& aTestResult ); |
|
190 |
|
191 void DoExecuteBranchTestL( TPtrC aBranchTestName, TUsbObexClassControllerTestResult& aTestResult ); |
|
192 |
|
193 void ExampleBranchTestL( TUsbObexClassControllerTestResult& aTestResult ); |
|
194 |
|
195 void InitializeTestObjectL(); |
|
196 void DeleteTestObject(); |
|
197 TInt InitializationTestL( TUsbObexClassControllerTestResult& aTestResult ); |
|
198 TInt StartTestL( TUsbObexClassControllerTestResult& aTestResult ); |
|
199 TInt StopTestL( TUsbObexClassControllerTestResult& aTestResult ); |
|
200 TInt InterfaceInfoTestL( TUsbObexClassControllerTestResult& aTestResult ); |
|
201 TInt InterfaceLengthInfoTestL( TUsbObexClassControllerTestResult& aTestResult ); |
|
202 TInt NumberOfInterfacesInfoTestL( TUsbObexClassControllerTestResult& aTestResult ); |
|
203 TInt StartupPriorityInfoTestL( TUsbObexClassControllerTestResult& aTestResult ); |
|
204 TInt StateInfoTestL( TUsbObexClassControllerTestResult& aTestResult ); |
|
205 TInt OwnerTestL( TUsbObexClassControllerTestResult& aTestResult ); |
|
206 TInt CompareTestL( TUsbObexClassControllerTestResult& aTestResult ); |
|
207 |
|
208 public: // Data |
|
209 // ?one_line_short_description_of_data |
|
210 //?data_declaration; |
|
211 |
|
212 protected: // Data |
|
213 // ?one_line_short_description_of_data |
|
214 //?data_declaration; |
|
215 |
|
216 private: // Data |
|
217 |
|
218 // ?one_line_short_description_of_data |
|
219 //?data_declaration; |
|
220 |
|
221 CUsbClassControllerPlugIn* iUsbClassControllerPlugIn; |
|
222 CActiveScheduler* iScheduler; |
|
223 TRequestStatus iRequestStatus; |
|
224 TUsbServiceState iUsbServiceState; |
|
225 |
|
226 // Reserved pointer for future extension |
|
227 //TAny* iReserved; |
|
228 |
|
229 public: // Friend classes |
|
230 //?friend_class_declaration; |
|
231 protected: // Friend classes |
|
232 //?friend_class_declaration; |
|
233 private: // Friend classes |
|
234 //?friend_class_declaration; |
|
235 |
|
236 }; |
|
237 |
|
238 #endif // USBOBEXCLASSCONTROLLERTEST_H |
|
239 |
|
240 // End of File |
|