blob: 861d715b665c433221529a7e47d9d4b15a5291a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
|