|
1 /* |
|
2 * Copyright (c) 2002-2004 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 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 #ifndef __FINDUTILWESTERN__ |
|
27 #define __FINDUTILWESTERN__ |
|
28 |
|
29 #include <e32std.h> |
|
30 #include <CentralRepository.h> |
|
31 #include <AknFepInternalCRKeys.h> |
|
32 #include <CenRepNotifyHandler.h> |
|
33 #include "FindUtilBase.h" |
|
34 |
|
35 class CFindUtilKorean; |
|
36 // Factory function at first ordinal |
|
37 IMPORT_C MFindUtil* FindUtilFactoryFunctionL(); |
|
38 |
|
39 NONSHARABLE_CLASS(CFindUtilWestern) : public CFindUtilBase, public MCenRepNotifyHandlerCallback |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 /** |
|
43 * C++ default constructor. |
|
44 */ |
|
45 CFindUtilWestern(); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 virtual ~CFindUtilWestern(); |
|
51 |
|
52 private: // From MFindUtil |
|
53 /** |
|
54 * From MFindUtil It tests a matching. |
|
55 * @since 2.6 |
|
56 * @param aContactsField is a contact field string. |
|
57 * @param aWord is a search string. |
|
58 * @return If aWord has been matched with aContactsField, |
|
59 * ETrue is returned. |
|
60 */ |
|
61 TBool Match(const TDesC& aContactsField, const TDesC& aWord); |
|
62 |
|
63 /** |
|
64 * From MFindUtil It tests a partial matching. |
|
65 * @since 2.6 |
|
66 * @param aItemString is a Contact field string |
|
67 * @param aSearchText is a search string |
|
68 * @return If aSearchText has been found in aItemString, |
|
69 * ETrue is returned. |
|
70 */ |
|
71 TBool MatchRefineL( const TDesC& aItemString, const TDesC &aSearchText); |
|
72 |
|
73 |
|
74 /** |
|
75 * From MFindUtil It checks whether aWord is valid. |
|
76 * @since 2.6 |
|
77 * @param aWord |
|
78 * @return ETrue is returned always. |
|
79 */ |
|
80 TBool IsWordValidForMatching(const TDesC& aWord); |
|
81 |
|
82 /** |
|
83 * From MFindUtil It tests a partial matching. |
|
84 * @since 5.0 |
|
85 * @param aItemString is a field string |
|
86 * @param aSearchText is a search string |
|
87 * @param aNextChars is a reference to buffer where next possible characters are saved. |
|
88 * The HBufC buffer may be re-allocated by this method. |
|
89 * In that case the pointer reference is modified to point to the re-allocated object. |
|
90 * @return If aSearchText has been found in aItemString, |
|
91 * ETrue is returned. |
|
92 */ |
|
93 TBool MatchAdaptiveRefineL( const TDesC& aItemString, |
|
94 const TDesC& aSearchText, |
|
95 HBufC*& aNextChars); |
|
96 |
|
97 /** |
|
98 * From MFindUtil |
|
99 * Current input text is handled by this model |
|
100 * |
|
101 * @since S60 v3.2.3 |
|
102 * @param aItemString Reference to the searching target |
|
103 * @param aSearchText Reference to text in find pane |
|
104 * @param aPolicy Reference to identify the different match policy |
|
105 * @param aConverter Reference to the converter interface, with which the aSearchText |
|
106 * will be converted into other kind of str, such numeric string according to |
|
107 * the ITUT keyboard key map |
|
108 * @return ETrue for handling by this model; otherwise EFalse |
|
109 */ |
|
110 virtual TBool MatchRefineL( const TDesC& aItemString, const TDesC& aSearchText, |
|
111 TMatchPolicy aPolicy, MFindStringConverter* aConverter); |
|
112 |
|
113 /** |
|
114 * From CFindUtilBase. Overrides the base function to find the input language |
|
115 * @since 3.1 |
|
116 */ |
|
117 void CFindUtilWestern::OpenL(); |
|
118 private: |
|
119 /** |
|
120 * Derived from MCenRepNotifyHandlerCallback |
|
121 * Receive a notification from central repository server |
|
122 */ |
|
123 void HandleNotifyInt(TUint32 aId, TInt aNewValue); |
|
124 private: |
|
125 CRepository* iRepository; |
|
126 TInt iInputLanguage; |
|
127 CCenRepNotifyHandler* iNotifyHandler; |
|
128 CFindUtilKorean *iFindUtilKorean; |
|
129 HBufC* iDigraphChars; |
|
130 }; |
|
131 |
|
132 |
|
133 #endif // __FINDUTILWESTERN__ |
|
134 |
|
135 // End of File |