|
1 /* |
|
2 * Copyright (c) 2000 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: Contact List Manager abstract interface |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __MPENGCONTACTLISTMANAGER_H__ |
|
19 #define __MPENGCONTACTLISTMANAGER_H__ |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32base.h> |
|
23 #include <bamdesca.h> |
|
24 #include "TPEngContactListBaseSettings.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class MPEngContactListAdvance; |
|
28 class MPEngContactListProperties; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 /** |
|
32 * Abstract interface of the contact list manager |
|
33 * |
|
34 * It can be used to create, maintain, and delete contact lists |
|
35 * |
|
36 * @lib PEngListLib2 |
|
37 * @since 3.0 |
|
38 */ |
|
39 class MPEngContactListManager |
|
40 { |
|
41 public: // New functions |
|
42 |
|
43 /** |
|
44 * Close Reference to the contact list manager |
|
45 * |
|
46 * @since 3.0 |
|
47 */ |
|
48 virtual void Close() = 0; |
|
49 |
|
50 /** |
|
51 * Retrieves contact list model |
|
52 * |
|
53 * Contact list is identified by its name defined while |
|
54 * it was created or by the name how it exists on the Network |
|
55 * server if such a contact list is unknown to the PEC engine |
|
56 * |
|
57 * Contact list model can be retrieved only if it has been |
|
58 * synchronized withing active session. |
|
59 * If contact list is not synchronized yet, function will |
|
60 * leave with KErrAccessDenied |
|
61 * If contact list does not exist, function will leave with |
|
62 * KErrNotFound |
|
63 * |
|
64 * Contact List model is Singleton. |
|
65 * If client want to release model from memory refer: |
|
66 * ReleaseCntListModel(); |
|
67 * |
|
68 * @since 3.0 |
|
69 * @param aContactList name of the contact list to retrieve |
|
70 * @return a contact list model |
|
71 */ |
|
72 virtual MPEngContactListAdvance& ContactListL( |
|
73 const TDesC& aContactList ) = 0; |
|
74 |
|
75 /** |
|
76 * List of all contact lists. Contains both Presence Engine |
|
77 * native contact lists and unknown server contact lists. |
|
78 * |
|
79 * @since 3.0 |
|
80 * @return List of all contact lists names. Contains both unknown |
|
81 * server contact lists and Presence Engine local contact |
|
82 * lists. |
|
83 */ |
|
84 virtual const MDesCArray& AllContactListsL() const = 0; |
|
85 |
|
86 /** |
|
87 * Active contact list |
|
88 * |
|
89 * Contact list which content has been synchronized between |
|
90 * network and local client. Contact list models of such |
|
91 * a contact lists can be retrieved by the client and used. |
|
92 * This group of the contact list consist from the contact lists |
|
93 * of the native contact lists of the PEC engine and unknown |
|
94 * contact lists of the Network server. |
|
95 * |
|
96 * @since 3.0 |
|
97 * @return a list of active contact lists |
|
98 */ |
|
99 virtual const MDesCArray& SynchronizedContactLists( ) const = 0; |
|
100 |
|
101 /** |
|
102 * Contact list settings model |
|
103 * |
|
104 * Contact list settings models allows to view details of |
|
105 * the contact list and modify them if needed. |
|
106 * Even though settings of the contact list can be retrieved |
|
107 * even contact list hasn't been synchronized, not all |
|
108 * details are available. Particularly Display name of the |
|
109 * server unknown contact lists is unavailable. |
|
110 * |
|
111 * @since 3.0 |
|
112 * @param aContactList name of the contact list |
|
113 * @return contact list settings |
|
114 */ |
|
115 virtual MPEngContactListProperties& ContactListSettingsL( |
|
116 const TDesC& aContacList ) = 0; |
|
117 |
|
118 /** |
|
119 * Set Default contact list |
|
120 * |
|
121 * This function sets default contact list. |
|
122 * There can be only one default contact list in one session. |
|
123 * Therefore to make settings valid, update of the contact list |
|
124 * is required. |
|
125 * |
|
126 * @since 3.0 |
|
127 * @param aContactList contact list to be set as default contact |
|
128 * list |
|
129 */ |
|
130 virtual void SetAsDefaultCntListL( const TDesC& aContactList ) = 0; |
|
131 |
|
132 /** |
|
133 * Create new contact list. |
|
134 * |
|
135 * Creates new contact list. |
|
136 * New contact list is added to the PEC engine. Function returns |
|
137 * reference to the new contact list settings, which should be |
|
138 * used by the client to defined all detailed settings of |
|
139 * new contact list if it is required. If not, default values |
|
140 * for the contact list will be used. |
|
141 * Depends on the nature of the contact list, but after its |
|
142 * synchronization it can be used by the client freely. |
|
143 * |
|
144 * @since 3.0 |
|
145 * @param aName name of new contact list |
|
146 * @param aMainProperty main property of the new contact list |
|
147 * @return new contact list settings reference |
|
148 */ |
|
149 virtual MPEngContactListProperties& CreateContactListL( |
|
150 const TDesC& aContactList, |
|
151 TPEngContactListBaseSettings& aBaseSettings ) = 0; |
|
152 |
|
153 /** |
|
154 * Delete contact list |
|
155 * |
|
156 * Contact list is deleted from the PEC engine, and after |
|
157 * calling of the Update to the contact list, it is also |
|
158 * removed from the network server. |
|
159 * Delete can be called to all contact list, native and unknown. |
|
160 * |
|
161 * @since 3.0 |
|
162 * @param aContactList name of the contact list to be deleted |
|
163 */ |
|
164 virtual void DeleteContactListL( const TDesC& aContactList ) = 0; |
|
165 |
|
166 /** |
|
167 * Change contact list type |
|
168 * |
|
169 * Contact list type is updated. Client does not have to retrieve |
|
170 * again contact list model if it was retrieved before. Change |
|
171 * is imidiate. |
|
172 * |
|
173 * @since 3.0 |
|
174 * @param aContactList name of the contact list to change type |
|
175 * @param aCntListType new type of the contact list. |
|
176 */ |
|
177 virtual void ChangeContactListTypeL( |
|
178 const TDesC& aContactList, |
|
179 TPEngContactListType aContactListType ) = 0; |
|
180 |
|
181 |
|
182 |
|
183 /** |
|
184 * Release contact list model from the memory |
|
185 * |
|
186 * Releases contact list model from the client side memory |
|
187 * Contact list can be still used by other clients. |
|
188 * If client wants to use same contact list again, its model |
|
189 * will be again created once client retrieves it by calling |
|
190 * ContactListL() function |
|
191 * |
|
192 * @since 3.0 |
|
193 * @param aContactList contact list to be released |
|
194 * if contact list does not exists, function is ignored |
|
195 */ |
|
196 virtual void ReleaseCntListModel( const TDesC& aContactList ) = 0; |
|
197 |
|
198 protected: //Destructor |
|
199 |
|
200 /** |
|
201 * Virtual inline destructor. |
|
202 * Public destructor to allow deletion trough interface. |
|
203 */ |
|
204 virtual ~MPEngContactListManager() {}; |
|
205 |
|
206 }; |
|
207 #endif // __MPENGCONTACTLISTMANAGER_H__ |
|
208 |
|
209 // End of File |
|
210 |