new_alterator/include/dbus_connector.h
2022-07-12 17:33:41 +04:00

28 lines
787 B
C++

#ifndef DBUS_CONNECTOR_H
#define DBUS_CONNECTOR_H
#include <QtDBus/QtDBus>
#include <QProcess>
#include <QHash>
namespace Alterator{
class DBusConnector: public QObject
{
Q_OBJECT
public:
DBusConnector(QObject *parent = nullptr);
Q_INVOKABLE void addInterface( QString service, QString path
, QString interface, bool systemBus, QString shortName);
Q_INVOKABLE QVariant getProperty(QString InterfaceName, QString propertyName);
Q_INVOKABLE bool setProperty(QString interfaceName, QString propertyName, QVariant value);
Q_INVOKABLE QDBusInterface &getInterface(QString shortName);
private:
QHash<QString, QDBusInterface *> interfaces;
// QDBusConnection systemBus;
// QDBusConnection sessionBus;
};
}
#endif // DBUS_CONNECTOR_H