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

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

Issue 1973703002: Implement //device/bt changes for notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@notifications_dbus
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_adapter_bluez.cc
diff --git a/device/bluetooth/bluez/bluetooth_adapter_bluez.cc b/device/bluetooth/bluez/bluetooth_adapter_bluez.cc
index 842e83d6848f965f8f1a45c59e260318f31fce6d..446f364775e1c2e71930ae21b52020d1b72457ec 100644
--- a/device/bluetooth/bluez/bluetooth_adapter_bluez.cc
+++ b/device/bluetooth/bluez/bluetooth_adapter_bluez.cc
@@ -27,6 +27,7 @@
#include "device/bluetooth/bluez/bluetooth_audio_sink_bluez.h"
#include "device/bluetooth/bluez/bluetooth_device_bluez.h"
#include "device/bluetooth/bluez/bluetooth_gatt_service_bluez.h"
+#include "device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.h"
#include "device/bluetooth/bluez/bluetooth_local_gatt_service_bluez.h"
#include "device/bluetooth/bluez/bluetooth_pairing_bluez.h"
#include "device/bluetooth/bluez/bluetooth_socket_bluez.h"
@@ -1140,7 +1141,17 @@ bool BluetoothAdapterBlueZ::IsGattServiceRegistered(
return registered_gatt_services_.count(service->object_path()) != 0;
}
-// Returns the object path of the adapter.
+bool BluetoothAdapterBlueZ::SendValueChanged(
+ BluetoothLocalGattCharacteristicBlueZ* characteristic,
+ const std::vector<uint8_t>& value) {
+ if (registered_gatt_services_.count(
+ characteristic->GetService()->object_path()) == 0)
+ return false;
+ gatt_application_provider_->SendValueChanged(characteristic->object_path(),
+ value);
+ return true;
+}
+
dbus::ObjectPath BluetoothAdapterBlueZ::GetApplicationObjectPath() const {
return dbus::ObjectPath(object_path_.value() + kGattApplicationObjectPath);
}
« no previous file with comments | « device/bluetooth/bluez/bluetooth_adapter_bluez.h ('k') | device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698