equal
deleted
inserted
replaced
48 * States involved in fetching the contacts |
48 * States involved in fetching the contacts |
49 */ |
49 */ |
50 enum |
50 enum |
51 { |
51 { |
52 ECreateView, |
52 ECreateView, |
|
53 EFetchAllLinks, |
53 EFetchContactBlock, |
54 EFetchContactBlock, |
54 EComplete |
55 EComplete |
55 }; |
56 }; |
56 |
57 |
57 /** |
58 /** |
214 * 2nd phase constructor |
215 * 2nd phase constructor |
215 */ |
216 */ |
216 void ConstructL(CVPbkContactManager& aContactManager, MDataStoreObserver& aObserver,const TDesC& aUri); |
217 void ConstructL(CVPbkContactManager& aContactManager, MDataStoreObserver& aObserver,const TDesC& aUri); |
217 |
218 |
218 /** |
219 /** |
|
220 * Check next state of state machine for contacts retrieval and perform transition |
|
221 */ |
|
222 void CheckNextState(); |
|
223 |
|
224 /** |
219 * Handles the operations for a single contact after it is fetched |
225 * Handles the operations for a single contact after it is fetched |
220 * @param aContact - The contact from database |
226 * @param aContact - The contact from database |
221 */ |
227 */ |
222 void HandleRetrievedContactL(MVPbkStoreContact* aContact); |
228 void HandleRetrievedContactL(MVPbkStoreContact* aContact); |
223 |
229 |
237 void AddContactFieldsL(MVPbkBaseContact& aContact, TInt afieldtype, CPsData* aPhoneData); |
243 void AddContactFieldsL(MVPbkBaseContact& aContact, TInt afieldtype, CPsData* aPhoneData); |
238 |
244 |
239 /** |
245 /** |
240 * Fetches the data from contact links from the view |
246 * Fetches the data from contact links from the view |
241 */ |
247 */ |
242 void FetchlinksL(); |
248 void FetchAllInitialContactLinksL(); |
|
249 void FetchContactsBlockL(); |
243 |
250 |
244 /** |
251 /** |
245 * Reads the fields to cache from the central repository |
252 * Reads the fields to cache from the central repository |
246 */ |
253 */ |
247 void ReadFieldsToCacheFromCenrepL(); |
254 void ReadFieldsToCacheFromCenrepL(); |
258 void CreateContactFetchViewL(); |
265 void CreateContactFetchViewL(); |
259 |
266 |
260 /** |
267 /** |
261 * Issues request to active object to call RunL method |
268 * Issues request to active object to call RunL method |
262 */ |
269 */ |
263 void IssueRequest(); |
270 void IssueRequest( TInt aTimeDelay ); |
264 |
271 |
265 /** |
272 /** |
266 * Creates a sort order depending on the fields specified in the cenrep |
273 * Creates a sort order depending on the fields specified in the cenrep |
267 * @param aMasterList - aMasterList (i.e list containing all the vpbk fields) |
274 * @param aMasterList - aMasterList (i.e list containing all the vpbk fields) |
268 */ |
275 */ |
273 */ |
280 */ |
274 TBool IsMyCard( const MVPbkBaseContact& aContact ); |
281 TBool IsMyCard( const MVPbkBaseContact& aContact ); |
275 |
282 |
276 private: |
283 private: |
277 |
284 |
|
285 RPointerArray<MVPbkContactLink> iInitialContactLinks; |
278 |
286 |
279 /** |
287 /** |
280 * Flags for store operations |
288 * Flags for store operations |
281 */ |
289 */ |
282 TInt iAllContactLinksCount; |
290 TInt iInitialContactCount; // Initial contact count in a view |
283 TInt iFetchedContactCount; |
291 TInt iFetchBlockLowerNumber; |
|
292 TInt iFetchBlockUpperNumber; |
|
293 TInt iVPbkCallbackCount; |
284 TBool iContactViewReady; |
294 TBool iContactViewReady; |
285 TCachingStatus iOngoingCacheUpdate; |
295 TCachingStatus iOngoingCacheUpdate; |
286 |
296 |
287 /** |
297 /** |
288 * Variable to store the next state for the RunL to take appropriate action |
298 * Variable to store the next state for the RunL to take appropriate action |