akonadi
#include <changerecorder.h>
Public Slots | |
void | replayNext () |
Signals | |
void | changesAdded () |
void | nothingToReplay () |
Signals inherited from Akonadi::Monitor | |
void | allMonitored (bool monitored) |
void | collectionAdded (const Akonadi::Collection &collection, const Akonadi::Collection &parent) |
void | collectionChanged (const Akonadi::Collection &collection) |
void | collectionChanged (const Akonadi::Collection &collection, const QSet< QByteArray > &attributeNames) |
void | collectionMonitored (const Akonadi::Collection &collection, bool monitored) |
void | collectionMoved (const Akonadi::Collection &collection, const Akonadi::Collection &source, const Akonadi::Collection &destination) |
void | collectionRemoved (const Akonadi::Collection &collection) |
void | collectionStatisticsChanged (Akonadi::Collection::Id id, const Akonadi::CollectionStatistics &statistics) |
void | collectionSubscribed (const Akonadi::Collection &collection, const Akonadi::Collection &parent) |
void | collectionUnsubscribed (const Akonadi::Collection &collection) |
void | itemAdded (const Akonadi::Item &item, const Akonadi::Collection &collection) |
void | itemChanged (const Akonadi::Item &item, const QSet< QByteArray > &partIdentifiers) |
void | itemLinked (const Akonadi::Item &item, const Akonadi::Collection &collection) |
void | itemMonitored (const Akonadi::Item &item, bool monitored) |
void | itemMoved (const Akonadi::Item &item, const Akonadi::Collection &collectionSource, const Akonadi::Collection &collectionDestination) |
void | itemRemoved (const Akonadi::Item &item) |
void | itemsFlagsChanged (const Akonadi::Item::List &items, const QSet< QByteArray > &addedFlags, const QSet< QByteArray > &removedFlags) |
void | itemsLinked (const Akonadi::Item::List &items, const Akonadi::Collection &collection) |
void | itemsMoved (const Akonadi::Item::List &items, const Akonadi::Collection &collectionSource, const Akonadi::Collection &collectionDestination) |
void | itemsRemoved (const Akonadi::Item::List &items) |
void | itemsUnlinked (const Akonadi::Item::List &items, const Akonadi::Collection &collection) |
void | itemUnlinked (const Akonadi::Item &item, const Akonadi::Collection &collection) |
void | mimeTypeMonitored (const QString &mimeType, bool monitored) |
void | resourceMonitored (const QByteArray &identifier, bool monitored) |
Public Member Functions | |
ChangeRecorder (QObject *parent=0) | |
~ChangeRecorder () | |
void | changeProcessed () |
QString | dumpNotificationListToString () const |
bool | isEmpty () const |
void | setChangeRecordingEnabled (bool enable) |
void | setConfig (QSettings *settings) |
Public Member Functions inherited from Akonadi::Monitor | |
Monitor (QObject *parent=0) | |
virtual | ~Monitor () |
CollectionFetchScope & | collectionFetchScope () |
Collection::List | collectionsMonitored () const |
void | fetchChangedOnly (bool enable) |
void | fetchCollection (bool enable) |
void | fetchCollectionStatistics (bool enable) |
void | ignoreSession (Session *session) |
bool | isAllMonitored () const |
ItemFetchScope & | itemFetchScope () |
AKONADI_DEPRECATED QList < Item::Id > | itemsMonitored () const |
QVector< Item::Id > | itemsMonitoredEx () const |
QStringList | mimeTypesMonitored () const |
QList< QByteArray > | resourcesMonitored () const |
Session * | session () const |
void | setAllMonitored (bool monitored=true) |
void | setCollectionFetchScope (const CollectionFetchScope &fetchScope) |
void | setCollectionMonitored (const Collection &collection, bool monitored=true) |
void | setCollectionMoveTranslationEnabled (bool enabled) |
void | setItemFetchScope (const ItemFetchScope &fetchScope) |
void | setItemMonitored (const Item &item, bool monitored=true) |
void | setMimeTypeMonitored (const QString &mimetype, bool monitored=true) |
void | setResourceMonitored (const QByteArray &resource, bool monitored=true) |
void | setSession (Akonadi::Session *session) |
Detailed Description
Records and replays change notification.
This class is responsible for recording change notifications while an agent is not online and replaying the notifications when the agent is online again. Therefore the agent doesn't have to care about online/offline mode in its synchronization algorithm.
Unlike Akonadi::Monitor this class only emits one change signal at a time. To receive the next one you need to explicitly call replayNext(). If a signal is emitted that has no receivers, it's automatically skipped, which means you only need to connect to signals you are actually interested in.
Definition at line 47 of file changerecorder.h.
Constructor & Destructor Documentation
|
explicit |
Creates a new change recorder.
Definition at line 28 of file changerecorder.cpp.
ChangeRecorder::~ChangeRecorder | ( | ) |
Destroys the change recorder.
All not yet processed changes are written back to the config file.
Definition at line 38 of file changerecorder.cpp.
Member Function Documentation
void ChangeRecorder::changeProcessed | ( | ) |
Removes the previously emitted change from the records.
Definition at line 91 of file changerecorder.cpp.
|
signal |
Emitted when new changes are recorded.
QString Akonadi::ChangeRecorder::dumpNotificationListToString | ( | ) | const |
Debugging: dump current list of notifications, as saved on disk.
Definition at line 120 of file changerecorder.cpp.
bool ChangeRecorder::isEmpty | ( | ) | const |
Returns whether there are recorded changes.
Definition at line 85 of file changerecorder.cpp.
|
signal |
Emitted when replayNext() was called, but there was no valid change to replay.
This can happen when all pending changes have been filtered out, for example. You only need to connect to this signal if you rely on one signal being emitted as a result of calling replayNext().
|
slot |
Replay the next change notification and erase the previous one from the record.
Definition at line 56 of file changerecorder.cpp.
void ChangeRecorder::setChangeRecordingEnabled | ( | bool | enable | ) |
Enables change recording.
If change recording is disabled, this class behaves exactly like Akonadi::Monitor. Change recording is enabled by default.
- Parameters
-
enable false
to disable change recording.true
by default
Definition at line 105 of file changerecorder.cpp.
void ChangeRecorder::setConfig | ( | QSettings * | settings | ) |
Sets the QSettings object used for persistent recorded changes.
Definition at line 42 of file changerecorder.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:28 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.