• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.10.5 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 
343  void itemMoved( const Akonadi::Item &item, const Akonadi::Collection &collectionSource,
344  const Akonadi::Collection &collectionDestination );
345 
352  void itemAdded( const Akonadi::Item &item, const Akonadi::Collection &collection );
353 
362  void itemRemoved( const Akonadi::Item &item );
363 
371  void itemLinked( const Akonadi::Item &item, const Akonadi::Collection &collection );
372 
380  void itemUnlinked( const Akonadi::Item &item, const Akonadi::Collection &collection );
381 
388  void collectionAdded( const Akonadi::Collection &collection, const Akonadi::Collection &parent );
389 
395  void collectionChanged( const Akonadi::Collection &collection );
396 
405  void collectionChanged( const Akonadi::Collection &collection, const QSet<QByteArray> &attributeNames );
406 
416  void collectionMoved( const Akonadi::Collection &collection, const Akonadi::Collection &source, const Akonadi::Collection &destination );
417 
423  void collectionRemoved( const Akonadi::Collection &collection );
424 
435  void collectionSubscribed( const Akonadi::Collection& collection, const Akonadi::Collection &parent );
436 
444  void collectionUnsubscribed( const Akonadi::Collection& collection );
445 
454  void collectionStatisticsChanged( Akonadi::Collection::Id id,
455  const Akonadi::CollectionStatistics &statistics );
456 
464  void collectionMonitored( const Akonadi::Collection &collection, bool monitored );
465 
473  void itemMonitored( const Akonadi::Item &item, bool monitored );
474 
482  void resourceMonitored( const QByteArray &identifier, bool monitored );
483 
491  void mimeTypeMonitored( const QString &mimeType, bool monitored );
492 
499  void allMonitored( bool monitored );
500 
501  protected:
502  //@cond PRIVATE
503  friend class EntityTreeModel;
504  friend class EntityTreeModelPrivate;
505  MonitorPrivate *d_ptr;
506  explicit Monitor( MonitorPrivate *d, QObject *parent = 0 );
507  //@endcond
508 
509  private:
510  Q_DECLARE_PRIVATE( Monitor )
511 
512  //@cond PRIVATE
513  Q_PRIVATE_SLOT( d_ptr, void slotSessionDestroyed( QObject* ) )
514  Q_PRIVATE_SLOT( d_ptr, void slotStatisticsChangedFinished( KJob* ) )
515  Q_PRIVATE_SLOT( d_ptr, void slotFlushRecentlyChangedCollections() )
516  Q_PRIVATE_SLOT( d_ptr, void slotNotify( const Akonadi::NotificationMessage::List& ) )
517  Q_PRIVATE_SLOT( d_ptr, void dataAvailable() )
518  Q_PRIVATE_SLOT( d_ptr, void serverStateChanged( Akonadi::ServerManager::State ) )
519  Q_PRIVATE_SLOT( d_ptr, void invalidateCollectionCache( qint64 ) )
520  Q_PRIVATE_SLOT( d_ptr, void invalidateItemCache( qint64 ) )
521 
522  friend class ResourceBasePrivate;
523  //@endcond
524 };
525 
526 }
527 
528 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:27:39 by doxygen 1.8.3.1 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.10.5 API Reference

Skip menu "kdepimlibs-4.10.5 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