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); |
}; |