Index: device/bluetooth/bluetooth_low_energy_win.h |
diff --git a/device/bluetooth/bluetooth_low_energy_win.h b/device/bluetooth/bluetooth_low_energy_win.h |
index fd73b2c47ae1d7b42a1d2339ede9f8c85e4689d1..d22b4f6f004dd99f3bbb224271f6f0ff83d452b7 100644 |
--- a/device/bluetooth/bluetooth_low_energy_win.h |
+++ b/device/bluetooth/bluetooth_low_energy_win.h |
@@ -98,31 +98,43 @@ struct BluetoothLowEnergyDeviceInfo { |
bool connected; |
}; |
-// Enumerates the list of known (i.e. already paired) Bluetooth LE devices on |
-// this machine. In case of error, returns false and sets |error| with an error |
-// message describing the problem. |
-// Note: This function returns an error if Bluetooth Low Energy is not supported |
-// on this Windows platform. |
-bool EnumerateKnownBluetoothLowEnergyDevices( |
- ScopedVector<BluetoothLowEnergyDeviceInfo>* devices, |
- std::string* error); |
- |
-// Enumerates the list of known (i.e. cached) GATT services for a given |
-// Bluetooth LE device |device_path| into |services|. In case of error, returns |
-// false and sets |error| with an error message describing the problem. Note: |
-// This function returns an error if Bluetooth Low Energy is not supported on |
-// this Windows platform. |
-bool EnumerateKnownBluetoothLowEnergyServices( |
- const base::FilePath& device_path, |
- ScopedVector<BluetoothLowEnergyServiceInfo>* services, |
- std::string* error); |
- |
bool DEVICE_BLUETOOTH_EXPORT |
ExtractBluetoothAddressFromDeviceInstanceIdForTesting( |
const std::string& instance_id, |
BLUETOOTH_ADDRESS* btha, |
std::string* error); |
+// Wrap Windows Apis to enumerate Bluetooth low energy devices and services. |
scheib
2016/01/29 04:35:50
Wraps Windows APIs used to access Bluetooth Low En
gogerald1
2016/02/02 22:00:21
Done.
|
+class BluetoothLowEnergyHub { |
scheib
2016/01/29 04:35:50
I think these names would be more descriptive:
Blu
gogerald1
2016/02/02 22:00:21
Done.
|
+ public: |
+ static BluetoothLowEnergyHub* GetInstance(); |
+ static void SetInstanceForTest(BluetoothLowEnergyHub* instance); |
+ |
+ // Enumerates the list of known (i.e. already paired) Bluetooth LE devices on |
+ // this machine. In case of error, returns false and sets |error| with an |
+ // error message describing the problem. |
+ // Note: This function returns an error if Bluetooth Low Energy is not |
+ // supported on this Windows platform. |
+ virtual bool EnumerateKnownBluetoothLowEnergyDevices( |
+ ScopedVector<BluetoothLowEnergyDeviceInfo>* devices, |
+ std::string* error); |
+ |
+ // Enumerates the list of known (i.e. cached) GATT services for a given |
+ // Bluetooth LE device |device_path| into |services|. In case of error, |
+ // returns false and sets |error| with an error message describing the |
+ // problem. |
+ // Note: This function returns an error if Bluetooth Low Energy is not |
+ // supported on this Windows platform. |
+ virtual bool EnumerateKnownBluetoothLowEnergyServices( |
+ const base::FilePath& device_path, |
+ ScopedVector<BluetoothLowEnergyServiceInfo>* services, |
+ std::string* error); |
+ |
+ protected: |
+ BluetoothLowEnergyHub(); |
+ virtual ~BluetoothLowEnergyHub(); |
+}; |
+ |
} // namespace win |
} // namespace device |