Chromium Code Reviews| Index: components/arc/bluetooth/arc_bluetooth_bridge.cc |
| diff --git a/components/arc/bluetooth/arc_bluetooth_bridge.cc b/components/arc/bluetooth/arc_bluetooth_bridge.cc |
| index 3437480a1ae75dd424cb05f298ea3307ada8beb1..4c5637a916ed6a6b7ea58c9e586cecffed959aaf 100644 |
| --- a/components/arc/bluetooth/arc_bluetooth_bridge.cc |
| +++ b/components/arc/bluetooth/arc_bluetooth_bridge.cc |
| @@ -19,14 +19,12 @@ |
| #include "base/time/time.h" |
| #include "components/arc/arc_bridge_service.h" |
| #include "components/arc/bluetooth/bluetooth_type_converters.h" |
| -#include "device/bluetooth/bluetooth_adapter_factory.h" |
| #include "device/bluetooth/bluetooth_common.h" |
| #include "device/bluetooth/bluetooth_device.h" |
| #include "device/bluetooth/bluetooth_gatt_connection.h" |
| #include "device/bluetooth/bluetooth_gatt_notify_session.h" |
| -#include "device/bluetooth/bluetooth_remote_gatt_characteristic.h" |
| -#include "device/bluetooth/bluetooth_remote_gatt_descriptor.h" |
| -#include "device/bluetooth/bluetooth_remote_gatt_service.h" |
| +#include "device/bluetooth/bluetooth_local_gatt_characteristic.h" |
| +#include "device/bluetooth/bluetooth_local_gatt_descriptor.h" |
| using device::BluetoothAdapter; |
| using device::BluetoothAdapterFactory; |
| @@ -39,9 +37,13 @@ using device::BluetoothGattNotifySession; |
| using device::BluetoothGattCharacteristic; |
| using device::BluetoothGattDescriptor; |
| using device::BluetoothGattService; |
| +using device::BluetoothLocalGattCharacteristic; |
| +using device::BluetoothLocalGattDescriptor; |
| +using device::BluetoothLocalGattService; |
| using device::BluetoothRemoteGattCharacteristic; |
| using device::BluetoothRemoteGattDescriptor; |
| using device::BluetoothRemoteGattService; |
| +using device::BluetoothTransport; |
| using device::BluetoothUUID; |
| namespace { |
| @@ -288,6 +290,44 @@ void ArcBluetoothBridge::GattDescriptorValueChanged( |
| // Placeholder for GATT client functionality |
| } |
| +void ArcBluetoothBridge::OnCharacteristicReadRequest( |
| + const BluetoothDevice* device, |
| + const BluetoothLocalGattCharacteristic* characteristic, |
| + int offset, |
| + const ValueCallback& callback, |
| + const ErrorCallback& error_callback) {} |
|
palmer
2016/07/16 00:21:04
Are these functions going to be filled in with imp
puthik_chromium
2016/07/16 00:27:18
The implementation is in http://crrev.com/21040430
puthik_chromium
2016/07/18 21:27:39
The |offset| is |int| type in Android API.
https:
|
| + |
| +void ArcBluetoothBridge::OnCharacteristicWriteRequest( |
| + const BluetoothDevice* device, |
| + const BluetoothLocalGattCharacteristic* characteristic, |
| + const std::vector<uint8_t>& value, |
| + int offset, |
| + const base::Closure& callback, |
| + const ErrorCallback& error_callback) {} |
| + |
| +void ArcBluetoothBridge::OnDescriptorReadRequest( |
| + const BluetoothDevice* device, |
| + const BluetoothLocalGattDescriptor* descriptor, |
| + int offset, |
| + const ValueCallback& callback, |
| + const ErrorCallback& error_callback) {} |
| + |
| +void ArcBluetoothBridge::OnDescriptorWriteRequest( |
| + const BluetoothDevice* device, |
| + const BluetoothLocalGattDescriptor* descriptor, |
| + const std::vector<uint8_t>& value, |
| + int offset, |
| + const base::Closure& callback, |
| + const ErrorCallback& error_callback) {} |
| + |
| +void ArcBluetoothBridge::OnNotificationsStart( |
| + const BluetoothDevice* device, |
| + const BluetoothLocalGattCharacteristic* characteristic) {} |
| + |
| +void ArcBluetoothBridge::OnNotificationsStop( |
| + const BluetoothDevice* device, |
| + const BluetoothLocalGattCharacteristic* characteristic) {} |
| + |
| void ArcBluetoothBridge::EnableAdapter(const EnableAdapterCallback& callback) { |
| DCHECK(bluetooth_adapter_); |
| if (!bluetooth_adapter_->IsPowered()) { |
| @@ -1022,6 +1062,43 @@ void ArcBluetoothBridge::ReadRemoteRssi( |
| callback.Run(rssi); |
| } |
| +void ArcBluetoothBridge::AddService(mojom::BluetoothGattServiceIDPtr service_id, |
| + int32_t num_handles, |
| + const AddServiceCallback& callback) {} |
| + |
| +void ArcBluetoothBridge::AddCharacteristic( |
| + int32_t service_handle, |
| + mojom::BluetoothUUIDPtr uuid, |
| + int32_t properties, |
| + int32_t permissions, |
| + const AddCharacteristicCallback& callback) {} |
| + |
| +void ArcBluetoothBridge::AddDescriptor(int32_t service_handle, |
| + mojom::BluetoothUUIDPtr uuid, |
| + int32_t permissions, |
| + const AddDescriptorCallback& callback) {} |
| + |
| +void ArcBluetoothBridge::StartService(int32_t service_handle, |
| + const StartServiceCallback& callback) {} |
| + |
| +void ArcBluetoothBridge::StopService(int32_t service_handle, |
| + const StopServiceCallback& callback) {} |
| + |
| +void ArcBluetoothBridge::DeleteService(int32_t service_handle, |
| + const DeleteServiceCallback& callback) {} |
| + |
| +void ArcBluetoothBridge::SendIndication( |
| + int32_t attribute_handle, |
| + mojom::BluetoothAddressPtr address, |
| + bool confirm, |
| + mojo::Array<uint8_t> value, |
| + const SendIndicationCallback& callback) {} |
| + |
| +void ArcBluetoothBridge::SendResponse(int32_t trans_id, |
| + int32_t status, |
| + mojo::Array<uint8_t> value, |
| + const SendResponseCallback& callback) {} |
| + |
| void ArcBluetoothBridge::OnDiscoveryError() { |
| LOG(WARNING) << "failed to change discovery state"; |
| } |