Update contrib.
1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
25 #include <testframework.h>
26 #include "dvbhhaitestutil.h"
27 #include <e32property.h>
28 #include <mobiletv/hai/dvbh/dvbhreceiver.h>
29 #include <mobiletv/hai/dvbh/dvbhreceiverinfo.h>
33 class RDvbhHaiTest : public RTestStep,
34 public MDvbhHaiTestLoggerInterface,
35 public MDvbhScanObserver,
36 public MDvbhDataObserver
39 friend class CDvbhTestUtil;
41 static RDvbhHaiTest* NewL(TBool aRequireReceiverInfo, const TDesC& aTestName);
44 TVerdict DoTestStepL();
45 TVerdict DoTestStepPreambleL();
46 TVerdict DoTestStepPostambleL();
48 //From MDvbhHaiTestLoggerInterface
49 void InfoPrintf3(const TDesC16& aString, TInt aInt1, TInt aInt2);
50 void InfoPrintf4(const TDesC16& aString, TInt aInt1, TInt aInt2, TInt aInt3);
52 //RDvbhReceiver Positive Test Steps
53 TVerdict DoCreateReceiverOnStackTestStep();
54 TVerdict DoCreateReceiverOnHeapTestStep();
55 TVerdict DoGetDriverVersionBeforeOpenTestStep();
56 TVerdict DoReceiverOpenTestStep();
57 TVerdict DoMultipleReceiverOpenTestStep();
58 TVerdict DoGetDriverVersionAfterOpenTestStep();
59 TVerdict DoPowerOnAfterOpenTestStep();
60 TVerdict DoSetScanConfigurationAfterOpenTestStep();
61 TVerdict DoGetScanConfigurationAfterOpenTestStep();
62 TVerdict DoGetDvbhVersionAfterOpenTestStep();
63 TVerdict DoGetHardwareInfoAfterOpenTestStep();
64 TVerdict DoScanAfterOpenTestStep(); //
65 TVerdict DoSetPlatformAfterOpenTestStep(); //
66 TVerdict DoCreateFilterAfterOpenTestStep(); //
67 TVerdict DoCancelFilterAfterOpenTestStep(); //
68 TVerdict DoReceiveIpDataAfterOpenTestStep(); //
69 TVerdict DoUpdateNetworkTimeAfterOpenTestStep(); //
70 TVerdict DoCustomAsyncAfterOpenTestStep(); //
71 TVerdict DoCancelCustomAsyncAfterOpenTestStep(); //
72 TVerdict DoCustomAfterOpenTestStep();
73 TVerdict DoCloseAfterOpenTestStep();
74 TVerdict DoPowerOffAfterOpenTestStep();
75 TVerdict DoSetDisabledAfterOpenTestStep();
76 TVerdict DoCancelScanAfterOpenTestStep();
77 TVerdict DoCancelSetPlatformAfterOpenTestStep();
78 TVerdict DoCancelReceiveIpDataAfterOpenTestStep();
79 TVerdict DoCancelUpdateNetworkTimeAfterOpenTestStep();
80 TVerdict DoMultipleReceiverCloseTestStep();
82 //CDvbhReceiverInfo Positive Test Steps
83 TVerdict DoCreateReceiverInfoTestStep();
85 TVerdict DoGetStateTestStep();
86 TVerdict DoGetSignalQualityTestStep();
87 TVerdict DoGetPlatformTestStep();
88 TVerdict DoGetNetworkTimeTestStep();
89 TVerdict DoGetPerformanceDataTestStep();
90 TVerdict DoGetFrequencyTestStep();
91 TVerdict DoGetCellIdTestStep();
92 TVerdict DoGetNetworkIdTestStep(); //110
94 //RDvbhReceiver Negative Test Steps
95 TVerdict DoReceiverOpenNoCloseTestStep();
96 TVerdict DoPowerOnBeforeOpenTestStep();
97 TVerdict DoSetScanConfigurationBeforeOpenTestStep();
98 TVerdict DoGetScanConfigurationBeforeOpenTestStep();
99 TVerdict DoGetDvbhVersionBeforeOpenTestStep();
100 TVerdict DoGetHardwareInfoBeforeOpenTestStep();
101 TVerdict DoScanBeforeOpenTestStep(); //
102 TVerdict DoSetPlatformBeforeOpenTestStep(); //
103 TVerdict DoCreateFilterBeforeOpenTestStep(); //
104 TVerdict DoCancelFilterBeforeOpenTestStep(); //
105 TVerdict DoReceiveIpDataBeforeOpenTestStep(); //
106 TVerdict DoUpdateNetworkTimeBeforeOpenTestStep(); //
107 TVerdict DoCustomAsyncBeforeOpenTestStep(); //
108 TVerdict DoCancelCustomAsyncBeforeOpenTestStep(); //
109 TVerdict DoCustomBeforeOpenTestStep(); //215
110 TVerdict DoCloseBeforeOpenTestStep(); //216
111 TVerdict DoPowerOffBeforeOpenTestStep(); //217
112 TVerdict DoSetDisabledBeforeOpenTestStep(); //218
113 TVerdict DoCancelScanBeforeOpenTestStep(); //219
114 TVerdict DoCancelSetPlatformBeforeOpenTestStep(); //220
115 TVerdict DoCancelReceiveIpDataBeforeOpenTestStep(); //221
116 TVerdict DoCancelUpdateNetworkTimeBeforeOpenTestStep(); //222
118 //CDvbhReceiverInfo Negative Test Steps
119 TVerdict DoGetStateNoPropertiesTestStep(); //301
120 TVerdict DoGetSignalQualityNoPropertiesTestStep(); //302
121 TVerdict DoGetPlatformNoPropertiesTestStep(); //303
122 TVerdict DoGetNetworkTimeNoPropertiesTestStep(); //304
123 TVerdict DoGetPerformanceDataNoPropertiesTestStep(); //305
124 TVerdict DoGetFrequencyNoPropertiesTestStep(); //306
125 TVerdict DoGetCellIdNoPropertiesTestStep(); //307
126 TVerdict DoGetNetworkIdNoPropertiesTestStep(); //308
127 TVerdict DoGetTestsNoProperties(); //309
130 void DvbhScanProgress( const TDvbhScanResult& aResult );
133 void DvbhPacketReceived( const TDesC8& aPacket );
135 RDvbhHaiTest(TBool aRequireReceiverInfo, const TDesC& aTestName);
138 TVerdict DoReceiverOpenAndClose(TUint aMultiples = 1);
139 TVerdict DoGetDriverVersion(RDvbhReceiver& aReceiver);
140 TVerdict OpenReceiver(RDvbhReceiver& aReceiver);
141 TVerdict DoGetNetworkTime(TBool aExpectedValidity);
143 void SetupParameterData();
145 TVersion iDvbhTestDriverVersion; //treat as a constant
146 TTime iDvbhTestTime; //treat as a constant
147 TDvbhPerformanceData iDvbhTestPerformanceData; //treat as a constant
148 TDvbhScanConfiguration iDvbhTestScanConfiguration; //treat as a constant
149 TDvbhPlatformProperty iDvbhTestPlatform; //treat as a constant
150 TDvbhHardwareInfo iDvbhTestHardwareInfo; //treat as a constant
152 TDvbhNetwork iDvbhTestNetwork; //Needed to run constructor (ccov)
153 TDvbhNetworkTime iDvbhTestNetworkTime; //For GetNetworkTime
154 TDvbhScanResult iDvbhTestScanResult; //Needed to run constructor (ccov)
156 TBool iRequireReceiverInfo;
157 CDvbhReceiverInfo* iRxInfo;
158 CDvbhTestUtil* iTestUtils;
159 TDvbhReceiverType iReceiverType;
163 #endif // DVBHHAITEST_H