|
1 /* |
|
2 * Copyright (c) 2004-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: Client side interface to TTS custom commands. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef NSSTTSCUSTOMCOMMANDS_H |
|
20 #define NSSTTSCUSTOMCOMMANDS_H |
|
21 |
|
22 // INCLUDE FILES |
|
23 #include <mmfcontroller.h> |
|
24 #include <nssttscommon.h> |
|
25 |
|
26 // CLASS DECLARATION |
|
27 |
|
28 /** |
|
29 * TTS custom command client side interface. |
|
30 * |
|
31 * @lib nssttscustomcommands.lib.lib |
|
32 * @since 2.8 |
|
33 */ |
|
34 // CLASS DECLARATION |
|
35 class RTtsCustomCommands : public RMMFCustomCommandsBase |
|
36 { |
|
37 public: // Constructors and destructor |
|
38 |
|
39 /** |
|
40 * Public C++ constructor for RSpeechRecognitionCustomCommands class. |
|
41 * |
|
42 * @since 2.8 |
|
43 * @param "RMMFController& aController" Reference to RMMFController object. |
|
44 */ |
|
45 IMPORT_C RTtsCustomCommands( RMMFController& aController ); |
|
46 |
|
47 public: // New functions |
|
48 |
|
49 /** |
|
50 * Adds a style to the style collection. |
|
51 * |
|
52 * @since 2.8 |
|
53 * @param "TTtsStyle& aStyle" Style to be added. |
|
54 * @retval "TTtsStyleID& aID" Returns: style ID. |
|
55 * @return Error code. |
|
56 */ |
|
57 IMPORT_C TInt AddStyle( const TTtsStyle& aStyle, TTtsStyleID& aID ); |
|
58 |
|
59 /** |
|
60 * Deletes a style based on identifier. |
|
61 * |
|
62 * @since 2.8 |
|
63 * @param "TTtsStyleID aID" Style ID which should be deleted. |
|
64 * @return Error code. |
|
65 */ |
|
66 IMPORT_C TInt DeleteStyle( TTtsStyleID aID ); |
|
67 |
|
68 /** |
|
69 * Gets the current synthesis position in words. |
|
70 * |
|
71 * @since 2.8 |
|
72 * @retval "TInt& aWordIndex" Return; position in words. |
|
73 * @return Error code. |
|
74 */ |
|
75 IMPORT_C TInt GetPosition( TInt& aWordIndex ); |
|
76 |
|
77 /** |
|
78 * Gets the overall number of registered styles. |
|
79 * |
|
80 * @since 2.8 |
|
81 * @retval "TUint16& aNumber" Return; number of styles. |
|
82 * @return Error code. |
|
83 */ |
|
84 IMPORT_C TInt NumberOfStyles( TUint16& aNumber ); |
|
85 |
|
86 /** |
|
87 * Opens parsed text object as synthesis source. |
|
88 * |
|
89 * @since 2.8 |
|
90 * @param "CTtsParsedText& aText" Parsed text to open. |
|
91 * @return Error code. |
|
92 */ |
|
93 IMPORT_C TInt OpenParsedText( CTtsParsedText& aText ); |
|
94 |
|
95 /** |
|
96 * Sets synthesis position in words. |
|
97 * |
|
98 * @since 2.8 |
|
99 * @param "TInt aWordIndex" Position to set. |
|
100 * @return Error code. |
|
101 */ |
|
102 IMPORT_C TInt SetPosition( TInt aWordIndex ); |
|
103 |
|
104 /** |
|
105 * Gets a registered style based on style identifier. |
|
106 * |
|
107 * @since 2.8 |
|
108 * @param "TTtsStyleID aStyleID" Style ID. |
|
109 * @retval "TTtsStyle& aStyle" Returns: reference to style object. |
|
110 * @return Error code. |
|
111 */ |
|
112 IMPORT_C TInt Style( TTtsStyleID aStyleID, TTtsStyle& aStyle ); |
|
113 |
|
114 /** |
|
115 * Gets a registered style based on index. |
|
116 * |
|
117 * @since 2.8 |
|
118 * @param "TUint16 aIndex" Index. |
|
119 * @retval "TTtsStyle& aStyle" Returns: reference to style object. |
|
120 * @return Error code. |
|
121 */ |
|
122 IMPORT_C TInt Style( TUint16 aIndex, TTtsStyle& aStyle ); |
|
123 |
|
124 /** |
|
125 * Sets the default style parameters for synthesis. |
|
126 * |
|
127 * @since 3.2 |
|
128 * @param "const TTtsStyle& aStyle" Style created by the client |
|
129 * @return Error code. |
|
130 */ |
|
131 IMPORT_C TInt SetDefaultStyle( const TTtsStyle& aStyle ); |
|
132 |
|
133 /** |
|
134 * Returns the registered default style |
|
135 * |
|
136 * @since 3.2 |
|
137 * @retval "TTtsStyle& aStyle" Returns: reference to style object. |
|
138 * @return Error code. |
|
139 */ |
|
140 IMPORT_C TInt GetDefaultStyle( TTtsStyle& aStyle ); |
|
141 |
|
142 /** |
|
143 * Sets the speaking rate of synthesizer. |
|
144 * |
|
145 * @since 3.2 |
|
146 * @param TInt aRate Speaking rate value |
|
147 * @return Error code. |
|
148 */ |
|
149 IMPORT_C TInt SetSpeakingRate( TInt aRate ); |
|
150 |
|
151 /** |
|
152 * Returns the current speaking rate value. |
|
153 * |
|
154 * @since 3.2 |
|
155 * @return Speaking rate value |
|
156 * @retval "TInt aRate" Return; Speaking rate value. |
|
157 * @return Error code. |
|
158 */ |
|
159 IMPORT_C TInt GetSpeakingRate( TInt& aRate ); |
|
160 |
|
161 /** |
|
162 * Gets the list of supported languages. |
|
163 * |
|
164 * @since 3.2 |
|
165 * @param "RArray<TLanguage>& aLanguages" Output parameter which |
|
166 * contains the languages |
|
167 * @return Error code. |
|
168 */ |
|
169 IMPORT_C TInt GetSupportedLanguages( RArray<TLanguage>& aLanguages ); |
|
170 |
|
171 /** |
|
172 * Gets the list of supported voices for a certain language. |
|
173 * |
|
174 * @since 3.2 |
|
175 * @param "TLanguage aLanguage" Language |
|
176 * @param "RArray<TTtsStyle>& aVoices" Output parameter which contains the voices |
|
177 * @return Error code. |
|
178 */ |
|
179 IMPORT_C TInt GetSupportedVoices( TLanguage aLanguage, |
|
180 RArray<TTtsStyle>& aVoices ); |
|
181 |
|
182 private: |
|
183 |
|
184 TAny* iReservedPtr_1; // reserved for future expansion |
|
185 TAny* iReservedPtr_2; // reserved for future expansion |
|
186 }; |
|
187 |
|
188 #endif // NSSTTSCUSTOMCOMMANDS_H |
|
189 |
|
190 // End of file |