#ifndef BUS_H #define BUS_H #include class QDBusConnection; 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(bool sessionBus); private: explicit Bus(QObject *parent = nullptr); bool _hasListener; static Bus *_instance; }; #endif // BUS_H