akonadi
agentmanager_p.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef AKONADI_AGENTMANAGER_P_H
00021 #define AKONADI_AGENTMANAGER_P_H
00022
00023 #include "agentmanagerinterface.h"
00024
00025 #include "agenttype.h"
00026 #include "agentinstance.h"
00027
00028 #include <QtCore/QHash>
00029
00030 namespace Akonadi {
00031
00032 class AgentManager;
00033
00037 class AgentManagerPrivate
00038 {
00039 friend class AgentManager;
00040
00041 public:
00042 AgentManagerPrivate( AgentManager *parent )
00043 : mParent( parent )
00044 {
00045 }
00046
00047
00048
00049
00050 AgentInstance createInstance( const AgentType &type );
00051
00052 void agentTypeAdded( const QString& );
00053 void agentTypeRemoved( const QString& );
00054 void agentInstanceAdded( const QString& );
00055 void agentInstanceRemoved( const QString& );
00056 void agentInstanceStatusChanged( const QString&, int, const QString& );
00057 void agentInstanceProgressChanged( const QString&, uint, const QString& );
00058 void agentInstanceNameChanged( const QString&, const QString& );
00059 void agentInstanceWarning( const QString&, const QString& );
00060 void agentInstanceError( const QString&, const QString& );
00061 void agentInstanceOnlineChanged( const QString&, bool );
00062
00070 void readAgentTypes();
00071
00072 void setName( const AgentInstance&, const QString& );
00073 void setOnline( const AgentInstance&, bool );
00074 void configure( const AgentInstance&, QWidget* );
00075 void synchronize( const AgentInstance& );
00076 void synchronizeCollectionTree( const AgentInstance& );
00077
00078 AgentType fillAgentType( const QString &identifier ) const;
00079 AgentInstance fillAgentInstance( const QString &identifier ) const;
00080 AgentInstance fillAgentInstanceLight( const QString &identifier ) const;
00081
00082 static AgentManager *mSelf;
00083
00084 AgentManager *mParent;
00085 org::freedesktop::Akonadi::AgentManager *mManager;
00086
00087 QHash<QString, AgentType> mTypes;
00088 QHash<QString, AgentInstance> mInstances;
00089 };
00090
00091 }
00092
00093 #endif