Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: device/bluetooth/bluetooth_local_gatt_descriptor.cc

Issue 1920693002: Complete //device/bt implementation for hosting local GATT attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/bluetooth_local_gatt_descriptor.cc
diff --git a/device/bluetooth/bluetooth_local_gatt_descriptor.cc b/device/bluetooth/bluetooth_local_gatt_descriptor.cc
index d13ab4321ad50c8313746e7f662caebf66b4639b..29b954e05888a99168492cc5b93d204ecb4f927b 100644
--- a/device/bluetooth/bluetooth_local_gatt_descriptor.cc
+++ b/device/bluetooth/bluetooth_local_gatt_descriptor.cc
@@ -6,6 +6,10 @@
#include "base/logging.h"
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
+#include "device/bluetooth/bluez/bluetooth_local_gatt_descriptor_bluez.h"
+#endif
+
namespace device {
BluetoothLocalGattDescriptor::BluetoothLocalGattDescriptor() {}
@@ -13,14 +17,19 @@ BluetoothLocalGattDescriptor::BluetoothLocalGattDescriptor() {}
BluetoothLocalGattDescriptor::~BluetoothLocalGattDescriptor() {}
// static
-BluetoothLocalGattDescriptor* BluetoothLocalGattDescriptor::Create(
+base::WeakPtr<BluetoothLocalGattDescriptor>
+BluetoothLocalGattDescriptor::Create(
const BluetoothUUID& uuid,
- const std::vector<uint8_t>& value,
BluetoothGattCharacteristic::Permissions permissions,
BluetoothLocalGattCharacteristic* characteristic) {
- LOG(ERROR) << "Creating local GATT characteristic descriptors currently not "
- << "supported.";
- return NULL;
+#if defined(OS_CHROMEOS) || defined(OS_LINUX)
+ return bluez::BluetoothLocalGattDescriptorBlueZ::Create(uuid, permissions,
+ characteristic);
+ return nullptr;
+#else
+ NOTIMPLEMENTED();
+ return nullptr;
+#endif
}
} // namespace device
« no previous file with comments | « device/bluetooth/bluetooth_local_gatt_descriptor.h ('k') | device/bluetooth/bluetooth_local_gatt_descriptor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698