• Skip to content
  • Skip to link menu
KDE 4.5 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

akonadi

monitor.h

00001 /*
00002     Copyright (c) 2006 - 2007 Volker Krause <vkrause@kde.org>
00003 
00004     This library is free software; you can redistribute it and/or modify it
00005     under the terms of the GNU Library General Public License as published by
00006     the Free Software Foundation; either version 2 of the License, or (at your
00007     option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful, but WITHOUT
00010     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00011     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00012     License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public License
00015     along with this library; see the file COPYING.LIB.  If not, write to the
00016     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017     02110-1301, USA.
00018 */
00019 
00020 #ifndef AKONADI_MONITOR_H
00021 #define AKONADI_MONITOR_H
00022 
00023 #include <akonadi/collection.h>
00024 #include <akonadi/item.h>
00025 
00026 #include <QtCore/QObject>
00027 
00028 namespace Akonadi {
00029 
00030 class CollectionFetchScope;
00031 class CollectionStatistics;
00032 class Item;
00033 class ItemFetchScope;
00034 class MonitorPrivate;
00035 class Session;
00036 
00051 class AKONADI_EXPORT Monitor : public QObject
00052 {
00053   Q_OBJECT
00054 
00055   public:
00061     explicit Monitor( QObject *parent = 0 );
00062 
00066     virtual ~Monitor();
00067 
00083     void setCollectionMonitored( const Collection &collection, bool monitored = true );
00084 
00094     void setItemMonitored( const Item &item, bool monitored = true );
00095 
00107     void setResourceMonitored( const QByteArray &resource, bool monitored = true );
00108 
00122     void setMimeTypeMonitored( const QString &mimetype, bool monitored = true );
00123 
00130     void setAllMonitored( bool monitored = true );
00131 
00138     void ignoreSession( Session *session );
00139 
00145     void fetchCollection( bool enable );
00146 
00153     void fetchCollectionStatistics( bool enable );
00154 
00165     void setItemFetchScope( const ItemFetchScope &fetchScope );
00166 
00179     ItemFetchScope &itemFetchScope();
00180 
00192     void setCollectionFetchScope( const CollectionFetchScope &fetchScope );
00193 
00207     CollectionFetchScope &collectionFetchScope();
00208 
00214     Collection::List collectionsMonitored() const;
00215 
00221     QList<Item::Id> itemsMonitored() const;
00222 
00228     QStringList mimeTypesMonitored() const;
00229 
00235     QList<QByteArray> resourcesMonitored() const;
00236 
00242     bool isAllMonitored() const;
00243 
00250     void setSession( Akonadi::Session *session );
00251 
00257     Session* session() const;
00258 
00259   Q_SIGNALS:
00266     void itemChanged( const Akonadi::Item &item, const QSet<QByteArray> &partIdentifiers );
00267 
00275     void itemMoved( const Akonadi::Item &item, const Akonadi::Collection &collectionSource,
00276                                                const Akonadi::Collection &collectionDestination );
00277 
00284     void itemAdded( const Akonadi::Item &item, const Akonadi::Collection &collection );
00285 
00294     void itemRemoved( const Akonadi::Item &item );
00295 
00303     void itemLinked( const Akonadi::Item &item, const Akonadi::Collection &collection );
00304 
00312     void itemUnlinked( const Akonadi::Item &item, const Akonadi::Collection &collection );
00313 
00320     void collectionAdded( const Akonadi::Collection &collection, const Akonadi::Collection &parent );
00321 
00327     void collectionChanged( const Akonadi::Collection &collection );
00328 
00337     void collectionChanged( const Akonadi::Collection &collection, const QSet<QByteArray> &attributeNames );
00338 
00348     void collectionMoved( const Akonadi::Collection &collection, const Akonadi::Collection &source, const Akonadi::Collection &destination );
00349 
00355     void collectionRemoved( const Akonadi::Collection &collection );
00356 
00365     void collectionStatisticsChanged( Akonadi::Collection::Id id,
00366                                       const Akonadi::CollectionStatistics &statistics );
00367 
00375     void collectionMonitored( const Akonadi::Collection &collection, bool monitored );
00376 
00384     void itemMonitored( const Akonadi::Item &item, bool monitored );
00385 
00393     void resourceMonitored( const QByteArray &identifier, bool monitored );
00394 
00402     void mimeTypeMonitored( const QString &mimeType, bool monitored );
00403 
00410     void allMonitored( bool monitored );
00411 
00412   protected:
00413     //@cond PRIVATE
00414     friend class EntityTreeModel;
00415     friend class EntityTreeModelPrivate;
00416     MonitorPrivate *d_ptr;
00417     explicit Monitor( MonitorPrivate *d, QObject *parent = 0 );
00418     //@endcond
00419 
00420   private:
00421     Q_DECLARE_PRIVATE( Monitor )
00422 
00423     //@cond PRIVATE
00424     Q_PRIVATE_SLOT( d_ptr, void slotSessionDestroyed( QObject* ) )
00425     Q_PRIVATE_SLOT( d_ptr, void slotStatisticsChangedFinished( KJob* ) )
00426     Q_PRIVATE_SLOT( d_ptr, void slotFlushRecentlyChangedCollections() )
00427     Q_PRIVATE_SLOT( d_ptr, void slotNotify( const Akonadi::NotificationMessage::List& ) )
00428     Q_PRIVATE_SLOT( d_ptr, void dataAvailable() )
00429 
00430     friend class ResourceBasePrivate;
00431     //@endcond
00432 };
00433 
00434 }
00435 
00436 #endif

akonadi

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal