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

Unified Diff: device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.cc

Issue 1947353002: //device/bluetooth support for attribute properties and permissions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@properties
Patch Set: Created 4 years, 7 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/bluez/bluetooth_local_gatt_characteristic_bluez.cc
diff --git a/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.cc b/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.cc
index b5d952d4956d447d126f8f72efa81dd02119ab4f..c43f5c7e899c84cb06315ec65375a1df2027d769 100644
--- a/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.cc
+++ b/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.cc
@@ -22,8 +22,10 @@ BluetoothLocalGattCharacteristic::Create(
DCHECK(service);
bluez::BluetoothLocalGattServiceBlueZ* service_bluez =
static_cast<bluez::BluetoothLocalGattServiceBlueZ*>(service);
+ // TODO(rkc): Handle permisisons once BlueZ supports getting them from DBus.
bluez::BluetoothLocalGattCharacteristicBlueZ* characteristic =
- new bluez::BluetoothLocalGattCharacteristicBlueZ(uuid, service_bluez);
+ new bluez::BluetoothLocalGattCharacteristicBlueZ(uuid, properties,
+ service_bluez);
return characteristic->weak_ptr_factory_.GetWeakPtr();
}
@@ -33,11 +35,13 @@ namespace bluez {
BluetoothLocalGattCharacteristicBlueZ::BluetoothLocalGattCharacteristicBlueZ(
const device::BluetoothUUID& uuid,
+ Properties properties,
BluetoothLocalGattServiceBlueZ* service)
: BluetoothGattCharacteristicBlueZ(
BluetoothLocalGattServiceBlueZ::AddGuidToObjectPath(
service->object_path().value() + "/characteristic")),
uuid_(uuid),
+ properties_(properties),
service_(service),
weak_ptr_factory_(this) {
VLOG(1) << "Creating local GATT characteristic with identifier: "
@@ -54,8 +58,7 @@ device::BluetoothUUID BluetoothLocalGattCharacteristicBlueZ::GetUUID() const {
device::BluetoothGattCharacteristic::Properties
BluetoothLocalGattCharacteristicBlueZ::GetProperties() const {
- NOTIMPLEMENTED();
- return Properties();
+ return properties_;
}
device::BluetoothGattCharacteristic::Permissions

Powered by Google App Engine
This is Rietveld 408576698