| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "device/bluetooth/dbus/bluetooth_gatt_characteristic_client.h" | 5 #include "device/bluetooth/dbus/bluetooth_gatt_characteristic_client.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
| 10 #include "dbus/bus.h" | 10 #include "dbus/bus.h" |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 | 203 |
| 204 // dbus::ObjectManager::Interface override. | 204 // dbus::ObjectManager::Interface override. |
| 205 void ObjectRemoved(const dbus::ObjectPath& object_path, | 205 void ObjectRemoved(const dbus::ObjectPath& object_path, |
| 206 const std::string& interface_name) override { | 206 const std::string& interface_name) override { |
| 207 VLOG(2) << "Remote GATT characteristic removed: " << object_path.value(); | 207 VLOG(2) << "Remote GATT characteristic removed: " << object_path.value(); |
| 208 FOR_EACH_OBSERVER(BluetoothGattCharacteristicClient::Observer, observers_, | 208 FOR_EACH_OBSERVER(BluetoothGattCharacteristicClient::Observer, observers_, |
| 209 GattCharacteristicRemoved(object_path)); | 209 GattCharacteristicRemoved(object_path)); |
| 210 } | 210 } |
| 211 | 211 |
| 212 protected: | 212 protected: |
| 213 // chromeos::DBusClient override. | 213 // bluez::DBusClient override. |
| 214 void Init(dbus::Bus* bus) override { | 214 void Init(dbus::Bus* bus) override { |
| 215 object_manager_ = bus->GetObjectManager( | 215 object_manager_ = bus->GetObjectManager( |
| 216 bluetooth_object_manager::kBluetoothObjectManagerServiceName, | 216 bluetooth_object_manager::kBluetoothObjectManagerServiceName, |
| 217 dbus::ObjectPath( | 217 dbus::ObjectPath( |
| 218 bluetooth_object_manager::kBluetoothObjectManagerServicePath)); | 218 bluetooth_object_manager::kBluetoothObjectManagerServicePath)); |
| 219 object_manager_->RegisterInterface( | 219 object_manager_->RegisterInterface( |
| 220 bluetooth_gatt_characteristic::kBluetoothGattCharacteristicInterface, | 220 bluetooth_gatt_characteristic::kBluetoothGattCharacteristicInterface, |
| 221 this); | 221 this); |
| 222 } | 222 } |
| 223 | 223 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 BluetoothGattCharacteristicClient::BluetoothGattCharacteristicClient() {} | 294 BluetoothGattCharacteristicClient::BluetoothGattCharacteristicClient() {} |
| 295 | 295 |
| 296 BluetoothGattCharacteristicClient::~BluetoothGattCharacteristicClient() {} | 296 BluetoothGattCharacteristicClient::~BluetoothGattCharacteristicClient() {} |
| 297 | 297 |
| 298 // static | 298 // static |
| 299 BluetoothGattCharacteristicClient* BluetoothGattCharacteristicClient::Create() { | 299 BluetoothGattCharacteristicClient* BluetoothGattCharacteristicClient::Create() { |
| 300 return new BluetoothGattCharacteristicClientImpl(); | 300 return new BluetoothGattCharacteristicClientImpl(); |
| 301 } | 301 } |
| 302 | 302 |
| 303 } // namespace bluez | 303 } // namespace bluez |
| OLD | NEW |