Chromium Code Reviews| Index: device/bluetooth/bluetooth_local_gatt_characteristic_bluez.cc |
| diff --git a/device/bluetooth/bluetooth_local_gatt_characteristic_bluez.cc b/device/bluetooth/bluetooth_local_gatt_characteristic_bluez.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..88e188c6f1bd5ab22a8615b9f022c09bb095e9e2 |
| --- /dev/null |
| +++ b/device/bluetooth/bluetooth_local_gatt_characteristic_bluez.cc |
| @@ -0,0 +1,89 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
|
ortuno
2016/04/14 17:42:35
It's 2016!
rkc
2016/04/14 19:27:27
That is true. A whole two years after 2014. Gosh,
|
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "device/bluetooth/bluetooth_local_gatt_characteristic_bluez.h" |
| + |
| +#include "base/logging.h" |
| +#include "device/bluetooth/bluetooth_adapter_bluez.h" |
| +#include "device/bluetooth/bluetooth_gatt_descriptor_bluez.h" |
| +#include "device/bluetooth/bluetooth_local_gatt_service_bluez.h" |
| +#include "device/bluetooth/dbus/bluez_dbus_manager.h" |
| +#include "third_party/cros_system_api/dbus/service_constants.h" |
| + |
| +namespace bluez { |
| + |
| +BluetoothLocalGattCharacteristicBlueZ::BluetoothLocalGattCharacteristicBlueZ( |
| + BluetoothLocalGattServiceBlueZ* service, |
| + const dbus::ObjectPath& object_path) |
| + : BluetoothGattCharacteristicBlueZ(service, object_path), |
| + weak_ptr_factory_(this) { |
| + VLOG(1) << "Creating local GATT characteristic with identifier: " |
| + << GetIdentifier() << ", UUID: " << GetUUID().canonical_value(); |
| +} |
| + |
| +BluetoothLocalGattCharacteristicBlueZ:: |
| + ~BluetoothLocalGattCharacteristicBlueZ() {} |
| + |
| +device::BluetoothUUID BluetoothLocalGattCharacteristicBlueZ::GetUUID() const { |
| + NOTIMPLEMENTED(); |
| + return device::BluetoothUUID(); |
| +} |
| + |
| +bool BluetoothLocalGattCharacteristicBlueZ::IsLocal() const { |
| + return true; |
| +} |
| + |
| +const std::vector<uint8_t>& BluetoothLocalGattCharacteristicBlueZ::GetValue() |
| + const { |
| + NOTIMPLEMENTED(); |
| + static std::vector<uint8_t> temp; |
|
ortuno
2016/04/14 17:42:35
I thought we tried to avoid static because of the
rkc
2016/04/14 19:27:27
This class is not being constructed, let alone des
ortuno
2016/04/14 21:17:38
I'm thinking of this part of the style guide: http
rkc
2016/04/14 21:59:38
This doesn't really violate the spirit of the rule
|
| + return temp; |
| +} |
| + |
| +bool BluetoothLocalGattCharacteristicBlueZ::AddDescriptor( |
| + device::BluetoothGattDescriptor* descriptor) { |
| + NOTIMPLEMENTED(); |
| + return false; |
| +} |
| + |
| +device::BluetoothGattCharacteristic::Properties |
| +BluetoothLocalGattCharacteristicBlueZ::GetProperties() const { |
| + NOTIMPLEMENTED(); |
| + return PROPERTY_NONE; |
| +} |
| + |
| +bool BluetoothLocalGattCharacteristicBlueZ::IsNotifying() const { |
| + NOTIMPLEMENTED(); |
| + return false; |
| +} |
| + |
| +bool BluetoothLocalGattCharacteristicBlueZ::UpdateValue( |
| + const std::vector<uint8_t>& value) { |
| + NOTIMPLEMENTED(); |
| + return false; |
| +} |
| + |
| +void BluetoothLocalGattCharacteristicBlueZ::StartNotifySession( |
| + const NotifySessionCallback& callback, |
| + const ErrorCallback& error_callback) { |
| + // Doesn't apply for a local characteristic. |
|
ortuno
2016/04/14 17:42:35
Please choose a pattern a follow it throughout:
1
rkc
2016/04/14 19:27:27
I didn't change the code in the remote service Reg
ortuno
2016/04/14 21:17:38
nit: I understand the argument about the refactori
rkc
2016/04/14 21:59:38
Once I start implementing this class, I will have
|
| + NOTIMPLEMENTED(); |
| +} |
| + |
| +void BluetoothLocalGattCharacteristicBlueZ::ReadRemoteCharacteristic( |
| + const ValueCallback& callback, |
| + const ErrorCallback& error_callback) { |
| + // Doesn't apply for a local characteristic. |
| + NOTIMPLEMENTED(); |
| +} |
| + |
| +void BluetoothLocalGattCharacteristicBlueZ::WriteRemoteCharacteristic( |
| + const std::vector<uint8_t>& new_value, |
| + const base::Closure& callback, |
| + const ErrorCallback& error_callback) { |
| + // Doesn't apply for a local characteristic. |
| + NOTIMPLEMENTED(); |
| +} |
| + |
| +} // namespace bluez |