File indexing completed on 2024-09-15 06:28:37
0001 /* 0002 * BluezQt - Asynchronous Bluez wrapper library 0003 * 0004 * SPDX-FileCopyrightText: 2014 David Rosca <nowrep@gmail.com> 0005 * 0006 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #ifndef BLUEZQT_ADAPTER_P_H 0010 #define BLUEZQT_ADAPTER_P_H 0011 0012 #include <QObject> 0013 #include <QStringList> 0014 0015 #include "bluezadapter1.h" 0016 #include "bluezqt_dbustypes.h" 0017 #include "dbusproperties.h" 0018 #include "types.h" 0019 0020 namespace BluezQt 0021 { 0022 typedef org::bluez::Adapter1 BluezAdapter; 0023 typedef org::freedesktop::DBus::Properties DBusProperties; 0024 0025 class AdapterPrivate : public QObject 0026 { 0027 Q_OBJECT 0028 0029 public: 0030 explicit AdapterPrivate(const QString &path, const QVariantMap &properties); 0031 0032 void init(const QVariantMap &properties); 0033 0034 void interfacesAdded(const QString &path, const QVariantMapMap &interfaces); 0035 void interfacesRemoved(const QString &path, const QStringList &interfaces); 0036 0037 void addDevice(const DevicePtr &device); 0038 void removeDevice(const DevicePtr &device); 0039 0040 QDBusPendingReply<> setDBusProperty(const QString &name, const QVariant &value); 0041 void propertiesChanged(const QString &interface, const QVariantMap &changed, const QStringList &invalidated); 0042 0043 QWeakPointer<Adapter> q; 0044 BluezAdapter *m_bluezAdapter; 0045 DBusProperties *m_dbusProperties; 0046 0047 QString m_address; 0048 QString m_name; 0049 QString m_alias; 0050 quint32 m_adapterClass; 0051 bool m_powered; 0052 bool m_discoverable; 0053 quint32 m_discoverableTimeout; 0054 bool m_pairable; 0055 quint32 m_pairableTimeout; 0056 bool m_discovering; 0057 QStringList m_uuids; 0058 QList<DevicePtr> m_devices; 0059 QString m_modalias; 0060 MediaPtr m_media; 0061 GattManagerPtr m_gattManager; 0062 LEAdvertisingManagerPtr m_leAdvertisingManager; 0063 }; 0064 0065 } // namespace BluezQt 0066 0067 #endif // BLUEZQT_ADAPTER_P_H