|
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 "Tcomplugin.h" |
|
24 |
|
25 // EXTERNAL DATA STRUCTURES |
|
26 //extern ?external_data; |
|
27 |
|
28 // EXTERNAL FUNCTION PROTOTYPES |
|
29 //extern ?external_function( ?arg_type,?arg_type ); |
|
30 |
|
31 // CONSTANTS |
|
32 //const ?type ?constant_var = ?constant; |
|
33 |
|
34 // MACROS |
|
35 //#define ?macro ?macro_def |
|
36 |
|
37 // LOCAL CONSTANTS AND MACROS |
|
38 //const ?type ?constant_var = ?constant; |
|
39 //#define ?macro_name ?macro_def |
|
40 |
|
41 // MODULE DATA STRUCTURES |
|
42 //enum ?declaration |
|
43 //typedef ?declaration |
|
44 |
|
45 // LOCAL FUNCTION PROTOTYPES |
|
46 //?type ?function_name( ?arg_type, ?arg_type ); |
|
47 |
|
48 |
|
49 // ----------------------------------------------------------------------------- |
|
50 // CTestProvider::CTestProvider |
|
51 // C++ default constructor can NOT contain any code, that |
|
52 // might leave. |
|
53 // ----------------------------------------------------------------------------- |
|
54 // |
|
55 CTestProvider::CTestProvider( |
|
56 CTestModuleIf& aTestModuleIf ): |
|
57 CScriptBase( aTestModuleIf ) |
|
58 { |
|
59 } |
|
60 |
|
61 // ----------------------------------------------------------------------------- |
|
62 // CTestProvider::ConstructL |
|
63 // Symbian 2nd phase constructor can leave. |
|
64 // ----------------------------------------------------------------------------- |
|
65 // |
|
66 void CTestProvider::ConstructL() |
|
67 { |
|
68 iLog = CStifLogger::NewL( KTcompluginLogPath, |
|
69 KTcompluginLogFile, |
|
70 CStifLogger::ETxt, |
|
71 CStifLogger::EFile, |
|
72 EFalse ); |
|
73 |
|
74 } |
|
75 |
|
76 // ----------------------------------------------------------------------------- |
|
77 // CTestProvider::NewL |
|
78 // Two-phased constructor. |
|
79 // ----------------------------------------------------------------------------- |
|
80 // |
|
81 CTestProvider* CTestProvider::NewL( |
|
82 CTestModuleIf& aTestModuleIf ) |
|
83 { |
|
84 CTestProvider* self = new (ELeave) CTestProvider( aTestModuleIf ); |
|
85 |
|
86 CleanupStack::PushL( self ); |
|
87 self->ConstructL(); |
|
88 CleanupStack::Pop(); |
|
89 |
|
90 return self; |
|
91 |
|
92 } |
|
93 |
|
94 // Destructor |
|
95 CTestProvider::~CTestProvider() |
|
96 { |
|
97 |
|
98 // Delete resources allocated from test methods |
|
99 Delete(); |
|
100 |
|
101 // Delete logger |
|
102 delete iLog; |
|
103 |
|
104 } |
|
105 |
|
106 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
107 |
|
108 // ----------------------------------------------------------------------------- |
|
109 // LibEntryL is a polymorphic Dll entry point. |
|
110 // Returns: CScriptBase: New CScriptBase derived object |
|
111 // ----------------------------------------------------------------------------- |
|
112 // |
|
113 EXPORT_C CScriptBase* LibEntryL( |
|
114 CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework |
|
115 { |
|
116 |
|
117 return ( CScriptBase* ) CTestProvider::NewL( aTestModuleIf ); |
|
118 |
|
119 } |
|
120 |
|
121 // ----------------------------------------------------------------------------- |
|
122 // E32Dll is a DLL entry point function. |
|
123 // Returns: KErrNone |
|
124 // ----------------------------------------------------------------------------- |
|
125 // |
|
126 #ifndef EKA2 // Hide Dll entry point to EKA2 |
|
127 GLDEF_C TInt E32Dll( |
|
128 TDllReason /*aReason*/) // Reason code |
|
129 { |
|
130 return(KErrNone); |
|
131 |
|
132 } |
|
133 #endif // EKA2 |
|
134 |
|
135 // End of File |