• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.11.3 API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • akonadi
monitor.h
1 /*
2  Copyright (c) 2006 - 2007 Volker Krause <vkrause@kde.org>
3 
4  This library is free software; you can redistribute it and/or modify it
5  under the terms of the GNU Library General Public License as published by
6  the Free Software Foundation; either version 2 of the License, or (at your
7  option) any later version.
8 
9  This library is distributed in the hope that it will be useful, but WITHOUT
10  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12  License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to the
16  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17  02110-1301, USA.
18 */
19 
20 #ifndef AKONADI_MONITOR_H
21 #define AKONADI_MONITOR_H
22 
23 #include <akonadi/collection.h>
24 #include <akonadi/item.h>
25 
26 #include <QtCore/QObject>
27 
28 namespace Akonadi {
29 
30 class CollectionFetchScope;
31 class CollectionStatistics;
32 class Item;
33 class ItemFetchScope;
34 class MonitorPrivate;
35 class Session;
36 
72 class AKONADI_EXPORT Monitor : public QObject
73 {
74  Q_OBJECT
75 
76  public:
82  explicit Monitor( QObject *parent = 0 );
83 
87  virtual ~Monitor();
88 
104  void setCollectionMonitored( const Collection &collection, bool monitored = true );
105 
115  void setItemMonitored( const Item &item, bool monitored = true );
116 
128  void setResourceMonitored( const QByteArray &resource, bool monitored = true );
129 
143  void setMimeTypeMonitored( const QString &mimetype, bool monitored = true );
144 
151  void setAllMonitored( bool monitored = true );
152 
159  void ignoreSession( Session *session );
160 
166  void fetchCollection( bool enable );
167 
174  void fetchCollectionStatistics( bool enable );
175 
186  void setItemFetchScope( const ItemFetchScope &fetchScope );
187 
188 
213  void fetchChangedOnly( bool enable );
214 
227  ItemFetchScope &itemFetchScope();
228 
240  void setCollectionFetchScope( const CollectionFetchScope &fetchScope );
241 
255  CollectionFetchScope &collectionFetchScope();
256 
262  Collection::List collectionsMonitored() const;
263 
271  KDE_DEPRECATED QList<Item::Id> itemsMonitored() const;
272 
280  QVector<Item::Id> itemsMonitoredEx() const;
281 
287  QStringList mimeTypesMonitored() const;
288 
294  QList<QByteArray> resourcesMonitored() const;
295 
301  bool isAllMonitored() const;
302 
309  void setSession( Akonadi::Session *session );
310 
316  Session* session() const;
317 
325  void setCollectionMoveTranslationEnabled( bool enabled );
326 
327  Q_SIGNALS:
334  void itemChanged( const Akonadi::Item &item, const QSet<QByteArray> &partIdentifiers );
335 
344  void itemsFlagsChanged( const Akonadi::Item::List &items, const QSet<QByteArray> &addedFlags,
345  const QSet<QByteArray> &removedFlags );
346 
354  void itemMoved( const Akonadi::Item &item, const Akonadi::Collection &collectionSource,
355  const Akonadi::Collection &collectionDestination );
356 
366  void itemsMoved( const Akonadi::Item::List &items, const Akonadi::Collection &collectionSource,
367  const Akonadi::Collection &collectionDestination );
368 
375  void itemAdded( const Akonadi::Item &item, const Akonadi::Collection &collection );
376 
385  void itemRemoved( const Akonadi::Item &item );
386 
395  void itemsRemoved( const Akonadi::Item::List &items );
396 
404  void itemLinked( const Akonadi::Item &item, const Akonadi::Collection &collection );
405 
414  void itemsLinked( const Akonadi::Item::List &items, const Akonadi::Collection &collection );
415 
423  void itemUnlinked( const Akonadi::Item &item, const Akonadi::Collection &collection );
424 
433  void itemsUnlinked( const Akonadi::Item::List &items, const Akonadi::Collection &collection );
434 
441  void collectionAdded( const Akonadi::Collection &collection, const Akonadi::Collection &parent );
442 
448  void collectionChanged( const Akonadi::Collection &collection );
449 
458  void collectionChanged( const Akonadi::Collection &collection, const QSet<QByteArray> &attributeNames );
459 
469  void collectionMoved( const Akonadi::Collection &collection, const Akonadi::Collection &source, const Akonadi::Collection &destination );
470 
476  void collectionRemoved( const Akonadi::Collection &collection );
477 
488  void collectionSubscribed( const Akonadi::Collection& collection, const Akonadi::Collection &parent );
489 
497  void collectionUnsubscribed( const Akonadi::Collection& collection );
498 
507  void collectionStatisticsChanged( Akonadi::Collection::Id id,
508  const Akonadi::CollectionStatistics &statistics );
509 
517  void collectionMonitored( const Akonadi::Collection &collection, bool monitored );
518 
526  void itemMonitored( const Akonadi::Item &item, bool monitored );
527 
535  void resourceMonitored( const QByteArray &identifier, bool monitored );
536 
544  void mimeTypeMonitored( const QString &mimeType, bool monitored );
545 
552  void allMonitored( bool monitored );
553 
554  protected:
555  //@cond PRIVATE
556  friend class EntityTreeModel;
557  friend class EntityTreeModelPrivate;
558  MonitorPrivate *d_ptr;
559  explicit Monitor( MonitorPrivate *d, QObject *parent = 0 );
560  //@endcond
561 
562  private:
563  Q_DECLARE_PRIVATE( Monitor )
564 
565  //@cond PRIVATE
566  Q_PRIVATE_SLOT( d_ptr, void slotSessionDestroyed( QObject* ) )
567  Q_PRIVATE_SLOT( d_ptr, void slotStatisticsChangedFinished( KJob* ) )
568  Q_PRIVATE_SLOT( d_ptr, void slotFlushRecentlyChangedCollections() )
569  Q_PRIVATE_SLOT( d_ptr, void slotNotify( const Akonadi::NotificationMessageV2::List& ) )
570  Q_PRIVATE_SLOT( d_ptr, void dataAvailable() )
571  Q_PRIVATE_SLOT( d_ptr, void serverStateChanged( Akonadi::ServerManager::State ) )
572  Q_PRIVATE_SLOT( d_ptr, void invalidateCollectionCache( qint64 ) )
573  Q_PRIVATE_SLOT( d_ptr, void invalidateItemCache( qint64 ) )
574 
575  friend class ResourceBasePrivate;
576  //@endcond
577 };
578 
579 }
580 
581 #endif
Akonadi::CollectionStatistics
Provides statistics information of a Collection.
Definition: collectionstatistics.h:69
Akonadi::CollectionFetchScope
Specifies which parts of a collection should be fetched from the Akonadi storage. ...
Definition: collectionfetchscope.h:68
Akonadi::Collection
Represents a collection of PIM items.
Definition: collection.h:75
Akonadi::Entity::Id
qint64 Id
Describes the unique id type.
Definition: entity.h:64
Akonadi::Session
A communication session with the Akonadi storage.
Definition: session.h:59
Akonadi::ItemFetchScope
Specifies which parts of an item should be fetched from the Akonadi storage.
Definition: itemfetchscope.h:68
Akonadi::Monitor
Monitors an item or collection for changes.
Definition: monitor.h:72
Akonadi::MonitorPrivate
Definition: monitor_p.h:49
Akonadi::EntityTreeModel
A model for collections and items together.
Definition: entitytreemodel.h:317
Akonadi::ServerManager::State
State
Enum for the various states the server can be in.
Definition: servermanager.h:50
Akonadi::EntityTreeModelPrivate
Definition: entitytreemodel_p.h:61
Akonadi::Collection::List
QList< Collection > List
Describes a list of collections.
Definition: collection.h:81
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Nov 26 2013 09:03:18 by doxygen 1.8.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

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

kdepimlibs-4.11.3 API Reference

Skip menu "kdepimlibs-4.11.3 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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