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: For packing VMBXEngine test component. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CVMBXENGINETEST_H |
|
19 #define CVMBXENGINETEST_H |
|
20 |
|
21 #define STIFTEST |
|
22 |
|
23 #include <stiflogger.h> |
|
24 #include <testscripterinternal.h> |
|
25 #include <stiftestmodule.h> |
|
26 |
|
27 class RVmbxNumber; |
|
28 |
|
29 class CRepository; |
|
30 class MCenRepNotifyHandlerCallback; |
|
31 class CCenRepNotifyHandler; |
|
32 |
|
33 // Logging path |
|
34 _LIT( KLogPath, "\\logs\\testframework\\vmbxenginetest\\" ); |
|
35 // Log file |
|
36 _LIT( KLogFile, "vmbxenginetest.txt" ); |
|
37 |
|
38 |
|
39 /** |
|
40 * Test class for VMBX Engine |
|
41 * |
|
42 * @lib vmbxenginetest.dll |
|
43 * @since S60 5.1 |
|
44 */ |
|
45 class CVmbxEngineTest : public CScriptBase, public MCenRepNotifyHandlerCallback |
|
46 { |
|
47 public: |
|
48 |
|
49 /** |
|
50 * Two-phased constructor. |
|
51 */ |
|
52 static CVmbxEngineTest* NewL( CTestModuleIf& aTestModuleIf ); |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 virtual ~CVmbxEngineTest(); |
|
58 |
|
59 /** |
|
60 * From CScriptBase Runs a script line. |
|
61 * |
|
62 * @since S60 5.1 |
|
63 * @param aItem Script line containing method name and parameters |
|
64 * @return Symbian OS error code |
|
65 */ |
|
66 TInt RunMethodL( CStifItemParser& aItem ); |
|
67 |
|
68 private: // Methods for engine |
|
69 |
|
70 /** |
|
71 * C++ default constructor. |
|
72 */ |
|
73 CVmbxEngineTest( CTestModuleIf& aTestModuleIf ); |
|
74 |
|
75 /** |
|
76 * By default Symbian 2nd phase constructor is private. |
|
77 */ |
|
78 void ConstructL(); |
|
79 |
|
80 /** |
|
81 * Calls RVmbxNumber::Connect |
|
82 * |
|
83 * @since S60 5.1 |
|
84 * @param aItem, Script line containing method name and parameters |
|
85 * @return TInt, KErrNone if OK, other values if a failure happens |
|
86 */ |
|
87 TInt Connect( CStifItemParser& aItem ); |
|
88 |
|
89 /** |
|
90 * Calls RVmbxNumber::Close |
|
91 * |
|
92 * @since S60 5.1 |
|
93 * @param aItem, Script line containing method name and parameters |
|
94 * @return TInt, KErrNone if OK, other values if a failure happens |
|
95 */ |
|
96 TInt Close( CStifItemParser& aItem ); |
|
97 |
|
98 /** |
|
99 * Calls RVmbxNumber::AllowedToChangeTheNumber |
|
100 * |
|
101 * @since S60 5.1 |
|
102 * @param aItem, Script line containing method name and parameters |
|
103 * @return TInt, KErrNone if OK, other values if a failure happens |
|
104 */ |
|
105 TInt AllowedToChangeTheNumber( CStifItemParser& aItem ); |
|
106 |
|
107 /** |
|
108 * Calls RVmbxNumber::SelectTypeL |
|
109 * |
|
110 * @since S60 5.1 |
|
111 * @param aItem, Script line containing method name and parameters |
|
112 * @return TInt, KErrNone if OK, other values if a failure happens |
|
113 */ |
|
114 TInt SelectTypeL( CStifItemParser& aItem ); |
|
115 |
|
116 /** |
|
117 * Calls RVmbxNumber::IsSimMemory |
|
118 * |
|
119 * @since S60 5.1 |
|
120 * @param aItem, Script line containing method name and parameters |
|
121 * @return TInt, KErrNone if OK, other values if a failure happens |
|
122 */ |
|
123 TInt IsSimMemory( CStifItemParser& aItem ); |
|
124 |
|
125 /** |
|
126 * Calls RVmbxNumber::QueryVideoMbxNumber |
|
127 * |
|
128 * @since S60 5.1 |
|
129 * @param aItem, Script line containing method name and parameters |
|
130 * @return TInt, KErrNone if OK, other values if a failure happens |
|
131 */ |
|
132 TInt QueryVideoMbxNumber( CStifItemParser& aItem ); |
|
133 |
|
134 /** |
|
135 * Calls RVmbxNumber::QueryNumberL |
|
136 * @since S60 5.1 |
|
137 * @param aItem, Script line containing method name and parameters |
|
138 * @return TInt, KErrNone if OK, other values if a failure happens |
|
139 */ |
|
140 TInt QueryNumberL( CStifItemParser& aItem ); |
|
141 |
|
142 /** |
|
143 * Calls RVmbxNumber::GetVideoMbxNumber |
|
144 * @since S60 5.1 |
|
145 * @param aItem, Script line containing method name and parameters |
|
146 * @return TInt, KErrNone if OK, other values if a failure happens |
|
147 */ |
|
148 TInt GetVideoMbxNumber( CStifItemParser& aItem ); |
|
149 |
|
150 private: |
|
151 /** |
|
152 * Calls ConfCenRepForEditNotAllowedL |
|
153 * @since S60 5.1 |
|
154 * @param aItem, Script line containing method name and parameters |
|
155 * @return TInt, KErrNone if OK, other values if a failure happens |
|
156 */ |
|
157 TInt ConfCenRepForEditNotAllowedL( CStifItemParser& aItem ); |
|
158 |
|
159 /** |
|
160 * Calls RevertCenRepEditNotAllowedL |
|
161 * @since S60 5.1 |
|
162 * @param aItem, Script line containing method name and parameters |
|
163 * @return TInt, KErrNone if OK, other values if a failure happens |
|
164 */ |
|
165 TInt RevertCenRepEditNotAllowedL( CStifItemParser& aItem ); |
|
166 |
|
167 /** |
|
168 * Calls ConfCenRepForEditAllowedL |
|
169 * @since S60 5.1 |
|
170 * @param aItem, Script line containing method name and parameters |
|
171 * @return TInt, KErrNone if OK, other values if a failure happens |
|
172 */ |
|
173 TInt ConfCenRepForEditAllowedL( CStifItemParser& aItem ); |
|
174 |
|
175 /** |
|
176 * Calls InitGetNumFromSpecialMem |
|
177 * @since S60 5.1 |
|
178 * @param aItem, Script line containing method name and parameters |
|
179 * @return TInt, KErrNone if OK, other values if a failure happens |
|
180 */ |
|
181 TInt InitGetNumFromSpecialMem( CStifItemParser& aItem ); |
|
182 |
|
183 /** |
|
184 * Calls TestGetNumFromSpecialMem |
|
185 * @since S60 5.1 |
|
186 * @param aItem, Script line containing method name and parameters |
|
187 * @return TInt, KErrNone if OK, other values if a failure happens |
|
188 */ |
|
189 TInt TestGetNumFromSpecialMem( CStifItemParser& aItem ); |
|
190 |
|
191 /** |
|
192 * Calls CleanupGetNumFromSpecialMem |
|
193 * @since S60 5.1 |
|
194 * @param aItem, Script line containing method name and parameters |
|
195 * @return TInt, KErrNone if OK, other values if a failure happens |
|
196 */ |
|
197 TInt CleanupGetNumFromSpecialMem( CStifItemParser& aItem ); |
|
198 |
|
199 /** |
|
200 * Save the source number temporarily |
|
201 * @since S60 5.1 |
|
202 */ |
|
203 void SaveSourceNumber(); |
|
204 |
|
205 /** |
|
206 * Create central repository for session and handler |
|
207 * @since S60 5.1 |
|
208 */ |
|
209 void CreateCentralRepositoryL(); |
|
210 |
|
211 private: // Data |
|
212 |
|
213 /** |
|
214 * Pointer to logger |
|
215 * Own. |
|
216 */ |
|
217 CStifLogger * iLog; |
|
218 |
|
219 /** |
|
220 * Pointer to engine |
|
221 * Own. |
|
222 */ |
|
223 RVmbxNumber *iVmbxNumber; |
|
224 |
|
225 /** |
|
226 * Pointer to repository |
|
227 * Own. |
|
228 */ |
|
229 CRepository* iSession; |
|
230 |
|
231 /** |
|
232 * Pointer to cenreqnotifyhandler |
|
233 * Own. |
|
234 */ |
|
235 CCenRepNotifyHandler* iNotifyHandler; |
|
236 |
|
237 /** |
|
238 * Pointer to HBufC for mailbox number |
|
239 * Own. |
|
240 */ |
|
241 HBufC* iNumberBuf; |
|
242 }; |
|
243 |
|
244 #endif // CVMBXEngineTestTEST_H |
|