author | William Roberts <williamr@symbian.org> |
Thu, 22 Jul 2010 16:32:06 +0100 | |
branch | GCC_SURGE |
changeset 47 | 5b14749788d7 |
parent 27 | e4592d119491 |
parent 44 | 36f374c67aa8 |
permissions | -rw-r--r-- |
31 | 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; |
|
43
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
30 |
class XQSystemToneService; |
31 | 31 |
|
32 |
/** |
|
33 |
* @class MsgNotifierPrivate |
|
34 |
*/ |
|
35 |
||
36 |
class MsgNotifierPrivate : public MCsConversationListChangeObserver |
|
37 |
{ |
|
38 |
||
39 |
public: |
|
40 |
/** |
|
41 |
* Constructor |
|
42 |
*/ |
|
43 |
MsgNotifierPrivate(MsgNotifier* msgNotifier); |
|
44 |
||
45 |
/** |
|
46 |
* Destructor |
|
47 |
*/ |
|
48 |
~MsgNotifierPrivate(); |
|
49 |
||
50 |
public: |
|
51 |
/** |
|
52 |
* AddConversationList |
|
53 |
* This is for handling new conversation event |
|
54 |
* asynchronously from the server |
|
55 |
* @param aClientConversation CCsClientConversation The conversation object |
|
56 |
*/ |
|
57 |
void |
|
58 |
AddConversationList( |
|
59 |
const CCsClientConversation& aClientConversation); |
|
60 |
||
61 |
/** |
|
62 |
* DeleteConversationList |
|
63 |
* This is for handling delete conversation event |
|
64 |
* asynchronously from the server |
|
65 |
* @param aClientConversation CCsClientConversation The conversation object |
|
66 |
*/ |
|
67 |
void DeleteConversationList( |
|
68 |
const CCsClientConversation& aClientConversation); |
|
44
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
69 |
|
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
70 |
/** |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
71 |
* PartialDeleteConversationList |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
72 |
* This is for handling partial delete of conversation event |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
73 |
* Asynchronous |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
74 |
* @param aClientConversation CCsClientConversation - The conversation object |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
75 |
*/ |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
76 |
void PartialDeleteConversationList( |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
77 |
const CCsClientConversation& aClientConversation); |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
78 |
|
31 | 79 |
|
80 |
/** |
|
81 |
* ModifyConversationList |
|
82 |
* This is for handling modify conversation asynchronously |
|
83 |
* from the server |
|
84 |
* @param aClientConversation CCsClientConversation The conversation object |
|
85 |
* |
|
86 |
*/ |
|
87 |
void ModifyConversationList( |
|
88 |
const CCsClientConversation& aClientConversation); |
|
89 |
||
90 |
/** |
|
91 |
* RefreshConversationList |
|
92 |
* This is for handling bulk changes. Message store change etc. |
|
93 |
*/ |
|
94 |
void RefreshConversationList(); |
|
95 |
||
96 |
public: |
|
97 |
||
98 |
/** |
|
99 |
* updateFailedIndications |
|
100 |
* Activate/Deactivate message indications based on pending message count |
|
101 |
*/ |
|
102 |
void updateOutboxIndications(); |
|
103 |
||
104 |
/** |
|
105 |
* displayOutboxIndications |
|
106 |
* Display the outbox indications based on the data in MsgInfo |
|
107 |
*/ |
|
108 |
void displayOutboxIndications(MsgInfo data); |
|
109 |
||
110 |
/** |
|
111 |
* displayFailedNote |
|
112 |
* Popup a message box when a message is not successfully sent. |
|
113 |
* @param msgInfo MsgInfo The message information object |
|
114 |
*/ |
|
115 |
void displayFailedNote(MsgInfo msgInfo); |
|
116 |
||
117 |
private: |
|
118 |
/** |
|
119 |
* Does all the initializations. |
|
120 |
*/ |
|
121 |
void initL(); |
|
122 |
||
123 |
/** |
|
124 |
* Initializes the conversation store handler |
|
125 |
*/ |
|
126 |
void initConvStoreHandler(); |
|
127 |
||
128 |
/** |
|
129 |
* Process conversation entry for showing the notification. |
|
130 |
* @param aClientConversation conversation entry |
|
131 |
*/ |
|
132 |
void processListEntry(const CCsClientConversation& aClientConversation); |
|
133 |
||
134 |
/** |
|
135 |
* updateIndications |
|
136 |
* Activate/Deactivate message indications based on unread message count |
|
137 |
* @param bootup, true, if called on bootup else false |
|
138 |
*/ |
|
139 |
void updateUnreadIndications(bool bootup = false); |
|
140 |
||
141 |
/** |
|
142 |
* Show notification or not |
|
143 |
* @param receivedMsgConvId received message conversation id. |
|
144 |
* @return true if the received conversation id is not same as |
|
145 |
* published conversation id ( opened conversation id) else false |
|
146 |
*/ |
|
147 |
bool showNotification(int receivedMsgConvId); |
|
148 |
private: |
|
149 |
||
150 |
/** |
|
151 |
* Pointer to msgnotifier |
|
152 |
*/ |
|
153 |
MsgNotifier* q_ptr; |
|
154 |
||
155 |
/** |
|
156 |
* Conversation server client |
|
157 |
*/ |
|
158 |
CCSRequestHandler* mCvServer; |
|
159 |
||
160 |
/** |
|
161 |
* Pointer to Conversation Msg Store Handler. |
|
162 |
*/ |
|
163 |
MsgStoreHandler* iMsgStoreHandler; |
|
164 |
||
165 |
/** |
|
166 |
* Settings manager |
|
167 |
* Owned. |
|
168 |
*/ |
|
169 |
XQSettingsManager* mSettingsManager; |
|
170 |
||
171 |
/** |
|
172 |
* Publish and subscribe utils. |
|
173 |
* Owned. |
|
174 |
*/ |
|
175 |
XQPublishAndSubscribeUtils* mPSUtils; |
|
43
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
176 |
|
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
177 |
/** |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
178 |
* Object to handle audio alert when new message is received |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
179 |
*/ |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
180 |
XQSystemToneService* mSts; |
31 | 181 |
}; |
182 |
||
183 |
#endif // MSGNOTIFIER_PRIVATE_H |
|
184 |
//EOF |