NepomukDaemons
servicecontroller.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _SERVICE_CONTROLLER_H_
00020 #define _SERVICE_CONTROLLER_H_
00021
00022 #include <QtCore/QObject>
00023 #include <KService>
00024
00025 namespace Nepomuk {
00026 class ServiceController : public QObject
00027 {
00028 Q_OBJECT
00029
00030 public:
00031 ServiceController( KService::Ptr service, QObject* parent );
00032 ~ServiceController();
00033
00034 KService::Ptr service() const;
00035
00040 QString name() const;
00041
00045 QStringList dependencies() const;
00046
00047 bool autostart() const;
00048 bool startOnDemand() const;
00049 bool runOnce() const;
00050
00051 void setAutostart( bool enable );
00052
00058 bool start();
00059 void stop();
00060
00061 bool isRunning() const;
00062 bool isInitialized() const;
00063
00072 bool waitForInitialized( int timeout = 30000 );
00073
00074 Q_SIGNALS:
00079 void serviceInitialized( ServiceController* );
00080
00081 private Q_SLOTS:
00082 void slotProcessFinished( bool );
00083 void slotServiceOwnerChanged( const QString& serviceName,
00084 const QString&,
00085 const QString& newOwner );
00086 void slotServiceInitialized( bool success );
00087
00088 private:
00089 void createServiceControlInterface();
00090
00091 class Private;
00092 Private* const d;
00093 };
00094 }
00095
00096 #endif