|
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 "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: voip audio service - |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include <Stiftestinterface.h> |
|
22 #include "VoIPAudioServicesTestClass.h" |
|
23 |
|
24 // EXTERNAL DATA STRUCTURES |
|
25 //extern ?external_data; |
|
26 |
|
27 // EXTERNAL FUNCTION PROTOTYPES |
|
28 //extern ?external_function( ?arg_type,?arg_type ); |
|
29 |
|
30 // CONSTANTS |
|
31 //const ?type ?constant_var = ?constant; |
|
32 |
|
33 // MACROS |
|
34 //#define ?macro ?macro_def |
|
35 |
|
36 // LOCAL CONSTANTS AND MACROS |
|
37 //const ?type ?constant_var = ?constant; |
|
38 //#define ?macro_name ?macro_def |
|
39 |
|
40 // MODULE DATA STRUCTURES |
|
41 //enum ?declaration |
|
42 //typedef ?declaration |
|
43 |
|
44 // LOCAL FUNCTION PROTOTYPES |
|
45 //?type ?function_name( ?arg_type, ?arg_type ); |
|
46 |
|
47 // FORWARD DECLARATIONS |
|
48 //class ?FORWARD_CLASSNAME; |
|
49 |
|
50 // ============================= LOCAL FUNCTIONS =============================== |
|
51 |
|
52 // ----------------------------------------------------------------------------- |
|
53 // ?function_name ?description. |
|
54 // ?description |
|
55 // Returns: ?value_1: ?description |
|
56 // ?value_n: ?description_line1 |
|
57 // ?description_line2 |
|
58 // ----------------------------------------------------------------------------- |
|
59 // |
|
60 /* |
|
61 ?type ?function_name( |
|
62 ?arg_type arg, // ?description |
|
63 ?arg_type arg) // ?description |
|
64 { |
|
65 |
|
66 ?code // ?comment |
|
67 |
|
68 // ?comment |
|
69 ?code |
|
70 } |
|
71 */ |
|
72 |
|
73 // ============================ MEMBER FUNCTIONS =============================== |
|
74 |
|
75 // ----------------------------------------------------------------------------- |
|
76 // CVoIPAudioServicesTestClass::CVoIPAudioServicesTestClass |
|
77 // C++ default constructor can NOT contain any code, that |
|
78 // might leave. |
|
79 // ----------------------------------------------------------------------------- |
|
80 // |
|
81 CVoIPAudioServicesTestClass::CVoIPAudioServicesTestClass( |
|
82 CTestModuleIf& aTestModuleIf ): |
|
83 CScriptBase( aTestModuleIf ), |
|
84 iTestModuleIf(aTestModuleIf), |
|
85 iPlayBufPtr(0,0,0), |
|
86 iRecBufPtr(0,0,0) |
|
87 { |
|
88 iDnLinkCodec = ENULL; |
|
89 iUpLinkCodec = ENULL; |
|
90 iDnLinkStatus = ENotReady; |
|
91 iUpLinkStatus = ENotReady; |
|
92 loopbackCount = 1; |
|
93 #ifdef __JITTER_BUFFER_TEST__ |
|
94 iSeqNum = 0; |
|
95 #endif //__JITTER_BUFFER_TEST__ |
|
96 } |
|
97 |
|
98 // ----------------------------------------------------------------------------- |
|
99 // CVoIPAudioServicesTestClass::ConstructL |
|
100 // Symbian 2nd phase constructor can leave. |
|
101 // ----------------------------------------------------------------------------- |
|
102 // |
|
103 void CVoIPAudioServicesTestClass::ConstructL() |
|
104 { |
|
105 iLog = CStifLogger::NewL(KVoIPAudioServicesTestClassLogPath, |
|
106 KVoIPAudioServicesTestClassLogFile, |
|
107 CStifLogger::ETxt, |
|
108 CStifLogger::EFile, |
|
109 EFalse ); |
|
110 |
|
111 iTimeoutController = CSimpleTimeout::NewL (this, iLog); |
|
112 } |
|
113 |
|
114 // ----------------------------------------------------------------------------- |
|
115 // CVoIPAudioServicesTestClass::NewL |
|
116 // Two-phased constructor. |
|
117 // ----------------------------------------------------------------------------- |
|
118 // |
|
119 CVoIPAudioServicesTestClass* CVoIPAudioServicesTestClass::NewL( |
|
120 CTestModuleIf& aTestModuleIf ) |
|
121 { |
|
122 CVoIPAudioServicesTestClass* self = new (ELeave) CVoIPAudioServicesTestClass( aTestModuleIf ); |
|
123 |
|
124 CleanupStack::PushL( self ); |
|
125 self->ConstructL(); |
|
126 CleanupStack::Pop(); |
|
127 |
|
128 return self; |
|
129 |
|
130 } |
|
131 |
|
132 // Destructor |
|
133 CVoIPAudioServicesTestClass::~CVoIPAudioServicesTestClass() |
|
134 { |
|
135 |
|
136 // Delete resources allocated from test methods |
|
137 Delete(); |
|
138 |
|
139 // Delete logger |
|
140 delete iLog; |
|
141 delete iTimeoutController; |
|
142 } |
|
143 |
|
144 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
145 |
|
146 // ----------------------------------------------------------------------------- |
|
147 // LibEntryL is a polymorphic Dll entry point. |
|
148 // Returns: CScriptBase: New CScriptBase derived object |
|
149 // ----------------------------------------------------------------------------- |
|
150 // |
|
151 EXPORT_C CScriptBase* LibEntryL( |
|
152 CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework |
|
153 { |
|
154 |
|
155 return ( CScriptBase* ) CVoIPAudioServicesTestClass::NewL( aTestModuleIf ); |
|
156 |
|
157 } |
|
158 |
|
159 |
|
160 // End of File |