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

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

Issue 1919683002: Adapter changes for implementing local GATT attributes and tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dbus_classes
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/bluez/bluetooth_local_gatt_service_bluez.cc
diff --git a/device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.cc b/device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.cc
index f965c8e76371a8e90b69b34989a9d220915a3780..dd044d21b99b00a3d8eaaa1f0f9de1e79c65cc75 100644
--- a/device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.cc
+++ b/device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.cc
@@ -28,7 +28,7 @@ base::WeakPtr<BluetoothLocalGattService> BluetoothLocalGattService::Create(
return service->weak_ptr_factory_.GetWeakPtr();
}
-} // device
+} // namespace device
namespace bluez {
@@ -37,12 +37,14 @@ BluetoothLocalGattServiceBlueZ::BluetoothLocalGattServiceBlueZ(
const device::BluetoothUUID& uuid,
bool is_primary,
device::BluetoothLocalGattService::Delegate* delegate)
- : BluetoothGattServiceBlueZ(adapter, AddGuidToObjectPath("/service")),
+ : BluetoothGattServiceBlueZ(
+ adapter,
+ AddGuidToObjectPath(adapter->GetApplicationObjectPath().value() +
+ "/service")),
uuid_(uuid),
is_primary_(is_primary),
delegate_(delegate),
weak_ptr_factory_(this) {
- // TODO(rkc): Get base application path from adapter and prefix it here.
VLOG(1) << "Creating local GATT service with identifier: " << GetIdentifier();
adapter->AddLocalGattService(base::WrapUnique(this));
}
@@ -60,14 +62,14 @@ bool BluetoothLocalGattServiceBlueZ::IsPrimary() const {
void BluetoothLocalGattServiceBlueZ::Register(
const base::Closure& callback,
const ErrorCallback& error_callback) {
- // GetAdapter()->RegisterGattService(this, callback, error_callback);
+ GetAdapter()->RegisterGattService(this, callback, error_callback);
}
void BluetoothLocalGattServiceBlueZ::Unregister(
const base::Closure& callback,
const ErrorCallback& error_callback) {
DCHECK(GetAdapter());
- // GetAdapter()->UnregisterGattService(this, callback, error_callback);
+ GetAdapter()->UnregisterGattService(this, callback, error_callback);
}
const std::vector<std::unique_ptr<BluetoothLocalGattCharacteristicBlueZ>>&
« no previous file with comments | « device/bluetooth/bluez/bluetooth_adapter_bluez.cc ('k') | device/bluetooth/test/bluetooth_gatt_server_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698