|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. |
|
3 * |
|
4 * This library is free software; you can redistribute it and/or |
|
5 * modify it under the terms of the GNU Lesser General Public |
|
6 * License as published by the Free Software Foundation; either |
|
7 * version 2 of the License, or (at your option) any later version. |
|
8 * |
|
9 * This library is distributed in the hope that it will be useful, |
|
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
12 * Lesser General Public License for more details. |
|
13 * |
|
14 * You should have received a copy of the GNU Lesser General Public |
|
15 * License along with this library; if not, write to the |
|
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
|
17 * Boston, MA 02111-1307, USA. |
|
18 * |
|
19 * Description: |
|
20 * |
|
21 */ |
|
22 |
|
23 |
|
24 |
|
25 // INCLUDE FILES |
|
26 #include <StifTestInterface.h> |
|
27 //#include "GStreamerTestClass.h" |
|
28 #include "GStreamerTestClass.h" |
|
29 |
|
30 // EXTERNAL DATA STRUCTURES |
|
31 //extern ?external_data; |
|
32 |
|
33 // EXTERNAL FUNCTION PROTOTYPES |
|
34 //extern ?external_function( ?arg_type,?arg_type ); |
|
35 |
|
36 // CONSTANTS |
|
37 //const ?type ?constant_var = ?constant; |
|
38 |
|
39 // MACROS |
|
40 //#define ?macro ?macro_def |
|
41 |
|
42 // LOCAL CONSTANTS AND MACROS |
|
43 //const ?type ?constant_var = ?constant; |
|
44 //#define ?macro_name ?macro_def |
|
45 |
|
46 // MODULE DATA STRUCTURES |
|
47 //enum ?declaration |
|
48 //typedef ?declaration |
|
49 |
|
50 // LOCAL FUNCTION PROTOTYPES |
|
51 //?type ?function_name( ?arg_type, ?arg_type ); |
|
52 |
|
53 // FORWARD DECLARATIONS |
|
54 //class ?FORWARD_CLASSNAME; |
|
55 |
|
56 // ============================= LOCAL FUNCTIONS =============================== |
|
57 |
|
58 // ----------------------------------------------------------------------------- |
|
59 // ?function_name ?description. |
|
60 // ?description |
|
61 // Returns: ?value_1: ?description |
|
62 // ?value_n: ?description_line1 |
|
63 // ?description_line2 |
|
64 // ----------------------------------------------------------------------------- |
|
65 // |
|
66 /* |
|
67 ?type ?function_name( |
|
68 ?arg_type arg, // ?description |
|
69 ?arg_type arg) // ?description |
|
70 { |
|
71 |
|
72 ?code // ?comment |
|
73 |
|
74 // ?comment |
|
75 ?code |
|
76 } |
|
77 */ |
|
78 |
|
79 // ============================ MEMBER FUNCTIONS =============================== |
|
80 |
|
81 // ----------------------------------------------------------------------------- |
|
82 // CGStreamerTestClass::CGStreamerTestClass |
|
83 // C++ default constructor can NOT contain any code, that |
|
84 // might leave. |
|
85 // ----------------------------------------------------------------------------- |
|
86 // |
|
87 CGStreamerTestClass::CGStreamerTestClass( |
|
88 CTestModuleIf& aTestModuleIf ): |
|
89 CScriptBase( aTestModuleIf ), |
|
90 iTestModuleIf(aTestModuleIf) |
|
91 { |
|
92 //myClassPtr = this; |
|
93 } |
|
94 |
|
95 // ----------------------------------------------------------------------------- |
|
96 // CGStreamerTestClass::ConstructL |
|
97 // Symbian 2nd phase constructor can leave. |
|
98 // ----------------------------------------------------------------------------- |
|
99 // |
|
100 void CGStreamerTestClass::ConstructL() |
|
101 { |
|
102 iLog = CStifLogger::NewL( KGStreamerTestClassLogPath, |
|
103 KGStreamerTestClassLogFile, |
|
104 CStifLogger::ETxt, |
|
105 CStifLogger::EFile, |
|
106 EFalse ); |
|
107 |
|
108 iTimeoutController = CSimpleTimeout::NewL (this, iLog); |
|
109 iLog->Log(_L(">>CGStreamerTestClass::ConstructL ")); |
|
110 |
|
111 } |
|
112 |
|
113 // ----------------------------------------------------------------------------- |
|
114 // CGStreamerTestClass::NewL |
|
115 // Two-phased constructor. |
|
116 // ----------------------------------------------------------------------------- |
|
117 // |
|
118 CGStreamerTestClass* CGStreamerTestClass::NewL( |
|
119 CTestModuleIf& aTestModuleIf ) |
|
120 { |
|
121 CGStreamerTestClass* self = new (ELeave) CGStreamerTestClass( aTestModuleIf ); |
|
122 |
|
123 CleanupStack::PushL( self ); |
|
124 self->ConstructL(); |
|
125 CleanupStack::Pop(); |
|
126 |
|
127 return self; |
|
128 |
|
129 } |
|
130 |
|
131 // Destructor |
|
132 CGStreamerTestClass::~CGStreamerTestClass() |
|
133 { |
|
134 |
|
135 // Delete resources allocated from test methods |
|
136 Delete(); |
|
137 iLog->Log(_L(">>CGStreamerTestClass::~CGStreamerTestClass ")); |
|
138 // Delete logger |
|
139 delete iLog; |
|
140 delete iTimeoutController; |
|
141 } |
|
142 |
|
143 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
144 |
|
145 // ----------------------------------------------------------------------------- |
|
146 // LibEntryL is a polymorphic Dll entry point. |
|
147 // Returns: CScriptBase: New CScriptBase derived object |
|
148 // ----------------------------------------------------------------------------- |
|
149 // |
|
150 EXPORT_C CScriptBase* LibEntryL( |
|
151 CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework |
|
152 { |
|
153 |
|
154 return ( CScriptBase* ) CGStreamerTestClass::NewL( aTestModuleIf ); |
|
155 |
|
156 } |
|
157 |
|
158 // ----------------------------------------------------------------------------- |
|
159 // E32Dll is a DLL entry point function. |
|
160 // Returns: KErrNone |
|
161 // ----------------------------------------------------------------------------- |
|
162 // |
|
163 #ifndef EKA2 // Hide Dll entry point to EKA2 |
|
164 GLDEF_C TInt E32Dll( |
|
165 TDllReason /*aReason*/) // Reason code |
|
166 { |
|
167 return(KErrNone); |
|
168 |
|
169 } |
|
170 #endif // EKA2 |
|
171 |
|
172 // End of File |