177 set by \a sortOrder. |
177 set by \a sortOrder. |
178 If \a limit is not zero, then \a limit places an upper bound on the number of |
178 If \a limit is not zero, then \a limit places an upper bound on the number of |
179 ids in the list returned. |
179 ids in the list returned. |
180 \a offset specifies how many ids to skip at the beginning of the list returned. |
180 \a offset specifies how many ids to skip at the beginning of the list returned. |
181 |
181 |
|
182 The performance of querying messages is currently significantly less than |
|
183 optimal for some querying criteria on some platforms. |
|
184 |
182 \sa error(), countMessages() |
185 \sa error(), countMessages() |
183 */ |
186 */ |
184 QMessageIdList QMessageManager::queryMessages(const QMessageFilter &filter, const QMessageSortOrder &sortOrder, uint limit, uint offset) const |
187 QMessageIdList QMessageManager::queryMessages(const QMessageFilter &filter, const QMessageSortOrder &sortOrder, uint limit, uint offset) const |
185 { |
188 { |
186 return store->queryMessages(filter, sortOrder, limit, offset); |
189 return store->queryMessages(filter, sortOrder, limit, offset); |
195 If \a sortOrders is not empty, then the identifiers will be sorted by applying each |
198 If \a sortOrders is not empty, then the identifiers will be sorted by applying each |
196 sort order element in sequence. |
199 sort order element in sequence. |
197 If \a limit is not zero, then \a limit places an upper bound on the number of |
200 If \a limit is not zero, then \a limit places an upper bound on the number of |
198 ids in the list returned. |
201 ids in the list returned. |
199 \a offset specifies how many ids to skip at the beginning of the list returned. |
202 \a offset specifies how many ids to skip at the beginning of the list returned. |
|
203 |
|
204 The performance of querying messages is currently significantly less than |
|
205 optimal for some querying criteria on some platforms. |
200 |
206 |
201 \sa error(), countMessages() |
207 \sa error(), countMessages() |
202 */ |
208 */ |
203 QMessageIdList QMessageManager::queryMessages(const QMessageFilter &filter, const QList<QMessageSortOrder> &sortOrders, uint limit, uint offset) const |
209 QMessageIdList QMessageManager::queryMessages(const QMessageFilter &filter, const QList<QMessageSortOrder> &sortOrders, uint limit, uint offset) const |
204 { |
210 { |
225 If \a limit is not zero, then \a limit places an upper bound on the number of |
231 If \a limit is not zero, then \a limit places an upper bound on the number of |
226 ids in the list returned. |
232 ids in the list returned. |
227 \a offset specifies how many ids to skip at the beginning of the list returned. |
233 \a offset specifies how many ids to skip at the beginning of the list returned. |
228 \a matchFlags specifies the matching method to use. |
234 \a matchFlags specifies the matching method to use. |
229 |
235 |
|
236 The performance of querying messages is currently significantly less than |
|
237 optimal for some querying criteria on some platforms. |
|
238 |
230 \sa error(), countMessages() |
239 \sa error(), countMessages() |
231 */ |
240 */ |
232 QMessageIdList QMessageManager::queryMessages(const QMessageFilter &filter, const QString &body, QMessageDataComparator::MatchFlags matchFlags, const QMessageSortOrder &sortOrder, uint limit, uint offset) const |
241 QMessageIdList QMessageManager::queryMessages(const QMessageFilter &filter, const QString &body, QMessageDataComparator::MatchFlags matchFlags, const QMessageSortOrder &sortOrder, uint limit, uint offset) const |
233 { |
242 { |
234 return store->queryMessages(filter, body, matchFlags, sortOrder, limit, offset); |
243 return store->queryMessages(filter, body, matchFlags, sortOrder, limit, offset); |
245 sort order element in sequence. |
254 sort order element in sequence. |
246 If \a limit is not zero, then \a limit places an upper bound on the number of |
255 If \a limit is not zero, then \a limit places an upper bound on the number of |
247 ids in the list returned. |
256 ids in the list returned. |
248 \a offset specifies how many ids to skip at the beginning of the list returned. |
257 \a offset specifies how many ids to skip at the beginning of the list returned. |
249 \a matchFlags specifies the matching method to use. |
258 \a matchFlags specifies the matching method to use. |
|
259 |
|
260 The performance of querying messages is currently significantly less than |
|
261 optimal for some querying criteria on some platforms. |
250 |
262 |
251 \sa error(), countMessages() |
263 \sa error(), countMessages() |
252 */ |
264 */ |
253 QMessageIdList QMessageManager::queryMessages(const QMessageFilter &filter, const QString &body, QMessageDataComparator::MatchFlags matchFlags, const QList<QMessageSortOrder> &sortOrders, uint limit, uint offset) const |
265 QMessageIdList QMessageManager::queryMessages(const QMessageFilter &filter, const QString &body, QMessageDataComparator::MatchFlags matchFlags, const QList<QMessageSortOrder> &sortOrders, uint limit, uint offset) const |
254 { |
266 { |
357 \fn QMessageManager::countMessages(const QMessageFilter& filter) const |
369 \fn QMessageManager::countMessages(const QMessageFilter& filter) const |
358 |
370 |
359 Returns the number of messages which match the filtering criteria defined |
371 Returns the number of messages which match the filtering criteria defined |
360 in QMessageFilter \a filter. If \a filter is empty the count of all |
372 in QMessageFilter \a filter. If \a filter is empty the count of all |
361 available messages is returned. |
373 available messages is returned. |
|
374 |
|
375 The performance of counting messages is currently significantly less than optimal |
|
376 for some filters on some platforms. |
362 |
377 |
363 \sa error(), queryMessages() |
378 \sa error(), queryMessages() |
364 */ |
379 */ |
365 int QMessageManager::countMessages(const QMessageFilter& filter) const |
380 int QMessageManager::countMessages(const QMessageFilter& filter) const |
366 { |
381 { |
460 |
475 |
461 Returns \c true if the operation successfully updates the store; otherwise returns \c false. |
476 Returns \c true if the operation successfully updates the store; otherwise returns \c false. |
462 |
477 |
463 To ensure the change is propagated to any affected external server |
478 To ensure the change is propagated to any affected external server |
464 QMessageService::exportUpdates() should be subsequently called. |
479 QMessageService::exportUpdates() should be subsequently called. |
465 |
480 |
|
481 On the Maemo 5 (Fremantle) platform for SMS type messages this function is not yet |
|
482 supported. |
|
483 |
|
484 Using this function to explicitly set a size or date is not currently supported on some platforms. |
|
485 |
466 \sa message(), updateMessage(), removeMessage(), QMessageService::exportUpdates() |
486 \sa message(), updateMessage(), removeMessage(), QMessageService::exportUpdates() |
467 */ |
487 */ |
468 bool QMessageManager::addMessage(QMessage *m) |
488 bool QMessageManager::addMessage(QMessage *m) |
469 { |
489 { |
470 return store->addMessage(m); |
490 return store->addMessage(m); |
480 |
500 |
481 Returns \c true if the operation successfully updates the store; otherwise returns \c false. |
501 Returns \c true if the operation successfully updates the store; otherwise returns \c false. |
482 |
502 |
483 To ensure the change is propagated to any affected external server |
503 To ensure the change is propagated to any affected external server |
484 QMessageService::exportUpdates() should be subsequently called. |
504 QMessageService::exportUpdates() should be subsequently called. |
|
505 |
|
506 Using this function to explicitly set a size or date is not currently supported on some platforms. |
|
507 |
|
508 On the Maemo 5 (Fremantle) platform this function is not yet supported. |
485 |
509 |
486 \sa addMessage(), removeMessage(), QMessageService::exportUpdates() |
510 \sa addMessage(), removeMessage(), QMessageService::exportUpdates() |
487 */ |
511 */ |
488 bool QMessageManager::updateMessage(QMessage *m) |
512 bool QMessageManager::updateMessage(QMessage *m) |
489 { |
513 { |
554 \fn void QMessageManager::messageAdded(const QMessageId &id, const QMessageManager::NotificationFilterIdSet &matchingFilterIds); |
578 \fn void QMessageManager::messageAdded(const QMessageId &id, const QMessageManager::NotificationFilterIdSet &matchingFilterIds); |
555 |
579 |
556 Signal that is emitted when the message identified by \a id is added to the message store. |
580 Signal that is emitted when the message identified by \a id is added to the message store. |
557 \a matchingFilterIds contains a set of values identifiying registered notification filters |
581 \a matchingFilterIds contains a set of values identifiying registered notification filters |
558 that matched the message. |
582 that matched the message. |
|
583 |
|
584 Currently on the Maemo 5 (Fremantle) platform this signal is not reported for messages in the |
|
585 inbox when the inbox is open in modest. |
559 |
586 |
560 \sa messageRemoved(), messageUpdated(), registerNotificationFilter() |
587 \sa messageRemoved(), messageUpdated(), registerNotificationFilter() |
561 */ |
588 */ |
562 |
589 |
563 /*! |
590 /*! |