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

Unified Diff: device/bluetooth/bluetooth_task_manager_win.h

Issue 1690133002: Implement BluetoothRemoteGattServiceWin and related unit tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments and split out of included GATT services 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 side-by-side diff with in-line comments
Download patch
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_;

Powered by Google App Engine
This is Rietveld 408576698