• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.13.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/tag.h>
24 #include <akonadi/collection.h>
25 #include <akonadi/item.h>
26 
27 #include <QtCore/QObject>
28 
29 namespace Akonadi {
30 
31 class CollectionFetchScope;
32 class CollectionStatistics;
33 class Item;
34 class ItemFetchScope;
35 class MonitorPrivate;
36 class Session;
37 class TagFetchScope;
38 
39 
75 class AKONADI_EXPORT Monitor : public QObject
76 {
77  Q_OBJECT
78 
79  public:
80  enum Type {
84  Collections = 1,
85  Items,
86  Tags
87  };
88 
94  explicit Monitor( QObject *parent = 0 );
95 
99  virtual ~Monitor();
100 
116  void setCollectionMonitored( const Collection &collection, bool monitored = true );
117 
127  void setItemMonitored( const Item &item, bool monitored = true );
128 
140  void setResourceMonitored( const QByteArray &resource, bool monitored = true );
141 
155  void setMimeTypeMonitored( const QString &mimetype, bool monitored = true );
156 
166  void setTagMonitored( const Tag &tag, bool monitored = true );
167 
178  void setTypeMonitored( Type type, bool monitored = true );
179 
186  void setAllMonitored( bool monitored = true );
187 
194  void ignoreSession( Session *session );
195 
201  void fetchCollection( bool enable );
202 
209  void fetchCollectionStatistics( bool enable );
210 
221  void setItemFetchScope( const ItemFetchScope &fetchScope );
222 
247  void fetchChangedOnly( bool enable );
248 
261  ItemFetchScope &itemFetchScope();
262 
274  void setCollectionFetchScope( const CollectionFetchScope &fetchScope );
275 
289  CollectionFetchScope &collectionFetchScope();
290 
300  void setTagFetchScope( const TagFetchScope &fetchScope );
301 
313  TagFetchScope &tagFetchScope();
314 
320  Collection::List collectionsMonitored() const;
321 
329  AKONADI_DEPRECATED QList<Item::Id> itemsMonitored() const;
330 
338  QVector<Item::Id> itemsMonitoredEx() const;
339 
345  QStringList mimeTypesMonitored() const;
346 
352  QVector<Tag::Id> tagsMonitored() const;
353 
359  QVector<Type> typesMonitored() const;
360 
366  QList<QByteArray> resourcesMonitored() const;
367 
373  bool isAllMonitored() const;
374 
381  void setSession( Akonadi::Session *session );
382 
388  Session* session() const;
389 
397  void setCollectionMoveTranslationEnabled( bool enabled );
398 
399  Q_SIGNALS:
406  void itemChanged( const Akonadi::Item &item, const QSet<QByteArray> &partIdentifiers );
407 
416  void itemsFlagsChanged( const Akonadi::Item::List &items, const QSet<QByteArray> &addedFlags,
417  const QSet<QByteArray> &removedFlags );
418 
427  void itemsTagsChanged( const Akonadi::Item::List &items, const QSet<Akonadi::Tag> &addedTags,
428  const QSet<Akonadi::Tag> &removedTags );
429 
437  void itemMoved( const Akonadi::Item &item, const Akonadi::Collection &collectionSource,
438  const Akonadi::Collection &collectionDestination );
439 
449  void itemsMoved( const Akonadi::Item::List &items, const Akonadi::Collection &collectionSource,
450  const Akonadi::Collection &collectionDestination );
451 
458  void itemAdded( const Akonadi::Item &item, const Akonadi::Collection &collection );
459 
468  void itemRemoved( const Akonadi::Item &item );
469 
478  void itemsRemoved( const Akonadi::Item::List &items );
479 
487  void itemLinked( const Akonadi::Item &item, const Akonadi::Collection &collection );
488 
497  void itemsLinked( const Akonadi::Item::List &items, const Akonadi::Collection &collection );
498 
506  void itemUnlinked( const Akonadi::Item &item, const Akonadi::Collection &collection );
507 
516  void itemsUnlinked( const Akonadi::Item::List &items, const Akonadi::Collection &collection );
517 
524  void collectionAdded( const Akonadi::Collection &collection, const Akonadi::Collection &parent );
525 
531  void collectionChanged( const Akonadi::Collection &collection );
532 
541  void collectionChanged( const Akonadi::Collection &collection, const QSet<QByteArray> &attributeNames );
542 
552  void collectionMoved( const Akonadi::Collection &collection, const Akonadi::Collection &source, const Akonadi::Collection &destination );
553 
559  void collectionRemoved( const Akonadi::Collection &collection );
560 
571  void collectionSubscribed( const Akonadi::Collection& collection, const Akonadi::Collection &parent );
572 
580  void collectionUnsubscribed( const Akonadi::Collection& collection );
581 
590  void collectionStatisticsChanged( Akonadi::Collection::Id id,
591  const Akonadi::CollectionStatistics &statistics );
592 
593 
600  void tagAdded( const Akonadi::Tag &tag );
601 
608  void tagChanged( const Akonadi::Tag &tag );
609 
619  void tagRemoved( const Akonadi::Tag &tag );
620 
628  void collectionMonitored( const Akonadi::Collection &collection, bool monitored );
629 
637  void itemMonitored( const Akonadi::Item &item, bool monitored );
638 
646  void resourceMonitored( const QByteArray &identifier, bool monitored );
647 
655  void mimeTypeMonitored( const QString &mimeType, bool monitored );
656 
663  void allMonitored( bool monitored );
664 
671  void tagMonitored( const Akonadi::Tag &tag, bool monitored );
672 
679  void typeMonitored( const Akonadi::Monitor::Type type, bool monitored );
680 
681  protected:
682  //@cond PRIVATE
683  friend class EntityTreeModel;
684  friend class EntityTreeModelPrivate;
685  MonitorPrivate *d_ptr;
686  explicit Monitor( MonitorPrivate *d, QObject *parent = 0 );
687  //@endcond
688 
689  private:
690  Q_DECLARE_PRIVATE( Monitor )
691 
692  //@cond PRIVATE
693  Q_PRIVATE_SLOT( d_ptr, void slotSessionDestroyed( QObject* ) )
694  Q_PRIVATE_SLOT( d_ptr, void slotStatisticsChangedFinished( KJob* ) )
695  Q_PRIVATE_SLOT( d_ptr, void slotFlushRecentlyChangedCollections() )
696  Q_PRIVATE_SLOT( d_ptr, void slotNotify( const Akonadi::NotificationMessageV3::List& ) )
697  Q_PRIVATE_SLOT( d_ptr, void dataAvailable() )
698  Q_PRIVATE_SLOT( d_ptr, void serverStateChanged( Akonadi::ServerManager::State ) )
699  Q_PRIVATE_SLOT( d_ptr, void invalidateCollectionCache( qint64 ) )
700  Q_PRIVATE_SLOT( d_ptr, void invalidateItemCache( qint64 ) )
701  Q_PRIVATE_SLOT( d_ptr, void invalidateTagCache( qint64 ) )
702 
703  friend class ResourceBasePrivate;
704  //@endcond
705 };
706 
707 }
708 
709 #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::TagFetchScope
Specifies which parts of a tag should be fetched from the Akonadi storage.
Definition: tagfetchscope.h:33
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:65
Akonadi::ServerManager
Provides methods to control the Akonadi server process.
Definition: servermanager.h:42
Akonadi::Session
A communication session with the Akonadi storage.
Definition: session.h:59
Akonadi::Monitor::Type
Type
Definition: monitor.h:80
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:75
Akonadi::MonitorPrivate
Definition: monitor_p.h:51
Akonadi::EntityTreeModel
A model for collections and items together.
Definition: entitytreemodel.h:317
Akonadi::Tag
An Akonadi Tag.
Definition: tag.h:44
Akonadi::EntityTreeModelPrivate
Definition: entitytreemodel_p.h:60
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-2014 The KDE developers.
Generated on Mon Jul 21 2014 08:03:54 by doxygen 1.8.6 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.13.3 API Reference

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