| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_gatt_characteristic.h" | 5 #include "device/bluetooth/bluetooth_gatt_characteristic.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | |
| 8 #include "device/bluetooth/bluetooth_gatt_descriptor.h" | |
| 9 | |
| 10 namespace device { | 7 namespace device { |
| 11 | 8 |
| 12 BluetoothGattCharacteristic::BluetoothGattCharacteristic() { | 9 BluetoothGattCharacteristic::BluetoothGattCharacteristic() {} |
| 13 } | |
| 14 | 10 |
| 15 BluetoothGattCharacteristic::~BluetoothGattCharacteristic() { | 11 BluetoothGattCharacteristic::~BluetoothGattCharacteristic() {} |
| 16 } | |
| 17 | |
| 18 // static | |
| 19 BluetoothGattCharacteristic* BluetoothGattCharacteristic::Create( | |
| 20 const BluetoothUUID& uuid, | |
| 21 const std::vector<uint8_t>& value, | |
| 22 Properties properties, | |
| 23 Permissions permissions) { | |
| 24 LOG(ERROR) << "Creating local GATT characteristics currently not supported."; | |
| 25 return NULL; | |
| 26 } | |
| 27 | |
| 28 std::vector<BluetoothGattDescriptor*> | |
| 29 BluetoothGattCharacteristic::GetDescriptorsByUUID(const BluetoothUUID& uuid) { | |
| 30 std::vector<BluetoothGattDescriptor*> descriptors; | |
| 31 for (BluetoothGattDescriptor* descriptor : GetDescriptors()) { | |
| 32 if (descriptor->GetUUID() == uuid) { | |
| 33 descriptors.push_back(descriptor); | |
| 34 } | |
| 35 } | |
| 36 return descriptors; | |
| 37 } | |
| 38 | 12 |
| 39 } // namespace device | 13 } // namespace device |
| OLD | NEW |