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

Side by Side Diff: device/bluetooth/bluetooth_low_energy_win_fake.h

Issue 1681853003: Add BluetoothRemoteGattServiceWin to BluetoothDeviceWin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_FAKE_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_FAKE_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_FAKE_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_FAKE_H_
7 7
8 #include "device/bluetooth/bluetooth_low_energy_win.h" 8 #include "device/bluetooth/bluetooth_low_energy_win.h"
9 9
10 #include <set> 10 #include <set>
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 std::string* error) override; 76 std::string* error) override;
77 bool EnumerateKnownBluetoothLowEnergyServices( 77 bool EnumerateKnownBluetoothLowEnergyServices(
78 const base::FilePath& device_path, 78 const base::FilePath& device_path,
79 ScopedVector<BluetoothLowEnergyServiceInfo>* services, 79 ScopedVector<BluetoothLowEnergyServiceInfo>* services,
80 std::string* error) override; 80 std::string* error) override;
81 81
82 BLEDevice* SimulateBLEDevice(std::string device_name, 82 BLEDevice* SimulateBLEDevice(std::string device_name,
83 BLUETOOTH_ADDRESS device_address); 83 BLUETOOTH_ADDRESS device_address);
84 BLEGattService* SimulateBLEGattService(BLEDevice* device, std::string uuid); 84 BLEGattService* SimulateBLEGattService(BLEDevice* device, std::string uuid);
85 85
86 BLEDevice* GetSimulatedBLEDevice(std::string device_address);
scheib 2016/02/09 23:24:57 optional based on your plan, but seems reasonable
gogerald1 2016/02/10 18:00:56 Done.
87
86 private: 88 private:
87 // Generate an unique attribute handle on |device_address|. 89 // Generate an unique attribute handle on |device_address|.
88 USHORT GenerateAUniqueAttributeHandle(std::string device_address); 90 USHORT GenerateAUniqueAttributeHandle(std::string device_address);
89 91
90 // Generate device path for the BLE device with |device_address|. 92 // Generate device path for the BLE device with |device_address|.
91 base::string16 GenerateBLEDevicePath(std::string device_address); 93 base::string16 GenerateBLEDevicePath(std::string device_address);
92 94
93 // Generate GATT service device path of the service with 95 // Generate GATT service device path of the service with
94 // |service_attribute_handle|. |resident_device_path| is the BLE device this 96 // |service_attribute_handle|. |resident_device_path| is the BLE device this
95 // GATT service belongs to. 97 // GATT service belongs to.
(...skipping 19 matching lines...) Expand all
115 117
116 // Table to store allocated attribute handle for a device. 118 // Table to store allocated attribute handle for a device.
117 BLEAttributeHandleTable attribute_handle_table_; 119 BLEAttributeHandleTable attribute_handle_table_;
118 BLEDevicesMap simulated_devices_; 120 BLEDevicesMap simulated_devices_;
119 }; 121 };
120 122
121 } // namespace win 123 } // namespace win
122 } // namespace device 124 } // namespace device
123 125
124 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_FAKE_H_ 126 #endif // DEVICE_BLUETOOTH_BLUETOOTH_LOW_ENERGY_WIN_FAKE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698