diff options
Diffstat (limited to 'gatoperipheral.h')
-rw-r--r-- | gatoperipheral.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gatoperipheral.h b/gatoperipheral.h index 6ad6782..d16ac9c 100644 --- a/gatoperipheral.h +++ b/gatoperipheral.h @@ -16,6 +16,7 @@ class LIBGATO_EXPORT GatoPeripheral : public QObject Q_OBJECT Q_DECLARE_PRIVATE(GatoPeripheral) Q_ENUMS(State) + Q_ENUMS(WriteType) Q_PROPERTY(GatoAddress address READ address) Q_PROPERTY(QString name READ name NOTIFY nameChanged) @@ -29,6 +30,11 @@ public: StateConnected }; + enum WriteType { + WriteWithResponse = 0, + WriteWithoutResponse + }; + State state() const; GatoAddress address() const; QString name() const; @@ -46,7 +52,7 @@ public slots: void discoverDescriptors(const GatoCharacteristic &characteristic); void readValue(const GatoCharacteristic &characteristic); void readValue(const GatoDescriptor &descriptor); - void writeValue(const GatoCharacteristic &characteristic, const QByteArray &data); + void writeValue(const GatoCharacteristic &characteristic, const QByteArray &data, WriteType type = WriteWithResponse); void writeValue(const GatoDescriptor &descriptor, const QByteArray &data); void setNotification(const GatoCharacteristic &characteristic, bool enabled); |