1 /* |
1 /* |
2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8 * |
8 * |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: voip audio service - |
14 * Description: voip audio service - |
15 * |
15 * |
16 */ |
16 */ |
17 |
|
18 |
|
19 |
17 |
20 // INCLUDE FILES |
18 // INCLUDE FILES |
21 #include <Stiftestinterface.h> |
19 #include <Stiftestinterface.h> |
22 #include "VoIPAudioServicesTestClass.h" |
20 #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 |
21 |
75 // ----------------------------------------------------------------------------- |
22 // ----------------------------------------------------------------------------- |
76 // CVoIPAudioServicesTestClass::CVoIPAudioServicesTestClass |
23 // CVoIPAudioServicesTestClass::CVoIPAudioServicesTestClass |
77 // C++ default constructor can NOT contain any code, that |
24 // C++ default constructor can NOT contain any code, that |
78 // might leave. |
25 // might leave. |
79 // ----------------------------------------------------------------------------- |
26 // ----------------------------------------------------------------------------- |
80 // |
27 // |
81 CVoIPAudioServicesTestClass::CVoIPAudioServicesTestClass( |
28 CVoIPAudioServicesTestClass::CVoIPAudioServicesTestClass( |
82 CTestModuleIf& aTestModuleIf ): |
29 CTestModuleIf& aTestModuleIf) : |
83 CScriptBase( aTestModuleIf ), |
30 CScriptBase(aTestModuleIf), |
84 iTestModuleIf(aTestModuleIf), |
31 iTestModuleIf(aTestModuleIf), |
85 iPlayBufPtr(0,0,0), |
32 iPlayBufPtr(0, 0, 0), |
86 iRecBufPtr(0,0,0) |
33 iRecBufPtr(0, 0, 0) |
87 { |
34 { |
88 iDnLinkCodec = ENULL; |
35 iDnLinkCodec = ENULL; |
89 iUpLinkCodec = ENULL; |
36 iUpLinkCodec = ENULL; |
90 iDnLinkStatus = ENotReady; |
37 iDnLinkStatus = ENotReady; |
91 iUpLinkStatus = ENotReady; |
38 iUpLinkStatus = ENotReady; |
92 loopbackCount = 1; |
39 iSeqNum = 0; |
93 #ifdef __JITTER_BUFFER_TEST__ |
40 } |
94 iSeqNum = 0; |
|
95 #endif //__JITTER_BUFFER_TEST__ |
|
96 } |
|
97 |
41 |
98 // ----------------------------------------------------------------------------- |
42 // ----------------------------------------------------------------------------- |
99 // CVoIPAudioServicesTestClass::ConstructL |
43 // CVoIPAudioServicesTestClass::ConstructL |
100 // Symbian 2nd phase constructor can leave. |
44 // Symbian 2nd phase constructor can leave. |
101 // ----------------------------------------------------------------------------- |
45 // ----------------------------------------------------------------------------- |
102 // |
46 // |
103 void CVoIPAudioServicesTestClass::ConstructL() |
47 void CVoIPAudioServicesTestClass::ConstructL() |
104 { |
48 { |
105 iLog = CStifLogger::NewL(KVoIPAudioServicesTestClassLogPath, |
49 iLog = CStifLogger::NewL(KVoIPAudioServicesTestClassLogPath, |
106 KVoIPAudioServicesTestClassLogFile, |
50 KVoIPAudioServicesTestClassLogFile, CStifLogger::ETxt, |
107 CStifLogger::ETxt, |
51 CStifLogger::EFile, EFalse); |
108 CStifLogger::EFile, |
|
109 EFalse ); |
|
110 |
52 |
111 iTimeoutController = CSimpleTimeout::NewL (this, iLog); |
53 iTimeoutController = CSimpleTimeout::NewL(this, iLog); |
112 } |
54 } |
113 |
55 |
114 // ----------------------------------------------------------------------------- |
56 // ----------------------------------------------------------------------------- |
115 // CVoIPAudioServicesTestClass::NewL |
57 // CVoIPAudioServicesTestClass::NewL |
116 // Two-phased constructor. |
58 // Two-phased constructor. |
117 // ----------------------------------------------------------------------------- |
59 // ----------------------------------------------------------------------------- |
118 // |
60 // |
119 CVoIPAudioServicesTestClass* CVoIPAudioServicesTestClass::NewL( |
61 CVoIPAudioServicesTestClass* CVoIPAudioServicesTestClass::NewL( |
120 CTestModuleIf& aTestModuleIf ) |
62 CTestModuleIf& aTestModuleIf) |
121 { |
63 { |
122 CVoIPAudioServicesTestClass* self = new (ELeave) CVoIPAudioServicesTestClass( aTestModuleIf ); |
64 CVoIPAudioServicesTestClass* self = |
|
65 new (ELeave) CVoIPAudioServicesTestClass(aTestModuleIf); |
123 |
66 |
124 CleanupStack::PushL( self ); |
67 CleanupStack::PushL(self); |
125 self->ConstructL(); |
68 self->ConstructL(); |
126 CleanupStack::Pop(); |
69 CleanupStack::Pop(); |
127 |
|
128 return self; |
70 return self; |
129 |
71 } |
130 } |
|
131 |
72 |
132 // Destructor |
73 // Destructor |
133 CVoIPAudioServicesTestClass::~CVoIPAudioServicesTestClass() |
74 CVoIPAudioServicesTestClass::~CVoIPAudioServicesTestClass() |
134 { |
75 { |
135 |
|
136 // Delete resources allocated from test methods |
76 // Delete resources allocated from test methods |
137 Delete(); |
77 Delete(); |
138 |
78 |
139 // Delete logger |
79 // Delete logger |
140 delete iLog; |
80 delete iLog; |
141 delete iTimeoutController; |
81 delete iTimeoutController; |
142 } |
82 } |
143 |
|
144 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
145 |
83 |
146 // ----------------------------------------------------------------------------- |
84 // ----------------------------------------------------------------------------- |
147 // LibEntryL is a polymorphic Dll entry point. |
85 // LibEntryL is a polymorphic Dll entry point. |
|
86 // Backpointer to STIF Test Framework |
148 // Returns: CScriptBase: New CScriptBase derived object |
87 // Returns: CScriptBase: New CScriptBase derived object |
149 // ----------------------------------------------------------------------------- |
88 // ----------------------------------------------------------------------------- |
150 // |
89 // |
151 EXPORT_C CScriptBase* LibEntryL( |
90 EXPORT_C CScriptBase* LibEntryL(CTestModuleIf& aTestModuleIf) |
152 CTestModuleIf& aTestModuleIf ) // Backpointer to STIF Test Framework |
91 { |
153 { |
92 return (CScriptBase*) CVoIPAudioServicesTestClass::NewL(aTestModuleIf); |
|
93 } |
154 |
94 |
155 return ( CScriptBase* ) CVoIPAudioServicesTestClass::NewL( aTestModuleIf ); |
|
156 |
|
157 } |
|
158 |
|
159 |
|
160 // End of File |
|