| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "device/bluetooth/bluetooth_local_gatt_characteristic_bluez.h" | |
| 6 | |
| 7 #include <string> | |
| 8 | |
| 9 #include "base/callback_forward.h" | |
| 10 #include "base/logging.h" | |
| 11 #include "device/bluetooth/bluetooth_gatt_characteristic.h" | |
| 12 #include "device/bluetooth/bluetooth_gatt_descriptor.h" | |
| 13 #include "device/bluetooth/bluetooth_local_gatt_service_bluez.h" | |
| 14 | |
| 15 namespace bluez { | |
| 16 | |
| 17 BluetoothLocalGattCharacteristicBlueZ::BluetoothLocalGattCharacteristicBlueZ( | |
| 18 BluetoothLocalGattServiceBlueZ* service, | |
| 19 const dbus::ObjectPath& object_path) | |
| 20 : BluetoothGattCharacteristicBlueZ(service, object_path), | |
| 21 weak_ptr_factory_(this) { | |
| 22 VLOG(1) << "Creating local GATT characteristic with identifier: " | |
| 23 << GetIdentifier() << ", UUID: " << GetUUID().canonical_value(); | |
| 24 } | |
| 25 | |
| 26 BluetoothLocalGattCharacteristicBlueZ:: | |
| 27 ~BluetoothLocalGattCharacteristicBlueZ() {} | |
| 28 | |
| 29 device::BluetoothUUID BluetoothLocalGattCharacteristicBlueZ::GetUUID() const { | |
| 30 NOTIMPLEMENTED(); | |
| 31 return device::BluetoothUUID(); | |
| 32 } | |
| 33 | |
| 34 bool BluetoothLocalGattCharacteristicBlueZ::IsLocal() const { | |
| 35 return true; | |
| 36 } | |
| 37 | |
| 38 const std::vector<uint8_t>& BluetoothLocalGattCharacteristicBlueZ::GetValue() | |
| 39 const { | |
| 40 NOTIMPLEMENTED(); | |
| 41 static std::vector<uint8_t>* temp = new std::vector<uint8_t>; | |
| 42 return *temp; | |
| 43 } | |
| 44 | |
| 45 bool BluetoothLocalGattCharacteristicBlueZ::AddDescriptor( | |
| 46 device::BluetoothGattDescriptor* descriptor) { | |
| 47 NOTIMPLEMENTED(); | |
| 48 return false; | |
| 49 } | |
| 50 | |
| 51 device::BluetoothGattCharacteristic::Properties | |
| 52 BluetoothLocalGattCharacteristicBlueZ::GetProperties() const { | |
| 53 NOTIMPLEMENTED(); | |
| 54 return PROPERTY_NONE; | |
| 55 } | |
| 56 | |
| 57 bool BluetoothLocalGattCharacteristicBlueZ::IsNotifying() const { | |
| 58 NOTIMPLEMENTED(); | |
| 59 return false; | |
| 60 } | |
| 61 | |
| 62 bool BluetoothLocalGattCharacteristicBlueZ::UpdateValue( | |
| 63 const std::vector<uint8_t>& value) { | |
| 64 NOTIMPLEMENTED(); | |
| 65 return false; | |
| 66 } | |
| 67 | |
| 68 void BluetoothLocalGattCharacteristicBlueZ::StartNotifySession( | |
| 69 const NotifySessionCallback& callback, | |
| 70 const ErrorCallback& error_callback) { | |
| 71 // Doesn't apply for a local characteristic. | |
| 72 NOTIMPLEMENTED(); | |
| 73 } | |
| 74 | |
| 75 void BluetoothLocalGattCharacteristicBlueZ::ReadRemoteCharacteristic( | |
| 76 const ValueCallback& callback, | |
| 77 const ErrorCallback& error_callback) { | |
| 78 // Doesn't apply for a local characteristic. | |
| 79 NOTIMPLEMENTED(); | |
| 80 } | |
| 81 | |
| 82 void BluetoothLocalGattCharacteristicBlueZ::WriteRemoteCharacteristic( | |
| 83 const std::vector<uint8_t>& new_value, | |
| 84 const base::Closure& callback, | |
| 85 const ErrorCallback& error_callback) { | |
| 86 // Doesn't apply for a local characteristic. | |
| 87 NOTIMPLEMENTED(); | |
| 88 } | |
| 89 | |
| 90 } // namespace bluez | |
| OLD | NEW |