akonadi
agentinstance.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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
00172 private:
00173
00174 class Private;
00175 QSharedDataPointer<Private> d;
00176
00177 };
00178
00179 }
00180
00181 Q_DECLARE_METATYPE( Akonadi::AgentInstance )
00182
00183 #endif