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 ), mManager( 0 )
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 void serviceOwnerChanged( const QString&, const QString&, const QString& );
00063
00071 void readAgentTypes();
00072
00073 void setName( const AgentInstance&, const QString& );
00074 void setOnline( const AgentInstance&, bool );
00075 void configure( const AgentInstance&, QWidget* );
00076 void synchronize( const AgentInstance& );
00077 void synchronizeCollectionTree( const AgentInstance& );
00078
00079 AgentType fillAgentType( const QString &identifier ) const;
00080 AgentInstance fillAgentInstance( const QString &identifier ) const;
00081 AgentInstance fillAgentInstanceLight( const QString &identifier ) const;
00082
00083 void createDBusInterface();
00084
00085 static AgentManager *mSelf;
00086
00087 AgentManager *mParent;
00088 org::freedesktop::Akonadi::AgentManager *mManager;
00089
00090 QHash<QString, AgentType> mTypes;
00091 QHash<QString, AgentInstance> mInstances;
00092 };
00093
00094 }
00095
00096 #endif