|
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: STIF testclass declaration |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef UT_COLLECTIONMANAGER_H |
|
21 #define UT_COLLECTIONMANAGER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <StifLogger.h> |
|
25 #include <TestScripterInternal.h> |
|
26 #include <StifTestModule.h> |
|
27 #include <TestclassAssert.h> |
|
28 |
|
29 #include "glxcollectionmanagerao.h" |
|
30 |
|
31 // CONSTANTS |
|
32 //const ?type ?constant_var = ?constant; |
|
33 |
|
34 // MACROS |
|
35 //#define ?macro ?macro_def |
|
36 #define TEST_CLASS_VERSION_MAJOR 0 |
|
37 #define TEST_CLASS_VERSION_MINOR 0 |
|
38 #define TEST_CLASS_VERSION_BUILD 0 |
|
39 |
|
40 // Logging path |
|
41 _LIT( Kut_collectionmanagerLogPath, "\\logs\\testframework\\ut_collectionmanager\\" ); |
|
42 // Log file |
|
43 _LIT( Kut_collectionmanagerLogFile, "ut_collectionmanager.txt" ); |
|
44 _LIT( Kut_collectionmanagerLogFileWithTitle, "ut_collectionmanager_[%S].txt" ); |
|
45 |
|
46 // FUNCTION PROTOTYPES |
|
47 //?type ?function_name(?arg_list); |
|
48 |
|
49 // FORWARD DECLARATIONS |
|
50 //class ?FORWARD_CLASSNAME; |
|
51 class Cut_collectionmanager; |
|
52 |
|
53 |
|
54 // DATA TYPES |
|
55 //enum ?declaration |
|
56 //typedef ?declaration |
|
57 //extern ?data_type; |
|
58 |
|
59 // CLASS DECLARATION |
|
60 |
|
61 class CGlxCollectionManagerAO ; |
|
62 |
|
63 /** |
|
64 * Cut_collectionmanager test class for STIF Test Framework TestScripter. |
|
65 * ?other_description_lines |
|
66 * |
|
67 * @lib ?library |
|
68 * @since ?Series60_version |
|
69 */ |
|
70 NONSHARABLE_CLASS(Cut_collectionmanager) : public CScriptBase,public MObserver |
|
71 { |
|
72 public: // Constructors and destructor |
|
73 |
|
74 /** |
|
75 * Two-phased constructor. |
|
76 */ |
|
77 static Cut_collectionmanager* NewL( CTestModuleIf& aTestModuleIf ); |
|
78 |
|
79 /** |
|
80 * Destructor. |
|
81 */ |
|
82 virtual ~Cut_collectionmanager(); |
|
83 |
|
84 public: // New functions |
|
85 |
|
86 /** |
|
87 * ?member_description. |
|
88 * @since ?Series60_version |
|
89 * @param ?arg1 ?description |
|
90 * @return ?description |
|
91 */ |
|
92 //?type ?member_function( ?type ?arg1 ); |
|
93 |
|
94 public: // Functions from base classes |
|
95 |
|
96 /** |
|
97 * From CScriptBase Runs a script line. |
|
98 * @since ?Series60_version |
|
99 * @param aItem Script line containing method name and parameters |
|
100 * @return Symbian OS error code |
|
101 */ |
|
102 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
103 |
|
104 protected: // New functions |
|
105 |
|
106 /** |
|
107 * ?member_description. |
|
108 * @since ?Series60_version |
|
109 * @param ?arg1 ?description |
|
110 * @return ?description |
|
111 */ |
|
112 //?type ?member_function( ?type ?arg1 ); |
|
113 |
|
114 protected: // Functions from base classes |
|
115 |
|
116 /** |
|
117 * From ?base_class ?member_description |
|
118 */ |
|
119 //?type ?member_function(); |
|
120 |
|
121 private: |
|
122 |
|
123 /** |
|
124 * C++ default constructor. |
|
125 */ |
|
126 Cut_collectionmanager( CTestModuleIf& aTestModuleIf ); |
|
127 |
|
128 /** |
|
129 * By default Symbian 2nd phase constructor is private. |
|
130 */ |
|
131 void ConstructL(); |
|
132 |
|
133 // Prohibit copy constructor if not deriving from CBase. |
|
134 // ?classname( const ?classname& ); |
|
135 // Prohibit assigment operator if not deriving from CBase. |
|
136 // ?classname& operator=( const ?classname& ); |
|
137 |
|
138 /** |
|
139 * Frees all resources allocated from test methods. |
|
140 * @since ?Series60_version |
|
141 */ |
|
142 void Delete(); |
|
143 |
|
144 /** |
|
145 * Test methods are listed below. |
|
146 */ |
|
147 |
|
148 |
|
149 /** |
|
150 * Test case for CollectionManager object creation |
|
151 * @param aItem Script line containing parameters. |
|
152 * @return Symbian OS error code |
|
153 */ |
|
154 virtual TInt NewLTestL( CStifItemParser& aItem ); |
|
155 |
|
156 /** |
|
157 * Test case for CollectionManager object Destruction |
|
158 * @param aItem Script line containing parameters. |
|
159 * @return Symbian OS error code. |
|
160 */ |
|
161 virtual TInt DestructionTestL(CStifItemParser& aItem); |
|
162 |
|
163 /** |
|
164 * Test case to check whether the image at the specified URI |
|
165 * has been added to the specified collection. |
|
166 * @param aItem Script line containing parameters. |
|
167 * @return Symbian OS error code. |
|
168 */ |
|
169 virtual TInt AddToCollectionTestL(CStifItemParser& aItem); |
|
170 |
|
171 /** |
|
172 * Method used to log version of test class |
|
173 */ |
|
174 void SendTestClassVersion(); |
|
175 |
|
176 void RequestComplete(TInt aError); |
|
177 |
|
178 //ADD NEW METHOD DEC HERE |
|
179 //[TestMethods] - Do not remove |
|
180 virtual TInt TestCollectionInfoL(); |
|
181 virtual TInt TestCancelL(); |
|
182 |
|
183 public: // Data |
|
184 // ?one_line_short_description_of_data |
|
185 //?data_declaration; |
|
186 |
|
187 protected: // Data |
|
188 // ?one_line_short_description_of_data |
|
189 //?data_declaration; |
|
190 |
|
191 private: // Data |
|
192 |
|
193 // ?one_line_short_description_of_data |
|
194 //?data_declaration; |
|
195 |
|
196 // CollectionManager Active Object used to create collections of images |
|
197 |
|
198 // Reserved pointer for future extension |
|
199 //TAny* iReserved; |
|
200 |
|
201 |
|
202 public: // Friend classes |
|
203 //?friend_class_declaration; |
|
204 |
|
205 protected: // Friend classes |
|
206 //?friend_class_declaration; |
|
207 private: // Friend classes |
|
208 //?friend_class_declaration; |
|
209 CGlxCollectionManagerAO* iAo ; |
|
210 CActiveSchedulerWait* iWait ; |
|
211 |
|
212 }; |
|
213 |
|
214 #endif // UT_COLLECTIONMANAGER_H |
|
215 |
|
216 // End of File |