summaryrefslogtreecommitdiff
path: root/plugin/src/Caelestia/Services/service.hpp
blob: dac487600f9e4cf78440be3478c0c9b3e5ab2748 (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 {

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