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

Unified Diff: device/bluetooth/bluetooth_local_gatt_service.h

Issue 1915803002: Bluetooth class changes for implementing local GATT attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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_local_gatt_service.h
diff --git a/device/bluetooth/bluetooth_local_gatt_service.h b/device/bluetooth/bluetooth_local_gatt_service.h
index 30c1131e869647de255f9cf2e3d34f3174cedaa1..668985ae99fc05614a004c92782fcd0ad7058392 100644
--- a/device/bluetooth/bluetooth_local_gatt_service.h
+++ b/device/bluetooth/bluetooth_local_gatt_service.h
@@ -44,7 +44,7 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothLocalGattService
class Delegate {
public:
// Callbacks used for communicating GATT request responses.
- typedef base::Callback<void(const std::vector<uint8_t>)> ValueCallback;
+ typedef base::Callback<void(const std::vector<uint8_t>&)> ValueCallback;
typedef base::Closure ErrorCallback;
// Called when a remote device in the central role requests to read the
@@ -74,18 +74,16 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothLocalGattService
// satisfied by the remote device.
//
// To respond to the request with success the delegate must invoke
- // |callback| with the new value of the characteristic. Doing so will
- // automatically update the value property of |characteristic|. To respond
- // to the request with failure (e.g. if an invalid offset was given),
- // delegates must invoke |error_callback|. If neither callback parameter is
- // invoked, the request will time out and result in an error. Therefore,
- // delegates MUST invoke either |callback| or |error_callback|.
+ // |callback|. To respond to the request with failure delegates must invoke
+ // |error_callback|. If neither callback parameter is invoked, the request
+ // will time out and result in an error. Therefore, delegates MUST invoke
+ // either |callback| or |error_callback|.
virtual void OnCharacteristicWriteRequest(
const BluetoothLocalGattService* service,
const BluetoothLocalGattCharacteristic* characteristic,
const std::vector<uint8_t>& value,
int offset,
- const ValueCallback& callback,
+ const base::Closure& callback,
const ErrorCallback& error_callback) = 0;
// Called when a remote device in the central role requests to read the
@@ -115,18 +113,16 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothLocalGattService
// satisfied by the remote device.
//
// To respond to the request with success the delegate must invoke
- // |callback| with the new value of the descriptor. Doing so will
- // automatically update the value property of |descriptor|. To respond
- // to the request with failure (e.g. if an invalid offset was given),
- // delegates must invoke |error_callback|. If neither callback parameter is
- // invoked, the request will time out and result in an error. Therefore,
- // delegates MUST invoke either |callback| or |error_callback|.
+ // |callback|. To respond to the request with failure delegates must invoke
+ // |error_callback|. If neither callback parameter is invoked, the request
+ // will time out and result in an error. Therefore, delegates MUST invoke
+ // either |callback| or |error_callback|.
virtual void OnDescriptorWriteRequest(
const BluetoothLocalGattService* service,
const BluetoothLocalGattDescriptor* descriptor,
const std::vector<uint8_t>& value,
int offset,
- const ValueCallback& callback,
+ const base::Closure& callback,
const ErrorCallback& error_callback) = 0;
};
« no previous file with comments | « device/bluetooth/bluetooth_local_gatt_descriptor.cc ('k') | device/bluetooth/bluetooth_local_gatt_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698