summaryrefslogtreecommitdiff
path: root/plugin/src/Caelestia/Services/service.hpp
blob: f8af03a77af85e48b331161941124acf5431427b (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
#pragma once

#include <qobject.h>
#include <qset.h>

namespace caelestia::services {

class Service : public QObject {
    Q_OBJECT

public:
    explicit Service(QObject* parent = nullptr);

    void ref(QObject* sender);
    void unref(QObject* sender);

private:
    QSet<QObject*> m_refs;

    virtual void start() = 0;
    virtual void stop() = 0;
};

} // namespace caelestia::services