blob: 66c39f68ebaf1987c54b1b8ba6e7d940db997683 [file] [log] [blame]
[email protected]a9154e32014-02-11 04:29:571// Copyright 2014 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_gatt_characteristic.h"
6
7#include "base/logging.h"
tommyt0348fa62016-03-14 22:12:288#include "device/bluetooth/bluetooth_gatt_descriptor.h"
[email protected]a9154e32014-02-11 04:29:579
10namespace device {
11
12BluetoothGattCharacteristic::BluetoothGattCharacteristic() {
13}
14
15BluetoothGattCharacteristic::~BluetoothGattCharacteristic() {
16}
17
18// static
19BluetoothGattCharacteristic* BluetoothGattCharacteristic::Create(
[email protected]8148ad42014-04-04 04:10:3820 const BluetoothUUID& uuid,
avi176e2692015-12-22 19:26:5221 const std::vector<uint8_t>& value,
[email protected]a9154e32014-02-11 04:29:5722 Properties properties,
23 Permissions permissions) {
24 LOG(ERROR) << "Creating local GATT characteristics currently not supported.";
25 return NULL;
26}
27
tommyt0348fa62016-03-14 22:12:2828BluetoothGattDescriptor* BluetoothGattCharacteristic::GetDescriptorForUUID(
29 const BluetoothUUID& uuid) {
30 for (BluetoothGattDescriptor* descriptor : GetDescriptors()) {
31 if (descriptor->GetUUID() == uuid) {
32 return descriptor;
33 }
34 }
35 return NULL;
36}
37
[email protected]a9154e32014-02-11 04:29:5738} // namespace device