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

Unified Diff: device/bluetooth/test/bluetooth_test_mac.h

Issue 2634873002: Bluetooth: macOS: Implement BluetoothRemoteGattCharacteristicMac::UnsubscribeFromNotifications (Closed)
Patch Set: Adding last_notify_value for macOS Created 3 years, 10 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/test/bluetooth_test_mac.h
diff --git a/device/bluetooth/test/bluetooth_test_mac.h b/device/bluetooth/test/bluetooth_test_mac.h
index 90a7e89cf3a57a76788e5642172f6ea6d813ce6b..337085600e5af90567bee0c1fcafb445e2419a9d 100644
--- a/device/bluetooth/test/bluetooth_test_mac.h
+++ b/device/bluetooth/test/bluetooth_test_mac.h
@@ -73,6 +73,11 @@ class BluetoothTestMac : public BluetoothTestBase {
void SimulateGattNotifySessionStartError(
BluetoothRemoteGattCharacteristic* characteristic,
BluetoothRemoteGattService::GattErrorCode error_code) override;
+ void SimulateGattNotifySessionStopped(
+ BluetoothRemoteGattCharacteristic* characteristic) override;
+ void SimulateGattNotifySessionStopError(
+ BluetoothRemoteGattCharacteristic* characteristic,
+ BluetoothRemoteGattService::GattErrorCode error_code) override;
void SimulateGattCharacteristicChanged(
BluetoothRemoteGattCharacteristic* characteristic,
const std::vector<uint8_t>& value) override;
@@ -88,7 +93,7 @@ class BluetoothTestMac : public BluetoothTestBase {
void OnFakeBluetoothServiceDiscovery();
void OnFakeBluetoothCharacteristicReadValue();
void OnFakeBluetoothCharacteristicWriteValue(std::vector<uint8_t> value);
- void OnFakeBluetoothGattSetCharacteristicNotification();
+ void OnFakeBluetoothGattSetCharacteristicNotification(bool notify_value);
// Returns the service UUIDs used to retrieve connected peripherals.
BluetoothDevice::UUIDSet RetrieveConnectedPeripheralServiceUUIDs();
@@ -113,6 +118,9 @@ class BluetoothTestMac : public BluetoothTestBase {
BluetoothAdapterMac* adapter_mac_ = nullptr;
std::unique_ptr<ScopedMockCentralManager> mock_central_manager_;
+
+ // Value set by -[CBPeripheral setNotifyValue:forCharacteristic:] call.
+ bool last_notify_value = false;
};
// Defines common test fixture name. Use TEST_F(BluetoothTest, YourTestName).
« no previous file with comments | « device/bluetooth/bluetooth_remote_gatt_characteristic_unittest.cc ('k') | device/bluetooth/test/bluetooth_test_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698