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

Unified Diff: device/bluetooth/bluetooth_low_energy_device_mac.h

Issue 2641133003: Bluetooth: macOS: Adding counter for service discovery callbacks. (Closed)
Patch Set: Adding comment Created 3 years, 9 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_device_unittest.cc ('k') | device/bluetooth/bluetooth_low_energy_device_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_low_energy_device_mac.h
diff --git a/device/bluetooth/bluetooth_low_energy_device_mac.h b/device/bluetooth/bluetooth_low_energy_device_mac.h
index e33d5398ea023a8d1d06ab9781f6b24c03fe6042..b25bfff5aecc901ecf69e6055aee8140767817b7 100644
--- a/device/bluetooth/bluetooth_low_energy_device_mac.h
+++ b/device/bluetooth/bluetooth_low_energy_device_mac.h
@@ -107,6 +107,9 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothLowEnergyDeviceMac
friend class BluetoothTestMac;
friend class BluetoothRemoteGattServiceMac;
+ // Calls the macOS to discover primary services.
+ void DiscoverPrimaryServices();
+
// Sends notification if this device is ready with all services discovered.
void SendNotificationIfDiscoveryComplete();
@@ -140,6 +143,11 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothLowEnergyDeviceMac
// identifier.
std::string hash_address_;
+ // Increases each time -[CBPeripheral discoverServices:] is called, and
+ // decreases each time DidDiscoverPrimaryServices() is called. Once the
+ // value is set to 0, characteristics and properties are discovered.
+ int discovery_pending_count_;
+
DISALLOW_COPY_AND_ASSIGN(BluetoothLowEnergyDeviceMac);
};
« no previous file with comments | « device/bluetooth/bluetooth_device_unittest.cc ('k') | device/bluetooth/bluetooth_low_energy_device_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698