blob: 34da9ac398e98bc4443b3b6e0eab1d49776d93f9 (
plain) (
tree)
|
|
#ifndef BUS_H
#define BUS_H
#include <QObject>
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
|