akonadi
agentinstance.h
00001 /* 00002 Copyright (c) 2008 Tobias Koenig <tokoe@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_AGENTINSTANCE_H 00021 #define AKONADI_AGENTINSTANCE_H 00022 00023 #include "akonadi_export.h" 00024 00025 #include <QtCore/QList> 00026 #include <QtCore/QMetaType> 00027 #include <QtCore/QSharedDataPointer> 00028 00029 class QString; 00030 class QStringList; 00031 class QWidget; 00032 00033 namespace Akonadi 00034 { 00035 00036 class AgentType; 00037 00058 class AKONADI_EXPORT AgentInstance 00059 { 00060 friend class AgentManager; 00061 friend class AgentManagerPrivate; 00062 00063 public: 00067 typedef QList<AgentInstance> List; 00068 00072 enum Status 00073 { 00074 Idle = 0, 00075 Running, 00076 Broken 00077 }; 00078 00082 AgentInstance(); 00083 00087 AgentInstance( const AgentInstance &other ); 00088 00092 ~AgentInstance(); 00093 00097 bool isValid() const; 00098 00102 AgentType type() const; 00103 00107 QString identifier() const; 00108 00112 QString name() const; 00113 00117 void setName( const QString &name ); 00118 00122 Status status() const; 00123 00127 QString statusMessage() const; 00128 00133 int progress() const; 00134 00138 bool isOnline() const; 00139 00143 void setIsOnline( bool online ); 00144 00150 void configure( QWidget *parent = 0 ); 00151 00155 void synchronize(); 00156 00160 void synchronizeCollectionTree(); 00161 00165 AgentInstance& operator=( const AgentInstance &other ); 00166 00170 bool operator==( const AgentInstance &other ) const; 00171 00176 void abortCurrentTask() const; 00177 00181 void reconfigure() const; 00182 00186 void restart() const; 00187 00188 private: 00189 //@cond PRIVATE 00190 class Private; 00191 QSharedDataPointer<Private> d; 00192 //@endcond 00193 }; 00194 00195 } 00196 00197 Q_DECLARE_TYPEINFO( Akonadi::AgentInstance, Q_MOVABLE_TYPE ); 00198 00199 Q_DECLARE_METATYPE( Akonadi::AgentInstance ) 00200 00201 #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
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.