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

Unified Diff: device/bluetooth/bluetooth_local_gatt_service.h

Issue 1973343005: Remove service, add device, in BluetoothLocalGattService::Delegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 989810a9b5489a8442819dffc4d05f1227928aaa..dc8b61a9b5c2c5dcdea6b939a96c8789ec457847 100644
--- a/device/bluetooth/bluetooth_local_gatt_service.h
+++ b/device/bluetooth/bluetooth_local_gatt_service.h
@@ -47,8 +47,8 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothLocalGattService
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
- // value of the characteristic |characteristic| starting at offset |offset|.
+ // Called when a remote device |device| requests to read the value of the
+ // characteristic |characteristic| starting at offset |offset|.
// This method is only called if the characteristic was specified as
// readable and any authentication and authorization challenges were
// satisfied by the remote device.
@@ -61,14 +61,14 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothLocalGattService
// invoked, the request will time out and result in an error. Therefore,
// delegates MUST invoke either |callback| or |error_callback|.
virtual void OnCharacteristicReadRequest(
- const BluetoothLocalGattService* service,
+ const BluetoothDevice* device,
const BluetoothLocalGattCharacteristic* characteristic,
int offset,
const ValueCallback& callback,
const ErrorCallback& error_callback) = 0;
- // Called when a remote device in the central role requests to write the
- // value of the characteristic |characteristic| starting at offset |offset|.
+ // Called when a remote device |device| requests to write the value of the
+ // characteristic |characteristic| starting at offset |offset|.
// This method is only called if the characteristic was specified as
// writable and any authentication and authorization challenges were
// satisfied by the remote device.
@@ -79,16 +79,16 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothLocalGattService
// will time out and result in an error. Therefore, delegates MUST invoke
// either |callback| or |error_callback|.
virtual void OnCharacteristicWriteRequest(
- const BluetoothLocalGattService* service,
+ const BluetoothDevice* device,
const BluetoothLocalGattCharacteristic* characteristic,
const std::vector<uint8_t>& value,
int offset,
const base::Closure& callback,
const ErrorCallback& error_callback) = 0;
- // Called when a remote device in the central role requests to read the
- // value of the descriptor |descriptor| starting at offset |offset|.
- // This method is only called if the characteristic was specified as
+ // Called when a remote device |device| requests to read the value of the
+ // descriptor |descriptor| starting at offset |offset|.
+ // This method is only called if the descriptor was specified as
// readable and any authentication and authorization challenges were
// satisfied by the remote device.
//
@@ -100,15 +100,15 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothLocalGattService
// invoked, the request will time out and result in an error. Therefore,
// delegates MUST invoke either |callback| or |error_callback|.
virtual void OnDescriptorReadRequest(
- const BluetoothLocalGattService* service,
+ const BluetoothDevice* device,
const BluetoothLocalGattDescriptor* descriptor,
int offset,
const ValueCallback& callback,
const ErrorCallback& error_callback) = 0;
- // Called when a remote device in the central role requests to write the
- // value of the descriptor |descriptor| starting at offset |offset|.
- // This method is only called if the characteristic was specified as
+ // Called when a remote device |devie| requests to write the value of the
+ // descriptor |descriptor| starting at offset |offset|.
+ // This method is only called if the descriptor was specified as
// writable and any authentication and authorization challenges were
// satisfied by the remote device.
//
@@ -118,25 +118,25 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothLocalGattService
// will time out and result in an error. Therefore, delegates MUST invoke
// either |callback| or |error_callback|.
virtual void OnDescriptorWriteRequest(
- const BluetoothLocalGattService* service,
+ const BluetoothDevice* device,
const BluetoothLocalGattDescriptor* descriptor,
const std::vector<uint8_t>& value,
int offset,
const base::Closure& callback,
const ErrorCallback& error_callback) = 0;
- // Called when a remote device requests notifications to start for
+ // Called when a remote device |device| requests notifications to start for
// |characteristic|. This is only called if the characteristic has
// specified the notify or indicate property.
virtual void OnNotificationsStart(
- const BluetoothLocalGattService* service,
+ const BluetoothDevice* device,
const BluetoothLocalGattCharacteristic* characteristic) = 0;
- // Called when a remote device requests notifications to stop for
+ // Called when a remote device |device| requests notifications to stop for
// |characteristic|. This is only called if the characteristic has
// specified the notify or indicate property.
virtual void OnNotificationsStop(
- const BluetoothLocalGattService* service,
+ const BluetoothDevice* device,
const BluetoothLocalGattCharacteristic* characteristic) = 0;
};
« no previous file with comments | « device/bluetooth/bluetooth_local_gatt_descriptor_unittest.cc ('k') | device/bluetooth/bluez/bluetooth_adapter_bluez.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698