diff options
Diffstat (limited to 'src/bluetooth/qlowenergycontroller_p.h')
-rw-r--r-- | src/bluetooth/qlowenergycontroller_p.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/bluetooth/qlowenergycontroller_p.h b/src/bluetooth/qlowenergycontroller_p.h index 19d10567..5fcc46a4 100644 --- a/src/bluetooth/qlowenergycontroller_p.h +++ b/src/bluetooth/qlowenergycontroller_p.h @@ -77,7 +77,7 @@ QT_END_NAMESPACE #include "qlowenergycontroller.h" #include "qlowenergyserviceprivate_p.h" -#if defined(QT_BLUEZ_BLUETOOTH) && !defined(QT_BLUEZ_NO_BTLE) +#if QT_CONFIG(bluez) && !defined(QT_BLUEZ_NO_BTLE) #include <QtBluetooth/QBluetoothSocket> #elif defined(QT_ANDROID_BLUETOOTH) #include <QtAndroidExtras/QAndroidJniObject> @@ -96,7 +96,7 @@ QT_BEGIN_NAMESPACE class QLowEnergyServiceData; class QTimer; -#if defined(QT_BLUEZ_BLUETOOTH) && !defined(QT_BLUEZ_NO_BTLE) +#if QT_CONFIG(bluez) && !defined(QT_BLUEZ_NO_BTLE) class HciManager; class LeCmacCalculator; class QSocketNotifier; @@ -184,10 +184,11 @@ public: QLowEnergyController::Error error; QString errorString; - // list of all found service uuids + // list of all found service uuids on remote device ServiceDataMap serviceList; QLowEnergyHandle lastLocalHandle; + // list of all service uuids on local peripheral device ServiceDataMap localServices; struct Attribute { @@ -208,7 +209,7 @@ public: QLowEnergyController::RemoteAddressType addressType; private: -#if defined(QT_BLUEZ_BLUETOOTH) && !defined(QT_BLUEZ_NO_BTLE) +#if QT_CONFIG(bluez) && !defined(QT_BLUEZ_NO_BTLE) quint16 connectionHandle = 0; QBluetoothSocket *l2cpSocket; struct Request { @@ -439,8 +440,18 @@ private slots: QLowEnergyService::ServiceError errorCode); void descriptorWritten(int descHandle, const QByteArray &data, QLowEnergyService::ServiceError errorCode); + void serverDescriptorWritten(const QAndroidJniObject &jniDesc, const QByteArray &newValue); void characteristicChanged(int charHandle, const QByteArray &data); + void serverCharacteristicChanged(const QAndroidJniObject &jniChar, const QByteArray &newValue); void serviceError(int attributeHandle, QLowEnergyService::ServiceError errorCode); + void advertisementError(int errorCode); + +private: + void peripheralConnectionUpdated(QLowEnergyController::ControllerState newState, + QLowEnergyController::Error errorCode); + void centralConnectionUpdated(QLowEnergyController::ControllerState newState, + QLowEnergyController::Error errorCode); + #elif defined(QT_WINRT_BLUETOOTH) private slots: void characteristicChanged(int charHandle, const QByteArray &data); |