1 /* |
|
2 * Copyright (c) 2006, 2007 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: s_enginecontmgtextfeatures.cpp |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef S_VIMPSTSTORAGECONTACTLIST_H |
|
19 #define S_VIMPSTSTORAGECONTACTLIST_H |
|
20 |
|
21 #include "mvimpststoragecontactlist.h" |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32std.h> |
|
25 #include <e32base.h> |
|
26 |
|
27 class vimpststoragecontactlist_stub : public MVIMPSTStorageContactList |
|
28 { |
|
29 public: |
|
30 |
|
31 /** |
|
32 * @see MVIMPSTStorageContactList |
|
33 */ |
|
34 const TDesC& ListId() const; |
|
35 |
|
36 /** |
|
37 * @see MVIMPSTStorageContactList |
|
38 */ |
|
39 TPtrC DisplayName() const; |
|
40 |
|
41 /** |
|
42 * @see MVIMPSTStorageContactList |
|
43 */ |
|
44 TInt Count() const; |
|
45 |
|
46 /** |
|
47 * @see MVIMPSTContactList |
|
48 */ |
|
49 MVIMPSTStorageContact& operator[]( TInt aIndex ) const; |
|
50 |
|
51 /** |
|
52 * @see MVIMPSTStorageContactList |
|
53 */ |
|
54 MVIMPSTStorageContact& FilteredContact( |
|
55 TInt aIndex, TVIMPSTEnums::TFilterType aFilter ) const; |
|
56 |
|
57 /** |
|
58 * @see MVIMPSTStorageContactList |
|
59 */ |
|
60 virtual TInt FilteredCount( |
|
61 TVIMPSTEnums::TFilterType aFilter ) const; |
|
62 |
|
63 |
|
64 /** |
|
65 * @see MVIMPSTStorageContactList |
|
66 */ |
|
67 void Sort(); |
|
68 |
|
69 /** |
|
70 * @see MVIMPSTStorageContactList |
|
71 */ |
|
72 void ResortContact( MVIMPSTStorageContact* aContact ); |
|
73 |
|
74 /** |
|
75 * @see MVIMPSTStorageContactList |
|
76 */ |
|
77 TInt FindIndexOfContact( |
|
78 const MVIMPSTStorageContact* aContact, |
|
79 TVIMPSTEnums::TFilterType aFilter = |
|
80 TVIMPSTEnums::EFilterAll ) const; |
|
81 |
|
82 /** |
|
83 * @see MVIMPSTStorageContactList |
|
84 */ |
|
85 TBool FilterAllowsContact( const MVIMPSTStorageContact* aContact, |
|
86 TVIMPSTEnums::TFilterType aFilter ) const; |
|
87 public: // New functions |
|
88 |
|
89 MVIMPSTStorageContact* FindContact( const TDesC& aContactId ); |
|
90 |
|
91 |
|
92 /** |
|
93 * Find contact by MVPbkContactLink Contact Link VPBK. |
|
94 * @param aContactLink. Contact Link to find. |
|
95 * @return Pointer to found contact. NULL if not found. |
|
96 */ |
|
97 MVIMPSTStorageContact* FindContactByContactLink( const MVPbkContactLink& aContactLink ); |
|
98 |
|
99 |
|
100 /** |
|
101 * Remove contact from list |
|
102 * @param aContactId. Id of contact to be removed. |
|
103 */ |
|
104 TInt RemoveContactFromCacheL( const TDesC& aContactId, TInt& index ); |
|
105 |
|
106 |
|
107 /** |
|
108 * Remove contact from list |
|
109 * @param aContactLink. Contact Link of the item to be removed. |
|
110 */ |
|
111 TInt RemoveContactFromCacheL( const MVPbkContactLink& aContactLink, TInt& index ); |
|
112 |
|
113 /** |
|
114 * add contact to list |
|
115 * @param aContact. Contact item to be added. |
|
116 * @param index of index |
|
117 */ |
|
118 TInt AddStorageContactToCacheL( MVIMPSTStorageContact* aContact, TInt& aIndex ); |
|
119 |
|
120 /** |
|
121 * Count of contacts in list. Skipp all ofline contacts. |
|
122 */ |
|
123 TInt ContactCount( TBool aSkipOfflineContacts, |
|
124 TBool aSkipBlocekedContacts ) const; |
|
125 |
|
126 /** |
|
127 * Count of online items in list |
|
128 * @return count of online contacts |
|
129 */ |
|
130 TInt OnlineCount() const; |
|
131 |
|
132 |
|
133 /** |
|
134 * Get online list item by index from list |
|
135 * @param aIndex. Index of online item. |
|
136 * @return Online contact in index. |
|
137 */ |
|
138 MVIMPSTStorageContact& OnlineContact( TInt aIndex ) const; |
|
139 |
|
140 |
|
141 private: // Own methods |
|
142 |
|
143 /** |
|
144 * Find Contact based on contact link |
|
145 */ |
|
146 TInt FindContactByLinkL( const MVPbkContactLink& aContactLink, |
|
147 TInt& aIndexOrderedArray ) const; |
|
148 |
|
149 /** |
|
150 * Gets the index of given aContact |
|
151 */ |
|
152 TInt FindContactEntry( const MVIMPSTStorageContact* aContact ) const; |
|
153 |
|
154 |
|
155 TInt FindContactIndex( const TDesC& aContactId, |
|
156 TInt& aOrderedIndex ) const; |
|
157 |
|
158 }; |
|
159 |
|
160 #endif // S_VIMPSTSTORAGECONTACT_H |
|
161 |
|
162 // End of File |
|