diff options
Diffstat (limited to 'plugin/src/Caelestia/service.hpp')
| -rw-r--r-- | plugin/src/Caelestia/service.hpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/plugin/src/Caelestia/service.hpp b/plugin/src/Caelestia/service.hpp new file mode 100644 index 0000000..861d715 --- /dev/null +++ b/plugin/src/Caelestia/service.hpp @@ -0,0 +1,30 @@ +#pragma once + +#include <QObject> + +namespace caelestia { + +class Service : public QObject { + Q_OBJECT + + Q_PROPERTY(int refCount READ refCount NOTIFY refCountChanged) + +public: + explicit Service(QObject* parent = nullptr); + + [[nodiscard]] int refCount() const; + + void ref(); + void unref(); + +signals: + void refCountChanged(); + +private: + int m_refCount; + + virtual void start() = 0; + virtual void stop() = 0; +}; + +} // namespace caelestia |