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

Unified Diff: device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h

Issue 2051333004: Implement BluetoothGattNotifySession::Stop on Android, 2nd attempt (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address new review comments Created 4 years, 4 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/bluez/bluetooth_remote_gatt_characteristic_bluez.h
diff --git a/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h b/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h
index 19e040f64e78eda06bfe795db58f57c12e4a826f..b2883c767b64b36e76b21207832034dfc721ab83 100644
--- a/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h
+++ b/device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h
@@ -17,7 +17,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "dbus/object_path.h"
-#include "device/bluetooth/bluetooth_gatt_characteristic.h"
+#include "device/bluetooth/bluetooth_remote_gatt_characteristic.h"
#include "device/bluetooth/bluetooth_remote_gatt_service.h"
#include "device/bluetooth/bluetooth_uuid.h"
#include "device/bluetooth/bluez/bluetooth_gatt_characteristic_bluez.h"
@@ -59,17 +59,27 @@ class BluetoothRemoteGattCharacteristicBlueZ
const std::string& identifier) const override;
void StartNotifySession(const NotifySessionCallback& callback,
const ErrorCallback& error_callback) override;
+ // Removes one value update session and invokes |callback| on completion. This
+ // decrements the session reference count by 1 and if the number reaches 0,
+ // makes a call to the subsystem to stop notifications from this
+ // characteristic.
+ void StopNotifySession(device::BluetoothGattNotifySession* session,
+ const base::Closure& callback) override;
void ReadRemoteCharacteristic(const ValueCallback& callback,
const ErrorCallback& error_callback) override;
void WriteRemoteCharacteristic(const std::vector<uint8_t>& new_value,
const base::Closure& callback,
const ErrorCallback& error_callback) override;
- // Removes one value update session and invokes |callback| on completion. This
- // decrements the session reference count by 1 and if the number reaches 0,
- // makes a call to the subsystem to stop notifications from this
- // characteristic.
- void RemoveNotifySession(const base::Closure& callback);
+ protected:
+ void SubscribeToNotifications(
+ device::BluetoothRemoteGattDescriptor* ccc_descriptor,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) override;
+ void UnsubscribeFromNotifications(
+ device::BluetoothRemoteGattDescriptor* ccc_descriptor,
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) override;
private:
friend class BluetoothRemoteGattServiceBlueZ;

Powered by Google App Engine
This is Rietveld 408576698