|
1 /* |
|
2 * Copyright (c) 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: Interface for CCAMainViewArrayPC, to be used by the |
|
15 * single view array decorator to fill the listbox of the single view |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef MCAMAINVIEWARRAYPC_H |
|
21 #define MCAMAINVIEWARRAYPC_H |
|
22 |
|
23 #include <e32base.h> |
|
24 #include <BADESCA.h> |
|
25 |
|
26 #include "TEnumsPC.h" |
|
27 #include "MCAMainViewObserverManagerPC.h" |
|
28 #include "MCAPresenceError.h" |
|
29 #include "MCAContactListModel.h" |
|
30 #include "MCAPresence.h" |
|
31 #include "ChatDefinitions.h" |
|
32 #include "MCAListInitObserver.h" |
|
33 |
|
34 const TInt KInitIndex = 0; |
|
35 const TInt KOwnDataIndex = 0; // default value as per UI spec |
|
36 const TInt KOpenChatsIndex = 1; // default value as per UI spec |
|
37 |
|
38 |
|
39 //Forward Declarations |
|
40 class MCAMainViewObserverPC; |
|
41 class MCAStoredContact; |
|
42 class MCAInvitation; |
|
43 class MCAServerContactsArrayPC; |
|
44 class MCASingleListViewCB; |
|
45 class MCAArrayItemPC; |
|
46 // INTERFACE DECLARATION |
|
47 // Helper struct for holding the aItemID, aListID, aItemType |
|
48 struct TCAItemDetails |
|
49 { |
|
50 TBuf< 2 * KMaxWVIDLength > aItemID; |
|
51 TBuf< KMaxWVIDLength > aListID; |
|
52 TEnumsPC::TItem aItem; |
|
53 }; |
|
54 /* |
|
55 * MCAMainViewArrayPC: This is main interface of arraywrapper on |
|
56 * Process component side.UI Side array decorator has to use this |
|
57 * array and get the required details. |
|
58 * |
|
59 * @lib wvuiprocessng.lib |
|
60 */ |
|
61 class MCAMainViewArrayPC : public MCAMainViewObserverManagerPC |
|
62 { |
|
63 |
|
64 public: //destructor |
|
65 virtual ~MCAMainViewArrayPC() {}; |
|
66 |
|
67 |
|
68 public: // From MCAMainViewObserverManagerPC |
|
69 /** |
|
70 * AddObserverL: To add the UI component as an observer to listen to the |
|
71 * event from the MainViewArrayPC |
|
72 * @see MCAMainViewObserverManagerPC |
|
73 * @return void |
|
74 */ |
|
75 virtual void AddObserverL( MCAMainViewObserverPC* aObserver ) = 0; |
|
76 |
|
77 /** |
|
78 * RemoveObserver: To remove the UI component as an observer to the |
|
79 * events from the MainViewArrayPC |
|
80 * @see MCAMainViewObserverManagerPC |
|
81 * @return void |
|
82 */ |
|
83 virtual void RemoveObserver( MCAMainViewObserverPC* aObserver ) = 0; |
|
84 |
|
85 /** |
|
86 * AddObserverL: To add the UI component as an observer to listen to the |
|
87 * event from the MainViewArrayPC |
|
88 * @see MCAMainViewObserverManagerPC |
|
89 * @return void |
|
90 */ |
|
91 virtual void AddObserver( MCASyncObserverPC* aObserver ) = 0; |
|
92 |
|
93 /** |
|
94 * RemoveObserver: To remove the UI component as an observer to the |
|
95 * events from the MainViewArrayPC |
|
96 * @see MCAMainViewObserverManagerPC |
|
97 * @return void |
|
98 */ |
|
99 virtual void RemoveObserver( ) = 0; |
|
100 |
|
101 public: |
|
102 |
|
103 |
|
104 /** |
|
105 * SetSkipStorageEvents: Called by UI component to set flag for skipping |
|
106 * storage events |
|
107 * @param aSkip : A flag to check whether to skip strage events or not |
|
108 * @return void |
|
109 */ |
|
110 virtual void SetSkipStorageEvents( TBool aSkip ) = 0; |
|
111 |
|
112 /** |
|
113 * GetSkipStorageEvents: Called by UI component to get the flag for skipping |
|
114 * storage events |
|
115 * @return boolean |
|
116 */ |
|
117 virtual TBool GetSkipStorageEvents() = 0; |
|
118 |
|
119 /** |
|
120 * Count: Called by UI components to get total count of array |
|
121 * @return integer: Count of array |
|
122 */ |
|
123 virtual TInt Count() const = 0; // total count of array |
|
124 |
|
125 /** |
|
126 * GetType: Function to get the type of list item |
|
127 * @param aIndex: index of the list item |
|
128 * @return TEnumsPC::TItem: type of the list item as EContactItem, |
|
129 * EOwnStatusItem etc |
|
130 */ |
|
131 virtual TEnumsPC::TItem GetType( TInt aIndex ) const = 0; |
|
132 |
|
133 /** |
|
134 * IsCollapsed: To find if the list box item is collapsed |
|
135 * @param aIndex: index of the list item |
|
136 * @return bool: True if the list item is collapsed else false. |
|
137 */ |
|
138 virtual TBool IsCollapsed( TInt aIndex ) const = 0; |
|
139 |
|
140 /** |
|
141 * IsMsgPending: To find if there are any pending messages to |
|
142 * decide the icons for display |
|
143 * @param aIndex: index of the list item |
|
144 * @return bool: True if there are pending messages else false. |
|
145 */ |
|
146 virtual TBool IsMsgPending( TInt aIndex ) = 0; |
|
147 |
|
148 /** |
|
149 * IsBlocked: To find if the list item is a blocked contact |
|
150 * @param aIndex: index of the list item |
|
151 * @return bool: True if the list item is a blocked contact else false |
|
152 */ |
|
153 virtual TBool IsBlocked( TInt aIndex ) const = 0; |
|
154 |
|
155 /** |
|
156 * ForceExpanded: To expand or collapse all the list items |
|
157 * @param aAllExpanded: True if all items have to be expanded else false |
|
158 * @return bool: True if there are pending messages else false. |
|
159 */ |
|
160 virtual void ForceExpanded( TBool aAllExpanded ) = 0; |
|
161 |
|
162 /** |
|
163 * IsForceExpanded: To find if all the list items have been force expanded |
|
164 * @return bool: True if all the list items are force expanded else false |
|
165 */ |
|
166 virtual TBool IsForceExpanded() const = 0; |
|
167 |
|
168 /** |
|
169 * GetOnlineStatus: To get the online status of the list item as Online, |
|
170 * Away, Busy etc |
|
171 * @param aIndex: Index of the list item |
|
172 * @return TEnumsPC::TOnlineStatus |
|
173 */ |
|
174 virtual TEnumsPC::TOnlineStatus GetOnlineStatus( TInt aIndex ) = 0; |
|
175 |
|
176 |
|
177 /** |
|
178 * SetCollapsed: To set the list item to a collapsed or expanded state |
|
179 * @param aStatus: The collapsed or expanded state to be set for the list item |
|
180 * @param aIndex: Index of the list item whose state has to be set |
|
181 * @return void |
|
182 */ |
|
183 virtual void SetCollapsed( TBool aStatus , TInt aIndex ) = 0; |
|
184 |
|
185 virtual void SetSelected( TBool aSelected, TInt aIndex ) = 0; |
|
186 |
|
187 virtual void GetSelectedL( CDesCArray& aSelectedContact, |
|
188 CDesCArray* aSelectedIdentifications, |
|
189 TEnumsPC::TFilterType aFilter ) = 0; |
|
190 |
|
191 /** |
|
192 * SetMsgPending: To set the pending messages for a list item |
|
193 * @param aPendingMsgs: The no. of pending messages to be set for the list item |
|
194 * @param aIndex: Index of the list item |
|
195 * @return void |
|
196 */ |
|
197 virtual void SetMsgPending( TInt aPendingMsgs, TInt aIndex ) = 0; |
|
198 |
|
199 /** |
|
200 * SetBlocked: To set the blocked status of a list item of type contact |
|
201 * @param aStatus: The blocked status to be set for the list item |
|
202 * @param aIndex: Index of the list item whose status has to be set |
|
203 * @return void |
|
204 */ |
|
205 virtual void SetBlocked( TBool aStatus , TInt aIndex ) = 0; |
|
206 |
|
207 /** |
|
208 * SetOnlineStatus: To set the online status of a list item |
|
209 * @param aStatus: The online status to be set for the list item |
|
210 * @param aIndex: Index of the list item whose status has to be set |
|
211 * @return void |
|
212 */ |
|
213 virtual void SetOnlineStatus( TEnumsPC::TOnlineStatus aStatus, |
|
214 TInt aIndex ) = 0; |
|
215 |
|
216 /** |
|
217 * GetItemNameText: To get item name of each list item |
|
218 * @param aIndex: Index of the list item whose name is to be returned |
|
219 * @return TPtrC: Name of the list item |
|
220 */ |
|
221 virtual TPtrC GetItemNameText( TInt aIndex ) = 0; |
|
222 |
|
223 /** |
|
224 * ClearArray: clear everything in the array |
|
225 * @return void |
|
226 */ |
|
227 virtual void ClearArray( TBool aClearOpenChatsArray ) = 0; |
|
228 // clear everything in the array..... |
|
229 |
|
230 /** |
|
231 * RefreshArray: clear and fill with the new data in the array |
|
232 * @return void |
|
233 */ |
|
234 virtual void ResetArray( TBool aClearOpenChatsArray ) = 0; |
|
235 |
|
236 /** |
|
237 * SetDefaultFilter: To set the default filters of each item |
|
238 * @param aMyFilter: TEnumsPC::TFilterType to be set |
|
239 * @return void |
|
240 */ |
|
241 virtual void SetDefaultFilter( TEnumsPC::TFilterType iMyFilter ) = 0; |
|
242 |
|
243 /** |
|
244 * ResetDefaultFilter: To reset the default filters of each item |
|
245 * @return void |
|
246 */ |
|
247 virtual void ResetDefaultFilter() = 0; |
|
248 |
|
249 /** |
|
250 * GetDefaultFilter: To get the default filters of list item |
|
251 * @return TEnumsPC::TFilterType: type of filter |
|
252 */ |
|
253 virtual TEnumsPC::TFilterType GetDefaultFilter() const = 0; |
|
254 |
|
255 /** |
|
256 * ClientType: To get the client type of list item at given index |
|
257 * @return TEnumsPC::TClientType: type of client |
|
258 */ |
|
259 virtual TEnumsPC::TClientType ClientType( TInt aIndex ) = 0; |
|
260 |
|
261 /** |
|
262 * Selected: To know if the list item at given index is selected currently |
|
263 * @param aIndex: index of list item |
|
264 * @return bool: true if the list item at given index is selected currently else false |
|
265 */ |
|
266 virtual TBool Selected( TInt aIndex ) = 0; |
|
267 |
|
268 /** |
|
269 * IsWatched: To get the status on whether the list item at given index is |
|
270 * being watched for notifications on that contacts online status changes |
|
271 * @param aIndex: index of list item |
|
272 * @return bool: true if the contact is being watched else false |
|
273 */ |
|
274 virtual TBool IsWatched( TInt aIndex ) = 0; |
|
275 |
|
276 /** |
|
277 * Synchronised: To get the synchronised status for the list item |
|
278 * @param aIndex: index of list item |
|
279 * @return TEnumsPC::TSyncStatus: the synchronization status of the list item |
|
280 */ |
|
281 virtual TEnumsPC::TSyncStatus Synchronised( TInt aIndex ) = 0; |
|
282 |
|
283 /** |
|
284 * IsAllSynchronised: To get the synchronised status of all the list items |
|
285 * @return TEnumsPC::TSyncStatus: the synchronization status of all the items |
|
286 */ |
|
287 virtual TEnumsPC::TSyncStatus IsAllSynchronised() = 0; |
|
288 |
|
289 /** |
|
290 * AddWatcher: To add watcher to presence |
|
291 */ |
|
292 virtual void AddWatcherL( TPtrC contact/*wvid*/ ) = 0; |
|
293 |
|
294 /** |
|
295 * RemoveWatcher: To remove watcher from presence |
|
296 * |
|
297 */ |
|
298 virtual void RemoveWatcherL( TPtrC contact/*wvid*/ ) = 0; |
|
299 |
|
300 /** |
|
301 * Refreshes friends-storage presence data. |
|
302 */ |
|
303 virtual void RefreshFriendsL() = 0; |
|
304 |
|
305 /** |
|
306 * Places all friends (from aUserList) that are online to aOnlineList |
|
307 * and users that are offline to aOfflineList. |
|
308 * @param aUserList List of users, whose presence data is to be fetched. |
|
309 * @param aOnlineList List of users, that are online, can be NULL. |
|
310 * @param aOfflineList List of users, that are offline, can be NULL. |
|
311 * @param aUpdateStorage If ETrue, contact storage flags are updated |
|
312 */ |
|
313 virtual void GetOnlineUsersL( |
|
314 const CDesCArray *aUsers, |
|
315 CDesCArray* aOnlineList, |
|
316 CDesCArray* aOfflineList, |
|
317 TBool aUpdateStorage = EFalse ) = 0; |
|
318 /** |
|
319 * Invoke the fetch contacts method from presence component |
|
320 */ |
|
321 virtual void FetchContactsL() = 0; |
|
322 /** |
|
323 * Changes client own presence status, and sets status message |
|
324 * @param aStatus Presence status -online,oflline etc |
|
325 * @param aStatusMessage Presence status message |
|
326 * @return Error code. |
|
327 */ |
|
328 virtual TInt ChangeStatusL( TEnumsPC::TOnlineStatus aStatus, |
|
329 const TDesC& aStatusMessage ) = 0; |
|
330 |
|
331 /** |
|
332 * Changes presence status message |
|
333 * @param aStatusMessage Presence status message |
|
334 * @return Operation error. |
|
335 */ |
|
336 virtual TInt ChangeStatusMessageL( const TDesC& aStatusMessage ) = 0; |
|
337 |
|
338 /** |
|
339 * StatusL: To get the own status like Online, Away, Busy etc |
|
340 * @return TEnumsPC::TOnlineStatus |
|
341 */ |
|
342 virtual TEnumsPC::TOnlineStatus StatusL() = 0; |
|
343 |
|
344 /** |
|
345 * GetOwnStatusConverter: To get TEnumsPC:TOnlineStatus type of enum from |
|
346 * the presence side MCAPresence::TPresenceStatus enums for own status |
|
347 * @param aPresenceStatus: presence side MCAPresence::TPresenceStatus enums |
|
348 * @return TEnumsPC::TOnlineStatus |
|
349 */ |
|
350 virtual TEnumsPC::TOnlineStatus GetOwnStatusConverter( |
|
351 MCAPresence::TPresenceStatus aPresenceStatus ) = 0; |
|
352 public : |
|
353 |
|
354 /* |
|
355 * gets the alias of the specified contact at aIndex |
|
356 * @param aIndex: index of contact |
|
357 * @return the alias |
|
358 */ |
|
359 virtual const TDesC& GetSelectedContactAlias( TInt aIndex ) = 0; |
|
360 |
|
361 /* |
|
362 * gets the nickname of the specified contact at aIndex |
|
363 * @param aIndex: index of contact |
|
364 * @return the nickname |
|
365 */ |
|
366 virtual const TDesC& GetSelectedContactNickname( TInt aIndex ) = 0; |
|
367 |
|
368 /* |
|
369 * gets the user id of the specified contact at aIndex |
|
370 * @param aIndex: index of contact |
|
371 * @return the user id |
|
372 */ |
|
373 virtual const TDesC& GetSelectedContactUserId( TInt aIndex ) = 0; |
|
374 |
|
375 /* |
|
376 * gets the identification of the specified contact at aIndex |
|
377 * @param aIndex: index of contact |
|
378 * @return the identification |
|
379 */ |
|
380 virtual const TDesC& GetSelectedContactIdentification( TInt aIndex ) = 0; |
|
381 |
|
382 |
|
383 public: |
|
384 |
|
385 /** |
|
386 * IgnoreOfflineStatusL: To decide whether to ignore the offline status of a contact |
|
387 * @param aIndex: index of the contact item in the listbox |
|
388 * @return bool: true if the offline status of contact can be ignored else return false |
|
389 */ |
|
390 virtual TInt IgnoreOfflineStatusL( TInt aIndex ) = 0; |
|
391 /** |
|
392 * SetMessageReadInterfaceL: Calls the MessageReadInterface() of engine component |
|
393 * to set the read interface |
|
394 * @param aIndex: index of contact for whom the read interface (conversation) has |
|
395 * to be set |
|
396 * @return void |
|
397 */ |
|
398 virtual void SetMessageReadInterfaceL( TInt aIndex ) = 0; |
|
399 |
|
400 /** |
|
401 * ChatExistsL: Checks if there is an existing chat for the contact |
|
402 * at index |
|
403 * @param aIndex: index of contact for which the existing |
|
404 * conversation has to be checked |
|
405 * @return bool: If chat exists for contact at aIndex return true |
|
406 * else return false |
|
407 */ |
|
408 virtual TBool ChatExistsL( TInt aIndex ) = 0; |
|
409 |
|
410 /** |
|
411 * IndexOfList: find the index of the list if the item is a contact list else find the |
|
412 * index of parent contactlist of the contact at aIndex |
|
413 * @param aIndex: index of contactitem or list whose list index has tto be returned |
|
414 * @return TInt: If the item is a contactlist type return aIndex else it will return |
|
415 * the index of the parent contactlist of the contactitem type |
|
416 */ |
|
417 virtual TInt IndexOfList( TInt aIndex, |
|
418 TBool aIgnoreOwnItem = EFalse, |
|
419 TBool aIgnoreEmptyLists = ETrue ) const = 0; |
|
420 |
|
421 /** |
|
422 * Check if synchronization of contact lists is done |
|
423 * @return ETrue if done |
|
424 */ |
|
425 virtual TBool IsSyncDoneL() = 0; |
|
426 |
|
427 |
|
428 /** |
|
429 * To create a contact list with given name |
|
430 * @param aDisplayName: name of the list to be created |
|
431 * @return KErrNone if list is created else retrun KErrAlreadyExists |
|
432 */ |
|
433 |
|
434 virtual TInt CreateContactListL( const TDesC& aDisplayName , |
|
435 TInt& aIndex ) = 0; |
|
436 |
|
437 /** |
|
438 * To sort the contact list in alphbetical order |
|
439 * @param alistId: list id of renamed contact list |
|
440 */ |
|
441 virtual TInt SortContactListAfterRenameL( const TDesC& aListId ) = 0 ; |
|
442 |
|
443 /** |
|
444 * Find if there is a list with given name already |
|
445 * @param aNamePtr: name of the list to be searched |
|
446 * @return KErrNone if theres no list with the name aNamePtr else return KErrAlreadyExists |
|
447 */ |
|
448 |
|
449 virtual TInt ListAlreadyExistsL( const TPtr aNamePtr ) = 0; |
|
450 |
|
451 /** |
|
452 * Check if there are any contact list in the contact lists |
|
453 * @return KErrGeneral if no contact list is available else return KErrNone |
|
454 */ |
|
455 virtual TInt ContactListsExistL() = 0; |
|
456 |
|
457 |
|
458 /** |
|
459 * Find the no. of contact items in the contact list |
|
460 * @param aIndex: the index of contact list |
|
461 * @return TInt: the no. of contact items in the list at aIndex |
|
462 */ |
|
463 virtual TInt CountOfContactsInList( TInt aIndex ) = 0; |
|
464 |
|
465 /** |
|
466 * Count of lists. |
|
467 * @return Count of lists. |
|
468 */ |
|
469 virtual TInt ListCountL() const = 0; |
|
470 |
|
471 /** |
|
472 * Delete the contact list |
|
473 * @param aIndex: ID of the list |
|
474 * @return Error code |
|
475 */ |
|
476 virtual TInt DeleteContactListL( TInt aIndex ) = 0; |
|
477 |
|
478 /** |
|
479 * Deletes one contact from server side contact list |
|
480 * @param aIndex: Index of list to be updated |
|
481 * @return Error code |
|
482 */ |
|
483 virtual TInt DeleteServerContactL( TInt aIndex ) = 0; |
|
484 |
|
485 /* |
|
486 * gets the list id of the specified list at aIndex |
|
487 * @param aIndex: index of list |
|
488 * @return the list id |
|
489 */ |
|
490 virtual const TDesC& GetSelectedListId( TInt aIndex ) = 0; |
|
491 |
|
492 /** |
|
493 * Find a contact from the store by wv User ID |
|
494 * @param aContactListId List which contains contact. |
|
495 * @param aId the User ID of the contact to find |
|
496 * @return The contact |
|
497 */ |
|
498 virtual TInt FindContactL( const TDesC& aContactListId, |
|
499 |
|
500 |
|
501 const TDesC& aId ) = 0; |
|
502 |
|
503 |
|
504 |
|
505 /** |
|
506 * Find a contact list from the store by wv User ID |
|
507 * @param aContactListId List which contains contact list id. |
|
508 * @return The contact list index |
|
509 */ |
|
510 virtual TInt FindContactListIndexL( const TDesC& aListId ) = 0; |
|
511 |
|
512 |
|
513 /** |
|
514 * Get the status text for the contact |
|
515 * @param aIndex: Index of contact item |
|
516 * @return Error code |
|
517 */ |
|
518 virtual const TDesC& StatusText( TInt aIndex ) const = 0; |
|
519 |
|
520 /** |
|
521 * Construct an array of contact list positions in model. |
|
522 * aPositionArray is cleared before appending positions! |
|
523 * @param aPositionArray array in which to store positions |
|
524 * @return none |
|
525 */ |
|
526 virtual void MapContactListPositions( RArray<TInt>& aPositionArray ) = 0; |
|
527 /* |
|
528 * gets the displayname of the specified List at aIndex |
|
529 * @param aIndex: index of list |
|
530 * @return the displayname |
|
531 */ |
|
532 |
|
533 virtual TPtrC DisplayName( TInt aIndex ) = 0; |
|
534 |
|
535 /** |
|
536 * SetDisplayName: To set/rename item name of each list item |
|
537 * @param aIndex: Index of the list item whose name is to be changed/set |
|
538 * @param aItemName: name to be set for the list item at specified index |
|
539 * @return TInt: Error code to check if the name has been set |
|
540 */ |
|
541 virtual TInt SetDisplayNameL( TInt aIndex, const TPtrC aItemName ) = 0; |
|
542 |
|
543 |
|
544 /** |
|
545 *Sets the selectionmode |
|
546 */ |
|
547 virtual void SetContactSelectionL( |
|
548 TEnumsPC::TListSelectionType aSelectionMode, |
|
549 TInt aSelectedListIndex ) = 0; |
|
550 /** |
|
551 *Sets the selectionmode |
|
552 */ |
|
553 virtual void ResetContactSelectionL() = 0; |
|
554 |
|
555 /** |
|
556 * Should the model show "All" item in beginning |
|
557 * of each contact list. |
|
558 * @param aShow If ETrue, first item in every contact list is "All" |
|
559 */ |
|
560 virtual void ShowAll( TBool aShow ) = 0; |
|
561 |
|
562 /** |
|
563 * GetFilteredCount |
|
564 */ |
|
565 virtual TInt GetFilteredCount( |
|
566 TEnumsPC::TFilterType aFilter, TInt aIndex ) = 0; |
|
567 |
|
568 /** |
|
569 * Clears all selected-flags |
|
570 */ |
|
571 virtual void ClearSelectedL( ) = 0; |
|
572 |
|
573 //for invitations |
|
574 /** |
|
575 * Returns index for given invitation |
|
576 * @param aIndex |
|
577 * @return index of invitation |
|
578 */ |
|
579 virtual TInt GetItemEngineIndex( TInt aIndex ) const = 0; |
|
580 |
|
581 /** |
|
582 * ToUpdatePresence: To get the information on whether presence has to be updated |
|
583 * by anding the two filters |
|
584 * @parm aFilter1: TEnumsPC::TFilterType |
|
585 * @parm aFilter2: TEnumsPC::TFilterType |
|
586 */ |
|
587 virtual TBool ToUpdatePresence( TEnumsPC::TFilterType aFilter1, |
|
588 TEnumsPC::TFilterType aFilter2 ) = 0; |
|
589 |
|
590 /** |
|
591 * Returns index of invitation for given wvid and |
|
592 * Deletes item from array. |
|
593 * @since 3.2 |
|
594 * @param Index of invitation |
|
595 */ |
|
596 virtual TInt FindInvitationAndDelete( |
|
597 const TDesC& aInviteID /*TInt aIndex*/ ) = 0; |
|
598 |
|
599 /** |
|
600 * Returns index of invitation for given wvid and |
|
601 * Deletes item from array. |
|
602 * @since 3.2 |
|
603 * @param Index of invitation |
|
604 */ |
|
605 virtual TInt FindInvitationAndDelete( TInt aIndex ) = 0; |
|
606 |
|
607 /** |
|
608 * Find any contact which id is aContactId |
|
609 * @param aContactId Contactid to recognize contact. |
|
610 * @return ETrue if contact found else EFalse |
|
611 */ |
|
612 virtual TBool FindAnyContactL( const TDesC& aContactId ) = 0; |
|
613 |
|
614 |
|
615 /** |
|
616 * Set a separate filter for the single list view array items |
|
617 * @param aFilter: filter to be set |
|
618 */ |
|
619 virtual void SetSingleListArrayFilter( |
|
620 TEnumsPC::TFilterType aFilter ) = 0; |
|
621 /** |
|
622 * Get a separate filter for the single list view array items |
|
623 * @return filter |
|
624 */ |
|
625 virtual TEnumsPC::TFilterType GetSingleListArrayFilter() = 0; |
|
626 |
|
627 /** |
|
628 * To set the filter type for engine |
|
629 */ |
|
630 virtual void SetFilter( TEnumsPC::TFilterType aFilter ) = 0; |
|
631 |
|
632 /** |
|
633 * To get the filter type for engine |
|
634 */ |
|
635 virtual TEnumsPC::TFilterType Filter() = 0; |
|
636 |
|
637 |
|
638 /** |
|
639 * Fills aOnlineList with the user id's from friends-list that are |
|
640 * online. |
|
641 * @param aOnlineList List that will be populated with online friends. |
|
642 * @param aFetchFromNetwork Fetch presence information from network |
|
643 */ |
|
644 virtual void GetOnlineContactsL( CDesCArray& aOnlineList, |
|
645 TBool aFetchFromNetwork = EFalse ) = 0; |
|
646 |
|
647 /** |
|
648 * Gets the details of the given index |
|
649 * like aItemId, aListId,aItemType. |
|
650 * @return teh structure filled with tha above details. |
|
651 */ |
|
652 virtual TCAItemDetails GetArrayItemIdDetails( TInt aIndex ) = 0; |
|
653 |
|
654 /** |
|
655 * Gets the Index, given item details |
|
656 * like aItemId, aListId,aItemType. |
|
657 * @return the index |
|
658 */ |
|
659 virtual TInt GetArrayItemIdIndexL( const TCAItemDetails& aItemDetails ) = 0; |
|
660 |
|
661 /** |
|
662 * Registers the singlelistview for callback. |
|
663 */ |
|
664 virtual void RegisterCallBack( MCASingleListViewCB* aSingleViewCB ) = 0; |
|
665 |
|
666 /** |
|
667 * UnRegisters the singlelistview for callback. |
|
668 */ |
|
669 virtual void UnRegisterCallBack( ) = 0; |
|
670 |
|
671 /** |
|
672 * @return returns ETrue if any contact is found in contactlists |
|
673 * else returns EFalse if no contact is found |
|
674 */ |
|
675 virtual TBool IsAnyContactFound() = 0; |
|
676 |
|
677 /** |
|
678 * Populate the group array iGroupArray with groups |
|
679 */ |
|
680 virtual void PopulateGroupsListL() = 0; |
|
681 |
|
682 /** |
|
683 * To set the group count down flag, for each logout. For the first time login |
|
684 * it is set in the constructor to EFalse. This flag ensures that the |
|
685 * initial deletion of groups from iGroupArray and the subsequent additions |
|
686 * of user created groups are not reflected on the UI |
|
687 */ |
|
688 virtual void ResetGroupCountDownOnLogout() = 0; |
|
689 |
|
690 |
|
691 virtual const TDesC& GetInviteItemID( TInt aIndex ) = 0; |
|
692 |
|
693 virtual const RPointerArray<MCAArrayItemPC>& GetOpenChatsArray() const = 0; |
|
694 |
|
695 /** |
|
696 * @returns the index of the given item W.R.T singlelistview. |
|
697 */ |
|
698 virtual TInt FindIndexOfOpenChatsItem( TEnumsPC::TItem aItemType, |
|
699 const TDesC& aId ) = 0; |
|
700 |
|
701 virtual TInt GetOpenChatsActiveIndex()const = 0; |
|
702 |
|
703 /** |
|
704 * Sets the focus to the owndata on logout. |
|
705 */ |
|
706 virtual void SetCurrentItemIndexL( TBool aFreshLogin = EFalse ) = 0; |
|
707 |
|
708 |
|
709 public: //Added methods for sorting of openchats |
|
710 |
|
711 virtual void InsertConversationItemL( const TDesC& aUserId, |
|
712 const TDesC& aIdentification ) = 0; |
|
713 virtual void RemoveConversationItem( const TDesC& aUserId ) = 0; |
|
714 |
|
715 virtual TBool IsOpenChatsMsgPending( |
|
716 const TEnumsPC::TItem aType, |
|
717 const TDesC& aId ) = 0; |
|
718 |
|
719 /** |
|
720 * First pending message containers WVID. |
|
721 * @return First pending message WVID. |
|
722 */ |
|
723 virtual const TDesC& PendingMessageInfo() = 0; |
|
724 |
|
725 /** |
|
726 * First pending message containers groupID. |
|
727 * @param First pending message groupName. |
|
728 * @return First pending message groupID. |
|
729 */ |
|
730 virtual const TDesC& ChatGroupPendingMessageInfo( TDesC& aGroupName ) = 0; |
|
731 |
|
732 |
|
733 /** |
|
734 * RegisterObserverL: To add the UI component as an observer to listen to the |
|
735 * event from the MainViewArrayPC |
|
736 * @see MCAListInitObserver |
|
737 * @return void |
|
738 */ |
|
739 virtual void RegisterObserverL( MCAListInitObserver* aObserver ) = 0; |
|
740 |
|
741 /** |
|
742 * UnRegisterObserverL: |
|
743 * @see MCAListInitObserver |
|
744 * @return void |
|
745 */ |
|
746 virtual void UnRegisterObserverL() = 0; |
|
747 |
|
748 /** |
|
749 * AIsListInitializationCompleteL: |
|
750 * @return Bool value |
|
751 */ |
|
752 virtual TBool IsListInitializationCompletedL() = 0; |
|
753 |
|
754 |
|
755 /** |
|
756 * Refresh the conversation item in openchats to |
|
757 * reflect the changes upon addation/chang/deletion of a contact |
|
758 * @param aContactId: userId whose nickname is changed. |
|
759 */ |
|
760 virtual void RefreshConversationItemText( const TDesC& aContactId ) = 0; |
|
761 /** |
|
762 * Refresh the invitation item in openchats to |
|
763 * reflect the changes upon addation/chang/deletion of a contact |
|
764 * @param aContactId: userId whose nickname is changed. |
|
765 */ |
|
766 virtual void RefreshInvitationItemTextL( const TDesC& aContactId ) = 0; |
|
767 /* |
|
768 *Get the index of top pending conversation in single list view. |
|
769 *This index can be used high light that perticular item. |
|
770 */ |
|
771 virtual TInt GetIndexOfTopPendingMessage() = 0; |
|
772 |
|
773 }; |
|
774 |
|
775 #endif // MCAMAINVIEWARRAYPC_H |
|
776 |