|
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: CMPXMusicPlayerCommonuiStifTest test class for STIF Test Framework TestScripter. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef ui_mpxmusicplayercommonuitest_H |
|
20 #define ui_mpxmusicplayercommonuitest_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <StifLogger.h> |
|
24 #include <TestScripterInternal.h> |
|
25 #include <StifTestModule.h> |
|
26 #include <TestclassAssert.h> |
|
27 |
|
28 #include <mpxalbumartutil.h> |
|
29 #include <mpxmedia.h> |
|
30 #include "mpxalbumartutilobserver.h" |
|
31 #include "mpxmediageneraldefs.h" |
|
32 #include "mpxmediamusicdefs.h" |
|
33 |
|
34 #include "EdwinTestControl.h" |
|
35 #include "ListBoxTestControl.h" |
|
36 #include "mpxlbxextendedfeatures.h" |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 // MACROS |
|
42 //#define ?macro ?macro_def |
|
43 #define TEST_CLASS_VERSION_MAJOR 0 |
|
44 #define TEST_CLASS_VERSION_MINOR 0 |
|
45 #define TEST_CLASS_VERSION_BUILD 0 |
|
46 |
|
47 #ifdef __WINSCW__ |
|
48 // Logging path |
|
49 _LIT( Kui_mpxmusicplayercommonuitestLogPath, "c:\\logs\\testframework\\ui_mpxmusicplayercommonuitest\\" ); |
|
50 //Data path |
|
51 _LIT( Kui_mpxmusicplayercommonuitestDataPath, "c:\\testing\\data\\" ); |
|
52 // Log file |
|
53 _LIT( Kui_mpxmusicplayercommonuitestLogFile, "ui_mpxmusicplayercommonuitest.txt" ); |
|
54 _LIT( Kui_mpxmusicplayercommonuitestLogFileWithTitle, "ui_mpxmusicplayercommonuitest_[%S].txt" ); |
|
55 #else |
|
56 // Logging path |
|
57 _LIT( Kui_mpxmusicplayercommonuitestLogPath, "e:\\logs\\testframework\\ui_mpxmusicplayercommonuitest\\" ); |
|
58 //Data path |
|
59 _LIT( Kui_mpxmusicplayercommonuitestDataPath, "e:\\testing\\data\\" ); |
|
60 // Log file |
|
61 _LIT( Kui_mpxmusicplayercommonuitestLogFile, "ui_mpxmusicplayercommonuitest.txt" ); |
|
62 _LIT( Kui_mpxmusicplayercommonuitestLogFileWithTitle, "ui_mpxmusicplayercommonuitest_[%S].txt" ); |
|
63 #endif |
|
64 |
|
65 //class ?FORWARD_CLASSNAME; |
|
66 class CMPXMusicPlayerCommonuiStifTest ; |
|
67 |
|
68 class CmpxMusicPlayerCommonuiTest; |
|
69 class CMPXAlbumArtUtil; |
|
70 class CMPXMedia; |
|
71 class CMPXLbxExtendedFeatures; |
|
72 |
|
73 class CMPXLbxExtendedFeatures; |
|
74 |
|
75 |
|
76 // CLASS DECLARATION |
|
77 |
|
78 /** |
|
79 * CMPXMusicPlayerCommonuiStifTest test class for STIF Test Framework TestScripter. |
|
80 * ?other_description_lines |
|
81 * |
|
82 * @lib ui_mpxmusicplayercommonuitest.lib |
|
83 * @since Series60_version |
|
84 */ |
|
85 NONSHARABLE_CLASS(CMPXMusicPlayerCommonuiStifTest ) : public CScriptBase, public MMPXAlbumArtUtilObserver |
|
86 { |
|
87 public: // Constructors and destructor |
|
88 |
|
89 /** |
|
90 * Two-phased constructor. |
|
91 */ |
|
92 static CMPXMusicPlayerCommonuiStifTest * NewL( CTestModuleIf& aTestModuleIf ); |
|
93 |
|
94 /** |
|
95 * Destructor. |
|
96 */ |
|
97 virtual ~CMPXMusicPlayerCommonuiStifTest (); |
|
98 |
|
99 public: |
|
100 //function from mpxalbumartutilobserver.h |
|
101 void ExtractAlbumArtStarted(); |
|
102 |
|
103 //function from mpxalbumartutilobserver.h |
|
104 void ExtractAlbumArtCompleted(CFbsBitmap* aBitmap, TInt aErr ); |
|
105 |
|
106 public: // Functions from base classes |
|
107 |
|
108 /** |
|
109 * From CScriptBase Runs a script line. |
|
110 * @since ?Series60_version |
|
111 * @param aItem Script line containing method name and parameters |
|
112 * @return Symbian OS error code |
|
113 */ |
|
114 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
115 |
|
116 |
|
117 |
|
118 private: |
|
119 |
|
120 /** |
|
121 * C++ default constructor. |
|
122 */ |
|
123 CMPXMusicPlayerCommonuiStifTest ( CTestModuleIf& aTestModuleIf ); |
|
124 |
|
125 /** |
|
126 * By default Symbian 2nd phase constructor is private. |
|
127 */ |
|
128 void ConstructL(); |
|
129 |
|
130 |
|
131 /** |
|
132 * Frees all resources allocated from test methods. |
|
133 * @since ?Series60_version |
|
134 */ |
|
135 void Delete(); |
|
136 |
|
137 /** |
|
138 * Test methods are listed below. |
|
139 */ |
|
140 |
|
141 /** |
|
142 * Example test method. |
|
143 * @since ?Series60_version |
|
144 * @param aItem Script line containing parameters. |
|
145 * @return Symbian OS error code. |
|
146 */ |
|
147 virtual TInt ExampleL( CStifItemParser& aItem ); |
|
148 //test functions for mpxalbumartutil.h |
|
149 //to test IMPORT_C static CMPXAlbumArtUtil* NewL(); |
|
150 TInt CMPXAlbumArtUtilCreate( CStifItemParser& aItem );//Pass Debug |
|
151 //to test IMPORT_C ~CMPXAlbumArtUtil(); |
|
152 TInt CMPXAlbumArtUtilDestructor (CStifItemParser& aItem );//Pass Debug |
|
153 // to test IMPORT_C void ExtractAlbumArtL(const CMPXMedia& aProp, |
|
154 // MMPXAlbumArtUtilObserver& aObs, |
|
155 // const TSize& aSize, |
|
156 // TDisplayMode aDisplayMode = EColor64K); |
|
157 TInt CMPXAlbumArtUtilExtractAlbumArtL (CStifItemParser& aItem );//Pass Debug |
|
158 //to test IMPORT_C void CancelRequest(); |
|
159 TInt CMPXAlbumArtUtilCancelRequest (CStifItemParser& aItem );//Pass Debug |
|
160 |
|
161 |
|
162 //test functions for mpxlbxextendedfeatures.h |
|
163 //to test IMPORT_C static CMPXLbxExtendedFeatures* NewL( |
|
164 // CEikTextListBox* aLbx, |
|
165 // TBool aEnableSetIndex = ETrue ); |
|
166 TInt CMPXLbxExtendedFeaturesCreate( CStifItemParser& aItem );//Pass Debug |
|
167 //to test IMPORT_C virtual ~CMPXLbxExtendedFeatures(); |
|
168 TInt CMPXLbxExtendedFeaturesDestructor( CStifItemParser& aItem );//Pass Debug |
|
169 //to test IMPORT_C TKeyResponse HandleLbxKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); |
|
170 TInt CMPXLbxExtendedFeaturesHandleLbxKeyEventL( CStifItemParser& aItem );//Pass Debug |
|
171 //to test IMPORT_C void EnableSpeedScrollL( TBool isEnable ); |
|
172 TInt CMPXLbxExtendedFeaturesEnableSpeedScrollL( CStifItemParser& aItem );//Pass Debug |
|
173 //to test IMPORT_C void SpeedNaviUpdating( TBool aNaviEnable ); |
|
174 TInt CMPXLbxExtendedFeaturesSpeedNaviUpdating( CStifItemParser& aItem );//Pass Debug |
|
175 /** |
|
176 * Method used to log version of test class |
|
177 */ |
|
178 void SendTestClassVersion(); |
|
179 |
|
180 //ADD NEW METHOD DEC HERE |
|
181 //[TestMethods] - Do not remove |
|
182 |
|
183 private: // Friend classes |
|
184 CMPXAlbumArtUtil* iMPXAlbumArtUtil; |
|
185 CMPXLbxExtendedFeatures* iMPXLbxExtendedFeatures; |
|
186 }; |
|
187 |
|
188 #endif // ui_mpxmusicplayercommonuitest_H |
|
189 |
|
190 // End of File |