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

Unified Diff: device/bluetooth/bluetooth_adapter_bluez.cc

Issue 1681853003: Add BluetoothRemoteGattServiceWin to BluetoothDeviceWin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add PlatformSupportsLowEnergy check in the unittests Created 4 years, 10 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
« no previous file with comments | « device/bluetooth/bluetooth_adapter_bluez.h ('k') | device/bluetooth/bluetooth_device.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_adapter_bluez.cc
diff --git a/device/bluetooth/bluetooth_adapter_bluez.cc b/device/bluetooth/bluetooth_adapter_bluez.cc
index 89abe8e30d9ce3896de252b3c43a06364e99b4bf..141e2dbc7fc6e7c17281a70532d49e0670487f60 100644
--- a/device/bluetooth/bluetooth_adapter_bluez.cc
+++ b/device/bluetooth/bluetooth_adapter_bluez.cc
@@ -480,6 +480,7 @@ void BluetoothAdapterBlueZ::DevicePropertyChanged(
}
if (property_name == properties->gatt_services.name()) {
+ device_bluez->SetGattServicesDiscoveryComplete(true);
NotifyGattServicesDiscovered(device_bluez);
}
@@ -911,120 +912,6 @@ void BluetoothAdapterBlueZ::NotifyDeviceAddressChanged(
DeviceAddressChanged(this, device, old_address));
}
-void BluetoothAdapterBlueZ::NotifyGattServiceAdded(
- BluetoothRemoteGattServiceBlueZ* service) {
- DCHECK_EQ(service->GetAdapter(), this);
- DCHECK_EQ(static_cast<BluetoothDeviceBlueZ*>(service->GetDevice())->adapter_,
- this);
-
- FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
- GattServiceAdded(this, service->GetDevice(), service));
-}
-
-void BluetoothAdapterBlueZ::NotifyGattServiceRemoved(
- BluetoothRemoteGattServiceBlueZ* service) {
- DCHECK_EQ(service->GetAdapter(), this);
- DCHECK_EQ(static_cast<BluetoothDeviceBlueZ*>(service->GetDevice())->adapter_,
- this);
-
- FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
- GattServiceRemoved(this, service->GetDevice(), service));
-}
-
-void BluetoothAdapterBlueZ::NotifyGattServiceChanged(
- BluetoothRemoteGattServiceBlueZ* service) {
- DCHECK_EQ(service->GetAdapter(), this);
-
- FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
- GattServiceChanged(this, service));
-}
-
-void BluetoothAdapterBlueZ::NotifyGattServicesDiscovered(
- BluetoothDeviceBlueZ* device) {
- DCHECK(device->adapter_ == this);
-
- device->SetGattServicesDiscoveryComplete(true);
- FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
- GattServicesDiscovered(this, device));
-}
-
-void BluetoothAdapterBlueZ::NotifyGattDiscoveryComplete(
- BluetoothRemoteGattServiceBlueZ* service) {
- DCHECK_EQ(service->GetAdapter(), this);
-
- FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
- GattDiscoveryCompleteForService(this, service));
-}
-
-void BluetoothAdapterBlueZ::NotifyGattCharacteristicAdded(
- BluetoothRemoteGattCharacteristicBlueZ* characteristic) {
- DCHECK_EQ(static_cast<BluetoothRemoteGattServiceBlueZ*>(
- characteristic->GetService())
- ->GetAdapter(),
- this);
-
- FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
- GattCharacteristicAdded(this, characteristic));
-}
-
-void BluetoothAdapterBlueZ::NotifyGattCharacteristicRemoved(
- BluetoothRemoteGattCharacteristicBlueZ* characteristic) {
- DCHECK_EQ(static_cast<BluetoothRemoteGattServiceBlueZ*>(
- characteristic->GetService())
- ->GetAdapter(),
- this);
-
- FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
- GattCharacteristicRemoved(this, characteristic));
-}
-
-void BluetoothAdapterBlueZ::NotifyGattDescriptorAdded(
- BluetoothRemoteGattDescriptorBlueZ* descriptor) {
- DCHECK_EQ(static_cast<BluetoothRemoteGattServiceBlueZ*>(
- descriptor->GetCharacteristic()->GetService())
- ->GetAdapter(),
- this);
-
- FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
- GattDescriptorAdded(this, descriptor));
-}
-
-void BluetoothAdapterBlueZ::NotifyGattDescriptorRemoved(
- BluetoothRemoteGattDescriptorBlueZ* descriptor) {
- DCHECK_EQ(static_cast<BluetoothRemoteGattServiceBlueZ*>(
- descriptor->GetCharacteristic()->GetService())
- ->GetAdapter(),
- this);
-
- FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
- GattDescriptorRemoved(this, descriptor));
-}
-
-void BluetoothAdapterBlueZ::NotifyGattCharacteristicValueChanged(
- BluetoothRemoteGattCharacteristicBlueZ* characteristic,
- const std::vector<uint8_t>& value) {
- DCHECK_EQ(static_cast<BluetoothRemoteGattServiceBlueZ*>(
- characteristic->GetService())
- ->GetAdapter(),
- this);
-
- FOR_EACH_OBSERVER(
- BluetoothAdapter::Observer, observers_,
- GattCharacteristicValueChanged(this, characteristic, value));
-}
-
-void BluetoothAdapterBlueZ::NotifyGattDescriptorValueChanged(
- BluetoothRemoteGattDescriptorBlueZ* descriptor,
- const std::vector<uint8_t>& value) {
- DCHECK_EQ(static_cast<BluetoothRemoteGattServiceBlueZ*>(
- descriptor->GetCharacteristic()->GetService())
- ->GetAdapter(),
- this);
-
- FOR_EACH_OBSERVER(BluetoothAdapter::Observer, observers_,
- GattDescriptorValueChanged(this, descriptor, value));
-}
-
void BluetoothAdapterBlueZ::UseProfile(
const BluetoothUUID& uuid,
const dbus::ObjectPath& device_path,
« no previous file with comments | « device/bluetooth/bluetooth_adapter_bluez.h ('k') | device/bluetooth/bluetooth_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698