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

Unified Diff: device/bluetooth/test/mock_bluetooth_cbcharacteristic_mac.mm

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/mock_bluetooth_cbcharacteristic_mac.mm
diff --git a/device/bluetooth/test/mock_bluetooth_cbcharacteristic_mac.mm b/device/bluetooth/test/mock_bluetooth_cbcharacteristic_mac.mm
index 31816c79a50847c2823cdb052bcec3dafd48e39f..2cc9eb7be148850b3e66989560e7438f8e7aa607 100644
--- a/device/bluetooth/test/mock_bluetooth_cbcharacteristic_mac.mm
+++ b/device/bluetooth/test/mock_bluetooth_cbcharacteristic_mac.mm
@@ -158,6 +158,23 @@ CBCharacteristicProperties GattCharacteristicPropertyToCBCharacteristicProperty(
}
- (void)simulateGattNotifySessionFailedWithError:(NSError*)error {
+ _notifying = NO;
+ CBPeripheral* peripheral = _service.peripheral;
+ [peripheral.delegate peripheral:peripheral
+ didUpdateNotificationStateForCharacteristic:self.characteristic
+ error:error];
+}
+
+- (void)simulateGattNotifySessionStopped {
+ _notifying = NO;
+ CBPeripheral* peripheral = _service.peripheral;
+ [peripheral.delegate peripheral:peripheral
+ didUpdateNotificationStateForCharacteristic:self.characteristic
+ error:nil];
+}
+
+- (void)simulateGattNotifySessionStoppedWithError:(NSError*)error {
+ _notifying = NO;
CBPeripheral* peripheral = _service.peripheral;
[peripheral.delegate peripheral:peripheral
didUpdateNotificationStateForCharacteristic:self.characteristic
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_cbcharacteristic_mac.h ('k') | device/bluetooth/test/mock_bluetooth_cbperipheral_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698