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

Side by Side Diff: device/bluetooth/bluez/bluetooth_remote_gatt_service_bluez.cc

Issue 1915803002: Bluetooth class changes for implementing local GATT attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <iterator> 5 #include <iterator>
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "dbus/property.h" 8 #include "dbus/property.h"
9 #include "device/bluetooth/bluez/bluetooth_adapter_bluez.h" 9 #include "device/bluetooth/bluez/bluetooth_adapter_bluez.h"
10 #include "device/bluetooth/bluez/bluetooth_device_bluez.h" 10 #include "device/bluetooth/bluez/bluetooth_device_bluez.h"
11 #include "device/bluetooth/bluez/bluetooth_gatt_characteristic_bluez.h" 11 #include "device/bluetooth/bluez/bluetooth_gatt_characteristic_bluez.h"
12 #include "device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h" 12 #include "device/bluetooth/bluez/bluetooth_remote_gatt_characteristic_bluez.h"
13 #include "device/bluetooth/bluez/bluetooth_remote_gatt_descriptor_bluez.h" 13 #include "device/bluetooth/bluez/bluetooth_remote_gatt_descriptor_bluez.h"
14 #include "device/bluetooth/bluez/bluetooth_remote_gatt_service_bluez.h" 14 #include "device/bluetooth/bluez/bluetooth_remote_gatt_service_bluez.h"
15 #include "device/bluetooth/dbus/bluez_dbus_manager.h" 15 #include "device/bluetooth/dbus/bluez_dbus_manager.h"
16 16
17 namespace bluez { 17 namespace bluez {
18 18
19 BluetoothRemoteGattServiceBlueZ::BluetoothRemoteGattServiceBlueZ( 19 BluetoothRemoteGattServiceBlueZ::BluetoothRemoteGattServiceBlueZ(
20 BluetoothAdapterBlueZ* adapter, 20 BluetoothAdapterBlueZ* adapter,
21 BluetoothDeviceBlueZ* device, 21 BluetoothDeviceBlueZ* device,
22 const dbus::ObjectPath& object_path) 22 const dbus::ObjectPath& object_path)
23 : BluetoothGattServiceBlueZ(adapter), 23 : BluetoothGattServiceBlueZ(adapter, object_path),
24 device_(device), 24 device_(device),
25 discovery_complete_(false), 25 discovery_complete_(false),
26 weak_ptr_factory_(this) { 26 weak_ptr_factory_(this) {
27 object_path_ = object_path;
28 VLOG(1) << "Creating remote GATT service with identifier: " 27 VLOG(1) << "Creating remote GATT service with identifier: "
29 << object_path.value(); 28 << object_path.value();
30 DCHECK(GetAdapter()); 29 DCHECK(GetAdapter());
31 30
32 bluez::BluezDBusManager::Get()->GetBluetoothGattServiceClient()->AddObserver( 31 bluez::BluezDBusManager::Get()->GetBluetoothGattServiceClient()->AddObserver(
33 this); 32 this);
34 bluez::BluezDBusManager::Get() 33 bluez::BluezDBusManager::Get()
35 ->GetBluetoothGattCharacteristicClient() 34 ->GetBluetoothGattCharacteristicClient()
36 ->AddObserver(this); 35 ->AddObserver(this);
37 36
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 DCHECK(GetAdapter()); 255 DCHECK(GetAdapter());
257 256
258 if (property_name == properties->flags.name()) 257 if (property_name == properties->flags.name())
259 NotifyServiceChanged(); 258 NotifyServiceChanged();
260 else if (property_name == properties->value.name()) 259 else if (property_name == properties->value.name())
261 GetAdapter()->NotifyGattCharacteristicValueChanged( 260 GetAdapter()->NotifyGattCharacteristicValueChanged(
262 iter->second, properties->value.value()); 261 iter->second, properties->value.value());
263 } 262 }
264 263
265 } // namespace bluez 264 } // namespace bluez
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698