From e3ef07dd34b1d8d39d32fa1e43351b7d54c61336 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Thu, 5 Dec 2013 21:08:48 +0100 Subject: Rename GatoAtt to GatoAttClient and add WriteType support --- gatoperipheral.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gatoperipheral.h') 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); -- cgit v1.2.3