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

Side by Side Diff: device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.h

Issue 1898643002: Refactor device::BluetoothGattXXX classes to split into remote/local. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
(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_CHARACTERISTIC_BLUEZ_H_
6 #define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_LOCAL_GATT_CHARACTERISTIC_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_characteristic.h"
12 #include "device/bluetooth/bluez/bluetooth_gatt_characteristic_bluez.h"
13
14 namespace device {
15
16 class BluetoothRemoteGattDescriptor;
17 class BluetoothRemoteGattService;
18
19 } // namespace device
20
21 namespace bluez {
22
23 class BluetoothLocalGattDescriptorBlueZ;
24 class BluetoothLocalGattServiceBlueZ;
25
26 // The BluetoothLocalGattCharacteristicBlueZ class implements
27 // BluetoothRemoteGattCharacteristic for remote GATT characteristics for
28 // platforms that use BlueZ.
29 class BluetoothLocalGattCharacteristicBlueZ
30 : public BluetoothGattCharacteristicBlueZ,
31 public device::BluetoothLocalGattCharacteristic {
32 public:
33 // device::BluetoothLocalGattCharacteristic overrides.
34
35 private:
36 friend class BluetoothLocalGattServiceBlueZ;
37
38 BluetoothLocalGattCharacteristicBlueZ(BluetoothLocalGattServiceBlueZ* service,
39 const dbus::ObjectPath& object_path);
40 ~BluetoothLocalGattCharacteristicBlueZ() override;
41
42 // Note: This should remain the last member so it'll be destroyed and
43 // invalidate its weak pointers before any other members are destroyed.
44 base::WeakPtrFactory<BluetoothLocalGattCharacteristicBlueZ> weak_ptr_factory_;
45
46 DISALLOW_COPY_AND_ASSIGN(BluetoothLocalGattCharacteristicBlueZ);
47 };
48
49 } // namespace bluez
50
51 #endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_LOCAL_GATT_CHARACTERISTIC_BLUEZ_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698