Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(853)

Unified Diff: device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h

Issue 2074563002: bluetooth: mac: write characteristic implementation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@read_characteristicscan_servicescan_cleanup
Patch Set: Final version Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h b/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h
index d591f174aa4b6b10477995e66a71020a6283bd92..1efcfa87e2c71b779ccdd34acad5b58c74441b6a 100644
--- a/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h
+++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h
@@ -10,6 +10,7 @@
#include "base/mac/scoped_nsobject.h"
@class CBCharacteristic;
+typedef NS_ENUM(NSInteger, CBCharacteristicWriteType);
namespace device {
@@ -55,8 +56,15 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattCharacteristicMac
// Called by the BluetoothRemoteGattServiceMac instance when the
// characteristics value has been read.
void DidUpdateValue(NSError* error);
+ // Called by the BluetoothRemoteGattServiceMac instance when the
+ // characteristics value has been written.
+ void DidWriteValue(NSError* error);
// Returns true if the characteristic is readable.
bool IsReadable() const;
+ // Returns true if the characteristic is writable.
+ bool IsWritable() const;
+ // Returns the write type (with or without responses).
+ CBCharacteristicWriteType GetCBWriteType() const;
// Returns CoreBluetooth characteristic.
CBCharacteristic* GetCBCharacteristic() const;
@@ -74,6 +82,8 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothRemoteGattCharacteristicMac
bool characteristic_value_read_or_write_in_progress_;
// ReadRemoteCharacteristic request callbacks.
std::pair<ValueCallback, ErrorCallback> read_characteristic_value_callbacks_;
+ bool characteristic_value_write_in_progress_;
ortuno 2016/06/22 21:37:45 I don't think you are using this anywhere?
jlebel 2016/06/23 18:33:00 Done.
+ std::pair<base::Closure, ErrorCallback> write_characteristic_value_callbacks_;
};
} // namespace device

Powered by Google App Engine
This is Rietveld 408576698