Index: sources/bluetooth/BluetoothInterface.h =================================================================== diff -u -r1c97eebc80b33b429fa6e9489584ce3bf24f0bbc -r4a95b249fb87bf69d909452ba374c794b89d423b --- sources/bluetooth/BluetoothInterface.h (.../BluetoothInterface.h) (revision 1c97eebc80b33b429fa6e9489584ce3bf24f0bbc) +++ sources/bluetooth/BluetoothInterface.h (.../BluetoothInterface.h) (revision 4a95b249fb87bf69d909452ba374c794b89d423b) @@ -26,6 +26,8 @@ #include "MBluetooth.h" #include "MUIBloodPressureData.h" #include "DeviceModels.h" +#include "BluetoothPairingAgent.h" +#include "Agent1Adapter.h" // Define #define _BluetoothInterface Bluetooth::BluetoothInterface::I() @@ -63,6 +65,8 @@ const QByteArray _bloodPressureNotifyValue = QByteArray::fromHex("0100"); const QString _devicePairingBondCharacteristicUuid = "{b305b680-aee7-11e1-a730-0002a5d5c51b}"; const QString _vendorSpecificServiceUuid = "{ecbe3980-c9a2-11e1-b1bd-0002a5d5c51b}"; + const QString _pairingObjectPath = "/pairing/agent"; + const char *_invalidLocalAddress = "00:00:00:00:00:00"; const char _deviceConfirmKeyWriteCodeSuccess = '\x82'; const char *_devicePairingKeyString = "0x00EE020E"; @@ -79,6 +83,9 @@ QLowEnergyService *_serviceBattery = nullptr ; QLowEnergyService *_serviceVendorSpecific = nullptr ; + Agent1Adaptor *_agentAdaptor = nullptr ; + BluetoothPairingAgent *_pairingAgent = nullptr ; + QBluetoothDeviceInfo _temp ; quint8 _tempBatt = 0 ; @@ -184,6 +191,7 @@ void writeDevicePairingKey(); bool isVendorSpecificService (const QLowEnergyService *service ); bool isDevicePairingCharacteristicUuid (const QLowEnergyCharacteristic &vCharacteristic); + void initializePairingAgent(); signals: void didStateChange (const BluetoothData &vData); void didActionReceive (const UIBloodPressureData &vData);