Index: device/bluetooth/bluetooth_task_manager_win.h |
diff --git a/device/bluetooth/bluetooth_task_manager_win.h b/device/bluetooth/bluetooth_task_manager_win.h |
index 56ecbef0417357c5d241e30c35e61521af3a4096..354a5793c4fd90bf696aaf5a6011ea44c0c7ea77 100644 |
--- a/device/bluetooth/bluetooth_task_manager_win.h |
+++ b/device/bluetooth/bluetooth_task_manager_win.h |
@@ -18,6 +18,7 @@ |
#include "base/win/scoped_handle.h" |
#include "device/bluetooth/bluetooth_adapter.h" |
#include "device/bluetooth/bluetooth_export.h" |
+#include "device/bluetooth/bluetooth_low_energy_win.h" |
namespace base { |
@@ -103,6 +104,9 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothTaskManagerWin |
explicit BluetoothTaskManagerWin( |
scoped_refptr<base::SequencedTaskRunner> ui_task_runner); |
+ static BluetoothUUID BluetoothLowEnergyUuidToBluetoothUuid( |
+ const BTH_LE_UUID& bth_le_uuid); |
+ |
void AddObserver(Observer* observer); |
void RemoveObserver(Observer* observer); |
@@ -118,6 +122,21 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothTaskManagerWin |
void PostStartDiscoveryTask(); |
void PostStopDiscoveryTask(); |
+ // Callbacks of asynchronous operations of GATT service. |
+ typedef base::Callback< |
+ void(scoped_ptr<BTH_LE_GATT_CHARACTERISTIC>, uint16_t, HRESULT)> |
+ GetGattIncludedCharacteristicsCallback; |
+ |
+ // Get all included characteristics of a given service. The service is |
+ // uniquely identified by its |uuid| and |attribute_handle| with service |
+ // device |service_path|. The result is returned asynchronously through |
+ // |callback|. |
+ void PostGetGattIncludedCharacteristics( |
+ const base::FilePath& service_path, |
+ const BluetoothUUID& uuid, |
+ uint16_t attribute_handle, |
+ const GetGattIncludedCharacteristicsCallback& callback); |
+ |
private: |
friend class base::RefCountedThreadSafe<BluetoothTaskManagerWin>; |
friend class BluetoothTaskManagerWinTest; |
@@ -208,6 +227,13 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothTaskManagerWin |
const std::string device_address, |
ScopedVector<ServiceRecordState>* service_record_states); |
+ // GATT service related functions. |
+ void GetGattIncludedCharacteristics( |
+ base::FilePath device_path, |
+ BluetoothUUID uuid, |
+ uint16_t attribute_handle, |
+ const GetGattIncludedCharacteristicsCallback& callback); |
+ |
// UI task runner reference. |
scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; |