Files
librepods/linux/BluetoothMonitor.h
Tim Gromeyer e384840bcc [Linux] Implement proper disconnection detection (#95)
* [Linux] Implement proper disconection detection

* Only trigger on airpod devices

* Remove unused code

* [Linux] Fix SegmentedControl text not shown in release build (but debug builds showed text)???
2025-04-14 23:25:02 +02:00

26 lines
633 B
C++

#ifndef BLUETOOTHMONITOR_H
#define BLUETOOTHMONITOR_H
#include <QObject>
#include <QtDBus/QtDBus>
class BluetoothMonitor : public QObject, protected QDBusContext
{
Q_OBJECT
public:
explicit BluetoothMonitor(QObject *parent = nullptr);
~BluetoothMonitor();
signals:
void deviceConnected(const QString &macAddress);
void deviceDisconnected(const QString &macAddress);
private slots:
void onPropertiesChanged(const QString &interface, const QVariantMap &changedProps, const QStringList &invalidatedProps);
private:
QDBusConnection m_dbus;
void registerDBusService();
};
#endif // BLUETOOTHMONITOR_H