|
1 /* |
|
2 * Copyright (c) 2002 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: Implementation of customization components |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include <Stiftestinterface.h> |
|
22 #include "ThemesTest.h" |
|
23 #include "TestDmCallback.h" |
|
24 //#include "TestDmDDFObject.h" |
|
25 //#include "FileCoderB64.h" |
|
26 #include "TestParams.h" |
|
27 |
|
28 |
|
29 // EXTERNAL DATA STRUCTURES |
|
30 //extern ?external_data; |
|
31 |
|
32 // EXTERNAL FUNCTION PROTOTYPES |
|
33 //extern ?external_function( ?arg_type,?arg_type ); |
|
34 |
|
35 // CONSTANTS |
|
36 //const ?type ?constant_var = ?constant; |
|
37 |
|
38 // MACROS |
|
39 //#define ?macro ?macro_def |
|
40 |
|
41 // LOCAL CONSTANTS AND MACROS |
|
42 //const ?type ?constant_var = ?constant; |
|
43 //#define ?macro_name ?macro_def |
|
44 |
|
45 // MODULE DATA STRUCTURES |
|
46 //enum ?declaration |
|
47 //typedef ?declaration |
|
48 |
|
49 // LOCAL FUNCTION PROTOTYPES |
|
50 //?type ?function_name( ?arg_type, ?arg_type ); |
|
51 |
|
52 // FORWARD DECLARATIONS |
|
53 //class ?FORWARD_CLASSNAME; |
|
54 |
|
55 // ============================= LOCAL FUNCTIONS =============================== |
|
56 |
|
57 // ----------------------------------------------------------------------------- |
|
58 // ?function_name ?description. |
|
59 // ?description |
|
60 // Returns: ?value_1: ?description |
|
61 // ?value_n: ?description_line1 |
|
62 // ?description_line2 |
|
63 // ----------------------------------------------------------------------------- |
|
64 // |
|
65 /* |
|
66 ?type ?function_name( |
|
67 ?arg_type arg, // ?description |
|
68 ?arg_type arg) // ?description |
|
69 { |
|
70 |
|
71 ?code // ?comment |
|
72 |
|
73 // ?comment |
|
74 ?code |
|
75 } |
|
76 */ |
|
77 |
|
78 // ============================ MEMBER FUNCTIONS =============================== |
|
79 |
|
80 // ----------------------------------------------------------------------------- |
|
81 // CThemesTest::CThemesTest |
|
82 // C++ default constructor can NOT contain any code, that |
|
83 // might leave. |
|
84 // ----------------------------------------------------------------------------- |
|
85 // |
|
86 CThemesTest::CThemesTest( |
|
87 CTestModuleIf& aTestModuleIf ): |
|
88 CScriptBase( aTestModuleIf ) |
|
89 , iCallback( 0 ) |
|
90 , iAdapter( 0 ) |
|
91 // , iParams( ) |
|
92 // , iDDFParams( ) |
|
93 |
|
94 { |
|
95 } |
|
96 |
|
97 // ----------------------------------------------------------------------------- |
|
98 // CThemesTest::ConstructL |
|
99 // Symbian 2nd phase constructor can leave. |
|
100 // ----------------------------------------------------------------------------- |
|
101 // |
|
102 void CThemesTest::ConstructL() |
|
103 { |
|
104 iLog = CStifLogger::NewL( KThemesTestLogPath, |
|
105 KThemesTestLogFile, |
|
106 CStifLogger::ETxt, |
|
107 CStifLogger::EFile, |
|
108 EFalse ); |
|
109 |
|
110 } |
|
111 |
|
112 // ----------------------------------------------------------------------------- |
|
113 // CThemesTest::NewL |
|
114 // Two-phased constructor. |
|
115 // ----------------------------------------------------------------------------- |
|
116 // |
|
117 CThemesTest* CThemesTest::NewL( |
|
118 CTestModuleIf& aTestModuleIf ) |
|
119 { |
|
120 CThemesTest* self = new (ELeave) CThemesTest( aTestModuleIf ); |
|
121 |
|
122 CleanupStack::PushL( self ); |
|
123 self->ConstructL(); |
|
124 CleanupStack::Pop(); |
|
125 |
|
126 return self; |
|
127 |
|
128 } |
|
129 |
|
130 // Destructor |
|
131 CThemesTest::~CThemesTest() |
|
132 { |
|
133 delete iAdapter; |
|
134 delete iCallback; |
|
135 |
|
136 REComSession::FinalClose(); |
|
137 |
|
138 iParams.ResetAndDestroy(); |
|
139 iDDFParams.ResetAndDestroy(); |
|
140 |
|
141 // Delete resources allocated from test methods |
|
142 Delete(); |
|
143 |
|
144 // Delete logger |
|
145 delete iLog; |
|
146 |
|
147 } |
|
148 |
|
149 /* |
|
150 void CThemesTest::AddParamsL( XTestParams* aParams ) |
|
151 { |
|
152 CleanupStack::PushL( aParams ); |
|
153 User::LeaveIfError( iParams.Append( aParams ) ); |
|
154 CleanupStack::Pop( aParams ); |
|
155 } |
|
156 |
|
157 TInt CThemesTest::CheckAllL( ) |
|
158 { |
|
159 TInt ret = KErrNone; |
|
160 |
|
161 for (TInt i = 0 ; i < iParams.Count() ; i++) |
|
162 { |
|
163 TInt result = iParams[i]->CheckL(); |
|
164 if (result != KErrNone && ret == KErrNone) |
|
165 { |
|
166 ret = result; |
|
167 } |
|
168 } |
|
169 |
|
170 return ret; |
|
171 } |
|
172 */ |
|
173 |
|
174 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
175 |
|
176 // ----------------------------------------------------------------------------- |
|
177 // LibEntryL is a polymorphic Dll entry point. |
|
178 // Returns: CScriptBase: New CScriptBase derived object |
|
179 // ----------------------------------------------------------------------------- |
|
180 // |
|
181 EXPORT_C CScriptBase* LibEntryL( |
|
182 CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework |
|
183 { |
|
184 |
|
185 return ( CScriptBase* ) CThemesTest::NewL( aTestModuleIf ); |
|
186 |
|
187 } |
|
188 |
|
189 |
|
190 |
|
191 // End of File |