|
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 <mmf/common/mmfcontrollerframework.h> |
|
25 |
|
26 #include "TestConsole.hrh" |
|
27 #include "TestConsoleDef.h" |
|
28 #include "rtpapi.h" |
|
29 #include "rtpdef.h" |
|
30 #include "mccdef.h" |
|
31 #include "mccinternaldef.h" |
|
32 |
|
33 class TTimeIntervalMicroSeconds32; |
|
34 class MDataSource; |
|
35 class MDataSink; |
|
36 class CMccRtpManager; |
|
37 |
|
38 class CTestAppConsole : public CActive, public MAsyncEventHandler, public MMccEventHandler |
|
39 { |
|
40 public: |
|
41 static CTestAppConsole* NewL(); |
|
42 virtual ~CTestAppConsole(); |
|
43 |
|
44 void StartTesting(); |
|
45 void DisplayMsg(const TDesC& aMsg); |
|
46 |
|
47 public: // From MAsyncEventHandler |
|
48 |
|
49 TInt SendEventToClient(const TMMFEvent& aEvent); |
|
50 |
|
51 public: // From MMccEventHandler |
|
52 |
|
53 virtual TInt SendMccEventToClient( TMccEvent& aEvent ); |
|
54 virtual void ErrorOccured( TInt aError, |
|
55 TUint32 aSessionId, |
|
56 TUint32 aLinkId, |
|
57 TUint32 aStreamId, |
|
58 TUint32 aEndpointId ); |
|
59 virtual void StateChange( TInt aState, TUint32 aLink ); |
|
60 |
|
61 private: |
|
62 CTestAppConsole( ); |
|
63 void ConstructL(); |
|
64 |
|
65 void RunL(); |
|
66 void DoCancel(); |
|
67 |
|
68 void ProcessMainInput(); |
|
69 |
|
70 // create console menus |
|
71 void DisplayConsoleMenu(const TDesC& aInstructions); |
|
72 TKeyCode GetStringFromConsole(TDes& aAddr); |
|
73 |
|
74 void DoRead(); |
|
75 |
|
76 //Test functions |
|
77 void RunTest1(); |
|
78 void RunTest2(); |
|
79 void RunTest3(); |
|
80 void RunTest4(); |
|
81 |
|
82 void ConstructUlSinkSource(); |
|
83 void ConstructDlSinkSource(); |
|
84 void DestructSinksSources(); |
|
85 void SetUpRtpStack(); |
|
86 |
|
87 private: |
|
88 CConsoleBase* iConsole; |
|
89 HBufC* iInstruct; |
|
90 |
|
91 TBool iKeepgoingUL; |
|
92 TBool iKeepgoingDL; |
|
93 |
|
94 TInt iUlError; |
|
95 TInt iDlError; |
|
96 |
|
97 MDataSink* iUlsink; |
|
98 MDataSink* iDlsink; |
|
99 MDataSource* iUlsource; |
|
100 MDataSource* iDlsource; |
|
101 |
|
102 TRtpId iSessionID; |
|
103 TRtpId iStreamId; |
|
104 |
|
105 TUint iIapid; |
|
106 TUint iPort; |
|
107 TInetAddr iRemoteAddr; |
|
108 |
|
109 CMccRtpManager* iRtpmanager; |
|
110 }; |
|
111 |
|
112 |
|
113 #endif __TESTAPPCONSOLE_H |