summaryrefslogblamecommitdiffstats
path: root/src/bus.h
blob: 34da9ac398e98bc4443b3b6e0eab1d49776d93f9 (plain) (tree)
1
2
3
4
5
6
7




                  

                      




                            
                               





                                                        
                                               

        
                                                




                          
#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