| 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_service_client.h" | 5 #include "device/bluetooth/dbus/bluetooth_gatt_service_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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 // dbus::ObjectManager::Interface override. | 89 // dbus::ObjectManager::Interface override. |
| 90 void ObjectRemoved(const dbus::ObjectPath& object_path, | 90 void ObjectRemoved(const dbus::ObjectPath& object_path, |
| 91 const std::string& interface_name) override { | 91 const std::string& interface_name) override { |
| 92 VLOG(2) << "Remote GATT service removed: " << object_path.value(); | 92 VLOG(2) << "Remote GATT service removed: " << object_path.value(); |
| 93 FOR_EACH_OBSERVER(BluetoothGattServiceClient::Observer, observers_, | 93 FOR_EACH_OBSERVER(BluetoothGattServiceClient::Observer, observers_, |
| 94 GattServiceRemoved(object_path)); | 94 GattServiceRemoved(object_path)); |
| 95 } | 95 } |
| 96 | 96 |
| 97 protected: | 97 protected: |
| 98 // chromeos::DBusClient override. | 98 // bluez::DBusClient override. |
| 99 void Init(dbus::Bus* bus) override { | 99 void Init(dbus::Bus* bus) override { |
| 100 object_manager_ = bus->GetObjectManager( | 100 object_manager_ = bus->GetObjectManager( |
| 101 bluetooth_object_manager::kBluetoothObjectManagerServiceName, | 101 bluetooth_object_manager::kBluetoothObjectManagerServiceName, |
| 102 dbus::ObjectPath( | 102 dbus::ObjectPath( |
| 103 bluetooth_object_manager::kBluetoothObjectManagerServicePath)); | 103 bluetooth_object_manager::kBluetoothObjectManagerServicePath)); |
| 104 object_manager_->RegisterInterface( | 104 object_manager_->RegisterInterface( |
| 105 bluetooth_gatt_service::kBluetoothGattServiceInterface, this); | 105 bluetooth_gatt_service::kBluetoothGattServiceInterface, this); |
| 106 } | 106 } |
| 107 | 107 |
| 108 private: | 108 private: |
| (...skipping 25 matching lines...) Expand all Loading... |
| 134 BluetoothGattServiceClient::BluetoothGattServiceClient() {} | 134 BluetoothGattServiceClient::BluetoothGattServiceClient() {} |
| 135 | 135 |
| 136 BluetoothGattServiceClient::~BluetoothGattServiceClient() {} | 136 BluetoothGattServiceClient::~BluetoothGattServiceClient() {} |
| 137 | 137 |
| 138 // static | 138 // static |
| 139 BluetoothGattServiceClient* BluetoothGattServiceClient::Create() { | 139 BluetoothGattServiceClient* BluetoothGattServiceClient::Create() { |
| 140 return new BluetoothGattServiceClientImpl(); | 140 return new BluetoothGattServiceClientImpl(); |
| 141 } | 141 } |
| 142 | 142 |
| 143 } // namespace bluez | 143 } // namespace bluez |
| OLD | NEW |