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

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

Issue 2052513002: Read characteristic implementation on macOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@characteristicscan_servicescan_cleanup
Patch Set: Addressing msarda's comment Created 4 years, 6 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
« no previous file with comments | « device/bluetooth/bluetooth_remote_gatt_service_mac.mm ('k') | device/bluetooth/test/bluetooth_test_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a323131c18dcba10b1b17f33fc97059cc0731b38..bbffee053c1f02dfc3cb76aecf3f5e149c49b83f 100644
--- a/device/bluetooth/test/bluetooth_test_mac.h
+++ b/device/bluetooth/test/bluetooth_test_mac.h
@@ -11,8 +11,10 @@
#include "device/bluetooth/test/bluetooth_test.h"
#if __OBJC__
+@class MockCBCharacteristic;
@class MockCBPeripheral;
#else // __OBJC__
+class MockCBCharacteristic;
class MockCBPeripheral;
#endif // __OBJC__
@@ -50,6 +52,12 @@ class BluetoothTestMac : public BluetoothTestBase {
void SimulateGattCharacteristic(BluetoothRemoteGattService* service,
const std::string& uuid,
int properties) override;
+ void SimulateGattCharacteristicRead(
+ BluetoothRemoteGattCharacteristic* characteristic,
+ const std::vector<uint8_t>& value) override;
+ void SimulateGattCharacteristicReadError(
+ BluetoothRemoteGattCharacteristic* characteristic,
+ BluetoothRemoteGattService::GattErrorCode) override;
void SimulateGattCharacteristicRemoved(
BluetoothRemoteGattService* service,
BluetoothRemoteGattCharacteristic* characteristic) override;
@@ -60,6 +68,7 @@ class BluetoothTestMac : public BluetoothTestBase {
// Callback for the bluetooth peripheral mock.
void OnFakeBluetoothServiceDiscovery();
+ void OnFakeBluetoothCharacteristicReadValue();
protected:
class ScopedMockCentralManager;
@@ -67,11 +76,14 @@ class BluetoothTestMac : public BluetoothTestBase {
// Returns MockCBPeripheral from BluetoothRemoteGattService.
MockCBPeripheral* GetMockCBPeripheral(
BluetoothRemoteGattService* service) const;
+ // Returns MockCBPeripheral from BluetoothRemoteGattService.
+ MockCBCharacteristic* GetCBMockCharacteristic(
+ BluetoothRemoteGattCharacteristic* characteristic) const;
// Utility function for finding CBUUIDs with relatively nice SHA256 hashes.
std::string FindCBUUIDForHashTarget();
- BluetoothAdapterMac* adapter_mac_ = NULL;
+ BluetoothAdapterMac* adapter_mac_ = nullptr;
std::unique_ptr<ScopedMockCentralManager> mock_central_manager_;
};
« no previous file with comments | « device/bluetooth/bluetooth_remote_gatt_service_mac.mm ('k') | device/bluetooth/test/bluetooth_test_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698