|
1 // Copyright (c) 2008-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". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // functional unit of the SAT. |
|
15 // |
|
16 |
|
17 |
|
18 |
|
19 /** |
|
20 @file The TEFUnit header file which tests the PlayTone |
|
21 */ |
|
22 |
|
23 #ifndef CCSATPLAYTONEFU_H |
|
24 #define CCSATPLAYTONEFU_H |
|
25 |
|
26 #include <test/tefunit.h> |
|
27 |
|
28 #include <etelmm.h> |
|
29 #include <etelmmcs.h> |
|
30 |
|
31 #include "ccsatcomponenttestbase.h" |
|
32 |
|
33 class CCSatPlayToneFU : public CCSatComponentTestBase |
|
34 { |
|
35 public: |
|
36 |
|
37 // Create a suite of all the tests |
|
38 static CTestSuite* CreateSuiteL(const TDesC& aName); |
|
39 |
|
40 public: |
|
41 // Individual test steps |
|
42 |
|
43 void TestNotifyPlayTonePCmd0001L(); |
|
44 void TestNotifyPlayTonePCmd0002L(); |
|
45 void TestNotifyPlayTonePCmd0004L(); |
|
46 |
|
47 void TestNotifyPlayTonePCmd0001bL(); |
|
48 |
|
49 private: |
|
50 |
|
51 struct TData |
|
52 { |
|
53 struct TTone |
|
54 { |
|
55 TTone(); |
|
56 void Clear(); |
|
57 |
|
58 TBool iIfUse; |
|
59 RSat::TTone iTone; |
|
60 }; |
|
61 struct TDuration |
|
62 { |
|
63 TDuration(); |
|
64 void Clear(); |
|
65 |
|
66 TBool iIfUse; |
|
67 TUint8 iTimeUnit; |
|
68 TUint8 iNumOfUnits; |
|
69 }; |
|
70 |
|
71 TBuf8<RSat::KAlphaIdMaxSize> iAlphaId; |
|
72 TTone iTone; |
|
73 TDuration iDuration; |
|
74 }; |
|
75 |
|
76 void PrepareTlvData ( TTlv& aTlvData, TBool aAlphaIdLengthCheck ); |
|
77 |
|
78 void PrepareExpectDataL (); |
|
79 |
|
80 void PrepareCompleteDataL ( TInt aResultCode = KErrNone, TBool aAlphaIdLengthCheck = EFalse ); |
|
81 |
|
82 void ProactiveCommandCallL( RSat::TPlayToneV2& aPlayToneData, |
|
83 TInt aCompleteErrorCode = KErrNone, |
|
84 TInt aResultCode = KErrNone, |
|
85 TBool aAlphaIdLengthCheck = EFalse); |
|
86 |
|
87 void DataInitialization( |
|
88 const TData::TTone& aTone, |
|
89 const TData::TDuration& aDuration, |
|
90 const TDesC8& aAlphaId = KNullDesC8); |
|
91 |
|
92 void TerminalResponseCallL( |
|
93 const RSat& aSat, |
|
94 RSat::TPCmdResult aGeneralResult = RSat::KSuccess); |
|
95 |
|
96 void DataCompareL( const RSat::TPlayToneV2& aPlayToneData ); |
|
97 |
|
98 TData iData; |
|
99 |
|
100 }; // class CCSatPlayToneFU |
|
101 |
|
102 #endif // CCSATPLAYTONEFU_H |
|
103 |