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