18 |
18 |
19 #ifndef CLOCREQUESTORUTILSRESOLVER_H_ |
19 #ifndef CLOCREQUESTORUTILSRESOLVER_H_ |
20 #define CLOCREQUESTORUTILSRESOLVER_H_ |
20 #define CLOCREQUESTORUTILSRESOLVER_H_ |
21 |
21 |
22 // INCLUDES |
22 // INCLUDES |
23 #include <cntdb.h> // MIdleFindObserver |
23 #include <e32base.h> |
24 #include <PbkFields.hrh> // TPbkFieldId |
|
25 #include <centralrepository.h> |
|
26 #include <cenrepnotifyhandler.h> |
|
27 |
24 |
28 //FORWARD DECLARATION |
25 //FORWARD DECLARATION |
29 class CPbkFieldIdArray; |
|
30 class CPbkIdleFinder; |
|
31 class CPbkContactEngine; |
|
32 class CActiveSchedulerWait; |
|
33 class CPosRequestor; |
26 class CPosRequestor; |
34 class MVPbkContactOperationBase; |
|
35 class MVPbkContactLinkArray; |
|
36 class MVPbkStoreContact; |
|
37 class MVPbkFieldTypeList; |
|
38 class CPbk2SortOrderManager; |
|
39 class MPbk2ContactNameFormatter; |
|
40 |
27 |
41 // CLASS DECLARATION |
28 // CLASS DECLARATION |
42 |
29 |
43 /** |
30 /** |
44 * This class is a version requestor utilities with resolving. |
31 * This class is a version requestor utilities with resolving. |
45 * @lib locutils.lib |
32 * @lib locutils.lib |
46 * @since 3.0 |
33 * @since 3.0 |
47 */ |
34 */ |
48 class CLocRequestorUtilsResolver : public CBase, |
35 class CLocRequestorUtilsResolver : public CBase |
49 public MCenRepNotifyHandlerCallback |
|
50 { |
36 { |
51 public: // Constructors and destructor |
37 public: // Constructors and destructor |
52 |
38 |
53 /** |
39 /** |
54 * Symbian OS constructor |
40 * Symbian OS constructor |
106 |
92 |
107 /** |
93 /** |
108 * The Symbian 2nd Phase Constructor is always Private |
94 * The Symbian 2nd Phase Constructor is always Private |
109 */ |
95 */ |
110 void ConstructL(); |
96 void ConstructL(); |
111 |
|
112 private: |
|
113 /** |
|
114 * From base class MCenRepNotifyHandlerCallback |
|
115 * This callback method is used to notify the client about |
|
116 * changes for integer value keys, i.e. key type is EIntKey. |
|
117 * |
|
118 * @param aId Id of the key that has changed. |
|
119 * @param aNewValue The new value of the key. |
|
120 */ |
|
121 virtual void HandleNotifyInt( TUint32 aId, TInt aNewValue ); |
|
122 |
|
123 /** |
|
124 * This callback method is used to notify the client about errors |
|
125 * in the handler. Any error in handling causes the handler to stop |
|
126 * handling any more notifications. |
|
127 * |
|
128 * @param aId Id of the key this instance listens for or if |
|
129 * notifications for whole repository are listened, could |
|
130 * also be KInvalidNotificationId. |
|
131 * @param aError Error code. |
|
132 * @param aHandler Pointer to the handler instance. |
|
133 */ |
|
134 virtual void HandleNotifyError( TUint32 aId, TInt aError, |
|
135 CCenRepNotifyHandler* aHandler ); |
|
136 |
|
137 private: // New Methods |
|
138 /** |
|
139 * This resolves the requestor by searching the contacts database |
|
140 * based on the requestor Id Information. |
|
141 * This searches only the default contact database now. |
|
142 */ |
|
143 void ResolveRequestorNameL( CPosRequestor& aRequestor ); |
|
144 |
|
145 /** |
|
146 * This resolves the requestor by searching the contacts database |
|
147 * based on Phone Number. This searches only the default contact |
|
148 * database now. |
|
149 */ |
|
150 void SearchByPhoneNumberL( CPosRequestor& aRequestor ); |
|
151 |
|
152 /** |
|
153 * This resolves the requestor by searching the contacts database |
|
154 * based on Other Fields. Used to search E-mail , SIP URL and Web URL |
|
155 * type fields. This searches only the default contact database now. |
|
156 */ |
|
157 void SearchByOtherFieldsL( CPosRequestor& aRequestor, |
|
158 TPbkFieldId aFieldType ); |
|
159 |
|
160 /** |
|
161 * This resolves the requestor by searching for the requestor |
|
162 * string in al the fields in the contacts database. |
|
163 * This searches only the default contact database now. |
|
164 */ |
|
165 void SearchByAllFieldsL( CPosRequestor& aRequestor ); |
|
166 |
|
167 /** |
|
168 * The Contact Searchs based on other fields can return contact cards |
|
169 * that do not match in the specified field but in some other field. |
|
170 * This method checks if the match occurs in the exact specified field. |
|
171 */ |
|
172 TBool IsContactExactRequestorMatchL( CPosRequestor& aRequestor, |
|
173 TContactItemId& aCntItemId, |
|
174 TPbkFieldId aFieldType ); |
|
175 |
|
176 /** |
|
177 * This sets the contact card name in the requestor. |
|
178 * Also the Requestor Format is changes to GenericName |
|
179 */ |
|
180 void SetContactNameToRequestorL( CPosRequestor& aRequestor, |
|
181 TContactItemId& aCntItemId ); |
|
182 |
|
183 private: // member data |
|
184 // Own : Handle to the Contact Engine used to resolve the requestors |
|
185 CPbkContactEngine* iPbkContactEngine; |
|
186 |
|
187 // Central repository instance. |
|
188 CRepository* iCenRepSession; |
|
189 |
|
190 // Central repository notify handler instance. |
|
191 CCenRepNotifyHandler* iCenRepNotifyHandler; |
|
192 |
|
193 // Matched numbers |
|
194 TInt iNumDigitsToMatch; |
|
195 }; |
97 }; |
196 |
98 |
197 #endif // CLOCREQUESTORUTILSRESOLVER_H_ |
99 #endif // CLOCREQUESTORUTILSRESOLVER_H_ |
198 |
100 |
199 // End of File |
101 // End of File |