|
1 /* |
|
2 * Copyright (c) 2004 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: Class definition for CTestAppConsole |
|
15 ** |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __TESTAPPCONSOLE_H |
|
21 #define __TESTAPPCONSOLE_H |
|
22 |
|
23 #include <e32cons.h> |
|
24 #include "TestConsoleDef.h" |
|
25 #include "MmccInterface.h" |
|
26 #include "MmccCodecInformation.h" |
|
27 #include "MmccCodecInformationFactory.h" |
|
28 #include "MccDef.h" |
|
29 |
|
30 enum TTestConsoleMenu |
|
31 { |
|
32 EMainMenu, |
|
33 EDTMFTestMenu, |
|
34 ECodecTestMenu |
|
35 }; |
|
36 |
|
37 class TTimeIntervalMicroSeconds32; |
|
38 |
|
39 _LIT(KMainTitle," Mcc Console "); |
|
40 |
|
41 class CTestAppConsole : public CActive,public MMccCtrlObserver |
|
42 { |
|
43 public: |
|
44 static CTestAppConsole* NewL(); |
|
45 virtual ~CTestAppConsole(); |
|
46 |
|
47 void StartTesting(); |
|
48 void DisplayMsg(const TDesC& aMsg); |
|
49 |
|
50 private: |
|
51 CTestAppConsole( ); |
|
52 void ConstructL(); |
|
53 |
|
54 void RunL(); |
|
55 void DoCancel(); |
|
56 |
|
57 void ProcessMainInput(); |
|
58 |
|
59 // Command handler for DTMF test menu inputs |
|
60 void ProcessDTMFInput(); |
|
61 |
|
62 // Command handler for codec test menu inputs |
|
63 void ProcessCodecInput(); |
|
64 |
|
65 // create console menus |
|
66 void DisplayConsoleMenu(const TDesC& aInstructions); |
|
67 TKeyCode GetStringFromConsole(TDes& aAddr); |
|
68 TInt GetIntegerFromConsole( TInt& aVal ); |
|
69 TInt GetIntegerFromConsole( TUint& aVal ); |
|
70 |
|
71 void DoRead(); |
|
72 |
|
73 // Network settings |
|
74 void SetNetSettings(); |
|
75 |
|
76 //Test functions |
|
77 void RunTestCreateSession(); |
|
78 void RunTestCreateStreams(); |
|
79 void RunTest1c(); |
|
80 void RunTestPrepareStreams(); |
|
81 void RunTest2p(); |
|
82 void RunTestStartStream(); |
|
83 void RunTestPauseStreams(); |
|
84 void RunTestResumeStreams(); |
|
85 void RunTestStopStream(); |
|
86 void RunTestDeleteStreams(); |
|
87 void RunTestCloseSession(); |
|
88 void RunTest7(); |
|
89 void RunTestGetCodecAndAudioSettings(); |
|
90 void RunTestDisplaySupportedCodecs(); |
|
91 void RunSetCodecSettings(); |
|
92 void RunSetFmtpAttr(); |
|
93 void RunTestCodecFactory(); |
|
94 void ToggleVAD(); |
|
95 void ChangeCodec(); |
|
96 void SetCodec(); |
|
97 void SetRemoteAddr(); |
|
98 void ToggleInactivityTimer(); |
|
99 void SendNonRtcpData(); |
|
100 |
|
101 // From MMccCtrlObserver |
|
102 |
|
103 void MccEventReceived( const TMccEvent& aEvent ); |
|
104 |
|
105 void MccMediaStarted( TUint32 aSessionId, |
|
106 TUint32 aLinkId, |
|
107 TUint32 aStreamId, |
|
108 TUint32 aSinkSourceId ); |
|
109 |
|
110 void MccMediaStopped( TUint32 aSessionId, |
|
111 TUint32 aLinkId, |
|
112 TUint32 aStreamId, |
|
113 TUint32 aSinkSourceId ); |
|
114 |
|
115 void MccMediaPaused( TUint32 aSessionId, |
|
116 TUint32 aLinkId, |
|
117 TUint32 aStreamId, |
|
118 TUint32 aSinkSourceId ); |
|
119 |
|
120 void MccMediaResumed( TUint32 aSessionId, |
|
121 TUint32 aLinkId, |
|
122 TUint32 aStreamId, |
|
123 TUint32 aSinkSourceId ); |
|
124 |
|
125 void MccMediaPrepared( TUint32 aSessionId, |
|
126 TUint32 aLinkId, |
|
127 TUint32 aStreamId, |
|
128 TUint32 aSinkSourceId ); |
|
129 |
|
130 void MccMediaInactive( TUint32 aSessionId, |
|
131 TUint32 aLinkId, |
|
132 TUint32 aStreamId, |
|
133 TUint32 aSinkSourceId ); |
|
134 |
|
135 void MccMediaActive( TUint32 aSessionId, |
|
136 TUint32 aLinkId, |
|
137 TUint32 aStreamId, |
|
138 TUint32 aSinkSourceId ); |
|
139 |
|
140 void MccCtrlError( TInt aError ); |
|
141 |
|
142 void MccCtrlError( TInt aError, |
|
143 TUint32 aSessionId, |
|
144 TUint32 aLinkId, |
|
145 TUint32 aStreamId, |
|
146 TUint32 aSinkSourceId ); |
|
147 |
|
148 |
|
149 private: |
|
150 |
|
151 CConsoleBase* iConsole; |
|
152 |
|
153 HBufC* iInstruct; |
|
154 TUint32 iSessionId; |
|
155 TUint32 iDTMFSessionID; |
|
156 TUint32 iDtmfLinkID; |
|
157 TUint32 iUplinkId; |
|
158 TUint32 iDownlinkId; |
|
159 TUint32 iUpStreamId, iDownStreamId; |
|
160 TUint32 iDTMFStreamID; |
|
161 TBool iInactivityTimerActive; |
|
162 |
|
163 TMccNetSettings iNetSettings; |
|
164 TInt iIapId; |
|
165 TBool iNetSettingsDone; |
|
166 |
|
167 CMccInterface* iMccInterface; |
|
168 TInetAddr iRemoteAddr; |
|
169 |
|
170 RPointerArray< CMccCodecInformation > iCodecInformation; |
|
171 RPointerArray<CMccCodecInformation> iCodecArray; |
|
172 //RArray<CMccCodecInformation> iCodecArray; |
|
173 CMccCodecInformationFactory* infoFactory; |
|
174 |
|
175 TInt iCodecSelected; |
|
176 TTestConsoleMenu iCurMenu; |
|
177 TBool iDtmfMode; |
|
178 |
|
179 TBool iSdesReported; |
|
180 TBool iSrReported; |
|
181 TBool iRrReported; |
|
182 TInt iNumOfNonRtcpDataSent; |
|
183 }; |
|
184 |
|
185 |
|
186 #endif __TESTAPPCONSOLE_H |