summaryrefslogtreecommitdiffstats
path: root/src/bus.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/bus.h')
-rw-r--r--src/bus.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/bus.h b/src/bus.h
new file mode 100644
index 0000000..f98ee65
--- /dev/null
+++ b/src/bus.h
@@ -0,0 +1,26 @@
+#ifndef BUS_H
+#define BUS_H
+
+#include <QObject>
+
+class Bus : public QObject
+{
+ Q_OBJECT
+public:
+ bool registerListener();
+ bool registerService();
+ inline static Bus* inst() {
+ if (_instance == nullptr) _instance = new Bus();
+ return _instance;
+ }
+
+signals:
+ void serviceConnected();
+
+private:
+ explicit Bus(QObject *parent = nullptr);
+ bool _hasListener;
+ static Bus *_instance;
+};
+
+#endif // BUS_H