|
1 /* |
|
2 * Copyright (c) 2007 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 #ifndef STUNTURNUDPTESTS_H |
|
22 #define STUNTURNUDPTESTS_H |
|
23 |
|
24 // INCLUDES |
|
25 #include <e32base.h> |
|
26 #include <e32cons.h> |
|
27 #include <badesca.h> |
|
28 |
|
29 #include "natfwconnectivityapidefs.h" |
|
30 #include "testclient.h" |
|
31 #include "testserver.h" |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 class CNATFWConnectivityApi; |
|
35 class CNATConnFWTestConsoleStubs; |
|
36 class CWrongServerSettings; |
|
37 class MNATFWSocketMediaConnWrapper; |
|
38 |
|
39 // CLASS |
|
40 class CStunTurnTests : |
|
41 public CBase, |
|
42 public MTestServerObserver, |
|
43 public MTestClientNotifier |
|
44 { |
|
45 public: |
|
46 static CStunTurnTests* NewL( |
|
47 CConsoleBase& aConsole, |
|
48 CNATFWConnectivityApi& aNat, |
|
49 CNATConnFWTestConsoleStubs& aIFStub, |
|
50 const TDesC8& aDomain, |
|
51 TUint aIapId, |
|
52 TUint aProtocol, |
|
53 const CDesC8Array& aPlugins ); |
|
54 |
|
55 virtual ~CStunTurnTests(); |
|
56 |
|
57 public: |
|
58 |
|
59 void DoRunStunTurnTestsL(); |
|
60 |
|
61 // from MTestServerObserver |
|
62 |
|
63 void Notify( MTestServerObserver::TServerNotify aNotify, TInt aError ); |
|
64 |
|
65 // from MTestClientNotifier |
|
66 |
|
67 void Notify( MTestClientNotifier::TClientNotify aNotify, TInt aError ); |
|
68 |
|
69 private: |
|
70 |
|
71 void SetupTestL(); |
|
72 |
|
73 void SetupTest2L(); |
|
74 |
|
75 void SetupWrongServerAddressTestL(); |
|
76 |
|
77 void TeardownWrongServerAddressTest(); |
|
78 |
|
79 void TeardownTest(); |
|
80 |
|
81 void TestCreateSessionL(); |
|
82 |
|
83 void TestCreateStreamL(); |
|
84 |
|
85 void TestCreateWrapperL(); |
|
86 |
|
87 void TestSetIncomingAddrL(); |
|
88 |
|
89 void TestOutgoingAddrL(); |
|
90 |
|
91 void TestFetchCandidateL(); |
|
92 |
|
93 void TestSetReceivingStatusUDPL(); |
|
94 |
|
95 void TestSetReceivingStatusTCPL(); |
|
96 |
|
97 void TestSetSendingStatusUDPL(); |
|
98 |
|
99 void TestSetSendingStatusTCPL(); |
|
100 |
|
101 void PrintTestResult( TInt aError ); |
|
102 |
|
103 private: |
|
104 |
|
105 CStunTurnTests( CConsoleBase& aConsole, |
|
106 CNATFWConnectivityApi& aNat, |
|
107 CNATConnFWTestConsoleStubs& aIFStub, |
|
108 TUint aIapId, |
|
109 TUint aProtocol ); |
|
110 |
|
111 void ConstructL( const TDesC8& aDomain, const CDesC8Array& aPlugins ); |
|
112 |
|
113 private: |
|
114 |
|
115 CConsoleBase& iConsole; |
|
116 CNATFWConnectivityApi& iNat; |
|
117 CNATConnFWTestConsoleStubs& iIfStub; |
|
118 TUint iTestIapId; |
|
119 TUint iProtocol; |
|
120 CDesC8Array* iPlugins; |
|
121 TBool iNotificationIsOn; |
|
122 HBufC8* iTestDomain; |
|
123 TUint iSessionId; |
|
124 TUint iStreamId; |
|
125 MNATFWSocketMediaConnWrapper* iWrapper; // not own |
|
126 CWrongServerSettings* iWrongServerSettings; |
|
127 }; |
|
128 |
|
129 #endif // STUNTURNUDPTESTS_H |
|
130 |
|
131 // End of File |