equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2005-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 TESTAPPENGINE_H |
|
20 #define TESTAPPENGINE_H |
|
21 |
|
22 // INCLUDES |
|
23 |
|
24 #include <e32base.h> |
|
25 #include <speechsynthesis.h> |
|
26 |
|
27 #include "TestAppAppUi.h" |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * |
|
35 */ |
|
36 class CTestAppEngine : public CActive |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 static CTestAppEngine* NewL( CTestAppAppUi& aAppUi ); |
|
41 |
|
42 virtual ~CTestAppEngine(); |
|
43 |
|
44 void ConnectL(); |
|
45 void DisconnectL(); |
|
46 |
|
47 void InitTextL(); |
|
48 void InitTextToFileL(); |
|
49 |
|
50 void PlayL(); |
|
51 void PauseL(); |
|
52 void StopL(); |
|
53 |
|
54 TVoice ChangeVoiceL(); |
|
55 |
|
56 TInt VolumeDownL(); |
|
57 TInt VolumeUpL(); |
|
58 |
|
59 TInt RateUpL(); |
|
60 |
|
61 void ChangeAudioOutputL(); |
|
62 |
|
63 protected: // From CActive |
|
64 |
|
65 /** |
|
66 * CActive::RunL |
|
67 */ |
|
68 void RunL(); |
|
69 |
|
70 /** |
|
71 * CActive::DoCancel() |
|
72 */ |
|
73 void DoCancel(); |
|
74 |
|
75 private: |
|
76 |
|
77 CTestAppEngine( CTestAppAppUi& aAppUi ); |
|
78 |
|
79 void ConstructL(); |
|
80 |
|
81 void FetchSupportedLanguagesAndVoicesL(); |
|
82 |
|
83 private: // Data |
|
84 |
|
85 enum TState |
|
86 { |
|
87 EIdle, |
|
88 EPriming, |
|
89 ESpeaking |
|
90 }; |
|
91 |
|
92 CTestAppAppUi& iAppUi; |
|
93 |
|
94 RSpeechSynthesis iServer; |
|
95 TState iState; |
|
96 |
|
97 TVoice iVoice; |
|
98 |
|
99 RArray<TVoice> iVoices; |
|
100 TInt iVoiceIndex; |
|
101 |
|
102 TInt iRate; |
|
103 TInt iVolume; |
|
104 |
|
105 TFileName iFileName; |
|
106 |
|
107 TInt iCurrentAudioOutput; |
|
108 |
|
109 }; |
|
110 |
|
111 #endif |
|
112 |
|
113 // End of File |