• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.8.3 API Reference
  • KDE Home
  • 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 
00029 #include <solid/networking.h>
00030 
00031 class QSettings;
00032 
00033 namespace Akonadi {
00034 
00038 class AgentBasePrivate : public QObject
00039 {
00040   Q_OBJECT
00041   public:
00042     AgentBasePrivate( AgentBase *parent );
00043     virtual ~AgentBasePrivate();
00044     void init();
00045     virtual void delayedInit();
00046 
00047     void slotStatus( int status, const QString &message );
00048     void slotPercent( int progress );
00049     void slotWarning( const QString& message );
00050     void slotError( const QString& message );
00051     void slotNetworkStatusChange( Solid::Networking::Status );
00052     void slotResumedFromSuspend();
00053 
00054     virtual void changeProcessed();
00055 
00056     QString defaultReadyMessage() const
00057     {
00058       if ( mOnline )
00059         return i18nc( "@info:status Application ready for work", "Ready" );
00060       return i18nc( "@info:status", "Offline" );
00061     }
00062 
00063     QString defaultSyncingMessage() const
00064     {
00065       return i18nc( "@info:status", "Syncing..." );
00066     }
00067 
00068     QString defaultErrorMessage() const
00069     {
00070       return i18nc( "@info:status", "Error." );
00071     }
00072 
00073     void setProgramName();
00074 
00075     AgentBase *q_ptr;
00076     Q_DECLARE_PUBLIC( AgentBase )
00077 
00078     QString mId;
00079     QString mName;
00080     QString mResourceTypeName;
00081 
00083     QDBusConnection mDBusConnection;
00084 
00085     int mStatusCode;
00086     QString mStatusMessage;
00087 
00088     uint mProgress;
00089     QString mProgressMessage;
00090 
00091     bool mNeedsNetwork;
00092     bool mOnline;
00093 
00094     QSettings *mSettings;
00095 
00096     ChangeRecorder *mChangeRecorder;
00097 
00098     org::freedesktop::Akonadi::Tracer *mTracer;
00099 
00100     AgentBase::Observer *mObserver;
00101 
00102   protected Q_SLOTS:
00103     virtual void itemAdded( const Akonadi::Item &item, const Akonadi::Collection &collection );
00104     virtual void itemChanged( const Akonadi::Item &item, const QSet<QByteArray> &partIdentifiers );
00105     virtual void itemMoved( const Akonadi::Item &, const Akonadi::Collection &source, const Akonadi::Collection &destination );
00106     virtual void itemRemoved( const Akonadi::Item &item );
00107     void itemLinked( const Akonadi::Item &item, const Akonadi::Collection &collection );
00108     void itemUnlinked( const Akonadi::Item &item, const Akonadi::Collection &collection );
00109 
00110     virtual void collectionAdded( const Akonadi::Collection &collection, const Akonadi::Collection &parent );
00111     virtual void collectionChanged( const Akonadi::Collection &collection );
00112     virtual void collectionChanged( const Akonadi::Collection &collection, const QSet<QByteArray> &partIdentifiers );
00113     virtual void collectionMoved( const Akonadi::Collection &collection, const Akonadi::Collection &source, const Akonadi::Collection &destination );
00114     virtual void collectionRemoved( const Akonadi::Collection &collection );
00115     void collectionSubscribed( const Akonadi::Collection &collection, const Akonadi::Collection &parent );
00116     void collectionUnsubscribed( const Akonadi::Collection &collection );
00117 };
00118 
00119 }
00120 
00121 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu May 10 2012 22:18:29 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