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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 bool BluetoothRemoteGattDescriptorWin::IsLocal() const { | 56 bool BluetoothRemoteGattDescriptorWin::IsLocal() const { |
57 return false; | 57 return false; |
58 } | 58 } |
59 | 59 |
60 std::vector<uint8_t>& BluetoothRemoteGattDescriptorWin::GetValue() const { | 60 std::vector<uint8_t>& BluetoothRemoteGattDescriptorWin::GetValue() const { |
61 NOTIMPLEMENTED(); | 61 NOTIMPLEMENTED(); |
62 return const_cast<std::vector<uint8_t>&>(descriptor_value_); | 62 return const_cast<std::vector<uint8_t>&>(descriptor_value_); |
63 } | 63 } |
64 | 64 |
65 BluetoothGattCharacteristic* | 65 BluetoothRemoteGattCharacteristic* |
66 BluetoothRemoteGattDescriptorWin::GetCharacteristic() const { | 66 BluetoothRemoteGattDescriptorWin::GetCharacteristic() const { |
67 return parent_characteristic_; | 67 return parent_characteristic_; |
68 } | 68 } |
69 | 69 |
70 BluetoothGattCharacteristic::Permissions | 70 BluetoothRemoteGattCharacteristic::Permissions |
71 BluetoothRemoteGattDescriptorWin::GetPermissions() const { | 71 BluetoothRemoteGattDescriptorWin::GetPermissions() const { |
72 NOTIMPLEMENTED(); | 72 NOTIMPLEMENTED(); |
73 return descriptor_permissions_; | 73 return descriptor_permissions_; |
74 } | 74 } |
75 | 75 |
76 void BluetoothRemoteGattDescriptorWin::ReadRemoteDescriptor( | 76 void BluetoothRemoteGattDescriptorWin::ReadRemoteDescriptor( |
77 const ValueCallback& callback, | 77 const ValueCallback& callback, |
78 const ErrorCallback& error_callback) { | 78 const ErrorCallback& error_callback) { |
79 DCHECK(ui_task_runner_->RunsTasksOnCurrentThread()); | 79 DCHECK(ui_task_runner_->RunsTasksOnCurrentThread()); |
80 | 80 |
81 NOTIMPLEMENTED(); | 81 NOTIMPLEMENTED(); |
82 error_callback.Run(BluetoothGattService::GATT_ERROR_NOT_SUPPORTED); | 82 error_callback.Run(BluetoothRemoteGattService::GATT_ERROR_NOT_SUPPORTED); |
83 } | 83 } |
84 | 84 |
85 void BluetoothRemoteGattDescriptorWin::WriteRemoteDescriptor( | 85 void BluetoothRemoteGattDescriptorWin::WriteRemoteDescriptor( |
86 const std::vector<uint8_t>& new_value, | 86 const std::vector<uint8_t>& new_value, |
87 const base::Closure& callback, | 87 const base::Closure& callback, |
88 const ErrorCallback& error_callback) { | 88 const ErrorCallback& error_callback) { |
89 DCHECK(ui_task_runner_->RunsTasksOnCurrentThread()); | 89 DCHECK(ui_task_runner_->RunsTasksOnCurrentThread()); |
90 | 90 |
91 NOTIMPLEMENTED(); | 91 NOTIMPLEMENTED(); |
92 error_callback.Run(BluetoothGattService::GATT_ERROR_NOT_SUPPORTED); | 92 error_callback.Run(BluetoothRemoteGattService::GATT_ERROR_NOT_SUPPORTED); |
93 } | 93 } |
94 | 94 |
95 uint16_t BluetoothRemoteGattDescriptorWin::GetAttributeHandle() const { | 95 uint16_t BluetoothRemoteGattDescriptorWin::GetAttributeHandle() const { |
96 return descriptor_info_->AttributeHandle; | 96 return descriptor_info_->AttributeHandle; |
97 } | 97 } |
98 | 98 |
99 } // namespace device. | 99 } // namespace device. |
OLD | NEW |