|
1 /* |
|
2 * Copyright (c) 2009 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: Listen to conversation server events and parse the |
|
15 * events. These parsed information passed to notifications and indications. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef MSGNOTIFIER_PRIVATE_H |
|
20 #define MSGNOTIFIER_PRIVATE_H |
|
21 |
|
22 #include <mcsconversationlistchangeobserver.h> |
|
23 |
|
24 // CLASS DECLARATION |
|
25 class MsgNotifier; |
|
26 class CCSRequestHandler; |
|
27 class MsgStoreHandler; |
|
28 class XQSettingsManager; |
|
29 class XQPublishAndSubscribeUtils; |
|
30 |
|
31 /** |
|
32 * @class MsgNotifierPrivate |
|
33 */ |
|
34 |
|
35 class MsgNotifierPrivate : public MCsConversationListChangeObserver |
|
36 { |
|
37 |
|
38 public: |
|
39 /** |
|
40 * Constructor |
|
41 */ |
|
42 MsgNotifierPrivate(MsgNotifier* msgNotifier); |
|
43 |
|
44 /** |
|
45 * Destructor |
|
46 */ |
|
47 ~MsgNotifierPrivate(); |
|
48 |
|
49 public: |
|
50 /** |
|
51 * AddConversationList |
|
52 * This is for handling new conversation event |
|
53 * asynchronously from the server |
|
54 * @param aClientConversation CCsClientConversation The conversation object |
|
55 */ |
|
56 void |
|
57 AddConversationList( |
|
58 const CCsClientConversation& aClientConversation); |
|
59 |
|
60 /** |
|
61 * DeleteConversationList |
|
62 * This is for handling delete conversation event |
|
63 * asynchronously from the server |
|
64 * @param aClientConversation CCsClientConversation The conversation object |
|
65 */ |
|
66 void DeleteConversationList( |
|
67 const CCsClientConversation& aClientConversation); |
|
68 |
|
69 /** |
|
70 * ModifyConversationList |
|
71 * This is for handling modify conversation asynchronously |
|
72 * from the server |
|
73 * @param aClientConversation CCsClientConversation The conversation object |
|
74 * |
|
75 */ |
|
76 void ModifyConversationList( |
|
77 const CCsClientConversation& aClientConversation); |
|
78 |
|
79 /** |
|
80 * RefreshConversationList |
|
81 * This is for handling bulk changes. Message store change etc. |
|
82 */ |
|
83 void RefreshConversationList(); |
|
84 |
|
85 public: |
|
86 |
|
87 /** |
|
88 * updateFailedIndications |
|
89 * Activate/Deactivate message indications based on pending message count |
|
90 */ |
|
91 void updateOutboxIndications(); |
|
92 |
|
93 /** |
|
94 * displayOutboxIndications |
|
95 * Display the outbox indications based on the data in MsgInfo |
|
96 */ |
|
97 void displayOutboxIndications(MsgInfo data); |
|
98 |
|
99 /** |
|
100 * displayFailedNote |
|
101 * Popup a message box when a message is not successfully sent. |
|
102 * @param msgInfo MsgInfo The message information object |
|
103 */ |
|
104 void displayFailedNote(MsgInfo msgInfo); |
|
105 |
|
106 private: |
|
107 /** |
|
108 * Does all the initializations. |
|
109 */ |
|
110 void initL(); |
|
111 |
|
112 /** |
|
113 * Initializes the conversation store handler |
|
114 */ |
|
115 void initConvStoreHandler(); |
|
116 |
|
117 /** |
|
118 * Process conversation entry for showing the notification. |
|
119 * @param aClientConversation conversation entry |
|
120 */ |
|
121 void processListEntry(const CCsClientConversation& aClientConversation); |
|
122 |
|
123 /** |
|
124 * updateIndications |
|
125 * Activate/Deactivate message indications based on unread message count |
|
126 * @param bootup, true, if called on bootup else false |
|
127 */ |
|
128 void updateUnreadIndications(bool bootup = false); |
|
129 |
|
130 /** |
|
131 * Show notification or not |
|
132 * @param receivedMsgConvId received message conversation id. |
|
133 * @return true if the received conversation id is not same as |
|
134 * published conversation id ( opened conversation id) else false |
|
135 */ |
|
136 bool showNotification(int receivedMsgConvId); |
|
137 private: |
|
138 |
|
139 /** |
|
140 * Pointer to msgnotifier |
|
141 */ |
|
142 MsgNotifier* q_ptr; |
|
143 |
|
144 /** |
|
145 * Conversation server client |
|
146 */ |
|
147 CCSRequestHandler* mCvServer; |
|
148 |
|
149 /** |
|
150 * Pointer to Conversation Msg Store Handler. |
|
151 */ |
|
152 MsgStoreHandler* iMsgStoreHandler; |
|
153 |
|
154 /** |
|
155 * Settings manager |
|
156 * Owned. |
|
157 */ |
|
158 XQSettingsManager* mSettingsManager; |
|
159 |
|
160 /** |
|
161 * Publish and subscribe utils. |
|
162 * Owned. |
|
163 */ |
|
164 XQPublishAndSubscribeUtils* mPSUtils; |
|
165 }; |
|
166 |
|
167 #endif // MSGNOTIFIER_PRIVATE_H |
|
168 //EOF |