|
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 file contains the header file of the |
|
15 * CUIEnginePrinter. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef STIF_TFW_IF_PRINTER_H |
|
20 #define STIF_TFW_IF_PRINTER_H |
|
21 |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32std.h> |
|
25 #include <e32base.h> |
|
26 #include <stifinternal/UIEngineContainer.h> |
|
27 |
|
28 // CONSTANTS |
|
29 |
|
30 // Interval for timer printing |
|
31 const TInt KPrintInterval = 1000000; |
|
32 |
|
33 // MACROS |
|
34 // None |
|
35 |
|
36 // DATA TYPES |
|
37 // None |
|
38 |
|
39 // FUNCTION PROTOTYPES |
|
40 // None |
|
41 |
|
42 |
|
43 // FORWARD DECLARATIONS |
|
44 // None |
|
45 |
|
46 |
|
47 // CLASS DECLARATION |
|
48 |
|
49 |
|
50 // DESCRIPTION |
|
51 |
|
52 // CUIEnginePrinter is an active object which handles the print notifications |
|
53 // from the test case. |
|
54 class CUIEnginePrinter |
|
55 : public CActive |
|
56 { |
|
57 public: // Enumerations |
|
58 |
|
59 private: // Enumerations |
|
60 |
|
61 public: // Constructors and destructor |
|
62 |
|
63 /** |
|
64 * NewL is first phase of two-phased constructor. |
|
65 */ |
|
66 static CUIEnginePrinter* NewL( CUIEngineContainer* aUIEngineContainer ); |
|
67 |
|
68 /** |
|
69 * Destructor of CTestCaseRunner. |
|
70 */ |
|
71 virtual ~CUIEnginePrinter(); |
|
72 |
|
73 /** |
|
74 * Start |
|
75 */ |
|
76 void StartL( RTestCase& aTestCase ); |
|
77 |
|
78 public: // New functions |
|
79 |
|
80 inline TBool IsRunning(){ return iRunning; }; |
|
81 |
|
82 public: // Functions from base classes |
|
83 |
|
84 /** |
|
85 * RunL derived from CActive handles the completed requests. |
|
86 */ |
|
87 void RunL(); |
|
88 |
|
89 /** |
|
90 * DoCancel derived from CActive handles the Cancel |
|
91 */ |
|
92 void DoCancel(); |
|
93 |
|
94 protected: // New functions |
|
95 // None |
|
96 |
|
97 protected: // Functions from base classes |
|
98 // None |
|
99 |
|
100 /** |
|
101 * C++ default constructor. |
|
102 */ |
|
103 CUIEnginePrinter( CUIEngineContainer* aUIEngineContainer ); |
|
104 |
|
105 /** |
|
106 * By default Symbian OS constructor is private. |
|
107 */ |
|
108 void ConstructL( ); |
|
109 |
|
110 private: // Functions from base classes |
|
111 // None |
|
112 |
|
113 public: //Data |
|
114 |
|
115 protected: // Data |
|
116 // None |
|
117 |
|
118 private: // Data |
|
119 |
|
120 // Pointer to test case container |
|
121 CUIEngineContainer* iUIEngineContainer; |
|
122 |
|
123 // Testcase object handle |
|
124 RTestCase iTestCase; |
|
125 |
|
126 // Test result package |
|
127 TTestProgress iProgress; |
|
128 TTestProgressPckg iProgressPckg; |
|
129 |
|
130 TBool iRunning; |
|
131 |
|
132 public: // Friend classes |
|
133 // None |
|
134 |
|
135 protected: // Friend classes |
|
136 // None |
|
137 |
|
138 private: // Friend classes |
|
139 // None |
|
140 |
|
141 }; |
|
142 |
|
143 |
|
144 |
|
145 #endif // STIF_TFW_IF_PRINTER_H |
|
146 |
|
147 // End of File |