4#ifndef QLOWENERGYCONTROLLERPRIVATEWINRT_P_H
5#define QLOWENERGYCONTROLLERPRIVATEWINRT_P_H
19#include <QtCore/QList>
20#include <QtCore/QQueue>
21#include <QtBluetooth/qbluetooth.h>
22#include <QtBluetooth/qlowenergycharacteristic.h>
23#include <QtBluetooth/qlowenergyservicedata.h>
31 struct IBluetoothLEDevice;
34 namespace Foundation {
36 enum class AsyncStatus;
42#include <windows.devices.bluetooth.genericattributeprofile.h>
95 int mtu()
const override;
106 void handleConnectionError(
const char *logMessage);
111 EventRegistrationToken mStatusChangedToken;
112 EventRegistrationToken mMtuChangedToken;
113 struct ValueChangedEntry {
114 ValueChangedEntry() {}
116 EventRegistrationToken
t)
123 EventRegistrationToken
token;
131 using NativeServiceCallback = std::function<
void(GattDeviceServiceComPtr)>;
135 using NativeCharacteristicCallback = std::function<
void(GattCharacteristicComPtr)>;
138 NativeCharacteristicCallback callback);
141 void unregisterFromValueChanges();
142 HRESULT onValueChange(ABI::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattCharacteristic *characteristic,
143 ABI::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattValueChangedEventArgs *
args);
144 HRESULT onMtuChange(ABI::Windows::Devices::Bluetooth::GenericAttributeProfile::IGattSession *session,
146 bool registerForMtuChanges();
147 void unregisterFromMtuChanges();
149 bool registerForStatusChanges();
150 void unregisterFromStatusChanges();
151 HRESULT onStatusChange(ABI::Windows::Devices::Bluetooth::IBluetoothLEDevice *dev, IInspectable *);
156 ABI::Windows::Foundation::AsyncStatus status);
160 GattCharacteristicComPtr characteristic);
164 GattCharacteristicComPtr characteristic);
167 bool writeWithResponse,
168 GattCharacteristicComPtr characteristic);
173 GattCharacteristicComPtr characteristic);
176 GattDeviceServiceComPtr deviceService);
178 void clearAllServices();
The QLowEnergyAdvertisingData class represents the data to be broadcast during Bluetooth Low Energy a...
The QLowEnergyAdvertisingParameters class represents the parameters used for Bluetooth Low Energy adv...
The QLowEnergyConnectionParameters class is used when requesting or reporting an update of the parame...
void discoverServiceDetails(const QBluetoothUuid &service, QLowEnergyService::DiscoveryMode mode) override
void stopAdvertising() override
~QLowEnergyControllerPrivateWinRT() override
QLowEnergyControllerPrivateWinRT()
void characteristicChanged(quint16 charHandle, const QByteArray &data)
void addToGenericAttributeList(const QLowEnergyServiceData &service, QLowEnergyHandle startHandle) override
void readDescriptor(const QSharedPointer< QLowEnergyServicePrivate > service, const QLowEnergyHandle charHandle, const QLowEnergyHandle descriptorHandle) override
void connectToDevice() override
void disconnectFromDevice() override
void writeDescriptor(const QSharedPointer< QLowEnergyServicePrivate > service, const QLowEnergyHandle charHandle, const QLowEnergyHandle descriptorHandle, const QByteArray &newValue) override
void startAdvertising(const QLowEnergyAdvertisingParameters ¶ms, const QLowEnergyAdvertisingData &advertisingData, const QLowEnergyAdvertisingData &scanResponseData) override
void readCharacteristic(const QSharedPointer< QLowEnergyServicePrivate > service, const QLowEnergyHandle charHandle) override
void writeCharacteristic(const QSharedPointer< QLowEnergyServicePrivate > service, const QLowEnergyHandle charHandle, const QByteArray &newValue, QLowEnergyService::WriteMode mode) override
void requestConnectionUpdate(const QLowEnergyConnectionParameters ¶ms) override
void discoverServices() override
QLowEnergyController::Error error
The QLowEnergyServiceData class is used to set up GATT service data. \inmodule QtBluetooth.
DiscoveryMode
This enum lists service discovery modes.
WriteMode
This enum describes the mode to be used when writing a characteristic value.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
void registerQLowEnergyControllerMetaType()
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data