|
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 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 |
|
22 #include <Stiftestinterface.h> |
|
23 #include "SAPILocTest.h" |
|
24 //#include <SAPI_TEST\testprg.h> |
|
25 #include "locationservice.h" |
|
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 // CSAPILocTest::CSAPILocTest |
|
79 // C++ default constructor can NOT contain any code, that |
|
80 // might leave. |
|
81 // ----------------------------------------------------------------------------- |
|
82 // |
|
83 CSAPILocTest::CSAPILocTest( |
|
84 CTestModuleIf& aTestModuleIf ): |
|
85 CScriptBase( aTestModuleIf ) |
|
86 { |
|
87 } |
|
88 |
|
89 // ----------------------------------------------------------------------------- |
|
90 // CSAPILocTest::ConstructL |
|
91 // Symbian 2nd phase constructor can leave. |
|
92 // ----------------------------------------------------------------------------- |
|
93 // |
|
94 void CSAPILocTest::ConstructL() |
|
95 { |
|
96 iLog = CStifLogger::NewL( KSAPILocTestLogPath, |
|
97 KSAPILocTestLogFile, |
|
98 CStifLogger::ETxt, |
|
99 CStifLogger::EFile, |
|
100 EFalse ); |
|
101 |
|
102 } |
|
103 |
|
104 // ----------------------------------------------------------------------------- |
|
105 // CSAPILocTest::NewL |
|
106 // Two-phased constructor. |
|
107 // ----------------------------------------------------------------------------- |
|
108 // |
|
109 CSAPILocTest* CSAPILocTest::NewL( |
|
110 CTestModuleIf& aTestModuleIf ) |
|
111 { |
|
112 CSAPILocTest* self = new (ELeave) CSAPILocTest( aTestModuleIf ); |
|
113 |
|
114 CleanupStack::PushL( self ); |
|
115 self->ConstructL(); |
|
116 CleanupStack::Pop(); |
|
117 |
|
118 return self; |
|
119 |
|
120 } |
|
121 |
|
122 // Destructor |
|
123 CSAPILocTest::~CSAPILocTest() |
|
124 { |
|
125 |
|
126 // Delete resources allocated from test methods |
|
127 Delete(); |
|
128 |
|
129 // Delete logger |
|
130 delete iLog; |
|
131 |
|
132 } |
|
133 |
|
134 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
135 |
|
136 // ----------------------------------------------------------------------------- |
|
137 // LibEntryL is a polymorphic Dll entry point. |
|
138 // Returns: CScriptBase: New CScriptBase derived object |
|
139 // ----------------------------------------------------------------------------- |
|
140 // |
|
141 EXPORT_C CScriptBase* LibEntryL( |
|
142 CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework |
|
143 { |
|
144 |
|
145 return ( CScriptBase* ) CSAPILocTest::NewL( aTestModuleIf ); |
|
146 |
|
147 } |
|
148 |
|
149 // ----------------------------------------------------------------------------- |
|
150 // E32Dll is a DLL entry point function. |
|
151 // Returns: KErrNone |
|
152 // ----------------------------------------------------------------------------- |
|
153 // |
|
154 #ifndef EKA2 // Hide Dll entry point to EKA2 |
|
155 GLDEF_C TInt E32Dll( |
|
156 TDllReason /*aReason*/) // Reason code |
|
157 { |
|
158 return(KErrNone); |
|
159 |
|
160 } |
|
161 #endif // EKA2 |
|
162 |
|
163 |
|
164 // End of File |