|
1 /* |
|
2 * Copyright (c) 2002-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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 // [INCLUDE FILES] - do not remove |
|
27 #include <e32svr.h> |
|
28 #include <StifParser.h> |
|
29 #include <Stiftestinterface.h> |
|
30 #include "ProEngWrapAPI.h" |
|
31 |
|
32 |
|
33 // ============================ MEMBER FUNCTIONS =============================== |
|
34 |
|
35 // ----------------------------------------------------------------------------- |
|
36 // CProEngWrapAPI::Delete |
|
37 // Delete here all resources allocated and opened from test methods. |
|
38 // Called from destructor. |
|
39 // ----------------------------------------------------------------------------- |
|
40 // |
|
41 void CProEngWrapAPI::Delete() |
|
42 { |
|
43 |
|
44 } |
|
45 |
|
46 // ----------------------------------------------------------------------------- |
|
47 // CProEngWrapAPI::RunMethodL |
|
48 // Run specified method. Contains also table of test mothods and their names. |
|
49 // ----------------------------------------------------------------------------- |
|
50 // |
|
51 TInt CProEngWrapAPI::RunMethodL( |
|
52 CStifItemParser& aItem ) |
|
53 { |
|
54 |
|
55 TStifFunctionInfo const KFunctions[] = |
|
56 { |
|
57 // Copy this line for every implemented function. |
|
58 // First string is the function name used in TestScripter script file. |
|
59 // Second is the actual implementation member function. |
|
60 ENTRY( "NewEngineL", CProEngWrapAPI::NewEngineL ), |
|
61 ENTRY( "NewEngineLC", CProEngWrapAPI::NewEngineLC ), |
|
62 ENTRY( "NewEngineLCWithRFsL", CProEngWrapAPI::NewEngineLCWithRFsL ), |
|
63 ENTRY( "NewNotifyHandlerL", CProEngWrapAPI::NewNotifyHandlerL ), |
|
64 ENTRY( "ReqProfActNotificationsL", CProEngWrapAPI::RequestProfileActivationNotificationsL ), |
|
65 ENTRY( "CanProfActNotificationsL", CProEngWrapAPI::CancelProfileActivationNotificationsL ), |
|
66 ENTRY( "ReqActProfNotificationsL", CProEngWrapAPI::RequestActiveProfileNotificationsL ), |
|
67 ENTRY( "CanActProfNotificationsL", CProEngWrapAPI::CancelProfileActivationNotificationsL ), |
|
68 ENTRY( "ReqProfNotificationsL", CProEngWrapAPI::RequestProfileNotificationsL ), |
|
69 ENTRY( "CanProfNotificationsL", CProEngWrapAPI::CancelProfileNotificationsL ), |
|
70 ENTRY( "ReqProfNameArrayNotL", CProEngWrapAPI::RequestProfileNameArrayNotificationsL ), |
|
71 ENTRY( "CanProfNameArrayNotL", CProEngWrapAPI::CancelProfileNameArrayNotificationsL ), |
|
72 ENTRY( "CancelAllL", CProEngWrapAPI::CancelAllL ), |
|
73 ENTRY( "ActiveProfileLC", CProEngWrapAPI::ActiveProfileLC ), |
|
74 ENTRY( "ActiveProfileL", CProEngWrapAPI::ActiveProfileLC ), |
|
75 ENTRY( "ActiveProfileIdL", CProEngWrapAPI::ActiveProfileIdL ), |
|
76 ENTRY( "ProfileNameArrayLC", CProEngWrapAPI::ProfileNameArrayLC ), |
|
77 ENTRY( "SetActiveProfileL", CProEngWrapAPI::SetActiveProfileL ), |
|
78 ENTRY( "ProfileLC", CProEngWrapAPI::ProfileLC ), |
|
79 ENTRY( "ProfileL", CProEngWrapAPI::ProfileL ), |
|
80 ENTRY( "MdcaCountL", CProEngWrapAPI::MdcaCountL ), |
|
81 ENTRY( "MdcaPointL", CProEngWrapAPI::MdcaPointL ), |
|
82 ENTRY( "ProfileIdL", CProEngWrapAPI::ProfileIdL ), |
|
83 ENTRY( "FindByIdL", CProEngWrapAPI::FindByIdL ), |
|
84 ENTRY( "FindByNameL", CProEngWrapAPI::FindByNameL ), |
|
85 ENTRY( "ProfileNameL", CProEngWrapAPI::ProfileNameL ), |
|
86 ENTRY( "ProfileTonesL", CProEngWrapAPI::ProfileTonesL ), |
|
87 ENTRY( "ToneSettingsL", CProEngWrapAPI::ToneSettingsL ), |
|
88 ENTRY( "AlertForL", CProEngWrapAPI::AlertForL ), |
|
89 ENTRY( "SetAlertForL", CProEngWrapAPI::SetAlertForL ), |
|
90 ENTRY( "IsSilentL", CProEngWrapAPI::IsSilentL ), |
|
91 ENTRY( "CommitChangeL", CProEngWrapAPI::CommitChangeL ), |
|
92 ENTRY( "NameL", CProEngWrapAPI::NameL ), |
|
93 ENTRY( "IdL", CProEngWrapAPI::IdL ), |
|
94 ENTRY( "SetNameL", CProEngWrapAPI::SetNameL ), |
|
95 ENTRY( "RingingTone1L", CProEngWrapAPI::RingingTone1L ), |
|
96 ENTRY( "RingingTone2L", CProEngWrapAPI::RingingTone2L ), |
|
97 ENTRY( "MessageAlertToneL", CProEngWrapAPI::MessageAlertToneL ), |
|
98 ENTRY( "EmailAlertToneL", CProEngWrapAPI::EmailAlertToneL ), |
|
99 ENTRY( "VideoCallRingingToneL", CProEngWrapAPI::VideoCallRingingToneL ), |
|
100 ENTRY( "SetRingingTone1L", CProEngWrapAPI::SetRingingTone1L ), |
|
101 ENTRY( "SetRingingTone2L", CProEngWrapAPI::SetRingingTone2L ), |
|
102 ENTRY( "SetMessageAlertToneL", CProEngWrapAPI::SetMessageAlertToneL ), |
|
103 ENTRY( "SetEmailAlertToneL", CProEngWrapAPI::SetEmailAlertToneL ), |
|
104 ENTRY( "SetVideoCallRingingToneL", CProEngWrapAPI::SetVideoCallRingingToneL ), |
|
105 ENTRY( "RingingTypeL", CProEngWrapAPI::RingingTypeL ), |
|
106 ENTRY( "KeypadVolumeL", CProEngWrapAPI::KeypadVolumeL ), |
|
107 ENTRY( "RingingVolumeL", CProEngWrapAPI::RingingVolumeL ), |
|
108 ENTRY( "VibratingAlertL", CProEngWrapAPI::VibratingAlertL ), |
|
109 ENTRY( "WarningAndGameTonesL", CProEngWrapAPI::WarningAndGameTonesL ), |
|
110 ENTRY( "TextToSpeechL", CProEngWrapAPI::TextToSpeechL ), |
|
111 ENTRY( "SetRingingTypeL", CProEngWrapAPI::SetRingingTypeL ), |
|
112 ENTRY( "SetKeypadVolumeL", CProEngWrapAPI::SetKeypadVolumeL ), |
|
113 ENTRY( "SetRingingVolumeL", CProEngWrapAPI::SetRingingVolumeL ), |
|
114 ENTRY( "SetVibratingAlertL", CProEngWrapAPI::SetVibratingAlertL ), |
|
115 ENTRY( "SetWarningAndGameTonesL", CProEngWrapAPI::SetWarningAndGameTonesL ), |
|
116 ENTRY( "SetTextToSpeechL", CProEngWrapAPI::SetTextToSpeechL ), |
|
117 ENTRY( "NewAlertToneSeekerL", CProEngWrapAPI::NewAlertToneSeekerL ), |
|
118 ENTRY( "FetchAlertToneListL", CProEngWrapAPI::FetchAlertToneListL ), |
|
119 ENTRY( "CancelFetchL", CProEngWrapAPI::CancelFetchL ), |
|
120 //ADD NEW ENTRY HERE |
|
121 // [test cases entries] - Do not remove |
|
122 |
|
123 }; |
|
124 |
|
125 const TInt count = sizeof( KFunctions ) / |
|
126 sizeof( TStifFunctionInfo ); |
|
127 |
|
128 return RunInternalL( KFunctions, count, aItem ); |
|
129 |
|
130 } |
|
131 |
|
132 // ----------------------------------------------------------------------------- |
|
133 // CProEngWrapAPI::NewEngineL |
|
134 // Test: ProEngFactory::NewEngineL() |
|
135 // (other items were commented in a header). |
|
136 // ----------------------------------------------------------------------------- |
|
137 // |
|
138 TInt CProEngWrapAPI::NewEngineL() |
|
139 { |
|
140 RDebug::Print( _L( "ProEng Validation test NewEngineL" ) ); |
|
141 MProEngEngine* engine( NULL ); |
|
142 TRAP_IGNORE( engine = ProEngFactory::NewEngineL() ); |
|
143 if(engine) |
|
144 { |
|
145 engine->Release(); |
|
146 engine = NULL; |
|
147 } |
|
148 return KErrNone; |
|
149 } |
|
150 // ----------------------------------------------------------------------------- |
|
151 // CProEngWrapAPI::NewEngineLC |
|
152 // Test: ProEngFactory::NewEngineLC() |
|
153 // (other items were commented in a header). |
|
154 // ----------------------------------------------------------------------------- |
|
155 // |
|
156 TInt CProEngWrapAPI::NewEngineLC() |
|
157 { |
|
158 RDebug::Print( _L( "ProEng Validation test NewEngineLC" ) ); |
|
159 MProEngEngine* engine(NULL); |
|
160 engine = ProEngFactory::NewEngineLC(); |
|
161 CleanupStack::PopAndDestroy(); // engine |
|
162 return KErrNone; |
|
163 } |
|
164 // ----------------------------------------------------------------------------- |
|
165 // CProEngWrapAPI::NewEngineLCWithRFsL |
|
166 // Test: ProEngFactory::NewEngineLC(RFs) |
|
167 // (other items were commented in a header). |
|
168 // ----------------------------------------------------------------------------- |
|
169 // |
|
170 TInt CProEngWrapAPI::NewEngineLCWithRFsL() |
|
171 { |
|
172 |
|
173 RDebug::Print( _L( "ProEng Validation test NewEngineLCWithRFsL" ) ); |
|
174 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
175 CleanupStack::PopAndDestroy(); // engine |
|
176 return KErrNone; |
|
177 } |
|
178 // ----------------------------------------------------------------------------- |
|
179 // CProEngWrapAPI::NewEngineLCWithRFsL |
|
180 // Test: ProEngFactory::NewNotifyHandlerL() |
|
181 // Test: MProEngNotifyHandler::RequestProfileActivationNotificationsL(MProEngProfileActivationObserver&) |
|
182 // (other items were commented in a header). |
|
183 // ----------------------------------------------------------------------------- |
|
184 // |
|
185 |
|
186 TInt CProEngWrapAPI::NewNotifyHandlerL() |
|
187 { |
|
188 RDebug::Print( _L( "ProEng Validation test NewNotifyHandlerL" ) ); |
|
189 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
190 MProEngNotifyHandler* nh( NULL ); |
|
191 CProEngVTNotifyHandlerWrapper* wrapper = new ( ELeave )CProEngVTNotifyHandlerWrapper(); |
|
192 CleanupStack::PushL( wrapper ); |
|
193 TRAP_IGNORE( nh = ProEngFactory::NewNotifyHandlerL() ); |
|
194 if (nh) |
|
195 { |
|
196 wrapper->SetObject(nh); |
|
197 } |
|
198 CleanupStack::PopAndDestroy( wrapper ); |
|
199 CleanupStack::PopAndDestroy(); // engine |
|
200 return KErrNone; |
|
201 } |
|
202 // ----------------------------------------------------------------------------- |
|
203 // CProEngWrapAPI::RequestProfileActivationNotificationsL |
|
204 // Test: MProEngNotifyHandler::RequestProfileActivationNotificationsL(MProEngProfileActivationObserver&) |
|
205 // (other items were commented in a header). |
|
206 // ----------------------------------------------------------------------------- |
|
207 // |
|
208 TInt CProEngWrapAPI::RequestProfileActivationNotificationsL() |
|
209 { |
|
210 RDebug::Print( _L( "ProEng Validation test RequestProfileActivationNotificationsL begin" ) ); |
|
211 RDebug::Print( _L( "ProEng Validation test NewNotifyHandlerL" ) ); |
|
212 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
213 MProEngNotifyHandler* nh( NULL ); |
|
214 CProEngVTNotifyHandlerWrapper* wrapper = new ( ELeave )CProEngVTNotifyHandlerWrapper(); |
|
215 CleanupStack::PushL( wrapper ); |
|
216 TRAP_IGNORE( nh = ProEngFactory::NewNotifyHandlerL() ); |
|
217 if( nh ) |
|
218 { |
|
219 wrapper->SetObject( nh ); // takes ownership |
|
220 } |
|
221 CProEngVTObserver* observer = new ( ELeave ) CProEngVTObserver(*iSchedulerUtility); |
|
222 CleanupStack::PushL( observer ); |
|
223 |
|
224 TRAP_IGNORE(nh->RequestProfileActivationNotificationsL ( *observer ) ); |
|
225 engine->SetActiveProfileL( EProfileMeetingId ); |
|
226 iSchedulerUtility->Start(); |
|
227 CleanupStack::PopAndDestroy( observer ); |
|
228 CleanupStack::PopAndDestroy( wrapper ); |
|
229 CleanupStack::PopAndDestroy(); // engine |
|
230 return KErrNone; |
|
231 } |
|
232 |
|
233 // ----------------------------------------------------------------------------- |
|
234 // CProEngWrapAPI::CancelProfileActivationNotificationsL |
|
235 // Test: MProEngNotifyHandler::CancelProfileActivationNotifications() |
|
236 // (other items were commented in a header). |
|
237 // ----------------------------------------------------------------------------- |
|
238 // |
|
239 TInt CProEngWrapAPI::CancelProfileActivationNotificationsL() |
|
240 { |
|
241 RDebug::Print( _L( "ProEng Validation test CancelProfileActivationNotificationsL begin" ) ); |
|
242 RDebug::Print( _L( "ProEng Validation test NewNotifyHandlerL" ) ); |
|
243 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
244 MProEngNotifyHandler* nh( NULL ); |
|
245 CProEngVTNotifyHandlerWrapper* wrapper = new ( ELeave )CProEngVTNotifyHandlerWrapper(); |
|
246 CleanupStack::PushL( wrapper ); |
|
247 TRAP_IGNORE( nh = ProEngFactory::NewNotifyHandlerL() ); |
|
248 if( nh ) |
|
249 { |
|
250 wrapper->SetObject( nh ); // takes ownership |
|
251 } |
|
252 CProEngVTObserver* observer = new ( ELeave ) CProEngVTObserver(*iSchedulerUtility); |
|
253 CleanupStack::PushL( observer ); |
|
254 |
|
255 TRAP_IGNORE(nh->RequestProfileActivationNotificationsL ( *observer ) ); |
|
256 engine->SetActiveProfileL( EProfileMeetingId ); |
|
257 iSchedulerUtility->Start(); |
|
258 nh->CancelProfileActivationNotifications(); |
|
259 CleanupStack::PopAndDestroy( observer ); |
|
260 CleanupStack::PopAndDestroy( wrapper ); |
|
261 CleanupStack::PopAndDestroy(); // engine |
|
262 return KErrNone; |
|
263 } |
|
264 |
|
265 // ----------------------------------------------------------------------------- |
|
266 // CProEngWrapAPI::RequestActiveProfileNotificationsL |
|
267 // Test: MProEngNotifyHandler::RequestActiveProfileNotificationsL(MProEngActiveProfileObserver&) |
|
268 // (other items were commented in a header). |
|
269 // ----------------------------------------------------------------------------- |
|
270 // |
|
271 TInt CProEngWrapAPI::RequestActiveProfileNotificationsL() |
|
272 { |
|
273 RDebug::Print( _L( "ProEng Validation test RequestProfileActivationNotificationsL begin" ) ); |
|
274 RDebug::Print( _L( "ProEng Validation test NewNotifyHandlerL" ) ); |
|
275 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
276 MProEngNotifyHandler* nh( NULL ); |
|
277 CProEngVTNotifyHandlerWrapper* wrapper = new ( ELeave )CProEngVTNotifyHandlerWrapper(); |
|
278 CleanupStack::PushL( wrapper ); |
|
279 TRAP_IGNORE( nh = ProEngFactory::NewNotifyHandlerL() ); |
|
280 if( nh ) |
|
281 { |
|
282 wrapper->SetObject( nh ); // takes ownership |
|
283 } |
|
284 CProEngVTObserver* observer = new ( ELeave ) CProEngVTObserver(*iSchedulerUtility); |
|
285 CleanupStack::PushL( observer ); |
|
286 |
|
287 MProEngProfile* activeProfile = engine->ActiveProfileLC(); |
|
288 MProEngToneSettings& ts( activeProfile->ToneSettings() ); |
|
289 TRAP_IGNORE( |
|
290 nh->RequestActiveProfileNotificationsL ( *observer ) ); |
|
291 ts.SetVibratingAlert( !ts.VibratingAlert() ); |
|
292 activeProfile->CommitChangeL(); |
|
293 iSchedulerUtility->Start(); |
|
294 CleanupStack::PopAndDestroy(); // activeProfile |
|
295 CleanupStack::PopAndDestroy( observer ); |
|
296 CleanupStack::PopAndDestroy( wrapper ); |
|
297 CleanupStack::PopAndDestroy(); // engine |
|
298 return KErrNone; |
|
299 } |
|
300 |
|
301 // ----------------------------------------------------------------------------- |
|
302 // CProEngWrapAPI::CancelActiveProfileNotificationsL |
|
303 // Test: MProEngNotifyHandler::CancelActiveProfileNotifications() |
|
304 // (other items were commented in a header). |
|
305 // ----------------------------------------------------------------------------- |
|
306 // |
|
307 TInt CProEngWrapAPI::CancelActiveProfileNotificationsL() |
|
308 { |
|
309 RDebug::Print( _L( "ProEng Validation test CancelActiveProfileNotifications begin" ) ); |
|
310 RDebug::Print( _L( "ProEng Validation test NewNotifyHandlerL" ) ); |
|
311 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
312 MProEngNotifyHandler* nh( NULL ); |
|
313 CProEngVTNotifyHandlerWrapper* wrapper = new ( ELeave )CProEngVTNotifyHandlerWrapper(); |
|
314 CleanupStack::PushL( wrapper ); |
|
315 TRAP_IGNORE( nh = ProEngFactory::NewNotifyHandlerL() ); |
|
316 if( nh ) |
|
317 { |
|
318 wrapper->SetObject( nh ); // takes ownership |
|
319 } |
|
320 CProEngVTObserver* observer = new ( ELeave ) CProEngVTObserver(*iSchedulerUtility); |
|
321 CleanupStack::PushL( observer ); |
|
322 MProEngProfile* activeProfile = engine->ActiveProfileLC(); |
|
323 MProEngToneSettings& ts( activeProfile->ToneSettings() ); |
|
324 RDebug::Print( _L( "ProEng Validation test TestNotifyHandler 5" ) ); |
|
325 TRAP_IGNORE( |
|
326 nh->RequestActiveProfileNotificationsL ( *observer ) ); |
|
327 ts.SetVibratingAlert( !ts.VibratingAlert() ); |
|
328 activeProfile->CommitChangeL(); |
|
329 iSchedulerUtility->Start(); |
|
330 nh->CancelActiveProfileNotifications(); |
|
331 CleanupStack::PopAndDestroy(); // activeProfile |
|
332 CleanupStack::PopAndDestroy( observer ); |
|
333 CleanupStack::PopAndDestroy( wrapper ); |
|
334 CleanupStack::PopAndDestroy(); // engine |
|
335 return KErrNone; |
|
336 } |
|
337 |
|
338 // ----------------------------------------------------------------------------- |
|
339 // CProEngWrapAPI::RequestProfileNotificationsL |
|
340 // Test: MProEngNotifyHandler::RequestProfileNotificationsL(MProEngActiveProfileObserver&) |
|
341 // (other items were commented in a header). |
|
342 // ----------------------------------------------------------------------------- |
|
343 // |
|
344 TInt CProEngWrapAPI::RequestProfileNotificationsL() |
|
345 { |
|
346 RDebug::Print( _L( "ProEng Validation test RequestProfileNotificationsL begin" ) ); |
|
347 RDebug::Print( _L( "ProEng Validation test NewNotifyHandlerL" ) ); |
|
348 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
349 MProEngNotifyHandler* nh( NULL ); |
|
350 CProEngVTNotifyHandlerWrapper* wrapper = new ( ELeave )CProEngVTNotifyHandlerWrapper(); |
|
351 CleanupStack::PushL( wrapper ); |
|
352 TRAP_IGNORE( nh = ProEngFactory::NewNotifyHandlerL() ); |
|
353 if( nh ) |
|
354 { |
|
355 wrapper->SetObject( nh ); // takes ownership |
|
356 } |
|
357 CProEngVTObserver* observer = new ( ELeave ) CProEngVTObserver(*iSchedulerUtility); |
|
358 CleanupStack::PushL( observer ); |
|
359 |
|
360 MProEngProfile* generalProfile = engine->ProfileLC( EProfileGeneralId ); |
|
361 MProEngToneSettings& ts2( generalProfile->ToneSettings() ); |
|
362 TRAP_IGNORE( |
|
363 nh->RequestProfileNotificationsL( *observer, |
|
364 EProfileGeneralId ) ); |
|
365 ts2.SetVibratingAlert( !ts2.VibratingAlert() ); |
|
366 generalProfile->CommitChangeL(); |
|
367 iSchedulerUtility->Start(); |
|
368 CleanupStack::PopAndDestroy(); // generalProfile |
|
369 CleanupStack::PopAndDestroy( observer ); |
|
370 CleanupStack::PopAndDestroy( wrapper ); |
|
371 CleanupStack::PopAndDestroy(); // engine |
|
372 return KErrNone; |
|
373 } |
|
374 |
|
375 // ----------------------------------------------------------------------------- |
|
376 // CProEngWrapAPI::CancelProfileNotificationsL |
|
377 // Test: MProEngNotifyHandler::CancelProfileNotifications() |
|
378 // (other items were commented in a header). |
|
379 // ----------------------------------------------------------------------------- |
|
380 // |
|
381 TInt CProEngWrapAPI::CancelProfileNotificationsL() |
|
382 { |
|
383 RDebug::Print( _L( "ProEng Validation test CancelProfileNotifications begin" ) ); |
|
384 RDebug::Print( _L( "ProEng Validation test NewNotifyHandlerL" ) ); |
|
385 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
386 MProEngNotifyHandler* nh( NULL ); |
|
387 CProEngVTNotifyHandlerWrapper* wrapper = new ( ELeave )CProEngVTNotifyHandlerWrapper(); |
|
388 CleanupStack::PushL( wrapper ); |
|
389 TRAP_IGNORE( nh = ProEngFactory::NewNotifyHandlerL() ); |
|
390 if( nh ) |
|
391 { |
|
392 wrapper->SetObject( nh ); // takes ownership |
|
393 } |
|
394 CProEngVTObserver* observer = new ( ELeave ) CProEngVTObserver(*iSchedulerUtility); |
|
395 CleanupStack::PushL( observer ); |
|
396 MProEngProfile* generalProfile = engine->ProfileLC( EProfileGeneralId ); |
|
397 MProEngToneSettings& ts2( generalProfile->ToneSettings() ); |
|
398 TRAP_IGNORE( |
|
399 nh->RequestProfileNotificationsL( *observer, |
|
400 EProfileGeneralId ) ); |
|
401 ts2.SetVibratingAlert( !ts2.VibratingAlert() ); |
|
402 generalProfile->CommitChangeL(); |
|
403 iSchedulerUtility->Start(); |
|
404 //CSchedulerUtility::InstanceL()->Start(); // observer stops this |
|
405 nh->CancelProfileNotifications( EProfileMeetingId ); |
|
406 CleanupStack::PopAndDestroy(); // generalProfile |
|
407 CleanupStack::PopAndDestroy( observer ); |
|
408 CleanupStack::PopAndDestroy( wrapper ); |
|
409 CleanupStack::PopAndDestroy(); // engine |
|
410 return KErrNone; |
|
411 } |
|
412 |
|
413 // ----------------------------------------------------------------------------- |
|
414 // CProEngWrapAPI::RequestProfileNameArrayNotificationsL |
|
415 // Test: MProEngNotifyHandler::RequestProfileNameArrayNotificationsL(MProEngActiveProfileObserver&) |
|
416 // (other items were commented in a header). |
|
417 // ----------------------------------------------------------------------------- |
|
418 // |
|
419 TInt CProEngWrapAPI::RequestProfileNameArrayNotificationsL() |
|
420 { |
|
421 RDebug::Print( _L( "ProEng Validation test RequestProfileNameArrayNotificationsL begin" ) ); |
|
422 RDebug::Print( _L( "ProEng Validation test NewNotifyHandlerL" ) ); |
|
423 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
424 MProEngNotifyHandler* nh( NULL ); |
|
425 CProEngVTNotifyHandlerWrapper* wrapper = new ( ELeave )CProEngVTNotifyHandlerWrapper(); |
|
426 CleanupStack::PushL( wrapper ); |
|
427 TRAP_IGNORE( nh = ProEngFactory::NewNotifyHandlerL() ); |
|
428 if( nh ) |
|
429 { |
|
430 wrapper->SetObject( nh ); // takes ownership |
|
431 } |
|
432 CProEngVTObserver* observer = new ( ELeave ) CProEngVTObserver(*iSchedulerUtility); |
|
433 CleanupStack::PushL( observer ); |
|
434 MProEngProfile* silentProfile = engine->ProfileLC( EProfileSilentId ); |
|
435 MProEngProfileName& silentName( silentProfile->ProfileName() ); |
|
436 TRAP_IGNORE( |
|
437 nh->RequestProfileNameArrayNotificationsL ( *observer ) ); |
|
438 // All this hassle here is just for modifying the name in every run of this |
|
439 // test so that we really get notification from Cenrep: |
|
440 HBufC* nameBuf = silentName.Name().AllocLC(); |
|
441 TPtr ptr( nameBuf->Des() ); |
|
442 TInt lastCharPos( nameBuf->Length() - 1 ); |
|
443 const TUint KWrapperVTAllOnes( 0xFFFF ); |
|
444 ptr[lastCharPos] = ptr[lastCharPos] ^ KWrapperVTAllOnes; |
|
445 silentName.SetNameL( *nameBuf ); |
|
446 CleanupStack::PopAndDestroy( nameBuf ); |
|
447 silentProfile->CommitChangeL(); |
|
448 iSchedulerUtility->Start(); |
|
449 CleanupStack::PopAndDestroy(); // silentProfile |
|
450 CleanupStack::PopAndDestroy( observer ); |
|
451 CleanupStack::PopAndDestroy( wrapper ); |
|
452 CleanupStack::PopAndDestroy(); // engine |
|
453 return KErrNone; |
|
454 } |
|
455 |
|
456 // ----------------------------------------------------------------------------- |
|
457 // CProEngWrapAPI::CancelProfileNameArrayNotificationsL |
|
458 // Test: MProEngNotifyHandler::CancelProfileNameArrayNotifications() |
|
459 // (other items were commented in a header). |
|
460 // ----------------------------------------------------------------------------- |
|
461 // |
|
462 TInt CProEngWrapAPI::CancelProfileNameArrayNotificationsL() |
|
463 { |
|
464 RDebug::Print( _L( "ProEng Validation test CancelProfileNameArrayNotificationsL begin" ) ); |
|
465 RDebug::Print( _L( "ProEng Validation test NewNotifyHandlerL" ) ); |
|
466 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
467 MProEngNotifyHandler* nh( NULL ); |
|
468 CProEngVTNotifyHandlerWrapper* wrapper = new ( ELeave )CProEngVTNotifyHandlerWrapper(); |
|
469 CleanupStack::PushL( wrapper ); |
|
470 TRAP_IGNORE( nh = ProEngFactory::NewNotifyHandlerL() ); |
|
471 if( nh ) |
|
472 { |
|
473 wrapper->SetObject( nh ); // takes ownership |
|
474 } |
|
475 CProEngVTObserver* observer = new ( ELeave ) CProEngVTObserver(*iSchedulerUtility); |
|
476 CleanupStack::PushL( observer ); |
|
477 MProEngProfile* silentProfile = engine->ProfileLC( EProfileSilentId ); |
|
478 MProEngProfileName& silentName( silentProfile->ProfileName() ); |
|
479 TRAP_IGNORE( |
|
480 nh->RequestProfileNameArrayNotificationsL ( *observer ) ); |
|
481 // All this hassle here is just for modifying the name in every run of this |
|
482 // test so that we really get notification from Cenrep: |
|
483 HBufC* nameBuf = silentName.Name().AllocLC(); |
|
484 TPtr ptr( nameBuf->Des() ); |
|
485 TInt lastCharPos( nameBuf->Length() - 1 ); |
|
486 const TUint KWrapperVTAllOnes( 0xFFFF ); |
|
487 ptr[lastCharPos] = ptr[lastCharPos] ^ KWrapperVTAllOnes; |
|
488 silentName.SetNameL( *nameBuf ); |
|
489 CleanupStack::PopAndDestroy( nameBuf ); |
|
490 silentProfile->CommitChangeL(); |
|
491 iSchedulerUtility->Start(); |
|
492 //CSchedulerUtility::InstanceL()->Start(); // observer stops this |
|
493 nh->CancelProfileNameArrayNotifications(); |
|
494 CleanupStack::PopAndDestroy(); // silentProfile |
|
495 CleanupStack::PopAndDestroy( observer ); |
|
496 CleanupStack::PopAndDestroy( wrapper ); |
|
497 CleanupStack::PopAndDestroy(); // engine |
|
498 return KErrNone; |
|
499 } |
|
500 |
|
501 // ----------------------------------------------------------------------------- |
|
502 // CProEngWrapAPI::CancelAllL |
|
503 // Test: MProEngEngine::CancelAll() |
|
504 // (other items were commented in a header). |
|
505 // ----------------------------------------------------------------------------- |
|
506 // |
|
507 TInt CProEngWrapAPI::CancelAllL() |
|
508 { |
|
509 RDebug::Print( _L( "ProEng Validation test CancelAllL begin" ) ); |
|
510 RDebug::Print( _L( "ProEng Validation test NewNotifyHandlerL" ) ); |
|
511 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
512 MProEngNotifyHandler* nh( NULL ); |
|
513 CProEngVTNotifyHandlerWrapper* wrapper = new ( ELeave )CProEngVTNotifyHandlerWrapper(); |
|
514 CleanupStack::PushL( wrapper ); |
|
515 TRAP_IGNORE( nh = ProEngFactory::NewNotifyHandlerL() ); |
|
516 if( nh ) |
|
517 { |
|
518 wrapper->SetObject( nh ); // takes ownership |
|
519 } |
|
520 nh->CancelAll(); |
|
521 CleanupStack::PopAndDestroy( wrapper ); |
|
522 CleanupStack::PopAndDestroy(); // engine |
|
523 return KErrNone; |
|
524 } |
|
525 // ----------------------------------------------------------------------------- |
|
526 // CProEngWrapAPI::ActiveProfileLC |
|
527 // Test: MProEngEngine::ActiveProfileLC() |
|
528 // (other items were commented in a header). |
|
529 // ----------------------------------------------------------------------------- |
|
530 // |
|
531 TInt CProEngWrapAPI::ActiveProfileLC() |
|
532 { |
|
533 RDebug::Print( _L( "ProEng Validation test ActiveProfileLC" ) ); |
|
534 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
535 MProEngProfile* prof = engine->ActiveProfileLC(); |
|
536 CleanupStack::PopAndDestroy(); // prof |
|
537 CleanupStack::PopAndDestroy(); // engine |
|
538 return KErrNone; |
|
539 } |
|
540 // ----------------------------------------------------------------------------- |
|
541 // CProEngWrapAPI::ActiveProfileL |
|
542 // Test: MProEngEngine::ActiveProfileL() |
|
543 // (other items were commented in a header). |
|
544 // ----------------------------------------------------------------------------- |
|
545 // |
|
546 TInt CProEngWrapAPI::ActiveProfileL() |
|
547 { |
|
548 RDebug::Print( _L( "ProEng Validation test ActiveProfileL" ) ); |
|
549 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
550 MProEngProfile* prof = engine->ActiveProfileL(); |
|
551 if(prof) |
|
552 { |
|
553 prof->Release(); |
|
554 prof = NULL; |
|
555 } |
|
556 CleanupStack::PopAndDestroy(); // engine |
|
557 return KErrNone; |
|
558 } |
|
559 |
|
560 // ----------------------------------------------------------------------------- |
|
561 // CProEngWrapAPI::ActiveProfileId |
|
562 // Test: MProEngEngine::ActiveProfileId() |
|
563 // (other items were commented in a header). |
|
564 // ----------------------------------------------------------------------------- |
|
565 // |
|
566 TInt CProEngWrapAPI::ActiveProfileIdL() |
|
567 { |
|
568 RDebug::Print( _L( "ProEng Validation test ActiveProfileId" ) ); |
|
569 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
570 //RDebug::Print( _L( "ProEng Validation test TestEngineL 3" ) ); |
|
571 TInt id( engine->ActiveProfileId() ); |
|
572 RDebug::Print( _L( "Active id:%d" ), id ); |
|
573 CleanupStack::PopAndDestroy(); // engine |
|
574 return KErrNone; |
|
575 } |
|
576 |
|
577 // ----------------------------------------------------------------------------- |
|
578 // CProEngWrapAPI::ProfileNameArrayLC |
|
579 // Test: MProEngEngine::ProfileNameArrayLC() |
|
580 // (other items were commented in a header). |
|
581 // ----------------------------------------------------------------------------- |
|
582 // |
|
583 TInt CProEngWrapAPI::ProfileNameArrayLC() |
|
584 { |
|
585 RDebug::Print( _L( "ProEng Validation test ProfileNameArrayLC" ) ); |
|
586 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
587 TRAP_IGNORE( |
|
588 MProEngProfileNameArray* names( engine->ProfileNameArrayLC() ); |
|
589 CleanupStack::PopAndDestroy(); // names |
|
590 ); |
|
591 CleanupStack::PopAndDestroy(); // engine |
|
592 return KErrNone; |
|
593 } |
|
594 |
|
595 // ----------------------------------------------------------------------------- |
|
596 // CProEngWrapAPI::SetActiveProfileL |
|
597 // Test: MProEngEngine::SetActiveProfileL() |
|
598 // (other items were commented in a header). |
|
599 // ----------------------------------------------------------------------------- |
|
600 // |
|
601 TInt CProEngWrapAPI::SetActiveProfileL() |
|
602 { |
|
603 RDebug::Print( _L( "ProEng Validation test SetActiveProfileL" ) ); |
|
604 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
605 TRAP_IGNORE( engine->SetActiveProfileL( EProfileSilentId ) ); |
|
606 CleanupStack::PopAndDestroy(); // engine |
|
607 return KErrNone; |
|
608 } |
|
609 |
|
610 // ----------------------------------------------------------------------------- |
|
611 // CProEngWrapAPI::ProfileLC |
|
612 // Test: MProEngEngine::ProfileLC() |
|
613 // (other items were commented in a header). |
|
614 // ----------------------------------------------------------------------------- |
|
615 // |
|
616 TInt CProEngWrapAPI::ProfileLC() |
|
617 { |
|
618 RDebug::Print( _L( "ProEng Validation test ProfileLC" ) ); |
|
619 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
620 MProEngProfile* prof = NULL; |
|
621 TRAP_IGNORE( |
|
622 prof = engine->ProfileLC( EProfileSilentId ); |
|
623 CleanupStack::PopAndDestroy(); // prof |
|
624 prof = NULL; |
|
625 ); |
|
626 |
|
627 CleanupStack::PopAndDestroy(); // engine |
|
628 return KErrNone; |
|
629 } |
|
630 |
|
631 // ----------------------------------------------------------------------------- |
|
632 // CProEngWrapAPI::ProfileL |
|
633 // Test: MProEngEngine::ProfileLC() |
|
634 // (other items were commented in a header). |
|
635 // ----------------------------------------------------------------------------- |
|
636 // |
|
637 TInt CProEngWrapAPI::ProfileL() |
|
638 { |
|
639 RDebug::Print( _L( "ProEng Validation test ProfileL" ) ); |
|
640 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
641 MProEngProfile* prof = NULL; |
|
642 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
643 if( prof ) |
|
644 { |
|
645 CleanupReleasePushL( *prof ); |
|
646 //TRAP_IGNORE( TestProfileSettingsL( *prof ) ); |
|
647 CleanupStack::PopAndDestroy( prof ); |
|
648 prof = NULL; |
|
649 } |
|
650 CleanupStack::PopAndDestroy(); // engine |
|
651 return KErrNone; |
|
652 } |
|
653 |
|
654 // ----------------------------------------------------------------------------- |
|
655 // CProEngWrapAPI::MdcaCountL |
|
656 // Test: MProEngProfileNameArray::MdcaCount() |
|
657 // (other items were commented in a header). |
|
658 // ----------------------------------------------------------------------------- |
|
659 // |
|
660 TInt CProEngWrapAPI::MdcaCountL() |
|
661 { |
|
662 RDebug::Print( _L( "ProEng Validation test MdcaCount" ) ); |
|
663 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
664 TRAP_IGNORE( |
|
665 MProEngProfileNameArray* names( engine->ProfileNameArrayLC() ); |
|
666 TestProfileNameArrayMdcaCountL( *names ); |
|
667 CleanupStack::PopAndDestroy(); // names |
|
668 ); |
|
669 CleanupStack::PopAndDestroy(); // engine |
|
670 return KErrNone; |
|
671 } |
|
672 void CProEngWrapAPI::TestProfileNameArrayMdcaCountL(MProEngProfileNameArray& aNameArray) |
|
673 { |
|
674 RDebug::Print( _L( "ProEng Validation test TestProfileNameArrayMdcaCountL begin" ) ); |
|
675 TInt count( aNameArray.MdcaCount() ); |
|
676 RDebug::Print( _L( "count = %d" ), count ); |
|
677 } |
|
678 |
|
679 // ----------------------------------------------------------------------------- |
|
680 // CProEngWrapAPI::MdcaPointL |
|
681 // Test: MProEngProfileNameArray::MdcaPoint(TInt) |
|
682 // (other items were commented in a header). |
|
683 // ----------------------------------------------------------------------------- |
|
684 // |
|
685 TInt CProEngWrapAPI::MdcaPointL() |
|
686 { |
|
687 RDebug::Print( _L( "ProEng Validation test MdcaPoint" ) ); |
|
688 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
689 TRAP_IGNORE( |
|
690 MProEngProfileNameArray* names( engine->ProfileNameArrayLC() ); |
|
691 TestProfileNameArrayMdcaPointL( *names ); |
|
692 CleanupStack::PopAndDestroy(); // names |
|
693 ); |
|
694 CleanupStack::PopAndDestroy(); // engine |
|
695 return KErrNone; |
|
696 } |
|
697 void CProEngWrapAPI::TestProfileNameArrayMdcaPointL(MProEngProfileNameArray& aNameArray) |
|
698 { |
|
699 RDebug::Print( _L( "ProEng Validation test TestProfileNameArrayMdcaPointL begin" ) ); |
|
700 TInt count( aNameArray.MdcaCount() ); |
|
701 RDebug::Print( _L( "count = %d" ), count ); |
|
702 for( TInt i( 0 ); i<count; ++i ) |
|
703 { |
|
704 TPtrC name( aNameArray.MdcaPoint( i ) ); |
|
705 RDebug::Print( _L( "ProEng Validation test nameArray[%d].MdcaPoint=%S" ), i, &name ); |
|
706 } |
|
707 } |
|
708 |
|
709 // ----------------------------------------------------------------------------- |
|
710 // CProEngWrapAPI::ProfileIdL |
|
711 // Test: MProEngProfileNameArray::ProfileId(TInt) |
|
712 // (other items were commented in a header). |
|
713 // ----------------------------------------------------------------------------- |
|
714 // |
|
715 TInt CProEngWrapAPI::ProfileIdL() |
|
716 { |
|
717 RDebug::Print( _L( "ProEng Validation test ProfileId" ) ); |
|
718 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
719 TRAP_IGNORE( |
|
720 MProEngProfileNameArray* names( engine->ProfileNameArrayLC() ); |
|
721 TestProfileNameArrayProfileIdL( *names ); |
|
722 CleanupStack::PopAndDestroy(); // names |
|
723 ); |
|
724 CleanupStack::PopAndDestroy(); // engine |
|
725 return KErrNone; |
|
726 } |
|
727 void CProEngWrapAPI::TestProfileNameArrayProfileIdL(MProEngProfileNameArray& aNameArray) |
|
728 { |
|
729 RDebug::Print( _L( "ProEng Validation test TestProfileNameArrayProfileIdL begin" ) ); |
|
730 TInt count( aNameArray.MdcaCount() ); |
|
731 RDebug::Print( _L( "count = %d" ), count ); |
|
732 for( TInt i( 0 ); i<count; ++i ) |
|
733 { |
|
734 TPtrC name( aNameArray.MdcaPoint( i ) ); |
|
735 TInt id( aNameArray.ProfileId( i ) ); |
|
736 RDebug::Print( _L( "ProEng Validation test nameArray[%d].MdcaPoint=%S" ), i, &name ); |
|
737 RDebug::Print( _L( "ProEng Validation test nameArray[%d].ProfileId=%d" ), i, id ); |
|
738 |
|
739 } |
|
740 } |
|
741 |
|
742 // ----------------------------------------------------------------------------- |
|
743 // CProEngWrapAPI::FindByIdL |
|
744 // Test: MProEngProfileNameArray::FindById(TInt) |
|
745 // (other items were commented in a header). |
|
746 // ----------------------------------------------------------------------------- |
|
747 // |
|
748 TInt CProEngWrapAPI::FindByIdL() |
|
749 { |
|
750 RDebug::Print( _L( "ProEng Validation test FindByIdL" ) ); |
|
751 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
752 TRAP_IGNORE( |
|
753 MProEngProfileNameArray* names( engine->ProfileNameArrayLC() ); |
|
754 TestProfileNameArrayFindByIdL( *names ); |
|
755 CleanupStack::PopAndDestroy(); // names |
|
756 ); |
|
757 CleanupStack::PopAndDestroy(); // engine |
|
758 return KErrNone; |
|
759 } |
|
760 |
|
761 |
|
762 void CProEngWrapAPI::TestProfileNameArrayFindByIdL(MProEngProfileNameArray& aNameArray) |
|
763 { |
|
764 RDebug::Print( _L( "ProEng Validation test TestProfileNameArrayFindByIdL begin" ) ); |
|
765 TInt count( aNameArray.MdcaCount() ); |
|
766 RDebug::Print( _L( "count = %d" ), count ); |
|
767 for( TInt i( 0 ); i<count; ++i ) |
|
768 { |
|
769 TPtrC name( aNameArray.MdcaPoint( i ) ); |
|
770 TInt id( aNameArray.ProfileId( i ) ); |
|
771 RDebug::Print( _L( "ProEng Validation test nameArray[%d].MdcaPoint=%S" ), i, &name ); |
|
772 RDebug::Print( _L( "ProEng Validation test nameArray[%d].ProfileId=%d" ), i, id ); |
|
773 |
|
774 } |
|
775 TInt idx( aNameArray.FindById( EProfileMeetingId ) ); |
|
776 RDebug::Print( _L( "ProEng Validation test Index of Meeting profile = %d" ), idx ); |
|
777 } |
|
778 |
|
779 // ----------------------------------------------------------------------------- |
|
780 // CProEngWrapAPI::FindByNameL |
|
781 // Test: MProEngProfileNameArray::FindByName(const TDesC&) |
|
782 // (other items were commented in a header). |
|
783 // ----------------------------------------------------------------------------- |
|
784 // |
|
785 TInt CProEngWrapAPI::FindByNameL() |
|
786 { |
|
787 RDebug::Print( _L( "ProEng Validation test FindByNameL" ) ); |
|
788 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
789 TRAP_IGNORE( |
|
790 MProEngProfileNameArray* names( engine->ProfileNameArrayLC() ); |
|
791 TestProfileNameArrayFindByNameL( *names ); |
|
792 CleanupStack::PopAndDestroy(); // names |
|
793 ); |
|
794 CleanupStack::PopAndDestroy(); // engine |
|
795 return KErrNone; |
|
796 } |
|
797 |
|
798 void CProEngWrapAPI::TestProfileNameArrayFindByNameL(MProEngProfileNameArray& aNameArray) |
|
799 { |
|
800 RDebug::Print( _L( "ProEng Validation test TestProfileNameArrayFindByNameL begin" ) ); |
|
801 TInt count( aNameArray.MdcaCount() ); |
|
802 RDebug::Print( _L( "count = %d" ), count ); |
|
803 for( TInt i( 0 ); i<count; ++i ) |
|
804 { |
|
805 TPtrC name( aNameArray.MdcaPoint( i ) ); |
|
806 TInt id( aNameArray.ProfileId( i ) ); |
|
807 RDebug::Print( _L( "ProEng Validation test nameArray[%d].MdcaPoint=%S" ), i, &name ); |
|
808 RDebug::Print( _L( "ProEng Validation test nameArray[%d].ProfileId=%d" ), i, id ); |
|
809 |
|
810 } |
|
811 TInt idx; |
|
812 _LIT( KProEngVTSilent, "Silent" ); |
|
813 idx = aNameArray.FindByName( KProEngVTSilent ); |
|
814 RDebug::Print( _L( "ProEng Validation test Index of Silent profile = %d" ), idx ); |
|
815 } |
|
816 |
|
817 // ----------------------------------------------------------------------------- |
|
818 // CProEngWrapAPI::ProfileNameL |
|
819 // Test: MProEngProfile::ProfileName() |
|
820 // (other items were commented in a header). |
|
821 // ----------------------------------------------------------------------------- |
|
822 // |
|
823 TInt CProEngWrapAPI::ProfileNameL() |
|
824 { |
|
825 RDebug::Print( _L( "ProEng Validation test ProfileNameL" ) ); |
|
826 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
827 MProEngProfile* prof = NULL; |
|
828 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
829 if( prof ) |
|
830 { |
|
831 CleanupReleasePushL( *prof ); |
|
832 TRAP_IGNORE( TestProfileSettingsProfileNameL( *prof ) ); |
|
833 CleanupStack::PopAndDestroy( prof ); |
|
834 prof = NULL; |
|
835 } |
|
836 CleanupStack::PopAndDestroy(); // engine |
|
837 return KErrNone; |
|
838 } |
|
839 |
|
840 void CProEngWrapAPI::TestProfileSettingsProfileNameL(MProEngProfile& aProfile) |
|
841 { |
|
842 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsProfileNameL begin" ) ); |
|
843 MProEngProfileName& name( aProfile.ProfileName() ); |
|
844 } |
|
845 |
|
846 // ----------------------------------------------------------------------------- |
|
847 // CProEngWrapAPI::ProfileTonesL |
|
848 // Test: MProEngProfile::ProfileTones() |
|
849 // (other items were commented in a header). |
|
850 // ----------------------------------------------------------------------------- |
|
851 // |
|
852 TInt CProEngWrapAPI::ProfileTonesL() |
|
853 { |
|
854 RDebug::Print( _L( "ProEng Validation test ProfileTonesL" ) ); |
|
855 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
856 MProEngProfile* prof = NULL; |
|
857 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
858 if( prof ) |
|
859 { |
|
860 CleanupReleasePushL( *prof ); |
|
861 TRAP_IGNORE( TestProfileSettingsProfileTonesL( *prof ) ); |
|
862 CleanupStack::PopAndDestroy( prof ); |
|
863 prof = NULL; |
|
864 } |
|
865 CleanupStack::PopAndDestroy(); // engine |
|
866 return KErrNone; |
|
867 } |
|
868 |
|
869 void CProEngWrapAPI::TestProfileSettingsProfileTonesL(MProEngProfile& aProfile) |
|
870 { |
|
871 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsProfileTonesL begin" ) ); |
|
872 MProEngTones& tones( aProfile.ProfileTones() ); |
|
873 } |
|
874 |
|
875 // ----------------------------------------------------------------------------- |
|
876 // CProEngWrapAPI::ToneSettingsL |
|
877 // Test: MProEngProfile::ToneSettings() |
|
878 // (other items were commented in a header). |
|
879 // ----------------------------------------------------------------------------- |
|
880 // |
|
881 TInt CProEngWrapAPI::ToneSettingsL() |
|
882 { |
|
883 |
|
884 RDebug::Print( _L( "ProEng Validation test ToneSettingsL" ) ); |
|
885 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
886 MProEngProfile* prof = NULL; |
|
887 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
888 if( prof ) |
|
889 { |
|
890 CleanupReleasePushL( *prof ); |
|
891 TRAP_IGNORE( TestProfileSettingsToneSettingsL( *prof ) ); |
|
892 CleanupStack::PopAndDestroy( prof ); |
|
893 prof = NULL; |
|
894 } |
|
895 CleanupStack::PopAndDestroy(); // engine |
|
896 |
|
897 return KErrNone; |
|
898 } |
|
899 |
|
900 void CProEngWrapAPI::TestProfileSettingsToneSettingsL(MProEngProfile& aProfile) |
|
901 { |
|
902 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsRingingTypeL begin" ) ); |
|
903 MProEngToneSettings& toneSettings( aProfile.ToneSettings() ); |
|
904 } |
|
905 |
|
906 // ----------------------------------------------------------------------------- |
|
907 // CProEngWrapAPI::AlertForL |
|
908 // Test: MProEngProfile::AlertForL() |
|
909 // (other items were commented in a header). |
|
910 // ----------------------------------------------------------------------------- |
|
911 // |
|
912 TInt CProEngWrapAPI::AlertForL() |
|
913 { |
|
914 RDebug::Print( _L( "ProEng Validation test AlertForL" ) ); |
|
915 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
916 MProEngProfile* prof = NULL; |
|
917 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
918 if( prof ) |
|
919 { |
|
920 CleanupReleasePushL( *prof ); |
|
921 TRAP_IGNORE( TestProfileSettingsAlertForL( *prof ) ); |
|
922 CleanupStack::PopAndDestroy( prof ); |
|
923 prof = NULL; |
|
924 } |
|
925 CleanupStack::PopAndDestroy(); // engine |
|
926 return KErrNone; |
|
927 } |
|
928 |
|
929 void CProEngWrapAPI::TestProfileSettingsAlertForL(MProEngProfile& aProfile) |
|
930 { |
|
931 // Alert for getter/setter: |
|
932 TRAP_IGNORE(const TArray<TContactItemId> alertFor = aProfile.AlertForL();); |
|
933 } |
|
934 |
|
935 // ----------------------------------------------------------------------------- |
|
936 // CProEngWrapAPI::SetAlertForL |
|
937 // Test: MProEngProfile::SetAlertForL() |
|
938 // (other items were commented in a header). |
|
939 // ----------------------------------------------------------------------------- |
|
940 // |
|
941 TInt CProEngWrapAPI::SetAlertForL() |
|
942 { |
|
943 RDebug::Print( _L( "ProEng Validation test setAlertForL" ) ); |
|
944 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
945 MProEngProfile* prof = NULL; |
|
946 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
947 if( prof ) |
|
948 { |
|
949 CleanupReleasePushL( *prof ); |
|
950 TRAP_IGNORE( TestProfileSettingsSetAlertForL( *prof ) ); |
|
951 CleanupStack::PopAndDestroy( prof ); |
|
952 prof = NULL; |
|
953 } |
|
954 CleanupStack::PopAndDestroy(); // engine |
|
955 return KErrNone; |
|
956 } |
|
957 |
|
958 void CProEngWrapAPI::TestProfileSettingsSetAlertForL(MProEngProfile& aProfile) |
|
959 { |
|
960 // Alert for getter/setter: |
|
961 TRAP_IGNORE( |
|
962 const TArray<TContactItemId> alertFor = aProfile.AlertForL(); |
|
963 aProfile.SetAlertForL( alertFor ); |
|
964 ); |
|
965 } |
|
966 |
|
967 // ----------------------------------------------------------------------------- |
|
968 // CProEngWrapAPI::IsSilentL |
|
969 // Test: MProEngProfile::IsSilentL() |
|
970 // (other items were commented in a header). |
|
971 // ----------------------------------------------------------------------------- |
|
972 // |
|
973 TInt CProEngWrapAPI::IsSilentL() |
|
974 { |
|
975 RDebug::Print( _L( "ProEng Validation test IsSilentL" ) ); |
|
976 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
977 MProEngProfile* prof = NULL; |
|
978 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
979 if( prof ) |
|
980 { |
|
981 CleanupReleasePushL( *prof ); |
|
982 TRAP_IGNORE( TestProfileSettingsIsSilentL( *prof ) ); |
|
983 CleanupStack::PopAndDestroy( prof ); |
|
984 prof = NULL; |
|
985 } |
|
986 CleanupStack::PopAndDestroy(); // engine |
|
987 return KErrNone; |
|
988 } |
|
989 |
|
990 void CProEngWrapAPI::TestProfileSettingsIsSilentL(MProEngProfile& aProfile) |
|
991 { |
|
992 TBool silent( aProfile.IsSilent() ); |
|
993 RDebug::Print( _L( "ProEng Validation test profile silent=%d" ), silent ); |
|
994 } |
|
995 |
|
996 // ----------------------------------------------------------------------------- |
|
997 // CProEngWrapAPI::CommitChangeL |
|
998 // Test: MProEngProfile::CommitChangeL() |
|
999 // (other items were commented in a header). |
|
1000 // ----------------------------------------------------------------------------- |
|
1001 // |
|
1002 TInt CProEngWrapAPI::CommitChangeL() |
|
1003 { |
|
1004 RDebug::Print( _L( "ProEng Validation test CommitChangeL" ) ); |
|
1005 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1006 MProEngProfile* prof = NULL; |
|
1007 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1008 if( prof ) |
|
1009 { |
|
1010 CleanupReleasePushL( *prof ); |
|
1011 TRAP_IGNORE( TestProfileSettingsCommitChangeL( *prof ) ); |
|
1012 CleanupStack::PopAndDestroy( prof ); |
|
1013 prof = NULL; |
|
1014 } |
|
1015 CleanupStack::PopAndDestroy(); // engine |
|
1016 return KErrNone; |
|
1017 } |
|
1018 |
|
1019 void CProEngWrapAPI::TestProfileSettingsCommitChangeL(MProEngProfile& aProfile) |
|
1020 { |
|
1021 RDebug::Print( _L( "ProEng Validation test before CommitChangeL" ) ); |
|
1022 TRAP_IGNORE( aProfile.CommitChangeL() ); |
|
1023 } |
|
1024 |
|
1025 // ----------------------------------------------------------------------------- |
|
1026 // CProEngWrapAPI::NameL |
|
1027 // Test: MProEngProfileName::Name() |
|
1028 // (other items were commented in a header). |
|
1029 // ----------------------------------------------------------------------------- |
|
1030 // |
|
1031 TInt CProEngWrapAPI::NameL() |
|
1032 { |
|
1033 RDebug::Print( _L( "ProEng Validation test NameL" ) ); |
|
1034 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1035 MProEngProfile* prof = NULL; |
|
1036 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1037 if( prof ) |
|
1038 { |
|
1039 CleanupReleasePushL( *prof ); |
|
1040 TRAP_IGNORE( TestProfileSettingsNameL( *prof ) ); |
|
1041 CleanupStack::PopAndDestroy( prof ); |
|
1042 prof = NULL; |
|
1043 } |
|
1044 CleanupStack::PopAndDestroy(); // engine |
|
1045 return KErrNone; |
|
1046 } |
|
1047 |
|
1048 void CProEngWrapAPI::TestProfileSettingsNameL(MProEngProfile& aProfile) |
|
1049 { |
|
1050 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsNameL begin" ) ); |
|
1051 MProEngProfileName& name( aProfile.ProfileName() ); |
|
1052 const TDesC& daName( name.Name() ); |
|
1053 RDebug::Print( _L( "ProEng Validation test profile name=%S" ), &daName ); |
|
1054 } |
|
1055 |
|
1056 // ----------------------------------------------------------------------------- |
|
1057 // CProEngWrapAPI::IdL |
|
1058 // Test: MProEngProfileName::Id() |
|
1059 // (other items were commented in a header). |
|
1060 // ----------------------------------------------------------------------------- |
|
1061 // |
|
1062 TInt CProEngWrapAPI::IdL() |
|
1063 { |
|
1064 RDebug::Print( _L( "ProEng Validation test IdL" ) ); |
|
1065 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1066 MProEngProfile* prof = NULL; |
|
1067 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1068 if( prof ) |
|
1069 { |
|
1070 CleanupReleasePushL( *prof ); |
|
1071 TRAP_IGNORE( TestProfileSettingsIdL( *prof ) ); |
|
1072 CleanupStack::PopAndDestroy( prof ); |
|
1073 prof = NULL; |
|
1074 } |
|
1075 CleanupStack::PopAndDestroy(); // engine |
|
1076 return KErrNone; |
|
1077 } |
|
1078 |
|
1079 void CProEngWrapAPI::TestProfileSettingsIdL(MProEngProfile& aProfile) |
|
1080 { |
|
1081 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsIdL begin" ) ); |
|
1082 MProEngProfileName& name( aProfile.ProfileName() ); |
|
1083 TInt id( name.Id() ); |
|
1084 RDebug::Print( _L( "ProEng Validation test profile id=%d" ), id ); |
|
1085 } |
|
1086 |
|
1087 // ----------------------------------------------------------------------------- |
|
1088 // CProEngWrapAPI::SetNameL |
|
1089 // Test: MProEngProfileName::SetNameL(const TDesC&) |
|
1090 // (other items were commented in a header). |
|
1091 // ----------------------------------------------------------------------------- |
|
1092 // |
|
1093 TInt CProEngWrapAPI::SetNameL() |
|
1094 { |
|
1095 RDebug::Print( _L( "ProEng Validation test SetNameL" ) ); |
|
1096 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1097 MProEngProfile* prof = NULL; |
|
1098 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1099 if( prof ) |
|
1100 { |
|
1101 CleanupReleasePushL( *prof ); |
|
1102 TRAP_IGNORE( TestProfileSettingsSetNameL( *prof ) ); |
|
1103 CleanupStack::PopAndDestroy( prof ); |
|
1104 prof = NULL; |
|
1105 } |
|
1106 CleanupStack::PopAndDestroy(); // engine |
|
1107 return KErrNone; |
|
1108 } |
|
1109 |
|
1110 void CProEngWrapAPI::TestProfileSettingsSetNameL(MProEngProfile& aProfile) |
|
1111 { |
|
1112 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsSetNameL begin" ) ); |
|
1113 MProEngProfileName& name( aProfile.ProfileName() ); |
|
1114 const TDesC& daName( name.Name() ); |
|
1115 HBufC* nameToBeSet = daName.AllocLC(); |
|
1116 RDebug::Print( _L( "ProEng Validation test before SetNameL" ) ); |
|
1117 TRAP_IGNORE( name.SetNameL( *nameToBeSet ) ); |
|
1118 CleanupStack::PopAndDestroy(nameToBeSet); |
|
1119 } |
|
1120 |
|
1121 // ----------------------------------------------------------------------------- |
|
1122 // CProEngWrapAPI::RingingTone1L |
|
1123 // Test: MProEngTones::RingingTone1() |
|
1124 // (other items were commented in a header). |
|
1125 // ----------------------------------------------------------------------------- |
|
1126 // |
|
1127 TInt CProEngWrapAPI::RingingTone1L() |
|
1128 { |
|
1129 RDebug::Print( _L( "ProEng Validation test RingingTone1L" ) ); |
|
1130 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1131 MProEngProfile* prof = NULL; |
|
1132 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1133 if( prof ) |
|
1134 { |
|
1135 CleanupReleasePushL( *prof ); |
|
1136 TRAP_IGNORE( TestProfileSettingsRingingTone1L( *prof ) ); |
|
1137 CleanupStack::PopAndDestroy( prof ); |
|
1138 prof = NULL; |
|
1139 } |
|
1140 CleanupStack::PopAndDestroy(); // engine |
|
1141 return KErrNone; |
|
1142 } |
|
1143 |
|
1144 void CProEngWrapAPI::TestProfileSettingsRingingTone1L(MProEngProfile& aProfile) |
|
1145 { |
|
1146 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsRingingTone1L begin" ) ); |
|
1147 MProEngTones& tones( aProfile.ProfileTones() ); |
|
1148 const TDesC& rtone( tones.RingingTone1() ); |
|
1149 RDebug::Print( _L( "ProEng Validation test rtone=%S" ), &rtone ); |
|
1150 } |
|
1151 |
|
1152 // ----------------------------------------------------------------------------- |
|
1153 // CProEngWrapAPI::RingingTone2L |
|
1154 // Test: MProEngTones::RingingTone1() |
|
1155 // (other items were commented in a header). |
|
1156 // ----------------------------------------------------------------------------- |
|
1157 // |
|
1158 TInt CProEngWrapAPI::RingingTone2L() |
|
1159 { |
|
1160 RDebug::Print( _L( "ProEng Validation test RingingTone2L" ) ); |
|
1161 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1162 MProEngProfile* prof = NULL; |
|
1163 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1164 if( prof ) |
|
1165 { |
|
1166 CleanupReleasePushL( *prof ); |
|
1167 TRAP_IGNORE( TestProfileSettingsRingingTone2L( *prof ) ); |
|
1168 CleanupStack::PopAndDestroy( prof ); |
|
1169 prof = NULL; |
|
1170 } |
|
1171 CleanupStack::PopAndDestroy(); // engine |
|
1172 return KErrNone; |
|
1173 } |
|
1174 |
|
1175 void CProEngWrapAPI::TestProfileSettingsRingingTone2L(MProEngProfile& aProfile) |
|
1176 { |
|
1177 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsRingingTone2L begin" ) ); |
|
1178 MProEngTones& tones( aProfile.ProfileTones() ); |
|
1179 const TDesC& rtone2( tones.RingingTone2() ); |
|
1180 RDebug::Print( _L( "ProEng Validation test rtone2 =%S" ), &rtone2 ); |
|
1181 } |
|
1182 |
|
1183 // ----------------------------------------------------------------------------- |
|
1184 // CProEngWrapAPI::MessageAlertToneL |
|
1185 // Test: MProEngTones::MessageAlertTone() |
|
1186 // (other items were commented in a header). |
|
1187 // ----------------------------------------------------------------------------- |
|
1188 // |
|
1189 TInt CProEngWrapAPI::MessageAlertToneL() |
|
1190 { |
|
1191 RDebug::Print( _L( "ProEng Validation test MessageAlertToneL" ) ); |
|
1192 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1193 MProEngProfile* prof = NULL; |
|
1194 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1195 if( prof ) |
|
1196 { |
|
1197 CleanupReleasePushL( *prof ); |
|
1198 TRAP_IGNORE( TestProfileSettingsMessageAlertToneL( *prof ) ); |
|
1199 CleanupStack::PopAndDestroy( prof ); |
|
1200 prof = NULL; |
|
1201 } |
|
1202 CleanupStack::PopAndDestroy(); // engine |
|
1203 return KErrNone; |
|
1204 } |
|
1205 |
|
1206 void CProEngWrapAPI::TestProfileSettingsMessageAlertToneL(MProEngProfile& aProfile) |
|
1207 { |
|
1208 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsMessageAlertToneL begin" ) ); |
|
1209 MProEngTones& tones( aProfile.ProfileTones() ); |
|
1210 const TDesC& mtone( tones.MessageAlertTone() ); |
|
1211 RDebug::Print( _L( "ProEng Validation test mtone =%S" ), &mtone ); |
|
1212 } |
|
1213 |
|
1214 // ----------------------------------------------------------------------------- |
|
1215 // CProEngWrapAPI::EmailAlertToneL |
|
1216 // Test: MProEngTones::EmailAlertTone() |
|
1217 // (other items were commented in a header). |
|
1218 // ----------------------------------------------------------------------------- |
|
1219 // |
|
1220 TInt CProEngWrapAPI::EmailAlertToneL() |
|
1221 { |
|
1222 RDebug::Print( _L( "ProEng Validation test EmailAlertToneL" ) ); |
|
1223 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1224 MProEngProfile* prof = NULL; |
|
1225 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1226 if( prof ) |
|
1227 { |
|
1228 CleanupReleasePushL( *prof ); |
|
1229 TRAP_IGNORE( TestProfileSettingsEmailAlertToneL( *prof ) ); |
|
1230 CleanupStack::PopAndDestroy( prof ); |
|
1231 prof = NULL; |
|
1232 } |
|
1233 CleanupStack::PopAndDestroy(); // engine |
|
1234 return KErrNone; |
|
1235 } |
|
1236 |
|
1237 void CProEngWrapAPI::TestProfileSettingsEmailAlertToneL(MProEngProfile& aProfile) |
|
1238 { |
|
1239 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsEmailAlertToneL begin" ) ); |
|
1240 MProEngTones& tones( aProfile.ProfileTones() ); |
|
1241 const TDesC& etone( tones.EmailAlertTone() ); |
|
1242 RDebug::Print( _L( "ProEng Validation test etone =%S" ), &etone ); |
|
1243 } |
|
1244 |
|
1245 // ----------------------------------------------------------------------------- |
|
1246 // CProEngWrapAPI::VideoCallRingingToneL |
|
1247 // Test: MProEngTones::VideoCallRingingToneL() |
|
1248 // (other items were commented in a header). |
|
1249 // ----------------------------------------------------------------------------- |
|
1250 // |
|
1251 TInt CProEngWrapAPI::VideoCallRingingToneL() |
|
1252 { |
|
1253 RDebug::Print( _L( "ProEng Validation test VideoCallRingingToneL" ) ); |
|
1254 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1255 MProEngProfile* prof = NULL; |
|
1256 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1257 if( prof ) |
|
1258 { |
|
1259 CleanupReleasePushL( *prof ); |
|
1260 TRAP_IGNORE( TestProfileSettingsVideoCallRingingToneL( *prof ) ); |
|
1261 CleanupStack::PopAndDestroy( prof ); |
|
1262 prof = NULL; |
|
1263 } |
|
1264 CleanupStack::PopAndDestroy(); // engine |
|
1265 return KErrNone; |
|
1266 } |
|
1267 |
|
1268 void CProEngWrapAPI::TestProfileSettingsVideoCallRingingToneL(MProEngProfile& aProfile) |
|
1269 { |
|
1270 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsVideoCallRingingToneL begin" ) ); |
|
1271 MProEngTones& tones( aProfile.ProfileTones() ); |
|
1272 const TDesC& vcallTone( tones.VideoCallRingingTone() ); |
|
1273 RDebug::Print( _L( "ProEng Validation test vcallTone =%S" ), &vcallTone ); |
|
1274 } |
|
1275 |
|
1276 // ----------------------------------------------------------------------------- |
|
1277 // CProEngWrapAPI::SetRingingTone1L |
|
1278 // Test: MProEngTones::SetRingingTone1L(const TDesC&) |
|
1279 // (other items were commented in a header). |
|
1280 // ----------------------------------------------------------------------------- |
|
1281 // |
|
1282 TInt CProEngWrapAPI::SetRingingTone1L() |
|
1283 { |
|
1284 RDebug::Print( _L( "ProEng Validation test SetRingingTone1L" ) ); |
|
1285 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1286 MProEngProfile* prof = NULL; |
|
1287 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1288 if( prof ) |
|
1289 { |
|
1290 CleanupReleasePushL( *prof ); |
|
1291 TRAP_IGNORE( TestProfileSettingsSetRingingTone1L( *prof ) ); |
|
1292 CleanupStack::PopAndDestroy( prof ); |
|
1293 prof = NULL; |
|
1294 } |
|
1295 CleanupStack::PopAndDestroy(); // engine |
|
1296 return KErrNone; |
|
1297 } |
|
1298 |
|
1299 void CProEngWrapAPI::TestProfileSettingsSetRingingTone1L(MProEngProfile& aProfile) |
|
1300 { |
|
1301 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsSetRingingTone1L begin" ) ); |
|
1302 MProEngTones& tones( aProfile.ProfileTones() ); |
|
1303 const TDesC& rtone( tones.RingingTone1() ); |
|
1304 HBufC* toneToBeSet = rtone.AllocLC(); |
|
1305 RDebug::Print( _L( "ProEng Validation test before SetRingingTone1L rtone=%S" ), toneToBeSet ); |
|
1306 TRAP_IGNORE( tones.SetRingingTone1L( *toneToBeSet ) ); |
|
1307 CleanupStack::PopAndDestroy( toneToBeSet ); |
|
1308 } |
|
1309 |
|
1310 // ----------------------------------------------------------------------------- |
|
1311 // CProEngWrapAPI::SetRingingTone2L |
|
1312 // Test: MProEngTones::SetRingingTone2L(const TDesC&) |
|
1313 // (other items were commented in a header). |
|
1314 // ----------------------------------------------------------------------------- |
|
1315 // |
|
1316 TInt CProEngWrapAPI::SetRingingTone2L() |
|
1317 { |
|
1318 RDebug::Print( _L( "ProEng Validation test SetRingingTone2L" ) ); |
|
1319 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1320 MProEngProfile* prof = NULL; |
|
1321 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1322 if( prof ) |
|
1323 { |
|
1324 CleanupReleasePushL( *prof ); |
|
1325 TRAP_IGNORE( TestProfileSettingsSetRingingTone2L( *prof ) ); |
|
1326 CleanupStack::PopAndDestroy( prof ); |
|
1327 prof = NULL; |
|
1328 } |
|
1329 CleanupStack::PopAndDestroy(); // engine |
|
1330 return KErrNone; |
|
1331 } |
|
1332 |
|
1333 void CProEngWrapAPI::TestProfileSettingsSetRingingTone2L(MProEngProfile& aProfile) |
|
1334 { |
|
1335 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsSetRingingTone2L begin" ) ); |
|
1336 MProEngTones& tones( aProfile.ProfileTones() ); |
|
1337 const TDesC& rtone2( tones.RingingTone2() ); |
|
1338 HBufC* toneToBeSet = rtone2.AllocLC(); |
|
1339 RDebug::Print( _L( "ProEng Validation test before SetRingingTone1L rtone2=%S" ), toneToBeSet ); |
|
1340 TRAP_IGNORE( tones.SetRingingTone2L( *toneToBeSet ) ); |
|
1341 CleanupStack::PopAndDestroy( toneToBeSet ); |
|
1342 } |
|
1343 |
|
1344 // ----------------------------------------------------------------------------- |
|
1345 // CProEngWrapAPI::SetMessageAlertToneL |
|
1346 // Test: MProEngTones::SetMessageAlertTone() |
|
1347 // (other items were commented in a header). |
|
1348 // ----------------------------------------------------------------------------- |
|
1349 // |
|
1350 TInt CProEngWrapAPI::SetMessageAlertToneL() |
|
1351 { |
|
1352 RDebug::Print( _L( "ProEng Validation test SetMessageAlertToneL" ) ); |
|
1353 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1354 MProEngProfile* prof = NULL; |
|
1355 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1356 if( prof ) |
|
1357 { |
|
1358 CleanupReleasePushL( *prof ); |
|
1359 TRAP_IGNORE( TestProfileSettingsSetMessageAlertToneL( *prof ) ); |
|
1360 CleanupStack::PopAndDestroy( prof ); |
|
1361 prof = NULL; |
|
1362 } |
|
1363 CleanupStack::PopAndDestroy(); // engine |
|
1364 return KErrNone; |
|
1365 } |
|
1366 |
|
1367 void CProEngWrapAPI::TestProfileSettingsSetMessageAlertToneL(MProEngProfile& aProfile) |
|
1368 { |
|
1369 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsSetMessageAlertToneL begin" ) ); |
|
1370 MProEngTones& tones( aProfile.ProfileTones() ); |
|
1371 const TDesC& mtone( tones.MessageAlertTone() ); |
|
1372 RDebug::Print( _L( "ProEng Validation test mtone =%S" ), &mtone ); |
|
1373 RDebug::Print( _L( "ProEng Validation test before SetMessageAlertToneL" ) ); |
|
1374 TRAP_IGNORE( tones.SetMessageAlertToneL( mtone ) ); |
|
1375 } |
|
1376 |
|
1377 // ----------------------------------------------------------------------------- |
|
1378 // CProEngWrapAPI::SetEmailAlertToneL |
|
1379 // Test: MProEngTones::SetEmailAlertTone() |
|
1380 // (other items were commented in a header). |
|
1381 // ----------------------------------------------------------------------------- |
|
1382 // |
|
1383 TInt CProEngWrapAPI::SetEmailAlertToneL() |
|
1384 { |
|
1385 RDebug::Print( _L( "ProEng Validation test SetEmailAlertToneL" ) ); |
|
1386 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1387 MProEngProfile* prof = NULL; |
|
1388 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1389 if( prof ) |
|
1390 { |
|
1391 CleanupReleasePushL( *prof ); |
|
1392 TRAP_IGNORE( TestProfileSettingsSetEmailAlertToneL( *prof ) ); |
|
1393 CleanupStack::PopAndDestroy( prof ); |
|
1394 prof = NULL; |
|
1395 } |
|
1396 CleanupStack::PopAndDestroy(); // engine |
|
1397 return KErrNone; |
|
1398 } |
|
1399 |
|
1400 void CProEngWrapAPI::TestProfileSettingsSetEmailAlertToneL(MProEngProfile& aProfile) |
|
1401 { |
|
1402 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsSetEmailAlertToneL begin" ) ); |
|
1403 MProEngTones& tones( aProfile.ProfileTones() ); |
|
1404 const TDesC& etone( tones.EmailAlertTone() ); |
|
1405 RDebug::Print( _L( "ProEng Validation test etone =%S" ), &etone ); |
|
1406 RDebug::Print( _L( "ProEng Validation test before SetEmailAlertToneL" ) ); |
|
1407 TRAP_IGNORE( tones.SetEmailAlertToneL( etone ) ); |
|
1408 } |
|
1409 |
|
1410 // ----------------------------------------------------------------------------- |
|
1411 // CProEngWrapAPI::SetVideoCallRingingToneL |
|
1412 // Test: MProEngTones::SetVideoCallRingingToneL() |
|
1413 // (other items were commented in a header). |
|
1414 // ----------------------------------------------------------------------------- |
|
1415 // |
|
1416 TInt CProEngWrapAPI::SetVideoCallRingingToneL() |
|
1417 { |
|
1418 |
|
1419 RDebug::Print( _L( "ProEng Validation test SetVideoCallRingingToneL" ) ); |
|
1420 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1421 MProEngProfile* prof = NULL; |
|
1422 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1423 if( prof ) |
|
1424 { |
|
1425 CleanupReleasePushL( *prof ); |
|
1426 TRAP_IGNORE( TestProfileSettingsSetVideoCallRingingToneL( *prof ) ); |
|
1427 CleanupStack::PopAndDestroy( prof ); |
|
1428 prof = NULL; |
|
1429 } |
|
1430 CleanupStack::PopAndDestroy(); // engine |
|
1431 |
|
1432 return KErrNone; |
|
1433 } |
|
1434 |
|
1435 void CProEngWrapAPI::TestProfileSettingsSetVideoCallRingingToneL(MProEngProfile& aProfile) |
|
1436 { |
|
1437 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsSetVideoCallRingingToneL begin" ) ); |
|
1438 MProEngTones& tones( aProfile.ProfileTones() ); |
|
1439 const TDesC& vcallTone( tones.VideoCallRingingTone() ); |
|
1440 RDebug::Print( _L( "ProEng Validation test vcallTone =%S" ), &vcallTone ); |
|
1441 RDebug::Print( _L( "ProEng Validation test before SetVideoCallAlertToneL" ) ); |
|
1442 TRAP_IGNORE( tones.SetVideoCallRingingToneL( vcallTone ) ); |
|
1443 |
|
1444 } |
|
1445 |
|
1446 // ----------------------------------------------------------------------------- |
|
1447 // CProEngWrapAPI::RingingTypeL |
|
1448 // Test: MProEngToneSettings::RingingType() |
|
1449 // (other items were commented in a header). |
|
1450 // ----------------------------------------------------------------------------- |
|
1451 // |
|
1452 TInt CProEngWrapAPI::RingingTypeL() |
|
1453 { |
|
1454 |
|
1455 RDebug::Print( _L( "ProEng Validation test RingingTypeL" ) ); |
|
1456 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1457 MProEngProfile* prof = NULL; |
|
1458 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1459 if( prof ) |
|
1460 { |
|
1461 CleanupReleasePushL( *prof ); |
|
1462 TRAP_IGNORE( TestProfileSettingsRingingTypeL( *prof ) ); |
|
1463 CleanupStack::PopAndDestroy( prof ); |
|
1464 prof = NULL; |
|
1465 } |
|
1466 CleanupStack::PopAndDestroy(); // engine |
|
1467 |
|
1468 return KErrNone; |
|
1469 } |
|
1470 |
|
1471 void CProEngWrapAPI::TestProfileSettingsRingingTypeL(MProEngProfile& aProfile) |
|
1472 { |
|
1473 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsRingingTypeL begin" ) ); |
|
1474 MProEngToneSettings& toneSettings( aProfile.ToneSettings() ); |
|
1475 TProfileRingingType rtype( toneSettings.RingingType() ); |
|
1476 RDebug::Print( _L( "ProEng Validation test ringing type=%d" ), toneSettings.RingingType() ); |
|
1477 } |
|
1478 |
|
1479 // ----------------------------------------------------------------------------- |
|
1480 // CProEngWrapAPI::KeypadVolumeL |
|
1481 // Test: MProEngToneSettings::KeypadVolumeL |
|
1482 // (other items were commented in a header). |
|
1483 // ----------------------------------------------------------------------------- |
|
1484 // |
|
1485 TInt CProEngWrapAPI::KeypadVolumeL() |
|
1486 { |
|
1487 |
|
1488 RDebug::Print( _L( "ProEng Validation test KeypadVolumeL" ) ); |
|
1489 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1490 MProEngProfile* prof = NULL; |
|
1491 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1492 if( prof ) |
|
1493 { |
|
1494 CleanupReleasePushL( *prof ); |
|
1495 TRAP_IGNORE( TestProfileSettingsKeypadVolumeL( *prof ) ); |
|
1496 CleanupStack::PopAndDestroy( prof ); |
|
1497 prof = NULL; |
|
1498 } |
|
1499 CleanupStack::PopAndDestroy(); // engine |
|
1500 |
|
1501 return KErrNone; |
|
1502 } |
|
1503 |
|
1504 void CProEngWrapAPI::TestProfileSettingsKeypadVolumeL(MProEngProfile& aProfile) |
|
1505 { |
|
1506 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsKeypadVolumeL begin" ) ); |
|
1507 MProEngToneSettings& toneSettings( aProfile.ToneSettings() ); |
|
1508 TProfileKeypadVolume keyvol( toneSettings.KeypadVolume() ); |
|
1509 RDebug::Print( _L( "ProEng Validation test ringing keypad=%d" ), toneSettings.KeypadVolume() ); |
|
1510 } |
|
1511 |
|
1512 // ----------------------------------------------------------------------------- |
|
1513 // CProEngWrapAPI::RingingVolumeL |
|
1514 // Test: MProEngToneSettings::RingingVolumeL() |
|
1515 // (other items were commented in a header). |
|
1516 // ----------------------------------------------------------------------------- |
|
1517 // |
|
1518 TInt CProEngWrapAPI::RingingVolumeL() |
|
1519 { |
|
1520 |
|
1521 RDebug::Print( _L( "ProEng Validation test RingingVolumeL" ) ); |
|
1522 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1523 MProEngProfile* prof = NULL; |
|
1524 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1525 if( prof ) |
|
1526 { |
|
1527 CleanupReleasePushL( *prof ); |
|
1528 TRAP_IGNORE( TestProfileSettingsRingingVolumeL( *prof ) ); |
|
1529 CleanupStack::PopAndDestroy( prof ); |
|
1530 prof = NULL; |
|
1531 } |
|
1532 CleanupStack::PopAndDestroy(); // engine |
|
1533 |
|
1534 return KErrNone; |
|
1535 } |
|
1536 |
|
1537 void CProEngWrapAPI::TestProfileSettingsRingingVolumeL(MProEngProfile& aProfile) |
|
1538 { |
|
1539 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsRingingVolumeL begin" ) ); |
|
1540 MProEngToneSettings& toneSettings( aProfile.ToneSettings() ); |
|
1541 TProfileRingingVolume ringvol( toneSettings.RingingVolume() ); |
|
1542 RDebug::Print( _L( "ProEng Validation test ringing volume=%d" ), toneSettings.RingingVolume() ); |
|
1543 } |
|
1544 |
|
1545 // ----------------------------------------------------------------------------- |
|
1546 // CProEngWrapAPI::VibratingAlertL |
|
1547 // Test: MProEngToneSettings::VibratingAlertL() |
|
1548 // (other items were commented in a header). |
|
1549 // ----------------------------------------------------------------------------- |
|
1550 // |
|
1551 TInt CProEngWrapAPI::VibratingAlertL() |
|
1552 { |
|
1553 |
|
1554 RDebug::Print( _L( "ProEng Validation test VibratingAlertL" ) ); |
|
1555 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1556 MProEngProfile* prof = NULL; |
|
1557 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1558 if( prof ) |
|
1559 { |
|
1560 CleanupReleasePushL( *prof ); |
|
1561 TRAP_IGNORE( TestProfileSettingsVibratingAlertL( *prof ) ); |
|
1562 CleanupStack::PopAndDestroy( prof ); |
|
1563 prof = NULL; |
|
1564 } |
|
1565 CleanupStack::PopAndDestroy(); // engine |
|
1566 |
|
1567 return KErrNone; |
|
1568 } |
|
1569 |
|
1570 void CProEngWrapAPI::TestProfileSettingsVibratingAlertL(MProEngProfile& aProfile) |
|
1571 { |
|
1572 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsVibratingAlertL begin" ) ); |
|
1573 MProEngToneSettings& toneSettings( aProfile.ToneSettings() ); |
|
1574 TBool vibra( toneSettings.VibratingAlert() ); |
|
1575 RDebug::Print( _L( "ProEng Validation test vibra=%d" ), vibra ); |
|
1576 } |
|
1577 |
|
1578 // ----------------------------------------------------------------------------- |
|
1579 // CProEngWrapAPI::WarningAndGameTonesL |
|
1580 // Test: MProEngToneSettings::WarningAndGameTonesL() |
|
1581 // (other items were commented in a header). |
|
1582 // ----------------------------------------------------------------------------- |
|
1583 // |
|
1584 TInt CProEngWrapAPI::WarningAndGameTonesL() |
|
1585 { |
|
1586 |
|
1587 RDebug::Print( _L( "ProEng Validation test WarningAndGameTonesL" ) ); |
|
1588 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1589 MProEngProfile* prof = NULL; |
|
1590 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1591 if( prof ) |
|
1592 { |
|
1593 CleanupReleasePushL( *prof ); |
|
1594 TRAP_IGNORE( TestProfileSettingsWarningAndGameTonesL( *prof ) ); |
|
1595 CleanupStack::PopAndDestroy( prof ); |
|
1596 prof = NULL; |
|
1597 } |
|
1598 CleanupStack::PopAndDestroy(); // engine |
|
1599 |
|
1600 return KErrNone; |
|
1601 } |
|
1602 |
|
1603 void CProEngWrapAPI::TestProfileSettingsWarningAndGameTonesL(MProEngProfile& aProfile) |
|
1604 { |
|
1605 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsWarningAndGameTonesL begin" ) ); |
|
1606 MProEngToneSettings& toneSettings( aProfile.ToneSettings() ); |
|
1607 TBool warntones( toneSettings.WarningAndGameTones() ); |
|
1608 RDebug::Print( _L( "ProEng Validation test warntones = %d" ), warntones ); |
|
1609 } |
|
1610 |
|
1611 // ----------------------------------------------------------------------------- |
|
1612 // CProEngWrapAPI::TextToSpeechL |
|
1613 // Test: MProEngToneSettings::TextToSpeechL() |
|
1614 // (other items were commented in a header). |
|
1615 // ----------------------------------------------------------------------------- |
|
1616 // |
|
1617 TInt CProEngWrapAPI::TextToSpeechL() |
|
1618 { |
|
1619 |
|
1620 RDebug::Print( _L( "ProEng Validation test TextToSpeechL" ) ); |
|
1621 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1622 MProEngProfile* prof = NULL; |
|
1623 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1624 if( prof ) |
|
1625 { |
|
1626 CleanupReleasePushL( *prof ); |
|
1627 TRAP_IGNORE( TestProfileSettingsTextToSpeechL( *prof ) ); |
|
1628 CleanupStack::PopAndDestroy( prof ); |
|
1629 prof = NULL; |
|
1630 } |
|
1631 CleanupStack::PopAndDestroy(); // engine |
|
1632 |
|
1633 return KErrNone; |
|
1634 } |
|
1635 |
|
1636 void CProEngWrapAPI::TestProfileSettingsTextToSpeechL(MProEngProfile& aProfile) |
|
1637 { |
|
1638 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsTextToSpeechL begin" ) ); |
|
1639 MProEngToneSettings& toneSettings( aProfile.ToneSettings() ); |
|
1640 TBool tts( toneSettings.TextToSpeech() ); |
|
1641 RDebug::Print( _L( "ProEng Validation test TextToSpeech =%d" ), tts); |
|
1642 } |
|
1643 |
|
1644 // ----------------------------------------------------------------------------- |
|
1645 // CProEngWrapAPI::SetRingingType |
|
1646 // Test: MProEngToneSettings::SetRingingType(TProfileRingingType) |
|
1647 // (other items were commented in a header). |
|
1648 // ----------------------------------------------------------------------------- |
|
1649 // |
|
1650 TInt CProEngWrapAPI::SetRingingTypeL() |
|
1651 { |
|
1652 |
|
1653 RDebug::Print( _L( "ProEng Validation test SetRingingTypeL" ) ); |
|
1654 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1655 MProEngProfile* prof = NULL; |
|
1656 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1657 if( prof ) |
|
1658 { |
|
1659 CleanupReleasePushL( *prof ); |
|
1660 TRAP_IGNORE( TestProfileSettingsSetRingingTypeL( *prof ) ); |
|
1661 CleanupStack::PopAndDestroy( prof ); |
|
1662 prof = NULL; |
|
1663 } |
|
1664 CleanupStack::PopAndDestroy(); // engine |
|
1665 |
|
1666 return KErrNone; |
|
1667 } |
|
1668 |
|
1669 void CProEngWrapAPI::TestProfileSettingsSetRingingTypeL(MProEngProfile& aProfile) |
|
1670 { |
|
1671 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsSetRingingTypeL begin" ) ); |
|
1672 MProEngToneSettings& toneSettings( aProfile.ToneSettings() ); |
|
1673 TProfileRingingType rtype( toneSettings.RingingType() ); |
|
1674 toneSettings.SetRingingType( rtype ); |
|
1675 } |
|
1676 |
|
1677 // ----------------------------------------------------------------------------- |
|
1678 // CProEngWrapAPI::SetKeypadVolumeL |
|
1679 // Test: MProEngToneSettings::SetKeypadVolumeL(TProfileKeypadVolume) |
|
1680 // (other items were commented in a header). |
|
1681 // ----------------------------------------------------------------------------- |
|
1682 // |
|
1683 TInt CProEngWrapAPI::SetKeypadVolumeL() |
|
1684 { |
|
1685 |
|
1686 RDebug::Print( _L( "ProEng Validation test SetKeypadVolumeL" ) ); |
|
1687 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1688 MProEngProfile* prof = NULL; |
|
1689 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1690 if( prof ) |
|
1691 { |
|
1692 CleanupReleasePushL( *prof ); |
|
1693 TRAP_IGNORE( TestProfileSettingsSetKeypadVolumeL( *prof ) ); |
|
1694 CleanupStack::PopAndDestroy( prof ); |
|
1695 prof = NULL; |
|
1696 } |
|
1697 CleanupStack::PopAndDestroy(); // engine |
|
1698 |
|
1699 return KErrNone; |
|
1700 } |
|
1701 |
|
1702 void CProEngWrapAPI::TestProfileSettingsSetKeypadVolumeL(MProEngProfile& aProfile) |
|
1703 { |
|
1704 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsSetKeypadVolumeL begin" ) ); |
|
1705 MProEngToneSettings& toneSettings( aProfile.ToneSettings() ); |
|
1706 TProfileKeypadVolume keyvol( toneSettings.KeypadVolume() ); |
|
1707 toneSettings.SetKeypadVolume( keyvol ); |
|
1708 } |
|
1709 |
|
1710 // ----------------------------------------------------------------------------- |
|
1711 // CProEngWrapAPI::SetRingingVolumeL |
|
1712 // Test: MProEngToneSettings::RingingVolumeL(TProfileRingingVolume) |
|
1713 // (other items were commented in a header). |
|
1714 // ----------------------------------------------------------------------------- |
|
1715 // |
|
1716 TInt CProEngWrapAPI::SetRingingVolumeL() |
|
1717 { |
|
1718 |
|
1719 RDebug::Print( _L( "ProEng Validation test SetRingingVolumeL" ) ); |
|
1720 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1721 MProEngProfile* prof = NULL; |
|
1722 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1723 if( prof ) |
|
1724 { |
|
1725 CleanupReleasePushL( *prof ); |
|
1726 TRAP_IGNORE( TestProfileSettingsSetRingingVolumeL( *prof ) ); |
|
1727 CleanupStack::PopAndDestroy( prof ); |
|
1728 prof = NULL; |
|
1729 } |
|
1730 CleanupStack::PopAndDestroy(); // engine |
|
1731 |
|
1732 return KErrNone; |
|
1733 } |
|
1734 |
|
1735 void CProEngWrapAPI::TestProfileSettingsSetRingingVolumeL(MProEngProfile& aProfile) |
|
1736 { |
|
1737 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsSetRingingVolumeL begin" ) ); |
|
1738 MProEngToneSettings& toneSettings( aProfile.ToneSettings() ); |
|
1739 TProfileRingingVolume ringvol( toneSettings.RingingVolume() ); |
|
1740 toneSettings.SetRingingVolume( ringvol ); |
|
1741 } |
|
1742 |
|
1743 // ----------------------------------------------------------------------------- |
|
1744 // CProEngWrapAPI::SetVibratingAlertL |
|
1745 // Test: MProEngToneSettings::SetVibratingAlertL(TBool) |
|
1746 // (other items were commented in a header). |
|
1747 // ----------------------------------------------------------------------------- |
|
1748 // |
|
1749 TInt CProEngWrapAPI::SetVibratingAlertL() |
|
1750 { |
|
1751 |
|
1752 RDebug::Print( _L( "ProEng Validation test SetVibratingAlertL" ) ); |
|
1753 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1754 MProEngProfile* prof = NULL; |
|
1755 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1756 if( prof ) |
|
1757 { |
|
1758 CleanupReleasePushL( *prof ); |
|
1759 TRAP_IGNORE( TestProfileSettingsSetVibratingAlertL( *prof ) ); |
|
1760 CleanupStack::PopAndDestroy( prof ); |
|
1761 prof = NULL; |
|
1762 } |
|
1763 CleanupStack::PopAndDestroy(); // engine |
|
1764 |
|
1765 return KErrNone; |
|
1766 } |
|
1767 |
|
1768 void CProEngWrapAPI::TestProfileSettingsSetVibratingAlertL(MProEngProfile& aProfile) |
|
1769 { |
|
1770 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsSetVibratingAlertL begin" ) ); |
|
1771 MProEngToneSettings& toneSettings( aProfile.ToneSettings() ); |
|
1772 TBool vibra( toneSettings.VibratingAlert() ); |
|
1773 toneSettings.SetVibratingAlert( vibra ); |
|
1774 } |
|
1775 |
|
1776 // ----------------------------------------------------------------------------- |
|
1777 // CProEngWrapAPI::SetWarningAndGameTonesL |
|
1778 // Test: MProEngToneSettings::WarningAndGameTonesL(TBool) |
|
1779 // (other items were commented in a header). |
|
1780 // ----------------------------------------------------------------------------- |
|
1781 // |
|
1782 TInt CProEngWrapAPI::SetWarningAndGameTonesL() |
|
1783 { |
|
1784 |
|
1785 RDebug::Print( _L( "ProEng Validation test SetWarningAndGameTonesL" ) ); |
|
1786 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1787 MProEngProfile* prof = NULL; |
|
1788 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1789 if( prof ) |
|
1790 { |
|
1791 CleanupReleasePushL( *prof ); |
|
1792 TRAP_IGNORE( TestProfileSettingsSetWarningAndGameTonesL( *prof ) ); |
|
1793 CleanupStack::PopAndDestroy( prof ); |
|
1794 prof = NULL; |
|
1795 } |
|
1796 CleanupStack::PopAndDestroy(); // engine |
|
1797 return KErrNone; |
|
1798 } |
|
1799 |
|
1800 void CProEngWrapAPI::TestProfileSettingsSetWarningAndGameTonesL(MProEngProfile& aProfile) |
|
1801 { |
|
1802 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsSetWarningAndGameTonesL begin" ) ); |
|
1803 MProEngToneSettings& toneSettings( aProfile.ToneSettings() ); |
|
1804 TBool warntones( toneSettings.WarningAndGameTones() ); |
|
1805 toneSettings.SetWarningAndGameTones( warntones ); |
|
1806 } |
|
1807 |
|
1808 // ----------------------------------------------------------------------------- |
|
1809 // CProEngWrapAPI::SetTextToSpeechL |
|
1810 // Test: MProEngToneSettings::SetTextToSpeechL(TBool) |
|
1811 // (other items were commented in a header). |
|
1812 // ----------------------------------------------------------------------------- |
|
1813 // |
|
1814 TInt CProEngWrapAPI::SetTextToSpeechL() |
|
1815 { |
|
1816 |
|
1817 RDebug::Print( _L( "ProEng Validation test SetTextToSpeechL" ) ); |
|
1818 MProEngEngine* engine = ProEngFactory::NewEngineLC( iFs ); |
|
1819 MProEngProfile* prof = NULL; |
|
1820 TRAP_IGNORE( prof = engine->ProfileL( EProfileGeneralId ) ); |
|
1821 if( prof ) |
|
1822 { |
|
1823 CleanupReleasePushL( *prof ); |
|
1824 TRAP_IGNORE( TestProfileSettingsSetTextToSpeechL( *prof ) ); |
|
1825 CleanupStack::PopAndDestroy( prof ); |
|
1826 prof = NULL; |
|
1827 } |
|
1828 CleanupStack::PopAndDestroy(); // engine |
|
1829 return KErrNone; |
|
1830 } |
|
1831 |
|
1832 void CProEngWrapAPI::TestProfileSettingsSetTextToSpeechL(MProEngProfile& aProfile) |
|
1833 { |
|
1834 RDebug::Print( _L( "ProEng Validation test TestProfileSettingsSetTextToSpeechL begin" ) ); |
|
1835 MProEngToneSettings& toneSettings( aProfile.ToneSettings() ); |
|
1836 TBool tts( toneSettings.TextToSpeech() ); |
|
1837 toneSettings.SetTextToSpeech( tts ); |
|
1838 } |
|
1839 |
|
1840 // ----------------------------------------------------------------------------- |
|
1841 // CProEngWrapAPI::NewAlertToneSeekerL |
|
1842 // Test: ProEngFactory::NewAlertToneSeekerL() |
|
1843 // (other items were commented in a header). |
|
1844 // ----------------------------------------------------------------------------- |
|
1845 // |
|
1846 TInt CProEngWrapAPI::NewAlertToneSeekerL() |
|
1847 { |
|
1848 RDebug::Print( _L( "ProEng Validation test NewAlertToneSeekerL" ) ); |
|
1849 MProEngAlertToneSeeker* seeker( NULL ); |
|
1850 CProEngVTAlertToneSeekerWrapper* wrapper = new ( ELeave ) |
|
1851 CProEngVTAlertToneSeekerWrapper(); |
|
1852 CleanupStack::PushL( wrapper ); |
|
1853 TRAP_IGNORE( seeker = ProEngFactory::NewAlertToneSeekerL() ); |
|
1854 if( seeker ) |
|
1855 { |
|
1856 wrapper->SetObject( seeker ); // takes ownership |
|
1857 } |
|
1858 CleanupStack::PopAndDestroy( wrapper ); |
|
1859 return KErrNone; |
|
1860 } |
|
1861 |
|
1862 // ----------------------------------------------------------------------------- |
|
1863 // CProEngWrapAPI::FetchAlertToneListL |
|
1864 // Test : MProEngAlertToneSeeker::FetchAlertToneListL(MProEngAlertToneSeekerObserver&) |
|
1865 // (other items were commented in a header). |
|
1866 // ----------------------------------------------------------------------------- |
|
1867 // |
|
1868 TInt CProEngWrapAPI::FetchAlertToneListL() |
|
1869 { |
|
1870 RDebug::Print( _L( "ProEng Validation test FetchAlertToneListL" ) ); |
|
1871 MProEngAlertToneSeeker* seeker( NULL ); |
|
1872 CProEngVTAlertToneSeekerWrapper* wrapper = new ( ELeave ) |
|
1873 CProEngVTAlertToneSeekerWrapper(); |
|
1874 CleanupStack::PushL( wrapper ); |
|
1875 TRAP_IGNORE( seeker = ProEngFactory::NewAlertToneSeekerL() ); |
|
1876 if( seeker ) |
|
1877 { |
|
1878 wrapper->SetObject( seeker ); // takes ownership |
|
1879 } |
|
1880 CProEngVTSeekerObserver* observer = new ( ELeave ) CProEngVTSeekerObserver(*iSchedulerUtility); |
|
1881 CleanupStack::PushL( observer ); |
|
1882 TRAP_IGNORE( seeker->FetchAlertToneListL( *observer ) ); |
|
1883 iSchedulerUtility->Start(); |
|
1884 CleanupStack::PopAndDestroy( observer ); |
|
1885 CleanupStack::PopAndDestroy( wrapper ); |
|
1886 return KErrNone; |
|
1887 } |
|
1888 |
|
1889 // ----------------------------------------------------------------------------- |
|
1890 // CProEngWrapAPI::CancelFetchL |
|
1891 // Test : MProEngAlertToneSeeker::CancelFetch() |
|
1892 // (other items were commented in a header). |
|
1893 // ----------------------------------------------------------------------------- |
|
1894 // |
|
1895 TInt CProEngWrapAPI::CancelFetchL() |
|
1896 { |
|
1897 RDebug::Print( _L( "ProEng Validation test CancelFetchL" ) ); |
|
1898 MProEngAlertToneSeeker* seeker( NULL ); |
|
1899 CProEngVTAlertToneSeekerWrapper* wrapper = new ( ELeave ) |
|
1900 CProEngVTAlertToneSeekerWrapper(); |
|
1901 CleanupStack::PushL( wrapper ); |
|
1902 TRAP_IGNORE( seeker = ProEngFactory::NewAlertToneSeekerL() ); |
|
1903 if( seeker ) |
|
1904 { |
|
1905 wrapper->SetObject( seeker ); // takes ownership |
|
1906 } |
|
1907 CProEngVTSeekerObserver* observer = new ( ELeave ) CProEngVTSeekerObserver(*iSchedulerUtility); |
|
1908 CleanupStack::PushL( observer ); |
|
1909 TRAP_IGNORE( seeker->FetchAlertToneListL( *observer ) ); |
|
1910 iSchedulerUtility->Start(); |
|
1911 seeker->CancelFetch(); |
|
1912 CleanupStack::PopAndDestroy( observer ); |
|
1913 CleanupStack::PopAndDestroy( wrapper ); |
|
1914 return KErrNone; |
|
1915 } |
|
1916 |
|
1917 TInt CProEngWrapAPI::NewEngineLWithRFsL() |
|
1918 { |
|
1919 MProEngEngine* engine = ProEngFactory::NewEngineL( iFs ); |
|
1920 if( engine ) |
|
1921 { |
|
1922 return KErrNone; |
|
1923 } |
|
1924 return KErrGeneral; |
|
1925 } |
|
1926 |
|
1927 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
1928 // None |
|
1929 |
|
1930 // [End of File] - Do not remove |