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