• Skip to content
  • Skip to link menu
Brand

API Documentation

  1. KDE API Reference
  2. KDE PIM
  3. Akonadi
  • KDE Home
  • Contact Us

Quick Links

Skip menu "Akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • File List
  • Modules
  • Related Pages

Class Picker

About

PIM Storage Framework

Maintainer
Daniel Vrátil
Supported platforms
Linux
Community
IRC: #akonadi on Freenode
Mailing list: kde-pim
Use with CMake
find_package(KF5AkonadiCore)
target_link_libraries(yourapp KF5::AkonadiCore)
Use with QMake
QT += AkonadiCore 
Clone
git clone git://anongit.kde.org/akonadi.git
Browse source
Akonadi on cgit.kde.org

Akonadi

  • View on LXR
  • Akonadi
  • ChangeRecorder
Signals | Public Slots | Public Member Functions | List of all members
Akonadi::ChangeRecorder Class Reference

#include <changerecorder.h>

Inheritance diagram for Akonadi::ChangeRecorder:
Inheritance graph
[legend]

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 debugNotification (const Akonadi::ChangeNotification &notification)
 
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 itemsRelationsChanged (const Akonadi::Item::List &items, const Akonadi::Relation::List &addedRelations, const Akonadi::Relation::List &removedRelations)
 
void itemsRemoved (const Akonadi::Item::List &items)
 
void itemsTagsChanged (const Akonadi::Item::List &items, const QSet< Akonadi::Tag > &addedTags, const QSet< Akonadi::Tag > &removedTags)
 
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 monitorReady ()
 
void notificationSubscriberAdded (const Akonadi::NotificationSubscriber &subscriber)
 
void notificationSubscriberChanged (const Akonadi::NotificationSubscriber &subscriber)
 
void notificationSubscriberRemoved (const Akonadi::NotificationSubscriber &subscriber)
 
void relationAdded (const Akonadi::Relation &relation)
 
void relationRemoved (const Akonadi::Relation &relation)
 
void resourceMonitored (const QByteArray &identifier, bool monitored)
 
void tagAdded (const Akonadi::Tag &tag)
 
void tagChanged (const Akonadi::Tag &tag)
 
void tagMonitored (const Akonadi::Tag &tag, bool monitored)
 
void tagRemoved (const Akonadi::Tag &tag)
 
void typeMonitored (const Akonadi::Monitor::Type type, bool monitored)
 

Public Slots

void replayNext ()
 

Public Member Functions

 ChangeRecorder (QObject *parent=nullptr)
 
 ~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=nullptr)
 
 ~Monitor () override
 
CollectionFetchScope & collectionFetchScope ()
 
Collection::List collectionsMonitored () const
 
bool exclusive () const
 
void fetchChangedOnly (bool enable)
 
void fetchCollection (bool enable)
 
void fetchCollectionStatistics (bool enable)
 
void ignoreSession (Session *session)
 
bool isAllMonitored () const
 
ItemFetchScope & itemFetchScope ()
 
QVector< Item::Id > itemsMonitoredEx () const
 
QStringList mimeTypesMonitored () const
 
int numItemsMonitored () const
 
int numMimeTypesMonitored () const
 
int numResourcesMonitored () 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 setExclusive (bool exclusive=true)
 
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)
 
void setTagFetchScope (const TagFetchScope &fetchScope)
 
void setTagMonitored (const Tag &tag, bool monitored=true)
 
void setTypeMonitored (Type type, bool monitored=true)
 
TagFetchScope & tagFetchScope ()
 
QVector< Tag::Id > tagsMonitored () const
 
QVector< Type > typesMonitored () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectList & children () const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const
 
bool disconnect (const QObject *receiver, const char *method) const
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QByteArray > dynamicPropertyNames () const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
T findChild (const QString &name, QFlags< Qt::FindChildOption > options) const
 
QList< T > findChildren (const QString &name, QFlags< Qt::FindChildOption > options) const
 
QList< T > findChildren (const QRegExp &regExp, QFlags< Qt::FindChildOption > options) const
 
QList< T > findChildren (const QRegularExpression &re, QFlags< Qt::FindChildOption > options) const
 
bool inherits (const char *className) const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const
 
bool isWindowType () const
 
void killTimer (int id)
 
virtual const QMetaObject * metaObject () const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const
 
void objectNameChanged (const QString &objectName)
 
QObject * parent () const
 
QVariant property (const char *name) const
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval, Qt::TimerType timerType)
 
QThread * thread () const
 

Additional Inherited Members

- Public Types inherited from Akonadi::Monitor
enum  Type {
  Collections = 1, Items, Tags, Relations,
  Subscribers, Notifications
}
 
- Properties inherited from QObject
 objectName
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const
 
int receivers (const char *signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

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.

Author
Volker Krause vkrau[email protected][email protected][email protected]de.or[email protected]g

Definition at line 49 of file changerecorder.h.

Constructor & Destructor Documentation

ChangeRecorder::ChangeRecorder ( QObject *  parent = nullptr)
explicit

Creates a new change recorder.

Definition at line 27 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 37 of file changerecorder.cpp.

Member Function Documentation

void ChangeRecorder::changeProcessed ( )

Removes the previously emitted change from the records.

Definition at line 92 of file changerecorder.cpp.

void Akonadi::ChangeRecorder::changesAdded ( )
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 123 of file changerecorder.cpp.

bool ChangeRecorder::isEmpty ( ) const

Returns whether there are recorded changes.

Definition at line 86 of file changerecorder.cpp.

void Akonadi::ChangeRecorder::nothingToReplay ( )
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().

void ChangeRecorder::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
enablefalse to disable change recording. true by default

Definition at line 108 of file changerecorder.cpp.

void ChangeRecorder::setConfig ( QSettings *  settings)

Sets the QSettings object used for persistent recorded changes.

Definition at line 41 of file changerecorder.cpp.


The documentation for this class was generated from the following files:
  • changerecorder.h
  • changerecorder.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Fri Dec 13 2019 02:47:24 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal