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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.h
diff --git a/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.h b/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.h
new file mode 100644
index 0000000000000000000000000000000000000000..9c7bb4cb8df48e6a92c1ddcab424859c9869c0ff
--- /dev/null
+++ b/device/bluetooth/bluez/bluetooth_local_gatt_characteristic_bluez.h
@@ -0,0 +1,51 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_LOCAL_GATT_CHARACTERISTIC_BLUEZ_H_
+#define DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_LOCAL_GATT_CHARACTERISTIC_BLUEZ_H_
+
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "dbus/object_path.h"
+#include "device/bluetooth/bluetooth_local_gatt_characteristic.h"
+#include "device/bluetooth/bluez/bluetooth_gatt_characteristic_bluez.h"
+
+namespace device {
+
+class BluetoothRemoteGattDescriptor;
+class BluetoothRemoteGattService;
+
+} // namespace device
+
+namespace bluez {
+
+class BluetoothLocalGattDescriptorBlueZ;
+class BluetoothLocalGattServiceBlueZ;
+
+// The BluetoothLocalGattCharacteristicBlueZ class implements
+// BluetoothRemoteGattCharacteristic for remote GATT characteristics for
+// platforms that use BlueZ.
+class BluetoothLocalGattCharacteristicBlueZ
+ : public BluetoothGattCharacteristicBlueZ,
+ public device::BluetoothLocalGattCharacteristic {
+ public:
+ // device::BluetoothLocalGattCharacteristic overrides.
+
+ private:
+ friend class BluetoothLocalGattServiceBlueZ;
+
+ BluetoothLocalGattCharacteristicBlueZ(BluetoothLocalGattServiceBlueZ* service,
+ const dbus::ObjectPath& object_path);
+ ~BluetoothLocalGattCharacteristicBlueZ() override;
+
+ // Note: This should remain the last member so it'll be destroyed and
+ // invalidate its weak pointers before any other members are destroyed.
+ base::WeakPtrFactory<BluetoothLocalGattCharacteristicBlueZ> weak_ptr_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(BluetoothLocalGattCharacteristicBlueZ);
+};
+
+} // namespace bluez
+
+#endif // DEVICE_BLUETOOTH_BLUEZ_BLUETOOTH_LOCAL_GATT_CHARACTERISTIC_BLUEZ_H_

Powered by Google App Engine
This is Rietveld 408576698