|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: This module contains implementation of |
|
15 * RTestEngineServer class member functions. |
|
16 * |
|
17 */ |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include <e32svr.h> |
|
21 #include "TestEngineClient.h" |
|
22 #include "TestEngineCommon.h" |
|
23 |
|
24 // EXTERNAL DATA STRUCTURES |
|
25 // None |
|
26 |
|
27 // EXTERNAL FUNCTION PROTOTYPES |
|
28 // None |
|
29 |
|
30 // CONSTANTS |
|
31 // None |
|
32 |
|
33 // MACROS |
|
34 // None |
|
35 |
|
36 // LOCAL CONSTANTS AND MACROS |
|
37 // None |
|
38 |
|
39 // MODULE DATA STRUCTURES |
|
40 // None |
|
41 |
|
42 // LOCAL FUNCTION PROTOTYPES |
|
43 // None |
|
44 |
|
45 // FORWARD DECLARATIONS |
|
46 // None |
|
47 |
|
48 // ==================== LOCAL FUNCTIONS ======================================= |
|
49 // None |
|
50 |
|
51 // ================= MEMBER FUNCTIONS ========================================= |
|
52 |
|
53 /* |
|
54 ------------------------------------------------------------------------------- |
|
55 |
|
56 Class: RTestEngineServer |
|
57 |
|
58 Method: Connect |
|
59 |
|
60 Description: Connect method creates new RTestEngineServer session. |
|
61 |
|
62 RTestEngineServer session is used to manage the test case execution. |
|
63 |
|
64 Parameters: None |
|
65 |
|
66 Return Values: TInt KErrNone : TestEngineServer created successfully |
|
67 |
|
68 Errors/Exceptions: None |
|
69 |
|
70 Status: Approved |
|
71 |
|
72 ------------------------------------------------------------------------------- |
|
73 */ |
|
74 EXPORT_C TInt RTestEngineServer::Connect() |
|
75 { |
|
76 TInt ret = StartEngine(); |
|
77 if ( ret == KErrNone) |
|
78 { |
|
79 ret = CreateSession( KTestEngineName, Version() ); |
|
80 } |
|
81 return ret; |
|
82 |
|
83 } |
|
84 |
|
85 /* |
|
86 ------------------------------------------------------------------------------- |
|
87 |
|
88 Class: RTestEngineServer |
|
89 |
|
90 Method: Version |
|
91 |
|
92 Description: Return client side version number from RTestEngineServer. |
|
93 |
|
94 Parameters: None |
|
95 |
|
96 Return Values: TVersion : Version number from RTestEngineServer |
|
97 |
|
98 Errors/Exceptions: None |
|
99 |
|
100 Status: Approved |
|
101 |
|
102 ------------------------------------------------------------------------------- |
|
103 */ |
|
104 EXPORT_C TVersion RTestEngineServer::Version() const |
|
105 { |
|
106 return ( TVersion( KTestEngineMajorVersionNumber, |
|
107 KTestEngineMinorVersionNumber, KTestEngineBuildVersionNumber ) ); |
|
108 |
|
109 } |
|
110 |
|
111 /* |
|
112 ------------------------------------------------------------------------------- |
|
113 |
|
114 Class: RTestEngineServer |
|
115 |
|
116 Method: Close |
|
117 |
|
118 Description: Closes the RTestEngineServer session. |
|
119 |
|
120 Parameters: None |
|
121 |
|
122 Return Values: None |
|
123 |
|
124 Errors/Exceptions: None |
|
125 |
|
126 Status: Approved |
|
127 |
|
128 ------------------------------------------------------------------------------- |
|
129 */ |
|
130 EXPORT_C void RTestEngineServer::Close() |
|
131 { |
|
132 // Check that server is connected |
|
133 if ( Handle() != 0 ) |
|
134 { |
|
135 TIpcArgs args( TIpcArgs::ENothing, TIpcArgs::ENothing, TIpcArgs::ENothing ); |
|
136 SendReceive( ETestEngineServerCloseSession, args ); |
|
137 } |
|
138 RSessionBase::Close(); |
|
139 |
|
140 } |
|
141 |
|
142 /* |
|
143 ------------------------------------------------------------------------------- |
|
144 |
|
145 DESCRIPTION |
|
146 |
|
147 This module contains implementation of RTestEngine class member functions. |
|
148 |
|
149 ------------------------------------------------------------------------------- |
|
150 */ |
|
151 |
|
152 // ================= MEMBER FUNCTIONS ========================================= |
|
153 |
|
154 /* |
|
155 ------------------------------------------------------------------------------- |
|
156 |
|
157 Class: RTestEngine |
|
158 |
|
159 Method: Open |
|
160 |
|
161 Description: Open creates a subsession to TestEngine. |
|
162 |
|
163 Parameters: RTestEngineServer& aServer : Handle to Test Engine Server |
|
164 const TFileName& aIniFile : Ini file to be used for |
|
165 initialization of the Test Engine |
|
166 |
|
167 Return Values: TInt: Symbian OS error code |
|
168 |
|
169 Errors/Exceptions: None |
|
170 |
|
171 Status: Approved |
|
172 |
|
173 ------------------------------------------------------------------------------- |
|
174 */ |
|
175 EXPORT_C TInt RTestEngine::Open( RTestEngineServer& aServer, |
|
176 const TFileName& aIniFile ) |
|
177 { |
|
178 TIpcArgs args( &aIniFile, TIpcArgs::ENothing, TIpcArgs::ENothing ); |
|
179 return CreateSubSession( aServer, ETestEngineCreateSubSession, args ); |
|
180 } |
|
181 |
|
182 /* |
|
183 ------------------------------------------------------------------------------- |
|
184 |
|
185 Class: RTestEngine |
|
186 |
|
187 Method: Close |
|
188 |
|
189 Description: Close the RTestEngine subsession. |
|
190 |
|
191 Parameters: None |
|
192 |
|
193 Return Values: None |
|
194 |
|
195 Errors/Exceptions: None |
|
196 |
|
197 Status: Approved |
|
198 |
|
199 ------------------------------------------------------------------------------- |
|
200 */ |
|
201 EXPORT_C void RTestEngine::Close() |
|
202 { |
|
203 RSubSessionBase::CloseSubSession( ETestEngineCloseSubSession ); |
|
204 |
|
205 } |
|
206 |
|
207 /* |
|
208 ------------------------------------------------------------------------------- |
|
209 |
|
210 Class: RTestEngine |
|
211 |
|
212 Method: SetAttribute |
|
213 |
|
214 Description: Sets attributes to Test Framework |
|
215 |
|
216 Parameters: TAttribute aAttribute: in: Attribute type |
|
217 const TDesC& aValue: in: Attribute value |
|
218 |
|
219 Return Values: TInt: Symbian OS error code |
|
220 |
|
221 Errors/Exceptions: None |
|
222 |
|
223 Status: Proposal |
|
224 |
|
225 ------------------------------------------------------------------------------- |
|
226 */ |
|
227 EXPORT_C TInt RTestEngine::SetAttribute( TAttribute aAttribute, |
|
228 const TDesC& aValue ) |
|
229 { |
|
230 TIpcArgs args( aAttribute, &aValue, TIpcArgs::ENothing ); |
|
231 return SendReceive( ETestEngineSetAttribute, args ); |
|
232 } |
|
233 |
|
234 /* |
|
235 ------------------------------------------------------------------------------- |
|
236 |
|
237 Class: RTestEngine |
|
238 |
|
239 Method: AddTestModule |
|
240 |
|
241 Description: Load dynamically a new Test Module to the Test Framework. |
|
242 |
|
243 Parameters: const TName& aTestModule : Name of the Test Module to be added |
|
244 const TFileName& aIniFile : Initialization file of Test Module |
|
245 |
|
246 Return Values: TInt: Symbian OS error code |
|
247 |
|
248 Errors/Exceptions: None |
|
249 |
|
250 Status: Approved |
|
251 |
|
252 ------------------------------------------------------------------------------- |
|
253 */ |
|
254 EXPORT_C TInt RTestEngine::AddTestModule( const TName& aTestModule, |
|
255 const TFileName& aIniFile ) |
|
256 { |
|
257 TIpcArgs args( &aTestModule, &aIniFile, TIpcArgs::ENothing ); |
|
258 return SendReceive( ETestEngineAddTestModule, args ); |
|
259 } |
|
260 |
|
261 /* |
|
262 ------------------------------------------------------------------------------- |
|
263 |
|
264 Class: RTestEngine |
|
265 |
|
266 Method: RemoveTestModule |
|
267 |
|
268 Description: Remove the existing Test Module from the Test Framework. |
|
269 |
|
270 Parameters: const TName& aTestModule : Name of the Test Module to be |
|
271 removed |
|
272 |
|
273 Return Values: TInt: Symbian OS error code |
|
274 |
|
275 Errors/Exceptions: None |
|
276 |
|
277 Status: Approved |
|
278 |
|
279 ------------------------------------------------------------------------------- |
|
280 */ |
|
281 EXPORT_C TInt RTestEngine::RemoveTestModule( const TName& aTestModule ) |
|
282 { |
|
283 TIpcArgs args( &aTestModule, TIpcArgs::ENothing, TIpcArgs::ENothing ); |
|
284 return SendReceive( ETestEngineRemoveTestModule, args ); |
|
285 |
|
286 } |
|
287 |
|
288 /* |
|
289 ------------------------------------------------------------------------------- |
|
290 |
|
291 Class: RTestEngine |
|
292 |
|
293 Method: AddConfigFile |
|
294 |
|
295 Description: Add new config file to Test Module. |
|
296 |
|
297 Parameters: const TName& aTestModule : Name of Test Module where the config |
|
298 file will be added |
|
299 const TFileName& aConfigFile : Name of config file to be added |
|
300 |
|
301 Return Values: TInt: Symbian OS error code |
|
302 |
|
303 Errors/Exceptions: None |
|
304 |
|
305 Status: Approved |
|
306 |
|
307 ------------------------------------------------------------------------------- |
|
308 */ |
|
309 EXPORT_C TInt RTestEngine::AddConfigFile( const TName& aTestModule, |
|
310 const TFileName& aConfigFile ) |
|
311 { |
|
312 TIpcArgs args( &aTestModule, &aConfigFile, TIpcArgs::ENothing ); |
|
313 return SendReceive( ETestEngineAddConfigFile, args ); |
|
314 |
|
315 } |
|
316 |
|
317 /* |
|
318 ------------------------------------------------------------------------------- |
|
319 |
|
320 Class: RTestEngine |
|
321 |
|
322 Method: RemoveConfigFile |
|
323 |
|
324 Description: Remove config file from Test Module. |
|
325 |
|
326 Parameters: const TName& aTestModule : Test Module name |
|
327 const TFileName& aConfigFile : Name of config file to be removed |
|
328 |
|
329 Return Values: TInt: Symbian OS error code |
|
330 |
|
331 Errors/Exceptions: None |
|
332 |
|
333 Status: Proposal |
|
334 |
|
335 ------------------------------------------------------------------------------- |
|
336 */ |
|
337 EXPORT_C TInt RTestEngine::RemoveConfigFile( const TName& aTestModule, |
|
338 const TFileName& aConfigFile ) |
|
339 { |
|
340 TIpcArgs args( &aTestModule, &aConfigFile, TIpcArgs::ENothing ); |
|
341 return SendReceive( ETestEngineRemoveConfigFile, args ); |
|
342 } |
|
343 |
|
344 /* |
|
345 ------------------------------------------------------------------------------- |
|
346 |
|
347 Class: RTestEngine |
|
348 |
|
349 Method: EnumerateTestCases |
|
350 |
|
351 Description: First phase of two-phased test case query operation. |
|
352 |
|
353 Test cases are inquired by two-phased operation calling first the |
|
354 EnumerateTestCases method and then the GetTestCases. |
|
355 |
|
356 Parameters: TInt& aCount : Test case count |
|
357 TRequestStatus& aStatus : Request status |
|
358 |
|
359 Return Values: None |
|
360 |
|
361 Errors/Exceptions: None |
|
362 |
|
363 Status: Approved |
|
364 |
|
365 ------------------------------------------------------------------------------- |
|
366 */ |
|
367 EXPORT_C void RTestEngine::EnumerateTestCases( TCaseCount& aCount, |
|
368 TRequestStatus& aStatus ) |
|
369 { |
|
370 TIpcArgs args( &aCount, TIpcArgs::ENothing, TIpcArgs::ENothing ); |
|
371 SendReceive( ETestEngineEnumerateTestCases, args, aStatus ); |
|
372 } |
|
373 |
|
374 /* |
|
375 ------------------------------------------------------------------------------- |
|
376 |
|
377 Class: RTestEngine |
|
378 |
|
379 Method: GetTestCases |
|
380 |
|
381 Description: Second phase of two-phased test case query operation. |
|
382 |
|
383 GetTestCases retrieves test cases from Test Modules to aTestCases that is |
|
384 a list consisting of several TTestInfo objects. |
|
385 |
|
386 Parameters: CArrayFixFlat<TTestInfo>& aTestCaseBuffer : Test case array |
|
387 |
|
388 Return Values: TInt: Symbian OS error code |
|
389 |
|
390 Errors/Exceptions: None |
|
391 |
|
392 Status: Approved |
|
393 |
|
394 ------------------------------------------------------------------------------- |
|
395 */ |
|
396 EXPORT_C TInt RTestEngine::GetTestCases( |
|
397 CFixedFlatArray<TTestInfo>& aTestCaseBuffer ) |
|
398 { |
|
399 // Construct and send message |
|
400 TIpcArgs args( &aTestCaseBuffer.Des(), TIpcArgs::ENothing, TIpcArgs::ENothing ); |
|
401 return SendReceive( ETestEngineGetTestCases, args ); |
|
402 |
|
403 } |
|
404 |
|
405 /* |
|
406 ------------------------------------------------------------------------------- |
|
407 |
|
408 Class: RTestEngine |
|
409 |
|
410 Method: ErrorNotification |
|
411 |
|
412 Description: Obtains error notifications from Test Engine and Test |
|
413 Servers via Test Engine. |
|
414 |
|
415 Parameters: TTestProgressPckg& aError : Error package |
|
416 TRequestStatus& aStatus : Request status |
|
417 |
|
418 Return Values: None |
|
419 |
|
420 Errors/Exceptions: None |
|
421 |
|
422 Status: Approved |
|
423 |
|
424 ------------------------------------------------------------------------------- |
|
425 */ |
|
426 EXPORT_C void RTestEngine::ErrorNotification( TErrorNotificationPckg& aError, |
|
427 TRequestStatus& aStatus ) |
|
428 { |
|
429 TIpcArgs args( &aError, TIpcArgs::ENothing, TIpcArgs::ENothing ); |
|
430 SendReceive( ETestEngineErrorNotification, args, aStatus ); |
|
431 |
|
432 } |
|
433 |
|
434 /* |
|
435 ------------------------------------------------------------------------------- |
|
436 |
|
437 Class: RTestEngine |
|
438 |
|
439 Method: CancelAsyncRequest |
|
440 |
|
441 Description: Asynchronous requests can be canceled by this function. |
|
442 |
|
443 Parameters: TInt aReqToCancel : Request to be cancelled |
|
444 |
|
445 Return Values: TInt: Symbian OS error code |
|
446 |
|
447 Errors/Exceptions: None |
|
448 |
|
449 Status: Approved |
|
450 |
|
451 ------------------------------------------------------------------------------- |
|
452 */ |
|
453 EXPORT_C TInt RTestEngine::CancelAsyncRequest( TInt aReqToCancel ) |
|
454 { |
|
455 TIpcArgs args( aReqToCancel, TIpcArgs::ENothing, TIpcArgs::ENothing ); |
|
456 return SendReceive( ETestEngineCancelAsyncRequest, args ); |
|
457 |
|
458 } |
|
459 |
|
460 /* |
|
461 ------------------------------------------------------------------------------- |
|
462 |
|
463 Class: RTestEngine |
|
464 |
|
465 Method: Event |
|
466 |
|
467 Description: Used to control STIF Test Framework event system. |
|
468 |
|
469 Parameters: TEventIfPckg& aEvent : in : Event information |
|
470 TRequestStatus& aStatus : in : Request status |
|
471 |
|
472 Return Values: TInt KErrNone : No errors occurred |
|
473 |
|
474 Errors/Exceptions: None |
|
475 |
|
476 Status: Approved |
|
477 |
|
478 ------------------------------------------------------------------------------- |
|
479 */ |
|
480 EXPORT_C void RTestEngine::Event( TEventIfPckg& aEvent, |
|
481 TRequestStatus& aStatus ) |
|
482 { |
|
483 TIpcArgs args( &aEvent, TIpcArgs::ENothing, TIpcArgs::ENothing ); |
|
484 SendReceive( ETestEngineEvent, args, aStatus ); |
|
485 |
|
486 } |
|
487 |
|
488 /* |
|
489 ------------------------------------------------------------------------------- |
|
490 |
|
491 Class: RTestEngine |
|
492 |
|
493 Method: OpenLoggerSession |
|
494 |
|
495 Description: Open created subsession to TestEngine. |
|
496 |
|
497 Parameters: RTestEngineServer& aServer : Handle to Test Engine Server |
|
498 TLoggerSettings& aLoggerSettings: in: Logger's overwrite struct |
|
499 |
|
500 Return Values: TInt KErrNone: TestEngine opened and initialized |
|
501 succesfully |
|
502 |
|
503 Errors/Exceptions: None |
|
504 |
|
505 Status: Approved |
|
506 |
|
507 ------------------------------------------------------------------------------- |
|
508 */ |
|
509 EXPORT_C TInt RTestEngine::OpenLoggerSession( RTestEngineServer& aServer, |
|
510 TLoggerSettings& aLoggerSettings ) |
|
511 { |
|
512 // Package |
|
513 TPckg<TLoggerSettings> loggerSettingsPckg( aLoggerSettings ); |
|
514 |
|
515 TIpcArgs args( &loggerSettingsPckg, TIpcArgs::ENothing, TIpcArgs::ENothing ); |
|
516 // Goes to CTestEngine's DispatchMessageL() method |
|
517 CreateSubSession( aServer, ETestEngineLoggerSettings, args ); |
|
518 RSubSessionBase::CloseSubSession( ETestEngineCloseLoggerSettings ); |
|
519 |
|
520 return KErrNone; |
|
521 |
|
522 } |
|
523 |
|
524 /* |
|
525 ------------------------------------------------------------------------------- |
|
526 |
|
527 Class: RTestEngine |
|
528 |
|
529 Method: AddTestCaseResultToTestReport |
|
530 |
|
531 Description: Sends info about executed test cases to test engine, which |
|
532 will forward it to test report. |
|
533 This is used when after reboot UIStore reads info about |
|
534 executed test cases before reboot. |
|
535 |
|
536 Parameters: TTestIngo& aTestInfo : test info structure |
|
537 TFullTestResult& aTestResult: test result structure |
|
538 TInt aError: error |
|
539 |
|
540 Return Values: TInt error code returned by test engine |
|
541 |
|
542 Errors/Exceptions: None |
|
543 |
|
544 Status: Approved |
|
545 |
|
546 ------------------------------------------------------------------------------- |
|
547 */ |
|
548 EXPORT_C TInt RTestEngine::AddTestCaseResultToTestReport(const TTestInfo& aTestInfo, |
|
549 const TFullTestResult& aTestResult, |
|
550 const TInt aError) |
|
551 { |
|
552 // Create packages |
|
553 TTestInfoPckg testInfoPckg(aTestInfo); |
|
554 TFullTestResultPckg fullTestResultPckg(aTestResult); |
|
555 |
|
556 // Create argument list |
|
557 TIpcArgs args(&testInfoPckg, &fullTestResultPckg, aError); |
|
558 |
|
559 // Send it to test engine |
|
560 TInt res = SendReceive(ETestEngineReportTestCase, args); |
|
561 |
|
562 return res; |
|
563 } |
|
564 |
|
565 /* |
|
566 ------------------------------------------------------------------------------- |
|
567 |
|
568 DESCRIPTION |
|
569 |
|
570 This module contains implementation of RTestCase class member functions. |
|
571 |
|
572 ------------------------------------------------------------------------------- |
|
573 */ |
|
574 |
|
575 // ================= MEMBER FUNCTIONS ========================================= |
|
576 |
|
577 /* |
|
578 ------------------------------------------------------------------------------- |
|
579 |
|
580 Class: RTestCase |
|
581 |
|
582 Method: Open |
|
583 |
|
584 Description: Open creates a subsession to TestCase. |
|
585 |
|
586 Parameters: RTestEngineServer& aServer : Handle to Test Engine Server |
|
587 const TTestInfoPckg& aTestCaseInfo : TTestInfoPckg : Test info |
|
588 package |
|
589 |
|
590 Return Values: TInt: Symbian OS error code |
|
591 |
|
592 Errors/Exceptions: None |
|
593 |
|
594 Status: Approved |
|
595 |
|
596 ------------------------------------------------------------------------------- |
|
597 */ |
|
598 EXPORT_C TInt RTestCase::Open( RTestEngineServer& aServer, |
|
599 const TTestInfoPckg& aTestCaseInfo ) |
|
600 { |
|
601 TIpcArgs args( &aTestCaseInfo, TIpcArgs::ENothing, TIpcArgs::ENothing ); |
|
602 return CreateSubSession( aServer, ETestCaseCreateSubSession, args ); |
|
603 } |
|
604 |
|
605 /* |
|
606 ------------------------------------------------------------------------------- |
|
607 |
|
608 Class: RTestCase |
|
609 |
|
610 Method: Close |
|
611 |
|
612 Description: Close the RTestCase subsession. |
|
613 |
|
614 Parameters: None |
|
615 |
|
616 Return Values: None |
|
617 |
|
618 Errors/Exceptions: None |
|
619 |
|
620 Status: Approved |
|
621 |
|
622 ------------------------------------------------------------------------------- |
|
623 */ |
|
624 EXPORT_C void RTestCase::Close() |
|
625 { |
|
626 RSubSessionBase::CloseSubSession( ETestCaseCloseSubSession ); |
|
627 |
|
628 } |
|
629 |
|
630 /* |
|
631 ------------------------------------------------------------------------------- |
|
632 |
|
633 Class: RTestCase |
|
634 |
|
635 Method: RunTestCase |
|
636 |
|
637 Description: Run a test case asynchronously. |
|
638 |
|
639 Parameters: TFullTestResultPckg& aTestResult : TFullTestResult : |
|
640 Test Result package |
|
641 TRequestStatus& aStatus : Request status |
|
642 |
|
643 Return Values: TInt KErrNone : Test case could be run |
|
644 Other error code : Reason the test case couldn't be run |
|
645 |
|
646 Errors/Exceptions: None |
|
647 |
|
648 Status: Approved |
|
649 |
|
650 ------------------------------------------------------------------------------- |
|
651 */ |
|
652 EXPORT_C void RTestCase::RunTestCase( TFullTestResultPckg& aTestResult, |
|
653 TRequestStatus& aStatus ) |
|
654 { |
|
655 TIpcArgs args( &aTestResult, TIpcArgs::ENothing, TIpcArgs::ENothing ); |
|
656 SendReceive( ETestCaseRunTestCase, args, aStatus ); |
|
657 } |
|
658 |
|
659 /* |
|
660 ------------------------------------------------------------------------------- |
|
661 |
|
662 Class: RTestCase |
|
663 |
|
664 Method: Pause |
|
665 |
|
666 Description: Pause suspends the execution of the test case. |
|
667 |
|
668 Parameters: None |
|
669 |
|
670 Return Values: TInt: Symbian OS error code |
|
671 |
|
672 Errors/Exceptions: None |
|
673 |
|
674 Status: Approved |
|
675 |
|
676 ------------------------------------------------------------------------------- |
|
677 */ |
|
678 EXPORT_C TInt RTestCase::Pause() |
|
679 { |
|
680 TIpcArgs args( TIpcArgs::ENothing, TIpcArgs::ENothing, TIpcArgs::ENothing ); |
|
681 return SendReceive( ETestCasePause, args ); |
|
682 } |
|
683 |
|
684 /* |
|
685 ------------------------------------------------------------------------------- |
|
686 |
|
687 Class: RTestCase |
|
688 |
|
689 Method: Resume |
|
690 |
|
691 Description: Resume the test case suspended previously. |
|
692 |
|
693 Parameters: None |
|
694 |
|
695 Return Values: TInt: Symbian OS error code |
|
696 |
|
697 Errors/Exceptions: None |
|
698 |
|
699 Status: Approved |
|
700 |
|
701 ------------------------------------------------------------------------------- |
|
702 */ |
|
703 EXPORT_C TInt RTestCase::Resume() |
|
704 { |
|
705 TIpcArgs args( TIpcArgs::ENothing, TIpcArgs::ENothing, TIpcArgs::ENothing ); |
|
706 return SendReceive( ETestCaseResume, args ); |
|
707 } |
|
708 |
|
709 /* |
|
710 ------------------------------------------------------------------------------- |
|
711 |
|
712 Class: RTestCase |
|
713 |
|
714 Method: NotifyProgress |
|
715 |
|
716 Description: Request different progress information from the test case. |
|
717 |
|
718 Parameters: TTestProgressPckg& aProgress : TTestProgress : Test Progress |
|
719 package |
|
720 TRequestStatus& aStatus : Request status |
|
721 |
|
722 Return Values: None |
|
723 |
|
724 Errors/Exceptions: None |
|
725 |
|
726 Status: Approved |
|
727 |
|
728 ------------------------------------------------------------------------------- |
|
729 */ |
|
730 EXPORT_C void RTestCase::NotifyProgress( TTestProgressPckg& aProgress, |
|
731 TRequestStatus& aStatus ) |
|
732 { |
|
733 TIpcArgs args( &aProgress, TIpcArgs::ENothing, TIpcArgs::ENothing ); |
|
734 SendReceive( ETestCaseNotifyProgress, args, aStatus ); |
|
735 } |
|
736 |
|
737 /* |
|
738 ------------------------------------------------------------------------------- |
|
739 |
|
740 Class: RTestCase |
|
741 |
|
742 Method: NotifyRemoteType |
|
743 |
|
744 Description: Request remote commands information from the test case. |
|
745 |
|
746 Parameters: TRemoteCommandPckg& aType: in: Request type |
|
747 TRequestStatus& aStatus : Request status |
|
748 |
|
749 Return Values: None |
|
750 |
|
751 Errors/Exceptions: None |
|
752 |
|
753 Status: Proposal |
|
754 |
|
755 ------------------------------------------------------------------------------- |
|
756 */ |
|
757 EXPORT_C void RTestCase::NotifyRemoteType( TStifCommandPckg& aType, |
|
758 TPckg<TInt>& aMsgSize, |
|
759 TRequestStatus& aStatus ) |
|
760 { |
|
761 TIpcArgs args( &aType, &aMsgSize, TIpcArgs::ENothing ); |
|
762 SendReceive( ETestCaseNotifyRemoteType, args, aStatus ); |
|
763 } |
|
764 |
|
765 /* |
|
766 ------------------------------------------------------------------------------- |
|
767 |
|
768 Class: RTestCase |
|
769 |
|
770 Method: NotifyRemoteMsg |
|
771 |
|
772 Description: Request remote commands information from the test case. |
|
773 |
|
774 Parameters: TDesC& aMessage: in: Message buffer |
|
775 TRemoteCmdType aType: in: Message direction |
|
776 |
|
777 Return Values: None |
|
778 |
|
779 Errors/Exceptions: None |
|
780 |
|
781 Status: Proposal |
|
782 |
|
783 ------------------------------------------------------------------------------- |
|
784 */ |
|
785 EXPORT_C TInt RTestCase::NotifyRemoteMsg( TDes8& aMessage, |
|
786 TStifCommand aType ) |
|
787 { |
|
788 TIpcArgs args( &aMessage, aType, aMessage.Length() ); |
|
789 return SendReceive( ETestCaseNotifyRemoteMsg, args ); |
|
790 } |
|
791 |
|
792 /* |
|
793 ------------------------------------------------------------------------------- |
|
794 |
|
795 Class: RTestCase |
|
796 |
|
797 Method: CancelAsyncRequest |
|
798 |
|
799 Description: Asynchronous requests can be canceled by this function. |
|
800 |
|
801 Parameters: TInt aReqToCancel : Request to be cancelled |
|
802 |
|
803 Return Values: TInt: Symbian OS error code |
|
804 |
|
805 Errors/Exceptions: None |
|
806 |
|
807 Status: Approved |
|
808 |
|
809 ------------------------------------------------------------------------------- |
|
810 */ |
|
811 EXPORT_C TInt RTestCase::CancelAsyncRequest( TInt aReqToCancel ) |
|
812 { |
|
813 TIpcArgs args( aReqToCancel, TIpcArgs::ENothing, TIpcArgs::ENothing ); |
|
814 return SendReceive( ETestCaseCancelAsyncRequest, args ); |
|
815 } |
|
816 |
|
817 // ================= OTHER EXPORTED FUNCTIONS ================================= |
|
818 |
|
819 // None |
|
820 |
|
821 // End of File |