|
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: Process Manager to get process interfaces e.g. login,settings |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CCAPROCESSMANAGER_H |
|
20 #define CCAPROCESSMANAGER_H |
|
21 |
|
22 |
|
23 //INCLUDES |
|
24 #include <e32base.h> |
|
25 |
|
26 #include "MCAChatObserver.h" |
|
27 #include "MCAStoredContactsObserver.h" |
|
28 #include "mcamessageerrorobserver.h" |
|
29 |
|
30 #include <MWVSettingsCASettingsng.h> |
|
31 #include <MWVSettingsObserverng.h> |
|
32 |
|
33 #include "MCAInviteObserver.h" |
|
34 #include "MCAChatObserver.h" |
|
35 #include "MCAProcessManager.h" |
|
36 |
|
37 // FORWARD DECLARATIONS |
|
38 class CCALoginPC; |
|
39 class CCAEngine; |
|
40 class MCASettingsPC; |
|
41 class MCALoginPC; |
|
42 class CCASettingsPC; |
|
43 class MCAProcessManager; |
|
44 class MCAMainViewArrayPC; |
|
45 class MCAConversationPC; |
|
46 class CCAConversationPC; |
|
47 class CCAContactEditPC; |
|
48 class MCABlockingPC; |
|
49 class CCASearchDataPC; |
|
50 class CCASearchInterfacePC; |
|
51 class CCAInvitationPC; |
|
52 class MCASelectionPC; |
|
53 class MCAConversationPC; |
|
54 class MCASearchInterfacePC; |
|
55 class MCASearchDataPC; |
|
56 class MCAMessageFlowHandlerPC; |
|
57 class CCARecordedChatsPC; |
|
58 class MCARecordedChatsPC; |
|
59 class MCARecordedChatsArrayPC; |
|
60 class CCARecordedChatsArrayPC; |
|
61 class MCAReactiveAuthPC; |
|
62 class MCAGroupPC; |
|
63 class MCAGroupUtilsPC; |
|
64 class MCAInviteEditorPC; |
|
65 class MCAOpenChatsPC; |
|
66 class MCAGroupPropertiesPC; |
|
67 class CCAGroupPropertiesPC; |
|
68 |
|
69 class CCAIMUtilsPC; |
|
70 class MCAGlobalNotificationObserverPC; |
|
71 class CCAGlobalNotificationObserverPC; |
|
72 |
|
73 class MCAApplicationNGPC; |
|
74 class CCAApplicationNGPC; |
|
75 |
|
76 class CCAProcessManager: public CBase, |
|
77 public MCAStoredContactsObserver, |
|
78 public MCAMessageErrorObserver, |
|
79 public MCAChatObserver, |
|
80 public MCAInviteObserver, |
|
81 public MCAProcessManager |
|
82 |
|
83 { |
|
84 public: |
|
85 |
|
86 /** |
|
87 * Two-phased constructor. |
|
88 */ |
|
89 |
|
90 IMPORT_C static CCAProcessManager* NewL(); |
|
91 |
|
92 /** |
|
93 * Destructor. |
|
94 */ |
|
95 |
|
96 IMPORT_C virtual ~CCAProcessManager(); |
|
97 |
|
98 /** |
|
99 * Default Constructor |
|
100 */ |
|
101 |
|
102 CCAProcessManager(); |
|
103 |
|
104 private: |
|
105 /** |
|
106 * Symbian 2nd phase constructor. |
|
107 */ |
|
108 void ConstructL(); |
|
109 |
|
110 public: // From MCAProcessManager |
|
111 |
|
112 |
|
113 /** |
|
114 * @see MCAProcessManager |
|
115 */ |
|
116 IMPORT_C CCAEngine* GetEngine() const; |
|
117 |
|
118 /** |
|
119 * @see MCAProcessManager |
|
120 */ |
|
121 IMPORT_C MCAOpenChatsPC* CreateOpenChatsPCL( |
|
122 const RPointerArray<MCAArrayItemPC>& aOpenChatsArray ); |
|
123 |
|
124 /** |
|
125 * @see MCAProcessManager |
|
126 */ |
|
127 |
|
128 IMPORT_C MCALoginPC* GetLogInInterface() const; |
|
129 |
|
130 /** |
|
131 * @see MCAProcessManager |
|
132 */ |
|
133 |
|
134 IMPORT_C MCASettingsPC* GetSettingsInterface() const; |
|
135 |
|
136 /** |
|
137 * @see MCAProcessManager |
|
138 */ |
|
139 EXPORT_C MCAInvitationPC* GetInvitationsInterface( ) const; |
|
140 /** |
|
141 * @see MCAProcessManager |
|
142 */ |
|
143 |
|
144 IMPORT_C void FinalizeEngineConstructionL(); |
|
145 |
|
146 /** |
|
147 * @see MCAProcessManager |
|
148 */ |
|
149 |
|
150 IMPORT_C virtual MCAMainViewArrayPC* GetArrayInterface() const; |
|
151 |
|
152 /** |
|
153 * @see MCAProcessManager |
|
154 */ |
|
155 |
|
156 IMPORT_C MCAConversationPC* GetConversationInterface() const; |
|
157 |
|
158 /** |
|
159 * @see MCAProcessManager |
|
160 */ |
|
161 IMPORT_C MCAContactEditPC* GetContactEditInterface() const; |
|
162 |
|
163 |
|
164 /** |
|
165 * Get the MCABlockingPC interface. |
|
166 * return the Pointer to the BlockingInterface; |
|
167 */ |
|
168 IMPORT_C MCABlockingPC* GetBlockingInterface() const; |
|
169 |
|
170 /** |
|
171 * @see MCAProcessManager |
|
172 */ |
|
173 IMPORT_C MCASearchDataPC* GetSearchDataInterface() const; |
|
174 |
|
175 /** |
|
176 * @see MCAProcessManager |
|
177 */ |
|
178 IMPORT_C MCASearchInterfacePC* GetSearchInterface() const; |
|
179 |
|
180 /** |
|
181 * @see MCAProcessManager |
|
182 */ |
|
183 IMPORT_C MCAGroupPC* GetGroupInterface( ) const; |
|
184 /** |
|
185 * @see MCAProcessManager |
|
186 */ |
|
187 |
|
188 IMPORT_C MCAGroupUtilsPC* GetGroupUtilsInterface( ) const; |
|
189 |
|
190 /** |
|
191 * @see MCAProcessManager |
|
192 */ |
|
193 IMPORT_C MCAReactiveAuthPC* GetReactiveAuthInterface() const; |
|
194 |
|
195 /** |
|
196 * @see MCAProcessManager |
|
197 */ |
|
198 EXPORT_C MCARecordedChatsPC* GetRecordedChatsPC() const; |
|
199 |
|
200 /** |
|
201 * @see MCAProcessManager |
|
202 */ |
|
203 |
|
204 EXPORT_C MCARecordedChatsArrayPC* GetRecordedChatsArrayPC() const; |
|
205 |
|
206 /** |
|
207 * @see MCAProcessManager |
|
208 */ |
|
209 EXPORT_C MCAInviteEditorPC* CreateInviteEditorPCL(); |
|
210 |
|
211 /** |
|
212 * @see MCAProcessManager |
|
213 */ |
|
214 EXPORT_C MCAGlobalNotificationObserverPC* GetGlobalNotificationInterface() const; |
|
215 |
|
216 /** |
|
217 * @see MCAProcessManager |
|
218 */ |
|
219 EXPORT_C MCAGroupPropertiesPC* GetGroupPropertiesPC() const; |
|
220 |
|
221 /** |
|
222 * see MCAProcessManager |
|
223 */ |
|
224 EXPORT_C MCAApplicationNGPC* GetApplicationNGPC() const; |
|
225 |
|
226 private: // From MCAChatObserver |
|
227 |
|
228 /** |
|
229 * @see MCAChatObserver |
|
230 */ |
|
231 |
|
232 void HandleChatEvent( TChatEventType aEvent, MCAMessage* aMessage ); |
|
233 |
|
234 private: // From MCAStoredContactsObserver |
|
235 |
|
236 /** |
|
237 * @see MCAStoredContactsObserver |
|
238 */ |
|
239 void HandleContactDelete( const TDesC& aContactId ); |
|
240 |
|
241 /** |
|
242 * @see MCAStoredContactsObserver |
|
243 */ |
|
244 void HandleAddition( MCAContactList& aList, MCAStoredContact& aContact ); |
|
245 |
|
246 /** |
|
247 * @see MCAStoredContactsObserver |
|
248 */ |
|
249 void HandleChange( |
|
250 MCAContactList* aList, |
|
251 MCAStoredContact* aContact, |
|
252 TStorageManagerGlobals::TCAObserverEventType aEventType, |
|
253 TBool aUserIdChanged ); |
|
254 |
|
255 |
|
256 void InitializeEngineObserversL(); |
|
257 |
|
258 private: // From MCAInviteObserver |
|
259 /** |
|
260 * @see MCAInviteObserver |
|
261 */ |
|
262 void HandleInvitationEventL( TInviteEventType aEvent, const MCAInvitation* aInvitation ); |
|
263 |
|
264 /** |
|
265 * From MCAInviteObserver, Gets called when we received response to our invitation |
|
266 * |
|
267 * @param aAcceptance Accepted or rejected |
|
268 * @param aUserId User Id of the response sender |
|
269 * @param aGroupName group name |
|
270 * @param aResponse response text |
|
271 */ |
|
272 void HandleInvitationResponse( TBool aAcceptance, |
|
273 const TDesC& aUserId, |
|
274 const TDesC& aGroupName, |
|
275 const TDesC& aResponse ); |
|
276 |
|
277 private: // From MCAMessageErrorObserver |
|
278 |
|
279 /** |
|
280 * @see MCAMessageErrorObserver |
|
281 */ |
|
282 void HandleMessageError( TInt aError, MCAMessage* aMessage ); |
|
283 |
|
284 |
|
285 private: //data |
|
286 /** |
|
287 * Owns the instance of the CCALoginPC for use by the UI |
|
288 */ |
|
289 CCALoginPC* iCCALogIn; |
|
290 |
|
291 /** |
|
292 * Owns the instance of the CCAEngine for use by the other process components |
|
293 */ |
|
294 CCAEngine* iEngine; |
|
295 |
|
296 /** |
|
297 * Owns the instance of the CCASettingsPC for use by the UI |
|
298 */ |
|
299 CCASettingsPC* iSettingsPC; |
|
300 |
|
301 /** |
|
302 * Owns the instance of the MCAMainViewArrayPC for use by the UI |
|
303 */ |
|
304 MCAMainViewArrayPC* iMainViewItemArray; |
|
305 |
|
306 |
|
307 /** |
|
308 * Owns the instance of the CCAConversationPC for use by the UI |
|
309 */ |
|
310 CCAConversationPC* iConversationPC; |
|
311 |
|
312 /** |
|
313 * Owns the instance of the CCAContactEditPC for use by the UI |
|
314 */ |
|
315 CCAContactEditPC *iCCAContactEditPC; |
|
316 |
|
317 /** |
|
318 * Owns the instance of the MCABlockingPC for use by the UI |
|
319 */ |
|
320 MCABlockingPC* iCCABlockingPC; |
|
321 |
|
322 /** |
|
323 * Owns the instance of the CCASearchDataPC for use by the UI |
|
324 */ |
|
325 CCASearchDataPC* iDataInterfacePC; |
|
326 |
|
327 /** |
|
328 * Owns the instance of the CCASearchInterfacePC for use by the UI |
|
329 */ |
|
330 CCASearchInterfacePC* iSearchInterfacePC; |
|
331 |
|
332 /** |
|
333 * Owns the instance of the CCARecordedChatsPC for use by the UI |
|
334 */ |
|
335 CCARecordedChatsPC* iRecordedChatsPC; |
|
336 |
|
337 /** |
|
338 * Owns the instance of the CCARecordedChatsArrayPC for use by the UI |
|
339 */ |
|
340 CCARecordedChatsArrayPC* iRecordedChatsArrayPC; |
|
341 |
|
342 /** |
|
343 * Owns the instance of the MCAReactiveAuthPC for use by the UI |
|
344 */ |
|
345 MCAReactiveAuthPC* iReactiveAuthPC; |
|
346 |
|
347 |
|
348 /** |
|
349 * Owns the instance of the CCAInvitationPC for use by the UI |
|
350 */ |
|
351 |
|
352 CCAInvitationPC* iInvitationsPC; |
|
353 |
|
354 /** |
|
355 * Owns the instance of the MCAGroupPC for use by the UI |
|
356 */ |
|
357 MCAGroupPC* iGroupPC; |
|
358 |
|
359 |
|
360 /** |
|
361 * Owns the instance of the MCAGroupUtilsPC for use by the UI |
|
362 */ |
|
363 MCAGroupUtilsPC* iGroupUtilsPC; |
|
364 |
|
365 /** |
|
366 * Owns the instance of the MCAGlobalNotificationObserverPC for use by the UI |
|
367 */ |
|
368 CCAGlobalNotificationObserverPC* iGlobalNotificationObserverPC; |
|
369 |
|
370 |
|
371 /** |
|
372 * Owns the instance of the MCAOpenChatsPC for use by the UI |
|
373 */ |
|
374 MCAOpenChatsPC* iOpenChatsPC; |
|
375 |
|
376 CCAGroupPropertiesPC* iGroupPropertiesPC; |
|
377 |
|
378 CCAApplicationNGPC* iApplicationNGPC; |
|
379 }; |
|
380 |
|
381 #endif //CCAPROCESSMANAGER_H |
|
382 |
|
383 // End of File |