|
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: Declares server contacts array |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MCASERVERCONTACTSARRAYPC_H |
|
21 #define MCASERVERCONTACTSARRAYPC_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <bamdesca.h> |
|
25 #include <badesca.h> |
|
26 #include "ChatDefinitions.h" //KTab |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 |
|
30 class MCAStoredContact; |
|
31 class MDesCArray; |
|
32 |
|
33 // Helper struct for holding the identification, nickname and wvid of contact |
|
34 // contains also information about nicname existense in phone for some cases. |
|
35 struct TCAServerContact |
|
36 { |
|
37 TPtrC iIdentification; |
|
38 TPtrC iNickName; |
|
39 TPtrC iWVID; |
|
40 TBool iExistInPhone; |
|
41 }; |
|
42 |
|
43 |
|
44 |
|
45 // CLASS DECLARATION |
|
46 |
|
47 /** |
|
48 * This class is decorated array for list box |
|
49 * |
|
50 * @lib chat.app |
|
51 * @since 2.1 |
|
52 */ |
|
53 class MCAServerContactsArrayPC: public MDesCArray |
|
54 { |
|
55 |
|
56 |
|
57 public: // New functions |
|
58 |
|
59 |
|
60 /** |
|
61 * Sorts the array |
|
62 */ |
|
63 virtual void Sort() = 0; |
|
64 |
|
65 /** |
|
66 * Adds an item to iNickNames and iWVIds arrays. |
|
67 * @param aNickName nickname of the contact. can be KNullDesC |
|
68 * @param aWVId WV id of contact. mandatory |
|
69 */ |
|
70 virtual void AddL( const TDesC& aNickName, const TDesC& aWVId ) = 0; |
|
71 |
|
72 /** |
|
73 * Remove an item from given index |
|
74 */ |
|
75 virtual void Remove( TInt aIndex ) = 0; |
|
76 |
|
77 /** |
|
78 * Returns an index of given contact or KErrNotFound |
|
79 */ |
|
80 virtual TInt Find( const TDesC& aWVId ) const = 0; |
|
81 |
|
82 /* |
|
83 * Returns the array of wv ids |
|
84 */ |
|
85 virtual const MDesCArray& WVIDArray() const = 0; |
|
86 |
|
87 /** |
|
88 * Returns single contact from servercontacts array. |
|
89 * @param aIndex |
|
90 * @param aFindBoxTxt - Text in the findPane (Added for Fixing |
|
91 |
|
92 */ |
|
93 virtual const TCAServerContact* WVIdL( TInt aIndex, |
|
94 const TDesC& aFindBoxTxt = KNullDesC ) const = 0; |
|
95 |
|
96 /* |
|
97 * Returns the array of nicknames |
|
98 * corresponds to WVIDArray |
|
99 */ |
|
100 virtual const MDesCArray& NickNameArray() const = 0; |
|
101 |
|
102 virtual void ReplaceL( CDesCArray* aNickNames, |
|
103 CDesCArray* aWVIds, |
|
104 const TDesC& aIconTabulator, |
|
105 CDesCArray* aIdentifications = NULL ) = 0; |
|
106 |
|
107 /** |
|
108 * From MDesCArray Returns the number of descriptor |
|
109 * elements in a descriptor array |
|
110 * @return The number of descriptor elements in a descriptor array |
|
111 */ |
|
112 virtual TInt MdcaCount() const = 0; |
|
113 |
|
114 /** |
|
115 * From MDesCArray Indexes into a descriptor array |
|
116 * @param aIndex The position of the descriptor element within a |
|
117 * descriptor array. The position is relative to zero; i.e. zero |
|
118 * implies the first descriptor element in a descriptor array. |
|
119 * @return A 16 bit non-modifiable pointer descriptor representing the |
|
120 * descriptor element located at position aIndex within a |
|
121 * descriptor array. |
|
122 */ |
|
123 virtual TPtrC MdcaPoint( TInt aIndex ) const = 0; |
|
124 |
|
125 public: |
|
126 /** |
|
127 * Destructor. |
|
128 */ |
|
129 virtual ~MCAServerContactsArrayPC() { }; |
|
130 |
|
131 |
|
132 |
|
133 }; |
|
134 |
|
135 #endif // MCAServerContactsArrayPC |
|
136 |
|
137 // End of File |