mirror of
https://github.com/kavishdevar/librepods.git
synced 2026-01-28 22:01:50 +00:00
[Linux] Improve connection stability (#98)
This commit is contained in:
@@ -4,6 +4,10 @@
|
||||
#include <QObject>
|
||||
#include <QtDBus/QtDBus>
|
||||
|
||||
// Forward declarations for D-Bus types
|
||||
typedef QMap<QDBusObjectPath, QMap<QString, QVariantMap>> ManagedObjectList;
|
||||
Q_DECLARE_METATYPE(ManagedObjectList)
|
||||
|
||||
class BluetoothMonitor : public QObject, protected QDBusContext
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -11,9 +15,11 @@ public:
|
||||
explicit BluetoothMonitor(QObject *parent = nullptr);
|
||||
~BluetoothMonitor();
|
||||
|
||||
bool checkAlreadyConnectedDevices();
|
||||
|
||||
signals:
|
||||
void deviceConnected(const QString &macAddress);
|
||||
void deviceDisconnected(const QString &macAddress);
|
||||
void deviceConnected(const QString &macAddress, const QString &deviceName);
|
||||
void deviceDisconnected(const QString &macAddress, const QString &deviceName);
|
||||
|
||||
private slots:
|
||||
void onPropertiesChanged(const QString &interface, const QVariantMap &changedProps, const QStringList &invalidatedProps);
|
||||
@@ -21,6 +27,8 @@ private slots:
|
||||
private:
|
||||
QDBusConnection m_dbus;
|
||||
void registerDBusService();
|
||||
bool isAirPodsDevice(const QString &devicePath);
|
||||
QString getDeviceName(const QString &devicePath);
|
||||
};
|
||||
|
||||
#endif // BLUETOOTHMONITOR_H
|
||||
Reference in New Issue
Block a user