| OLD | NEW |
| 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 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_SERVICE_SERVICE_PROVIDER_IMPL_H_ | 5 #ifndef DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_SERVICE_SERVICE_PROVIDER_IMPL_H_ |
| 6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_SERVICE_SERVICE_PROVIDER_IMPL_H_ | 6 #define DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_SERVICE_SERVICE_PROVIDER_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "base/threading/platform_thread.h" | 14 #include "base/threading/platform_thread.h" |
| 15 #include "dbus/bus.h" | 15 #include "dbus/bus.h" |
| 16 #include "dbus/exported_object.h" | 16 #include "dbus/exported_object.h" |
| 17 #include "dbus/message.h" | 17 #include "dbus/message.h" |
| 18 #include "dbus/object_path.h" | 18 #include "dbus/object_path.h" |
| 19 #include "device/bluetooth/bluetooth_export.h" | 19 #include "device/bluetooth/bluetooth_export.h" |
| 20 #include "device/bluetooth/dbus/bluetooth_gatt_service_service_provider.h" | 20 #include "device/bluetooth/dbus/bluetooth_gatt_service_service_provider.h" |
| 21 | 21 |
| 22 namespace bluez { | 22 namespace bluez { |
| 23 | 23 |
| 24 // The BluetoothGattServiceServiceProvider implementation used in production. | 24 // The BluetoothGattServiceServiceProvider implementation used in production. |
| 25 class DEVICE_BLUETOOTH_EXPORT BluetoothGattServiceServiceProviderImpl | 25 class DEVICE_BLUETOOTH_EXPORT BluetoothGattServiceServiceProviderImpl |
| 26 : public BluetoothGattServiceServiceProvider { | 26 : public BluetoothGattServiceServiceProvider { |
| 27 public: | 27 public: |
| 28 // Use nullptr for |bus| to create for testing. |
| 28 BluetoothGattServiceServiceProviderImpl( | 29 BluetoothGattServiceServiceProviderImpl( |
| 29 dbus::Bus* bus, | 30 dbus::Bus* bus, |
| 30 const dbus::ObjectPath& object_path, | 31 const dbus::ObjectPath& object_path, |
| 31 const std::string& uuid, | 32 const std::string& uuid, |
| 32 bool is_primary, | 33 bool is_primary, |
| 33 const std::vector<dbus::ObjectPath>& includes); | 34 const std::vector<dbus::ObjectPath>& includes); |
| 34 | 35 |
| 35 ~BluetoothGattServiceServiceProviderImpl() override; | 36 ~BluetoothGattServiceServiceProviderImpl() override; |
| 36 | 37 |
| 37 private: | 38 private: |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 // invalidate its weak pointers before any other members are destroyed. | 93 // invalidate its weak pointers before any other members are destroyed. |
| 93 base::WeakPtrFactory<BluetoothGattServiceServiceProviderImpl> | 94 base::WeakPtrFactory<BluetoothGattServiceServiceProviderImpl> |
| 94 weak_ptr_factory_; | 95 weak_ptr_factory_; |
| 95 | 96 |
| 96 DISALLOW_COPY_AND_ASSIGN(BluetoothGattServiceServiceProviderImpl); | 97 DISALLOW_COPY_AND_ASSIGN(BluetoothGattServiceServiceProviderImpl); |
| 97 }; | 98 }; |
| 98 | 99 |
| 99 } // namespace bluez | 100 } // namespace bluez |
| 100 | 101 |
| 101 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_SERVICE_SERVICE_PROVIDER_IMPL_H_ | 102 #endif // DEVICE_BLUETOOTH_DBUS_BLUETOOTH_GATT_SERVICE_SERVICE_PROVIDER_IMPL_H_ |
| OLD | NEW |