|
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: Mixin class which will be implemented by the TTS plugin. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef NSSTTSCUSTOMCOMMANDIMPLEMENTOR_H |
|
20 #define NSSTTSCUSTOMCOMMANDIMPLEMENTOR_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <nssttscommon.h> |
|
24 |
|
25 // CLASS DECLARATION |
|
26 |
|
27 /** |
|
28 * Mixin class which should be implemented by the controller plugin. |
|
29 * |
|
30 * @lib nssttscustomcommands.lib |
|
31 * @since 2.8 |
|
32 */ |
|
33 class MTtsCustomCommandImplementor |
|
34 { |
|
35 |
|
36 public: |
|
37 /** |
|
38 * Adds a new style. |
|
39 * |
|
40 * @since 2.8 |
|
41 * @param "TTtsStyle& aStyle" Style to add. |
|
42 */ |
|
43 virtual TTtsStyleID MttscAddStyleL( const TTtsStyle& aStyle ) = 0; |
|
44 |
|
45 /** |
|
46 * Deletes a style based on style ID. |
|
47 * |
|
48 * @since 2.8 |
|
49 * @param "TTtsStyleID aID" Style ID to be deleted. |
|
50 */ |
|
51 virtual TInt MttscDeleteStyle( TTtsStyleID aID ) = 0; |
|
52 |
|
53 /** |
|
54 * Gets the synthesis position. |
|
55 * |
|
56 * @since 2.8 |
|
57 * @retval "TInt& aWordIndex" Returned position of synthesis. |
|
58 */ |
|
59 virtual void MttscGetPositionL( TInt& aWordIndex ) = 0; |
|
60 |
|
61 /** |
|
62 * Returns the number of registered styles. |
|
63 * |
|
64 * @since 2.8 |
|
65 * @return Number of styles. |
|
66 */ |
|
67 virtual TUint16 MttscNumberOfStyles() = 0; |
|
68 |
|
69 /** |
|
70 * Opens parsed text as source. |
|
71 * |
|
72 * @since 2.8 |
|
73 * @param "CTtsParsedText& aText" Reference to parsed text. |
|
74 */ |
|
75 virtual void MttscOpenParsedTextL( CTtsParsedText& aText ) = 0; |
|
76 |
|
77 /** |
|
78 * Sets the synthesis position based on word index. |
|
79 * |
|
80 * @since 2.8 |
|
81 * @param "TInt aWordIndex" Word index. |
|
82 */ |
|
83 virtual void MttscSetPositionL( TInt aWordIndex ) = 0; |
|
84 |
|
85 /** |
|
86 * Returns the style based on ID. |
|
87 * |
|
88 * @since 2.8 |
|
89 * @param "TTtsStyleID aStyleID" Style ID. |
|
90 * @return Reference to style object. |
|
91 */ |
|
92 virtual TTtsStyle& MttscStyleL( TTtsStyleID aStyleID ) = 0; |
|
93 |
|
94 /** |
|
95 * Returns the style based on index. |
|
96 * |
|
97 * @since 2.8 |
|
98 * @param "TUint16 aIndex" Style index. |
|
99 * @return Reference to style object. |
|
100 */ |
|
101 virtual TTtsStyle& MttscStyleL( TUint16 aIndex ) = 0; |
|
102 |
|
103 /** |
|
104 * Sets the default style parameters for synthesis. |
|
105 * |
|
106 * @param "const TTtsStyle& aStyle" Style created by the client |
|
107 * @since 3.2 |
|
108 */ |
|
109 virtual void MttscSetDefaultStyleL( const TTtsStyle& aStyle ) = 0; |
|
110 |
|
111 /** |
|
112 * Returns the registered default style |
|
113 * |
|
114 * @return Style reference |
|
115 * @leave KErrNotReady if no plugin is loaded to handle the function call |
|
116 * @since 3.2 |
|
117 */ |
|
118 virtual TTtsStyle& MttscDefaultStyleL() = 0; |
|
119 |
|
120 /** |
|
121 * Sets the speaking rate of synthesizer. |
|
122 * |
|
123 * @param TInt aRate Speaking rate value |
|
124 * @leave KErrNotSupported if synthesizer does not support speaking rate setting |
|
125 * @since 3.2 |
|
126 */ |
|
127 virtual void MttscSetSpeakingRateL( TInt aRate ) = 0; |
|
128 |
|
129 /** |
|
130 * Returns the current speaking rate value. |
|
131 * |
|
132 * @return Speaking rate value |
|
133 * @leave KErrNotSupported if synthesizer does not support speaking rate setting |
|
134 * @leave KErrNotReady if no plugin is loaded to handle the function call |
|
135 * @since 3.2 |
|
136 */ |
|
137 virtual TInt MttscSpeakingRateL() = 0; |
|
138 |
|
139 /** |
|
140 * Returns the list of supported languages. |
|
141 * |
|
142 * @param "RArray<TLanguage>& aLanguages" Output parameter which contains the languages |
|
143 * @leave KErrNotReady if no plugin is loaded to handle the function call |
|
144 * @since 3.2 |
|
145 */ |
|
146 virtual void MttscGetSupportedLanguagesL( RArray<TLanguage>& aLanguages ) = 0; |
|
147 |
|
148 /** |
|
149 * Returns the list of supported voices for a certain language. |
|
150 * |
|
151 * @param "TLanguage aLanguage" Language |
|
152 * @param "RArray<TTtsStyle>& aVoices" Output parameter which contains the voices |
|
153 * @leave KErrNotReady if no plugin is loaded to handle the function call |
|
154 * @since 3.2 |
|
155 */ |
|
156 virtual void MttscGetSupportedVoicesL( TLanguage aLanguage, RArray<TTtsStyle>& aVoices ) = 0; |
|
157 |
|
158 }; |
|
159 |
|
160 #endif // NSSTTSCUSTOMCOMMANDIMPLEMENTOR_H |