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

Unified Diff: device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc

Issue 264053004: device/bluetooth: Improvements to GATT descriptor access API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pull & rebase. Created 6 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/bluetooth_remote_gatt_service_chromeos.cc
diff --git a/device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc b/device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc
index c2a5dbf87244b0e7df226e5d35bcb76a3b2cb479..f2ec8618a5c29a30c75b1fa3a9324bc3e7a04dab 100644
--- a/device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc
+++ b/device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc
@@ -10,6 +10,7 @@
#include "chromeos/dbus/dbus_thread_manager.h"
#include "device/bluetooth/bluetooth_device_chromeos.h"
#include "device/bluetooth/bluetooth_remote_gatt_characteristic_chromeos.h"
+#include "device/bluetooth/bluetooth_remote_gatt_descriptor_chromeos.h"
namespace chromeos {
@@ -164,6 +165,32 @@ void BluetoothRemoteGattServiceChromeOS::NotifyServiceChanged() {
GattServiceChanged(this));
}
+void BluetoothRemoteGattServiceChromeOS::NotifyDescriptorAddedOrRemoved(
+ BluetoothRemoteGattCharacteristicChromeOS* characteristic,
+ BluetoothRemoteGattDescriptorChromeOS* descriptor,
+ bool added) {
+ DCHECK(characteristic->GetService() == this);
+ DCHECK(descriptor->GetCharacteristic() == characteristic);
+ if (added) {
+ FOR_EACH_OBSERVER(device::BluetoothGattService::Observer, observers_,
+ GattDescriptorAdded(characteristic, descriptor));
+ return;
+ }
+ FOR_EACH_OBSERVER(device::BluetoothGattService::Observer, observers_,
+ GattDescriptorRemoved(characteristic, descriptor));
+}
+
+void BluetoothRemoteGattServiceChromeOS::NotifyDescriptorValueChanged(
+ BluetoothRemoteGattCharacteristicChromeOS* characteristic,
+ BluetoothRemoteGattDescriptorChromeOS* descriptor,
+ const std::vector<uint8>& value) {
+ DCHECK(characteristic->GetService() == this);
+ DCHECK(descriptor->GetCharacteristic() == characteristic);
+ FOR_EACH_OBSERVER(
+ device::BluetoothGattService::Observer, observers_,
+ GattDescriptorValueChanged(characteristic, descriptor, value));
+}
+
void BluetoothRemoteGattServiceChromeOS::GattServicePropertyChanged(
const dbus::ObjectPath& object_path,
const std::string& property_name){
« no previous file with comments | « device/bluetooth/bluetooth_remote_gatt_service_chromeos.h ('k') | device/bluetooth/test/mock_bluetooth_gatt_characteristic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698