• Skip to content
  • Skip to link menu
KDE 4.3 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 CollectionStatistics;
00031 class Item;
00032 class ItemFetchScope;
00033 class MonitorPrivate;
00034 class Session;
00035 
00050 class AKONADI_EXPORT Monitor : public QObject
00051 {
00052   Q_OBJECT
00053 
00054   public:
00060     explicit Monitor( QObject *parent = 0 );
00061 
00065     virtual ~Monitor();
00066 
00074     void setCollectionMonitored( const Collection &collection, bool monitored = true );
00075 
00081     void setItemMonitored( const Item &item, bool monitored = true );
00082 
00088     void setResourceMonitored( const QByteArray &resource, bool monitored = true );
00089 
00095     void setMimeTypeMonitored( const QString &mimetype, bool monitored = true );
00096 
00100     void setAllMonitored( bool monitored = true );
00101 
00107     void ignoreSession( Session *session );
00108 
00114     void fetchCollection( bool enable );
00115 
00122     void fetchCollectionStatistics( bool enable );
00123 
00134     void setItemFetchScope( const ItemFetchScope &fetchScope );
00135 
00148     ItemFetchScope &itemFetchScope();
00149 
00155     Collection::List collectionsMonitored() const;
00156 
00162     QList<Item::Id> itemsMonitored() const;
00163 
00169     QStringList mimeTypesMonitored() const;
00170 
00176     QList<QByteArray> resourcesMonitored() const;
00177 
00183     bool isAllMonitored() const;
00184 
00185   Q_SIGNALS:
00192     void itemChanged( const Akonadi::Item &item, const QSet<QByteArray> &partIdentifiers );
00193 
00201     void itemMoved( const Akonadi::Item &item, const Akonadi::Collection &collectionSource,
00202                                                const Akonadi::Collection &collectionDestination );
00203 
00210     void itemAdded( const Akonadi::Item &item, const Akonadi::Collection &collection );
00211 
00220     void itemRemoved( const Akonadi::Item &item );
00221 
00229     void itemLinked( const Akonadi::Item &item, const Akonadi::Collection &collection );
00230 
00238     void itemUnlinked( const Akonadi::Item &item, const Akonadi::Collection &collection );
00239 
00246     void collectionAdded( const Akonadi::Collection &collection, const Akonadi::Collection &parent );
00247 
00254     void collectionChanged( const Akonadi::Collection &collection );
00255 
00261     void collectionRemoved( const Akonadi::Collection &collection );
00262 
00271     void collectionStatisticsChanged( Akonadi::Collection::Id id,
00272                                       const Akonadi::CollectionStatistics &statistics );
00273 
00281     void collectionMonitored( const Akonadi::Collection &collection, bool monitored );
00282 
00290     void itemMonitored( const Akonadi::Item &item, bool monitored );
00291 
00299     void resourceMonitored( const QByteArray &identifier, bool monitored );
00300 
00308     void mimeTypeMonitored( const QString &mimeType, bool monitored );
00309 
00316     void allMonitored( bool monitored );
00317 
00318   protected:
00319     //@cond PRIVATE
00320     MonitorPrivate *d_ptr;
00321     explicit Monitor( MonitorPrivate *d, QObject *parent = 0 );
00322     //@endcond
00323 
00324   private:
00325     Q_DECLARE_PRIVATE( Monitor )
00326 
00327     //@cond PRIVATE
00328     Q_PRIVATE_SLOT( d_ptr, void slotStatisticsChangedFinished( KJob* ) )
00329     Q_PRIVATE_SLOT( d_ptr, void slotFlushRecentlyChangedCollections() )
00330     Q_PRIVATE_SLOT( d_ptr, void slotNotify( const Akonadi::NotificationMessage::List& ) )
00331     Q_PRIVATE_SLOT( d_ptr, void slotItemJobFinished( KJob* ) )
00332     Q_PRIVATE_SLOT( d_ptr, void slotCollectionJobFinished( KJob* ) )
00333     //@endcond
00334 };
00335 
00336 }
00337 
00338 #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
  • kabc
  • kblog
  • kcal
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.9
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