OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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_local_gatt_descriptor.h" | 5 #include "device/bluetooth/bluetooth_local_gatt_descriptor.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 | 8 |
| 9 #if defined(OS_CHROMEOS) || defined(OS_LINUX) |
| 10 #include "device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.h" |
| 11 #endif |
| 12 |
9 namespace device { | 13 namespace device { |
10 | 14 |
11 BluetoothLocalGattDescriptor::BluetoothLocalGattDescriptor() {} | 15 BluetoothLocalGattDescriptor::BluetoothLocalGattDescriptor() {} |
12 | 16 |
13 BluetoothLocalGattDescriptor::~BluetoothLocalGattDescriptor() {} | 17 BluetoothLocalGattDescriptor::~BluetoothLocalGattDescriptor() {} |
14 | 18 |
15 // static | 19 // static |
16 BluetoothLocalGattDescriptor* BluetoothLocalGattDescriptor::Create( | 20 base::WeakPtr<BluetoothLocalGattDescriptor> |
| 21 BluetoothLocalGattDescriptor::Create( |
17 const BluetoothUUID& uuid, | 22 const BluetoothUUID& uuid, |
18 const std::vector<uint8_t>& value, | |
19 BluetoothGattCharacteristic::Permissions permissions, | 23 BluetoothGattCharacteristic::Permissions permissions, |
20 BluetoothLocalGattCharacteristic* characteristic) { | 24 BluetoothLocalGattCharacteristic* characteristic) { |
21 LOG(ERROR) << "Creating local GATT characteristic descriptors currently not " | 25 #if defined(OS_CHROMEOS) || defined(OS_LINUX) |
22 << "supported."; | 26 return bluez::BluetoothLocalGattDescriptorBlueZ::Create(uuid, permissions, |
23 return NULL; | 27 characteristic); |
| 28 return nullptr; |
| 29 #else |
| 30 NOTIMPLEMENTED(); |
| 31 return nullptr; |
| 32 #endif |
24 } | 33 } |
25 | 34 |
26 } // namespace device | 35 } // namespace device |
OLD | NEW |