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

akonadi

changemediator_p.h
00001 /*
00002     Copyright (c) 2011 Tobias Koenig <tokoe@kde.org>
00003     Copyright (c) 2011 Stephen Kelly <steveire@gmail.com>
00004 
00005     This library is free software; you can redistribute it and/or modify it
00006     under the terms of the GNU Library General Public License as published by
00007     the Free Software Foundation; either version 2 of the License, or (at your
00008     option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful, but WITHOUT
00011     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013     License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to the
00017     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00018     02110-1301, USA.
00019 */
00020 
00021 #ifndef AKONADI_CHANGEMEDIATOR_P_H
00022 #define AKONADI_CHANGEMEDIATOR_P_H
00023 
00024 #include <QtCore/QList>
00025 #include <QtCore/QObject>
00026 #include <QtCore/QSet>
00027 
00028 #include "notificationmessage_p.h"
00029 #include "objectnotificationmessage.h"
00030 
00031 namespace Akonadi
00032 {
00033 
00034 class Job;
00035 class JobPrivate;
00036 
00037 class Collection;
00038 class Item;
00039 
00040 class ChangeMediator : public QObject
00041 {
00042   Q_OBJECT
00043 public:
00044   explicit ChangeMediator(QObject* parent = 0);
00045 
00046   static ChangeMediator* instance();
00047 
00048   static void registerMonitor( QObject *monitor );
00049   static void unregisterMonitor( QObject *monitor );
00050 
00051   static void invalidateCollection( const Akonadi::Collection &collection );
00052   static void invalidateItem( const Akonadi::Item &item );
00053 
00054   static void registerSession( const QByteArray &id );
00055   static void unregisterSession( const QByteArray &id );
00056   static void beginMoveItems( JobPrivate *movePrivate, const QByteArray &id );
00057   static void itemsMoved(const Item::List &items, const Collection &sourceParent, const QByteArray &id );
00058 
00059 Q_SIGNALS:
00060   void notify(const QVector<Akonadi::ObjectNotificationMessage> &messages);
00061 
00062 private Q_SLOTS:
00063   void init();
00064 
00065   void do_registerMonitor( QObject *monitor );
00066   void do_unregisterMonitor( QObject *monitor );
00067 
00068   void do_invalidateCollection( const Akonadi::Collection &collection );
00069   void do_invalidateItem( const Akonadi::Item &item );
00070 
00071   void processAkonadiNotifications(const Akonadi::NotificationMessage::List &messages);
00072 
00073   void do_registerSession( const QByteArray &id );
00074   void do_unregisterSession( const QByteArray &id );
00075   void do_beginMoveItems( JobPrivate *movePrivate, const QByteArray &id );
00076   void do_itemsMoved(const Item::List &items, const Collection &sourceParent, const QByteArray &id);
00077 
00078 private:
00079   QList<QObject*> m_monitors;
00080 
00081   QObject *m_notificationSource;
00082   QVector<Akonadi::ObjectNotificationMessage> messageQueue;
00083   QVector<Akonadi::Job*> unfilteredJobs;
00084 
00085   QSet<QByteArray> m_sessions;
00086 };
00087 
00088 }
00089 
00090 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:49:14 by doxygen 1.8.0 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.8.3 API Reference

Skip menu "kdepimlibs-4.8.3 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • 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