|
1 /* |
|
2 * Copyright (c) 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef TTSCONTROLLERPLUGINTEST_H |
|
20 #define TTSCONTROLLERPLUGINTEST_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <stiflogger.h> |
|
24 #include <testscripterinternal.h> |
|
25 #include <stiftestmodule.h> |
|
26 |
|
27 #include <mdaaudiosampleplayer.h> |
|
28 |
|
29 |
|
30 // MACROS |
|
31 |
|
32 // Logging path |
|
33 _LIT( KttscontrollerplugintestLogPath, "\\logs\\testframework\\ttscontrollerplugintest\\" ); |
|
34 // Log file |
|
35 _LIT( KttscontrollerplugintestLogFile, "ttscontrollerplugintest.txt" ); |
|
36 _LIT( KttscontrollerplugintestLogFileWithTitle, "ttscontrollerplugintest_[%S].txt" ); |
|
37 |
|
38 |
|
39 // FORWARD DECLARATIONS |
|
40 class Cttscontrollerplugintest; |
|
41 |
|
42 |
|
43 // CLASS DECLARATION |
|
44 |
|
45 /** |
|
46 * |
|
47 */ |
|
48 NONSHARABLE_CLASS(Cttscontrollerplugintest) : public CScriptBase, |
|
49 public MMdaAudioPlayerCallback |
|
50 { |
|
51 public: // Constructors and destructor |
|
52 |
|
53 /** |
|
54 * Two-phased constructor. |
|
55 */ |
|
56 static Cttscontrollerplugintest* NewL( CTestModuleIf& aTestModuleIf ); |
|
57 |
|
58 /** |
|
59 * Destructor. |
|
60 */ |
|
61 virtual ~Cttscontrollerplugintest(); |
|
62 |
|
63 public: // Functions from base classes |
|
64 |
|
65 /** |
|
66 * From CScriptBase Runs a script line. |
|
67 * @param aItem Script line containing method name and parameters |
|
68 * @return Symbian OS error code |
|
69 */ |
|
70 virtual TInt RunMethodL( CStifItemParser& aItem ); |
|
71 |
|
72 private: |
|
73 |
|
74 void MapcInitComplete( TInt aError, const TTimeIntervalMicroSeconds &aDuration ); |
|
75 |
|
76 void MapcPlayComplete( TInt aError ); |
|
77 |
|
78 private: |
|
79 |
|
80 /** |
|
81 * C++ default constructor. |
|
82 */ |
|
83 Cttscontrollerplugintest( CTestModuleIf& aTestModuleIf ); |
|
84 |
|
85 /** |
|
86 * By default Symbian 2nd phase constructor is private. |
|
87 */ |
|
88 void ConstructL(); |
|
89 |
|
90 /** |
|
91 * Frees all resources allocated from test methods. |
|
92 * @since ?Series60_version |
|
93 */ |
|
94 void Delete(); |
|
95 |
|
96 /** |
|
97 * Test methods are listed below. |
|
98 */ |
|
99 virtual TInt CreateL(); |
|
100 virtual TInt CreateFilePlayerL ( CStifItemParser& aItem ); |
|
101 virtual TInt CreateDesPlayerL ( CStifItemParser& aItem ); |
|
102 virtual TInt OpenFileL ( CStifItemParser& aItem ); |
|
103 virtual TInt OpenFileHandleL ( CStifItemParser& aItem ); |
|
104 virtual TInt OpenDesL ( CStifItemParser& aItem ); |
|
105 virtual TInt Play(); |
|
106 virtual TInt SetVolumeAndRampL(); |
|
107 virtual TInt Destroy(); |
|
108 |
|
109 private: |
|
110 |
|
111 CMdaAudioPlayerUtility* iAudioPlayer; |
|
112 |
|
113 RFs iFs; |
|
114 RFile iFile; |
|
115 |
|
116 HBufC8* iInputText; |
|
117 |
|
118 }; |
|
119 |
|
120 #endif // TTSCONTROLLERPLUGINTEST_H |
|
121 |
|
122 // End of File |