author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Mon, 04 Oct 2010 00:13:15 +0300 | |
changeset 72 | 6f657153cbc5 |
parent 52 | 12db4185673b |
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: |
|
15 |
* |
|
16 |
*/ |
|
17 |
#include "conversationsengine.h" |
|
18 |
||
44
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
19 |
#include <ccsconversationentry.h> |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
20 |
#include <ccsclientconversation.h> |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
21 |
|
31 | 22 |
#include "conversationsenginedefines.h" |
23 |
#include "convergedmessage.h" |
|
24 |
#include "conversationmsgstorehandler.h" |
|
25 |
#include "conversationssummarymodel.h" |
|
26 |
#include "conversationsmodel.h" |
|
27 |
#include "draftsmodel.h" |
|
28 |
#include "conversationsengine_p.h" |
|
29 |
#include "debugtraces.h" |
|
43
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
30 |
#include <xqconversions.h> |
31 | 31 |
|
32 |
//--------------------------------------------------------------- |
|
33 |
// ConversationsEngine::instance |
|
34 |
// @see header |
|
35 |
//--------------------------------------------------------------- |
|
36 |
ConversationsEngine* ConversationsEngine::instance() |
|
37 |
{ |
|
38 |
static ConversationsEngine* conversationsEngine = |
|
39 |
new ConversationsEngine(); |
|
40 |
return conversationsEngine; |
|
41 |
} |
|
42 |
||
43 |
//--------------------------------------------------------------- |
|
44 |
// ConversationsEngine::ConversationsEngine |
|
45 |
// @see header |
|
46 |
//--------------------------------------------------------------- |
|
47 |
ConversationsEngine::ConversationsEngine(QObject* parent): |
|
48 |
QObject(parent), mDraftsModel(NULL) |
|
49 |
{ |
|
52
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
50 |
mConversationMsgStoreHandler = q_check_ptr(new ConversationMsgStoreHandler); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
51 |
|
31 | 52 |
mConversationsSummaryModel = new ConversationsSummaryModel(this); |
53 |
mConversationsModel = new ConversationsModel(mConversationMsgStoreHandler, |
|
54 |
this); |
|
55 |
||
52
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
56 |
d_ptr = q_check_ptr( new ConversationsEnginePrivate(mConversationMsgStoreHandler, |
31 | 57 |
mConversationsSummaryModel, |
52
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
58 |
mConversationsModel)); |
44
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
59 |
|
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
60 |
connect (mConversationsModel, |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
61 |
SIGNAL(conversationViewEmpty()), |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
62 |
this, |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
63 |
SIGNAL(conversationViewEmpty())); |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
64 |
|
31 | 65 |
} |
66 |
||
67 |
//--------------------------------------------------------------- |
|
68 |
// ConversationsEngine::~ConversationsEngine |
|
69 |
// @see header |
|
70 |
//--------------------------------------------------------------- |
|
71 |
ConversationsEngine::~ConversationsEngine() |
|
72 |
{ |
|
73 |
if(mConversationMsgStoreHandler) |
|
74 |
{ |
|
75 |
delete mConversationMsgStoreHandler; |
|
76 |
mConversationMsgStoreHandler = NULL; |
|
77 |
} |
|
78 |
if(d_ptr) |
|
79 |
{ |
|
80 |
delete d_ptr; |
|
81 |
d_ptr = NULL; |
|
82 |
} |
|
83 |
} |
|
84 |
||
85 |
//--------------------------------------------------------------- |
|
86 |
// ConversationsEngine::getConversationsSummaryModel |
|
87 |
// @see header |
|
88 |
//--------------------------------------------------------------- |
|
89 |
QStandardItemModel* ConversationsEngine::getConversationsSummaryModel() |
|
90 |
{ |
|
91 |
return mConversationsSummaryModel; |
|
92 |
} |
|
93 |
||
94 |
//--------------------------------------------------------------- |
|
95 |
// ConversationsEngine::getConversationsModel |
|
96 |
// @see header |
|
97 |
//--------------------------------------------------------------- |
|
98 |
QStandardItemModel* ConversationsEngine::getConversationsModel() |
|
99 |
{ |
|
100 |
return mConversationsModel; |
|
101 |
} |
|
102 |
||
103 |
//--------------------------------------------------------------- |
|
104 |
// ConversationsEngine::getDraftsModel |
|
105 |
// @see header |
|
106 |
//--------------------------------------------------------------- |
|
107 |
QStandardItemModel* ConversationsEngine::getDraftsModel() |
|
108 |
{ |
|
109 |
if(!mDraftsModel) |
|
110 |
{ |
|
111 |
mDraftsModel = new DraftsModel(this); |
|
112 |
mConversationMsgStoreHandler->FetchDraftMessages(mDraftsModel); |
|
113 |
} |
|
114 |
return mDraftsModel; |
|
115 |
} |
|
116 |
//--------------------------------------------------------------- |
|
117 |
// ConversationsEngine::getConversations |
|
118 |
// @see header |
|
119 |
//--------------------------------------------------------------- |
|
120 |
bool ConversationsEngine::getConversations(qint64 conversationId) |
|
121 |
{ |
|
122 |
int error; |
|
123 |
TRAP(error,d_ptr->getConversationsL(conversationId)); |
|
124 |
return (error!=KErrNone) ? false : true; |
|
125 |
} |
|
126 |
||
127 |
//--------------------------------------------------------------- |
|
128 |
// ConversationsEngine::clearConversations |
|
129 |
// @see header |
|
130 |
//--------------------------------------------------------------- |
|
131 |
bool ConversationsEngine::clearConversations() |
|
132 |
{ |
|
133 |
int error; |
|
134 |
TRAP(error,d_ptr->clearConversationsL()); |
|
135 |
return (error!=KErrNone) ? false : true; |
|
136 |
} |
|
137 |
||
138 |
//--------------------------------------------------------------- |
|
139 |
// ConversationsEngine::deleteConversations |
|
140 |
// @see header |
|
141 |
//--------------------------------------------------------------- |
|
142 |
bool ConversationsEngine::deleteConversations(qint64 conversationId) |
|
143 |
{ |
|
144 |
int error; |
|
145 |
TRAP(error,d_ptr->deleteConversationL(conversationId)); |
|
146 |
return (error!=KErrNone) ? false : true; |
|
147 |
} |
|
148 |
||
149 |
//--------------------------------------------------------------- |
|
150 |
// ConversationsEngine::deleteMessages |
|
151 |
// @see header |
|
152 |
//--------------------------------------------------------------- |
|
153 |
void ConversationsEngine::deleteMessages(QList<int>& msgIdList) |
|
154 |
{ |
|
155 |
RArray<TInt> idArray; |
|
156 |
for(int i=0; i < msgIdList.count(); ++i) |
|
157 |
{ |
|
158 |
idArray.Append(msgIdList[i]); |
|
159 |
} |
|
160 |
if(msgIdList.count()>0) |
|
161 |
{ |
|
162 |
d_ptr->deleteMessages(idArray); |
|
163 |
} |
|
164 |
} |
|
165 |
||
166 |
//--------------------------------------------------------------- |
|
167 |
// ConversationsEngine::deleteAllDraftMessages |
|
168 |
// @see header |
|
169 |
//--------------------------------------------------------------- |
|
170 |
void ConversationsEngine::deleteAllDraftMessages() |
|
171 |
{ |
|
172 |
int error; |
|
173 |
TRAP(error, d_ptr->deleteAllDraftMessagesL()); |
|
52
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
174 |
qt_symbian_throwIfError(error); |
31 | 175 |
} |
176 |
||
177 |
//--------------------------------------------------------------- |
|
178 |
// ConversationsEngine::markConversationRead |
|
179 |
// @see header |
|
180 |
//--------------------------------------------------------------- |
|
181 |
bool ConversationsEngine::markConversationRead(qint64 conversationId) |
|
182 |
{ |
|
72
6f657153cbc5
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
52
diff
changeset
|
183 |
int error = 0; |
31 | 184 |
TRAP(error,d_ptr->markConversationReadL(conversationId)); |
185 |
return (error!=KErrNone) ? false : true; |
|
186 |
} |
|
187 |
||
188 |
//--------------------------------------------------------------- |
|
189 |
// ConversationsEngine::markMessagesRead |
|
190 |
// @see header |
|
191 |
//--------------------------------------------------------------- |
|
192 |
bool ConversationsEngine::markMessagesRead(QList<int>& msgIdList) |
|
193 |
{ |
|
194 |
RArray<TInt> idArray; |
|
195 |
int error; |
|
196 |
for(int i=0; i < msgIdList.count(); ++i) |
|
197 |
{ |
|
198 |
idArray.Append(msgIdList[i]); |
|
199 |
} |
|
200 |
if(msgIdList.count()>0) |
|
201 |
{ |
|
202 |
TRAP(error,d_ptr->markMessagesReadL(idArray)); |
|
203 |
} |
|
204 |
return (error!=KErrNone) ? false : true; |
|
205 |
} |
|
206 |
||
207 |
//--------------------------------------------------------------- |
|
208 |
// ConversationsEngine::getContactDetails |
|
209 |
// @see header |
|
210 |
//--------------------------------------------------------------- |
|
211 |
void ConversationsEngine::getContactDetails(qint64 conversationId, |
|
212 |
QString& displayName, |
|
213 |
QString& address) |
|
214 |
{ |
|
215 |
QModelIndexList indexList = mConversationsSummaryModel->match( |
|
216 |
mConversationsSummaryModel->index(0, 0), |
|
217 |
ConversationId, |
|
218 |
conversationId, |
|
219 |
1, // One match |
|
220 |
Qt::MatchExactly); |
|
221 |
||
222 |
if(indexList.count() > 0) |
|
223 |
{ |
|
224 |
displayName = indexList[0].data(DisplayName).toString(); |
|
225 |
address = indexList[0].data(ConversationAddress).toString(); |
|
44
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
226 |
} |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
227 |
else |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
228 |
{ |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
229 |
int error; |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
230 |
CCsClientConversation* clientConv = NULL; |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
231 |
TRAP(error, clientConv = d_ptr->getConversationFromConversationIdL(conversationId)); |
52
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
232 |
|
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
233 |
qt_symbian_throwIfError(error); |
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
234 |
|
44
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
235 |
HBufC *name = clientConv->GetDisplayName(); |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
236 |
if (name && name->Length()) |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
237 |
{ |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
238 |
displayName = XQConversions::s60DescToQString(*name); |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
239 |
} |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
240 |
|
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
241 |
HBufC *addr = clientConv->GetConversationEntry()->Contact(); |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
242 |
if (addr && addr->Length()) |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
243 |
{ |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
244 |
address = XQConversions::s60DescToQString(*addr); |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
245 |
} |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
246 |
|
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
247 |
delete clientConv; |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
248 |
} |
31 | 249 |
} |
250 |
||
251 |
//--------------------------------------------------------------- |
|
252 |
// ConversationsEngine::getConversationIdFromAddress |
|
253 |
// @see header |
|
254 |
//--------------------------------------------------------------- |
|
255 |
qint64 ConversationsEngine::getConversationIdFromAddress(QString address) |
|
256 |
{ |
|
257 |
qint64 conversationId = -1; |
|
258 |
||
259 |
int error; |
|
43
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
260 |
HBufC* number = XQConversions::qStringToS60Desc(address); |
31 | 261 |
TRAP(error,conversationId = |
262 |
d_ptr->getConversationIdFromAddressL(*number)); |
|
263 |
||
264 |
delete number; |
|
265 |
||
266 |
return conversationId; |
|
267 |
} |
|
268 |
||
269 |
//--------------------------------------------------------------- |
|
270 |
// ConversationsEngine::getCurrentConversationId |
|
271 |
// @see header |
|
272 |
//--------------------------------------------------------------- |
|
273 |
qint64 ConversationsEngine::getCurrentConversationId() |
|
274 |
{ |
|
275 |
return d_ptr->getConversationCurrentId(); |
|
276 |
} |
|
277 |
||
278 |
//--------------------------------------------------------------- |
|
279 |
// ConversationsEngine::getConversationIdFromContactId |
|
280 |
// @see header |
|
281 |
//--------------------------------------------------------------- |
|
282 |
qint64 ConversationsEngine::getConversationIdFromContactId(qint32 contactId) |
|
283 |
{ |
|
284 |
qint64 conversationId = -1; |
|
285 |
int error; |
|
286 |
TRAP(error,conversationId = |
|
287 |
d_ptr->getConversationIdFromContactIdL(contactId)); |
|
288 |
||
289 |
return conversationId; |
|
290 |
} |
|
291 |
||
292 |
//--------------------------------------------------------------- |
|
293 |
// ConversationsEngine::emitConversationModelPopulated |
|
294 |
// @see header |
|
295 |
//--------------------------------------------------------------- |
|
296 |
void ConversationsEngine::emitConversationModelPopulated() |
|
297 |
{ |
|
298 |
emit conversationModelPopulated(); |
|
299 |
} |
|
300 |
||
301 |
//--------------------------------------------------------------- |
|
302 |
// ConversationsEngine::emitConversationModelUpdated |
|
303 |
// @see header |
|
304 |
//--------------------------------------------------------------- |
|
305 |
void ConversationsEngine::emitConversationModelUpdated() |
|
306 |
{ |
|
307 |
emit conversationModelUpdated(); |
|
308 |
} |
|
309 |
||
310 |
//--------------------------------------------------------------- |
|
311 |
// ConversationsEngine::emitConversationListModelPopulated |
|
312 |
// @see header |
|
313 |
//--------------------------------------------------------------- |
|
314 |
void ConversationsEngine::emitConversationListModelPopulated() |
|
315 |
{ |
|
316 |
emit conversationListModelPopulated(); |
|
317 |
} |
|
318 |
||
319 |
//--------------------------------------------------------------- |
|
44
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
320 |
// ConversationsEngine::emitConversationListModelEntryDeleted |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
321 |
// @see header |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
322 |
//--------------------------------------------------------------- |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
323 |
void ConversationsEngine::emitConversationListModelEntryDeleted( int conversationId ) |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
324 |
{ |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
325 |
emit conversationListEntryDeleted( conversationId ); |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
326 |
} |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
327 |
|
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
328 |
//--------------------------------------------------------------- |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
329 |
// ConversationsEngine::emitOpenConversationViewIdUpdate |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
330 |
// @see header |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
331 |
//--------------------------------------------------------------- |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
332 |
void ConversationsEngine::emitOpenConversationViewIdUpdate( |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
333 |
int newConversationId) |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
334 |
{ |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
335 |
//also register for subscription now |
52
12db4185673b
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
44
diff
changeset
|
336 |
QT_TRAP_THROWING(d_ptr->registerAgainForConversationUpdatesL(newConversationId)); |
44
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
337 |
} |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
338 |
|
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
339 |
//--------------------------------------------------------------- |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
340 |
// ConversationsEngine::disableRegisterationForCVEvents |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
341 |
// @see header |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
342 |
//--------------------------------------------------------------- |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
343 |
void ConversationsEngine::disableRegisterationForCVEvents() |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
344 |
{ |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
345 |
d_ptr->deRegisterCVUpdatesTemporary(); |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
346 |
} |
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
347 |
|
36f374c67aa8
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
348 |
//--------------------------------------------------------------- |
31 | 349 |
// ConversationsEngine::fetchMoreConversations |
350 |
// @see header |
|
351 |
//--------------------------------------------------------------- |
|
352 |
void ConversationsEngine::fetchMoreConversations() |
|
353 |
{ |
|
354 |
d_ptr->fetchMoreConversations(); |
|
355 |
} |
|
356 |
||
357 |
//--------------------------------------------------------------- |
|
358 |
// ConversationsEngine::resendMessage() |
|
359 |
// @see header |
|
360 |
//--------------------------------------------------------------- |
|
361 |
||
362 |
bool ConversationsEngine::resendMessage(qint32 messageId) |
|
363 |
{ |
|
364 |
return d_ptr->resendMessage(messageId); |
|
365 |
} |
|
366 |
||
367 |
//--------------------------------------------------------------- |
|
368 |
// ConversationsEngine::downloadMessage() |
|
369 |
// @see header |
|
370 |
//--------------------------------------------------------------- |
|
371 |
||
372 |
int ConversationsEngine::downloadMessage(qint32 messageId) |
|
373 |
{ |
|
374 |
return d_ptr->downloadMessage(messageId); |
|
375 |
} |
|
376 |
||
377 |
//--------------------------------------------------------------- |
|
378 |
// ConversationsEngine::downloadOperationSupported() |
|
379 |
// @see header |
|
380 |
//--------------------------------------------------------------- |
|
381 |
bool ConversationsEngine::downloadOperationSupported(qint32 messageId) |
|
382 |
{ |
|
383 |
return d_ptr->downloadOperationSupported(messageId); |
|
384 |
} |
|
385 |
||
386 |
//--------------------------------------------------------------- |
|
387 |
// ConversationsEngine::markAsReadAndGetType() |
|
388 |
// @see header |
|
389 |
//--------------------------------------------------------------- |
|
390 |
||
391 |
void ConversationsEngine::markAsReadAndGetType(qint32 messageId, |
|
392 |
int& msgType, |
|
393 |
int& msgSubType) |
|
394 |
{ |
|
395 |
mConversationMsgStoreHandler->markAsReadAndGetType(messageId, |
|
396 |
msgType, |
|
397 |
msgSubType); |
|
398 |
} |
|
399 |
||
400 |
//--------------------------------------------------------------- |
|
401 |
// ConversationsEngine::getDBHandle() |
|
402 |
// @see header |
|
403 |
//--------------------------------------------------------------- |
|
404 |
RSqlDatabase& ConversationsEngine::getDBHandle(TBool& isOpen) |
|
405 |
{ |
|
406 |
return mConversationsModel->getDBHandle(isOpen); |
|
407 |
} |
|
408 |
||
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
409 |
|
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
410 |
//--------------------------------------------------------------- |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
411 |
// ConversationsEngine::getMsgSubType() |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
412 |
// @see header |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
413 |
//--------------------------------------------------------------- |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
414 |
int ConversationsEngine::getMsgSubType(int messageId) |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
415 |
{ |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
416 |
return mConversationMsgStoreHandler->getMsgSubType(messageId); |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
417 |
} |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
418 |
|
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
419 |
|
31 | 420 |
//EOF |
421 |