| OLD | NEW |
| 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_REMOTE_GATT_DESCRIPTOR_WIN_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_DESCRIPTOR_WIN_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_DESCRIPTOR_WIN_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_DESCRIPTOR_WIN_H_ |
| 7 | 7 |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "device/bluetooth/bluetooth_gatt_descriptor.h" | 10 #include "device/bluetooth/bluetooth_gatt_descriptor.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 std::vector<uint8_t>& GetValue() const override; | 32 std::vector<uint8_t>& GetValue() const override; |
| 33 BluetoothGattCharacteristic* GetCharacteristic() const override; | 33 BluetoothGattCharacteristic* GetCharacteristic() const override; |
| 34 BluetoothGattCharacteristic::Permissions GetPermissions() const override; | 34 BluetoothGattCharacteristic::Permissions GetPermissions() const override; |
| 35 void ReadRemoteDescriptor(const ValueCallback& callback, | 35 void ReadRemoteDescriptor(const ValueCallback& callback, |
| 36 const ErrorCallback& error_callback) override; | 36 const ErrorCallback& error_callback) override; |
| 37 void WriteRemoteDescriptor(const std::vector<uint8_t>& new_value, | 37 void WriteRemoteDescriptor(const std::vector<uint8_t>& new_value, |
| 38 const base::Closure& callback, | 38 const base::Closure& callback, |
| 39 const ErrorCallback& error_callback) override; | 39 const ErrorCallback& error_callback) override; |
| 40 | 40 |
| 41 uint16_t GetAttributeHandle() const; | 41 uint16_t GetAttributeHandle() const; |
| 42 PBTH_LE_GATT_DESCRIPTOR GetWinDescriptorInfo() const { |
| 43 return descriptor_info_.get(); |
| 44 } |
| 42 | 45 |
| 43 private: | 46 private: |
| 44 BluetoothRemoteGattCharacteristicWin* parent_characteristic_; | 47 BluetoothRemoteGattCharacteristicWin* parent_characteristic_; |
| 45 scoped_ptr<BTH_LE_GATT_DESCRIPTOR> descriptor_info_; | 48 scoped_ptr<BTH_LE_GATT_DESCRIPTOR> descriptor_info_; |
| 46 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; | 49 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; |
| 47 | 50 |
| 48 base::FilePath service_path_; | 51 base::FilePath service_path_; |
| 49 scoped_refptr<BluetoothTaskManagerWin> task_manager_; | 52 scoped_refptr<BluetoothTaskManagerWin> task_manager_; |
| 50 BluetoothGattCharacteristic::Permissions descriptor_permissions_; | 53 BluetoothGattCharacteristic::Permissions descriptor_permissions_; |
| 51 BluetoothUUID descriptor_uuid_; | 54 BluetoothUUID descriptor_uuid_; |
| 52 std::string descriptor_identifier_; | 55 std::string descriptor_identifier_; |
| 53 std::vector<uint8_t> descriptor_value_; | 56 std::vector<uint8_t> descriptor_value_; |
| 54 | 57 |
| 55 base::WeakPtrFactory<BluetoothRemoteGattDescriptorWin> weak_ptr_factory_; | 58 base::WeakPtrFactory<BluetoothRemoteGattDescriptorWin> weak_ptr_factory_; |
| 56 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattDescriptorWin); | 59 DISALLOW_COPY_AND_ASSIGN(BluetoothRemoteGattDescriptorWin); |
| 57 }; | 60 }; |
| 58 | 61 |
| 59 } // namespace device. | 62 } // namespace device. |
| 60 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_DESCRIPTOR_WIN_H_ | 63 #endif // DEVICE_BLUETOOTH_BLUETOOTH_REMOTE_GATT_DESCRIPTOR_WIN_H_ |
| OLD | NEW |