| Index: device/bluetooth/bluetooth_low_energy_win_fake.h
|
| diff --git a/device/bluetooth/bluetooth_low_energy_win_fake.h b/device/bluetooth/bluetooth_low_energy_win_fake.h
|
| index a4da0c72a21d3beaf5280cacb61515e216b93bed..d57d9da80f2497288be56adb71e908bee69e7a46 100644
|
| --- a/device/bluetooth/bluetooth_low_energy_win_fake.h
|
| +++ b/device/bluetooth/bluetooth_low_energy_win_fake.h
|
| @@ -78,11 +78,45 @@ class BluetoothLowEnergyWrapperFake : public BluetoothLowEnergyWrapper {
|
| const base::FilePath& device_path,
|
| ScopedVector<BluetoothLowEnergyServiceInfo>* services,
|
| std::string* error) override;
|
| + HRESULT ReadIncludedServicesOfAService(
|
| + base::FilePath& service_path,
|
| + const PBTH_LE_GATT_SERVICE service,
|
| + scoped_ptr<BTH_LE_GATT_SERVICE>* out_included_services,
|
| + USHORT* out_counts) override;
|
| + HRESULT ReadCharacteristicsOfAService(
|
| + base::FilePath& service_path,
|
| + const PBTH_LE_GATT_SERVICE service,
|
| + scoped_ptr<BTH_LE_GATT_CHARACTERISTIC>* out_included_characteristics,
|
| + USHORT* out_counts) override;
|
|
|
| BLEDevice* SimulateBLEDevice(std::string device_name,
|
| BLUETOOTH_ADDRESS device_address);
|
| BLEDevice* GetSimulatedBLEDevice(std::string device_address);
|
| - BLEGattService* SimulateBLEGattService(BLEDevice* device, std::string uuid);
|
| +
|
| + // Note: |parent_service| == nullptr if simulated service is a primary
|
| + // service.
|
| + BLEGattService* SimulateBLEGattService(BLEDevice* device,
|
| + BLEGattService* parent_service,
|
| + const BTH_LE_UUID& uuid);
|
| +
|
| + // Note: |parent_service| == nullptr if removed service is a primary
|
| + // service.
|
| + void SimulateBLEGattServiceRemove(BLEDevice* device,
|
| + BLEGattService* parent_service,
|
| + std::string attribute_handle);
|
| +
|
| + // Note: |chain_of_att_handle| contains the attribute handles of the services
|
| + // in order from primary service to target service. The last item in
|
| + // |chain_of_att_handle| is the target service's attribute handle.
|
| + BLEGattService* GetSimulatedGattService(
|
| + BLEDevice* device,
|
| + const std::vector<std::string>& chain_of_att_handle);
|
| + BLEGattCharacteristic* SimulateCharacterisc(
|
| + std::string device_address,
|
| + BLEGattService* parent_service,
|
| + const BTH_LE_GATT_CHARACTERISTIC& characteristic);
|
| + void SimulateCharacteriscRemove(BLEGattService* parent_service,
|
| + std::string attribute_handle);
|
|
|
| private:
|
| // Generate an unique attribute handle on |device_address|.
|
| @@ -102,18 +136,15 @@ class BluetoothLowEnergyWrapperFake : public BluetoothLowEnergyWrapper {
|
| // GenerateBLEDevicePath or GenerateBLEGattServiceDevicePath.
|
| base::string16 ExtractDeviceAddressFromDevicePath(base::string16 path);
|
|
|
| - // Extract service attribute handle from the |path| generated by
|
| + // Extract service attribute handles from the |path| generated by
|
| // GenerateBLEGattServiceDevicePath.
|
| - base::string16 ExtractServiceAttributeHandleFromDevicePath(
|
| + std::vector<std::string> ExtractServiceAttributeHandlesFromDevicePath(
|
| base::string16 path);
|
|
|
| // The canonical BLE device address string format is the
|
| // BluetoothDevice::CanonicalizeAddress.
|
| std::string BluetoothAddressToCanonicalString(const BLUETOOTH_ADDRESS& btha);
|
|
|
| - // The canonical UUID string format is device::BluetoothUUID.value().
|
| - BTH_LE_UUID CanonicalStringToBTH_LE_UUID(std::string uuid);
|
| -
|
| // Table to store allocated attribute handle for a device.
|
| BLEAttributeHandleTable attribute_handle_table_;
|
| BLEDevicesMap simulated_devices_;
|
|
|