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

akonadi

agentbase_p.h

00001 /*
00002     Copyright (c) 2007 Volker Krause <vkrause@kde.org>
00003     Copyright (c) 2008 Kevin Krammer <kevin.krammer@gmx.at>
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_AGENTBASE_P_H
00022 #define AKONADI_AGENTBASE_P_H
00023 
00024 #include "agentbase.h"
00025 #include "tracerinterface.h"
00026 
00027 #include <klocale.h>
00028 #include <solid/networking.h>
00029 
00030 class QSettings;
00031 
00032 namespace Akonadi {
00033 
00037 class AgentBasePrivate : public QObject
00038 {
00039   Q_OBJECT
00040   public:
00041     AgentBasePrivate( AgentBase *parent );
00042     virtual ~AgentBasePrivate();
00043     void init();
00044     virtual void delayedInit();
00045 
00046     void slotStatus( int status, const QString &message );
00047     void slotPercent( int progress );
00048     void slotWarning( const QString& message );
00049     void slotError( const QString& message );
00050     void slotNetworkStatusChange( Solid::Networking::Status );
00051 
00052     virtual void changeProcessed();
00053 
00054     QString defaultReadyMessage() const
00055     {
00056       if ( mOnline )
00057         return i18nc( "@info:status Application ready for work", "Ready" );
00058       return i18nc( "@info:status", "Offline" );
00059     }
00060 
00061     QString defaultSyncingMessage() const
00062     {
00063       return i18nc( "@info:status", "Syncing..." );
00064     }
00065 
00066     QString defaultErrorMessage() const
00067     {
00068       return i18nc( "@info:status", "Error." );
00069     }
00070 
00071     AgentBase *q_ptr;
00072     Q_DECLARE_PUBLIC( AgentBase )
00073 
00074     QString mId;
00075     QString mName;
00076 
00077     int mStatusCode;
00078     QString mStatusMessage;
00079 
00080     uint mProgress;
00081     QString mProgressMessage;
00082 
00083     bool mNeedsNetwork;
00084     bool mOnline;
00085 
00086     QSettings *mSettings;
00087 
00088     ChangeRecorder *mChangeRecorder;
00089 
00090     org::freedesktop::Akonadi::Tracer *mTracer;
00091 
00092     AgentBase::Observer *mObserver;
00093 
00094   protected Q_SLOTS:
00095     void itemAdded( const Akonadi::Item &item, const Akonadi::Collection &collection );
00096     void itemChanged( const Akonadi::Item &item, const QSet<QByteArray> &partIdentifiers );
00097     void itemMoved( const Akonadi::Item &, const Akonadi::Collection &source, const Akonadi::Collection &destination );
00098     void itemRemoved( const Akonadi::Item &item );
00099     void itemLinked( const Akonadi::Item &item, const Akonadi::Collection &collection );
00100     void itemUnlinked( const Akonadi::Item &item, const Akonadi::Collection &collection );
00101 
00102     void collectionAdded( const Akonadi::Collection &collection, const Akonadi::Collection &parent );
00103     void collectionChanged( const Akonadi::Collection &collection );
00104     void collectionChanged( const Akonadi::Collection &collection, const QSet<QByteArray> &partIdentifiers );
00105     void collectionMoved( const Akonadi::Collection &collection, const Akonadi::Collection &source, const Akonadi::Collection &destination );
00106     void collectionRemoved( const Akonadi::Collection &collection );
00107 };
00108 
00109 }
00110 
00111 #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