OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_LOCAL_GATT_DESCRIPTOR_BLUEZ_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_LOCAL_GATT_DESCRIPTOR_BLUEZ_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/weak_ptr.h" |
| 10 #include "dbus/object_path.h" |
| 11 #include "device/bluetooth/bluetooth_local_gatt_descriptor.h" |
| 12 #include "device/bluetooth/bluez/bluetooth_gatt_descriptor_bluez.h" |
| 13 |
| 14 namespace bluez { |
| 15 |
| 16 // The BluetoothLocalGattDescriptorBlueZ class implements |
| 17 // BluetoothRemoteGattDescriptor for remote and local GATT characteristic |
| 18 // descriptors |
| 19 // for platforms that use BlueZ. |
| 20 class BluetoothLocalGattDescriptorBlueZ |
| 21 : public BluetoothGattDescriptorBlueZ, |
| 22 public device::BluetoothLocalGattDescriptor { |
| 23 public: |
| 24 private: |
| 25 explicit BluetoothLocalGattDescriptorBlueZ( |
| 26 const dbus::ObjectPath& object_path); |
| 27 ~BluetoothLocalGattDescriptorBlueZ() override; |
| 28 |
| 29 // Note: This should remain the last member so it'll be destroyed and |
| 30 // invalidate its weak pointers before any other members are destroyed. |
| 31 base::WeakPtrFactory<BluetoothLocalGattDescriptorBlueZ> weak_ptr_factory_; |
| 32 |
| 33 DISALLOW_COPY_AND_ASSIGN(BluetoothLocalGattDescriptorBlueZ); |
| 34 }; |
| 35 |
| 36 } // namespace bluez |
| 37 |
| 38 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_LOCAL_GATT_DESCRIPTOR_BLUEZ_H_ |
OLD | NEW |