Akonadi::Server::NotificationCollector
#include <notificationcollector.h>
Public Member Functions | |
NotificationCollector (AkonadiServer &akonadi, DataStore *db) | |
virtual | ~NotificationCollector ()=default |
void | collectionAdded (const Collection &collection, const QByteArray &resource=QByteArray()) |
void | collectionChanged (const Collection &collection, const QList< QByteArray > &changes, const QByteArray &resource=QByteArray()) |
void | collectionMoved (const Collection &collection, const Collection &source, const QByteArray &resource=QByteArray(), const QByteArray &destResource=QByteArray()) |
void | collectionRemoved (const Collection &collection, const QByteArray &resource=QByteArray()) |
void | collectionSubscribed (const Collection &collection, const QByteArray &resource=QByteArray()) |
void | collectionUnsubscribed (const Collection &collection, const QByteArray &resource=QByteArray()) |
bool | dispatchNotifications () |
void | itemAdded (const PimItem &item, bool seen, const Collection &collection=Collection(), const QByteArray &resource=QByteArray()) |
void | itemChanged (const PimItem &item, const QSet< QByteArray > &changedParts, const Collection &collection=Collection(), const QByteArray &resource=QByteArray()) |
void | itemsFlagsChanged (const PimItem::List &items, const QSet< QByteArray > &addedFlags, const QSet< QByteArray > &removedFlags, const Collection &collection=Collection(), const QByteArray &resource=QByteArray()) |
void | itemsLinked (const PimItem::List &items, const Collection &collection) |
void | itemsMoved (const PimItem::List &items, const Collection &collectionSrc=Collection(), const Collection &collectionDest=Collection(), const QByteArray &sourceResource=QByteArray()) |
void | itemsRemoved (const PimItem::List &items, const Collection &collection=Collection(), const QByteArray &resource=QByteArray()) |
void | itemsTagsChanged (const PimItem::List &items, const QSet< qint64 > &addedTags, const QSet< qint64 > &removedTags, const Collection &collection=Collection(), const QByteArray &resource=QByteArray()) |
void | itemsUnlinked (const PimItem::List &items, const Collection &collection) |
void | setConnection (Connection *connection) |
void | tagAdded (const Tag &tag) |
void | tagChanged (const Tag &tag) |
void | tagRemoved (const Tag &tag, const QByteArray &resource, const QString &remoteId) |
Protected Member Functions | |
virtual void | notify (Protocol::ChangeNotificationList &&ntfs) |
Detailed Description
Part of the DataStore, collects change notifications and emits them after the current transaction has been successfully committed.
Where possible, notifications are compressed.
Definition at line 30 of file notificationcollector.h.
Constructor & Destructor Documentation
◆ NotificationCollector()
|
explicit |
Create a new notification collector for the given DataStore db
.
- Parameters
-
db The datastore using this notification collector.
Definition at line 30 of file notificationcollector.cpp.
◆ ~NotificationCollector()
|
virtualdefault |
Destroys this notification collector.
Member Function Documentation
◆ collectionAdded()
void NotificationCollector::collectionAdded | ( | const Collection & | collection, |
const QByteArray & | resource = QByteArray() ) |
Notify about a added collection.
Provide as many parameters as you have at hand currently, everything that is missing will be looked up in the database later.
Definition at line 114 of file notificationcollector.cpp.
◆ collectionChanged()
void NotificationCollector::collectionChanged | ( | const Collection & | collection, |
const QList< QByteArray > & | changes, | ||
const QByteArray & | resource = QByteArray() ) |
Notify about a changed collection.
Provide as many parameters as you have at hand currently, everything that is missing will be looked up in the database later.
Definition at line 123 of file notificationcollector.cpp.
◆ collectionMoved()
void NotificationCollector::collectionMoved | ( | const Collection & | collection, |
const Collection & | source, | ||
const QByteArray & | resource = QByteArray(), | ||
const QByteArray & | destResource = QByteArray() ) |
Notify about a moved collection.
Provide as many parameters as you have at hand currently, everything missing will be looked up on demand in the database later.
Definition at line 140 of file notificationcollector.cpp.
◆ collectionRemoved()
void NotificationCollector::collectionRemoved | ( | const Collection & | collection, |
const QByteArray & | resource = QByteArray() ) |
Notify about a removed collection.
Make sure you either provide all parameters or call this function before actually removing the item from database.
Definition at line 155 of file notificationcollector.cpp.
◆ collectionSubscribed()
void NotificationCollector::collectionSubscribed | ( | const Collection & | collection, |
const QByteArray & | resource = QByteArray() ) |
Notify about a collection subscription.
Definition at line 165 of file notificationcollector.cpp.
◆ collectionUnsubscribed()
void NotificationCollector::collectionUnsubscribed | ( | const Collection & | collection, |
const QByteArray & | resource = QByteArray() ) |
Notify about a collection unsubscription.
Definition at line 174 of file notificationcollector.cpp.
◆ dispatchNotifications()
bool NotificationCollector::dispatchNotifications | ( | ) |
Trigger sending of collected notifications.
- Returns
- Returns true when any notifications were dispatched, false if there were no pending notifications.
Definition at line 544 of file notificationcollector.cpp.
◆ itemAdded()
void NotificationCollector::itemAdded | ( | const PimItem & | item, |
bool | seen, | ||
const Collection & | collection = Collection(), | ||
const QByteArray & | resource = QByteArray() ) |
Notify about an added item.
Provide as many parameters as you have at hand currently, everything that is missing will be looked up in the database later.
Definition at line 46 of file notificationcollector.cpp.
◆ itemChanged()
void NotificationCollector::itemChanged | ( | const PimItem & | item, |
const QSet< QByteArray > & | changedParts, | ||
const Collection & | collection = Collection(), | ||
const QByteArray & | resource = QByteArray() ) |
Notify about a changed item.
Provide as many parameters as you have at hand currently, everything that is missing will be looked up in the database later.
Definition at line 53 of file notificationcollector.cpp.
◆ itemsFlagsChanged()
void NotificationCollector::itemsFlagsChanged | ( | const PimItem::List & | items, |
const QSet< QByteArray > & | addedFlags, | ||
const QSet< QByteArray > & | removedFlags, | ||
const Collection & | collection = Collection(), | ||
const QByteArray & | resource = QByteArray() ) |
Notify about changed items flags Provide as many parameters as you have at hand currently, everything that is missing will be looked up in the database later.
Definition at line 59 of file notificationcollector.cpp.
◆ itemsLinked()
void NotificationCollector::itemsLinked | ( | const PimItem::List & | items, |
const Collection & | collection ) |
Notify about linked items.
Definition at line 104 of file notificationcollector.cpp.
◆ itemsMoved()
void NotificationCollector::itemsMoved | ( | const PimItem::List & | items, |
const Collection & | collectionSrc = Collection(), | ||
const Collection & | collectionDest = Collection(), | ||
const QByteArray & | sourceResource = QByteArray() ) |
Notify about moved items Provide as many parameters as you have at hand currently, everything that is missing will be looked up in the database later.
Definition at line 90 of file notificationcollector.cpp.
◆ itemsRemoved()
void NotificationCollector::itemsRemoved | ( | const PimItem::List & | items, |
const Collection & | collection = Collection(), | ||
const QByteArray & | resource = QByteArray() ) |
Notify about removed items.
Make sure you either provide all parameters or call this function before actually removing the item from database.
Definition at line 99 of file notificationcollector.cpp.
◆ itemsTagsChanged()
void NotificationCollector::itemsTagsChanged | ( | const PimItem::List & | items, |
const QSet< qint64 > & | addedTags, | ||
const QSet< qint64 > & | removedTags, | ||
const Collection & | collection = Collection(), | ||
const QByteArray & | resource = QByteArray() ) |
Notify about changed items tags.
Definition at line 72 of file notificationcollector.cpp.
◆ itemsUnlinked()
void NotificationCollector::itemsUnlinked | ( | const PimItem::List & | items, |
const Collection & | collection ) |
Notify about unlinked items.
Definition at line 109 of file notificationcollector.cpp.
◆ notify()
|
protectedvirtual |
Definition at line 558 of file notificationcollector.cpp.
◆ setConnection()
void NotificationCollector::setConnection | ( | Connection * | connection | ) |
Sets the connection that is causing the changes.
Definition at line 204 of file notificationcollector.cpp.
◆ tagAdded()
void NotificationCollector::tagAdded | ( | const Tag & | tag | ) |
Notify about an added tag.
Definition at line 184 of file notificationcollector.cpp.
◆ tagChanged()
void NotificationCollector::tagChanged | ( | const Tag & | tag | ) |
Notify about a changed tag.
Definition at line 189 of file notificationcollector.cpp.
◆ tagRemoved()
void NotificationCollector::tagRemoved | ( | const Tag & | tag, |
const QByteArray & | resource, | ||
const QString & | remoteId ) |
Notify about a removed tag.
Definition at line 194 of file notificationcollector.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:11:40 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.