diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2013-12-05 21:08:48 +0100 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2013-12-05 21:08:48 +0100 |
commit | e3ef07dd34b1d8d39d32fa1e43351b7d54c61336 (patch) | |
tree | 9249e42422a4a01c05da77c015a5866c8f94a4f6 /gatoperipheral.h | |
parent | 5d8428e4f9801fa02df50091954f9d87ccb8a207 (diff) | |
download | libgato-e3ef07dd34b1d8d39d32fa1e43351b7d54c61336.tar.gz libgato-e3ef07dd34b1d8d39d32fa1e43351b7d54c61336.zip |
Rename GatoAtt to GatoAttClient and add WriteType support
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); |