4#ifndef BLUEZ_PERIPHERAL_OBJECTS_P_H
5#define BLUEZ_PERIPHERAL_OBJECTS_P_H
20#include <QtBluetooth/qbluetooth.h>
21#include <QtBluetooth/QBluetoothUuid>
22#include <QtBluetooth/QLowEnergyDescriptorData>
23#include <QtBluetooth/QLowEnergyCharacteristicData>
24#include <QtBluetooth/QLowEnergyServiceData>
30class OrgBluezGattDescriptor1Adaptor;
38class QtBluezPeripheralGattObject :
public QObject
43 QtBluezPeripheralGattObject(
const QString& objectPath,
const QString& uuid,
44 QLowEnergyHandle handle, QObject* parent =
nullptr);
45 virtual ~QtBluezPeripheralGattObject();
48 virtual InterfaceList properties()
const = 0;
50 bool registerObject();
51 void unregisterObject();
60 QLowEnergyHandle handle;
62 QtBluetoothPrivate::OrgFreedesktopDBusPropertiesAdaptor* propertiesAdaptor{};
65 void remoteDeviceAccessEvent(
const QString& remoteDeviceObjectPath, quint16 mtu);
68 void accessEvent(
const QVariantMap& options);
71 bool m_registered =
false;
102 void initializeFlags(
const QLowEnergyDescriptorData& data);
105 QString m_characteristicPath;
108 QLowEnergyHandle m_characteristicHandle;
143 void initializeValue(
const QByteArray& value);
144 void initializeFlags(
const QLowEnergyCharacteristicData& data);
147 QString m_servicePath;
148 bool m_notifying{
false};
151 int m_minimumValueLength;
152 int m_maximumValueLength;
167 const bool m_isPrimary;
169 QList<QDBusObjectPath> m_includedServices;
QMap< QDBusObjectPath, InterfaceList > ManagedObjectList
QMap< QString, QVariantMap > InterfaceList
static constexpr QLatin1String appObjectPathTemplate
~QtBluezPeripheralApplication()
bool localDescriptorWrite(QLowEnergyHandle handle, const QByteArray &value)
void unregisterApplication()
void remoteDeviceAccessEvent(const QString &remoteDeviceObjectPath, quint16 mtu)
void registerApplication()
void addService(const QLowEnergyServiceData &serviceData, QSharedPointer< QLowEnergyServicePrivate > servicePrivate, QLowEnergyHandle serviceHandle)
void characteristicValueUpdatedByRemote(QLowEnergyHandle handle, const QByteArray &value)
bool registrationNeeded()
bool localCharacteristicWrite(QLowEnergyHandle handle, const QByteArray &value)
void descriptorValueUpdatedByRemote(QLowEnergyHandle characteristicHandle, QLowEnergyHandle descriptorHandle, const QByteArray &value)
InterfaceList properties() const final
Q_INVOKABLE void StopNotify()
Q_INVOKABLE void StartNotify()
bool localValueUpdate(const QByteArray &value)
bool localValueUpdate(const QByteArray &value)
InterfaceList properties() const final
void addIncludedService(const QString &objectPath)
InterfaceList properties() const final