20 #ifndef AKONADI_MONITOR_H
21 #define AKONADI_MONITOR_H
23 #include <akonadi/collection.h>
24 #include <akonadi/item.h>
26 #include <QtCore/QObject>
30 class CollectionFetchScope;
31 class CollectionStatistics;
72 class AKONADI_EXPORT
Monitor :
public QObject
82 explicit Monitor( QObject *parent = 0 );
104 void setCollectionMonitored(
const Collection &collection,
bool monitored =
true );
115 void setItemMonitored(
const Item &item,
bool monitored =
true );
128 void setResourceMonitored(
const QByteArray &resource,
bool monitored =
true );
143 void setMimeTypeMonitored(
const QString &mimetype,
bool monitored =
true );
151 void setAllMonitored(
bool monitored =
true );
159 void ignoreSession(
Session *session );
166 void fetchCollection(
bool enable );
174 void fetchCollectionStatistics(
bool enable );
212 void fetchChangedOnly(
bool enable );
270 AKONADI_DEPRECATED QList<Item::Id> itemsMonitored()
const;
279 QVector<Item::Id> itemsMonitoredEx()
const;
286 QStringList mimeTypesMonitored()
const;
293 QList<QByteArray> resourcesMonitored()
const;
300 bool isAllMonitored()
const;
324 void setCollectionMoveTranslationEnabled(
bool enabled );
333 void itemChanged(
const Akonadi::Item &item,
const QSet<QByteArray> &partIdentifiers );
343 void itemsFlagsChanged(
const Akonadi::Item::List &items,
const QSet<QByteArray> &addedFlags,
344 const QSet<QByteArray> &removedFlags );
365 void itemsMoved(
const Akonadi::Item::List &items,
const Akonadi::Collection &collectionSource,
384 void itemRemoved(
const Akonadi::Item &item );
394 void itemsRemoved(
const Akonadi::Item::List &items );
413 void itemsLinked(
const Akonadi::Item::List &items,
const Akonadi::Collection &collection );
432 void itemsUnlinked(
const Akonadi::Item::List &items,
const Akonadi::Collection &collection );
457 void collectionChanged(
const Akonadi::Collection &collection,
const QSet<QByteArray> &attributeNames );
525 void itemMonitored(
const Akonadi::Item &item,
bool monitored );
534 void resourceMonitored(
const QByteArray &identifier,
bool monitored );
543 void mimeTypeMonitored(
const QString &mimeType,
bool monitored );
551 void allMonitored(
bool monitored );
565 Q_PRIVATE_SLOT( d_ptr,
void slotSessionDestroyed( QObject* ) )
566 Q_PRIVATE_SLOT( d_ptr,
void slotStatisticsChangedFinished( KJob* ) )
567 Q_PRIVATE_SLOT( d_ptr,
void slotFlushRecentlyChangedCollections() )
568 Q_PRIVATE_SLOT( d_ptr,
void slotNotify(
const Akonadi::NotificationMessageV2::List& ) )
569 Q_PRIVATE_SLOT( d_ptr,
void dataAvailable() )
571 Q_PRIVATE_SLOT( d_ptr,
void invalidateCollectionCache( qint64 ) )
572 Q_PRIVATE_SLOT( d_ptr,
void invalidateItemCache( qint64 ) )
574 friend class ResourceBasePrivate;
Provides statistics information of a Collection.
Specifies which parts of a collection should be fetched from the Akonadi storage. ...
Represents a collection of PIM items.
qint64 Id
Describes the unique id type.
A communication session with the Akonadi storage.
Specifies which parts of an item should be fetched from the Akonadi storage.
Monitors an item or collection for changes.
A model for collections and items together.
State
Enum for the various states the server can be in.
QList< Collection > List
Describes a list of collections.