1 /* |
|
2 * Copyright (c) 2009 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 the License "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 #ifndef CIsiMsgBaseTest_H |
|
20 #define CIsiMsgBaseTest_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "tisi.h" |
|
24 #include "mtest.h" // For MTest |
|
25 #include "ctestbase.h" // For CTestBase |
|
26 |
|
27 #if defined (_MSC_VER) && (_MSC_VER >= 1000) |
|
28 #pragma once |
|
29 #endif |
|
30 |
|
31 // CONSTANTS |
|
32 // None |
|
33 |
|
34 // MACROS |
|
35 // None |
|
36 |
|
37 // DATA TYPES |
|
38 // None |
|
39 |
|
40 // FUNCTION PROTOTYPES |
|
41 // None |
|
42 |
|
43 // FORWARD DECLARATIONS |
|
44 // None |
|
45 |
|
46 // CLASS DECLARATION |
|
47 class CTestLogger; |
|
48 |
|
49 /** |
|
50 * Implements the IsiMessageBase class that has the needed functions |
|
51 * to send and receive IsiMessages. |
|
52 * |
|
53 * @lib ISIMessageCommonTest |
|
54 * @since N/A |
|
55 */ |
|
56 class CIsiMsgBaseTest : public CBase |
|
57 { |
|
58 |
|
59 // Functions |
|
60 public: |
|
61 |
|
62 /** |
|
63 * Two-phased constructor. |
|
64 * @param None |
|
65 * @return CIsiMsgBaseTest*, new instance of CIsiMsgBaseTest. |
|
66 */ |
|
67 static CIsiMsgBaseTest* NewL( TExecutionAndDebugInfo& aInfo, |
|
68 TInt& aResult ); |
|
69 |
|
70 /** |
|
71 * Two-phased constructor. Leaves pointer to CleanupStack. |
|
72 * @param None |
|
73 * @return CIsiMsgBaseTest*, new instance of CIsiMsgBaseTest. |
|
74 */ |
|
75 static CIsiMsgBaseTest* NewLC( TExecutionAndDebugInfo& aInfo, |
|
76 TInt& aResult ); |
|
77 |
|
78 /** |
|
79 * Destructor. |
|
80 * @param None |
|
81 * @return None |
|
82 */ |
|
83 ~CIsiMsgBaseTest(); |
|
84 |
|
85 /** |
|
86 * For TestCase execution. Closes the connection. |
|
87 * @param None |
|
88 * @return None |
|
89 */ |
|
90 void Close(); |
|
91 |
|
92 /** |
|
93 * For TestCase execution. Creates new IsiMsg. |
|
94 * @param None |
|
95 */ |
|
96 void GetIsiMsgL(); |
|
97 |
|
98 /** |
|
99 * Set the status of the case as failed / passed. |
|
100 * @param TExecutionAndDebugInfo& aInfo, for debugging and results. |
|
101 * @param TInt aResult, result of this function. |
|
102 * @param const TDesC& aComment, the comment to print. |
|
103 * @return None |
|
104 */ |
|
105 void PrintCaseProgress( TInt aResult, |
|
106 const TDesC& aComment |
|
107 ); |
|
108 |
|
109 /** |
|
110 * Helper function return 16bit value from index. |
|
111 * @param TInt aIndex |
|
112 * @return TUint16 |
|
113 */ |
|
114 TUint16 Get16BitFromTestMessage( const TUint8 *aMessage, TInt aIndex ); |
|
115 |
|
116 /** |
|
117 * Helper function return 16bit value from index. |
|
118 * @param TInt aIndex |
|
119 * @return TUint16 |
|
120 */ |
|
121 TUint32 Get32BitFromTestMessage( const TUint8 *aMessage, TInt aIndex ); |
|
122 |
|
123 protected: |
|
124 |
|
125 // None |
|
126 |
|
127 private: |
|
128 |
|
129 /** |
|
130 * Constructor |
|
131 * @param None |
|
132 * @return None |
|
133 */ |
|
134 CIsiMsgBaseTest( TExecutionAndDebugInfo& aInfo, |
|
135 TInt& aResult ); |
|
136 |
|
137 /** |
|
138 * Second phase constructor. |
|
139 * @param None |
|
140 * @return None |
|
141 */ |
|
142 void ConstructL(); |
|
143 |
|
144 // Variables |
|
145 public: |
|
146 |
|
147 // None |
|
148 |
|
149 protected: |
|
150 |
|
151 // None |
|
152 |
|
153 private: |
|
154 |
|
155 // The execution and debug info. |
|
156 TExecutionAndDebugInfo& iInfo; |
|
157 // Result |
|
158 TInt& iResult; |
|
159 // Writes notices to STIF UI, ATS, and logfile. |
|
160 CTestLogger* iTestLog; |
|
161 |
|
162 |
|
163 }; |
|
164 |
|
165 #endif |
|
166 |
|
167 // End of File |
|