|
1 /* |
|
2 * Copyright (c) 2002 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 * This is a private header |
|
16 * |
|
17 * Implementation of the CAknInputLanguageInfo-conformant object. This actually has |
|
18 * all the functionality. |
|
19 * This file also contains the implementation of the factory object itself that returns |
|
20 * an instance of CT9InputLanguageInfo. |
|
21 * |
|
22 */ |
|
23 |
|
24 |
|
25 #if !defined(__ET9LANGUAGEINFO_H__) |
|
26 #define __ET9LANGUAGEINFO_H__ |
|
27 |
|
28 #include <e32base.h> |
|
29 #include <AknInputLanguageInfo.h> |
|
30 #include <PtiEngine.h> |
|
31 |
|
32 /** |
|
33 * This is a specialization of the Avkon input language class. It may be returned by |
|
34 * a factory method to provide available language information to a client |
|
35 * |
|
36 * It owns a CT9Interface object that provides the real services. |
|
37 * |
|
38 * This class is not meant for client code derivation. Indeed it is not visible to the client |
|
39 * directly. |
|
40 */ |
|
41 NONSHARABLE_CLASS(CT9InputLanguageInfo) : public CAknInputLanguageInfo |
|
42 { |
|
43 public: |
|
44 /** |
|
45 * Non-trivial C++ descructor. |
|
46 */ |
|
47 IMPORT_C ~CT9InputLanguageInfo(); |
|
48 |
|
49 /** |
|
50 * NewL method for this class. This can be used internal to the factory method |
|
51 */ |
|
52 static CT9InputLanguageInfo* NewL(); |
|
53 |
|
54 /** |
|
55 * Provide a language list corresponding to the input list of SymbianOS language codes. |
|
56 * The order of the languages in the output list is that order implemented in the |
|
57 * interface object, and the order of the input list of language codes is ignored. |
|
58 * |
|
59 * @param aInputLanguageList Append to this list; |
|
60 * @param aLanguageCodeList Append only languages whose code is in this list. If Null |
|
61 * is passed, then no language code filtering is done |
|
62 * @param aCapabilityFilter Append only languages with capabilities set in this filter. |
|
63 * |
|
64 */ |
|
65 EXPORT_C virtual void AppendLanguagesL( |
|
66 CAknInputLanguageList* aInputLanguageList, |
|
67 CArrayFix<TInt>* aLanguageCodeList, |
|
68 TAknInputLanguageCapabilities& aCapabilityFilter ); |
|
69 |
|
70 /** |
|
71 * From CAknInputLanguagesInfo. |
|
72 * |
|
73 * Append to a list of language, language code pairs |
|
74 */ |
|
75 |
|
76 IMPORT_C void AppendAvailableLanguagesL( CAknInputLanguageList* aInputLanguageArray ); |
|
77 |
|
78 /** |
|
79 * From CAknInputLanguageInfo |
|
80 * |
|
81 * @return the capabilies of the keyed language |
|
82 */ |
|
83 IMPORT_C virtual TAknInputLanguageCapabilities LanguageCapabilitiesFromLanguage(TLanguage aLanguageId); |
|
84 |
|
85 /** |
|
86 * Get the language name that corresponds to the passed-in Symbian OS language code. |
|
87 * This name should be localized, or not, depending upon the policy decided for the product |
|
88 * |
|
89 * @param aLanguageCode - language code for the language whose name is required |
|
90 * @return TPtrC - holds the name of the language. Buffer for the name is within |
|
91 * the interface object, not the client. The buffer will be valid only |
|
92 * while the instance of this class exists. |
|
93 */ |
|
94 IMPORT_C virtual TAknLanguageName LanguageName( TLanguage aLanguageCode ) const; |
|
95 |
|
96 IMPORT_C TLanguage UrlLanguage() const; |
|
97 |
|
98 private: |
|
99 /** |
|
100 * Private constructor |
|
101 */ |
|
102 CT9InputLanguageInfo(); |
|
103 |
|
104 /** |
|
105 * Private 2nd stage constructor |
|
106 */ |
|
107 void ConstructL(); |
|
108 |
|
109 /** |
|
110 * |
|
111 * Reserved virtuals |
|
112 * |
|
113 */ |
|
114 void Reserved_1(); |
|
115 void Reserved_2(); |
|
116 |
|
117 static TBool IsInLanguageCodeList( CArrayFix<TInt>* aList , TLanguage languageToFind ); |
|
118 |
|
119 private: |
|
120 CPtiEngine* iPtiEngineInterface; // Owned by this class |
|
121 }; |
|
122 |
|
123 #endif |
|
124 |
|
125 // End of File |