|
1 /* |
|
2 * Copyright (c) 2005-2006 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: header file of peninput ime plugin finder |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef C_CPENINPUTIMEFINDER_H |
|
21 #define C_CPENINPUTIMEFINDER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <badesca.h> |
|
26 #include <aknfeppeninputimeplugin.h> |
|
27 |
|
28 #include <AknFepGlobalEnums.h> |
|
29 |
|
30 class CPtiEngine; |
|
31 class RPeninputServer; |
|
32 class TImePluginLangAndMode; |
|
33 |
|
34 class TInternalImePlguinImplDetail |
|
35 { |
|
36 public: |
|
37 TInt iImplementationId; |
|
38 TInt iMode; |
|
39 TInt iMeritValue; |
|
40 TInt iLanguage; |
|
41 }; |
|
42 |
|
43 /** |
|
44 * CImePluginFinder class. |
|
45 * |
|
46 * This is main class for outside users to find |
|
47 * |
|
48 * @lib feplayouteng.lib |
|
49 * @since S60 V4.0 |
|
50 */ |
|
51 class CImePluginFinder : public CBase |
|
52 { |
|
53 public: |
|
54 /** |
|
55 * Two phase constructor. |
|
56 * |
|
57 * @since S60 V4.0 |
|
58 * @return The layout engine instance |
|
59 */ |
|
60 static CImePluginFinder* NewL(); |
|
61 |
|
62 /** |
|
63 * Destructor. |
|
64 * |
|
65 * @since S60 V4.0 |
|
66 */ |
|
67 ~CImePluginFinder(); |
|
68 |
|
69 /** |
|
70 * Initialze the finder and prepare all internal data |
|
71 * |
|
72 * @since S60 V4.0 |
|
73 * @param aPtiEngine The ptiEngine instance, used by Ime plug-in |
|
74 * @return None |
|
75 */ |
|
76 void InitializeL(CPtiEngine* aPtiEngine); |
|
77 |
|
78 /** |
|
79 * Get pen support language list |
|
80 * |
|
81 * @since S60 V4.0 |
|
82 * @param aLanguageLists A reference to a client owned array which |
|
83 * will be filled with languages code |
|
84 * @return None |
|
85 */ |
|
86 void SupportLanguages(RArray<TInt>& aLanguageLists); |
|
87 |
|
88 /** |
|
89 * Get IME plugin implementation list for specified language and plugin mode |
|
90 * |
|
91 * @since S60 V4.0 |
|
92 * @param aLanguage The required language code. |
|
93 * @param aPluginMode The required IME plugin mode |
|
94 * @param aImplmentationIds A reference to a client owned array which |
|
95 * will be filled with IME implementation code |
|
96 * @return None |
|
97 */ |
|
98 void GetImePlugins(TInt aLanguage, TInt aPluginMode, RArray<TInt>& aImplmentationIds); |
|
99 |
|
100 /** |
|
101 * Get IME plugin implementation list for specified language |
|
102 * |
|
103 * @since S60 V4.0 |
|
104 * @param aLanguage The required language code. |
|
105 * @param aImplmentationIds A reference to a client owned array which |
|
106 * will be filled with IME implementation code |
|
107 * @return None |
|
108 */ |
|
109 void GetImePlugins(TInt aLanguage, RArray<TInt>& aImplmentationIds); |
|
110 |
|
111 /** |
|
112 * Test the Ime Finder initialiaztion state |
|
113 * |
|
114 * @since S60 V4.0 |
|
115 * @return ETrue if initialzed, otherwise EFalse. |
|
116 */ |
|
117 TBool Initialized(); |
|
118 |
|
119 /** |
|
120 * Refresh internal data after system changes, such as disk insert/remove, |
|
121 * application install/uninstall and so on. |
|
122 * |
|
123 * @since S60 V4.0 |
|
124 * @return None |
|
125 */ |
|
126 void RefreshL(CPtiEngine* aPtiEngine); |
|
127 |
|
128 /** |
|
129 * Is support TPluginInputMode for aLanguage. |
|
130 * |
|
131 * @since S60 v4.0 |
|
132 * @param aLanguage Value of TLanguage |
|
133 * @param aMode Value of TPluginInputMode |
|
134 * @return ETrue if supported. Otherwise EFalse. |
|
135 */ |
|
136 TBool IsSupportPluginMode( TLanguage aLanguage, TPluginInputMode aMode ) ; |
|
137 private: |
|
138 |
|
139 /** |
|
140 * Constructor |
|
141 * |
|
142 * @since S60 V4.0 |
|
143 */ |
|
144 CImePluginFinder(); |
|
145 |
|
146 /** |
|
147 * Internal version of get IME plugin implementation list |
|
148 * for specified language and plugin mode |
|
149 * |
|
150 * @since S60 V4.0 |
|
151 * @param aLanguage The required language code. |
|
152 * @param aPluginMode The required IME plugin mode |
|
153 * @param aImplmentationIds A reference to a client owned array which |
|
154 * will be filled with IME implementation code |
|
155 * @return None |
|
156 */ |
|
157 void InternalGetImePlugins(TInt aLanguage, TInt aPluginMode, RArray<TInt>& aImplmentationIds); |
|
158 |
|
159 /** |
|
160 * Free a list |
|
161 * |
|
162 * @since S60 V4.0 |
|
163 * @param aList A reference to the list |
|
164 * @return None |
|
165 */ |
|
166 void FreeList(RArray<TImePluginLangAndMode>& aList); |
|
167 |
|
168 /** |
|
169 * Reset all data and free memory |
|
170 * |
|
171 * @return None |
|
172 */ |
|
173 void Reset(); |
|
174 |
|
175 /** |
|
176 * Add a implementation into internal data structure |
|
177 * |
|
178 * @param aImplDetail A reference to IME implenmentation detail. |
|
179 * @return None |
|
180 */ |
|
181 void AddImplementationL(const TInternalImePlguinImplDetail& aImplDetail); |
|
182 |
|
183 private: |
|
184 |
|
185 /** |
|
186 * Implementation list, only contains pointer to iAllImplementations |
|
187 */ |
|
188 RArray<TImePluginLangAndMode> iPluginList; |
|
189 |
|
190 /** |
|
191 * All implentation list |
|
192 */ |
|
193 RArray<TInternalImePlguinImplDetail> iAllImplementations; |
|
194 |
|
195 /** |
|
196 * Flag of initialzed status |
|
197 */ |
|
198 TBool iInitialized; |
|
199 }; |
|
200 |
|
201 /** |
|
202 * CImePluginList class. |
|
203 * |
|
204 * This is class storing ime plugin prioritized |
|
205 * |
|
206 * @lib feplayouteng.lib |
|
207 * @since S60 V4.0 |
|
208 */ |
|
209 class CImePluginList: public CBase |
|
210 { |
|
211 public: |
|
212 |
|
213 /** |
|
214 * Constructor |
|
215 * |
|
216 * @since S60 V4.0 |
|
217 */ |
|
218 CImePluginList(); |
|
219 |
|
220 /** |
|
221 * Destructor |
|
222 * |
|
223 * @since S60 V4.0 |
|
224 */ |
|
225 ~CImePluginList(); |
|
226 |
|
227 /** |
|
228 * Insert a implementation in the list and keep priority order |
|
229 * |
|
230 * @param aImplDetail A reference to IME implenmentation detail. |
|
231 * @return None |
|
232 */ |
|
233 void Insert(const TInternalImePlguinImplDetail* aImplDetail); |
|
234 |
|
235 /** |
|
236 * Get Ime plugin list |
|
237 * |
|
238 * @param aImplmentationIds A reference to internal implementation list. |
|
239 * @return None |
|
240 */ |
|
241 void GetImePlugins(RArray<TInt>& aImplmentationIds); |
|
242 private: |
|
243 |
|
244 /** |
|
245 * Priorited Ime plugin list |
|
246 */ |
|
247 RPointerArray<TInternalImePlguinImplDetail> iPriList; |
|
248 }; |
|
249 |
|
250 /** |
|
251 * TImePluginLangAndMode structure. |
|
252 * |
|
253 */ |
|
254 class TImePluginLangAndMode |
|
255 { |
|
256 public: |
|
257 |
|
258 /** |
|
259 * Language code |
|
260 */ |
|
261 TInt8 iLanguage; |
|
262 |
|
263 /** |
|
264 * Language code |
|
265 */ |
|
266 TInt16 iMode; |
|
267 |
|
268 /** |
|
269 * Ime plugin list for speicial plugin mode and language of iLanguage |
|
270 */ |
|
271 CImePluginList* iImePluginList; |
|
272 }; |
|
273 |
|
274 #endif C_CPENINPUTIMEFINDER_H |
|
275 |
|
276 // End of file |