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
00020
00021
00022 #ifndef SERVICE_H
00023 #define SERVICE_H
00024
00025 #include <QObject>
00026 #include <QString>
00027 #include <QStringList>
00028 #include <QDBusConnection>
00029 #include <QHash>
00030 #include <QVariant>
00031
00032 class ServiceUnitTest;
00033
00034 namespace ContextProvider {
00035
00036 class Property;
00037 class ServiceBackend;
00038
00039 class Service : public QObject
00040 {
00041 Q_OBJECT
00042
00043 public:
00044 explicit Service(QDBusConnection connection, QObject *parent = 0);
00045 Service(QDBusConnection::BusType busType, const QString &busName, QObject *parent = 0);
00046 Service(QDBusConnection::BusType busType, const QString &busName, bool autoStart, QObject *parent = 0);
00047 virtual ~Service();
00048
00049 bool start();
00050 void stop();
00051 void restart();
00052
00053 void setAsDefault();
00054
00055 void setValue(const QString &key, const QVariant &val);
00056 void setConnection(const QDBusConnection &connection);
00057
00058 private:
00059 ServiceBackend *backend;
00060
00061 friend class Property;
00062 friend class ::ServiceUnitTest;
00063 };
00064
00065 }
00066
00067 #endif