|
1 /* |
|
2 * Copyright (c) 2002 - 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: Test sounds_api |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_TESTSDKSOUNDS_H |
|
20 #define C_TESTSDKSOUNDS_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <stiflogger.h> |
|
24 #include <testscripterinternal.h> |
|
25 #include <stiftestmodule.h> |
|
26 #include <testclassassert.h> |
|
27 |
|
28 #include <aknsoundinfo.h> |
|
29 #include <coemain.h> |
|
30 #include <coeaui.h> |
|
31 #include <caknmemoryselectionsettingpage.h> |
|
32 #include <caknfilenamepromptdialog.h> |
|
33 #include <maknfileselectionobserver.h> |
|
34 #include <caknfileselectiondialog.h> |
|
35 |
|
36 #include <aknsoundsystem.h> |
|
37 |
|
38 // MACROS |
|
39 #define TEST_CLASS_VERSION_MAJOR 0 |
|
40 #define TEST_CLASS_VERSION_MINOR 0 |
|
41 #define TEST_CLASS_VERSION_BUILD 0 |
|
42 |
|
43 // Logging path |
|
44 _LIT( KtestsdksoundsLogPath, "\\logs\\testframework\\testsdksounds\\" ); |
|
45 // Log file |
|
46 _LIT( KtestsdksoundsLogFile, "testsdksounds.txt" ); |
|
47 _LIT( KtestsdksoundsLogFileWithTitle, "testsdksounds_[%S].txt" ); |
|
48 |
|
49 /** |
|
50 * Ctestsdksounds test class for STIF Test Framework TestScripter. |
|
51 * @since S60 5.0 |
|
52 */ |
|
53 NONSHARABLE_CLASS(CTestSDKSounds) : public CScriptBase |
|
54 { |
|
55 public: // Constructors and destructor |
|
56 |
|
57 /** |
|
58 * Two-phased constructor. |
|
59 */ |
|
60 static CTestSDKSounds* NewL( CTestModuleIf& aTestModuleIf ); |
|
61 |
|
62 /** |
|
63 * Destructor. |
|
64 */ |
|
65 virtual ~CTestSDKSounds(); |
|
66 |
|
67 public: // Functions from base classes |
|
68 |
|
69 /** |
|
70 * From CScriptBase Runs a script line. |
|
71 * @since S60 5.0 |
|
72 * @param aItem Script line containing method name and parameters |
|
73 * @return Symbian OS error code |
|
74 */ |
|
75 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
76 |
|
77 private: |
|
78 |
|
79 /** |
|
80 * C++ default constructor. |
|
81 */ |
|
82 CTestSDKSounds( CTestModuleIf& aTestModuleIf ); |
|
83 |
|
84 /** |
|
85 * By default Symbian 2nd phase constructor is private. |
|
86 */ |
|
87 void ConstructL(); |
|
88 |
|
89 /** |
|
90 * Frees all resources allocated from test methods. |
|
91 * @since S60 5.0 |
|
92 */ |
|
93 void Delete(); |
|
94 |
|
95 /** |
|
96 * Method used to log version of test class |
|
97 */ |
|
98 void SendTestClassVersion(); |
|
99 |
|
100 /** |
|
101 * Turn off ScreenSaver |
|
102 * @since S60 5.0 |
|
103 * @return Symbian OS error code. |
|
104 */ |
|
105 void TurnOffScreenSaver(); |
|
106 |
|
107 /** |
|
108 * Restore ScreenSaver |
|
109 * @since S60 5.0 |
|
110 * @return Symbian OS error code. |
|
111 */ |
|
112 void RestoreScreenSaver(); |
|
113 |
|
114 private: // Test AknSoundInfo.h |
|
115 /** |
|
116 * TestSINewL test function for testing the NewL function |
|
117 * @since S60 5.0 |
|
118 * @param aItem never used |
|
119 * @return Symbian OS error code. |
|
120 */ |
|
121 virtual TInt TestSINewL( CStifItemParser& aItem ); |
|
122 /* |
|
123 * TestSIInternalizeL test function for testing the NewL function with Resource |
|
124 * @since S60 5.0 |
|
125 * @param aItem never used |
|
126 * @return Symbian OS error code. |
|
127 */ |
|
128 virtual TInt TestSIInternalizeL( CStifItemParser& aItem ); |
|
129 /** |
|
130 * TestSIExternalizeL test function for testing the NewL function with Medias |
|
131 * @since S60 5.0 |
|
132 * @param aItem never used |
|
133 * @return Symbian OS error code. |
|
134 */ |
|
135 virtual TInt TestSIExternalizeL( CStifItemParser& aItem ); |
|
136 |
|
137 private: // Test AknSoundSystem.h |
|
138 /** |
|
139 * TestSSNewL test function for testing the NewL function |
|
140 * @since S60 5.0 |
|
141 * @param aItem never used |
|
142 * @return Symbian OS error code. |
|
143 */ |
|
144 virtual TInt TestSSNewL( CStifItemParser& aItem ); |
|
145 /* |
|
146 * TestSSPushContextL test function for testing the NewL function with Resource |
|
147 * @since S60 5.0 |
|
148 * @param aItem never used |
|
149 * @return Symbian OS error code. |
|
150 */ |
|
151 virtual TInt TestSSPushContextL( CStifItemParser& aItem ); |
|
152 /** |
|
153 * TestSSPopContextL test function for testing the NewL function with Medias |
|
154 * @since S60 5.0 |
|
155 * @param aItem never used |
|
156 * @return Symbian OS error code. |
|
157 */ |
|
158 virtual TInt TestSSPopContextL( CStifItemParser& aItem ); |
|
159 /** |
|
160 * TestSSPlaySoundWithTKeyEventL test function for testing the NewL function with Medias |
|
161 * @since S60 5.0 |
|
162 * @param aItem never used |
|
163 * @return Symbian OS error code. |
|
164 */ |
|
165 virtual TInt TestSSPlaySoundWithTKeyEventL(CStifItemParser& aItem); |
|
166 /** |
|
167 * TestSSPlaySoundWithTIntL test function for testing the NewL function with Medias |
|
168 * @since S60 5.0 |
|
169 * @param aItem never used |
|
170 * @return Symbian OS error code. |
|
171 */ |
|
172 virtual TInt TestSSPlaySoundWithTIntL(CStifItemParser& aItem); |
|
173 /** |
|
174 * TestSSAddAppSoundInfoListL test function for testing the NewL function with Medias |
|
175 * @since S60 5.0 |
|
176 * @param aItem never used |
|
177 * @return Symbian OS error code. |
|
178 */ |
|
179 virtual TInt TestSSAddAppSoundInfoListL(CStifItemParser& aItem); |
|
180 /** |
|
181 * TestSSBringToForegroundL test function for testing the NewL function with Medias |
|
182 * @since S60 5.0 |
|
183 * @param aItem never used |
|
184 * @return Symbian OS error code. |
|
185 */ |
|
186 virtual TInt TestSSBringToForegroundL(CStifItemParser& aItem); |
|
187 /** |
|
188 * TestSSStopSoundL test function for testing the NewL function with Medias |
|
189 * @since S60 5.0 |
|
190 * @param aItem never used |
|
191 * @return Symbian OS error code. |
|
192 */ |
|
193 virtual TInt TestSSStopSoundL(CStifItemParser& aItem); |
|
194 /** |
|
195 * TestSSLockContextL test function for testing the NewL function with Medias |
|
196 * @since S60 5.0 |
|
197 * @param aItem never used |
|
198 * @return Symbian OS error code. |
|
199 */ |
|
200 virtual TInt TestSSLockContextL( CStifItemParser& aItem ); |
|
201 /** |
|
202 * TestSSReleaseContextL test function for testing the NewL function with Medias |
|
203 * @since S60 5.0 |
|
204 * @param aItem never used |
|
205 * @return Symbian OS error code. |
|
206 */ |
|
207 virtual TInt TestSSReleaseContextL(CStifItemParser& aItem); |
|
208 /** |
|
209 * TestSSRequestSoundInfoL test function for testing the NewL function with Medias |
|
210 * @since S60 5.0 |
|
211 * @param aItem never used |
|
212 * @return Symbian OS error code. |
|
213 */ |
|
214 virtual TInt TestSSRequestSoundInfoL(CStifItemParser& aItem); |
|
215 /** |
|
216 * TestSSTopContextL test function for testing the NewL function with Medias |
|
217 * @since S60 5.0 |
|
218 * @param aItem never used |
|
219 * @return Symbian OS error code. |
|
220 */ |
|
221 virtual TInt TestSSTopContextL(CStifItemParser& aItem); |
|
222 |
|
223 private: // Data |
|
224 |
|
225 /** |
|
226 * ScreenSaver Property |
|
227 */ |
|
228 TInt iOldScreenSaverProperty; |
|
229 |
|
230 // Resource file offset |
|
231 TInt iOffset; |
|
232 }; |
|
233 |
|
234 #endif // C_TESTSDKSOUNDS_H |
|
235 // End of File |