2
|
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 CStifTFw.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef STIF_TFW_H
|
|
19 |
#define STIF_TFW_H
|
|
20 |
|
|
21 |
// INCLUDES
|
|
22 |
#include <e32std.h>
|
|
23 |
#include <e32base.h>
|
|
24 |
#include <StifLogger.h>
|
|
25 |
#include <StifTestInterface.h>
|
|
26 |
#include <stifinternal/UIEngine.h>
|
|
27 |
|
|
28 |
// CONSTANTS
|
|
29 |
// None
|
|
30 |
|
|
31 |
// MACROS
|
|
32 |
|
|
33 |
// DATA TYPES
|
|
34 |
|
|
35 |
// FUNCTION PROTOTYPES
|
|
36 |
// None
|
|
37 |
|
|
38 |
// FORWARD DECLARATIONS
|
|
39 |
class CUIEngineContainer;
|
|
40 |
class CUIEngineEvent;
|
|
41 |
class CStifTFwIf;
|
|
42 |
|
|
43 |
// CLASS DECLARATION
|
|
44 |
|
|
45 |
// CStifTFw is the sub class of STIF Test Framework Interface
|
|
46 |
class CStifTFw
|
|
47 |
:public CUIIf
|
|
48 |
{
|
|
49 |
public: // Enumerations
|
|
50 |
|
|
51 |
protected: // Enumerations
|
|
52 |
|
|
53 |
private: // Enumerations
|
|
54 |
|
|
55 |
public: // Constructors and destructor
|
|
56 |
/**
|
|
57 |
* NewL is first phase of two-phased constructor.
|
|
58 |
*/
|
|
59 |
static CStifTFw* NewL( CStifTFwIf* aStifTFwIf );
|
|
60 |
|
|
61 |
/**
|
|
62 |
* Destructor.
|
|
63 |
*/
|
|
64 |
virtual ~CStifTFw();
|
|
65 |
|
|
66 |
public:
|
|
67 |
|
|
68 |
protected: // Functions that can be called from derived class
|
|
69 |
|
|
70 |
protected: // Functions that the derived class may implement.
|
|
71 |
|
|
72 |
private:
|
|
73 |
|
|
74 |
/**
|
|
75 |
* Constructor.
|
|
76 |
*/
|
|
77 |
CStifTFw( CStifTFwIf* aStifTFwIf );
|
|
78 |
|
|
79 |
/**
|
|
80 |
* Second phase constructor.
|
|
81 |
*/
|
|
82 |
void ConstructL();
|
|
83 |
|
|
84 |
/**
|
|
85 |
* Test case executed.
|
|
86 |
*
|
|
87 |
* Returns Symbian OS error code.
|
|
88 |
*/
|
|
89 |
IMPORT_C void TestExecuted( CUIEngineContainer* aContainer,
|
|
90 |
TFullTestResult& aFullTestResult );
|
|
91 |
/**
|
|
92 |
* Progress information from Test case execution.
|
|
93 |
*
|
|
94 |
* Returns Symbian OS error code.
|
|
95 |
*/
|
|
96 |
IMPORT_C TInt PrintProg ( CUIEngineContainer* aContainer,
|
|
97 |
TTestProgress& aProgress );
|
|
98 |
|
|
99 |
/**
|
|
100 |
* Forward message to ATS.
|
|
101 |
*/
|
|
102 |
IMPORT_C TInt RemoteMsg( CUIEngineContainer* aContainer,
|
|
103 |
const TDesC& /*aMessage*/ );
|
|
104 |
|
|
105 |
/**
|
|
106 |
* Forward reboot indication to ATS.
|
|
107 |
*/
|
|
108 |
IMPORT_C TInt GoingToReboot( CUIEngineContainer* aContainer,
|
|
109 |
TRequestStatus& aStatus );
|
|
110 |
|
|
111 |
/**
|
|
112 |
* Initialize logger from UI engine.
|
|
113 |
*/
|
|
114 |
void InitializeLogger( CStifLogger* aLogger ){ iLogger = aLogger; }
|
|
115 |
|
|
116 |
/**
|
|
117 |
* Remote ATS call
|
|
118 |
*/
|
|
119 |
TInt AtsRemote( CStifTFwIfProt& aReq, CStifTFwIfProt& aResp );
|
|
120 |
|
|
121 |
/**
|
|
122 |
* Remote ATS run call
|
|
123 |
*/
|
|
124 |
TInt AtsRemoteRun( CStifTFwIfProt& aReq, CStifTFwIfProt& aResp );
|
|
125 |
|
|
126 |
/**
|
|
127 |
* Remote ATS test control call
|
|
128 |
*/
|
|
129 |
TInt AtsRemoteTestCtl( CStifTFwIfProt& aReq, CStifTFwIfProt& aResp );
|
|
130 |
|
|
131 |
/**
|
|
132 |
* Remote ATS event system control call
|
|
133 |
*/
|
|
134 |
TInt AtsRemoteEventCtl( CStifTFwIfProt& aReq, CStifTFwIfProt& aResp );
|
|
135 |
|
|
136 |
/**
|
|
137 |
* Delete data in class
|
|
138 |
*/
|
|
139 |
void DeleteData();
|
|
140 |
|
|
141 |
/**
|
|
142 |
* Enumerates test cases from given module and finds test case index by title
|
|
143 |
*/
|
|
144 |
TInt GetCaseNumByTitle(TDesC& aModule, TDesC& aTestCaseFile, TDesC& aTitle, TInt& aCaseNum);
|
|
145 |
|
|
146 |
public: // Data
|
|
147 |
/**
|
|
148 |
* Logger created by UI engine.
|
|
149 |
*/
|
|
150 |
CStifLogger* iLogger;
|
|
151 |
|
|
152 |
protected: // Data
|
|
153 |
|
|
154 |
private: // Data
|
|
155 |
/**
|
|
156 |
* Pointer to UI engine.
|
|
157 |
*/
|
|
158 |
CUIEngine* iUIEngine;
|
|
159 |
|
|
160 |
/**
|
|
161 |
* Pointer to CStifTfwIf
|
|
162 |
*/
|
|
163 |
CStifTFwIf* iStifTFwIf;
|
|
164 |
|
|
165 |
// Execute test case table
|
|
166 |
RPointerArray<CUIEngineContainer> iTestExecutionTable;
|
|
167 |
|
|
168 |
// Remote execute test case table
|
|
169 |
RPointerArray<CUIEngineContainer> iTestRemoteExecutionTable;
|
|
170 |
|
|
171 |
// Remote execute test case table
|
|
172 |
RPointerArray<CUIEngineEvent> iEventArray;
|
|
173 |
|
|
174 |
// Array of master identifiers that have reserved the slave
|
|
175 |
RArray<TUint32> iMasterArray;
|
|
176 |
|
|
177 |
public: // Friend classes
|
|
178 |
// None
|
|
179 |
|
|
180 |
protected: // Friend classes
|
|
181 |
// None
|
|
182 |
|
|
183 |
private: // Friend classes
|
|
184 |
friend class CStifTFwIf;
|
|
185 |
|
|
186 |
};
|
|
187 |
|
|
188 |
#endif // STIF_TFW_H
|
|
189 |
|
|
190 |
// End of File
|