Akonadi::Server::NotificationCollector

Search for usage in LXR

Akonadi::Server::NotificationCollector Class Reference

#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 itemsRelationsChanged (const PimItem::List &items, const Relation::List &addedRelations, const Relation::List &removedRelations, const Collection &collection=Collection(), const QByteArray &resource=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 relationAdded (const Relation &relation)
 
void relationRemoved (const Relation &relation)
 
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()

NotificationCollector::NotificationCollector ( AkonadiServer &  akonadi,
DataStore db 
)
explicit

Create a new notification collector for the given DataStore db.

Parameters
dbThe datastore using this notification collector.

Definition at line 30 of file notificationcollector.cpp.

◆ ~NotificationCollector()

virtual Akonadi::Server::NotificationCollector::~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 134 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 143 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 160 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 175 of file notificationcollector.cpp.

◆ collectionSubscribed()

void NotificationCollector::collectionSubscribed ( const Collection collection,
const QByteArray resource = QByteArray() 
)

Notify about a collection subscription.

Definition at line 185 of file notificationcollector.cpp.

◆ collectionUnsubscribed()

void NotificationCollector::collectionUnsubscribed ( const Collection collection,
const QByteArray resource = QByteArray() 
)

Notify about a collection unsubscription.

Definition at line 194 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 586 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 124 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 110 of file notificationcollector.cpp.

◆ itemsRelationsChanged()

void NotificationCollector::itemsRelationsChanged ( const PimItem::List &  items,
const Relation::List addedRelations,
const Relation::List removedRelations,
const Collection collection = Collection(),
const QByteArray resource = QByteArray() 
)

Notify about changed items relations.

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 119 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 129 of file notificationcollector.cpp.

◆ relationAdded()

void NotificationCollector::relationAdded ( const Relation relation)

Notify about an added relation.

Definition at line 219 of file notificationcollector.cpp.

◆ relationRemoved()

void NotificationCollector::relationRemoved ( const Relation relation)

Notify about a removed relation.

Definition at line 224 of file notificationcollector.cpp.

◆ setConnection()

void NotificationCollector::setConnection ( Connection connection)

Sets the connection that is causing the changes.

Definition at line 234 of file notificationcollector.cpp.

◆ tagAdded()

void NotificationCollector::tagAdded ( const Tag tag)

Notify about an added tag.

Definition at line 204 of file notificationcollector.cpp.

◆ tagChanged()

void NotificationCollector::tagChanged ( const Tag tag)

Notify about a changed tag.

Definition at line 209 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 214 of file notificationcollector.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Tue Aug 16 2022 04:00:10 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.