| 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 #include "device/bluetooth/bluetooth_remote_gatt_descriptor_win.h" | 5 #include "device/bluetooth/bluetooth_remote_gatt_descriptor_win.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "device/bluetooth/bluetooth_adapter_win.h" | 8 #include "device/bluetooth/bluetooth_adapter_win.h" |
| 9 #include "device/bluetooth/bluetooth_remote_gatt_characteristic_win.h" | 9 #include "device/bluetooth/bluetooth_remote_gatt_characteristic_win.h" |
| 10 #include "device/bluetooth/bluetooth_remote_gatt_service_win.h" | 10 #include "device/bluetooth/bluetooth_remote_gatt_service_win.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 } | 46 } |
| 47 | 47 |
| 48 std::string BluetoothRemoteGattDescriptorWin::GetIdentifier() const { | 48 std::string BluetoothRemoteGattDescriptorWin::GetIdentifier() const { |
| 49 return descriptor_identifier_; | 49 return descriptor_identifier_; |
| 50 } | 50 } |
| 51 | 51 |
| 52 BluetoothUUID BluetoothRemoteGattDescriptorWin::GetUUID() const { | 52 BluetoothUUID BluetoothRemoteGattDescriptorWin::GetUUID() const { |
| 53 return descriptor_uuid_; | 53 return descriptor_uuid_; |
| 54 } | 54 } |
| 55 | 55 |
| 56 bool BluetoothRemoteGattDescriptorWin::IsLocal() const { | |
| 57 return false; | |
| 58 } | |
| 59 | |
| 60 std::vector<uint8_t>& BluetoothRemoteGattDescriptorWin::GetValue() const { | 56 std::vector<uint8_t>& BluetoothRemoteGattDescriptorWin::GetValue() const { |
| 61 NOTIMPLEMENTED(); | 57 NOTIMPLEMENTED(); |
| 62 return const_cast<std::vector<uint8_t>&>(descriptor_value_); | 58 return const_cast<std::vector<uint8_t>&>(descriptor_value_); |
| 63 } | 59 } |
| 64 | 60 |
| 65 BluetoothGattCharacteristic* | 61 BluetoothRemoteGattCharacteristic* |
| 66 BluetoothRemoteGattDescriptorWin::GetCharacteristic() const { | 62 BluetoothRemoteGattDescriptorWin::GetCharacteristic() const { |
| 67 return parent_characteristic_; | 63 return parent_characteristic_; |
| 68 } | 64 } |
| 69 | 65 |
| 70 BluetoothGattCharacteristic::Permissions | 66 BluetoothRemoteGattCharacteristic::Permissions |
| 71 BluetoothRemoteGattDescriptorWin::GetPermissions() const { | 67 BluetoothRemoteGattDescriptorWin::GetPermissions() const { |
| 72 NOTIMPLEMENTED(); | 68 NOTIMPLEMENTED(); |
| 73 return descriptor_permissions_; | 69 return descriptor_permissions_; |
| 74 } | 70 } |
| 75 | 71 |
| 76 void BluetoothRemoteGattDescriptorWin::ReadRemoteDescriptor( | 72 void BluetoothRemoteGattDescriptorWin::ReadRemoteDescriptor( |
| 77 const ValueCallback& callback, | 73 const ValueCallback& callback, |
| 78 const ErrorCallback& error_callback) { | 74 const ErrorCallback& error_callback) { |
| 79 DCHECK(ui_task_runner_->RunsTasksOnCurrentThread()); | 75 DCHECK(ui_task_runner_->RunsTasksOnCurrentThread()); |
| 80 | 76 |
| 81 NOTIMPLEMENTED(); | 77 NOTIMPLEMENTED(); |
| 82 error_callback.Run(BluetoothGattService::GATT_ERROR_NOT_SUPPORTED); | 78 error_callback.Run(BluetoothRemoteGattService::GATT_ERROR_NOT_SUPPORTED); |
| 83 } | 79 } |
| 84 | 80 |
| 85 void BluetoothRemoteGattDescriptorWin::WriteRemoteDescriptor( | 81 void BluetoothRemoteGattDescriptorWin::WriteRemoteDescriptor( |
| 86 const std::vector<uint8_t>& new_value, | 82 const std::vector<uint8_t>& new_value, |
| 87 const base::Closure& callback, | 83 const base::Closure& callback, |
| 88 const ErrorCallback& error_callback) { | 84 const ErrorCallback& error_callback) { |
| 89 DCHECK(ui_task_runner_->RunsTasksOnCurrentThread()); | 85 DCHECK(ui_task_runner_->RunsTasksOnCurrentThread()); |
| 90 | 86 |
| 91 NOTIMPLEMENTED(); | 87 NOTIMPLEMENTED(); |
| 92 error_callback.Run(BluetoothGattService::GATT_ERROR_NOT_SUPPORTED); | 88 error_callback.Run(BluetoothRemoteGattService::GATT_ERROR_NOT_SUPPORTED); |
| 93 } | 89 } |
| 94 | 90 |
| 95 uint16_t BluetoothRemoteGattDescriptorWin::GetAttributeHandle() const { | 91 uint16_t BluetoothRemoteGattDescriptorWin::GetAttributeHandle() const { |
| 96 return descriptor_info_->AttributeHandle; | 92 return descriptor_info_->AttributeHandle; |
| 97 } | 93 } |
| 98 | 94 |
| 99 } // namespace device. | 95 } // namespace device. |
| OLD | NEW |