author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 24 Nov 2009 08:56:33 +0200 | |
changeset 33 | 50974a8b132e |
parent 19 | 989d2f495d90 |
permissions | -rw-r--r-- |
19 | 1 |
/* |
2 |
* Copyright (c) 2002 - 2007 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 the License "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 |
// INCLUDE FILES |
|
33
50974a8b132e
Revision: 200945
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
22 |
#include <StifTestInterface.h> |
19 | 23 |
#include "tcal_getlist.h" |
24 |
//#include <SettingServerClient.h> |
|
25 |
||
26 |
// EXTERNAL DATA STRUCTURES |
|
27 |
//extern ?external_data; |
|
28 |
||
29 |
// EXTERNAL FUNCTION PROTOTYPES |
|
30 |
//extern ?external_function( ?arg_type,?arg_type ); |
|
31 |
||
32 |
// CONSTANTS |
|
33 |
//const ?type ?constant_var = ?constant; |
|
34 |
||
35 |
// MACROS |
|
36 |
//#define ?macro ?macro_def |
|
37 |
||
38 |
// LOCAL CONSTANTS AND MACROS |
|
39 |
//const ?type ?constant_var = ?constant; |
|
40 |
//#define ?macro_name ?macro_def |
|
41 |
||
42 |
// MODULE DATA STRUCTURES |
|
43 |
//enum ?declaration |
|
44 |
//typedef ?declaration |
|
45 |
||
46 |
// LOCAL FUNCTION PROTOTYPES |
|
47 |
//?type ?function_name( ?arg_type, ?arg_type ); |
|
48 |
||
49 |
// FORWARD DECLARATIONS |
|
50 |
//class ?FORWARD_CLASSNAME; |
|
51 |
||
52 |
// ============================= LOCAL FUNCTIONS =============================== |
|
53 |
||
54 |
// ----------------------------------------------------------------------------- |
|
55 |
// ?function_name ?description. |
|
56 |
// ?description |
|
57 |
// Returns: ?value_1: ?description |
|
58 |
// ?value_n: ?description_line1 |
|
59 |
// ?description_line2 |
|
60 |
// ----------------------------------------------------------------------------- |
|
61 |
// |
|
62 |
/* |
|
63 |
?type ?function_name( |
|
64 |
?arg_type arg, // ?description |
|
65 |
?arg_type arg) // ?description |
|
66 |
{ |
|
67 |
||
68 |
?code // ?comment |
|
69 |
||
70 |
// ?comment |
|
71 |
?code |
|
72 |
} |
|
73 |
*/ |
|
74 |
||
75 |
// ============================ MEMBER FUNCTIONS =============================== |
|
76 |
||
77 |
// ----------------------------------------------------------------------------- |
|
78 |
// Ctcal_getlist::Ctcal_getlist |
|
79 |
// C++ default constructor can NOT contain any code, that |
|
80 |
// might leave. |
|
81 |
// ----------------------------------------------------------------------------- |
|
82 |
// |
|
83 |
Ctcal_getlist::Ctcal_getlist( |
|
84 |
CTestModuleIf& aTestModuleIf ): |
|
85 |
CScriptBase( aTestModuleIf ) |
|
86 |
{ |
|
87 |
} |
|
88 |
||
89 |
// ----------------------------------------------------------------------------- |
|
90 |
// Ctcal_getlist::ConstructL |
|
91 |
// Symbian 2nd phase constructor can leave. |
|
92 |
// ----------------------------------------------------------------------------- |
|
93 |
// |
|
94 |
void Ctcal_getlist::ConstructL() |
|
95 |
{ |
|
96 |
//Read logger settings to check whether test case name is to be |
|
97 |
//appended to log file name. |
|
98 |
/* RSettingServer settingServer; |
|
99 |
TInt ret = settingServer.Connect(); |
|
100 |
if(ret != KErrNone) |
|
101 |
{ |
|
102 |
User::Leave(ret); |
|
103 |
} |
|
104 |
// Struct to StifLogger settigs. |
|
105 |
TLoggerSettings loggerSettings; |
|
106 |
// Parse StifLogger defaults from STIF initialization file. |
|
107 |
ret = settingServer.GetLoggerSettings(loggerSettings); |
|
108 |
if(ret != KErrNone) |
|
109 |
{ |
|
110 |
User::Leave(ret); |
|
111 |
} |
|
112 |
// Close Setting server session |
|
113 |
settingServer.Close(); |
|
114 |
||
115 |
TFileName logFileName; |
|
116 |
||
117 |
if(loggerSettings.iAddTestCaseTitle) |
|
118 |
{ |
|
119 |
TName title; |
|
120 |
TestModuleIf().GetTestCaseTitleL(title); |
|
121 |
logFileName.Format(Ktcal_getlistLogFileWithTitle, &title); |
|
122 |
} |
|
123 |
else |
|
124 |
{ |
|
125 |
logFileName.Copy(Ktcal_getlistLogFile); |
|
126 |
}*/ |
|
127 |
} |
|
128 |
||
129 |
// ----------------------------------------------------------------------------- |
|
130 |
// Ctcal_getlist::NewL |
|
131 |
// Two-phased constructor. |
|
132 |
// ----------------------------------------------------------------------------- |
|
133 |
// |
|
134 |
Ctcal_getlist* Ctcal_getlist::NewL( |
|
135 |
CTestModuleIf& aTestModuleIf ) |
|
136 |
{ |
|
137 |
Ctcal_getlist* self = new (ELeave) Ctcal_getlist( aTestModuleIf ); |
|
138 |
||
139 |
CleanupStack::PushL( self ); |
|
140 |
self->ConstructL(); |
|
141 |
CleanupStack::Pop(); |
|
142 |
||
143 |
return self; |
|
144 |
||
145 |
} |
|
146 |
||
147 |
// Destructor |
|
148 |
Ctcal_getlist::~Ctcal_getlist() |
|
149 |
{ |
|
150 |
||
151 |
// Delete resources allocated from test methods |
|
152 |
Delete(); |
|
153 |
||
154 |
} |
|
155 |
||
156 |
// ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
157 |
||
158 |
// ----------------------------------------------------------------------------- |
|
159 |
// LibEntryL is a polymorphic Dll entry point. |
|
160 |
// Returns: CScriptBase: New CScriptBase derived object |
|
161 |
// ----------------------------------------------------------------------------- |
|
162 |
// |
|
163 |
EXPORT_C CScriptBase* LibEntryL( |
|
164 |
CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework |
|
165 |
{ |
|
166 |
||
167 |
return ( CScriptBase* ) Ctcal_getlist::NewL( aTestModuleIf ); |
|
168 |
||
169 |
} |
|
170 |
||
171 |
||
172 |
// End of File |