00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef AKONADI_SERVERMANAGER_H
00021 #define AKONADI_SERVERMANAGER_H
00022
00023 #include "akonadi_export.h"
00024
00025 #include <QtCore/QObject>
00026
00027 namespace Akonadi {
00028
00029 class ServerManagerPrivate;
00030
00041 class AKONADI_EXPORT ServerManager : public QObject
00042 {
00043 Q_OBJECT
00044 public:
00049 enum State {
00050 NotRunning,
00051 Starting,
00052 Running,
00053 Stopping,
00054 Broken
00055 };
00056
00064 static bool start();
00065
00073 static bool stop();
00074
00080 static void showSelfTestDialog( QWidget *parent );
00081
00087 static bool isRunning();
00088
00093 static State state();
00094
00099 static ServerManager* self();
00100
00101 Q_SIGNALS:
00105 void started();
00106
00110 void stopped();
00111
00116 void stateChanged( Akonadi::ServerManager::State state );
00117
00118 private:
00119
00120 friend class ServerManagerPrivate;
00121 ServerManager( ServerManagerPrivate *dd );
00122 ServerManagerPrivate* const d;
00123 Q_PRIVATE_SLOT( d, void serviceOwnerChanged( const QString&, const QString&, const QString& ) )
00124 Q_PRIVATE_SLOT( d, void checkStatusChanged() )
00125 Q_PRIVATE_SLOT( d, void timeout() )
00126
00127 };
00128
00129 }
00130
00131 #endif