| 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 c8356a8a025ae234872b030dff8f759b65ba4fe5..fa426ea6892185740caab0493b280b6186e00f49 100644
|
| --- a/device/bluetooth/bluetooth_task_manager_win.h
|
| +++ b/device/bluetooth/bluetooth_task_manager_win.h
|
| @@ -99,8 +99,6 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothTaskManagerWin
|
| // discovery session, the "friendly" name may initially be "unknown" before
|
| // the actual name is retrieved in subsequent poll events.
|
| virtual void DevicesPolled(const ScopedVector<DeviceState>& devices) {}
|
| - virtual void OnAttemptReadGattCharacteristic() {}
|
| - virtual void OnAttemptWriteGattCharacteristic() {}
|
| };
|
|
|
| explicit BluetoothTaskManagerWin(
|
| @@ -135,6 +133,8 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothTaskManagerWin
|
| typedef base::Callback<void(scoped_ptr<BTH_LE_GATT_CHARACTERISTIC_VALUE>,
|
| HRESULT)>
|
| ReadGattCharacteristicValueCallback;
|
| + typedef base::Callback<void(BLUETOOTH_GATT_EVENT_HANDLE, HRESULT)>
|
| + GattEventRegistrationCallback;
|
|
|
| // Get all included characteristics of a given service. The service is
|
| // uniquely identified by its |uuid| and |attribute_handle| with service
|
| @@ -170,6 +170,23 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothTaskManagerWin
|
| const std::vector<uint8_t>& new_value,
|
| const HResultCallback& callback);
|
|
|
| + // Post register a given |characteristic|'s value change notification of a
|
| + // service with |service_path|. |registered_callback| is the function to be
|
| + // invoked if the event occured. |context| is a void pointer from caller which
|
| + // will be given back to caller through |registered_callback|. The operation
|
| + // result is returned asynchronously through |callback|.
|
| + void PostRegisterGattCharacteristicValueChangedEvent(
|
| + const base::FilePath& service_path,
|
| + const PBTH_LE_GATT_CHARACTERISTIC characteristic,
|
| + const GattEventRegistrationCallback& callback,
|
| + PFNBLUETOOTH_GATT_EVENT_CALLBACK registered_callback,
|
| + void* context);
|
| +
|
| + // Unregister characteristic value change notification. |event_handle| was
|
| + // returned by PostRegisterGattCharacteristicValueChangedEvent.
|
| + void UnregisterGattCharacteristicValueChangedEvent(
|
| + BLUETOOTH_GATT_EVENT_HANDLE event_handle);
|
| +
|
| private:
|
| friend class base::RefCountedThreadSafe<BluetoothTaskManagerWin>;
|
| friend class BluetoothTaskManagerWinTest;
|
| @@ -278,6 +295,12 @@ class DEVICE_BLUETOOTH_EXPORT BluetoothTaskManagerWin
|
| BTH_LE_GATT_CHARACTERISTIC characteristic,
|
| std::vector<uint8_t> new_value,
|
| const HResultCallback& callback);
|
| + void RegisterGattCharacteristicValueChangedEvent(
|
| + base::FilePath service_path,
|
| + BTH_LE_GATT_CHARACTERISTIC characteristic,
|
| + const GattEventRegistrationCallback& callback,
|
| + PFNBLUETOOTH_GATT_EVENT_CALLBACK registered_callback,
|
| + void* context);
|
|
|
| // UI task runner reference.
|
| scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
|
|
|